/* PAZA Public Website - Responsive Styles */

/* Extra Small Devices (phones, less than 576px) */
@media (max-width: 575.98px) {
    .container {
        padding-left: var(--space-4);
        padding-right: var(--space-4);
    }
    
    .section {
        padding: var(--space-8) 0;
    }
    
    .section-lg {
        padding: var(--space-12) 0;
    }
    
    h1 {
        font-size: var(--text-2xl);
    }
    
    h2 {
        font-size: var(--text-xl);
    }
    
    .btn-lg {
        padding: var(--space-3) var(--space-6);
        font-size: var(--text-base);
    }
    
    .featured-grid,
    .category-grid {
        grid-template-columns: 1fr;
        gap: var(--space-4);
    }
    
    .featured-image {
        height: 200px;
    }
    
    .category-article-image {
        height: 150px;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
        gap: var(--space-6);
    }
    
    .newsletter-form {
        flex-direction: column;
    }
    
    .newsletter-button {
        width: 100%;
    }
}

/* Small Devices (phones, 576px and up) */
@media (min-width: 576px) and (max-width: 767.98px) {
    .container {
        padding-left: var(--space-4);
        padding-right: var(--space-4);
    }
    
    .featured-grid {
        grid-template-columns: 1fr;
    }
    
    .category-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Medium Devices (tablets, 768px and up) */
@media (min-width: 768px) and (max-width: 991.98px) {
    .container {
        padding-left: var(--space-6);
        padding-right: var(--space-6);
    }
    
    .featured-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .featured-article-large {
        grid-column: span 2;
    }
    
    .category-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .footer-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .main-layout {
        grid-template-columns: 1fr;
    }
    
    .sidebar {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-6);
        margin-top: var(--space-8);
    }
    
    .sidebar-section {
        margin-bottom: 0;
    }
}

/* Large Devices (desktops, 992px and up) */
@media (min-width: 992px) and (max-width: 1199.98px) {
    .featured-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .category-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .footer-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Extra Large Devices (large desktops, 1200px and up) */
@media (min-width: 1200px) {
    /* Everything should already be optimized for large screens */
}

/* Print Styles */
@media print {
    .header,
    .nav-main,
    .category-nav,
    .sidebar,
    .newsletter-section,
    .footer,
    .back-to-top,
    .no-print {
        display: none !important;
    }
    
    .container {
        max-width: 100%;
        padding: 0;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.5;
        color: #000;
    }
    
    a {
        color: #000;
        text-decoration: underline;
    }
    
    .featured-article,
    .category-article {
        break-inside: avoid;
        margin-bottom: 20pt;
    }
    
    .hero-section {
        background: none !important;
        color: #000 !important;
        padding: 0 !important;
    }
    
    .hero-title {
        color: #000 !important;
        font-size: 16pt !important;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    :root {
        --primary-red: #b30000;
        --dark-red: #800000;
    }
    
    .header {
        border-bottom: 3px solid var(--black);
    }
    
    .nav-link.active {
        border: 2px solid var(--white);
    }
    
    .btn-primary {
        border: 2px solid var(--black);
    }
}

/* 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;
    }
    
    .featured-article:hover,
    .category-article:hover,
    .video-item:hover,
    .btn:hover {
        transform: none !important;
    }
    
    .ticker-content {
        animation: none !important;
    }
    
    .live-badge,
    .live-now-badge,
    .hero-badge {
        animation: none !important;
    }
}

/* Dark Mode */
@media (prefers-color-scheme: dark) {
    :root {
        --white: #1a1a1a;
        --black: #ffffff;
        --gray-50: #2d2d2d;
        --gray-100: #3d3d3d;
        --gray-200: #4d4d4d;
        --gray-300: #5d5d5d;
        --gray-400: #6d6d6d;
        --gray-500: #7d7d7d;
        --gray-600: #8d8d8d;
        --gray-700: #9d9d9d;
        --gray-800: #adadad;
        --gray-900: #ffffff;
    }
    
    body {
        background-color: #121212;
        color: var(--gray-800);
    }
    
    .header {
        background-color: var(--gray-50);
    }
    
    .header-top {
        background-color: var(--gray-900);
    }
    
    .nav-main {
        background-color: var(--gray-800);
    }
    
    .featured-article,
    .category-article,
    .trending-articles,
    .video-item {
        background-color: var(--gray-50);
    }
    
    .category-sections {
        background-color: var(--gray-100);
    }
    
    .search-input {
        background-color: var(--gray-100);
        border-color: var(--gray-300);
        color: var(--gray-800);
    }
    
    input, textarea, select {
        background-color: var(--gray-100);
        border-color: var(--gray-300);
        color: var(--gray-800);
    }
    
    .footer {
        background-color: var(--gray-900);
    }
}

/* Touch Device Optimizations */
@media (hover: none) and (pointer: coarse) {
    .nav-link,
    .category-link,
    .footer-link,
    .tag,
    .social-link {
        padding: var(--space-3) var(--space-4);
    }
    
    .btn {
        padding: var(--space-4) var(--space-6);
        min-height: 48px;
    }
    
    .featured-article:hover,
    .category-article:hover,
    .video-item:hover {
        transform: none;
    }
    
    .search-button,
    .menu-toggle,
    .nav-mobile-close {
        min-width: 44px;
        min-height: 44px;
    }
}

/* Landscape Orientation */
@media (orientation: landscape) and (max-height: 500px) {
    .hero-section {
        padding: var(--space-8) 0;
    }
    
    .hero-title {
        font-size: var(--text-2xl);
    }
    
    .hero-description {
        font-size: var(--text-base);
    }
    
    .featured-image {
        height: 200px;
    }
    
    .category-article-image {
        height: 120px;
    }
}

/* Very Large Screens */
@media (min-width: 1920px) {
    .container {
        max-width: var(--container-2xl);
    }
    
    .hero-title {
        font-size: var(--text-6xl);
    }
    
    .featured-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .category-grid {
        grid-template-columns: repeat(6, 1fr);
    }
}
