/* ==========================================================================
   Aayam.world - Premium Tamil News Portal Stylesheet
   Typography, Dark Blue Navbar, Red Breaking Ticker, Accessible Design
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Mukta+Malar:wght@300;400;500;600;700;800&family=Noto+Sans+Tamil:wght@300;400;500;600;700&family=Outfit:wght@400;500;600;700&display=swap');

:root {
    --primary-blue: #0b2239;
    --primary-blue-dark: #071626;
    --primary-blue-light: #13395e;
    --accent-red: #dc2626;
    --accent-red-hover: #b91c1c;
    --accent-gold: #f59e0b;
    --text-main: #1f2937;
    --text-muted: #6b7280;
    --text-light: #f9fafb;
    --bg-light: #f3f4f6;
    --bg-card: #ffffff;
    --border-color: #e5e7eb;
    --font-tamil: 'Mukta Malar', 'Noto Sans Tamil', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-heading: 'Mukta Malar', 'Noto Sans Tamil', sans-serif;
    --font-sans: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

body {
    font-family: var(--font-tamil);
    color: var(--text-main);
    background-color: var(--bg-light);
    line-height: 1.75;
    letter-spacing: 0.01em;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--primary-blue-dark);
    line-height: 1.45;
}

a {
    color: var(--primary-blue);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--accent-red);
}

/* ==========================================================================
   Utility Top Bar (White Theme with Circular Social Icons)
   ========================================================================== */
.top-utility-bar {
    background-color: #ffffff;
    color: #475569;
    font-size: 0.85rem;
    border-bottom: 1px solid #e2e8f0;
    padding: 6px 0;
}

.top-utility-bar a {
    color: #475569;
}

.circle-social-btn {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #ffffff !important;
    font-size: 0.85rem;
    transition: transform 0.2s ease, opacity 0.2s ease;
    text-decoration: none;
}

.circle-social-btn:hover {
    transform: scale(1.1);
    opacity: 0.9;
}

