/* ===================================
   Path2Profits Bookkeeping - Styles
   Color Palette (Indigo Purple & Champagne Gold):
   - Primary: #3B2A66 (Indigo Purple)
   - Secondary: #241845 (Deep Indigo)
   - Accent: #8A8276 (Warm Taupe); light variant #D7D0C5 for dark backgrounds
   - Gray: #969696 (Medium Gray)
   - Light Background: #f5f4fa (Off-White)
   - Text: #333333
   - Background: #FFFFFF
   =================================== */

/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #3B2A66;
    --secondary-color: #241845;
    --accent-color: #8A8276;
    --gray: #969696;
    --text-dark: #333333;
    --text-light: #969696;
    --background-white: #FFFFFF;
    --background-light: #f5f4fa;
    --border-color: #969696;
    --shadow: 0 4px 6px rgba(59, 42, 102, 0.1);
    --shadow-lg: 0 10px 30px rgba(59, 42, 102, 0.15);
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: var(--text-dark);
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Typography */
h1, h2, h3, h4 {
    font-weight: 600;
    line-height: 1.2;
    color: var(--text-dark);
}

h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
}

h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

h3 {
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
}

/* Navigation */
.navbar {
    background: var(--background-white);
    box-shadow: var(--shadow);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 1rem 0;
}

.nav-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo img {
    height: 120px;
    width: auto;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
    align-items: center;
}

.nav-menu a {
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

/* Text links (excludes the gold "Get Started" button) */
.nav-menu a:not(.btn-gold),
.nav-menu a:not(.btn-gold):visited {
    color: #5B4A8E; /* lighter indigo, matches logo */
}

/* Hover + current-section highlight use gold (current section set via scrollspy in script.js) */
.nav-menu a:not(.btn-gold):hover {
    color: #756E63; /* gold */
}

/* Mobile menu toggle (hamburger) - hidden on desktop, shown in the mobile media query */
.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 44px;
    height: 44px;
    padding: 8px;
    background: none;
    border: none;
    cursor: pointer;
}

.nav-toggle span {
    display: block;
    width: 100%;
    height: 3px;
    background: #5B4A8E;
    border-radius: 2px;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.nav-toggle.open span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* Buttons */
.btn-primary, .btn-secondary, .btn-gold {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
    font-size: 1rem;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background: transparent;
    color: #D7D0C5;
    border: 2px solid #D7D0C5;
}

.btn-secondary:hover {
    background: #D7D0C5;
    color: var(--secondary-color);
}

.btn-gold {
    background: var(--accent-color);
    color: white;
}

.btn-gold:hover {
    background: #6F685D;
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1.1rem;
}

/* Hero Section */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    margin-top: 110px;
    overflow: hidden;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

.hero-background img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: none;
}

.hero-content {
    position: relative;
    z-index: 1;
    color: white;
    text-align: center;
    max-width: 900px;
    background: rgba(0, 0, 0, 0.8);
    padding: 3rem;
    border-radius: 16px;
    transform: translateY(-20px);
}

.hero-eyebrow {
    font-size: 3.8rem;
    font-weight: 600;
    font-style: italic;
    letter-spacing: 0.03em;
    text-transform: none;
    color: #D7D0C5;
    margin-bottom: 0.8rem;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.8);
}

.hero h1 {
    color: white;
    font-size: 2.2rem;
    font-weight: 400;
    margin-bottom: 1.5rem;
    text-shadow: 3px 3px 12px rgba(0, 0, 0, 0.8);
}

.hero-subtitle {
    font-size: 1.5rem;
    margin-bottom: 2.5rem;
    opacity: 1;
    line-height: 1.5;
    font-weight: 600;
    text-shadow: 3px 3px 12px rgba(0, 0, 0, 0.8);
}

.hero-buttons {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Value Propositions */
.value-props {
    padding: 4rem 0;
    background: #F2F0EC; /* taupe light */
    min-height: calc(100vh - 152px); /* its own full-height "page" so Services doesn't peek in */
    display: flex;
    align-items: center;
}

.value-props .container {
    width: 100%;
}

.value-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.value-card {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    border: 2px solid var(--accent-color);
    box-shadow: var(--shadow);
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.value-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

.value-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    filter: grayscale(0.2);
}

.value-card h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.value-card p {
    color: #444444;
    line-height: 1.7;
    font-weight: 500;
}

/* Services Section */
.services {
    padding: 5rem 0;
    background: #FAF9F6; /* taupe near-white */
}

.section-header {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 3rem;
}

.section-header p {
    font-size: 1.2rem;
    color: var(--primary-color);
    font-weight: 500;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.service-item {
    padding: 2rem;
    border: 2px solid var(--accent-color);
    border-radius: 12px;
    transition: all 0.3s ease;
}

.service-item:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
}

.service-item h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    text-align: center;
}

.service-item p {
    color: #444444;
    font-weight: 500;
    text-align: justify;
    hyphens: auto;
}

/* Benefits Section */
.benefits {
    padding: 5rem 0;
    background: #F2F0EC; /* taupe light */
}

