/* The Voice - FOR GOEM Responsive Styles */

/* Large Desktop (1400px and up) */
@media (min-width: 1400px) {
    .container {
        max-width: 1400px;
    }
    
    .hero-title {
        font-size: 32px;
    }
    
    .articles-grid {
        grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    }
}

/* Desktop (1200px to 1399px) */
@media (max-width: 1399px) {
    .container {
        max-width: 1200px;
    }
}

/* Laptop (992px to 1199px) */
@media (max-width: 1199px) {
    .container {
        max-width: 992px;
        padding: 0 15px;
    }
    
    .content-wrapper {
        gap: 30px;
    }
    
    .content-sidebar {
        top: 100px;
    }
    
    .hero-main {
        gap: 25px;
    }
    
    .hero-title {
        font-size: 26px;
    }
    
    .articles-grid {
        grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
        gap: 20px;
    }
}

/* Tablet (768px to 991px) */
@media (max-width: 991px) {
    .container {
        max-width: 768px;
    }
    
    .content-wrapper {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .content-sidebar {
        position: static;
        order: 2;
    }
    
    .hero-main {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .hero-image {
        height: 300px;
    }
    
    .hero-title {
        font-size: 24px;
    }
    
    .trending-section {
        order: -1;
    }
    
    .section-title {
        font-size: 20px;
    }
    
    .articles-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    }
    
    .videos-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    }
    
    /* Sidebar adjustments for tablet */
    .sidebar-widget {
        margin-bottom: 25px;
    }
    
    .widget-content {
        padding: 15px;
    }
    
    /* Advanced search visibility fix */
    .search-bar {
        flex-wrap: wrap;
        gap: 10px;
        padding-right: 10px;
    }
    
    .advanced-search-link {
        white-space: nowrap;
        flex-shrink: 0;
    }
}

/* Mobile Large (576px to 767px) */
@media (max-width: 767px) {
    .container {
        padding: 0 15px;
    }
    
    .main-content {
        padding: 15px 0;
    }
    
    .hero-section {
        margin-bottom: 30px;
    }
    
    .hero-image {
        height: 250px;
    }
    
    .hero-overlay {
        padding: 20px;
    }
    
    .hero-title {
        font-size: 20px;
        margin-bottom: 8px;
    }
    
    .hero-excerpt {
        font-size: 14px;
        margin-bottom: 8px;
    }
    
    .hero-meta {
        font-size: 12px;
    }
    
    .trending-article {
        flex-direction: column;
        padding: 15px;
    }
    
    .trending-image {
        width: 100%;
        height: 150px;
    }
    
    .section-header {
        margin-bottom: 20px;
        padding-bottom: 10px;
    }
    
    .section-title {
        font-size: 18px;
    }
    
    .articles-grid {
        grid-template-columns: 1fr;
        gap: 20px;
        margin-bottom: 30px;
    }
    
    .article-card {
        border-radius: 8px;
    }
    
    .article-image {
        height: 200px;
    }
    
    .article-content {
        padding: 15px;
    }
    
    .article-title {
        font-size: 16px;
        line-height: 1.3;
    }
    
    .article-excerpt {
        font-size: 14px;
        margin-bottom: 12px;
    }
    
    .article-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
        font-size: 11px;
    }
    
    .videos-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .video-thumbnail {
        height: 180px;
    }
    
    .video-play-btn {
        width: 50px;
        height: 50px;
        font-size: 16px;
    }
    
    .video-overlay {
        padding: 15px;
    }
    
    .video-title {
        font-size: 14px;
    }
    
    /* Sidebar mobile optimization */
    .sidebar-widget {
        margin-bottom: 20px;
    }
    
    .widget-header {
        padding: 12px 15px;
        font-size: 14px;
    }
    
    .sidebar-article {
        flex-direction: column;
        gap: 10px;
        margin-bottom: 12px;
        padding-bottom: 12px;
    }
    
    .sidebar-article-image {
        width: 100%;
        height: 120px;
    }
    
    .sidebar-article-content h4 {
        font-size: 14px;
    }
    
    .trending-list li {
        padding: 10px 0;
        font-size: 13px;
    }
    
    .trending-number {
        width: 22px;
        height: 22px;
        font-size: 11px;
    }
    
    /* Pagination mobile */
    .pagination-list {
        flex-wrap: wrap;
        justify-content: center;
        gap: 5px;
    }
    
    .pagination-link {
        padding: 8px 12px;
        font-size: 14px;
    }
    
    /* Breadcrumb mobile */
    .breadcrumb {
        font-size: 12px;
        margin-bottom: 15px;
    }
    
    /* Fix advanced search overflow on mobile */
    .search-bar {
        justify-content: flex-start;
        overflow-x: visible;
        padding: 8px 10px;
    }
    
    .search-form {
        flex: 1;
        min-width: 0;
        max-width: calc(100% - 60px);
    }
    
    .advanced-search-link {
        flex-shrink: 0;
        margin-left: 8px;
    }
}

