/* Responsive Design - Enhanced Mobile Optimization */

/* Large Tablets and Small Desktops */
@media (max-width: 1024px) {
    .container {
        padding: 0 15px;
    }
    
    .hero-text h1 {
        font-size: 3rem;
    }
    
    .hero-content {
        gap: 2rem;
    }
    
    .tool-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .earnings-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .products-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .stories-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .payment-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Tablets */
@media (max-width: 768px) {
    /* Enhanced Mobile Navigation */
    .nav-menu {
        position: fixed;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--white);
        flex-direction: column;
        padding: 2rem;
        box-shadow: var(--shadow);
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
        max-height: 80vh;
        overflow-y: auto;
    }
    
    .nav-menu.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }
    
    .nav-menu li {
        margin: 1rem 0;
        text-align: center;
    }
    
    .nav-menu a {
        font-size: 1.1rem;
        padding: 0.5rem 1rem;
        display: block;
        border-radius: 8px;
        transition: background 0.3s ease;
    }
    
    .nav-menu a:hover {
        background: var(--primary-light);
    }
    
    .hamburger {
        display: flex;
        z-index: 1001;
    }
    
    .hamburger.active span:nth-child(1) {
        transform: rotate(-45deg) translate(-5px, 6px);
    }
    
    .hamburger.active span:nth-child(2) {
        opacity: 0;
    }
    
    .hamburger.active span:nth-child(3) {
        transform: rotate(45deg) translate(-5px, -6px);
    }
    
    /* Hero Section Mobile Optimization */
    .hero {
        padding: 100px 0 60px;
        min-height: auto;
    }
    
    .hero-content {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }
    
    .hero-text h1 {
        font-size: 2.5rem;
        line-height: 1.2;
    }
    
    .hero-stats {
        flex-direction: column;
        gap: 1rem;
        align-items: center;
    }
    
    .stat {
        min-width: 120px;
    }
    
    .hero-buttons {
        justify-content: center;
        flex-wrap: wrap;
        gap: 1rem;
    }
    
    .hero-buttons .btn {
        min-width: 200px;
        padding: 14px 24px;
    }
    
    /* Phone Mockup Mobile Optimization */
    .phone-mockup {
        width: 250px;
        height: 350px;
        margin: 0 auto;
    }
    
    .tiktok-video,
    .commission-indicator {
        width: 85%;
        padding: 1.5rem;
    }
    
    /* Link Converter Mobile Optimization */
    .link-converter {
        padding: 1.5rem;
    }
    
    .input-group {
        flex-direction: column;
        gap: 1rem;
    }
    
    .link-input {
        padding: 14px 16px;
        font-size: 16px; /* Prevents zoom on iOS */
    }
    
    .convert-btn {
        padding: 14px 24px;
        font-size: 16px;
        width: 100%;
    }
    
    /* Earnings Section Mobile */
    .earnings-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .earnings-card {
        padding: 1.5rem;
    }
    
    .earnings-amount {
        font-size: 2rem;
    }
    
    /* Products Section Mobile */
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    
    .product-card {
        border-radius: 12px;
    }
    
    .product-info {
        padding: 1rem;
    }
    
    .share-btn {
        padding: 12px 16px;
        font-size: 14px;
    }
    
    /* Success Stories Mobile */
    .stories-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .story-card {
        flex-direction: column;
        text-align: center;
        padding: 1.5rem;
    }
    
    .story-avatar {
        width: 80px;
        height: 80px;
        margin: 0 auto 1rem;
    }
    
    /* Payment Methods Mobile */
    .payment-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .payment-card {
        padding: 1.5rem;
    }
    
    /* CTA Section Mobile */
    .cta-stats {
        flex-direction: column;
        gap: 1.5rem;
    }
    
    .cta-buttons {
        flex-direction: column;
        gap: 1rem;
    }
    
    .cta-buttons .btn {
        width: 100%;
        padding: 16px 24px;
    }
    
    /* Footer Mobile */
    .footer-content {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
    
    /* Section Headers Mobile */
    .section-header h2 {
        font-size: 2rem;
        line-height: 1.3;
    }
    
    .section-header p {
        font-size: 1rem;
        line-height: 1.5;
    }
    
    /* General Mobile Spacing */
    .how-it-works,
    .link-sharing-tool,
    .earnings,
    .trending-products,
    .success-stories,
    .payment-methods,
    .cta-section {
        padding: 60px 0;
    }
}

