/* ============================================
   PulseWire News - Responsive Stylesheet
   ============================================ */

/* ============================================
   Large Desktop (1400px and up)
   ============================================ */

@media (min-width: 1400px) {
    .container {
        max-width: 1320px;
    }
    
    .hero-image {
        height: 600px;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .gallery-grid {
        grid-template-rows: repeat(2, 250px);
    }
}

/* ============================================
   Desktop (992px to 1399px)
   ============================================ */

@media (max-width: 1199px) {
    .hero-title {
        font-size: 1.75rem;
    }
    
    .hero-excerpt {
        font-size: 0.95rem;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
    
    .newsletter-title {
        font-size: 1.75rem;
    }
    
    .team-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ============================================
   Laptop (992px to 1199px)
   ============================================ */

@media (max-width: 1199px) and (min-width: 992px) {
    .navbar-nav {
        gap: 0.1rem;
    }
    
    .nav-link {
        padding: 0.5rem 0.4rem !important;
        font-size: 0.8rem;
    }
    
    .logo-text h1 {
        font-size: 1.5rem;
    }
    
    .logo-icon {
        width: 42px;
        height: 42px;
        font-size: 1.25rem;
    }
    
    .hero-image {
        height: 450px;
    }
    
    .top-stories {
        padding: 1.25rem;
    }
}

/* ============================================
   Tablet Landscape (768px to 991px)
   ============================================ */

@media (max-width: 991px) {
    /* Header */
    .top-bar {
        text-align: center;
    }
    
    .top-bar .row {
        justify-content: center;
    }
    
    .top-bar-left,
    .top-bar-right {
        justify-content: center;
        margin-bottom: 0.5rem;
    }
    
    .top-bar-left {
        margin-bottom: 0;
    }
    
    .navbar-wrapper {
        flex-wrap: wrap;
    }
    
    .navbar-toggler {
        order: 3;
    }
    
    .navbar-collapse {
        order: 4;
        width: 100%;
    }
    
    .navbar-actions {
        justify-content: center;
        margin-top: 1rem;
    }
    
    /* Hero Section */
    .hero-section .row {
        flex-direction: column;
    }
    
    .hero-section .col-lg-8,
    .hero-section .col-lg-4 {
        width: 100%;
    }
    
    .top-stories {
        margin-top: 2rem;
    }
    
    .hero-image {
        height: 400px;
    }
    
    .hero-title {
        font-size: 1.5rem;
    }
    
    /* News Cards */
    .large-card .news-image {
        height: 220px;
    }
    
    .featured-card .news-image {
        height: 200px;
    }
    
    /* Gallery */
    .gallery-grid {
        grid-template-columns: repeat(3, 1fr);
        grid-template-rows: repeat(2, 180px);
    }
    
    .gallery-item.large {
        grid-column: span 2;
        grid-row: span 1;
    }
    
    /* Newsletter */
    .newsletter-section .row {
        flex-direction: column;
    }
    
    .newsletter-section .col-lg-6 {
        width: 100%;
    }
    
    .newsletter-benefits {
        margin-bottom: 2rem;
    }
    
    /* Footer */
    .footer-top .col-lg-2,
    .footer-top .col-lg-4 {
        flex: 0 0 50%;
        max-width: 50%;
    }
    
    /* Components */
    .article-title {
        font-size: 1.75rem;
    }
    
    .mission-grid,
    .team-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .sitemap-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .gallery-masonry {
        column-count: 3;
    }
    
    .lightbox-prev {
        left: 20px;
    }
    
    .lightbox-next {
        right: 20px;
    }
    
    /* Breaking News */
    .breaking-news-wrapper {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .breaking-label {
        align-self: flex-start;
    }
    
    .ticker-content {
        animation: ticker-mobile 20s linear infinite;
    }
    
    @keyframes ticker-mobile {
        0% { transform: translateX(0); }
        100% { transform: translateX(-50%); }
    }
}

/* ============================================
   Tablet Portrait (576px to 767px)
   ============================================ */

@media (max-width: 767px) {
    /* Typography */
    html {
        font-size: 15px;
    }
    
    h1 {
        font-size: 1.75rem;
    }
    
    h2 {
        font-size: 1.5rem;
    }
    
    h3 {
        font-size: 1.25rem;
    }
    
    /* Header */
    .logo-container {
        gap: 0.5rem;
    }
    
    .logo-icon {
        width: 40px;
        height: 40px;
        font-size: 1.25rem;
    }
    
    .logo-text h1 {
        font-size: 1.25rem;
    }
    
    .logo-text .tagline {
        display: none;
    }
    
    /* Top bar: single tidy row, no awkward wrapping */
    .top-bar {
        font-size: 0.75rem;
    }
    
    .top-bar .row {
        row-gap: 0.4rem;
    }
    
    .top-bar-left,
    .top-bar-right {
        gap: 0.6rem;
    }
    
    .top-bar .weather-location,
    .top-bar .weather-condition {
        display: none;
    }
    
    .top-bar .btn-sm {
        padding: 0.2rem 0.6rem;
        font-size: 0.75rem;
    }
    
    /* Hero */
    .hero-image {
        height: 350px;
    }
    
    .hero-title {
        font-size: 1.35rem;
    }
    
    .hero-excerpt {
        font-size: 0.9rem;
        display: none;
    }
    
    .hero-meta {
        flex-wrap: wrap;
        gap: 1rem;
    }
    
    .slider-controls {
        bottom: 1rem;
        right: 1rem;
    }
    
    .slider-prev,
    .slider-next {
        width: 35px;
        height: 35px;
        font-size: 1rem;
    }
    
    /* Section Padding */
    .section-padding {
        padding: 3rem 0;
    }
    
    /* News Cards */
    .horizontal-card {
        flex-direction: column;
    }
    
    .horizontal-card .news-image {
        width: 100%;
        height: 180px;
    }
    
    .news-card .news-image {
        height: 200px;
    }
    
    /* Top Stories */
    .top-story-card img {
        width: 80px;
        height: 60px;
    }
    
    /* Gallery */
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        grid-template-rows: auto;
    }
    
    .gallery-item.large {
        grid-column: span 2;
    }
    
    .gallery-item {
        height: 200px;
    }
    
    /* Video */
    .video-thumbnail {
        height: 180px;
    }
    
    /* Newsletter */
    .newsletter-title {
        font-size: 1.5rem;
    }
    
    .newsletter-form {
        padding: 1.5rem;
    }
    
    /* Footer */
    .footer-top .col-lg-2,
    .footer-top .col-lg-4 {
        flex: 0 0 100%;
        max-width: 100%;
    }
    
    .footer-links {
        margin-bottom: 2rem;
    }
    
    .footer-bottom {
        text-align: center;
    }
    
    .footer-bottom .row {
        flex-direction: column;
        gap: 1rem;
    }
    
    .footer-bottom-links {
        justify-content: center;
    }
    
    /* Components */
    .article-title {
        font-size: 1.5rem;
    }
    
    .article-subtitle {
        font-size: 1.1rem;
    }
    
    .article-meta {
        gap: 1rem;
    }
    
    .article-featured-image img {
        max-height: 400px;
    }
    
    .author-bio-header {
        flex-direction: column;
        text-align: center;
    }
    
    .mission-grid,
    .team-grid,
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .stat-number {
        font-size: 2.5rem;
    }
    
    .sitemap-grid {
        grid-template-columns: 1fr;
    }
    
    .gallery-masonry {
        column-count: 2;
    }
    
    .contact-info-card {
        text-align: center;
    }
    
    .contact-info-icon {
        margin: 0 auto 1.5rem;
    }
    
    .timeline-item {
        padding-left: 1.5rem;
    }
    
    .live-timeline::before {
        left: -1.5rem;
    }
    
    .timeline-item::before {
        left: -1.5rem;
        transform: translateX(-4px);
    }
    
    .timeline-item.pinned::before {
        transform: translateX(-6px);
    }
    
    /* Search Overlay */
    .search-container {
        padding: 1.5rem;
    }
    
    .search-input {
        font-size: 1rem;
        padding: 0.875rem 1rem;
    }
    
    .search-btn {
        padding: 0.875rem 1.5rem;
    }
    
    /* Back to Top */
    .back-to-top {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
    }
    
    /* Breaking News */
    .ticker-content a {
        font-size: 0.85rem;
    }
    
    /* Pagination */
    .pagination {
        flex-wrap: wrap;
        justify-content: center;
    }
}

/* ============================================
   Mobile (575px and below)
   ============================================ */

@media (max-width: 575px) {
    /* Typography */
    html {
        font-size: 14px;
    }
    
    /* Header — keep everything on one compact row */
    .top-bar-left,
    .top-bar-right {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.5rem;
    }
    
    .top-bar .current-date {
        font-size: 0.7rem;
    }
    
    /* Trim the least-critical items on the smallest screens */
    .top-bar .social-icons a:nth-child(n + 4) {
        display: none;
    }
    
    .top-bar .language-selector {
        display: none;
    }
    
    /* Hero */
    .hero-image {
        height: 280px;
    }
    
    .hero-title {
        font-size: 1.2rem;
    }
    
    .hero-content {
        padding: 1.5rem;
    }
    
    .category-badge {
        font-size: 0.65rem;
        padding: 0.2rem 0.5rem;
    }
    
    .hero-meta {
        font-size: 0.75rem;
        gap: 0.75rem;
    }
    
    /* Section Title */
    .section-title {
        font-size: 1.35rem;
    }
    
    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    /* News Cards */
    .news-card .news-image {
        height: 180px;
    }
    
    .news-content {
        padding: 1.25rem;
    }
    
    .news-title {
        font-size: 1rem;
    }
    
    .large-card .news-image {
        height: 200px;
    }
    
    .featured-card .news-image {
        height: 180px;
    }
    
    /* Top Stories */
    .top-stories {
        padding: 1.25rem;
    }
    
    .top-story-card {
        gap: 0.75rem;
    }
    
    .top-story-card img {
        width: 70px;
        height: 50px;
    }
    
    .top-story-content h4 {
        font-size: 0.85rem;
    }
    
    /* Trending */
    .trending-section .col-lg-8,
    .trending-section .col-lg-4 {
        width: 100%;
    }
    
    .sidebar-widget {
        margin-top: 2rem;
    }
    
    /* Gallery */
    .gallery-grid {
        grid-template-columns: 1fr;
    }
    
    .gallery-item.large {
        grid-column: span 1;
    }
    
    .gallery-item {
        height: 200px;
    }
    
    .gallery-masonry {
        column-count: 1;
    }
    
    /* Video */
    .video-thumbnail {
        height: 200px;
    }
    
    .play-button {
        width: 50px;
        height: 50px;
        font-size: 1.25rem;
    }
    
    /* Newsletter */
    .newsletter-section {
        padding: 3rem 0;
    }
    
    .newsletter-title {
        font-size: 1.35rem;
    }
    
    .newsletter-text {
        font-size: 0.95rem;
    }
    
    .newsletter-benefits {
        grid-template-columns: 1fr;
    }
    
    .newsletter-form {
        padding: 1.25rem;
    }
    
    /* Advertisement */
    .ad-placeholder {
        width: 100%;
        max-width: 320px;
        height: 100px;
    }
    
    /* Footer */
    .footer-about {
        text-align: center;
        margin-bottom: 2rem;
    }
    
    .footer-social {
        justify-content: center;
    }
    
    .footer-links h4::after {
        left: 50%;
        transform: translateX(-50%);
    }
    
    .footer-nav {
        text-align: center;
    }
    
    /* Components */
    .article-header {
        padding: 2rem 0;
    }
    
    .article-title {
        font-size: 1.35rem;
    }
    
    .article-subtitle {
        font-size: 1rem;
    }
    
    .article-meta {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .article-share {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .share-buttons {
        width: 100%;
        justify-content: flex-start;
    }
    
    .article-navigation {
        grid-template-columns: 1fr;
    }
    
    .author-bio-box {
        padding: 1.5rem;
    }
    
    .author-bio-avatar {
        width: 60px;
        height: 60px;
    }
    
    .category-banner {
        padding: 3rem 0;
    }
    
    .category-banner h1 {
        font-size: 2rem;
    }
    
    .category-banner-icon {
        width: 60px;
        height: 60px;
        font-size: 2rem;
    }
    
    .category-filter,
    .video-categories,
    .gallery-filters {
        justify-content: center;
    }
    
    .filter-btn,
    .video-category-btn,
    .gallery-filter-btn {
        font-size: 0.85rem;
        padding: 0.4rem 1rem;
    }
    
    .about-hero h1,
    .contact-hero h1,
    .editorial-hero h1 {
        font-size: 2rem;
    }
    
    .legal-content h1 {
        font-size: 2rem;
    }
    
    .comment-form {
        padding: 1.5rem;
    }
    
    .comment-header {
        flex-direction: column;
        text-align: center;
    }
    
    .lightbox-content {
        max-width: 95%;
    }
    
    .lightbox-nav {
        padding: 0.5rem;
        font-size: 1.25rem;
    }
    
    .lightbox-prev {
        left: 5px;
    }
    
    .lightbox-next {
        right: 5px;
    }
    
    .close-search {
        top: 1rem;
        right: 1rem;
        font-size: 1.5rem;
    }
    
    .suggestion-tags {
        justify-content: center;
    }
    
    /* Breaking News */
    .breaking-news-bar {
        padding: 0.5rem 0;
    }
    
    .breaking-label {
        font-size: 0.65rem;
        padding: 0.2rem 0.5rem;
    }
    
    .ticker-content a {
        font-size: 0.75rem;
    }
    
    /* Pagination */
    .page-link {
        padding: 0.4rem 0.75rem;
        font-size: 0.85rem;
    }
    
    /* Most Read */
    .most-read-item {
        gap: 0.75rem;
    }
    
    .read-number {
        width: 30px;
        height: 30px;
        font-size: 0.85rem;
    }
    
    .read-content h5 {
        font-size: 0.85rem;
    }
}

/* ============================================
   Extra Small Mobile (375px and below)
   ============================================ */

@media (max-width: 375px) {
    html {
        font-size: 13px;
    }
    
    .logo-text h1 {
        font-size: 1.1rem;
    }
    
    .hero-image {
        height: 240px;
    }
    
    .hero-title {
        font-size: 1.1rem;
    }
    
    .section-title {
        font-size: 1.25rem;
    }
    
    .news-card .news-image {
        height: 160px;
    }
    
    .top-story-card img {
        width: 60px;
        height: 45px;
    }
    
    .gallery-item {
        height: 180px;
    }
    
    .video-thumbnail {
        height: 180px;
    }
    
    .back-to-top {
        width: 40px;
        height: 40px;
        bottom: 15px;
        right: 15px;
    }
}

/* ============================================
   Print Styles
   ============================================ */

@media print {
    * {
        background: transparent !important;
        color: #000 !important;
        box-shadow: none !important;
        text-shadow: none !important;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.5;
    }
    
    a {
        text-decoration: underline;
    }
    
    a[href]::after {
        content: " (" attr(href) ")";
        font-size: 0.8em;
    }
    
    img {
        max-width: 100% !important;
    }
    
    .site-header,
    .site-footer,
    .breaking-news-bar,
    .back-to-top,
    .search-overlay,
    .newsletter-section,
    .advertisement-section,
    .sidebar-widget,
    .comments-section,
    .article-share,
    .article-navigation {
        display: none !important;
    }
    
    .article-content {
        max-width: 100%;
    }
    
    .article-title {
        font-size: 24pt;
    }
    
    .article-subtitle {
        font-size: 14pt;
    }
    
    .page-break {
        page-break-before: always;
    }
    
    .no-print {
        display: none !important;
    }
}

/* ============================================
   High Contrast Mode
   ============================================ */

@media (prefers-contrast: high) {
    :root {
        --primary-color: #C00020;
        --secondary-color: #000080;
        --accent-color: #FFA500;
    }
    
    .news-card,
    .video-card,
    .sidebar-widget {
        border: 2px solid var(--gray-400);
    }
    
    .btn-primary {
        border: 2px solid var(--primary-color);
    }
    
    a {
        text-decoration: underline;
    }
}

/* ============================================
   Landscape Orientation (Mobile)
   ============================================ */

@media (max-height: 500px) and (orientation: landscape) {
    .hero-image {
        height: 250px;
    }
    
    .section-padding {
        padding: 2rem 0;
    }
    
    .top-bar {
        display: none;
    }
    
    .main-navbar {
        padding: 0.5rem 0;
    }
}
