/* Mobile First */
@media (max-width: 768px) {
    .container {
        grid-template-columns: 1fr;
        padding: 0 15px;
        gap: 20px;
    }
    
    .nav-container {
        flex-direction: column;
        gap: 1rem;
    }
    
    .nav-menu {
        flex-direction: column;
        gap: 0.5rem;
        width: 100%;
    }
    
    .nav-menu li {
        width: 100%;
    }
    
    .nav-menu a {
        display: block;
        text-align: center;
    }
    
    .content-page {
        padding: 1rem;
    }
    
    .featured-image {
        margin: 1rem 0;
    }
    
    .sidebar {
        position: static;
        margin-top: 2rem;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    /* Admin responsive */
    .admin-container {
        flex-direction: column;
    }
    
    .admin-sidebar {
        width: 100%;
        height: auto;
        position: static;
    }
    
    .admin-main {
        margin-left: 0;
    }
    
    .admin-table {
        overflow-x: auto;
    }
    
    .admin-table table {
        min-width: 600px;
    }
}

/* Tablets */
@media (min-width: 769px) and (max-width: 1024px) {
    .container {
        max-width: 100%;
        padding: 0 20px;
    }
    
    .nav-menu {
        gap: 1rem;
    }
    
    .dashboard-stats {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Desktop */
@media (min-width: 1025px) {
    .container {
        max-width: 1200px;
    }
}

/* Print styles */
@media print {
    .site-header,
    .sidebar,
    .site-footer,
    .admin-sidebar,
    .admin-header,
    .btn {
        display: none !important;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.5;
    }
    
    .container {
        max-width: 100%;
        padding: 0;
    }
    
    .content-page {
        box-shadow: none;
        padding: 0;
    }
    
    a {
        color: black !important;
        text-decoration: none !important;
    }
    
    a[href]:after {
        content: " (" attr(href) ")";
        font-size: 10pt;
    }
}

/* High DPI screens */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    body {
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
    }
}

/* Dark mode */
@media (prefers-color-scheme: dark) {
    :root {
        --primary-color: #1a202c;
        --text-color: #e2e8f0;
        --light-color: #2d3748;
    }
    
    body {
        background-color: #1a202c;
        color: #e2e8f0;
    }
    
    .content-page,
    .recent-articles,
    .admin-table,
    .admin-form {
        background-color: #2d3748;
        color: #e2e8f0;
    }
    
    .form-control {
        background-color: #4a5568;
        border-color: #718096;
        color: #e2e8f0;
    }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}