.benefits-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.benefits-list {
    list-style: none;
}

.benefits-list li {
    margin-bottom: 2rem;
    padding-left: 2rem;
    position: relative;
}

.benefits-list li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--primary-color);
    font-weight: bold;
    font-size: 1.5rem;
}

.benefits-list strong {
    color: var(--primary-color);
    font-size: 1.2rem;
    display: block;
    margin-bottom: 0.5rem;
}

.benefits-list p {
    color: #444444;
    font-weight: 500;
}

.benefits-image {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.stat-card {
    background: white;
    padding: 3rem 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    text-align: center;
}

.stat-number {
    font-size: 4rem;
    font-weight: bold;
    color: var(--primary-color);
    line-height: 1;
}

.stat-label {
    font-size: 1.2rem;
    color: #444444;
    margin-top: 1rem;
    font-weight: 500;
}

/* Philanthropy Section */
.philanthropy {
    padding: 2rem 0;
    background: #FAF9F6; /* taupe near-white (matches Services) */
}

.philanthropy-content {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 3rem;
    align-items: center;
}

.philanthropy-text h2 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
}

.philanthropy-intro {
    font-size: 1.2rem;
    color: #444444;
    margin-bottom: 1.25rem;
    font-weight: 500;
    line-height: 1.6;
}

.philanthropy-offer {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    border-left: 4px solid var(--primary-color);
    box-shadow: var(--shadow-lg);
}

.philanthropy-offer h3 {
    color: var(--secondary-color);
    margin-bottom: 1rem;
}

.philanthropy-offer p {
    color: #444444;
    line-height: 1.7;
    margin-bottom: 1rem;
    font-weight: 500;
}

.philanthropy-offer p:last-child {
    margin-bottom: 0;
}

.philanthropy-logo {
    text-align: center;
    background: white;
    padding: 1.75rem 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
}

.community-photo {
    width: 100%;
    height: auto;
    border-radius: 12px;
    margin-bottom: 1rem;
    box-shadow: var(--shadow-lg);
    object-fit: cover;
}

.philanthropy-logo .partner-logo {
    max-width: 65%;
    height: auto;
    margin-bottom: 1rem;
}

.partnership-text {
    color: var(--primary-color);
    font-size: 1.1rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* CTA Section */
.cta-section {
    padding: 2rem 0;
    background: #E3DED6; /* taupe deep (was the Community color) */
    color: var(--secondary-color);
    text-align: center;
}

.cta-section h2 {
    color: var(--secondary-color);
    margin-bottom: 0.75rem;
}

.cta-section p {
    font-size: 1.3rem;
    margin-bottom: 1.25rem;
    opacity: 0.95;
}

/* Contact Section */
.contact {
    padding: 4rem 0;
    background: var(--secondary-color);
    min-height: calc(100vh - 152px); /* fill the viewport so the footer stays below the fold */
    display: flex;
    align-items: center;
}

.contact .container {
    width: 100%;
}

.contact .section-header {
    margin-bottom: 1.5rem;
}

.contact .section-header h2 {
    color: white;
}

.contact .section-header p {
    color: rgba(255, 255, 255, 0.85);
}

.contact-wrapper {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2.5rem;
    margin-top: 1.5rem;
}

.contact-form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    background: white;
    padding: 2rem;
    border-radius: 12px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group.full-width {
    grid-column: 1 / -1;
}

.form-group label {
    margin-bottom: 0.3rem;
    font-weight: 600;
    color: var(--text-dark);
}

.form-group input,
.form-group textarea {
    padding: 0.6rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.contact-form button {
    grid-column: 1 / -1;
}

.contact-info {
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.9);
    padding: 2rem;
    border-radius: 12px;
}

.contact-info h3 {
    color: #D7D0C5;
    margin-bottom: 1rem;
}

.contact-info p {
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 2rem;
    font-weight: 500;
}

.info-item {
    margin-bottom: 1.5rem;
}

.info-item strong {
    color: #D7D0C5;
}

.info-item a {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
}

.info-item a:hover {
    color: var(--accent-color);
}

/* Footer */
.footer {
    background: #D7D0C5; /* lightest taupe accent */
    color: var(--text-dark);
    padding: 3rem 0 1rem;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 3rem;
    margin-bottom: 2rem;
}

.footer-logo img {
    height: 80px;
    margin-bottom: 1rem;
}

.footer-logo p {
    color: #555555;
}

.footer-scripture {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-top: 0.75rem;
}

.footer-scripture img {
    height: 70px;
    width: auto;
    margin-bottom: 0;
    flex-shrink: 0;
    filter: none;
}

.footer-scripture span {
    color: #555555;
    font-size: 0.9rem;
    font-style: italic;
}

.footer-links h4,
.footer-contact h4 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.footer-links ul {
    list-style: none;
}

.footer-links a {
    color: #555555;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: #756E63;
}

.footer-contact p {
    color: #555555;
    margin-bottom: 0.5rem;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(0, 0, 0, 0.12);
}

.footer-bottom p {
    color: #888888;
}

/* Responsive Design */
@media (max-width: 768px) {
    h1 {
        font-size: 2rem;
    }

    h2 {
        font-size: 1.8rem;
    }

    section[id] {
        scroll-margin-top: 76px;
    }

    /* Navbar + mobile dropdown menu */
    .navbar {
        padding: 0.6rem 0;
    }

    .logo img {
        height: 56px;
    }

    .nav-toggle {
        display: flex;
    }

    .nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        flex-direction: column;
        gap: 0;
        background: var(--background-white);
        box-shadow: 0 8px 16px rgba(59, 42, 102, 0.12);
        padding: 0.5rem 0;
    }

    .nav-menu.active {
        display: flex;
    }

    .nav-menu li {
        width: 100%;
        text-align: center;
    }

    .nav-menu a {
        display: block;
        padding: 0.9rem 1rem;
    }

    .nav-menu a.btn-gold {
        width: max-content;
        margin: 0.5rem auto;
    }

    /* Hero */
    .hero {
        margin-top: 76px;
        min-height: 540px;
    }

    .hero-content {
        padding: 1.75rem 1.5rem;
        transform: translateY(-20px);
    }

    .hero-eyebrow {
        font-size: 1.8rem;
    }

    .hero h1 {
        font-size: 1.4rem;
    }

    .hero-subtitle {
        font-size: 1.1rem;
    }

    .hero-buttons {
        flex-direction: column;
    }

    .hero-buttons .btn-large {
        width: 100%;
        text-align: center;
    }

    /* Let full-height sections size to content on mobile, and trim section padding */
    .value-props,
    .contact {
        min-height: auto;
    }

    .value-props,
    .services,
    .benefits,
    .philanthropy,
    .cta-section,
    .contact {
        padding: 3rem 0;
    }

    /* Stack grids */
    .value-grid {
        grid-template-columns: 1fr;
    }

    .services-grid {
        grid-template-columns: 1fr;
    }

    .benefits-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .philanthropy-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .contact-wrapper {
        grid-template-columns: 1fr;
    }

    .contact-form {
        grid-template-columns: 1fr;
    }

    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    /* Readability tweaks */
    .service-item p {
        text-align: left;
    }

    .footer-scripture {
        justify-content: center;
    }
}