.bg-facebook { background-color: #1877f2; }
.bg-youtube { background-color: #ff0000; }
.bg-twitter { background-color: #000000; }
.bg-whatsapp { background-color: #25d366; }

/* ==========================================================================
   Main Branding Header
   ========================================================================== */
.main-header {
    background: #ffffff;
    border-bottom: 1px solid var(--border-color);
    padding: 6px 0;
}

.brand-logo-wrap {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    max-width: 100%;
}

.brand-logo-img {
    height: 135px;
    max-height: 145px;
    width: auto;
    max-width: 100%;
    object-fit: contain;
    transition: transform 0.25s ease, filter 0.25s ease;
}

.brand-logo-wrap:hover .brand-logo-img {
    transform: scale(1.02);
    filter: drop-shadow(0 6px 18px rgba(11, 34, 57, 0.2));
}

@media (max-width: 991.98px) {
    .brand-logo-img {
        height: 100px;
        max-height: 115px;
    }
}

@media (max-width: 767.98px) {
    .brand-logo-img {
        height: 75px;
        max-height: 85px;
    }
}

.brand-text-block h1 {
    font-size: 1.75rem;
    margin: 0;
    font-weight: 800;
    line-height: 1.1;
    color: var(--primary-blue);
    letter-spacing: -0.5px;
}

.brand-text-block .brand-tagline {
    font-size: 0.85rem;
    color: var(--accent-red);
    font-weight: 600;
    display: block;
    margin-top: 2px;
}

/* ==========================================================================
   Navigation Bar (Dark Navy Background with Red Home Tab)
   ========================================================================== */
.main-navbar {
    background-color: #071a33; /* Dark Navy Blue from Attachment */
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
    position: sticky;
    top: 0;
    z-index: 1020;
    padding: 0;
}

.main-navbar .nav-home-item {
    background-color: #dc2626; /* Solid Bright Red Home Box */
    color: #ffffff !important;
    font-weight: 700;
    padding: 12px 22px;
    font-size: 0.98rem;
    display: inline-flex;
    align-items: center;
    border-radius: 0;
}

.main-navbar .nav-text-item {
    color: #ffffff !important;
    font-size: 0.92rem;
    font-weight: 700;
    padding: 12px 14px;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.main-navbar .nav-text-item:hover,
.main-navbar .nav-text-item.active {
    background-color: rgba(255, 255, 255, 0.1);
    color: #ffffff !important;
}

.main-navbar .dropdown-menu {
    background-color: #ffffff;
    border: none;
    border-radius: 8px;
    box-shadow: var(--shadow-lg);
    padding: 8px 0;
    margin-top: 2px;
    border-top: 3px solid var(--accent-red);
}

.main-navbar .dropdown-item {
    font-size: 0.95rem;
    font-weight: 500;
    padding: 8px 18px;
    color: var(--text-main);
    transition: var(--transition);
}

.main-navbar .dropdown-item:hover {
    background-color: #fee2e2;
    color: var(--accent-red);
    padding-left: 22px;
}

.nav-search-btn {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.12);
    border: none;
    border-radius: 50%;
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.nav-search-btn:hover {
    background: var(--accent-red);
    color: #ffffff;
}

/* ==========================================================================
   Breaking News Ticker Bar (Solid Bright Red matching Attachment)
   ========================================================================== */
.breaking-news-bar {
    background-color: #c6102a; /* Solid Red Bar */
    color: #ffffff;
    display: flex;
    align-items: center;
    min-height: 38px;
    overflow: hidden;
    padding: 2px 0;
}

.breaking-label-block {
    color: #ffffff;
    font-weight: 800;
    padding-right: 14px;
    border-right: 1px solid rgba(255, 255, 255, 0.4);
    display: flex;
    align-items: center;
}

.breaking-ticker-viewport {
    flex: 1;
    overflow: hidden;
    position: relative;
    display: flex;
    align-items: center;
}

.breaking-item {
    display: none;
    width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 0.9rem;
}

.breaking-item.active {
    display: block;
    animation: fadeInSlide 0.4s ease forwards;
}

.breaking-btn-arrow {
    border: none;
    background: transparent;
    color: #ffffff;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 3px;
    cursor: pointer;
    transition: background 0.2s;
}

.breaking-btn-arrow:hover {
    background: rgba(255, 255, 255, 0.2);
}

@keyframes fadeInSlide {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ==========================================================================
   Category Shortcuts (Rounded Pills)
   ========================================================================== */
.category-shortcuts-wrap {
    padding: 12px 0;
    overflow-x: auto;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
}

.shortcut-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background-color: #ffffff;
    border: 1px solid var(--border-color);
    padding: 6px 14px;
    border-radius: 30px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--primary-blue);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    margin-right: 8px;
}

.shortcut-pill i {
    font-size: 1rem;
    color: var(--accent-red);
}

.shortcut-pill:hover {
    background-color: var(--primary-blue);
    color: #ffffff;
    border-color: var(--primary-blue);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.shortcut-pill:hover i {
    color: #ffd166;
}

/* ==========================================================================
   Featured News (3-Column Layout)
   ========================================================================== */
.featured-news-section .row {
    align-items: flex-start;
}

.lead-story-card {
    background: #ffffff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    border: 1px solid #eef2f6;
    transition: var(--transition);
    height: auto;
    display: flex;
    flex-direction: column;
}

.lead-story-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-3px);
}

.lead-image-wrap {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 10;
}

.lead-image-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.lead-story-card:hover .lead-image-wrap img {
    transform: scale(1.05);
}

.category-badge {
    position: absolute;
    top: 14px;
    left: 14px;
    background-color: var(--accent-red);
    color: #ffffff;
    font-size: 0.8rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 4px;
    text-transform: uppercase;
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
    z-index: 2;
}

.lead-body {
    padding: 16px 20px 18px;
    display: flex;
    flex-direction: column;
}

.lead-body h2 {
    font-size: 1.45rem;
    line-height: 1.38;
    margin-bottom: 10px;
}

.lead-body .excerpt {
    color: #4b5563;
    font-size: 0.95rem;
    line-height: 1.55;
    margin-bottom: 14px;
}

.post-meta {
    font-size: 0.82rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.post-meta i {
    color: var(--accent-red);
    margin-right: 4px;
}

/* Supporting Headline Cards */
.supporting-card {
    background: #ffffff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    border: 1px solid #eef2f6;
    transition: var(--transition);
    margin-bottom: 0;
    display: flex;
    height: 100%;
}

.supporting-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.supporting-card .thumb-wrap {
    width: 125px;
    min-width: 125px;
    position: relative;
    overflow: hidden;
}

.supporting-card .thumb-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.supporting-card:hover .thumb-wrap img {
    transform: scale(1.05);
}

.supporting-card .card-body {
    padding: 10px 14px;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.supporting-card h3 {
    font-size: 0.96rem;
    margin: 0 0 5px 0;
    line-height: 1.38;
}

/* ==========================================================================
   Sidebar Widgets
   ========================================================================== */
.widget-box {
    background: #ffffff;
    border-radius: 10px;
    padding: 18px;
    box-shadow: var(--shadow-sm);
    margin-bottom: 24px;
    border: 1px solid var(--border-color);
}

.widget-title {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--primary-blue);
    padding-bottom: 10px;
    margin-bottom: 16px;
    border-bottom: 2px solid var(--primary-blue);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.widget-title::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 50px;
    height: 2px;
    background-color: var(--accent-red);
}

.trending-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.trending-item {
    display: flex;
    gap: 14px;
    padding: 10px 0;
    border-bottom: 1px dashed var(--border-color);
}

.trending-item:last-child {
    border-bottom: none;
}

.trending-rank {
    width: 32px;
    height: 32px;
    min-width: 32px;
    background-color: #f1f5f9;
    color: var(--primary-blue);
    font-family: var(--font-sans);
    font-weight: 700;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    border: 1px solid #cbd5e1;
}

.trending-item:nth-child(1) .trending-rank {
    background-color: var(--accent-red);
    color: #ffffff;
    border-color: var(--accent-red);
}

.trending-item:nth-child(2) .trending-rank {
    background-color: #f59e0b;
    color: #ffffff;
    border-color: #f59e0b;
}

.trending-item:nth-child(3) .trending-rank {
    background-color: var(--primary-blue);
    color: #ffffff;
    border-color: var(--primary-blue);
}

.trending-content h4 {
    font-size: 0.95rem;
    margin: 0 0 4px 0;
    line-height: 1.4;
}

/* ==========================================================================
   Section Headers
   ========================================================================== */
.section-header-wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 8px;
    margin-bottom: 20px;
    border-bottom: 2px solid #e2e8f0;
    position: relative;
}

.section-header-wrap h2 {
    font-size: 1.35rem;
    font-weight: 800;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    position: relative;
}

.section-header-wrap h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 60px;
    height: 3px;
    background-color: var(--accent-red);
}

.section-more-link {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--accent-red);
}

/* ==========================================================================
   Continuous Infinite News Feed
   ========================================================================== */
.infinite-article-card {
    background: #ffffff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    margin-bottom: 20px;
    transition: var(--transition);
    display: flex;
}

.infinite-article-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.infinite-article-card .img-box {
    width: 220px;
    min-width: 220px;
    position: relative;
    overflow: hidden;
}

.infinite-article-card .img-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.infinite-article-card:hover .img-box img {
    transform: scale(1.05);
}

.infinite-article-card .content-box {
    padding: 16px 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.infinite-article-card h3 {
    font-size: 1.15rem;
    margin: 0 0 8px 0;
    line-height: 1.45;
}

.infinite-article-card p {
    color: #4b5563;
    font-size: 0.92rem;
    margin-bottom: 12px;
    flex: 1;
}

#feed-loading-spinner {
    text-align: center;
    padding: 30px;
    display: none;
}

/* ==========================================================================
   Quick Flash News (விரைவுச் செய்திகள்) Popup Modal
   ========================================================================== */
.quick-news-card {
    background: #ffffff;
    border-radius: 8px;
    padding: 14px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    transition: var(--transition);
    cursor: pointer;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.quick-news-card:hover {
    border-color: var(--accent-red);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.quick-news-card .badge-flash {
    background-color: #fef2f2;
    color: var(--accent-red);
    border: 1px solid #fecaca;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 4px;
    display: inline-block;
    margin-bottom: 8px;
}

.quick-news-card h4 {
    font-size: 0.95rem;
    margin: 0;
    line-height: 1.4;
    flex: 1;
}

/* Modal Popup accessible backdrop */
.aayam-modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(7, 22, 38, 0.75);
    backdrop-filter: blur(4px);
    z-index: 1060;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.aayam-modal-dialog {
    background: #ffffff;
    width: 100%;
    max-width: 600px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.3);
    position: relative;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    animation: modalPop 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes modalPop {
    from { opacity: 0; transform: scale(0.92); }
    to { opacity: 1; transform: scale(1); }
}

.modal-header-custom {
    background-color: var(--primary-blue);
    color: #ffffff;
    padding: 14px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-header-custom h3 {
    color: #ffffff;
    font-size: 1.1rem;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.modal-close-btn {
    background: transparent;
    border: none;
    color: #ffffff;
    font-size: 1.5rem;
    cursor: pointer;
    line-height: 1;
    transition: var(--transition);
}

.modal-close-btn:hover {
    color: var(--accent-red);
    transform: rotate(90deg);
}

.modal-body-custom {
    padding: 20px;
    overflow-y: auto;
}

.modal-body-custom img {
    width: 100%;
    height: 240px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 16px;
}

.modal-body-custom .modal-news-title {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 12px;
}

.modal-body-custom .modal-news-summary {
    color: #374151;
    font-size: 1rem;
    line-height: 1.7;
    margin-bottom: 20px;
}

/* ==========================================================================
   Video News Section (Dark Mode Style)
   ========================================================================== */
.video-news-section {
    background-color: #0b1a2d;
    color: #ffffff;
    padding: 35px 0;
    margin: 35px 0;
}

.video-news-section h2,
.video-news-section h3,
.video-news-section h4 {
    color: #ffffff;
}

.video-news-section .section-header-wrap {
    border-bottom-color: rgba(255, 255, 255, 0.1);
}

.video-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    overflow: hidden;
    transition: var(--transition);
    cursor: pointer;
    height: 100%;
}

.video-card:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-3px);
    border-color: var(--accent-red);
}

.video-thumb-wrap {
    position: relative;
    aspect-ratio: 16 / 9;
}

.video-thumb-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.video-play-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 48px;
    height: 48px;
    background-color: var(--accent-red);
    color: #ffffff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
    transition: var(--transition);
}

.video-card:hover .video-play-btn {
    transform: translate(-50%, -50%) scale(1.15);
    background-color: #ef4444;
}

.video-duration {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: rgba(0, 0, 0, 0.8);
    color: #ffffff;
    font-family: var(--font-sans);
    font-size: 0.75rem;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 4px;
}

.video-card-body {
    padding: 14px;
}

.video-card-body h4 {
    font-size: 0.95rem;
    line-height: 1.4;
    margin: 0;
}




/* ==========================================================================
   Advertisements
   ========================================================================== */
.ad-container {
    margin: 20px auto;
    text-align: center;
}

.ad-label {
    display: block;
    font-size: 0.68rem;
    letter-spacing: 1px;
    color: #9ca3af;
    margin-bottom: 4px;
    font-family: var(--font-sans);
    font-weight: 600;
}

.ad-link img {
    max-width: 100%;
    height: auto;
    transition: opacity 0.2s ease;
}

.ad-link:hover img {
    opacity: 0.95;
}

/* ==========================================================================
   Reading Controls & Article Detail
   ========================================================================== */
.reading-progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    height: 4px;
    background-color: var(--accent-red);
    z-index: 1099;
    width: 0%;
    transition: width 0.1s ease;
}

