/* ============================================
   FUNFORGE LABS - INDEX (HOME) STYLESHEET
   ============================================ */

:root {
    --ink: #060B1D;
    --surface: #0C1430;
    --line: #1E2A52;
    --text: #F4F6FF;
    --muted: #A3AED3;
    --purple: #8B2BFF;
    --blue: #3B5BFF;
    --cyan: #22C8FF;
    --head: 'Montserrat', 'Segoe UI', Arial, sans-serif;
    --body: 'IBM Plex Sans', 'Segoe UI', Arial, sans-serif;
    color-scheme: dark;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    background: var(--ink);
    color: var(--text);
    font: 400 17px/1.6 var(--body);
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
a:focus-visible { outline: 3px solid var(--cyan); outline-offset: 3px; border-radius: 4px; }

.wrap { max-width: 1160px; margin: 0 auto; padding: 0 28px; }

/* HEADER */
header {
    border-bottom: 1px solid var(--line);
    position: relative;
    z-index: 100;
    background: rgba(6, 11, 29, 0.9);
    backdrop-filter: blur(10px);
}

.bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 180px; /* Changed from height to min-height */
    padding: 20px 0;
    gap: 20px;
    flex-wrap: wrap; /* Allows the bar to grow if nav wraps */
}

.brand { display: flex; align-items: center; text-decoration: none; }
.brand-logo { height: 148px; width: auto; display: block; }

.nav-links {
    display: flex;
    align-items: center;
    gap: 16px;
    font: 600 13px var(--head);
    letter-spacing: 0.3px;
    flex-wrap: wrap; /* Allows links to wrap to a new line */
    justify-content: flex-end;
}

.nav-links a:not(.cta) {
    color: var(--muted);
    transition: color 0.2s ease;
    white-space: nowrap; /* Prevents words from breaking mid-word */
    flex-shrink: 0;
}

.nav-links a:not(.cta):hover,
.nav-links a.active {
    color: var(--text);
}

.cta {
    padding: 10px 16px;
    border-radius: 6px;
    color: #fff !important;
    background: linear-gradient(100deg, var(--purple), var(--blue) 55%, var(--cyan));
    transition: filter 0.2s;
    white-space: nowrap;
    flex-shrink: 0;
}
.cta:hover { filter: brightness(1.15); }

/* LANGUAGE SWITCHER */
.lang-switch {
    display: flex;
    border: 1px solid var(--line);
    border-radius: 6px;
    overflow: hidden;
    background: var(--surface);
}

.lang-btn {
    background: transparent;
    border: none;
    padding: 8px 16px;
    color: var(--muted);
    font: 600 14px var(--head);
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.lang-btn:hover { color: var(--text); background: rgba(255, 255, 255, 0.03); }
.lang-btn.active { background: linear-gradient(100deg, var(--purple), var(--cyan)); color: #fff; }

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text);
    font-size: 24px;
    cursor: pointer;
}

/* BUTTONS */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 28px;
    border-radius: 6px;
    font: 600 16px var(--head);
    text-decoration: none;
    transition: all 0.2s ease;
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: linear-gradient(100deg, var(--purple), var(--blue) 55%, var(--cyan));
    color: #fff;
    box-shadow: 0 4px 15px rgba(59, 91, 255, 0.2);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 25px rgba(59, 91, 255, 0.4); }

.btn-outline { background: transparent; border: 1px solid var(--line); color: var(--text); }
.btn-outline:hover { border-color: var(--cyan); color: var(--cyan); }

/* HERO SECTION */
.hero {
    padding: 100px 0 80px;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: "";
    position: absolute;
    right: -10%;
    top: -20%;
    width: 60vw;
    height: 150%;
    border-radius: 50%;
    background: radial-gradient(ellipse, rgba(59, 91, 255, 0.12), transparent 60%);
    pointer-events: none;
    z-index: 0;
}

.hero .wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    position: relative;
    z-index: 1;
}

.hero-content { max-width: 900px; margin-bottom: 60px; }

.hero h1 {
    font: 800 clamp(38px, 6vw, 64px)/1.1 var(--head);
    letter-spacing: -1.5px;
    margin-bottom: 24px;
}