/* Mobile Medium (481px to 575px) */
@media (max-width: 575px) {
    .container {
        padding: 0 12px;
    }
    
    h1 { font-size: 1.8rem; }
    h2 { font-size: 1.5rem; }
    h3 { font-size: 1.3rem; }
    h4 { font-size: 1.1rem; }
    
    .hero-image {
        height: 220px;
    }
    
    .hero-title {
        font-size: 18px;
    }
    
    .hero-excerpt {
        display: none; /* Hide excerpt on very small screens */
    }
    
    .trending-article {
        padding: 12px;
    }
    
    .trending-image {
        height: 120px;
    }
    
    .trending-content h3 {
        font-size: 14px;
    }
    
    .trending-content p {
        font-size: 13px;
    }
    
    .section-title {
        font-size: 16px;
    }
    
    .article-image {
        height: 180px;
    }
    
    .article-content {
        padding: 12px;
    }
    
    .article-title {
        font-size: 15px;
    }
    
    .article-excerpt {
        font-size: 13px;
        line-height: 1.5;
    }
    
    .video-thumbnail {
        height: 160px;
    }
    
    .video-play-btn {
        width: 45px;
        height: 45px;
        font-size: 14px;
    }
    
    .sidebar-article-image {
        height: 100px;
    }
    
    .widget-content {
        padding: 12px;
    }
}

/* Mobile Small (320px to 480px) */
@media (max-width: 480px) {
    body {
        font-size: 14px;
    }
    
    .container {
        padding: 0 10px;
    }
    
    .main-content {
        padding: 10px 0;
    }
    
    h1 { font-size: 1.6rem; }
    h2 { font-size: 1.4rem; }
    h3 { font-size: 1.2rem; }
    h4 { font-size: 1rem; }
    
    .hero-section {
        margin-bottom: 25px;
    }
    
    .hero-image {
        height: 200px;
    }
    
    .hero-overlay {
        padding: 15px;
    }
    
    .hero-title {
        font-size: 16px;
        line-height: 1.2;
    }
    
    .hero-meta {
        font-size: 11px;
    }
    
    .trending-article {
        padding: 10px;
        margin-bottom: 15px;
    }
    
    .trending-image {
        height: 100px;
    }
    
    .trending-content h3 {
        font-size: 13px;
        line-height: 1.3;
    }
    
    .trending-content p {
        font-size: 12px;
        margin-bottom: 5px;
    }
    
    .trending-meta {
        font-size: 11px;
    }
    
    .section-header {
        margin-bottom: 15px;
        padding-bottom: 8px;
    }
    
    .section-title {
        font-size: 14px;
        letter-spacing: 0.5px;
    }
    
    .section-more {
        font-size: 12px;
    }
    
    .articles-grid {
        gap: 15px;
        margin-bottom: 25px;
    }
    
    .article-card {
        border-radius: 6px;
    }
    
    .article-image {
        height: 160px;
    }
    
    .article-content {
        padding: 10px;
    }
    
    .article-category {
        font-size: 10px;
        padding: 3px 8px;
        margin-bottom: 8px;
    }
    
    .article-title {
        font-size: 14px;
        line-height: 1.2;
        margin-bottom: 8px;
    }
    
    .article-excerpt {
        font-size: 12px;
        line-height: 1.4;
        margin-bottom: 10px;
    }
    
    .article-meta {
        padding-top: 10px;
        font-size: 10px;
        gap: 5px;
    }
    
    .videos-grid {
        gap: 15px;
    }
    
    .video-thumbnail {
        height: 140px;
    }
    
    .video-play-btn {
        width: 40px;
        height: 40px;
        font-size: 12px;
    }
    
    .video-overlay {
        padding: 12px;
    }
    
    .video-title {
        font-size: 13px;
        line-height: 1.3;
    }
    
    /* Sidebar ultra-mobile */
    .sidebar-widget {
        margin-bottom: 15px;
        border-radius: 6px;
    }
    
    .widget-header {
        padding: 10px 12px;
        font-size: 13px;
    }
    
    .widget-content {
        padding: 10px;
    }
    
    .sidebar-article {
        margin-bottom: 10px;
        padding-bottom: 10px;
        gap: 8px;
    }
    
    .sidebar-article-image {
        height: 80px;
    }
    
    .sidebar-article-content h4 {
        font-size: 13px;
        line-height: 1.2;
        margin-bottom: 3px;
    }
    
    .sidebar-article-meta {
        font-size: 10px;
    }
    
    .trending-list li {
        padding: 8px 0;
        font-size: 12px;
        gap: 8px;
    }
    
    .trending-number {
        width: 20px;
        height: 20px;
        font-size: 10px;
    }
    
    /* Pagination ultra-mobile */
    .pagination {
        margin: 30px 0;
    }
    
    .pagination-link {
        padding: 6px 10px;
        font-size: 12px;
    }
    
    .pagination-ellipsis {
        padding: 6px 8px;
        font-size: 12px;
    }
    
    /* Breadcrumb ultra-mobile */
    .breadcrumb {
        font-size: 11px;
        margin-bottom: 12px;
    }
    
    .breadcrumb-separator {
        margin: 0 5px;
    }
    
    /* Search bar mobile fix */
    .search-bar {
        flex-wrap: nowrap;
        padding: 6px 8px;
    }
    
    .search-form {
        max-width: calc(100% - 50px);
    }
    
    .search-input {
        font-size: 14px;
        padding: 8px 12px;
    }
    
    .advanced-search-link {
        margin-left: 6px;
        padding: 10px;
    }
}

