/*
 * Global Life Today - Header, Navigation, Ticker, Drawer, Search
 * by WP Solution (wpsolutionbd.com)
 * Framework-free: does not depend on Tailwind utilities, so the header
 * always lays out correctly (horizontal menu, scrolling ticker).
 */

:root {
    --glt-container: 1280px;
    --glt-primary-dark: #960000;
    --glt-topbar: #006a4e;
    --glt-logo-d-w: auto;
    --glt-logo-d-h: 56px;
    --glt-logo-m-w: auto;
    --glt-logo-m-h: 36px;
}

/* Honour the "Max Container Width" Customizer option site-wide */
.max-w-\[1280px\] { max-width: var(--glt-container) !important; }

.glt-container {
    width: 100%;
    max-width: var(--glt-container);
    margin-inline: auto;
    padding-inline: 16px;
    box-sizing: border-box;
}

/* ---------- Buttons ---------- */
.glt-btn {
    display: inline-flex; align-items: center; justify-content: center;
    padding: 9px 16px; font: 700 12px/1 var(--font-sans); letter-spacing: .04em;
    text-transform: uppercase; text-decoration: none; cursor: pointer;
    border: 1.5px solid var(--glt-dark); background: transparent; color: var(--glt-dark);
    border-radius: 3px; transition: background .2s, color .2s, border-color .2s;
}
.glt-btn:hover { background: var(--glt-dark); color: #fff; }
.glt-btn--primary { background: var(--glt-primary); border-color: var(--glt-primary); color: #fff; }
.glt-btn--primary:hover { background: var(--glt-primary-dark); border-color: var(--glt-primary-dark); }

.glt-icon-btn {
    display: inline-flex; align-items: center; justify-content: center;
    width: 40px; height: 40px; padding: 0; border: 0; background: transparent;
    color: var(--glt-dark); border-radius: 50%; cursor: pointer; transition: background .2s;
}
.glt-icon-btn:hover { background: #eceef0; }
.glt-icon-btn--light { color: #fff; }
.glt-icon-btn--light:hover { background: rgba(255,255,255,.12); }

.glt-live-dot {
    display: inline-block; width: 8px; height: 8px; border-radius: 50%;
    background: var(--glt-primary); animation: glt-pulse 1.6s ease-in-out infinite;
}
.glt-live-dot--white { background: #fff; }
@keyframes glt-pulse { 0%,100% { opacity: 1; transform: scale(1); } 50% { opacity: .45; transform: scale(.75); } }

/* ---------- Admin pen shortcuts ---------- */
.glt-pen {
    display: inline-flex; align-items: center; justify-content: center;
    width: 26px; height: 26px; border-radius: 50%; flex: none;
    background: var(--glt-dark); color: #fff !important; text-decoration: none;
    opacity: .85; transition: transform .15s, background .15s, opacity .15s;
}
.glt-pen:hover { background: var(--glt-primary); opacity: 1; transform: scale(1.1); }
.glt-pen--light { background: rgba(255,255,255,.18); }
.glt-pen--light:hover { background: rgba(255,255,255,.35); }
.glt-pen--float { margin-left: 8px; }
.glt-pen--nav { margin-left: auto; align-self: center; }

/* ---------- Top bar (social left, Dhaka date centre, links right) ---------- */
.glt-topbar { background: var(--glt-topbar, #006a4e); color: #e6f2ee; font: 600 11px/1 var(--font-sans); letter-spacing: .06em; text-transform: uppercase; }
.glt-topbar__row { display: flex; align-items: center; justify-content: space-between; gap: 14px; min-height: 36px; }
.glt-topbar__left { display: flex; align-items: center; gap: 10px; min-width: 0; }
.glt-topbar__brand { display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.glt-topbar__brand strong { color: #fff; }
.glt-topbar__date { display: none; align-items: center; gap: 8px; color: #d3e7e0; white-space: nowrap; }
.glt-topbar__date strong { color: #fff; }
.glt-topbar__sep { opacity: .45; }
.glt-topbar__links { display: flex; align-items: center; gap: 16px; white-space: nowrap; }
.glt-topbar__links a:not(.glt-pen) { color: #fff; text-decoration: none; }
.glt-topbar__links a:not(.glt-pen):hover { text-decoration: underline; }
@media (min-width: 768px) { .glt-topbar__date { display: inline-flex; } }
@media (max-width: 479px) { .glt-topbar__links a:not(.glt-pen):not(:last-of-type) { display: none; } }

/* Bangladesh flag line: green + red */
.glt-flagline { display: flex; height: 3px; }
.glt-flagline span:first-child { flex: 1; background: #006a4e; }
.glt-flagline span:last-child { width: 22%; background: #f42a41; }

/* Social icons */
.glt-social { display: flex; align-items: center; gap: 4px; list-style: none; margin: 0; padding: 0; }
.glt-social__link { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 50%; color: #fff; text-decoration: none; transition: background .2s, transform .2s; }
.glt-social__link:hover { background: rgba(255,255,255,.2); transform: translateY(-1px); }
.glt-social--drawer { margin-bottom: 12px; gap: 8px; }
.glt-social--drawer .glt-social__link { width: 36px; height: 36px; background: rgba(255,255,255,.08); }
.glt-social--footer .glt-social__link { width: 34px; height: 34px; background: rgba(255,255,255,.08); }
.glt-social--footer .glt-social__link:hover { background: var(--glt-primary); }

/* ---------- Header ---------- */
.glt-header { background: #fff; position: relative; z-index: 50; border-bottom: 1px solid var(--glt-border); }
.glt-header--sticky { position: sticky; top: 0; }
body.admin-bar .glt-header--sticky { top: 32px; }
@media (max-width: 782px) { body.admin-bar .glt-header--sticky { top: 46px; } }
.glt-header.is-stuck { box-shadow: 0 6px 18px rgba(0,0,0,.08); }

.glt-header__row { display: flex; align-items: center; gap: 12px; min-height: 64px; padding-block: 8px; }
.glt-header__burger { margin-left: -8px; }
.glt-brand { display: flex; align-items: center; min-width: 0; flex: 1 1 auto; }
.glt-header__actions { display: flex; align-items: center; gap: 8px; margin-left: auto; flex: none; }
.glt-header__cta { display: none; }
@media (min-width: 768px) {
    .glt-header__row { min-height: 78px; }
    .glt-header__burger { display: none; }
    .glt-header__cta { display: inline-flex; }
}

/* Logo: separate desktop / mobile images + independent width & height */
.glt-brand__link { display: inline-flex; align-items: center; text-decoration: none; color: inherit; min-width: 0; }
.glt-logo { display: block; max-width: 100%; object-fit: contain; object-position: left center; }
.glt-logo--desktop { display: none; }
.glt-logo--mobile { display: block; }
.glt-logo { width: var(--glt-logo-m-w); height: var(--glt-logo-m-h); }
@media (min-width: 768px) {
    .glt-logo { width: var(--glt-logo-d-w); height: var(--glt-logo-d-h); }
    .glt-logo--desktop { display: block; }
    .glt-logo--mobile { display: none; }
}

/* Text wordmark fallback (no logo uploaded) */
.glt-brand__text { gap: 10px; }
.glt-brand__mark {
    display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px;
    background: var(--glt-primary); color: #fff; font: 800 20px/1 var(--font-brand); border-radius: 3px;
}
.glt-brand__words { display: flex; flex-direction: column; line-height: 1.15; min-width: 0; }
.glt-brand__title { font: 800 17px/1.1 var(--font-brand); letter-spacing: .1em; text-transform: uppercase; color: var(--glt-dark); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.glt-brand__tagline { display: none; font: 600 10px/1.2 var(--font-sans); letter-spacing: .22em; text-transform: uppercase; color: var(--glt-muted); margin-top: 3px; }
@media (min-width: 768px) { .glt-brand__tagline { display: block; } .glt-brand__title { font-size: 20px; } }

/* ---------- Primary navigation (horizontal) ---------- */
.glt-nav { border-top: 1px solid var(--glt-border); background: #fff; }
.glt-nav__row { display: flex; align-items: stretch; }

.glt-menu, .glt-menu ul { list-style: none; margin: 0; padding: 0; }
.glt-menu {
    display: flex; flex-flow: row nowrap; align-items: stretch;
    overflow-x: auto; overflow-y: hidden; -webkit-overflow-scrolling: touch;
    scrollbar-width: none; min-width: 0;
}
.glt-menu::-webkit-scrollbar { display: none; }
.glt-menu > li { position: relative; display: block; flex: 0 0 auto; margin: 0; padding: 0; }
.glt-menu > li > a {
    position: relative; display: block; padding: 14px 14px;
    font: 700 13px/1.1 var(--font-sans); letter-spacing: .02em; color: var(--glt-dark);
    text-decoration: none; white-space: nowrap; transition: color .2s, background .2s;
}
.glt-menu > li > a::after {
    content: ""; position: absolute; left: 14px; right: 14px; bottom: 0; height: 3px;
    background: var(--glt-primary); transform: scaleX(0); transform-origin: left; transition: transform .25s ease;
}
.glt-menu > li:hover > a, .glt-menu > li:focus-within > a { color: var(--glt-primary); }
.glt-menu > li:hover > a::after, .glt-menu > li:focus-within > a::after { transform: scaleX(1); }
.glt-menu > li.current-menu-item > a,
.glt-menu > li.current-menu-ancestor > a,
.glt-menu > li.current_page_item > a,
.glt-menu > li.current-menu-parent > a { color: var(--glt-primary); }
.glt-menu > li.current-menu-item > a::after,
.glt-menu > li.current-menu-ancestor > a::after,
.glt-menu > li.current_page_item > a::after,
.glt-menu > li.current-menu-parent > a::after { transform: scaleX(1); }

/* Desktop: no clipping so dropdown sub-menus can show */
@media (min-width: 1024px) {
    .glt-menu { overflow: visible; flex-wrap: nowrap; }
    .glt-menu > li > a { padding: 15px 13px; }
    .glt-menu > li > a::after { left: 13px; right: 13px; }
    .glt-menu .sub-menu {
        position: absolute; top: 100%; left: 0; z-index: 60; min-width: 220px; background: #fff;
        border: 1px solid var(--glt-border); border-top: 3px solid var(--glt-primary);
        box-shadow: 0 14px 30px rgba(0,0,0,.12); opacity: 0; visibility: hidden;
        transform: translateY(6px); transition: opacity .2s, transform .2s, visibility .2s;
    }
    .glt-menu li:hover > .sub-menu, .glt-menu li:focus-within > .sub-menu { opacity: 1; visibility: visible; transform: none; }
    .glt-menu .sub-menu a { display: block; padding: 11px 16px; font: 600 13px/1.3 var(--font-sans); color: var(--glt-dark); text-decoration: none; border-bottom: 1px solid #f0f1f2; }
    .glt-menu .sub-menu li:last-child a { border-bottom: 0; }
    .glt-menu .sub-menu a:hover { background: var(--glt-bg-subtle); color: var(--glt-primary); }
    .glt-menu > li.menu-item-has-children > a { padding-right: 24px; }
    .glt-menu > li.menu-item-has-children > a::before {
        content: ""; position: absolute; right: 11px; top: 50%; margin-top: -4px;
        border: solid currentColor; border-width: 0 1.6px 1.6px 0; padding: 2.2px; transform: rotate(45deg);
    }
}
/* Tablet / mobile: sub-items live in the drawer; keep the bar one clean scrolling row */
@media (max-width: 1023px) { .glt-menu .sub-menu { display: none; } }

/* ---------- Breaking news ticker ---------- */
.glt-ticker { background: var(--glt-primary); color: #fff; border-bottom: 1px solid var(--glt-primary-dark); }
.glt-ticker__inner { display: flex; align-items: stretch; height: 40px; padding-inline: 0; gap: 0; }
.glt-ticker__label {
    flex: none; display: flex; align-items: center; gap: 8px; padding: 0 14px 0 16px;
    background: var(--glt-primary-dark); position: relative; z-index: 2;
    font: 800 12px/1 var(--font-brand); letter-spacing: .16em; text-transform: uppercase; white-space: nowrap;
}
.glt-ticker__label::after { content: ""; position: absolute; right: -9px; top: 0; border-left: 9px solid var(--glt-primary-dark); border-block: 20px solid transparent; }
.glt-ticker__viewport {
    flex: 1 1 0; min-width: 0; overflow: hidden; position: relative; margin-left: 14px;
    -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 22px, #000 calc(100% - 22px), transparent 100%);
            mask-image: linear-gradient(90deg, transparent 0, #000 22px, #000 calc(100% - 22px), transparent 100%);
}
.glt-ticker__track { display: flex; flex-flow: row nowrap; align-items: center; width: max-content; height: 100%; will-change: transform; }
.glt-ticker__group { display: flex; flex: none; flex-flow: row nowrap; align-items: center; list-style: none; margin: 0; padding: 0; }
.glt-ticker__item { display: flex; flex: none; align-items: center; gap: 9px; padding: 0 18px 0 0; margin: 0; white-space: nowrap; font: 600 13.5px/1 var(--font-sans); }
.glt-ticker__item::after { content: ""; width: 5px; height: 5px; margin-left: 9px; border-radius: 50%; background: rgba(255,255,255,.55); }
.glt-ticker__cat { font: 700 10px/1 var(--font-sans); letter-spacing: .08em; text-transform: uppercase; background: rgba(0,0,0,.25); padding: 4px 7px; border-radius: 2px; }
.glt-ticker__link { color: #fff; text-decoration: none; font-weight: 700; }
.glt-ticker__link:hover { text-decoration: underline; }
.glt-ticker__time { font-size: 11px; color: rgba(255,255,255,.75); }
.glt-ticker__time .posted-on { display: inline; }
.glt-ticker__toggle {
    flex: none; width: 36px; border: 0; background: var(--glt-primary-dark); color: #fff; cursor: pointer;
    display: flex; align-items: center; justify-content: center; margin-left: 6px;
}
.glt-ticker__toggle:hover { background: rgba(0,0,0,.45); }
.glt-ticker__ico-play { display: none; }
.glt-ticker.is-paused .glt-ticker__ico-play { display: block; }
.glt-ticker.is-paused .glt-ticker__ico-pause { display: none; }
.glt-pen--ticker { align-self: center; margin: 0 8px 0 6px; }

/* The scrolling itself: JS sets --glt-ticker-shift (px) and --glt-ticker-duration (s) */
.glt-ticker.is-ready .glt-ticker__track { animation: glt-ticker-scroll var(--glt-ticker-duration, 40s) linear infinite; }
.glt-ticker.is-paused .glt-ticker__track,
.glt-ticker.is-hover-paused .glt-ticker__track { animation-play-state: paused; }
@keyframes glt-ticker-scroll { from { transform: translate3d(0,0,0); } to { transform: translate3d(calc(-1 * var(--glt-ticker-shift, 50%)),0,0); } }

/* Reduced-motion visitors (unless admin forces motion): static, swipe/scroll manually */
.glt-ticker.is-static .glt-ticker__viewport { overflow-x: auto; scrollbar-width: none; }
.glt-ticker.is-static .glt-ticker__viewport::-webkit-scrollbar { display: none; }
.glt-ticker.is-static .glt-ticker__toggle { display: none; }
@media (max-width: 480px) { .glt-ticker__label { padding: 0 10px; } .glt-ticker__label-text { font-size: 11px; } .glt-ticker__time { display: none; } }

/* ---------- Off-canvas drawer ---------- */
#glt-drawer-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.6); z-index: 100; opacity: 0; pointer-events: none; transition: opacity .3s; }
#glt-drawer-overlay.active { opacity: 1; pointer-events: auto; }
.glt-drawer {
    position: fixed; top: 0; left: 0; bottom: 0; width: 340px; max-width: 88vw; z-index: 101;
    background: var(--glt-dark); color: #fff; display: flex; flex-direction: column;
    transform: translateX(-100%); visibility: hidden; transition: transform .3s ease, visibility .3s;
}
.glt-drawer.active { transform: none; visibility: visible; }
.glt-drawer__head { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px 14px 20px; border-bottom: 1px solid rgba(255,255,255,.12); }
.glt-drawer__title { font: 800 15px/1.2 var(--font-brand); letter-spacing: .12em; text-transform: uppercase; }
.glt-drawer__body { flex: 1; overflow-y: auto; padding: 8px 0; }
.glt-drawer-menu, .glt-drawer-menu ul { list-style: none; margin: 0; padding: 0; }
.glt-drawer-menu a { display: block; padding: 13px 20px; color: #e4e6e8; text-decoration: none; font: 600 15px/1.3 var(--font-sans); border-bottom: 1px solid rgba(255,255,255,.07); }
.glt-drawer-menu a:hover, .glt-drawer-menu .current-menu-item > a { color: #fff; background: rgba(255,255,255,.07); box-shadow: inset 3px 0 0 var(--glt-primary); }
.glt-drawer-menu .sub-menu a { padding-left: 38px; font-size: 14px; font-weight: 500; color: #b9bdc1; }
.glt-drawer__foot { padding: 16px 20px; border-top: 1px solid rgba(255,255,255,.12); font-size: 12px; color: #8b9095; }

/* ---------- Search modal ---------- */
#glt-search-modal { position: fixed; inset: 0; background: rgba(20,22,24,.94); z-index: 120; display: none; align-items: center; justify-content: center; padding: 20px; }
#glt-search-modal.active { display: flex; }
.glt-search-box { position: relative; width: 100%; max-width: 680px; background: #fff; padding: 28px; border-radius: 4px; box-shadow: 0 30px 60px rgba(0,0,0,.4); }
.glt-search-box__close { position: absolute; top: 12px; right: 12px; border: 0; background: transparent; color: #777; cursor: pointer; padding: 6px; }
.glt-search-box__close:hover { color: #000; }
.glt-search-box__title { margin: 0 0 16px; font: 700 24px/1.2 var(--font-serif); color: var(--glt-dark); }
.glt-search-box__form { display: flex; flex-direction: column; gap: 10px; }
.glt-search-box__input { width: 100%; padding: 13px 14px; border: 1.5px solid #cfd3d6; font: 400 15px/1.2 var(--font-sans); border-radius: 3px; box-sizing: border-box; }
.glt-search-box__input:focus { outline: none; border-color: var(--glt-primary); }
@media (min-width: 600px) { .glt-search-box__form { flex-direction: row; } }

/* Focus visibility */
.glt-header a:focus-visible, .glt-header button:focus-visible, .glt-ticker a:focus-visible, .glt-ticker button:focus-visible { outline: 2px solid var(--glt-primary); outline-offset: 2px; }
.glt-ticker a:focus-visible, .glt-ticker button:focus-visible { outline-color: #fff; }

/* ---------- Footer menu + credit ---------- */
.glt-footer-menu { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 20px; list-style: none; margin: 0; padding: 0; font-size: 13px; }
.glt-footer-menu a { color: #a9aeb3; text-decoration: none; }
.glt-footer-menu a:hover { color: #fff; }
.glt-credit a { color: #fff; font-weight: 600; text-decoration: none; }
.glt-credit a:hover { text-decoration: underline; }

/* ---------- Bangla / English switching ---------- */
[data-glt-lang="bn"] .glt-en { display: none !important; }
[data-glt-lang="en"] .glt-bn { display: none !important; }
.glt-bn { letter-spacing: 0 !important; text-transform: none !important; font-family: 'Hind Siliguri', var(--font-sans); }
.glt-menu a .glt-bn, .glt-drawer-menu a .glt-bn { font-size: 1.12em; font-weight: 600; }
.glt-cb__title .glt-bn, .glt-sec-title-text .glt-bn { font-size: 1.05em; }

.glt-lang {
    display: inline-flex; align-items: center; padding: 2px; border: 1px solid rgba(255,255,255,.45);
    border-radius: 999px; background: rgba(0,0,0,.18); color: #fff; cursor: pointer; font: 700 11px/1 var(--font-sans);
}
.glt-lang__opt { padding: 5px 9px; border-radius: 999px; letter-spacing: 0; text-transform: none; transition: background .2s, color .2s; }
[data-glt-lang="bn"] .glt-lang__opt[data-lang="bn"],
[data-glt-lang="en"] .glt-lang__opt[data-lang="en"] { background: #fff; color: var(--glt-topbar, #006a4e); }
.glt-lang:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

/* ---------- Social icon styles (Customizer: plain / circle / brand) ---------- */
.glt-social__img { width: 18px; height: 18px; object-fit: contain; display: block; }
.glt-social--style-circle .glt-social__link { background: rgba(255,255,255,.16); }
.glt-social--style-circle .glt-social__link:hover { background: rgba(255,255,255,.32); }
.glt-social--style-brand .glt-social__link { background: var(--glt-brand, #374151); color: #fff; }
.glt-social--style-brand .glt-social__link:hover { filter: brightness(1.12); transform: translateY(-1px); }