/* Mobile Phones */
@media (max-width: 480px) {
    .container {
        padding: 0 12px;
    }
    
    /* Header Mobile */
    .navbar {
        padding: 0.75rem 0;
    }
    
    .logo {
        font-size: 1.4rem;
    }
    
    .nav-actions {
        gap: 0.5rem;
    }
    
    .language-switcher {
        margin-right: 0.5rem;
    }
    
    .lang-btn {
        padding: 4px 8px;
        font-size: 0.7rem;
    }
    
    .lang-btn .flag {
        font-size: 0.9rem;
    }
    
    .nav-link {
        font-size: 14px;
    }
    
    .btn-small {
        padding: 8px 12px;
        font-size: 13px;
    }
    
    /* Hero Section Small Mobile */
    .hero {
        padding: 90px 0 50px;
    }
    
    .hero-text h1 {
        font-size: 1.8rem;
        line-height: 1.3;
    }
    
    .hero-text p {
        font-size: 0.95rem;
        line-height: 1.6;
    }
    
    .hero-stats {
        gap: 0.75rem;
    }
    
    .stat h3 {
        font-size: 1.5rem;
    }
    
    .stat p {
        font-size: 0.8rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .hero-buttons .btn {
        width: 100%;
        padding: 14px 20px;
        font-size: 15px;
    }
    
    /* Phone Mockup Small Mobile */
    .phone-mockup {
        width: 200px;
        height: 280px;
    }
    
    .tiktok-video,
    .commission-indicator {
        width: 90%;
        padding: 1rem;
    }
    
    .tiktok-video i,
    .money-icon {
        font-size: 1.5rem;
    }
    
    /* Steps Mobile */
    .steps-grid {
        gap: 1.5rem;
    }
    
    .step-card {
        padding: 1.5rem 1rem;
    }
    
    .step-icon {
        width: 60px;
        height: 60px;
        font-size: 1.4rem;
        margin: 1.5rem auto 1rem;
    }
    
    .step-card h3 {
        font-size: 1.1rem;
    }
    
    .step-card p {
        font-size: 0.9rem;
    }
    
    /* Link Converter Small Mobile */
    .tool-content {
        gap: 1.5rem;
    }
    
    .tool-text h2 {
        font-size: 1.8rem;
    }
    
    .tool-text p {
        font-size: 0.95rem;
    }
    
    .link-converter {
        padding: 1.25rem;
    }
    
    .link-converter h3 {
        font-size: 1.2rem;
        margin-bottom: 1rem;
    }
    
    .link-input {
        padding: 12px 14px;
        font-size: 16px;
    }
    
    .convert-btn {
        padding: 12px 20px;
        font-size: 15px;
    }
    
    .output-field {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .commission-link {
        padding: 12px 14px;
        font-size: 14px;
    }
    
    .copy-btn {
        padding: 12px 16px;
        font-size: 14px;
    }
    
    /* Earnings Small Mobile */
    .earnings-card {
        padding: 1.25rem;
    }
    
    .earnings-icon {
        width: 60px;
        height: 60px;
        font-size: 1.4rem;
    }
    
    .earnings-amount {
        font-size: 1.8rem;
    }
    
    .earnings-features li {
        font-size: 0.9rem;
        padding: 0.4rem 0;
    }
    
    /* Products Small Mobile */
    .products-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .product-image {
        height: 180px;
    }
    
    .product-info {
        padding: 0.75rem;
    }
    
    .product-info h3 {
        font-size: 1rem;
    }
    
    .product-stats {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }
    
    .price {
        font-size: 1.1rem;
    }
    
    .commission-earn {
        font-size: 0.85rem;
    }
    
    .share-btn {
        padding: 10px 14px;
        font-size: 13px;
    }
    
    /* Success Stories Small Mobile */
    .story-card {
        padding: 1.25rem;
    }
    
    .story-avatar {
        width: 60px;
        height: 60px;
    }
    
    .story-content h4 {
        font-size: 1.1rem;
    }
    
    .story-role {
        font-size: 0.85rem;
    }
    
    .story-content p {
        font-size: 0.9rem;
        line-height: 1.5;
    }
    
    .earnings-highlight {
        font-size: 1.3rem;
    }
    
    /* Payment Methods Small Mobile */
    .payment-card {
        padding: 1.25rem;
    }
    
    .payment-card i {
        font-size: 2.5rem;
    }
    
    .payment-card h3 {
        font-size: 1.1rem;
    }
    
    .payment-card p {
        font-size: 0.9rem;
    }
    
    /* CTA Small Mobile */
    .cta-content h2 {
        font-size: 1.8rem;
    }
    
    .cta-content p {
        font-size: 1rem;
    }
    
    .cta-stat h3 {
        font-size: 1.5rem;
    }
    
    .cta-stat p {
        font-size: 0.9rem;
    }
    
    /* Footer Small Mobile */
    .footer-content {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .footer-section h3 {
        font-size: 1.3rem;
    }
    
    .footer-section h4 {
        font-size: 1.1rem;
    }
    
    .footer-section p,
    .footer-section ul li a {
        font-size: 0.9rem;
    }
    
    .social-links {
        justify-content: center;
    }
    
    .social-links a {
        width: 35px;
        height: 35px;
        font-size: 0.9rem;
    }
    
    /* Section Headers Small Mobile */
    .section-header h2 {
        font-size: 1.6rem;
    }
    
    .section-header p {
        font-size: 0.9rem;
    }
    
    /* General Mobile Spacing */
    .how-it-works,
    .link-sharing-tool,
    .earnings,
    .trending-products,
    .success-stories,
    .payment-methods,
    .cta-section {
        padding: 50px 0;
    }
}

/* Very Small Screens */
@media (max-width: 320px) {
    .container {
        padding: 0 8px;
    }
    
    .hero-text h1 {
        font-size: 1.6rem;
    }
    
    .hero-text p {
        font-size: 0.9rem;
    }
    
    .logo {
        font-size: 1.2rem;
    }
    
    .section-header h2 {
        font-size: 1.4rem;
    }
    
    .section-header p {
        font-size: 0.85rem;
    }
    
    .btn {
        padding: 10px 16px;
        font-size: 13px;
    }
    
    .btn-small {
        padding: 6px 10px;
        font-size: 12px;
    }
    
    .step-icon {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }
    
    .earnings-icon {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }
    
    .payment-card i {
        font-size: 2rem;
    }
    
    .phone-mockup {
        width: 180px;
        height: 250px;
    }
    
    .tiktok-video,
    .commission-indicator {
        padding: 0.75rem;
    }
    
    .tiktok-video i,
    .money-icon {
        font-size: 1.3rem;
    }
    
    .nav-actions {
        gap: 0.25rem;
    }
    
    .language-switcher {
        margin-right: 0.25rem;
    }
    
    .lang-btn {
        padding: 3px 6px;
        font-size: 0.6rem;
    }
    
    .lang-btn .flag {
        font-size: 0.8rem;
    }
    
    .nav-link {
        font-size: 12px;
    }
    
    .btn-small {
        padding: 6px 8px;
        font-size: 11px;
    }
}

/* High Resolution Screens */
@media (min-width: 1400px) {
    .container {
        max-width: 1400px;
    }
    
    .hero-text h1 {
        font-size: 4rem;
    }
    
    .hero-text p {
        font-size: 1.3rem;
    }
    
    .section-header h2 {
        font-size: 3rem;
    }
    
    .products-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .earnings-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .payment-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Landscape Orientation for Mobile */
@media (max-width: 768px) and (orientation: landscape) {
    .hero {
        padding: 80px 0 40px;
        min-height: auto;
    }
    
    .hero-content {
        grid-template-columns: 1fr 1fr;
        gap: 1.5rem;
    }
    
    .hero-text h1 {
        font-size: 2rem;
    }
    
    .hero-stats {
        flex-direction: row;
        gap: 1rem;
    }
    
    .earnings-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .products-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .payment-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .stories-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Touch Device Specific Optimizations */
@media (hover: none) and (pointer: coarse) {
    /* Larger touch targets */
    .btn {
        min-height: 44px;
        min-width: 44px;
    }
    
    .nav-menu a {
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .copy-btn,
    .share-btn,
    .convert-btn {
        min-height: 44px;
    }
    
    .social-links a {
        min-width: 44px;
        min-height: 44px;
    }
    
    /* Disable hover effects on touch devices */
    .product-card:hover,
    .earnings-card:hover,
    .payment-card:hover,
    .step-card:hover {
        transform: none;
    }
    
    .btn:hover {
        transform: none;
    }
    
    /* Better touch feedback */
    .btn:active,
    .nav-menu a:active,
    .copy-btn:active,
    .share-btn:active {
        transform: scale(0.95);
    }
    
    /* Improved scrolling */
    .nav-menu {
        -webkit-overflow-scrolling: touch;
    }
}

/* Print Styles */
@media print {
    .header,
    .footer,
    .nav-actions,
    .hamburger,
    .share-btn,
    .copy-btn,
    .convert-btn,
    .scroll-top {
        display: none !important;
    }
    
    .hero {
        padding: 20px 0;
    }
    
    .hero-content {
        grid-template-columns: 1fr;
    }
    
    .hero-image {
        display: none;
    }
    
    .how-it-works,
    .link-sharing-tool,
    .earnings,
    .trending-products,
    .success-stories,
    .payment-methods,
    .cta-section {
        padding: 20px 0;
    }
    
    .products-grid,
    .earnings-grid,
    .payment-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .stories-grid {
        grid-template-columns: 1fr;
    }
    
    body {
        font-size: 12px;
        line-height: 1.4;
    }
    
    .btn {
        display: none;
    }
}

/* Accessibility Improvements */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    :root {
        --text-color: #e0e0e0;
        --text-light: #b0b0b0;
        --text-muted: #888;
        --white: #1a1a1a;
        --secondary-color: #2a2a2a;
        --border-color: #404040;
        --shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
        --shadow-hover: 0 5px 20px rgba(0, 0, 0, 0.4);
    }
    
    .header {
        background: var(--white);
        border-bottom: 1px solid var(--border-color);
    }
    
    .earnings-card,
    .product-card,
    .payment-card,
    .story-card,
    .link-converter {
        background: var(--white);
        border: 1px solid var(--border-color);
    }
    
    .link-input,
    .commission-link {
        background: var(--white);
        color: var(--text-color);
        border: 1px solid var(--border-color);
    }
    
    .nav-menu {
        background: var(--white);
    }
}

/* Mobile-specific enhancements */
@media (max-width: 768px) {
    /* Prevent horizontal scroll */
    body {
        overflow-x: hidden;
    }
    
    /* Better mobile typography */
    h1, h2, h3, h4, h5, h6 {
        word-wrap: break-word;
        hyphens: auto;
    }
    
    /* Mobile-friendly form elements */
    input, textarea, select {
        font-size: 16px !important; /* Prevents zoom on iOS */
    }
    
    /* Mobile-friendly buttons */
    .btn {
        touch-action: manipulation;
        -webkit-tap-highlight-color: transparent;
    }
    
    /* Mobile-friendly links */
    a {
        -webkit-tap-highlight-color: transparent;
    }
    
    /* Mobile-friendly scrolling */
    .container {
        -webkit-overflow-scrolling: touch;
    }
    
    /* Mobile-friendly animations */
    .animate-on-scroll {
        transition: all 0.4s ease;
    }
    
    /* Mobile-friendly shadows */
    .product-card,
    .earnings-card,
    .payment-card {
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    }
    
    /* Mobile-friendly spacing */
    .section-header {
        margin-bottom: 2rem;
    }
    
    /* Mobile-friendly grid gaps */
    .products-grid,
    .earnings-grid,
    .payment-grid,
    .stories-grid {
        gap: 1rem;
    }
}