.article-content {
    font-size: 1.12rem;
    line-height: 1.85;
    color: #27272a;
}

.article-content p {
    margin-bottom: 1.5rem;
}

.article-content blockquote {
    border-left: 4px solid var(--accent-red);
    background-color: #fef2f2;
    padding: 16px 20px;
    font-style: italic;
    font-weight: 500;
    border-radius: 0 8px 8px 0;
    margin: 24px 0;
}

.article-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 20px 0;
}

.font-size-adjuster button {
    border: 1px solid var(--border-color);
    background: #ffffff;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 4px;
    cursor: pointer;
    transition: var(--transition);
}

.font-size-adjuster button:hover {
    background-color: var(--primary-blue);
    color: #ffffff;
}

.social-share-btns a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    color: #ffffff;
    font-size: 1.1rem;
    margin-right: 8px;
    transition: var(--transition);
}

.social-share-btns a:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(0,0,0,0.15);
}

.share-fb { background-color: #1877f2; }
.share-wa { background-color: #25d366; }
.share-tw { background-color: #000000; }
.share-tg { background-color: #229ed9; }
.share-cp { background-color: #4b5563; }

/* ==========================================================================
   Footer
   ========================================================================== */
.main-footer {
    background-color: var(--primary-blue-dark);
    color: #cbd5e1;
    padding: 50px 0 20px 0;
    border-top: 4px solid var(--accent-red);
    font-size: 0.95rem;
}

.main-footer h4 {
    color: #ffffff;
    font-size: 1.15rem;
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 10px;
}

.main-footer h4::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 35px;
    height: 2px;
    background-color: var(--accent-red);
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    color: #94a3b8;
    transition: var(--transition);
}

.footer-links a:hover {
    color: #ffffff;
    padding-left: 6px;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: 40px;
    padding-top: 20px;
    font-size: 0.85rem;
    color: #64748b;
}

/* Back to top button */
.back-to-top {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 44px;
    height: 44px;
    background-color: var(--accent-red);
    color: #ffffff;
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    box-shadow: var(--shadow-lg);
    z-index: 1040;
    border: none;
    cursor: pointer;
    transition: var(--transition);
}

.back-to-top:hover {
    background-color: var(--primary-blue);
    transform: translateY(-3px);
}

/* ==========================================================================
   Responsive Adaptations
   ========================================================================== */
@media (max-width: 991.98px) {
    .main-navbar .navbar-collapse {
        background-color: var(--primary-blue-dark);
        padding: 16px;
        border-radius: 8px;
        margin-top: 10px;
    }
    .infinite-article-card {
        flex-direction: column;
    }
    .infinite-article-card .img-box {
        width: 100%;
        height: 200px;
    }
    .breaking-news-bar {
        height: auto;
        flex-wrap: wrap;
    }
    .breaking-label {
        width: 100%;
        padding: 6px 12px;
    }
    .breaking-label::after {
        display: none;
    }
    .breaking-ticker-viewport {
        padding: 8px 12px;
    }
}

@media (max-width: 575.98px) {
    .supporting-card {
        flex-direction: column;
    }
    .supporting-card .thumb-wrap {
        width: 100%;
        height: 160px;
    }
    .aayam-modal-dialog {
        height: 100vh;
        max-height: 100vh;
        border-radius: 0;
    }
}

/* ==========================================================================
   HOMEPAGE EXACT ATTACHMENT DESIGN SYSTEM
   ========================================================================== */

/* 1. Hero Left Card (Carousel Short News with Popup Modal) */
.hero-left-card {
    min-height: 380px;
    background-color: #1e293b;
    position: relative;
    overflow: hidden;
}

.hero-carousel-container {
    position: relative;
    width: 100%;
    height: 100%;
    min-height: 380px;
}

.hero-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.45s ease-in-out, visibility 0.45s ease-in-out;
    z-index: 1;
}

.hero-slide.active {
    opacity: 1;
    visibility: visible;
    z-index: 2;
}

.hero-slide-dots {
    position: absolute;
    top: 14px;
    left: 14px;
    z-index: 10;
    display: flex;
    gap: 6px;
}

.hero-slide-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.5);
    border: none;
    padding: 0;
    cursor: pointer;
    transition: all 0.25s ease;
}

.hero-slide-dot.active {
    width: 22px;
    border-radius: 10px;
    background-color: #dc2626;
}

.hero-left-bg-img {
    object-fit: cover;
    transition: transform 0.4s ease;
}

.hero-slide:hover .hero-left-bg-img {
    transform: scale(1.03);
}

.hero-nav-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: #dc2626;
    color: #ffffff;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
    cursor: pointer;
    z-index: 10;
    transition: transform 0.2s, background-color 0.2s;
}

