/* ============================================
    CSS CUSTOM PROPERTIES & THEMING
    ============================================ */
:root {
    /* Light mode (default) */
    --bg-primary: #FCF8EC;
    --bg-secondary: #FFFFFF;
    --bg-card: #FCF8EC;
    --text-primary: #244F3C;
    --text-secondary: #3F4B44;
    --text-muted: #788078;
    --accent: #2F7155;
    --accent-light: #41936D;
    --accent-subtle: #E8C878;
    --border: #D9D4C7;
    --shadow: #141413;
    --shadow-hover: #282726;
    --nav-bg: #F0EDE4;
    --toggle-bg: #D9D4C7;
    --toggle-knob: #2F7155;
    --base-gold: #B47509;
}

[data-theme="dark"] {
    --bg-primary: #173B2E;
    --bg-secondary: #21513F;
    --bg-card: #A08953;
    --text-primary: #FCF8EC;
    --text-secondary: #E5E0D3;
    --text-muted: #AEB8B0;
    --accent: #A06608;
    --accent-light: #C8830A;
    --accent-subtle: #E8C878;
    --border: #396553;
    --shadow: #504F4C;
    --shadow-hover: #64625F;
    --nav-bg: #153327;
    --toggle-bg: #A08953;
    --toggle-knob: #2F7155;
}

/* ============================================
    RESET & BASE
    ============================================ */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 5rem;
}

body {
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.7;
    transition: background-color 0.3s ease, color 0.3s ease;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: var(--accent);
    text-decoration: none;
    transition: color 0.2s ease;
}

.btn-primary:hover {
    background: var(--accent-light);
}

.btn-secondary:hover {
    color: var(--accent-light);
}

a:focus-visible,
button:focus-visible {
    outline: 3px solid var(--accent);
    outline-offset: 3px;
}

/* ============================================
    TYPOGRAPHY
    ============================================ */
h1, h2, h3, h4 {
    line-height: 1.2;
    font-weight: 700;
}

h1 { font-size: clamp(2rem, 5vw, 3.2rem); }
h2 { font-size: clamp(1.6rem, 4vw, 2.4rem); margin-bottom: 1rem; }
h3 { font-size: clamp(1.2rem, 3vw, 1.5rem); }

.section-subtitle {
    color: var(--text-secondary);
    font-size: clamp(1rem, 2vw, 1.15rem);
    max-width: 600px;
    margin-bottom: 0.5rem;
}

.section-text {
    color: var(--text-primary);
    font-size: clamp(0.9rem, 2vw, 1rem);
    margin-bottom: 1.5rem;
    margin-top: 0.5rem;
}

.section-midheading {
    margin-top: 3rem;
}

/* ============================================
    LAYOUT
    ============================================ */
.container {
    width: min(100% - 2.5rem, 1200px);
    margin-inline: auto;
}

section {
    padding: clamp(3rem, 8vw, 6rem) 0;
}

.section-alt {
    background-color: var(--bg-secondary);
}

/* ============================================
    NAVIGATION
    ============================================ */
.nav {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--nav-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    padding: 0.75rem 0;
}

.nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.nav-logo {
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-logo-img {
    width: 40px;
    height: 40px;
    object-fit: contain;
    border-radius: 8px;
    flex-shrink: 0;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    list-style: none;
}

.nav-links a {
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 1rem;
    padding: 0.25rem 0;
    position: relative;
}

.nav-links a::after {
    content: "";
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent);
    transition: width 0.3s ease;
}

.nav-links a:hover::after,
.nav-links a:focus::after {
    width: 100%;
}

/* Theme toggle */
.theme-toggle {
    background: var(--toggle-bg);
    border: none;
    border-radius: 99px;
    width: 52px;
    height: 28px;
    cursor: pointer;
    position: relative;
    transition: background-color 0.3s ease;
    flex-shrink: 0;
}

.theme-toggle::before {
    content: "☀️";
    position: absolute;
    top: 50%;
    left: 3px;
    transform: translateY(-50%);
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--toggle-knob);
    display: grid;
    place-items: center;
    font-size: 0.7rem;
    transition: transform 0.3s ease, background-color 0.3s ease;
}

[data-theme="dark"] .theme-toggle::before {
    content: "🌙";
    transform: translate(24px, -50%);
}

/* Mobile nav */
.nav-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    color: var(--text-primary);
}

.nav-toggle svg {
    width: 24px;
    height: 24px;
}

@media (max-width: 768px) {
    .nav-toggle {
        display: block;
    }

    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--bg-primary);
        flex-direction: column;
        padding: 1.5rem;
        border-bottom: 1px solid var(--border);
        box-shadow: 0 10px 30px var(--shadow);
    }

    .nav-links.open {
        display: flex;
    }
}

/* ============================================
    HERO
    ============================================ */
.hero {
    padding: clamp(4rem, 10vw, 8rem) 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}

