/* © Atia Hegazy — atiaeno.com */
/*
 * responsive.css
 * ─────────────────────────────────────────────────────────────────────────────
 * Single source of truth for ALL media queries across the front-end.
 * Organised from largest breakpoint → smallest.
 *
 * Breakpoints:
 *   ≥ 1200px  xl
 *   ≥  992px  lg  (desktop nav threshold)
 *   <  992px  < lg  (mobile nav)
 *   ≤  768px  md
 *   ≤  640px  sm
 *   ≤  480px  xs
 * ─────────────────────────────────────────────────────────────────────────────
 */

/* =============================================================================
   ≥ 1200px — Large desktop
============================================================================= */
@media (min-width: 1200px) {
    .container {
        max-width: 1200px;
    }
}

/* =============================================================================
   ≥ 992px — Desktop nav: active link underline
============================================================================= */
@media (min-width: 992px) {
    .navbar-nav .nav-link.active {
        color: var(--primary-color) !important;
        font-weight: 600;
        position: relative;
    }

    .navbar-nav .nav-link.active::after {
        content: '';
        position: absolute;
        bottom: -2px;
        left: 0.875rem;
        right: 0.875rem;
        height: 2px;
        background: var(--primary-color);
        border-radius: 2px;
    }
}

/* =============================================================================
   < 992px — Mobile / tablet nav
============================================================================= */
@media (max-width: 991.98px) {

    /* Collapsed navbar: solid white bg, shadow, rounded bottom */
    #navbarNav {
        background: #ffffff;
        border-top: 1px solid #e2e8f0;
        border-radius: 0 0 12px 12px;
        box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);
        padding: 1rem 1.25rem 1.25rem;
        margin-top: 0;
    }

    #navbarNav.show {
        display: block;
    }

    #navbarNav .navbar-nav {
        flex-direction: column;
        gap: 0.25rem;
        margin: 0 0 0.75rem 0 !important;
    }

    #navbarNav .nav-link {
        padding: 0.6rem 0.75rem;
        border-radius: 8px;
        color: var(--text-secondary) !important;
        font-weight: 500;
    }

    #navbarNav .nav-link:hover,
    #navbarNav .nav-link.active {
        background: rgba(6, 95, 70, 0.07);
        color: var(--primary-color) !important;
    }

    #navbarNav .nav-link.active {
        font-weight: 600;
        border-left: 3px solid var(--primary-color);
        padding-left: 0.875rem;
    }

    /* CTA row stacks vertically */
    #navbarNav .d-flex {
        flex-direction: column;
        align-items: stretch !important;
        gap: 0.5rem !important;
        padding-top: 0.75rem;
        border-top: 1px solid #f1f5f9;
    }

    #navbarNav .nav-divider {
        display: none !important;
    }

    #navbarNav .nav-login-link {
        padding: 0.6rem 0.75rem;
        border-radius: 8px;
        border: 1.5px solid #e2e8f0;
        text-align: center;
        color: var(--text-secondary) !important;
    }

    #navbarNav .btn-primary-custom {
        justify-content: center;
        width: 100%;
    }
}

/* =============================================================================
   ≤ 1024px — Tablet: 2-column grids
============================================================================= */
@media (max-width: 1024px) {

    .features-grid,
    .testimonials-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }

    /* Pricing: collapse to 2 cols on tablet */
    .pricing-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 1rem;
    }
}