.hero-nav-arrow:hover {
    background-color: #b91c1c;
    transform: translateY(-50%) scale(1.1);
}

.hero-nav-arrow.arrow-prev { left: 10px; }
.hero-nav-arrow.arrow-next { right: 10px; }

.hero-left-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(0deg, rgba(0,0,0,0.92) 0%, rgba(0,0,0,0.6) 55%, transparent 100%);
    z-index: 3;
    transition: background 0.3s ease;
}

.hero-left-overlay.hero-short-news-card {
    cursor: pointer;
}

.hero-left-overlay.hero-short-news-card:hover .hero-left-title {
    color: #fca5a5 !important;
}

.tag-travel { color: #f87171; }
.tag-fashion { color: #4ade80; }

/* 2. Hero Center Video Player */
.hero-purple-play-btn {
    width: 58px;
    height: 58px;
    border-radius: 50%;
    background: rgba(88, 28, 135, 0.85);
    border: 2px solid rgba(255, 255, 255, 0.8);
    color: #ffffff;
    font-size: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 0 20px rgba(147, 51, 234, 0.5);
    transition: transform 0.2s ease, background-color 0.2s ease;
}

.hero-purple-play-btn:hover {
    transform: scale(1.1);
    background: rgba(107, 33, 168, 0.95);
}

.hero-video-screen {
    position: relative;
    overflow: hidden;
}

.hero-video-embed-wrap {
    z-index: 15;
    background-color: #000000;
}

.hero-video-cover-wrap {
    transition: opacity 0.3s ease;
}

.hero-seek-bar {
    height: 4px;
    cursor: pointer;
}

.hero-seek-track {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
}

.hero-seek-fill {
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    background: #38bdf8;
    border-radius: 2px;
}

/* 3. Hero Right Tabs */
.hero-tab-btn.tab-popular.active {
    background-color: #dc2626 !important;
}

.badge-cat-red {
    background-color: #fee2e2;
    color: #dc2626;
    padding: 2px 6px;
    border-radius: 3px;
}

.badge-cat-blue {
    background-color: #e0f2fe;
    color: #0284c7;
    padding: 2px 6px;
    border-radius: 3px;
}

/* 4. Quick Category Icon Capsules */
.quick-icons-section {
    padding: 6px 0;
}

.quick-icon-capsule {
    flex: 1 1 calc(10% - 10px);
    min-width: 85px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 10px 6px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.quick-icon-capsule:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.08);
    border-color: #dc2626;
}

.capsule-icon-circle {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: #f8fafc;
    border: 1px solid #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    margin-bottom: 5px;
}

.capsule-label {
    font-size: 0.82rem;
    font-weight: 700;
    color: #1e293b;
    text-align: center;
}

/* 5. Category Image Tiles (7 Cards) */
.category-tile-card {
    display: block;
    background: #0b1e36;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.category-tile-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 14px rgba(0,0,0,0.18);
}

.category-tiles-section .row {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none; /* Firefox */
}

.category-tiles-section .row::-webkit-scrollbar {
    display: none; /* Safari and Chrome */
}

.category-tiles-section .row > .col {
    flex: 0 0 14.2857%;
    max-width: 14.2857%;
    min-width: 120px;
}

.tile-img-box {
    height: 90px;
    width: 100%;
    background: #1e293b;
}

.tile-img-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.tile-label-bar {
    background: #0b1e36;
    color: #ffffff;
    font-size: 0.82rem;
    font-weight: 700;
    padding: 5px 2px;
}

/* 6. Section Title Headers with Red Indicator */
.section-title-heading {
    position: relative;
    padding-left: 12px;
    font-size: 1.15rem;
}

.section-title-heading::before {
    content: '';
    position: absolute;
    left: 0;
    top: 2px;
    bottom: 2px;
    width: 4px;
    background-color: #dc2626;
    border-radius: 2px;
}

/* 7. Center Column Featured Video Circle */
.video-circle-play-btn {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.65);
    border: 2px solid #ffffff;
    color: #ffffff;
    font-size: 1.6rem;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.4);
    cursor: pointer;
    transition: transform 0.2s ease, background 0.2s ease;
}

