/* ============================================
   RESPONSIVE HEADER & TOP BAR
   ============================================ */

/* Responsive header adjustments */
@media (max-width: 640px) {
    /* Extra small screens - phones */
    header .container {
        padding-left: 0.5rem;
        padding-right: 0.5rem;
    }
    
    header .logo h1 {
        font-size: 1rem !important;
        line-height: 1.2;
    }
    
    header .logo p {
        font-size: 0.625rem !important;
        line-height: 1.2;
    }
}

@media (min-width: 641px) and (max-width: 768px) {
    /* Small screens - tablets */
    header .logo h1 {
        font-size: 1.25rem !important;
    }
    
    header .logo p {
        font-size: 0.75rem !important;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    /* Medium screens - tablets landscape */
    header .logo h1 {
        font-size: 1.5rem !important;
    }
    
    header .logo p {
        font-size: 0.875rem !important;
    }
}

/* Top bar responsive adjustments */
@media (max-width: 640px) {
    .bg-gray-900 {
        padding-top: 0.375rem;
        padding-bottom: 0.375rem;
    }
}

/* Ensure the mobile menu button is always clickable and above overlays */
#mobile-menu-btn {
    position: relative;
    z-index: 1000;
    cursor: pointer;
}

/* Standards-compliant text size adjust for better compatibility */
html {
    text-size-adjust: 100%;
}

/* ============================================
   IMAGE CAPTIONS WITH SOURCE ATTRIBUTION
   ============================================ */

/* Figure with image and caption wrapper */
figure.image-with-caption {
    margin: 1.5rem 0;
    padding: 0;
    text-align: center;
    background: #f9fafb;
    border-radius: 0.5rem;
    overflow: hidden;
    transition: all 0.3s ease;
}

figure.image-with-caption:hover {
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
    background: #ffffff;
}

/* Image inside figure */
figure.image-with-caption img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0;
    border-radius: 0 0 0 0;
    padding: 0;
}

/* Caption styling - Caption OVERLAID on image */
figure.image-with-caption {
    position: relative;
    display: inline-block;
    margin: 1.5rem 0;
    width: 100%;
}

figure.image-with-caption figcaption.image-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
    color: #ffffff;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(4px);
    font-style: italic;
    word-break: break-word;
    line-height: 1.4;
    z-index: 10;
}

figure.image-with-caption:hover figcaption.image-caption {
    background: rgba(37, 99, 235, 0.85);
}

/* Mobile responsive adjustments */
@media (max-width: 768px) {
    figure.image-with-caption {
        margin: 1rem 0;
    }
    
    figure.image-with-caption figcaption.image-caption {
        padding: 0.5rem 0.75rem;
        font-size: 0.8125rem;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    figure.image-with-caption figcaption.image-caption {
        color: #ffffff;
        background: rgba(0, 0, 0, 0.85);
    }
    
    figure.image-with-caption:hover figcaption.image-caption {
        background: rgba(59, 130, 246, 0.9);
        color: #ffffff;
    }
}

/* Alternative compact caption style (optional) */
.image-with-caption-compact figcaption.image-caption {
    padding: 0.4rem 0.75rem;
    font-size: 0.75rem;
}

/* Caption for featured images (larger) - OVERLAID ON IMAGE */
.featured-image-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1rem 1.25rem;
    font-size: 0.9rem;
    color: #ffffff;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(6px);
    font-style: italic;
    z-index: 10;
}

.featured-image-caption:hover {
    background: rgba(37, 99, 235, 0.85);
}

/* ============================================
   BREAKING NEWS TICKER - WORKING SCROLL
   ============================================ */
.breaking-news-scroll-container {
    flex: 1;
    overflow: hidden;
    position: relative;
    min-width: 0;
}

.breaking-news-scroll {
    display: inline-block;
    white-space: nowrap;
    animation: breaking-news-move 50s linear infinite;
    will-change: transform;
}

.breaking-news-scroll-container:hover .breaking-news-scroll {
    animation-play-state: paused !important;
}

@keyframes breaking-news-move {
    from {
        transform: translateX(0);
    }
    to {
        transform: translateX(-50%);
    }
}