/* =============================================================================
   ≤ 992px — Tablet: stack two-column layouts
============================================================================= */
@media (max-width: 992px) {

    /* Dashboard showcase */
    .showcase-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .badge-1,
    .badge-2,
    .showcase-float-badge {
        display: none !important;
    }

    .showcase-img {
        width: 100%;
        max-width: 100%;
        border-radius: 8px;
    }

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

    .showcase-text h3 {
        font-size: 1.625rem !important;
    }

    .showcase-features-list {
        display: inline-block;
        text-align: left;
    }

    .showcase-actions {
        justify-content: center;
    }

    /* Testimonials — Swiper must allow its JS to set slide width */
    .testimonials-swiper .swiper-slide {
        width: auto !important;
        min-width: 0;
    }

    /* About page */
    .about-hero-grid,
    .mission-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .about-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .values-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .about-hero-text h1 {
        font-size: 2rem;
    }

    /* Values grid (about redesign) */
    .values-grid-modern {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* =============================================================================
   ≤ 768px — Mobile: single column, reduced padding/font
============================================================================= */
@media (max-width: 768px) {

    /* --- Typography --- */
    h1 {
        font-size: 2rem;
    }

    h2 {
        font-size: 1.5rem;
    }

    /* --- Layout baseline --- */
    .main-content {
        margin-top: 70px;
    }

    /* --- Hero --- */
    .hero-section {
        padding: 6rem 0 3rem;
        min-height: auto;
        text-align: center;
    }

    .hero-title {
        font-size: 2rem;
    }

    .hero-visual {
        margin-top: 2rem;
    }

    .dashboard-preview {
        transform: none;
    }

    .hero-cta {
        justify-content: center;
        flex-wrap: wrap;
        gap: 0.75rem;
    }

    .hero-trust {
        justify-content: center;
    }

    /* --- Grids → single column --- */
    .features-grid,
    .testimonials-grid,
    .stats-grid {
        grid-template-columns: 1fr;
    }

    /* --- Stats --- */
    .stats-section {
        padding: 3rem 0;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }

    .stat-number {
        font-size: 2rem !important;
    }

    /* --- Steps --- */
    .steps-grid {
        flex-direction: column !important;
        gap: 1.5rem;
    }

    .step-connector {
        display: none !important;
    }

    .step-card {
        padding: 1.5rem;
    }

    /* --- Sections padding --- */
    .how-section,
    .integrations-section,
    .faq-section,
    .cta-section {
        padding: 3.5rem 0;
    }

    .about-hero,
    .mission-section,
    .values-section {
        padding: 4rem 0;
    }

    /* --- Integrations --- */
    .integrations-grid {
        gap: 0.625rem;
    }

    .integration-item {
        font-size: 0.8125rem;
        padding: 0.625rem 1rem;
    }

    /* --- Testimonials --- */
    .testimonials-swiper .swiper-slide {
        width: 100% !important;
    }

    /* --- Section header --- */
    .section-header {
        padding: 0 1rem;
    }

    /* --- Pricing hero page --- */
    .pricing-hero {
        padding: 5rem 0 3rem;
    }

    .pricing-hero-grid {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }

    .pricing-hero-text h1 {
        font-size: 1.75rem;
    }

    .pricing-hero-highlights,
    .pricing-hero-cta {
        justify-content: center;
    }

    .free-plan-card {
        max-width: 100%;
    }

    /* --- Auth pages --- */
    .auth-card {
        grid-template-columns: 1fr;
    }

    .auth-card-left {
        padding: 2rem;
    }

    .auth-card-right {
        padding: 2rem;
    }

    /* --- Legal pages --- */
    .legal-section {
        padding: 4rem 0;
    }

    .legal-header h1 {
        font-size: 2rem;
    }

    .legal-item {
        padding: 1.5rem;
    }

    /* --- About page --- */
    .mission-cards {
        grid-template-columns: 1fr;
    }

    .about-stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }

    .values-grid {
        grid-template-columns: 1fr;
    }

    .values-grid-modern {
        grid-template-columns: 1fr;
    }

    .about-visual-card {
        padding: 2rem;
    }

    .mission-item {
        padding: 1.25rem;
    }

    .value-card-modern {
        padding: 1.5rem;
    }

    /* --- CTA --- */
    .cta-content h2 {
        font-size: 1.5rem;
    }

    /* --- Footer --- */
    .footer-top {
        padding: 2.5rem 0 2rem;
    }

    .footer-brand-col {
        padding-right: 0;
    }

    .footer-bottom {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .footer-bottom-right {
        flex-wrap: wrap;
        gap: 0.75rem;
    }

    .footer-payment {
        margin-left: 0;
        padding-left: 0;
        border-left: none;
    }

    /* --- Pricing card --- */
    .pricing-card.featured {
        transform: none;
        order: -1;
    }
}

/* =============================================================================
   ≤ 640px — Small mobile: single-col pricing
============================================================================= */
@media (max-width: 640px) {
    .pricing-grid {
        grid-template-columns: 1fr !important;
    }

    .pricing-card {
        min-height: auto !important;
    }

    .pricing-card.featured {
        transform: none !important;
        order: -1;
    }
}

/* =============================================================================
   ≤ 480px — Extra small
============================================================================= */
@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
}