/* --- Google Font Import (Manrope, OFL) --- */
@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;700;800&display=swap');

/* --- CSS Variables (from your Flutter Theme) --- */
:root {
    --primary-color: #1976D2;   /* Colors.blue.shade700 */
    --primary-variant: #0D47A1; /* Colors.blue.shade900 */
    --accent-color: #18FFFF;    /* Colors.cyanAccent */
    --background-color: #121212;
    --surface-color: #1E1E1E;   /* For the nav-on-scroll */
    --text-primary: #FFFFFF;
    --text-secondary: rgba(255, 255, 255, 0.8);
    --font-family: 'Manrope', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --nav-height: 80px; /* Define nav height as a variable */
}

/* --- Base & Reset --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    background-color: var(--background-color);
    color: var(--text-primary);
    line-height: 1.6;
    /* Prevents horizontal scroll from animations */
    overflow-x: hidden; 
}

/* * -------------------
 * Navigation Bar (Mobile-First)
 * -------------------
 */
nav {
    position: absolute; /* Floats on top */
    top: 0;
    left: 0;
    width: 100%;
    height: var(--nav-height);
    z-index: 1000; /* Stays above everything */
    background-color: transparent; 
    transition: background-color 0.3s ease;
}

/* Scrolled state for the nav (added by JS) */
nav.scrolled {
    background-color: var(--surface-color);
    border-bottom: 1px solid #333;
}

.nav-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
    height: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo a {
    display: flex;
    align-items: center;
    text-decoration: none;
    z-index: 1002; /* Ensures logo is clickable over menu */
}

.nav-logo img {
    height: 40px; /* Adjust as needed */
    filter: drop-shadow(0 1px 3px rgba(0,0,0,0.4));
}

/* --- Mobile Menu & Links (Default) --- */
.nav-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-color: var(--surface-color);
    
    /* Hide menu off-screen by default (fixes flash) */
    transform: translateY(-100%);
    transition: transform 0.4s ease-in-out;
    
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000; /* Below toggle, above content */
}

.nav-menu.active {
    transform: translateY(0); /* Show menu */
}

.nav-links {
    flex-direction: column;
    gap: 35px;
    text-align: center;
    align-items: center;
    display: flex; /* Ensure flex properties apply */
}

.nav-links a {
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 700;
    font-size: 1.5rem; /* Larger for mobile tapping */
    text-shadow: none; /* Remove shadow on solid bg */
    white-space: nowrap;
    position: relative;
    padding: 5px 0;
}

/* Hide underline effect on mobile */
.nav-links a:not(.nav-cta-button):not(.nav-login-button)::after {
    display: none;
}

.nav-login-button {
    margin-right: 0; /* No margin on mobile */
    opacity: 0.8;
    transition: opacity 0.3s ease;
}
.nav-login-button:hover {
    opacity: 1;
}

.nav-cta-button {
    background-color: var(--primary-color);
    padding: 14px 28px; /* Mobile padding */
    border-radius: 8px;
    font-size: 1.2rem; /* Mobile font size */
    font-weight: 700;
    transition: background-color 0.3s ease;
    text-shadow: none !important;
    white-space: nowrap;
}

/* --- Hamburger Toggle (Default = Mobile) --- */
.nav-toggle {
    display: block; /* Show hamburger on mobile */
    background: transparent;
    border: none;
    cursor: pointer;
    z-index: 1001; /* Above nav menu */
}

.hamburger-bar {
    display: block;
    width: 25px;
    height: 3px;
    margin: 5px 0;
    background-color: var(--text-primary);
    transition: all 0.3s ease-in-out;
}

/* Hamburger "X" animation */
.nav-toggle.active .hamburger-bar:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}
.nav-toggle.active .hamburger-bar:nth-child(2) {
    opacity: 0;
}
.nav-toggle.active .hamburger-bar:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}


