/* Custom Header Styles */

:root {
    --header-blue: #113E87;
    --header-red: #e10600;
}

/* ── Header Middle: Logo + Search + Socials ─────────────── */
.main-header .header-middle {
    background: #fff;
    border-bottom: 1px solid #eeeeee;
    padding: 12px 0;
}

.main-header .hm-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.main-header .hm-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Bangla date-time — desktop center */
.main-header .hm-center {
    flex: 1;
    text-align: center;
}
.main-header .hm-center .bn-datetime {
    font-size: 20px;
    font-weight: 600;
    color: #e10600;
    font-family: var(--font-primary);
    white-space: nowrap;
    letter-spacing: 0.2px;
}

.main-header .hm-logo img {
    max-height: 75px;
    width: auto;
    display: block;
}

.main-header .hm-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Search pill: "Search" text + icon with border-radius 25px */
.main-header .hm-search-pill {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 7px 16px;
    border: 1.5px solid #ccc;
    border-radius: 25px;
    color: #555;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: border-color 0.2s, color 0.2s;
    cursor: pointer;
    white-space: nowrap;
}

.main-header .hm-search-pill:hover {
    border-color: var(--header-blue);
    color: var(--header-blue);
}

.main-header .hm-search-pill .hm-search-text {
    font-size: 14px;
}

/* Quick Nav Buttons (Live TV + Short Video) */
.main-header .hm-quick-nav {
    display: flex;
    align-items: center;
    gap: 8px;
}

.main-header .hm-qnav-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    border-radius: 25px;
    font-size: 13.5px;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
    transition: background 0.2s, color 0.2s, box-shadow 0.2s;
    font-family: 'Google Sans', sans-serif;
}

/* Live TV button — red */
.main-header .hm-qnav-live {
    background: #e10600;
    color: #fff;
    border: 1.5px solid #e10600;
}

.main-header .hm-qnav-live:hover,
.main-header .hm-qnav-live.active {
    background: #c00000;
    border-color: #c00000;
    box-shadow: 0 2px 8px rgba(225,6,0,0.3);
    color: #fff;
}

/* Animated live dot */
.main-header .hm-qnav-live .live-dot {
    display: inline-block;
    width: 7px;
    height: 7px;
    background: #fff;
    border-radius: 50%;
    animation: live-pulse 1.4s ease-in-out infinite;
    flex-shrink: 0;
}

@keyframes live-pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50%       { opacity: 0.4; transform: scale(0.7); }
}

/* Short Video button — blue outline */
.main-header .hm-qnav-shorts {
    background: #fff;
    color: var(--header-blue);
    border: 1.5px solid var(--header-blue);
}

.main-header .hm-qnav-shorts:hover,
.main-header .hm-qnav-shorts.active {
    background: var(--header-blue);
    color: #fff;
    box-shadow: 0 2px 8px rgba(17,62,135,0.2);
}

.main-header .hm-qnav-shorts i {
    font-size: 12px;
}

.main-header .hm-mobile-search {
    font-size: 20px;
    color: #333;
}

/* ── Navigation Bar ─────────────────────────────────────── */
.main-header .header-primary-nav {
    background: #fff;
    border-top: 1px solid #eeeeee;
    border-bottom: 5px solid var(--header-blue);
    overflow: visible;
    position: sticky;
    top: 0;
    z-index: 9999;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.main-header .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

.main-header .nav-container {
    display: flex;
    align-items: center;
    overflow-x: auto;
    overflow-y: visible;
    scrollbar-width: none;
}

.main-header .nav-container::-webkit-scrollbar {
    display: none;
}

.main-header .header-primary-nav ul {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
}

.main-header .header-primary-nav ul li a {
    display: block;
    padding: 12px 20px;
    color: #111;
    font-weight: 700;
    text-decoration: none;
    font-size: 15px;
    white-space: nowrap;
    transition: all 0.2s;
    position: relative;
}

.main-header .header-primary-nav ul li.active a,
.main-header .header-primary-nav ul li.current-cat a {
    color: var(--header-blue);
}

.main-header .header-primary-nav ul li.home-link.active a {
    background: var(--header-blue);
    color: #fff;
    border-radius: 4px 4px 0 0;
}

.main-header .header-primary-nav ul li:not(.home-link) a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 3px;
    background: var(--header-blue);
    transition: width 0.2s;
}

.main-header .header-primary-nav ul li:not(.home-link).active a::after,
.main-header .header-primary-nav ul li:not(.home-link):hover a::after {
    width: 100%;
}

/* ── Breaking News Bar (CSS scroll animation) ───────────── */
.main-header .breaking-news-bar {
    background: var(--header-red);
    color: #fff;
    padding: 8px 0;
    overflow: hidden;
}

.main-header .breaking-label {
    font-weight: 900;
    font-size: 14px;
    white-space: nowrap;
    background: rgba(0, 0, 0, 0.15);
    padding: 3px 10px;
    border-radius: 3px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    flex-shrink: 0;
}

.main-header .breaking-ticker-wrap {
    flex: 1;
    overflow: hidden;
    position: relative;
}