/* Mobile fallback: the same rules forced via the .is-mobile class (set by the inline
   script in <head> using user-agent + screen-size detection). This covers phones/browsers
   where the media query above doesn't fire. */
html.is-mobile section[id] { scroll-margin-top: 76px; }
html.is-mobile h1 { font-size: 2rem; }
html.is-mobile h2 { font-size: 1.8rem; }
html.is-mobile .navbar { padding: 0.6rem 0; }
html.is-mobile .logo img { height: 56px; }
html.is-mobile .nav-toggle { display: flex; }
html.is-mobile .nav-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    background: var(--background-white);
    box-shadow: 0 8px 16px rgba(59, 42, 102, 0.12);
    padding: 0.5rem 0;
}
html.is-mobile .nav-menu.active { display: flex; }
html.is-mobile .nav-menu li { width: 100%; text-align: center; }
html.is-mobile .nav-menu a { display: block; padding: 0.9rem 1rem; }
html.is-mobile .nav-menu a.btn-gold { width: max-content; margin: 0.5rem auto; }
html.is-mobile .hero { margin-top: 76px; min-height: 540px; }
html.is-mobile .hero-content { padding: 1.75rem 1.5rem; transform: translateY(-20px); }
html.is-mobile .hero-eyebrow { font-size: 1.8rem; }
html.is-mobile .hero h1 { font-size: 1.4rem; }
html.is-mobile .hero-subtitle { font-size: 1.1rem; }
html.is-mobile .hero-buttons { flex-direction: column; }
html.is-mobile .hero-buttons .btn-large { width: 100%; text-align: center; }
html.is-mobile .value-props,
html.is-mobile .contact { min-height: auto; }
html.is-mobile .value-props,
html.is-mobile .services,
html.is-mobile .benefits,
html.is-mobile .philanthropy,
html.is-mobile .cta-section,
html.is-mobile .contact { padding: 3rem 0; }
html.is-mobile .value-grid { grid-template-columns: 1fr; }
html.is-mobile .services-grid { grid-template-columns: 1fr; }
html.is-mobile .benefits-content { grid-template-columns: 1fr; gap: 2rem; }
html.is-mobile .philanthropy-content { grid-template-columns: 1fr; gap: 2rem; }
html.is-mobile .contact-wrapper { grid-template-columns: 1fr; }
html.is-mobile .contact-form { grid-template-columns: 1fr; }
html.is-mobile .footer-content { grid-template-columns: 1fr; text-align: center; }
html.is-mobile .service-item p { text-align: left; }
html.is-mobile .footer-scripture { justify-content: center; }

/* Smooth Scroll */
html {
    scroll-behavior: smooth;
}

/* Offset anchor-link landings (e.g. #contact) so the fixed navbar doesn't cover the top */
section[id] {
    scroll-margin-top: 152px;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.value-card,
.service-item {
    animation: fadeInUp 0.6s ease-out;
}
