/**
 * Responsive Styles
 * ApniWeb News Website
 */

/* ============================================
   LARGE DEVICES (Desktops, 992px and above)
   ============================================ */
@media (min-width: 992px) {
    .container {
        max-width: 1200px;
    }
}

/* ============================================
   MEDIUM DEVICES (Tablets, 768px to 991px)
   ============================================ */
@media (max-width: 991.98px) {
    .mobile-menu-toggle {
        display: block;
    }
    
    .main-navigation .container {
        flex-direction: column;
    }
    
    .nav-menu {
        display: none;
        flex-direction: column;
        width: 100%;
    }
    
    .nav-menu.active {
        display: flex;
    }
    
    .nav-link {
        padding: 12px 15px;
        border-bottom: 1px solid rgba(255,255,255,0.1);
    }
    
    .nav-search {
        width: 100%;
        padding: 15px;
    }
    
    .search-input {
        width: 100%;
    }
    
    .header-ad {
        display: none;
    }
    
    .featured-main-card {
        min-height: 350px;
    }
    
    .featured-title {
        font-size: 22px;
    }
    
    .sidebar {
        position: static;
        margin-top: 30px;
    }
    
    .article-title {
        font-size: 26px;
    }
    
    .post-navigation {
        flex-direction: column;
    }
    
    .author-box {
        flex-direction: column;
        text-align: center;
    }
}

/* ============================================
   SMALL DEVICES (Phones, 576px to 767px)
   ============================================ */
@media (max-width: 767.98px) {
    body {
        font-size: 15px;
    }
    
    .top-bar {
        display: none;
    }
    
    .main-header {
        padding: 15px 0;
    }
    
    .logo-img {
        max-height: 40px;
    }
    
    .featured-section {
        padding: 15px 0;
    }
    
    .featured-main-card {
        min-height: 280px;
        margin-bottom: 15px;
    }
    
    .featured-overlay {
        padding: 20px;
    }
    
    .featured-title {
        font-size: 18px;
    }
    
    .featured-card {
        height: 150px;
    }
    
    .featured-card-title {
        font-size: 13px;
    }
    
    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .section-title {
        font-size: 18px;
    }
    
    .post-card-body {
        padding: 15px;
    }
    
    .post-card-title {
        font-size: 16px;
    }
    
    .post-card-excerpt {
        display: none;
    }
    
    .article-title {
        font-size: 22px;
    }
    
    .article-excerpt {
        font-size: 16px;
    }
    
    .article-content {
        font-size: 16px;
    }
    
    .article-content h2 {
        font-size: 20px;
    }
    
    .article-content h3 {
        font-size: 18px;
    }
    
    .article-meta {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .meta-stats {
        margin-top: 10px;
    }
    
    .meta-stats span {
        margin-left: 0;
        margin-right: 15px;
    }
    
    .social-share-bar {
        flex-wrap: wrap;
    }
    
    .share-buttons {
        flex-wrap: wrap;
    }
    
    .social-share-bottom .share-buttons-lg {
        flex-direction: column;
    }
    
    .share-btn-lg {
        width: 100%;
        justify-content: center;
    }
    
    .related-posts-section .col-md-4 {
        flex: 0 0 50%;
        max-width: 50%;
    }
    
    .footer-top {
        padding: 30px 0;
    }
    
    .footer-widget {
        margin-bottom: 30px;
    }
    
    .footer-bottom-content {
        flex-direction: column;
        text-align: center;
    }
    
    .back-to-top {
        bottom: 20px;
        right: 20px;
        width: 40px;
        height: 40px;
    }
    
    .ad-container {
        padding: 10px;
    }
    
    .pagination .page-link {
        padding: 8px 12px;
        font-size: 14px;
    }
}

/* ============================================
   EXTRA SMALL DEVICES (Phones, below 576px)
   ============================================ */
@media (max-width: 575.98px) {
    .container {
        padding-left: 15px;
        padding-right: 15px;
    }
    
    .breaking-news-wrapper {
        flex-direction: column;
        gap: 10px;
    }
    
    .breaking-label {
        width: 100%;
        text-align: center;
    }
    
    .featured-main-card {
        min-height: 220px;
    }
    
    .featured-title {
        font-size: 16px;
    }
    
    .category-badge {
        font-size: 10px;
        padding: 3px 10px;
    }
    
    .featured-card {
        height: 120px;
    }
    
    .post-card-title {
        font-size: 15px;
    }
    
    .article-title {
        font-size: 20px;
    }
    
    .single-article {
        padding: 20px 15px;
    }
    
    .article-content {
        font-size: 15px;
        line-height: 1.8;
    }
    
    .related-posts-section .col-md-4 {
        flex: 0 0 100%;
        max-width: 100%;
    }
    
    .comment-item {
        flex-direction: column;
    }
    
    .comment-avatar {
        margin-bottom: 10px;
    }
    
    .sidebar-widget {
        margin-bottom: 20px;
    }
    
    .newsletter-form {
        flex-direction: column;
    }
    
    .newsletter-form button {
        width: 100%;
        margin-top: 10px;
    }
}

/* ============================================
   MOBILE NAVIGATION OVERLAY
   ============================================ */
.mobile-nav-overlay {
    position: fixed;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100vh;
    background: rgba(0,0,0,0.9);
    z-index: 9999;
    transition: left 0.3s ease;
}

.mobile-nav-overlay.active {
    left: 0;
}

.mobile-nav-content {
    width: 280px;
    height: 100%;
    background: #fff;
    padding: 20px;
    overflow-y: auto;
}

.mobile-nav-close {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 40px;
    height: 40px;
    background: #fff;
    border: none;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
}

.mobile-search {
    margin-bottom: 20px;
}

.mobile-search form {
    display: flex;
}

.mobile-search input {
    flex: 1;
    padding: 10px 15px;
    border: 2px solid #e9ecef;
    border-right: none;
    border-radius: 5px 0 0 5px;
}

.mobile-search button {
    padding: 10px 15px;
    background: var(--primary-color);
    border: none;
    color: #fff;
    border-radius: 0 5px 5px 0;
    cursor: pointer;
}

.mobile-nav-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.mobile-nav-menu li {
    border-bottom: 1px solid #e9ecef;
}

.mobile-nav-menu li.divider {
    border: none;
    height: 20px;
}

.mobile-nav-menu a {
    display: block;
    padding: 12px 0;
    color: #333;
    text-decoration: none;
    font-weight: 500;
}

.mobile-nav-menu a:hover {
    color: var(--primary-color);
}

.mobile-nav-menu i {
    margin-right: 10px;
    color: var(--primary-color);
}

/* ============================================
   PRINT STYLES
   ============================================ */
@media print {
    .top-bar,
    .main-header,
    .main-navigation,
    .breaking-news-section,
    .sidebar,
    .social-share-bar,
    .social-share-bottom,
    .author-box,
    .post-navigation,
    .related-posts-section,
    .comments-section,
    .main-footer,
    .back-to-top,
    .ad-container {
        display: none !important;
    }
    
    .single-article {
        box-shadow: none;
        padding: 0;
    }
    
    .article-content {
        font-size: 12pt;
        line-height: 1.6;
    }
    
    a {
        text-decoration: none;
        color: #000;
    }
    
    .article-content a::after {
        content: " (" attr(href) ")";
        font-size: 10pt;
        color: #666;
    }
}