/* ============================================
   LANDING PAGE STYLESHEET
   Requires base.css to be loaded first.
   ============================================ */

/* ========== HEADER ========== */
.header {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 1000;
    height: var(--header-h);
    display: flex;
    align-items: center;
    background: var(--primary-dark);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}
.header-wrap {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 var(--gutter);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}
.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    min-width: 0;       /* allow brand-name to truncate instead of wrapping/overlapping nav */
    flex: 1 1 auto;
}
.brand-logo {
    height: 42px; width: 42px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255, 255, 255, 0.3);
    flex-shrink: 0;
}
.brand-name {
    display: block;
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 1.25rem;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: 0.3px;
}
.nav {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
}
.nav-link {
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    transition: var(--transition);
    position: relative;
}
.nav-link:hover, .nav-link.active {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.12);
}
.nav-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: 14px;
    padding-left: 14px;
    border-left: 1px solid rgba(255, 255, 255, 0.2);
}
.menu-toggle {
    display: none;
    flex-shrink: 0;
    background: none;
    border: none;
    color: #ffffff;
    cursor: pointer;
    padding: 8px;
    border-radius: var(--radius-sm);
}
.menu-toggle:hover { background: rgba(255, 255, 255, 0.1); }
.menu-line { transition: var(--transition); transform-origin: center; }
.menu-toggle.open .top  { transform: translateY(6px) rotate(45deg); }
.menu-toggle.open .mid  { opacity: 0; }
.menu-toggle.open .bot  { transform: translateY(-6px) rotate(-45deg); }

/* ========== HERO ========== */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: calc(var(--header-h) + 40px) var(--gutter) 60px;
    overflow: hidden;
}
.hero-bg {
    position: absolute;
    inset: 0;
    background: var(--overlay-green), url('/assets/images/background.png') no-repeat center center;
    background-size: cover;
    background-attachment: fixed;
    z-index: 0;
}
.hero-content {
    position: relative;
    z-index: 2;
    max-width: 760px;
    animation: fadeInUp 0.9s ease-out;
}
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(24px); }
    to   { opacity: 1; transform: translateY(0); }
}
.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: #ffffff;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 22px;
    text-align: left;
}
.hero-title {
    font-size: clamp(1.85rem, 7vw, 3.2rem);
    font-weight: 700;
    color: #ffffff;
    line-height: 1.2;
    margin-bottom: 16px;
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.35);
}
.gradient-text { color: var(--accent); }
.hero-subtitle {
    font-size: clamp(0.95rem, 2.5vw, 1.1rem);
    color: rgba(255, 255, 255, 0.92);
    max-width: 580px;
    margin: 0 auto 32px;
}
.hero-actions {
    display: flex;
    gap: 14px;
    justify-content: center;
    flex-wrap: wrap;
}
.hero-actions .btn { flex: 0 1 auto; }
.hero-scroll {
    position: absolute;
    bottom: 26px; left: 50%;
    transform: translateX(-50%);
    color: rgba(255, 255, 255, 0.7);
    z-index: 2;
    animation: bounce 2s infinite;
}
@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateX(-50%) translateY(0); }
    40% { transform: translateX(-50%) translateY(-8px); }
    60% { transform: translateX(-50%) translateY(-4px); }
}

/* ========== ABOUT ========== */
.about { padding: var(--section-pad) 0; background: var(--bg-white); }
.about-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 26px;
}
.about-card {
    background: var(--bg-light);
    padding: 32px 26px;
    border-radius: var(--radius-md);
    text-align: center;
    border: 1px solid rgba(0, 0, 0, 0.04);
    transition: var(--transition);
}
.about-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
    border-color: rgba(46, 125, 50, 0.12);
}
.about-icon {
    width: 56px; height: 56px;
    margin: 0 auto 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(46, 125, 50, 0.1);
    color: var(--primary);
    font-size: 1.6rem;
}
.about-card h3 { font-size: 1.15rem; font-weight: 700; margin-bottom: 8px; }
.about-card p { font-size: 0.9rem; color: var(--text-medium); }

/* ========== PROGRAMS ========== */
.programs { padding: var(--section-pad) 0; background: var(--bg-light); }
.programs-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 22px;
}
.program-card {
    background: var(--bg-white);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(0, 0, 0, 0.04);
    transition: var(--transition);
}
.program-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.program-visual {
    height: 110px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.2rem;
    color: var(--prog-color, var(--primary));
    background: color-mix(in srgb, var(--prog-color, var(--primary)) 12%, transparent);
}
.program-body { padding: 22px; }
.program-body h3 { font-size: 1.05rem; font-weight: 700; margin-bottom: 8px; }
.program-body p { font-size: 0.85rem; color: var(--text-medium); margin-bottom: 14px; }
.program-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.85rem;
}
.program-link:hover { color: var(--primary-dark); gap: 9px; }

