/* ========================================
   RESPONSIVE DESIGN - MOBILE FIRST
   Elegant MLM Template
======================================== */

/* ========================================
   LARGE TABLETS & SMALL DESKTOPS
   Max-width: 1399px
======================================== */
@media (max-width: 1399px) {
    .container {
        max-width: 1140px;
    }

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

/* ========================================
   TABLETS
   Max-width: 1023px
======================================== */
@media (max-width: 1023px) {
    .container {
        max-width: 960px;
    }

    /* Typography Adjustments */
    h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
    h2 { font-size: clamp(1.75rem, 4vw, 2.75rem); }
    h3 { font-size: clamp(1.5rem, 3vw, 2rem); }

    /* Section Spacing */
    section {
        padding: var(--spacing-2xl) 0;
    }

    /* Navigation */
    .nav-menu {
        position: fixed;
        top: 80px;
        right: -100%;
        width: 280px;
        height: calc(100vh - 80px);
        background: rgba(255, 251, 245, 0.98);
        backdrop-filter: blur(20px);
        flex-direction: column;
        justify-content: flex-start;
        padding: var(--spacing-xl);
        box-shadow: var(--shadow-xl);
        transition: var(--transition-normal);
        gap: 0;
        border-left: 1px solid var(--border-color);
    }

    .nav-menu.active {
        right: 0;
    }

    .nav-menu li {
        width: 100%;
        padding: var(--spacing-md) 0;
        border-bottom: 1px solid var(--border-color);
    }

    .nav-link {
        display: block;
        padding: var(--spacing-sm) 0;
        font-size: 1.125rem;
    }

    .nav-btn {
        margin-top: var(--spacing-md);
    }

    .mobile-toggle {
        display: flex;
    }

    /* Grids */
    .grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }

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

    /* Footer */
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Contact Grid */
    .contact-grid {
        grid-template-columns: 1fr;
    }

    /* Pricing */
    .pricing-card.featured {
        transform: scale(1);
    }

    .pricing-card.featured:hover {
        transform: translateY(-8px);
    }

    /* Hero Buttons */
    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }

    .hero-buttons .btn {
        width: 100%;
        max-width: 300px;
    }
}

