/* ===========================================================================
   TrueLedger Global Public - Mobile Responsive Styles
   Purpose: Standardized responsive utilities for all public-facing pages
   =========================================================================== */

/* --- Navbar Responsiveness --- */
.nav-left {
    display: flex;
    align-items: center;
    gap: 3rem;
}

.nav-right {
    display: flex;
    align-items: center;
}

.mobile-nav-toggle {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    margin-left: 1rem;
}

/* Mobile Side Menu */
.mobile-side-menu {
    position: fixed;
    top: 0;
    right: 0;
    width: 280px;
    height: 100vh;
    background: var(--bg-secondary);
    z-index: 1000;
    padding: 2rem;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
}

.mobile-side-menu.active {
    transform: translateX(0);
}

.mobile-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.close-mobile-menu {
    background: none;
    border: none;
    color: white;
    font-size: 2rem;
    cursor: pointer;
}

.mobile-menu-links {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.mobile-menu-links a {
    color: white;
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: 500;
}

/* --- Global Responsive Grids --- */
.public-grid-2 {
    display: grid !important;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.public-grid-3 {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

/* ============================================
   TABLET & BELOW (< 992px)
   ============================================ */
@media (max-width: 992px) {

    /* Layout Safety */
    .blob {
        display: none !important;
    }

    .landing-nav {
        padding: 1rem 1.5rem !important;
        width: 100vw !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }

    .landing-logo {
        font-size: 1.25rem !important;
    }

    /* Reset 3D transform on mobile to prevent overflow */
    video {
        transform: none !important;
        margin-top: 2rem;
    }

    .landing-menu {
        display: none !important;
    }

    .mobile-nav-toggle {
        display: block;
    }

    .hero-grid,
    .public-grid-2 {
        grid-template-columns: 1fr !important;
        gap: 3rem !important;
        text-align: center;
    }

    .hero-content,
    .public-hero-content {
        text-align: center !important;
    }

    .hero-title,
    .public-hero-title {
        font-size: 2.8rem !important;
    }

    .feature-row {
        grid-template-columns: 1fr !important;
        gap: 2rem !important;
        text-align: center;
    }

    .feature-row.reverse-mobile {
        display: flex !important;
        flex-direction: column-reverse;
    }

    .how-it-works-grid,
    .public-grid-3 {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    .testimonial-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    /* Features Page Specific */
    .order-1,
    .order-2 {
        order: initial !important;
    }
}

/* ============================================
   MOBILE & SMALL TABLETS (< 768px)
   ============================================ */
@media (max-width: 768px) {

    .blob {
        max-width: 100vw;
        opacity: 0.15;
        /* Tone down on mobile */
    }

    .login-btn,
    .register-btn {
        display: none !important;
    }

    .hero-section,
    header[style*="padding: 120px"] {
        padding-top: 100px !important;
        padding-bottom: 4rem !important;
    }

    .hero-title,
    .public-hero-title,
    h1[style*="font-size: 3.5rem"] {
        font-size: 2.2rem !important;
    }

    .hero-subtitle,
    .public-hero-subtitle {
        font-size: 1rem !important;
    }

    /* Stacking buttons */
    .cta-actions,
    .hero-actions,
    .hero-buttons {
        flex-direction: column !important;
        gap: 1rem !important;
        align-items: center !important;
        justify-content: center !important;
        width: 100% !important;
    }

    .btn {
        width: 100% !important;
        max-width: 350px;
        margin-left: auto !important;
        margin-right: auto !important;
    }

    .stats-container {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 2rem !important;
    }

    .how-it-works-grid,
    .public-grid-3,
    .testimonial-grid {
        grid-template-columns: 1fr !important;
    }

    .step-line {
        display: none !important;
    }

    .why-choose-grid {
        grid-template-columns: 1fr !important;
        gap: 3rem !important;
    }

    .why-choose-visual-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    /* Pricing Page */
    div[style*="min-width: 350px"] {
        min-width: 100% !important;
        padding: 2rem !important;
    }
}

/* ============================================
   SMALL MOBILE (< 576px)
   ============================================ */
@media (max-width: 576px) {

    .hero-title,
    .public-hero-title,
    h1[style*="font-size: 3rem"] {
        font-size: 1.8rem !important;
    }

    .stats-container,
    .why-choose-visual-grid {
        grid-template-columns: 1fr !important;
    }

    section,
    .content-area {
        padding: 4rem 1.5rem !important;
    }

    /* Contact Form Fixes */
    .contact-grid-2 {
        grid-template-columns: 1fr !important;
        gap: 1rem !important;
    }

    .card {
        padding: 1.5rem !important;
    }

    /* Utility to hide large desktop spacers */
    div[style*="margin-bottom: 5rem"] {
        margin-bottom: 2rem !important;
    }
}

/* ============================================
   PREMIUM UI OVERRIDES (MOBILE)
   ============================================ */
@media (max-width: 992px) {

    /* Disable 3D Float on Mobile for performance/layout */
    .hero-dashboard-preview,
    .hero-3d-wrapper,
    video {
        animation: none !important;
        transform: none !important;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5) !important;
        margin-top: 1rem;
    }

    /* Adjust Glass Panels padding */
    .glass-panel-premium {
        padding: 1.5rem !important;
        height: auto !important;
        min-height: 250px;
    }

    /* Icon sizes on mobile */
    .glass-panel-premium i {
        font-size: 5rem !important;
    }

    /* Center hero content */
    .hero-content {
        text-align: center !important;
        align-items: center !important;
    }

    .hero-buttons {
        justify-content: center !important;
    }
}

@media (max-width: 480px) {
    .glass-panel-premium {
        min-height: 200px;
    }

    .glass-panel-premium i {
        font-size: 4rem !important;
    }
}