/* ========== CTA ========== */
.cta { position: relative; overflow: hidden; }
.cta-bg { position: absolute; inset: 0; background: linear-gradient(135deg, var(--primary-dark), var(--primary)); }
.cta-content {
    position: relative;
    text-align: center;
    padding: clamp(48px, 8vw, 70px) var(--gutter);
    color: #ffffff;
}
.cta-content h2 { font-size: clamp(1.4rem, 5vw, 2rem); font-weight: 700; margin-bottom: 12px; }
.cta-content p { opacity: 0.9; max-width: 520px; margin: 0 auto 26px; }

/* ========== CONTACT ========== */
.contact { padding: var(--section-pad) 0; background: var(--bg-white); }
.contact-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}
.contact-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 22px;
    background: var(--bg-light);
    border-radius: var(--radius-md);
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}
a.contact-item:hover { transform: translateY(-3px); box-shadow: var(--shadow-sm); }
.contact-icon {
    width: 46px; height: 46px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-white);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-sm);
    color: var(--primary);
    font-size: 1.3rem;
}
.contact-item h4 { font-size: 0.95rem; font-weight: 700; margin-bottom: 2px; }
.contact-item p { font-size: 0.85rem; color: var(--text-medium); word-break: break-word; }

/* ========== FOOTER ========== */
.footer { background: var(--primary-dark); color: rgba(255, 255, 255, 0.9); }
.footer-grid {
    display: grid;
    grid-template-columns: 1.2fr 2fr;
    gap: 50px;
    padding: 56px 0 30px;
}
.footer-brand { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.footer-logo {
    height: 42px; width: 42px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255, 255, 255, 0.3);
}
.footer-name { font-size: 1.2rem; font-weight: 700; color: #ffffff; }
.footer-brand p { font-size: 0.88rem; opacity: 0.8; max-width: 280px; }
.footer-links {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}
.footer-col h5 {
    font-size: 0.85rem;
    font-weight: 700;
    color: #ffffff;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 14px;
}
.footer-col a {
    display: block;
    color: rgba(255, 255, 255, 0.75);
    text-decoration: none;
    font-size: 0.85rem;
    padding: 5px 0;
    transition: var(--transition);
}
.footer-col a:hover { color: #ffffff; padding-left: 4px; }
.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 18px 0;
    text-align: center;
    font-size: 0.82rem;
    opacity: 0.7;
}

/* ============================================
   LANDING RESPONSIVE
   ============================================ */

/* ---- Tablet: tighten grids before they get cramped ---- */
@media (max-width: 992px) {
    .about-grid { grid-template-columns: repeat(2, 1fr); }
    .programs-grid { grid-template-columns: repeat(2, 1fr); }
    .footer-grid { grid-template-columns: 1fr; gap: 32px; }
}

/* ---- Mobile nav: the header no longer overflows/overlaps ----
   Brand name truncates (see .brand-name above) and the nav
   collapses into a slide-down panel triggered by .menu-toggle. */
@media (max-width: 860px) {
    :root { --header-h: var(--header-h-mobile); }

    .menu-toggle { display: flex; }

    .brand-name { font-size: 1.05rem; max-width: 60vw; }
    .brand-logo { height: 36px; width: 36px; }

    .nav {
        position: fixed;
        top: var(--header-h);
        left: 0; right: 0;
        z-index: 999;
        flex-direction: column;
        align-items: stretch;
        gap: 2px;
        background: var(--primary-dark);
        padding: 10px 14px 22px;
        max-height: calc(100vh - var(--header-h));
        overflow-y: auto;
        box-shadow: var(--shadow-md);
        transform: translateY(-8px);
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transition: var(--transition);
    }
    .nav.open {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
    }
    .nav-link {
        width: 100%;
        padding: 14px 12px;
        border-radius: var(--radius-sm);
    }
    .nav-actions {
        flex-direction: column;
        align-items: stretch;
        margin: 10px 0 0;
        padding: 16px 0 0;
        border-left: none;
        border-top: 1px solid rgba(255, 255, 255, 0.15);
        gap: 10px;
    }
    .nav-actions .btn { width: 100%; }

    body.nav-open { overflow: hidden; }

    /* background-attachment:fixed is unreliable/janky on mobile browsers */
    .hero-bg { background-attachment: scroll; }
}

@media (max-width: 640px) {
    .hero { min-height: 92vh; padding-bottom: 44px; }
    .hero-actions { flex-direction: column; align-items: stretch; }
    .hero-actions .btn { width: 100%; }

    .about-grid,
    .programs-grid,
    .contact-grid { grid-template-columns: 1fr; }

    .footer-links { grid-template-columns: repeat(2, 1fr); }
    .footer-brand p { max-width: none; }
}

@media (max-width: 420px) {
    .footer-links { grid-template-columns: 1fr; gap: 20px; }
}