/* --- Desktop Navigation (901px and up) --- */
@media (min-width: 901px) {
    .nav-toggle {
        display: none; /* Hide hamburger on desktop */
    }

    .nav-menu {
        /* Reset all the mobile styles */
        position: static;
        top: auto;
        left: auto;
        width: auto;
        height: auto;
        background-color: transparent;
        transform: translateY(0); /* Always visible */
        transition: none;
        display: flex;
    }
    
    .nav-menu.active {
        transform: translateY(0); /* No change on active */
    }

    .nav-links {
        flex-direction: row; /* Horizontal links */
        gap: 25px;
    }

    .nav-links a {
        font-size: 0.95rem; /* Reset font size */
        text-shadow: 0 1px 3px rgba(0,0,0,0.4); /* Add shadow back */
    }
    
    .nav-cta-button {
        font-size: 0.9rem; /* Reset font size */
        padding: 10px 24px; /* Reset padding */
    }
    
    .nav-login-button {
        margin-right: 15px; /* Add margin back */
    }
    
    /* Show desktop-only hover effect */
    .nav-links a:not(.nav-cta-button):not(.nav-login-button)::after {
        display: block;
        content: '';
        position: absolute;
        bottom: 0;
        left: 0;
        width: 100%;
        height: 2px;
        background-color: var(--accent-color);
        transform: scaleX(0);
        transform-origin: right;
        transition: transform 0.3s ease;
    }
    
    .nav-links a:not(.nav-cta-button):not(.nav-login-button):hover::after {
        transform: scaleX(1);
        transform-origin: left;
    }
}


/* * --------------------------
 * Watery Hover Effect (Buttons)
 * --------------------------
 */
.nav-cta-button:hover,
.cta-button:hover {
    background-color: var(--primary-variant);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    overflow: hidden;
}

.nav-cta-button,
.cta-button {
    position: relative;
    z-index: 1;
    overflow: hidden;
}

.nav-cta-button::before,
.cta-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 200%;
    height: 100%;
    z-index: -1;
    background-image: linear-gradient(
        120deg,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0) 30%,
        rgba(255, 255, 255, 0.2) 50%,
        rgba(255, 255, 255, 0) 70%,
        rgba(255, 255, 255, 0) 100%
    );
    transition: left 0.5s ease;
}

.nav-cta-button:hover::before,
.cta-button:hover::before {
    left: 0;
}


/* --- Section 1: Hero Styling --- */
#hero {
    width: 100%;
    height: 100vh;
    position: relative;
    background-image: url('DEPTH.jpg');
    background-size: cover;
    background-position: center;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    overflow: hidden;
}

#hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.4); 
    z-index: 1; 
}

.hero-content {
    position: relative;
    z-index: 2; 
    max-width: 800px;
    padding: 20px;
    animation: fadeIn 1.5s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}

.hero-content h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 1rem;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.hero-content p {
    font-size: clamp(1.1rem, 2.5vw, 1.25rem);
    color: var(--text-secondary);
    margin-bottom: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    text-shadow: 0 1px 5px rgba(0, 0, 0, 0.5);
}