.video-circle-play-btn:hover {
    transform: scale(1.1);
    background: rgba(220, 38, 38, 0.85);
}

/* 8. Right Column Numbered Red Circles (1 to 8) */
.number-circle-red {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background-color: #dc2626;
    color: #ffffff;
    font-size: 0.78rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 1px 3px rgba(220, 38, 38, 0.4);
}

/* 9. Special News Cards (6 Cards) */
.special-news-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.special-news-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}

/* Keep heads visible when photos are cropped to fit their boxes */
.object-fit-cover,
.img-box img,
.infinite-article-card img,
.hero-left-bg-img,
.special-news-card img,
.related-stories img {
    object-position: center top;
}
/* Article body formatting */
.article-content {
    text-align: left;
    font-size: 1.05rem;
    line-height: 1.85;
}
.article-content p {
    text-align: left !important;
    margin: 0 0 1rem !important;
    line-height: 1.85 !important;
}
/* Hide the blank lines made by pressing Enter twice */
.article-content p:empty,
.article-content p:has(> br:only-child) {
    display: none;
}
.article-content h1,
.article-content h2,
.article-content h3,
.article-content h4 {
    text-align: left !important;
    margin: 1.5rem 0 0.75rem;
    line-height: 1.4;
}
.article-content ul,
.article-content ol {
    text-align: left;
    margin: 0 0 1rem;
    padding-left: 1.6rem;
}
.article-content li {
    margin-bottom: 0.4rem;
    line-height: 1.8;
}
.article-content li p {
    margin: 0 !important;
}
.article-content img {
    max-width: 100%;
    height: auto;
}
/* Still allow the editor's alignment buttons to work when you use them on purpose */
.article-content .ql-align-center { text-align: center !important; }
.article-content .ql-align-right { text-align: right !important; }
.article-content .ql-align-justify { text-align: justify !important; }