.hero h1 span {
    background: linear-gradient(90deg, var(--purple), var(--cyan));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero p {
    font-size: 20px;
    color: var(--muted);
    margin-bottom: 40px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.hero-buttons { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

.hero-video-wrapper {
    width: 100%;
    max-width: 900px;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid var(--line);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    background: var(--surface);
}

.hero-video-wrapper video { width: 100%; display: block; }

/* DISCOVER SECTION */
.discover {
    padding: 100px 0;
    background: var(--surface);
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    text-align: center;
}

.discover-content { max-width: 800px; margin: 0 auto; }

.discover h2 {
    font: 800 40px/1.2 var(--head);
    margin-bottom: 24px;
    letter-spacing: -0.5px;
}

.discover p { font-size: 18px; color: var(--muted); margin-bottom: 40px; }

/* QUICK LINKS SECTION */
.quick-links { padding: 100px 0; }

.quick-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
    max-width: 900px;
    margin: 0 auto;
}

.quick-card {
    display: flex;
    flex-direction: column;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 40px;
    transition: all 0.3s ease;
    text-align: center;
}

.quick-card:hover {
    transform: translateY(-5px);
    border-color: var(--cyan);
    box-shadow: 0 10px 30px rgba(0, 229, 255, 0.1);
}

.quick-icon {
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px auto;
    border: 1px solid var(--line);
}

.quick-icon i { font-size: 28px; color: var(--cyan); }

.quick-card h3 { font: 700 24px var(--head); margin-bottom: 8px; }
.quick-card p { color: var(--muted); font-size: 16px; margin-bottom: 24px; }

.quick-arrow {
    margin-top: auto;
    font: 600 15px var(--head);
    color: var(--cyan);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.quick-card:hover .quick-arrow { text-decoration: underline; }

/* FIELD / CURRICULUM SECTION */
.field {
    padding: 100px 0;
    background: var(--surface);
    border-top: 1px solid var(--line);
}

.section-header {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 60px;
}

.section-header h2 {
    font: 800 40px/1.2 var(--head);
    margin-bottom: 16px;
    letter-spacing: -0.5px;
}

.section-header p { font-size: 18px; color: var(--muted); }

.field-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.field-card {
    background: var(--ink);
    border-radius: 16px;
    border: 1px solid var(--line);
    overflow: hidden;
    transition: all 0.3s ease;
}

.field-card:hover {
    transform: translateY(-5px);
    border-color: rgba(139, 43, 255, 0.5);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.field-img { height: 220px; overflow: hidden; border-bottom: 1px solid var(--line); }
.field-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.field-card:hover .field-img img { transform: scale(1.05); }

.field-info { padding: 30px; }

.field-tag {
    display: inline-block;
    font: 700 12px var(--head);
    letter-spacing: 1px;
    color: var(--cyan);
    margin-bottom: 12px;
    text-transform: uppercase;
}

.field-info h3 { font: 700 24px var(--head); margin-bottom: 12px; }
.field-info p { color: var(--muted); font-size: 15px; line-height: 1.6; }

/* PHILOSOPHY CTA SECTION */
.philosophy-cta { padding: 100px 0; }

.philosophy-inner {
    background: linear-gradient(135deg, rgba(139, 43, 255, 0.1), rgba(34, 200, 255, 0.1));
    border: 1px solid rgba(139, 43, 255, 0.3);
    border-radius: 24px;
    padding: 60px 40px;
    text-align: center;
    max-width: 900px;
    margin: 0 auto;
}

.philosophy-inner h3 { font: 800 32px var(--head); margin-bottom: 16px; }
.philosophy-inner p {
    font-size: 18px;
    color: var(--muted);
    margin-bottom: 32px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

/* FOOTER */
footer {
    border-top: 1px solid var(--line);
    padding: 60px 0 40px;
    background: var(--ink);
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-column h3 { font: 700 18px var(--head); color: var(--text); margin-bottom: 20px; }
.footer-desc { color: var(--muted); font-size: 15px; margin-bottom: 20px; }
.footer-links { list-style: none; }
.footer-links li {
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--muted);
    font-size: 15px;
}
.footer-links i { color: var(--cyan); width: 16px; }
.footer-links a { color: var(--muted); transition: color 0.2s; }
.footer-links a:hover { color: var(--text); }

.social-links { display: flex; gap: 12px; }
.social-links a {
    display: inline-flex;
    width: 40px;
    height: 40px;
    border: 1px solid var(--line);
    border-radius: 8px;
    align-items: center;
    justify-content: center;
    color: var(--muted);
    transition: all 0.2s;
}
.social-links a:hover { color: var(--text); border-color: var(--cyan); background: rgba(255, 255, 255, 0.03); }

.copyright {
    text-align: center;
    color: var(--muted);
    font-size: 14px;
    padding-top: 30px;
    border-top: 1px solid var(--line);
}
.copyright a { color: var(--text); transition: color 0.2s; }
.copyright a:hover { color: var(--cyan); }

/* RESPONSIVE */
/* ============================================
   RESPONSIVE BREAKPOINTS (MOBILE & TABLET)
   ============================================ */

@media (max-width: 900px) {
    /* Header adjustments */
    .bar {
        min-height: 100px;
        padding: 10px 0;
    }
    .brand-logo { 
        height: 70px; 
    }
    
    /* Mobile Navigation Menu - Fixed to viewport */
    .nav-links {
        display: none;
        position: fixed;
        top: 100px; /* Matches the bar height */
        left: 0;
        right: 0;
        width: 100vw;
        background: var(--surface);
        flex-direction: column;
        padding: 20px 28px 30px; /* 28px side padding for breathing room */
        border-bottom: 1px solid var(--line);
        gap: 16px;
        align-items: flex-start;
        z-index: 999;
        box-sizing: border-box;
    }
    
    .nav-links.active { 
        display: flex; 
    }
    
    .nav-links a {
        white-space: normal;
        text-align: left;
        width: 100%;
        padding: 10px 0;
        font-size: 15px; /* Slightly larger for touch targets */
    }
    
    .nav-links .cta {
        text-align: center;
        width: 100%;
        padding: 12px 0;
        margin-top: 10px;
    }
    
    /* Menu Toggle Button */
    .mobile-menu-toggle { 
        display: block; 
    }

    /* General Typography / Layout Adjustments */
    .hero h1, 
    .hero-content h1 { 
        font-size: 42px; 
    }
    
    .quick-grid, 
    .field-grid { 
        grid-template-columns: 1fr; 
    }
    
    .philosophy-inner { 
        padding: 40px 24px; 
    }
    
    /* Program Page */
    .pillar-container, 
    .pillar-container.reverse { 
        flex-direction: column; 
        padding: 30px; 
    }
    .pillar-illustration { 
        width: 100%; 
        min-height: 200px; 
    }
    
    /* Private & Online Pages */
    .trial-banner { 
        flex-direction: column; 
        text-align: center; 
        padding: 30px 24px; 
    }
    .rates-card { 
        flex-direction: column; 
        padding: 30px; 
    }
    .rates-icon { 
        margin: 0 auto; 
    }
    .price-highlight { 
        justify-content: center; 
    }
    .rates-details { 
        grid-template-columns: 1fr; 
    }
    .private-cta h3,
    .online-cta h3 { 
        font-size: 28px; 
    }
    .req-table td:first-child { 
        width: 40%; 
    }
    
    /* Booking Page */
    .slots-container { 
        grid-template-columns: 1fr; 
        max-width: 400px; 
    }
    .help-section h3 { 
        font-size: 28px; 
    }
    
    /* Contact Page */
    .form-container { 
        padding: 10px; 
    }
    .form-container iframe { 
        height: 1200px; 
    }
}

@media (max-width: 500px) {
    /* Language Switcher - Hide text, keep emoji */
    .lang-btn span {
        display: none;
    }
    .lang-btn {
        padding: 8px 12px;
        font-size: 16px;
        gap: 0;
    }
    
    /* Adjustments for very small screens */
    .price-highlight .amount { 
        font-size: 44px; 
    }
    .req-table td { 
        padding: 12px 16px; 
        font-size: 14px; 
    }
    .req-table td:first-child { 
        width: 50%; 
    }
    .booking-why-card { 
        padding: 30px 20px; 
    }
    .slot-card { 
        padding: 30px 20px; 
    }
}