.cta-button {
    display: inline-block;
    background-color: var(--primary-color);
    color: var(--text-primary);
    padding: 14px 28px;
    font-size: 1rem;
    font-weight: 700;
    text-decoration: none;
    border: none;
    border-radius: 8px; 
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.store-badges {
    margin-top: 2.5rem;
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.badge-placeholder {
    height: 40px;
    padding: 0 20px;
    border: 1px solid var(--text-secondary);
    border-radius: 5px;
    display: flex;
    align-items: center;
    font-size: 0.9rem;
    color: var(--text-secondary);
    background-color: rgba(0, 0, 0, 0.2);
}

.bubble {
    position: absolute;
    bottom: -20px; 
    background-color: rgba(255, 255, 255, 0.15); 
    border-radius: 50%;
    z-index: 1; 
    animation-name: rise;
    animation-timing-function: linear;
}

@keyframes rise {
    0% {
        transform: translateY(0);
        opacity: 0.8;
    }
    100% {
        transform: translateY(-110vh); 
        opacity: 0;
    }
}

/* --- Section 2: "Roles" --- */
#roles {
    background-color: var(--background-color);
    padding: 80px 20px;
    border-top: 1px solid #222;
}

.roles-container {
    max-width: 1100px;
    margin: 0 auto;
    text-align: center;
}

#roles h2 {
    font-size: clamp(2rem, 4vw, 2.5rem);
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.roles-subtitle {
    font-size: 1.15rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto 2.5rem auto;
}

.role-tabs {
    display: flex;
    justify-content: center;
    border: 1px solid var(--primary-color);
    border-radius: 8px;
    overflow: hidden;
    max-width: 700px;
    margin: 0 auto 3rem auto;
}

.role-tab {
    flex-grow: 1;
    padding: 14px 20px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    border: none;
    background-color: var(--surface-color);
    color: var(--primary-color);
    transition: background-color 0.3s ease, color 0.3s ease;
    border-right: 1px solid var(--primary-color);
}

.role-tab:last-child {
    border-right: none;
}

.role-tab.active {
    background-color: var(--primary-color);
    color: var(--text-primary);
}

.role-tab:not(.active):hover {
    background-color: #2a2a2a;
}

.role-content {
    display: none;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
    text-align: left;
    animation: contentFadeIn 0.6s ease;
}

.role-content.active {
    display: grid; 
}

@keyframes contentFadeIn {
    from { opacity: 0; transform: translateY(15px); }
    to   { opacity: 1; transform: translateY(0); }
}

.content-text h3 {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.content-text .pain-point {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    border-left: 3px solid var(--accent-color);
    padding-left: 15px;
}

.content-text p {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    line-height: 1.7;
}

.content-text ul {
    list-style-type: none;
    padding-left: 0;
}

.content-text ul li {
    position: relative;
    padding-left: 30px;
    margin-bottom: 10px;
    font-size: 1rem;
    font-weight: 700;
}

.content-text ul li::before {
    content: '✓';
    position: absolute;
    left: 0;
    top: 0;
    color: var(--accent-color);
    font-weight: 800;
}

.content-visual {
    width: 100%;
    perspective: 1000px;
}

.content-visual img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    border: 1px solid #333;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.3);
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.content-visual img:hover {
    transform: rotateX(5deg) rotateY(-5deg) scale(1.02);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4);
}

/* --- Section 3: "Features" --- */
#features {
    background-color: #0a0a0a; 
    padding: 100px 20px;
    border-top: 1px solid #222;
}

.features-container {
    max-width: 1100px;
    margin: 0 auto;
}

.feature-item {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
    margin-bottom: 100px;
}

.feature-item:last-child {
    margin-bottom: 0;
}

.feature-visual {
    width: 100%;
    perspective: 1000px;
}

.feature-visual video,
.feature-visual img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    border: 1px solid #333;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.3);
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.feature-visual video:hover,
.feature-visual img:hover {
    transform: rotateX(5deg) rotateY(-5deg) scale(1.02);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4);
}

.feature-text {
    text-align: left;
}

.feature-text h3 {
    font-size: clamp(1.8rem, 3vw, 2.2rem);
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
}

.feature-text p {
    font-size: 1.1rem;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 1.5rem;
}

.feature-text p strong {
    color: var(--text-primary);
    font-weight: 700;
}

.feature-text .feature-quote {
    font-weight: 700;
    font-size: 1.15rem;
    color: var(--text-primary);
    border-left: 3px solid var(--accent-color);
    padding-left: 20px;
    font-style: italic;
}

.feature-item.reversed .feature-visual {
    order: 2;
}
.feature-item.reversed .feature-text {
    order: 1;
}

/* --- Section 4: "Core Features Grid" --- */
#core-features {
    background-color: var(--background-color);
    padding: 100px 20px;
    border-top: 1px solid #222;
}

.features-grid-container {
    max-width: 1100px;
    margin: 0 auto;
    text-align: center;
}

#core-features h2 {
    font-size: clamp(2rem, 4vw, 2.5rem);
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.features-grid-subtitle {
    font-size: 1.15rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto 3.5rem auto;
}

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

.feature-card {
    background-color: var(--surface-color);
    border: 1px solid #222;
    border-radius: 8px;
    padding: 30px;
    text-align: left;
    transition: transform 0.3s ease, 
                box-shadow 0.3s ease, 
                border-color 0.3s ease;
}

.card-icon {
    width: 48px;
    height: 48px;
    color: var(--primary-color); 
    margin-bottom: 20px;
    transition: color 0.3s ease;
}