/* ==========================================================================
   STEP 2 HERO LAYOUT
   Picture on top, text on a solid bar underneath. No text sits on the picture.
   ========================================================================== */

/* --- Left card: Flash News carousel --- */
.hero-left-card {
    min-height: 0;
    /* Do NOT stretch to the height of the tall middle card.
       The card ends after its own content, so it never shows a big empty box. */
    height: auto !important;
    background-color: #0b1728;
    display: flex;
    flex-direction: column;
}

.hero-left-carousel-wrap {
    position: relative;
    flex: 0 0 auto;
}

.hero-carousel-container {
    display: grid;
    width: 100%;
    height: auto;
    min-height: 0;
}

/* All slides share one grid cell so they stack without absolute positioning */
.hero-slide {
    grid-area: 1 / 1;
    position: relative;
    top: auto;
    left: auto;
    width: auto;
    height: auto;
    display: flex;
    flex-direction: column;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.45s ease-in-out, visibility 0.45s ease-in-out;
    z-index: 1;
}

.hero-slide.active {
    opacity: 1;
    visibility: visible;
    z-index: 2;
}

.hero-slide-media {
    position: relative;
    width: 100%;
    /* 16:9 matches the uploaded pictures, so nothing gets cropped */
    aspect-ratio: 16 / 9;
    background-color: #0b1728;
    overflow: hidden;
}