/* ========================================
   MOBILE LANDSCAPE & LARGE PHONES
   Max-width: 767px
======================================== */
@media (max-width: 767px) {
    .container {
        max-width: 100%;
        padding: 0 var(--spacing-md);
    }

    /* Typography */
    h1 { font-size: clamp(1.75rem, 6vw, 2.5rem); }
    h2 { font-size: clamp(1.5rem, 5vw, 2rem); }
    h3 { font-size: clamp(1.25rem, 4vw, 1.75rem); }
    h4 { font-size: 1.25rem; }
    h5 { font-size: 1.125rem; }

    .section-title {
        font-size: clamp(1.75rem, 5vw, 2.5rem);
    }

    .section-description {
        font-size: 1rem;
    }

    /* Section Spacing */
    section {
        padding: var(--spacing-xl) 0;
    }

    .section-header {
        margin-bottom: var(--spacing-xl);
    }

    /* Navigation */
    .nav-wrapper {
        padding: 1rem 0;
    }

    .nav-logo {
        font-size: 1.25rem;
    }

    .logo-icon {
        width: 38px;
        height: 38px;
        font-size: 1rem;
    }

    .nav-menu {
        width: 100%;
        top: 70px;
        height: calc(100vh - 70px);
    }

    /* Hero Section */
    .hero {
        min-height: auto;
        padding: 100px 0 var(--spacing-2xl);
    }

    .hero-content {
        padding: var(--spacing-xl) var(--spacing-md);
    }

    .hero-title {
        font-size: clamp(2rem, 8vw, 3.5rem);
    }

    .hero-description {
        font-size: 1rem;
    }

    .hero-label {
        font-size: 0.75rem;
        padding: 6px var(--spacing-md);
    }

    /* Buttons */
    .btn {
        padding: 0.875rem 1.75rem;
        font-size: 0.95rem;
    }

    .btn-large {
        padding: 1rem 2rem;
        font-size: 1rem;
    }

    /* Cards */
    .card {
        padding: var(--spacing-lg);
    }

    .card-icon {
        width: 60px;
        height: 60px;
        font-size: 1.75rem;
    }

    .card-title {
        font-size: 1.25rem;
    }

    /* Grids */
    .grid-4,
    .grid-3,
    .grid-2 {
        grid-template-columns: 1fr;
        gap: var(--spacing-lg);
    }

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

    .grid {
        gap: var(--spacing-lg);
    }

    /* Product Cards */
    .product-image {
        height: 240px;
    }

    .product-content {
        padding: var(--spacing-md);
    }

    .product-title {
        font-size: 1.125rem;
    }

    .product-price {
        font-size: 1.5rem;
    }

    .product-footer {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--spacing-sm);
    }

    /* Stats */
    .stats-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-lg);
    }

    .stat-item {
        padding: var(--spacing-md);
    }

    .stat-icon {
        font-size: 2.5rem;
    }

    .stat-number {
        font-size: clamp(2rem, 8vw, 3rem);
    }

    .stat-label {
        font-size: 1rem;
    }

    /* MLM Cards */
    .mlm-plan-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-lg);
    }

    .mlm-card {
        padding: var(--spacing-lg);
    }

    .mlm-card-icon {
        width: 70px;
        height: 70px;
        font-size: 2rem;
    }

    .mlm-card-title {
        font-size: 1.5rem;
    }

    .mlm-card-percentage {
        font-size: 2.5rem;
    }

    /* Testimonials */
    .testimonial-card {
        padding: var(--spacing-lg);
    }

    .testimonial-quote {
        font-size: 2.5rem;
    }

    .testimonial-text {
        font-size: 1rem;
    }

    .testimonial-avatar {
        width: 50px;
        height: 50px;
    }

    .testimonial-info h5 {
        font-size: 1rem;
    }

    /* Pricing Cards */
    .pricing-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-lg);
    }

    .pricing-card {
        padding: var(--spacing-xl);
    }

    .pricing-icon {
        width: 70px;
        height: 70px;
        font-size: 2rem;
    }

    .pricing-title {
        font-size: 1.5rem;
    }

    .pricing-price {
        font-size: 2.75rem;
    }

    .pricing-price sup {
        font-size: 1.25rem;
    }

    /* Contact Section */
    .contact-grid {
        gap: var(--spacing-xl);
    }

    .contact-info {
        padding: var(--spacing-xl);
    }

    .contact-item {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--spacing-sm);
    }

    .contact-item-icon {
        width: 45px;
        height: 45px;
        font-size: 1.25rem;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    /* Footer */
    .footer {
        padding: var(--spacing-xl) 0 var(--spacing-md);
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-xl);
    }

    .footer-logo {
        margin-bottom: var(--spacing-md);
    }

    .social-links {
        flex-wrap: wrap;
    }

    .social-link {
        width: 42px;
        height: 42px;
    }

    /* Scroll to Top */
    .scroll-top {
        width: 45px;
        height: 45px;
        bottom: 20px;
        right: 20px;
        font-size: 1.125rem;
    }

    /* Spacing Utilities */
    :root {
        --spacing-xs: 0.5rem;
        --spacing-sm: 0.75rem;
        --spacing-md: 1rem;
        --spacing-lg: 1.5rem;
        --spacing-xl: 2rem;
        --spacing-2xl: 2.5rem;
        --spacing-3xl: 3.5rem;
    }
}

