/**
 * Responsive CSS
 */

/* Large Desktop */
@media (max-width: 1400px) {
    .container {
        max-width: 1200px;
        padding: 0 20px;
    }
}

/* Desktop */
@media (max-width: 1200px) {
    .container {
        max-width: 992px;
    }
    
    .three-column-grid {
        gap: 20px;
    }
    
    .five-row-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Tablet Landscape */
@media (max-width: 992px) {
    .container {
        max-width: 768px;
    }
    
    .three-column-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .column-center {
        order: -1;
    }
    
    .three-equal-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .five-row-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .archive-gallery {
        max-width: 95% !important;
    }
    
    .single-layout {
        max-width: 90% !important;
    }
    
    /* Mobile Menu */
    .main-navigation {
        position: fixed;
        top: 0;
        left: -100%;
        width: 80%;
        max-width: 300px;
        height: 100vh;
        background: var(--nip-secondary, #1a1a2e);
        z-index: 9999;
        transition: left 0.3s ease;
        overflow-y: auto;
        padding: 60px 20px 20px;
    }
    
    .main-navigation.active {
        left: 0;
    }
    
    .main-navigation .primary-menu {
        flex-direction: column;
        gap: 0;
    }
    
    .main-navigation .primary-menu li {
        border-bottom: 1px solid rgba(255,255,255,0.1);
    }
    
    .main-navigation .primary-menu a {
        display: block;
        padding: 15px 0;
        color: #fff;
    }
    
    .mobile-menu-toggle {
        display: flex;
    }
    
    .header-search {
        position: static;
    }
    
    .search-form-wrapper {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: #fff;
        padding: 15px;
    }
}

/* Tablet Portrait */
@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }
    
    /* Top Bar */
    .top-bar {
        padding: 8px 0;
    }
    
    .top-bar .container {
        flex-direction: column;
        gap: 8px;
    }
    
    /* Breaking News */
    .breaking-news-inner {
        flex-direction: column;
        gap: 10px;
    }
    
    .breaking-label {
        width: 100%;
        text-align: center;
    }
    
    /* Three Equal - Stack on Mobile */
    .three-equal-grid {
        grid-template-columns: 1fr;
    }
    
    .widget-three-equal .equal-post {
        display: flex;
        flex-direction: column;
    }
    
    .widget-three-equal .post-thumb {
        width: 100%;
        height: 200px;
    }
    
    /* Grid Posts */
    .grid-posts-wrapper {
        grid-template-columns: 1fr;
    }
    
    .grid-post {
        height: 250px;
    }
    
    /* Five Row - Stack */
    .five-row-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    /* Archive Gallery */
    .archive-gallery {
        max-width: 100% !important;
        grid-template-columns: repeat(2, 1fr);
    }
    
    .gallery-item {
        height: 200px;
    }
    
    .gallery-large {
        grid-column: span 2;
        height: 280px;
    }
    
    /* Single Post */
    .single-layout {
        max-width: 100% !important;
    }
    
    .entry-meta {
        flex-wrap: wrap;
        gap: 10px;
    }
    
    .post-navigation .nav-links {
        flex-direction: column;
        gap: 15px;
    }
    
    .related-grid {
        grid-template-columns: 1fr;
    }
    
    /* Footer */
    .footer-widgets-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    
    .footer-site-name {
        font-size: 32px !important;
    }
    
    .footer-menu-list {
        flex-wrap: wrap;
        justify-content: center;
        gap: 10px 20px;
    }
}

/* Mobile */
@media (max-width: 576px) {
    /* Three Column - Image Display on Mobile */
    .widget-three-column .post-item {
        display: flex;
        flex-direction: column;
    }
    
    /* Always show image on mobile even if hidden on desktop */
    .widget-three-column .post-item .post-thumb {
        display: block !important;
        width: 100%;
        height: 180px;
        margin-bottom: 10px;
    }
    
    .widget-three-column .post-item .post-thumb img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }
    
    .widget-three-column .post-item .post-content {
        width: 100%;
    }
    
    .widget-three-column .post-item.no-image .post-thumb {
        display: block !important;
    }
    
    /* Five Row - Single Column */
    .five-row-grid {
        grid-template-columns: 1fr;
    }
    
    .five-row-post {
        display: flex;
        flex-direction: column;
    }
    
    .five-row-post .post-thumb {
        width: 100%;
        height: 200px;
    }
    
    .five-row-post .post-thumb img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }
    
    /* Archive Gallery */
    .archive-gallery {
        grid-template-columns: 1fr;
    }
    
    .gallery-item,
    .gallery-large,
    .gallery-medium,
    .gallery-small {
        grid-column: span 1;
        height: 250px;
    }
    
    /* Footer */
    .footer-widgets-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-bottom-inner {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }
    
    /* Center Bottom Posts */
    .center-bottom-posts {
        grid-template-columns: 1fr;
    }
    
    .center-bottom-posts.count-2,
    .center-bottom-posts.count-4 {
        grid-template-columns: 1fr;
    }
    
    /* Comments */
    .comment-form input,
    .comment-form textarea {
        width: 100%;
    }
    
    /* Share Buttons */
    .share-buttons {
        flex-direction: column;
        gap: 10px;
    }
}

/* Very Small Screens */
@media (max-width: 375px) {
    .header-inner {
        padding: 10px 0;
    }
    
    .site-title {
        font-size: 20px;
    }
    
    .footer-site-name {
        font-size: 24px !important;
    }
    
    .widget-title,
    .section-title {
        font-size: 18px;
    }
}

/* Desktop - Hide Image When Disabled */
@media (min-width: 993px) {
    .widget-three-column .post-item.no-image .post-thumb {
        display: none;
    }
    
    .widget-three-column .post-item.no-image {
        flex-direction: row;
    }
    
    .widget-three-column .post-item.no-image .post-content {
        width: 100%;
    }
}
