/* =============================================
   Responsive Styles
   ============================================= */

/* Large Desktops (1400px and up) */
@media (min-width: 1400px) {
    .container {
        max-width: 1600px;
    }
    
    .hero h1 {
        font-size: 4rem;
    }
    
    .stories-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Desktop (1200px - 1399px) */
@media (max-width: 1399px) {
    .stories-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Tablets and Small Desktops (992px - 1199px) */
@media (max-width: 1199px) {
    nav {
        padding: 1rem;
    }
    
    .nav-menu {
        gap: 1.5rem;
    }
    
    .hero h1 {
        font-size: 3rem;
    }
    
    .hero p {
        font-size: 1.2rem;
    }
    
    .stories-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
}

/* Tablets (768px - 991px) */
@media (max-width: 991px) {
    .nav-menu {
        position: fixed;
        top: 70px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 70px);
        background: var(--navy);
        flex-direction: column;
        padding: 2rem;
        gap: 1rem;
        transition: left 0.3s ease;
        z-index: 999;
        overflow-y: auto;
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    .nav-menu li {
        width: 100%;
    }
    
    .nav-menu a {
        display: block;
        padding: 1rem;
        background: var(--teal);
        border-radius: 8px;
        text-align: center;
    }
    
    .language-selector {
        width: 100%;
        justify-content: center;
        margin-top: 1rem;
    }
    
    .mobile-menu-toggle {
        display: block;
    }
    
    .hero {
        padding: 4rem 2rem;
    }
    
    .hero h1 {
        font-size: 2.5rem;
    }
    
    .hero p {
        font-size: 1.1rem;
    }
    
    .social-links {
        flex-direction: column;
        gap: 1rem;
    }
    
    .social-btn {
        width: 100%;
        justify-content: center;
    }
    
    .stories-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    
    .footer-content {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .newsletter-form {
        flex-direction: column;
    }
    
    .newsletter-form input {
        width: 100%;
    }
}

/* Mobile Devices (576px - 767px) */
@media (max-width: 767px) {
    .hero h1 {
        font-size: 2rem;
    }
    
    .hero p {
        font-size: 1rem;
    }
    
    .stories-grid {
        grid-template-columns: 1fr;
    }
    
    .story-card {
        max-width: 500px;
        margin: 0 auto;
    }
    
    .section-title {
        font-size: 1.8rem;
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
    }
    
    .story-actions {
        flex-wrap: wrap;
    }
    
    .story-actions .btn-primary {
        width: 100%;
    }
    
    .language-channels {
        gap: 1.5rem;
    }
    
    .channel-links {
        flex-direction: column;
    }
}

/* Small Mobile Devices (up to 575px) */
@media (max-width: 575px) {
    .container {
        padding: 0 15px;
    }
    
    nav {
        padding: 0.8rem 1rem;
    }
    
    .logo {
        font-size: 1.2rem;
    }
    
    .hero {
        padding: 3rem 1rem;
    }
    
    .hero h1 {
        font-size: 1.8rem;
    }
    
    .hero p {
        font-size: 0.95rem;
    }
    
    .social-btn {
        padding: 0.8rem 1.5rem;
        font-size: 1rem;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
    
    .featured-stories,
    .newsletter {
        padding: 3rem 1rem;
    }
    
    .story-content h3 {
        font-size: 1.2rem;
    }
    
    .story-content p {
        font-size: 0.9rem;
    }
    
    .story-meta {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .newsletter-content h2 {
        font-size: 1.5rem;
    }
    
    .newsletter-content p {
        font-size: 0.95rem;
    }
    
    footer {
        padding: 2rem 1rem 1rem;
    }
    
    .footer-section h3 {
        font-size: 1.2rem;
    }
    
    .btn {
        font-size: 0.9rem;
        padding: 0.7rem 1.2rem;
    }
    
    .btn-large {
        font-size: 1rem;
        padding: 1rem 2rem;
    }
}

/* Extra Small Devices (up to 375px) */
@media (max-width: 375px) {
    .hero h1 {
        font-size: 1.5rem;
    }
    
    .hero p {
        font-size: 0.9rem;
    }
    
    .logo {
        font-size: 1rem;
    }
    
    .section-title {
        font-size: 1.3rem;
    }
    
    .story-image {
        height: 200px;
    }
    
    .lang-btn {
        padding: 0.5rem 0.8rem;
        font-size: 0.85rem;
    }
}

/* Landscape Mode for Tablets */
@media (max-width: 991px) and (orientation: landscape) {
    .hero {
        padding: 2rem;
    }
    
    .hero h1 {
        font-size: 2rem;
    }
    
    .nav-menu {
        height: calc(100vh - 60px);
    }
}

/* Print Styles */
@media print {
    header,
    footer,
    .social-links,
    .social-btn,
    .newsletter,
    .back-to-top,
    .mobile-menu-toggle,
    .btn {
        display: none !important;
    }
    
    body {
        background: white;
        color: black;
    }
    
    .story-card {
        page-break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ddd;
    }
    
    a {
        color: black;
        text-decoration: underline;
    }
}

/* High DPI Screens (Retina) */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .story-image img {
        image-rendering: -webkit-optimize-contrast;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Dark Mode Support (Optional) */
@media (prefers-color-scheme: dark) {
    /* Uncomment to enable dark mode
    body {
        background: #1a1a1a;
        color: #e0e0e0;
    }
    
    .story-card {
        background: #2a2a2a;
    }
    */
}

/* Touch Device Optimizations */
@media (hover: none) and (pointer: coarse) {
    .btn,
    .social-btn,
    .lang-btn,
    .nav-menu a {
        min-height: 44px;
        min-width: 44px;
    }
    
    .story-card:hover {
        transform: none;
    }
    
    .story-card:active {
        transform: scale(0.98);
    }
}

/* Container Query for Story Cards (Modern Browsers) */
@container (max-width: 400px) {
    .story-content h3 {
        font-size: 1.1rem;
    }
    
    .story-content p {
        font-size: 0.85rem;
    }
}