.features-hero {
    padding: 180px 8% 80px;
    text-align: center;
    position: relative;
    z-index: 2;
}

html {
  scroll-behavior: smooth;
  overscroll-behavior-y: none;
}

.hero-inner {
    max-width: 800px;
    margin: 0 auto;
}

.mini-badge {
    display: inline-block;
    padding: 0.4rem 1.2rem;
    background: rgba(244, 67, 105, 0.08);
    color: var(--primary);
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 1.5rem;
}
.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 2rem;
    color: var(--text-dark);
    cursor: pointer;
}
.features-hero h1 {
    font-size: clamp(2.2rem, 4vw, 3.5rem);
    line-height: 1.2;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 1.5rem;
}

.features-hero h1 span {
    background: var(--primary-grad);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.features-hero p {
    color: var(--text-light);
    font-size: 1.15rem;
    line-height: 1.7;
}


.feat-row {
    padding: 100px 8%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 3;
}

.row-alt-bg {
    background: rgba(244, 67, 105, 0.015);
    border-top: 1px solid rgba(0,0,0,0.01);
    border-bottom: 1px solid rgba(0,0,0,0.01);
}

.feat-container {
    max-width: 1200px;
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 5rem;
    align-items: center;
}

/* Row-flipping mechanisms */
.row-left .feat-text { grid-column: 1; }
.row-left .feat-visual { grid-column: 2; }
.row-right .feat-text { grid-column: 2; }
.row-right .feat-visual { grid-column: 1; }

/* Text Content blocks */
.feat-num {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1;
    background: var(--primary-grad);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    opacity: 0.7;
    margin-bottom: 0.5rem;
}

.feat-text h2 {
    font-size: 2.2rem;
    color: var(--text-dark);
    margin-bottom: 1.25rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.feat-text p {
    color: var(--text-light);
    line-height: 1.7;
    font-size: 1.05rem;
    margin-bottom: 2rem;
}

.sub-feat-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.sub-feat-list li {
    position: relative;
    padding-left: 28px;
    font-weight: 600;
    color: var(--text-dark);
    font-size: 0.95rem;
}

.sub-feat-list li::before {
    content: "✓";
    position: absolute;
    left: 0;
    top: -2px;
    color: var(--primary);
    font-size: 1.1rem;
    font-weight: 700;
}


.feat-visual {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* 1. Admin Browser Engine */
.mock-browser {
    width: 100%;
    background: #ffffff;
    border-radius: 16px;
    border: 1px solid rgba(0,0,0,0.06);
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    transform: rotateX(8deg) rotateY(-8deg) rotateZ(2deg);
    transition: transform 0.5s ease;
}

.mock-browser:hover {
    transform: rotateX(0deg) rotateY(0deg) rotateZ(0deg);
}

.browser-chrome-header {
    background: #f8fafc;
    padding: 12px 16px;
    display: flex;
    gap: 6px;
    border-bottom: 1px solid rgba(0,0,0,0.04);
}

.browser-chrome-header .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #cbd5e1;
}

.mock-browser img {
    width: 100%;
    display: block;
    height: auto;
}

/* 2. Billing Asymmetric Floating Canvas */
.floating-billing-canvas {
    position: relative;
    width: 100%;
    height: 320px;
}

.billing-card {
    position: absolute;
    background: var(--white);
    border-radius: 20px;
    padding: 1.75rem;
    box-shadow: 0 20px 40px rgba(0,0,0,0.05);
    border: 1px solid rgba(0,0,0,0.02);
}

.main-invoice {
    width: 260px;
    top: 20px;
    left: 10%;
    z-index: 2;
}

.invoice-header {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-light);
    margin-bottom: 1rem;
}

.status-badge {
    background: #e6fcf5;
    color: #0ca678;
    padding: 0.2rem 0.6rem;
    border-radius: 50px;
}

.invoice-amount {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 1.5rem;
}

.invoice-line {
    height: 6px;
    background: #f1f3f5;
    border-radius: 4px;
    margin-bottom: 0.5rem;
}
.invoice-line.short { width: 60%; }

.analytic-widget {
    width: 220px;
    bottom: 20px;
    right: 10%;
    z-index: 1;
    background: var(--glass);
    backdrop-filter: blur(8px);
}

.widget-title {
    font-size: 0.85rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.mock-bar-chart {
    display: flex;
    align-items: flex-end;
    gap: 12px;
    height: 80px;
}

.mock-bar-chart .bar {
    flex: 1;
    background: var(--primary-grad);
    border-radius: 6px 6px 0 0;
}

/* 3. Assessment Glass Block Intersect */
.glass-assessment-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    width: 100%;
    max-width: 440px;
}

.metric-block {
    background: var(--white);
    border: 1px solid rgba(0,0,0,0.04);
    padding: 2rem;
    border-radius: 24px;
    text-align: center;
    box-shadow: 0 15px 35px rgba(0,0,0,0.03);
}

.metric-block .letter {
    display: block;
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--primary);
}

.metric-block .label {
    font-size: 0.85rem;
    color: var(--text-light);
    font-weight: 500;
}

.metric-block.highlight {
    grid-column: span 2;
    background: var(--primary-grad);
    color: var(--white);
}

.metric-block.highlight .big-num {
    display: block;
    font-size: 3rem;
    font-weight: 700;
}
.metric-block.highlight .sub-txt {
    font-size: 0.9rem;
    opacity: 0.9;
}

/* 4. Accounting Layer Slant */
.slant-canvas {
    width: 100%;
    max-width: 450px;
    perspective: 1000px;
}