.hero-slide-media .hero-left-bg-img,
.hero-left-bg-img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
}

/* Stop the old hover zoom, it cropped the text inside pictures */
.hero-slide:hover .hero-left-bg-img {
    transform: none;
}

.hero-slide-body {
    flex: 1 1 auto;
    position: relative;
    background-color: #0b1728;
    border-top: 3px solid #dc2626;
    padding: 10px 12px 12px;
    cursor: pointer;
}

.hero-flash-cat {
    display: inline-block;
    background-color: #dc2626;
    color: #ffffff;
    font-size: 0.68rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 3px;
    margin-bottom: 6px;
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.hero-left-title {
    font-size: 1.02rem !important;
    line-height: 1.35 !important;
    margin-bottom: 4px !important;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.hero-slide-meta {
    font-size: 0.74rem;
    color: #94a3b8;
}

/* Arrows sit over the middle of the picture area */
.hero-left-carousel-wrap .hero-nav-arrow {
    top: 34%;
}

/* Extra flash headlines under the picture (desktop only) */
.hero-flash-list {
    display: flex;
    flex-direction: column;
    flex: 0 0 auto;
    background-color: #0b1728;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    overflow: hidden;
}

.hero-flash-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 0 0 auto;
    width: 100%;
    text-align: left;
    background: transparent;
    border: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
    color: #e5e7eb;
    padding: 9px 12px;
    font: inherit;
    cursor: pointer;
}

.hero-flash-row:last-child {
    border-bottom: 0;
}

.hero-flash-row:hover {
    background-color: rgba(220, 38, 38, 0.14);
    color: #ffffff;
}

.hero-flash-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: #dc2626;
    flex-shrink: 0;
}