.hero-content h1 {
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--accent), var(--accent-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-content p {
    color: var(--text-secondary);
    font-size: 1rem;
    margin-bottom: 2rem;
    max-width: 500px;
}

.hero-cta {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.85rem 1.75rem;
    border-radius: 10px;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
}

.btn-primary {
    background: var(--accent);
    color: white;
}

.btn-primary:hover {
    background: var(--accent-light);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px var(--shadow);
}

.btn-secondary {
    background: transparent;
    color: var(--text-primary);
    border: 2px solid var(--border);
}

.btn-secondary:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.hero-image {
    width: 100%;
    aspect-ratio: 4/3;
    display: grid;
    place-items: center;
    font-size: 1rem;
    text-align: center;
}

.hero-image img {
    width: 460px;
    border-radius: 20px;
}

.hero-image h3 {
    margin-top: 1rem;
    margin-bottom: 3px;
}

@media (max-width: 768px) {
    .hero {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-content p {
        margin-inline: auto;
    }

    .hero-cta {
        justify-content: center;
    }

    .hero-image {
        order: -1;
    }

}

/* ============================================
    SERVICES
    ============================================ */

.expand-details {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    padding: 0;
    border: none;
    margin: 0;
    transition: max-height 0.8s ease, opacity 0.1s ease;
}


.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1.5rem;
    margin-top: 0.5rem;
}

.service-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 2rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.service-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 12px var(--shadow);
}

.service-card .icon {
    width: 100px;
    height: 100px;
    background: var(--accent-subtle);
    border-radius: 12px;
    display: grid;
    place-items: center;
    font-size: 1.5rem;
    margin-bottom: 1.25rem;
}

.service-card h3 {
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

.service-card p {
    color: var(--text-secondary);
    font-size: 1rem;
}

/* ============================================
    WHO WE SUPPORT
    ============================================ */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.card-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 1.25rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
}

.card-item .check {
    width: 24px;
    height: 24px;
    background: var(--accent-subtle);
    border-radius: 50%;
    display: grid;
    place-items: center;
    flex-shrink: 0;
    font-size: 0.8rem;
    color: var(--accent);
    margin-top: 2px;
}

.card-item span {
    font-weight: 500;
    font-size: 0.95rem;
}

/* ============================================
    HOW IT WORKS
    ============================================ */
.steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 2rem;
    counter-reset: step;
}

.step {
    position: relative;
    padding-top: 3rem;
}

.step::before {
    counter-increment: step;
    content: counter(step);
    position: absolute;
    top: 0;
    left: 0;
    width: 44px;
    height: 44px;
    background: var(--accent);
    color: white;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-weight: 700;
    font-size: 1.1rem;
}

.step h3 {
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.step p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* ============================================
    MEET US
    ============================================ */

.meet-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}

@media (max-width: 768px) {
    .meet-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .meet-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .meet-image {
        margin-inline: auto;
    }
}

.meet-item p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.meet-image img {
    height: 400px;
    width: 400px;
    object-fit: cover;
    object-position: 50% 25%;
    margin-bottom: 1rem;
    border-radius: 20px;
}

/* ============================================
    ABOUT / IMAGE SECTION
    ============================================ */

.about-image {
    position: relative;
    max-width: 450px;
    height: 600px;
    margin: 0 auto;
    cursor: pointer;
    overflow: hidden;
    border-radius: 8px;
}

.about-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
    border-radius: 20px;
}

/* Arrows */

.prev { left: 10px; }
.next { right: 10px; }

.nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    cursor: pointer;
    transition: background 0.3s;
    z-index: 10;
}

.nav-btn:hover {
    background: rgba(0, 0, 0, 0.8);
}

/* Lightbox/Zoom Modal Styles */
.modal {
    display: none; /* Hidden by default */
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.modal-content {
    max-width: 90%;
    max-height: 90%;
    border: 3px solid white;
    border-radius: 4px;
    object-fit: contain;
}

.close {
    position: absolute;
    top: 20px;
    right: 35px;
    color: white;
    font-size: 40px;
    cursor: pointer;
}

/* Modal Navigation Buttons */
.modal-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: none;
    width: 70px;
    height: 70px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    cursor: pointer;
    transition: background 0.3s;
    z-index: 10000;
}

.modal-nav:hover {
    background: rgba(255, 255, 255, 0.4);
}

.modal-nav.prev { left: 20px; }
.modal-nav.next { right: 20px; }

.modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    justify-content: center;
    align-items: center;
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}

.about-text p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

@media (max-width: 768px) {
    .about-grid {
        grid-template-columns: 1fr;
    }
}

/* ============================================
    CONTACT
    ============================================ */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
}

.contact-info h3 {
    margin-bottom: 1rem;
}

.contact-info p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.contact-details {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.contact-details li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--text-secondary);
}

.contact-details .icon {
    width: 40px;
    height: 40px;
    background: var(--accent-subtle);
    border-radius: 10px;
    display: grid;
    place-items: center;
    font-size: 1.1rem;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.form-group label {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-primary);
}

.form-group input,
.form-group textarea,
.form-group select {
    padding: 0.85rem 1rem;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--bg-primary);
    color: var(--text-primary);
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-subtle);
}

.form-group textarea {
    min-height: 120px;
    resize: vertical;
}

@media (max-width: 768px) {
    .contact-grid {
        grid-template-columns: 1fr;
    }
}

/* ============================================
    FOOTER
    ============================================ */
.footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border);
    padding: 2.5rem 0;
    text-align: center;
}

.footer p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.footer a {
    color: var(--accent);
}

/* ============================================
    SKIP LINK (accessibility)
    ============================================ */
.skip-link {
    position: absolute;
    top: -100%;
    left: 1rem;
    background: var(--accent);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 0 0 8px 8px;
    z-index: 200;
    font-weight: 600;
    transition: top 0.2s ease;
}

.skip-link:focus {
    top: 0;
    color: white;
}

/* ============================================
    REDUCED MOTION
    ============================================ */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }

    html {
        scroll-behavior: auto;
    }
}