/* ========================================
   SMALL MOBILE
   Max-width: 480px
======================================== */
@media (max-width: 480px) {
    /* Typography */
    h1 { font-size: 1.75rem; }
    h2 { font-size: 1.5rem; }
    h3 { font-size: 1.25rem; }
    
    .hero-title {
        font-size: 2rem;
        line-height: 1.3;
    }

    /* Navigation */
    .nav-logo {
        font-size: 1.125rem;
    }

    .logo-icon {
        width: 35px;
        height: 35px;
        font-size: 0.95rem;
    }

    .nav-menu {
        width: 100%;
        padding: var(--spacing-md);
    }

    /* Hero */
    .hero-content {
        padding: var(--spacing-md);
    }

    .hero-buttons .btn {
        width: 100%;
        padding: 1rem 1.5rem;
    }

    /* Section Labels */
    .section-label,
    .hero-label {
        font-size: 0.7rem;
        padding: 5px var(--spacing-md);
        letter-spacing: 1px;
    }

    /* Cards */
    .card {
        padding: var(--spacing-md);
    }

    .card-icon {
        width: 55px;
        height: 55px;
        font-size: 1.5rem;
    }

    /* Product Cards */
    .product-image {
        height: 220px;
    }

    .product-badge {
        font-size: 0.7rem;
        padding: 4px var(--spacing-sm);
    }

    .product-overlay {
        flex-direction: column;
        gap: var(--spacing-xs);
    }

    .product-overlay .btn {
        padding: 0.75rem 1.25rem;
        font-size: 0.875rem;
    }

    /* MLM Cards */
    .mlm-card {
        padding: var(--spacing-md);
    }

    .mlm-card-icon {
        width: 65px;
        height: 65px;
        font-size: 1.75rem;
    }

    .mlm-card-percentage {
        font-size: 2rem;
    }

    /* Stats */
    .stat-number {
        font-size: 2.5rem;
    }

    .stat-icon {
        font-size: 2rem;
    }

    /* Pricing */
    .pricing-card {
        padding: var(--spacing-lg);
    }

    .pricing-icon {
        width: 65px;
        height: 65px;
        font-size: 1.75rem;
    }

    .pricing-price {
        font-size: 2.5rem;
    }

    .pricing-features {
        font-size: 0.9rem;
    }

    /* Testimonials */
    .testimonial-card {
        padding: var(--spacing-md);
    }

    .testimonial-quote {
        font-size: 2rem;
        top: var(--spacing-sm);
        left: var(--spacing-sm);
    }

    .testimonial-text {
        font-size: 0.95rem;
        margin-bottom: var(--spacing-md);
    }

    .testimonial-avatar {
        width: 45px;
        height: 45px;
    }

    .testimonial-info h5 {
        font-size: 0.95rem;
    }

    .testimonial-role {
        font-size: 0.8rem;
    }

    /* Contact */
    .contact-info {
        padding: var(--spacing-lg);
    }

    .contact-item {
        margin-bottom: var(--spacing-md);
    }

    .contact-item-icon {
        width: 40px;
        height: 40px;
        font-size: 1.125rem;
    }

    .form-input,
    .form-textarea,
    .form-select {
        padding: 0.875rem;
        font-size: 0.95rem;
    }

    .form-group {
        margin-bottom: var(--spacing-md);
    }

    /* Footer */
    .footer {
        padding: var(--spacing-lg) 0 var(--spacing-md);
    }

    .footer-grid {
        gap: var(--spacing-lg);
    }

    .social-link {
        width: 40px;
        height: 40px;
        font-size: 0.95rem;
    }

    .footer-bottom {
        font-size: 0.875rem;
        padding-top: var(--spacing-md);
    }

    /* Scroll to Top */
    .scroll-top {
        width: 42px;
        height: 42px;
        font-size: 1rem;
    }

    /* Spacing Adjustments */
    :root {
        --spacing-xs: 0.375rem;
        --spacing-sm: 0.625rem;
        --spacing-md: 0.875rem;
        --spacing-lg: 1.25rem;
        --spacing-xl: 1.75rem;
        --spacing-2xl: 2rem;
        --spacing-3xl: 3rem;
    }
}

/* ========================================
   LANDSCAPE ORIENTATION
======================================== */
@media (max-height: 600px) and (orientation: landscape) {
    .hero {
        min-height: auto;
        padding: 120px 0 var(--spacing-xl);
    }

    section {
        padding: var(--spacing-xl) 0;
    }

    .nav-menu {
        max-height: calc(100vh - 70px);
        overflow-y: auto;
    }
}

/* ========================================
   PRINT STYLES
======================================== */
@media print {
    .navbar,
    .mobile-toggle,
    .scroll-top,
    .preloader,
    .hero-buttons,
    .btn,
    .product-overlay {
        display: none !important;
    }

    body {
        background: white;
        color: black;
    }

    section {
        page-break-inside: avoid;
        padding: var(--spacing-md) 0;
    }

    .card,
    .product-card,
    .pricing-card {
        box-shadow: none;
        border: 1px solid #ccc;
    }
}

/* ========================================
   HIGH CONTRAST MODE
======================================== */
@media (prefers-contrast: high) {
    :root {
        --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.15);
        --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.2);
        --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.25);
        --shadow-xl: 0 12px 32px rgba(0, 0, 0, 0.3);
    }

    .card,
    .product-card,
    .pricing-card,
    .mlm-card {
        border-width: 2px;
    }

    .btn {
        border: 2px solid currentColor;
    }
}

/* ========================================
   REDUCED MOTION
======================================== */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }

    .hero-pattern {
        animation: none !important;
    }

    .loader-circle {
        animation: none !important;
        border-top-color: var(--accent-color);
    }
}