.hero-flash-txt {
    font-size: 0.82rem;
    line-height: 1.35;
    font-weight: 600;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.hero-flash-time {
    font-size: 0.68rem;
    color: #94a3b8;
    white-space: nowrap;
    margin-left: auto;
    padding-left: 6px;
}

/* --- Middle card: latest news --- */
.hero-latest-card {
    background-color: #0b1728;
}

.hero-latest-lead {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
}

.hero-latest-media {
    position: relative;
    flex: 1 1 auto;
    aspect-ratio: 16 / 9;
    min-height: 0;
    background-color: #000000;
    overflow: hidden;
}

.hero-latest-media img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
}

.hero-latest-body {
    flex: 0 0 auto;
    background-color: #0b1728;
    border-top: 3px solid #dc2626;
    padding: 12px 16px 14px;
}

.hero-latest-body h2 {
    font-size: 1.2rem;
    line-height: 1.4;
}

/* Slightly tighter headline list in the middle card */
.hero-latest-list a {
    padding-top: .35rem !important;
    padding-bottom: .35rem !important;
}

/* --- Right card: keep it at its natural height, like the Flash News card,
   so it does not become a tall empty white panel --- */
.hero-tabbed-card {
    height: auto !important;
}

/* --- Phones: keep the hero short --- */
@media (max-width: 767.98px) {
    .hero-flash-list {
        display: none;
    }
    .hero-slide-media {
        aspect-ratio: 16 / 9;
    }
}

/* ==========================================================================
   MORE FLASH NEWS — desktop list under the left hero card
   ========================================================================== */
.hero-more-flash {
    background-color: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
}

.hero-more-flash-head {
    background-color: #0b1728;
    color: #ffffff;
    font-size: 0.82rem;
    font-weight: 700;
    line-height: 1.3;
    padding: 8px 12px;
}

.hero-more-flash-body {
    padding: 4px 0;
}

.hero-more-flash-row {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    width: 100%;
    text-align: left;
    background: transparent;
    border: 0;
    border-bottom: 1px solid #eef1f5;
    padding: 8px 10px;
    font: inherit;
    cursor: pointer;
}

.hero-more-flash-row:last-child {
    border-bottom: 0;
}

.hero-more-flash-row:hover {
    background-color: #f8fafc;
}

.hero-more-flash-thumb {
    flex: 0 0 auto;
    width: 72px;
    height: 54px;
    border-radius: 4px;
    overflow: hidden;
    background-color: #0b1728;
}

.hero-more-flash-thumb img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.hero-more-flash-info {
    flex: 1 1 auto;
    min-width: 0;
}

.hero-more-flash-title {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    color: #1f2937;
    font-size: 0.8rem;
    font-weight: 600;
    line-height: 1.3;
}

.hero-more-flash-row:hover .hero-more-flash-title {
    color: #dc2626;
}

.hero-more-flash-time {
    display: block;
    margin-top: 3px;
    color: #94a3b8;
    font-size: 0.68rem;
}