/* ============================================
   RESPONSIVE DESIGN - MOBILE FIRST
   ============================================ */

/* === TABLET (768px and up) === */
@media (max-width: 1024px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: var(--space-2xl);
    }
}

/* === MOBILE (< 768px) === */
@media (max-width: 767px) {

    /* Typography Adjustments */
    h1 {
        font-size: var(--font-size-4xl);
    }

    h2 {
        font-size: var(--font-size-3xl);
    }

    h3 {
        font-size: var(--font-size-2xl);
    }

    /* Container */
    .container {
        padding: 0 var(--space-lg);
    }

    /* Sections */
    .section {
        padding: var(--space-3xl) 0;
    }

    .section-lg {
        padding: var(--space-4xl) 0;
    }

    /* Header & Navigation */
    .nav-menu {
        position: fixed;
        top: var(--header-height);
        left: 0;
        right: 0;
        background-color: var(--color-bg-primary);
        border-bottom: 1px solid var(--color-border);
        flex-direction: column;
        gap: 0;
        padding: var(--space-lg) 0;
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: all var(--transition-base);
        z-index: var(--z-dropdown);
    }

    .nav-menu.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }

    .nav-item {
        width: 100%;
        text-align: center;
        padding: var(--space-md) 0;
        border-bottom: 1px solid var(--color-border);
    }

    .nav-item:last-child {
        border-bottom: none;
    }

    .nav-link {
        display: block;
        padding: var(--space-md) var(--space-lg);
    }

    /* Mobile Toggle */
    .mobile-toggle {
        display: flex;
    }

    .mobile-toggle.active .hamburger:nth-child(1) {
        transform: rotate(45deg) translateY(10px);
    }

    .mobile-toggle.active .hamburger:nth-child(2) {
        opacity: 0;
    }

    .mobile-toggle.active .hamburger:nth-child(3) {
        transform: rotate(-45deg) translateY(-10px);
    }

    /* Nav Actions */
    .nav-actions {
        gap: var(--space-md);
    }

    .btn-login {
        display: none;
    }

    .btn {
        padding: 0.625rem 1.25rem;
        font-size: var(--font-size-sm);
    }

    /* Hero */
    .hero {
        min-height: auto;
        padding: var(--space-4xl) 0;
    }

    .hero-title {
        font-size: var(--font-size-4xl);
    }

    .hero-description {
        font-size: var(--font-size-base);
    }

    .hero-actions {
        flex-direction: column;
        width: 100%;
    }

    .hero-actions .btn {
        width: 100%;
    }

    /* Stats Bar */
    .stats-bar {
        grid-template-columns: 1fr 1fr;
        gap: var(--space-xl);
    }

    .stat-number {
        font-size: var(--font-size-4xl);
    }

    .stat-label {
        font-size: var(--font-size-sm);
    }

    /* Grid System */
    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr;
        gap: var(--space-lg);
    }

    /* Cards */
    .card {
        padding: var(--space-xl);
    }

    /* Footer */
    .footer {
        padding: var(--space-4xl) 0 var(--space-lg);
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: var(--space-2xl);
    }

    .footer-bottom {
        flex-direction: column;
        gap: var(--space-md);
        text-align: center;
    }

    .footer-desc {
        max-width: 100%;
    }
}

/* === SMALL MOBILE (< 480px) === */
@media (max-width: 479px) {
    .hero-title {
        font-size: var(--font-size-3xl);
    }

    .section-title {
        font-size: var(--font-size-3xl);
    }

    .stats-bar {
        grid-template-columns: 1fr;
    }

    .stat-number {
        font-size: var(--font-size-3xl);
    }
}

/* === DESKTOP (1024px and up) === */
@media (min-width: 1024px) {

    /* Enhanced hover effects on desktop */
    .card:hover .card-icon {
        transform: scale(1.1) rotate(5deg);
        transition: transform var(--transition-base);
    }
}

/* === LARGE DESKTOP (1440px and up) === */
@media (min-width: 1440px) {
    :root {
        --font-size-base: 1.125rem;
        /* 18px */
    }

    .container {
        max-width: 1400px;
    }
}

/* === EXTRA LARGE DESKTOP (1920px and up) === */
@media (min-width: 1920px) {
    .container {
        max-width: 1600px;
    }
}

/* === LANDSCAPE MOBILE === */
@media (max-height: 600px) and (orientation: landscape) {
    .hero {
        min-height: auto;
        padding: var(--space-3xl) 0;
    }
}

/* === TABLET PORTRAIT === */
@media (min-width: 768px) and (max-width: 1024px) and (orientation: portrait) {

    .grid-3,
    .grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* === PRINT STYLES === */
@media print {

    .header,
    .footer,
    .btn,
    .nav-actions {
        display: none;
    }

    body {
        background: white;
        color: black;
    }
}