/* Responsive Design */
@media (max-width: 1200px) {
    .container {
        max-width: 100%;
        padding: 0 15px;
    }
    
    .content-wrapper {
        gap: 30px;
    }
    
    .sidebar-right {
        width: 300px;
    }
}

@media (max-width: 992px) {
    .content-wrapper {
        flex-direction: column;
    }
    
    .sidebar-right {
        width: 100%;
    }
    
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 30px;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .timeline::before {
        left: 30px;
    }
    
    .timeline-item {
        width: 100%;
        left: 0 !important;
        text-align: left !important;
        padding: 20px 20px 20px 80px !important;
    }
    
    .timeline-item .timeline-date {
        left: 0 !important;
        right: auto !important;
    }
    
    .header-main-content {
        flex-wrap: wrap;
    }
    
    .header-ad {
        order: 3;
        width: 100%;
        margin: 20px 0 0;
    }
    
    .cookie-content {
        flex-direction: column;
        text-align: center;
    }
    
    .cookie-buttons {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .news-grid {
        grid-template-columns: 1fr;
    }
    
    .featured-news {
        grid-template-columns: 1fr;
    }
    
    .nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--darker-bg);
        flex-direction: column;
        border-top: 1px solid var(--border-color);
        max-height: 80vh;
        overflow-y: auto;
        z-index: 1000;
    }
    
    .nav-menu.active {
        display: flex;
    }
    
    .nav-menu > li {
        width: 100%;
        border-bottom: 1px solid var(--border-color);
    }
    
    .nav-menu > li:last-child {
        border-bottom: none;
    }
    
    .nav-menu > li > a {
        padding: 15px;
    }
    
    .dropdown-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        border: none;
        border-top: none;
        background: rgba(0, 0, 0, 0.2);
    }
    
    .dropdown-menu li {
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    .social-buttons {
        grid-template-columns: 1fr;
    }
    
    .hero-image {
        height: 300px;
    }
    
    .hero-title {
        font-size: 1.8rem;
    }
    
    .hero-description {
        font-size: 0.95rem;
    }
    
    h1 {
        font-size: 2rem;
    }
    
    h2 {
        font-size: 1.7rem;
    }
    
    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .view-all {
        align-self: flex-end;
    }
    
    .header-top-content {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
    
    .breaking-news {
        flex-direction: column;
        width: 100%;
    }
    
    .breaking-label {
        width: 100%;
    }
    
    marquee {
        width: 100%;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
    }
    
    .timeline-item {
        padding-left: 60px !important;
    }
}

@media (max-width: 576px) {
    .container {
        padding: 0 10px;
    }
    
    .hero-image {
        height: 250px;
    }
    
    .hero-overlay {
        padding: 20px;
    }
    
    .hero-title {
        font-size: 1.5rem;
    }
    
    .featured-item,
    .news-card,
    .feature-card,
    .sidebar-widget {
        padding: 15px;
    }
    
    .news-content {
        padding: 20px;
    }
    
    .news-meta {
        flex-direction: column;
        gap: 10px;
    }
    
    .cookie-buttons {
        flex-direction: column;
    }
    
    .cookie-buttons button {
        width: 100%;
    }
    
    .countdown-container {
        flex-wrap: wrap;
    }
    
    .countdown-box {
        flex: 1;
        min-width: 70px;
    }
    
    .logo h1 {
        font-size: 1.8rem;
    }
    
    .tagline {
        font-size: 0.8rem;
    }
    
    .search-bar input {
        padding: 10px 15px;
    }
    
    .back-to-top {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
    }
    
    .comparison-table {
        padding: 10px;
    }
    
    .comparison-table th,
    .comparison-table td {
        padding: 10px;
        font-size: 0.9rem;
    }
}

@media (max-width: 400px) {
    .hero-title {
        font-size: 1.3rem;
    }
    
    .btn-hero {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
    
    .header-actions {
        gap: 10px;
    }
    
    .search-toggle,
    .menu-toggle {
        width: 35px;
        height: 35px;
    }
    
    .ad-container {
        margin: 10px 0;
    }
    
    .section {
        margin: 30px 0;
    }
    
    .faq-question {
        padding: 15px 20px;
        font-size: 1rem;
    }
    
    .timeline-content {
        padding: 15px;
    }
}

/* Print Styles */
@media print {
    .main-header,
    .sidebar-right,
    .footer-middle,
    .back-to-top,
    .cookie-consent,
    .ad-container {
        display: none !important;
    }
    
    body {
        background: white;
        color: black;
    }
    
    .container {
        max-width: 100%;
        padding: 0;
    }
    
    a {
        color: black;
        text-decoration: underline;
    }
    
    .content-wrapper {
        margin: 0;
        gap: 0;
    }
    
    .section {
        margin: 20px 0;
        page-break-inside: avoid;
    }
    
    .news-card {
        break-inside: avoid;
        border: 1px solid #ddd;
        box-shadow: none;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    :root {
        --primary-color: #ff0000;
        --secondary-color: #0000ff;
        --text-color: #000000;
        --background-color: #ffffff;
        --border-color: #000000;
    }
    
    body {
        background: white;
        color: black;
    }
    
    .hero-overlay {
        background: rgba(255, 255, 255, 0.9);
        color: black;
    }
    
    .news-card,
    .feature-card,
    .sidebar-widget {
        border: 2px solid black;
        background: white;
        color: 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;
    }
    
    .hero-image img,
    .news-image img {
        transition: none !important;
    }
    
    .news-card:hover,
    .featured-item:hover,
    .feature-card:hover {
        transform: none !important;
    }
}

/* Dark/Light Mode Support */
@media (prefers-color-scheme: light) {
    :root {
        --dark-bg: #f5f5f5;
        --darker-bg: #e0e0e0;
        --light-bg: #ffffff;
        --text-color: #333333;
        --text-light: #666666;
        --border-color: #dddddd;
    }
    
    body {
        background: linear-gradient(135deg, #f5f5f5 0%, #ffffff 100%);
        color: #333333;
    }
    
    .main-header {
        background: white;
        border-bottom-color: var(--primary-color);
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    }
    
    .news-card,
    .feature-card,
    .sidebar-widget {
        background: white;
        border-color: #eeeeee;
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    }
    
    .news-content h3 a,
    .featured-item h3 a,
    .footer-col h4,
    .sidebar-widget h3 {
        color: #333333;
    }
    
    .news-content p,
    .feature-card p,
    .sidebar-widget p {
        color: #666666;
    }
    
    .main-nav {
        background: white;
        border-top-color: #eeeeee;
    }
    
    .nav-menu > li > a {
        color: #666666;
    }
    
    .dropdown-menu {
        background: white;
        border-color: #eeeeee;
    }
    
    .main-footer {
        background: white;
        border-top-color: var(--primary-color);
    }
    
    .footer-social a {
        background: #f5f5f5;
        color: #333333;
    }
    
    .ad-container {
        background: white;
        border: 1px solid #eeeeee;
    }
}