/* Extra Small Mobile (320px and below) */
@media (max-width: 320px) {
    .container {
        padding: 0 8px;
    }
    
    body {
        font-size: 13px;
    }
    
    .hero-image {
        height: 180px;
    }
    
    .hero-title {
        font-size: 15px;
    }
    
    .trending-image {
        height: 90px;
    }
    
    .article-image {
        height: 140px;
    }
    
    .video-thumbnail {
        height: 120px;
    }
    
    .video-play-btn {
        width: 35px;
        height: 35px;
        font-size: 11px;
    }
    
    .section-title {
        font-size: 13px;
    }
    
    .article-title {
        font-size: 13px;
    }
    
    .sidebar-article-image {
        height: 70px;
    }
}

/* Landscape Orientation Adjustments */
@media (max-width: 767px) and (orientation: landscape) {
    .hero-image {
        height: 180px;
    }
    
    .trending-article {
        flex-direction: row;
    }
    
    .trending-image {
        width: 120px;
        height: 80px;
    }
    
    .video-thumbnail {
        height: 160px;
    }
    
    .sidebar-article {
        flex-direction: row;
    }
    
    .sidebar-article-image {
        width: 80px;
        height: 60px;
    }
}

/* Touch Device Optimizations */
@media (pointer: coarse) {
    /* Increase touch targets */
    .nav-link {
        padding: 12px 0;
    }
    
    .article-card {
        transition: transform 0.2s ease;
    }
    
    .article-card:active {
        transform: translateY(-2px);
    }
    
    .pagination-link {
        min-width: 44px;
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .video-play-btn {
        min-width: 44px;
        min-height: 44px;
    }
    
    .social-link {
        min-width: 44px;
        min-height: 44px;
    }
    
    /* Hover effects only on non-touch devices */
    .article-card:hover {
        transform: none;
    }
    
    .video-card:hover {
        transform: none;
    }
}

/* High DPI/Retina Display Optimizations */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .hero-image,
    .article-image,
    .video-thumbnail,
    .sidebar-article-image {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}

/* Dark Mode Support (if user prefers) */
@media (prefers-color-scheme: dark) {
    /* This is placeholder for future dark mode implementation */
    /* Currently maintaining light theme as per design */
}

/* Reduced Data/Slow Connection Optimizations */
@media (prefers-reduced-data: reduce) {
    .hero-image,
    .article-image,
    .video-thumbnail {
        background-color: #f3f4f6;
    }
    
    /* Reduce image quality on slow connections */
    img {
        image-rendering: optimizeSpeed;
    }
}

/* Print-specific responsive adjustments */
@media print {
    .hero-main,
    .content-wrapper {
        grid-template-columns: 1fr !important;
    }
    
    .trending-section,
    .sidebar-widget {
        display: none !important;
    }
    
    .articles-grid {
        grid-template-columns: 1fr !important;
        gap: 15px !important;
    }
    
    .article-image {
        height: auto !important;
        max-height: 200px !important;
    }
}