/* ==================================
   Responsive Design
   ================================== */

/* Tablet (768px and below) */
@media (max-width: 768px) {
    html {
        font-size: 14px;
    }

    .navbar {
        flex-direction: column;
        gap: 1rem;
    }

    .navbar-menu {
        order: 3;
        width: 100%;
        gap: 0;
    }

    .navbar-nav {
        flex-direction: column;
        gap: 0.5rem;
    }

    .search-form {
        order: 2;
        width: 100%;
    }

    .search-input {
        width: 100%;
    }

    h1 { font-size: 1.75rem; }
    h2 { font-size: 1.5rem; }
    h3 { font-size: 1.25rem; }
    h4 { font-size: 1.1rem; }

    .hero {
        padding: 2rem 0;
    }

    .hero-content h1 {
        font-size: 1.75rem;
    }

    .posts-grid {
        grid-template-columns: 1fr;
    }

    .post-container {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .post-title {
        font-size: 1.75rem;
    }

    .post-sidebar {
        grid-column: 1;
        position: static;
    }
}

/* Mobile (480px and below) */
@media (max-width: 480px) {
    html {
        font-size: 13px;
    }

    .container {
        padding: 0 15px;
    }

    h1 { font-size: 1.5rem; }
    h2 { font-size: 1.25rem; }
    h3 { font-size: 1.1rem; }
    h4 { font-size: 1rem; }

    .hero-content p {
        font-size: 1rem;
    }

    .navbar-brand {
        margin-bottom: 1rem;
    }

    .logo span {
        display: none;
    }

    .logo img {
        height: 30px;
    }

    .section-header {
        flex-direction: column;
    }

    .post-meta {
        flex-direction: column;
        gap: 0.5rem;
    }

    .post-meta-top {
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .post-featured {
        margin-left: -15px;
        margin-right: -15px;
        margin-bottom: 1.5rem;
    }

    .featured-image {
        max-height: 300px;
        border-radius: 0;
    }

    .post-content {
        font-size: 1rem;
    }

    .post-share {
        flex-direction: column;
    }

    .share-btn {
        width: 100%;
        text-align: center;
    }

    .footer-content {
        grid-template-columns: 1fr;
    }

    .newsletter-form {
        flex-direction: column;
    }

    .newsletter-form input,
    .newsletter-form button {
        width: 100%;
    }

    .breadcrumb ul {
        flex-direction: column;
        gap: 0;
    }

    .breadcrumb li {
        margin-bottom: 0.5rem;
    }

    .pagination-list {
        flex-wrap: wrap;
    }

    .tag {
        font-size: 0.75rem;
        padding: 0.35rem 0.75rem;
    }

    .post-footer {
        flex-direction: column;
    }

    .post-share {
        margin-top: 1rem;
    }
}

/* Large screens (1400px and above) */
@media (min-width: 1400px) {
    .container {
        max-width: 1400px;
    }
}

/* Print styles */
@media print {
    .header,
    .footer,
    .sidebar,
    .post-share,
    .comments-section {
        display: none;
    }

    .post-single {
        max-width: 100%;
    }

    .post-content {
        color: black;
    }

    a {
        color: black;
    }

    .breadcrumb {
        display: none;
    }
}

/* Accessibility - Reduced motion */
@media (prefers-reduced-motion: reduce) {
    * {
        animation: none !important;
        transition: none !important;
    }

    html {
        scroll-behavior: auto;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    :root {
        --light: #1a1a1a;
        --dark: #e0e0e0;
        --border-color: #333;
    }

    body {
        background-color: #0d0d0d;
        color: var(--dark);
    }

    .post-card,
    .hero,
    .sidebar-widget {
        background-color: #1a1a1a;
    }

    .search-form {
        background-color: #2a2a2a;
    }

    .breadcrumb {
        background-color: #1a1a1a;
        border-color: #333;
    }
}