.ledger-sheet {
    background: var(--white);
    border-radius: 24px;
    padding: 2rem;
    box-shadow: 0 30px 60px rgba(0,0,0,0.06);
    border: 1px solid rgba(0,0,0,0.03);
    transform: rotateY(-15deg) rotateX(10deg);
}

.sheet-row {
    display: flex;
    justify-content: space-between;
    padding: 1rem 0;
    border-bottom: 1px solid #f8fafc;
    font-size: 0.95rem;
}

.sheet-row.head {
    font-weight: 700;
    color: var(--text-dark);
    border-bottom: 2px solid #edf2f7;
}

.sheet-row.foot {
    font-weight: 700;
    color: #0ca678;
    border-bottom: none;
    padding-top: 1.5rem;
}

/* 5. Payroll Matrix Stack */
.payroll-stack {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    width: 100%;
    max-width: 420px;
}

.payroll-tile {
    background: var(--white);
    padding: 1.25rem 2rem;
    border-radius: 16px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.02);
    border-left: 5px solid var(--primary);
    font-weight: 600;
    font-size: 1rem;
    transition: transform 0.3s ease;
}

.payroll-tile.card-1 { transform: translateX(0px); }
.payroll-tile.card-2 { transform: translateX(20px); border-left-color: #ff8e7a; }
.payroll-tile.card-3 { transform: translateX(40px); border-left-color: #f44369; }

/* ==========================================================================
   MEGA SECTIONS (TUTOR & GUARDIAN PORTALS)
   ========================================================================== */
.mega-section-divider {
    text-align: center;
    padding: 120px 8% 40px;
}

.mega-section-divider h2 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-dark);
}

.mega-section-divider p {
    color: var(--text-light);
    margin-top: 0.5rem;
}

.mega-portal {
    margin: 40px 8% 60px;
    padding: 6rem 4rem;
    border-radius: 40px;
    position: relative;
    overflow: hidden;
}

.tutor-mega {
    background: linear-gradient(135deg, #fff5f5 0%, #ffeaec 100%);
    border: 1px solid rgba(244, 67, 105, 0.08);
}

.guardian-mega {
    background: linear-gradient(135deg, #f8fafc 0%, #f0f4f8 100%);
    border: 1px solid rgba(0, 0, 0, 0.03);
}

.mega-container {
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
}

.mega-badge {
    display: inline-block;
    padding: 0.3rem 1rem;
    background: var(--white);
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-dark);
    box-shadow: 0 4px 10px rgba(0,0,0,0.02);
    margin-bottom: 1.5rem;
}

.mega-portal h2 {
    font-size: 3.5rem;
    font-weight: 800;
    color: var(--text-dark);
    letter-spacing: -0.03em;
}

.mega-portal h2 span {
    color: var(--primary);
}

.mega-tagline {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-dark);
    margin: 0.5rem 0 1.5rem;
    opacity: 0.85;
}

.mega-desc {
    font-size: 1.1rem;
    line-height: 1.7;
    color: var(--text-light);
    max-width: 750px;
    margin: 0 auto 3.5rem;
}

.mega-grid-visual {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
}

.mega-grid-visual .mini-card {
    background: var(--white);
    padding: 1.5rem 1rem;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.95rem;
    box-shadow: 0 10px 25px rgba(0,0,0,0.02);
    border: 1px solid rgba(0,0,0,0.01);
}

/* ==========================================================================
   SIMPLE ANIMATION TRIGGERS
   ========================================================================== */
.animate-float {
    animation: floatingFrame 4s ease-in-out infinite;
}
.animate-float-delayed {
    animation: floatingFrame 4s ease-in-out infinite;
    animation-delay: 2s;
}

@keyframes floatingFrame {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-12px); }
}

/* ==========================================================================
   RESPONSIVE LAYOUT RESPONSES
   ========================================================================== */
@media (max-width: 968px) {
    .feat-container {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
    
    .row-left .feat-text, .row-left .feat-visual,
    .row-right .feat-text, .row-right .feat-visual {
        grid-column: 1;
    }
    
    .feat-text {
        text-align: center;
    }
    
    .sub-feat-list {
        align-items: center;
    }
    
    .payroll-tile {
        transform: translateX(0) !important;
    }
    
    .mega-grid-visual {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .mega-portal {
        padding: 4rem 2rem;
    }
}

@media (max-width: 580px) {
    .mega-grid-visual {
        grid-template-columns: 1fr;
    }
    .mega-portal h2 {
        font-size: 2.5rem;
    }
}@media (max-width: 1024px) {
    .hero {
        grid-template-columns: 1fr;
        text-align: center;
        padding-top: 140px;
        gap: 2rem;
    }
    .hero-content p {
        margin: 0 auto 2.5rem;
    }
    .hero-actions {
        justify-content: center;
    }
    .features-grid, .pricing-grid, .about-content {
        grid-template-columns: 1fr;
    }
    .pricing-card.popular {
        transform: scale(1);
    }
    .nav_logo {
        margin-right: 0; /* Removes the heavy spacing on mobile */
    }

    .menu-toggle {
        display: block; /* Show the hamburger icon */
    }

    nav {
        display: none; /* Hide the menu by default on small screens */
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: rgba(253, 251, 251, 0.95);
        backdrop-filter: blur(12px);
        padding: 2rem;
        gap: 1.5rem;
        border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    }

    /* Class to toggle visibility via JavaScript */
    nav.active {
        display: flex;
    }
}