.card-icon svg {
    width: 100%;
    height: 100%;
}

.feature-card h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 10px;
}

.feature-card p {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

.feature-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    border-color: var(--primary-color);
}

.feature-card:hover .card-icon {
    color: var(--accent-color);
}

/* --- Section 5: "Why MyAthlete?" --- */
#why-myathlete {
    background-color: var(--background-color);
    padding: 100px 20px;
    border-top: 1px solid #222;
}

.why-container {
    max-width: 1100px;
    margin: 0 auto;
    text-align: center;
}

#why-myathlete h2 {
    font-size: clamp(2rem, 4vw, 2.5rem);
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.why-subtitle {
    font-size: 1.15rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto 3.5rem auto;
}

.comparison-table {
    width: 100%;
    border: 1px solid #333;
    border-radius: 8px;
    overflow: hidden;
    background-color: var(--surface-color);
}

.table-row {
    display: grid;
    grid-template-columns: 0.8fr 1fr 1fr;
    border-bottom: 1px solid #333;
    text-align: left;
}

.table-row:last-child {
    border-bottom: none;
}

.table-row.header {
    background-color: #0a0a0a;
    font-size: 0.9rem;
    font-weight: 700;
}

.table-row.header > div {
    padding: 18px 25px;
    color: var(--text-secondary);
}

.table-row.header .cell-new {
    color: var(--text-primary);
}

.table-row > div {
    padding: 25px;
    line-height: 1.6;
}

.table-row .cell-feature {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-primary);
    border-right: 1px solid #333;
}

.table-row .cell-old {
    font-size: 0.95rem;
    color: var(--text-secondary);
    opacity: 0.7;
    border-right: 1px solid #333;
}

.table-row .cell-new {
    font-size: 0.95rem;
    color: var(--text-primary);
}

.table-row .cell-new strong {
    color: var(--accent-color);
    font-weight: 700;
    display: block;
    margin-bottom: 5px;
    font-size: 1rem;
}

/* --- Section 6: "Roadmap" --- */
#roadmap {
    background-color: #0a0a0a;
    padding: 100px 20px;
    border-top: 1px solid #222;
}

.roadmap-container {
    max-width: 1100px;
    margin: 0 auto;
    text-align: center;
}

#roadmap h2 {
    font-size: clamp(2rem, 4vw, 2.5rem);
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.roadmap-subtitle {
    font-size: 1.15rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto 4.5rem auto;
}

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

.roadmap-timeline::before {
    content: '';
    position: absolute;
    top: 34px; 
    left: 5%; 
    width: 90%; 
    height: 3px;
    background-color: var(--primary-color);
    opacity: 0.3;
    z-index: 0;
}

.roadmap-stage {
    background-color: var(--surface-color);
    border: 1px solid #222;
    border-radius: 8px;
    padding: 25px;
    text-align: left;
    z-index: 1;
    transition: transform 0.3s ease, 
                box-shadow 0.3s ease, 
                border-color 0.3s ease;
}

.roadmap-stage:hover {
    transform: translateY(-8px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    border-color: var(--primary-color);
}

.stage-header {
    position: relative;
    padding-top: 30px; 
    padding-bottom: 20px;
    margin-bottom: 20px;
    border-bottom: 1px solid #333;
}

.stage-header::before {
    content: '';
    position: absolute;
    top: 0; 
    left: 0; 
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background-color: var(--surface-color);
    border: 3px solid var(--primary-color);
    z-index: 2;
}

.stage-header span {
    display: block;
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 5px;
}

.stage-header h4 {
    font-size: 1.3rem;
    color: var(--text-primary);
    font-weight: 700;
}

.stage-content p {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.stage-content ul {
    list-style-type: none;
    padding-left: 0;
}

.stage-content ul li {
    position: relative;
    padding-left: 22px;
    margin-bottom: 8px;
    font-size: 0.95rem;
    color: var(--text-secondary);
}

.stage-content ul li::before {
    content: '•';
    position: absolute;
    left: 0;
    top: 0;
    color: var(--accent-color);
    font-weight: 800;
    font-size: 1.1rem;
    line-height: 1;
}

/* --- Section 7: "FAQ" --- */
#faq {
    background-color: var(--background-color);
    padding: 100px 20px;
    border-top: 1px solid #222;
}

.faq-container {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

#faq h2 {
    font-size: clamp(2rem, 4vw, 2.5rem);
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 3rem;
}

.faq-accordion {
    text-align: left;
}

.faq-item {
    border-bottom: 1px solid #333;
}
.faq-item:first-child {
    border-top: 1px solid #333;
}

.faq-question {
    width: 100%;
    background-color: transparent;
    border: none;
    cursor: pointer;
    padding: 25px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: transform 0.3s ease;
}

.faq-item:hover {
    transform: translateY(-4px);
}
.faq-item:hover .faq-question span:first-child {
    color: var(--accent-color);
}

.faq-question span:first-child {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-primary);
    transition: color 0.3s ease;
    text-align: left;
}