.main-header .breaking-ticker-inner {
    display: flex;
    align-items: center;
    white-space: nowrap;
    animation: ticker-scroll 12s linear infinite;
}

.main-header .breaking-ticker-inner:hover {
    animation-play-state: paused;
}

.main-header .bticker-item {
    color: #fff;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    padding: 0 40px 0 0;
    display: inline-block;
}

.main-header .bticker-item:hover {
    text-decoration: underline;
}

@keyframes ticker-scroll {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

/* ── Header Ad Banner Strip ──────────────────────────────── */
.header-ad-strip {
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    padding: 8px 0 4px;
    position: relative;
}

/* Centred 1200px wrapper shared by viewport + controls */
.had-inner {
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    padding: 0 12px;
    box-sizing: border-box;
}

.had-viewport {
    overflow: hidden;
    width: 100%;
}

.had-track {
    display: flex;
    transition: transform 0.45s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform;
}

.had-card {
    flex: 0 0 100%;
    min-width: 100%;
    display: block;
    border-radius: 6px;
    overflow: hidden;
    text-decoration: none;
}

.had-card img {
    width: 100%;
    height: auto;
    border-radius: 6px;
    display: block;
}

/* Controls row (arrows + dots) */
.had-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 6px 0 2px;
}

.had-arrow {
    background: none;
    border: 1px solid #cbd5e1;
    color: #64748b;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    transition: background 0.2s, color 0.2s;
    flex-shrink: 0;
}
.had-arrow:hover { background: var(--accent-color, #5186d5); color: #fff; border-color: transparent; }

.had-dots {
    display: flex;
    gap: 6px;
    align-items: center;
}

.had-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #cbd5e1;
    border: none;
    cursor: pointer;
    padding: 0;
    transition: background 0.25s, transform 0.25s;
}
.had-dot.active {
    background: var(--accent-color, #5186d5);
    transform: scale(1.3);
}

/* ── Mobile ─────────────────────────────────────────────── */
@media (max-width: 1024px) {
    .main-header .hm-center { display: none !important; }

    .had-arrow {
        width: 18px;
        height: 18px;
        font-size: 8px;
    }

    .had-dot {
        width: 5px;
        height: 5px;
    }

    .had-controls {
        gap: 6px;
        padding: 4px 0 2px;
    }

    .had-dots { gap: 4px; }

    .main-header .hm-right .hm-search-pill .hm-search-text {
        font-size: 8px;
    }

    .main-header .hm-search-pill {
        padding: 5px 9px;
        font-size: 8px;
        gap: 4px;
    }

    .main-header .hm-logo img {
        max-height: 45px !important;
    }

    /* Compact quick-nav buttons on mobile — keep text visible but smaller */
    .main-header .hm-quick-nav {
        gap: 5px;
    }

    .main-header .hm-qnav-btn {
        padding: 5px 9px;
        font-size: 8px;
        gap: 4px;
        border-radius: 20px;
    }

    .main-header .hm-qnav-live .live-dot {
        width: 5px;
        height: 5px;
    }

    .main-header .hm-qnav-shorts i {
        font-size: 8px;
    }

    /* On mobile, nav is hidden so stick the header-middle instead */
    .main-header .header-middle {
        position: sticky;
        top: 0;
        z-index: 9999;
        box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    }

    .main-header .header-primary-nav {
        display: none !important;
        position: static;
    }

    .main-header .mobile-only {
        display: flex !important;
    }

    .main-header .hm-mobile-search {
        display: none !important;
    }
}

/* Hide legacy header */
#zmiilo {
    display: none !important;
}

/* ── Mobile Horizontal Scroll Nav ───────────────────────── */
.main-header .mobile-scroll-nav {
    display: none; /* Hidden on desktop by default */
    background: #fff;
    border-bottom: 2px solid #eeeeee;
    overflow: hidden;
}

.main-header .mobile-scroll-nav .msn-inner {
    display: flex;
    align-items: center;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE/Edge */
    padding: 0 8px;
    gap: 2px;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch; /* Smooth scroll on iOS */
}

.main-header .mobile-scroll-nav .msn-inner::-webkit-scrollbar {
    display: none;
}

.main-header .mobile-scroll-nav .msn-item {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 10px 14px;
    color: #333;
    font-size: 13.5px;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
    border-bottom: 3px solid transparent;
    transition: color 0.2s, border-color 0.2s;
    flex-shrink: 0;
}

.main-header .mobile-scroll-nav .msn-item:hover {
    color: var(--header-blue, #113E87);
}

.main-header .mobile-scroll-nav .msn-item.msn-active {
    color: var(--header-blue, #113E87);
    border-bottom-color: var(--header-blue, #113E87);
}

.main-header .mobile-scroll-nav .msn-item i {
    font-size: 12px;
}

.main-header .mobile-scroll-nav .msn-item.msn-sub {
    font-size: 12px;
    opacity: 0.8;
    padding-left: 10px;
    border-left: 2px solid currentColor;
}

/* Show ONLY on tablet and mobile (≤1024px) */
@media (max-width: 1024px) {
    .main-header .mobile-scroll-nav {
        display: block;
    }
}

/* End of custom-header.css */