.faq-icon {
    font-size: 1.8rem;
    font-weight: 400;
    color: var(--primary-color);
    transition: transform 0.3s ease;
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-out, padding 0.4s ease-out;
}

.faq-answer p {
    font-size: 1rem;
    color: var(--text-secondary);
    line-height: 1.7;
    padding-bottom: 25px;
}

.faq-item.active .faq-answer {
    max-height: 300px;
}

.faq-item.active .faq-icon {
    transform: rotate(45deg);
}

/* --- Section 8: "Final CTA" --- */
#cta {
    background-color: #000;
    padding: 120px 20px;
    text-align: center;
    position: relative;
    overflow: hidden;
    border-top: 1px solid #222;
}

.cta-container {
    max-width: 700px;
    margin: 0 auto;
}

#cta h2 {
    font-size: clamp(2.2rem, 5vw, 3rem);
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

#cta p {
    font-size: 1.15rem;
    color: var(--text-secondary);
    max-width: 500px;
    margin: 0 auto 2.5rem auto;
}

.final-cta {
    padding: 18px 36px;
    font-size: 1.1rem;
    font-weight: 700;
    transition: background-color 0.3s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.store-badges-final {
    margin-top: 3rem;
}

.store-badges-final p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.store-badges-final .badge-placeholder {
    display: inline-flex;
    margin: 0 5px;
}

/* --- Footer --- */
footer {
    background-color: var(--background-color);
    padding: 40px 20px;
    border-top: 1px solid #222;
    color: var(--text-secondary);
}

.footer-container {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.footer-logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-primary);
}

footer p {
    font-size: 0.9rem;
}

.footer-links {
    display: flex;
    gap: 20px;
}

.footer-links a {
    font-size: 0.9rem;
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: var(--text-primary);
}

/* * --------------------------
 * RESPONSIVE STYLES
 * --------------------------
 */

/* --- Section 2: Roles (Tablet & smaller) --- */
@media (max-width: 768px) {
    .role-tabs {
        flex-direction: column;
        max-width: 100%;
        border: none;
    }
    .role-tab {
        border: 1px solid var(--primary-color);
        border-radius: 8px;
        margin-bottom: 10px;
    }
    .role-tab:last-child {
        border: 1px solid var(--primary-color);
    }

    .role-content {
        grid-template-columns: 1fr;
    }
    .content-visual {
        order: -1;
    }
}

/* --- Section 3: Features (Tablet & smaller) --- */
@media (max-width: 800px) {
    .feature-item {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .feature-item.reversed .feature-visual {
        order: 1;
    }
    .feature-item.reversed .feature-text {
        order: 2;
    }

    .feature-text {
        text-align: center;
    }

    .feature-text .feature-quote {
        margin-left: auto;
        margin-right: auto;
    }
}

/* --- Section 4: Grid (Tablet & smaller) --- */
@media (max-width: 900px) {
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media (max-width: 600px) {
    .features-grid {
        grid-template-columns: 1fr;
    }
}

/* --- Section 5: Why (Tablet & smaller) --- */
@media (max-width: 800px) {
    .table-row {
        grid-template-columns: 1fr;
    }
    .table-row > div {
        border-bottom: 1px dashed #333;
    }
    .table-row .cell-feature {
        border-right: none;
        background-color: #0a0a0a;
    }
    .table-row .cell-old {
        border-right: none;
    }
    .table-row.header {
        display: none;
    }
}

/* --- Section 6: Roadmap (Tablet & smaller) --- */
@media (max-width: 900px) {
    .roadmap-timeline {
        grid-template-columns: 1fr;
    }
    
    .roadmap-timeline::before {
        top: 5%; 
        left: 29px; 
        width: 3px;
        height: 90%; 
    }

    .stage-header {
        padding-top: 30px; 
    }

    .stage-header::before {
        top: 0; 
        left: -16px; 
    }
    
    .roadmap-stage {
        margin-left: 0;
        padding-left: 50px;
    }
}

@media (max-width: 600px) {
    .roadmap-timeline::before {
        left: 29px; 
    }

    .stage-header {
        padding-top: 30px;
    }

    .stage-header::before {
        top: 0;
        left: -36px; 
    }
    
    .roadmap-stage {
        margin-left: 0;
        padding: 25px;
        padding-left: 40px;
    }
}

/* --- Footer (Mobile) --- */
@media (max-width: 600px) {
    .footer-container {
        flex-direction: column;
        text-align: center;
    }
}

/* --- Hero Background Fix (Portrait) --- */
@media (max-aspect-ratio: 1/1) {
    #hero {
        background-image: url('underwater.jpg');
    }
}

/* * --------------------------
 * STYLES FOR CONTACT & SUCCESS PAGES
 * (Append this to your main style.css)
 * --------------------------
 */

/* --- Contact Form Page --- */
#contact-form-section {
    background-color: var(--background-color);
    padding: 150px 20px 100px 20px; /* Extra top padding for nav */
    min-height: 100vh;
}
.form-container {
    max-width: 700px;
    margin: 0 auto;
    background-color: var(--surface-color);
    padding: 30px 40px;
    border-radius: 8px;
    border: 1px solid #333;
}
.form-container h1 {
    font-size: clamp(1.8rem, 4vw, 2.2rem);
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 1rem;
    text-align: center;
}
.form-container .form-subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary);
    text-align: center;
    margin-bottom: 2.5rem;
}

.form-group {
    margin-bottom: 1.5rem;
}
.form-group label {
    display: block;
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

/* Style for text, email, number inputs */
.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="number"],
.form-group input[type="tel"],
.form-group textarea {
    width: 100%;
    padding: 15px;
    font-family: var(--font-family);
    font-size: 1rem;
    color: var(--text-primary);
    
    /* Matches Flutter Theme */
    background-color: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    border: 1px solid #444; /* Grey-700 from theme */
    
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

/* Matches Flutter 'focusedBorder' */
.form-group input[type="text"]:focus,
.form-group input[type="email"]:focus,
.form-group input[type="number"]:focus,
.form-group input[type="tel"]:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px var(--primary-color);
}

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

/* Style form errors (if Django sends them) */
.form-group .errorlist {
    list-style-type: none;
    padding: 0;
    color: #E57373; /* Light red */
    font-size: 0.9rem;
    margin-top: 5px;
}

/* Submit Button */
.submit-button {
    /* Re-use cta-button styles and expand */
    width: 100%;
    padding: 16px 28px;
    font-size: 1.1rem;
    font-weight: 700;
    margin-top: 1rem;
}

/* --- Contact Success Page --- */
#contact-success-section {
    background-color: var(--background-color);
    padding: 150px 20px 100px 20px;
    min-height: 80vh; /* Shorter than form page */
    display: flex;
    align-items: center;
    justify-content: center;
}
.success-container {
    max-width: 600px;
    margin: 0 auto;
    background-color: var(--surface-color);
    padding: 40px 50px;
    border-radius: 8px;
    border: 1px solid #333;
    text-align: center;
}
.success-icon {
    font-size: 3rem;
    color: var(--accent-color);
    line-height: 1;
    margin-bottom: 1.5rem;
}
.success-container h1 {
    font-size: clamp(1.8rem, 4vw, 2.2rem);
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 1rem;
}
.success-container p {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
    line-height: 1.7;
}
.back-home-button {
    /* Re-use cta-button styles */
    padding: 14px 28px;
    font-size: 1rem;
    font-weight: 700;
}
