/* ==========================================================================
   AZ NEWS PORTAL - MASTER DESIGN SYSTEM & THEME TOKENS
   --------------------------------------------------------------------------
   Changing colors or fonts in THIS SINGLE FILE updates the ENTIRE website theme
   (Public Site, Admin, Editor & Member Panels).

   Theme direction: "Editorial Premium + Newsroom Wire"
   - Authority serif headings ('Fraunces', 'Merriweather')
   - Clean, readable body ('Inter', 'Noto Sans Devanagari')
   - Monospace newsroom-wire accents ('JetBrains Mono')
   - Ink-navy (#1B2A4A) + deep maroon (#7A1F2B) + saffron gold (#B8860B)
   - Night mode: "Midnight Desk" (warm charcoal + emerald #3CBF9E + saffron #E8952F)
   ========================================================================== */

:root {
    /* 🎨 BRAND COLOR PALETTE */
    --primary-color: #1B2A4A;      /* Ink Navy — masthead, links, primary buttons */
    --primary-hover: #142038;      /* Primary Hover State */
    --accent-color: #7A1F2B;       /* Deep Maroon — ticker / breaking / alert */
    --accent-hover: #5E1620;       /* Accent Hover State */
    --warning-color: #B8860B;      /* Gold — Premium badge / crown / "seal" */
    --warning-soft: #F4E4C1;       /* Light gold background for premium chips */
    --success-color: #1F8A70;      /* Emerald — Active / Published state */
    --dark-bg: #1C1C1E;            /* Dark Mode body (warm charcoal, not pure black) */
    --dark-surface: #262626;       /* Dark Mode card/panel surface */
    --card-bg: #ffffff;            /* Card / Container White */
    --body-bg: #F7F4EE;            /* Global Body Background — soft warm neutral */
    --surface-paper: #FAF3E4;      /* Reading surface for Public article/E-Paper pages */
    --text-main: #1E2333;          /* Main Text Color — warm near-navy */
    --text-muted: #6B6B62;         /* Subtitle / Muted Text */
    --border-color: #E5DFD1;       /* Border / Divider Line — warm hairline */

    /* 🗞️ NEWSROOM WIRE TOKENS */
    --nr-ink: #0b1120;
    --nr-paper: #fafaf9;
    --nr-crimson: #c81e3a;
    --nr-crimson-deep: #a3162e;
    --nr-amber: #c98a1f;
    --nr-steel: #5b6472;
    --nr-line: rgba(11, 17, 32, 0.09);
    --nr-line-soft: rgba(11, 17, 32, 0.06);

    /* 🔤 TYPOGRAPHY HIERARCHY */
    --font-serif: 'Fraunces', 'Merriweather', 'Georgia', serif;
    --font-mono: 'JetBrains Mono', 'SFMono-Regular', Consolas, monospace;
    --font-heading: 'Merriweather', 'Noto Serif Devanagari', serif;
    --font-body: 'Inter', 'Noto Sans Devanagari', system-ui, -apple-system, sans-serif;

    /* 📐 UI RADIUS & SHADOWS */
    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-pill: 20px;
    --shadow-sm: 0 2px 8px rgba(27, 42, 74, 0.06);
    --shadow-md: 0 10px 25px rgba(27, 42, 74, 0.10);
    --shadow-lg: 0 20px 45px rgba(27, 42, 74, 0.14);
}

/* ==========================================================================
   GLOBAL COLOR UTILITY APPLICATION
   ========================================================================== */
a {
    color: var(--primary-color);
}

a:hover {
    color: var(--primary-hover);
}

.bg-primary {
    background-color: var(--primary-color) !important;
}

.btn-primary {
    background-color: var(--primary-color) !important;
    border-color: var(--primary-color) !important;
}

.btn-primary:hover {
    background-color: var(--primary-hover) !important;
    border-color: var(--primary-hover) !important;
}

.btn-outline-primary {
    color: var(--primary-color) !important;
    border-color: var(--primary-color) !important;
}

.btn-outline-primary:hover {
    background-color: var(--primary-color) !important;
    color: #ffffff !important;
}

.text-primary {
    color: var(--primary-color) !important;
}

.text-danger {
    color: var(--accent-color) !important;
}

.bg-danger {
    background-color: var(--accent-color) !important;
}

/* 👑 Premium / Paywall badge */
.badge-premium {
    background-color: var(--warning-soft);
    color: var(--warning-color);
    border: 1px solid var(--warning-color);
    border-radius: var(--radius-pill);
    font-weight: 600;
    padding: 4px 12px;
    font-size: 12px;
}

/* 📰 Breaking news ticker strip */
.ticker-strip {
    background-color: var(--accent-color);
    color: #FAF3E4;
    border-radius: var(--radius-sm);
}

/* 📄 Reading surface for article & e-paper pages */
.surface-paper {
    background-color: var(--surface-paper);
}

/* Cards with soft tinted shadow */
.card {
    box-shadow: var(--shadow-sm);
    border-radius: var(--radius-md);
    border-color: var(--border-color);
}

.card:hover {
    box-shadow: var(--shadow-md);
}

/* Card hover elevation */
.card-lift {
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.card-lift:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md) !important;
}

/* ==========================================================================
   AZ NEWSROOM WIRE — SIGNATURE EDITORIAL COMPONENTS
   ========================================================================== */

/* Section Eyebrow (Monospace Hairline Prefix) */
.az-eyebrow {
    font-family: var(--font-mono);
    font-size: 10.5px;
    letter-spacing: 1.6px;
    text-transform: uppercase;
    font-weight: 600;
    color: var(--nr-crimson);
    display: inline-flex;
    align-items: center;
    gap: 7px;
}
.az-eyebrow::before {
    content: "";
    width: 14px;
    height: 1px;
    background: var(--nr-crimson);
    display: inline-block;
}

/* Section Header Bar */
.az-section-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 16px;
    margin-bottom: 26px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--nr-line);
}
.az-section-head h4 {
    font-family: var(--font-serif);
    font-weight: 700;
    font-size: 1.7rem;
    letter-spacing: -0.01em;
    color: var(--text-main, var(--nr-ink));
    margin: 2px 0 0 0;
}
.az-section-head .az-eyebrow {
    margin-bottom: 6px;
    display: flex;
}

/* View All Pill Button with Light Sweep Effect */
.az-view-all {
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.5px;
    font-weight: 600;
    color: var(--nr-ink);
    border: 1px solid var(--nr-line);
    border-radius: 999px;
    padding: 7px 16px;
    text-decoration: none;
    white-space: nowrap;
    transition: all .2s ease;
    position: relative;
    overflow: hidden;
}
.az-view-all::after {
    content: "";
    position: absolute;
    top: 0;
    left: -120%;
    width: 60%;
    height: 100%;
    background: linear-gradient(120deg, transparent, rgba(255,255,255,0.45), transparent);
    transform: skewX(-20deg);
    transition: left .6s ease;
}
.az-view-all:hover::after {
    left: 130%;
}
.az-view-all:hover {
    background: var(--nr-ink);
    color: #fff;
    border-color: var(--nr-ink);
}

/* Timestamp / Meta — Wire-Service Monospace Treatment */
.az-meta {
    font-family: var(--font-mono);
    font-size: 10.5px;
    letter-spacing: 0.2px;
    color: var(--nr-steel);
    text-transform: uppercase;
}

/* Live Status Indicator with Pulsing Dot */
.az-live {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--nr-crimson);
    color: #fff;
    font-family: var(--font-mono);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1px;
    padding: 4px 10px 4px 8px;
    border-radius: 3px;
    text-transform: uppercase;
}
.az-live .dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #fff;
    animation: az-pulse 1.4s ease-in-out infinite;
}
@keyframes az-pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: .45; transform: scale(.72); }
}

/* Sponsored / Ad Shells */
.az-ad-shell {
    border: 1px solid var(--nr-line);
    border-radius: 6px;
    background: var(--card-bg, #fff);
    overflow: hidden;
}
.az-ad-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 16px;
    border-bottom: 1px dashed var(--nr-line);
}
.az-ad-label span {
    font-family: var(--font-mono);
    font-size: 9.5px;
    letter-spacing: 1.4px;
    text-transform: uppercase;
    color: var(--nr-steel);
}

/* Hero Section Framing & Cinematic Entrance */
.az-hero-wrap {
    position: relative;
}
.az-hero-glow {
    position: absolute;
    inset: -40% -10% auto -10%;
    height: 420px;
    background:
        radial-gradient(420px 260px at 20% 30%, rgba(200,30,58,0.16), transparent 70%),
        radial-gradient(380px 240px at 80% 60%, rgba(11,17,32,0.14), transparent 70%);
    filter: blur(10px);
    z-index: -1;
    pointer-events: none;
    animation: az-drift 10s ease-in-out infinite alternate;
}
@keyframes az-drift {
    0% { transform: translate(0,0) scale(1); }
    100% { transform: translate(2%,3%) scale(1.05); }
}

.az-hero-frame {
    border-radius: 14px !important;
    overflow: hidden !important;
    box-shadow: 0 20px 50px rgba(11, 17, 32, 0.35) !important;
    position: relative !important;
    background: #000000 !important;
    transform: translateZ(0);
}
.az-hero-frame .carousel-caption {
    text-align: left;
}
.az-hero-title {
    font-family: var(--font-serif);
    font-weight: 700;
    font-size: 1.55rem !important;
    line-height: 1.28 !important;
    letter-spacing: -0.01em;
}
.az-hero-cat {
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    background: rgba(255,255,255,0.14);
    border: 1px solid rgba(255,255,255,0.3);
    color: #fff;
    padding: 4px 10px;
    border-radius: 3px;
    backdrop-filter: blur(4px);
}

/* Front big image cinematic punch-in on load & slide */
.carousel-item img,
.az-hero-frame img {
    transition: transform 1.2s cubic-bezier(0.16, 1, 0.3, 1), filter 0.8s ease !important;
    will-change: transform, filter, opacity;
}
.carousel-item.active img {
    animation: heroCinematicReveal 1.1s cubic-bezier(0.16, 1, 0.3, 1) both !important;
}
@keyframes heroCinematicReveal {
    0% {
        opacity: 0.2;
        transform: scale(1.18);
        filter: blur(8px) brightness(0.6);
    }
    40% {
        opacity: 0.8;
        filter: blur(2px) brightness(0.85);
    }
    100% {
        opacity: 1;
        transform: scale(1);
        filter: blur(0px) brightness(1);
    }
}

.az-hero-frame::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(110deg, transparent 35%, rgba(255, 255, 255, 0.35) 50%, transparent 65%);
    transform: translateX(-150%);
    pointer-events: none;
    z-index: 5;
    animation: heroLightSweep 1.8s cubic-bezier(0.16, 1, 0.3, 1) 0.1s 1;
}
@keyframes heroLightSweep {
    0% { transform: translateX(-150%); }
    100% { transform: translateX(150%); }
}

.carousel-item .carousel-caption > * {
    opacity: 0;
    transform: translateY(24px);
    transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}
.carousel-item.active .carousel-caption > * {
    opacity: 1;
    transform: translateY(0);
}
.carousel-item.active .carousel-caption > *:nth-child(1) { transition-delay: 0.15s; }
.carousel-item.active .carousel-caption > *:nth-child(2) { transition-delay: 0.28s; }
.carousel-item.active .carousel-caption > *:nth-child(3) { transition-delay: 0.42s; }

/* Sidebar Widgets (E-paper / Magazine) */
.az-widget {
    border: 1px solid var(--nr-line);
    border-radius: 8px;
    background: var(--card-bg, #fff);
    overflow: hidden;
    transition: box-shadow .25s ease, transform .25s ease;
    will-change: transform;
}
.az-widget:hover {
    box-shadow: 0 14px 30px -16px rgba(11,17,32,0.28);
    transform: translateY(-2px);
}
.az-widget-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 16px;
    border-bottom: 1px solid var(--nr-line-soft);
}
.az-widget-head h6 {
    font-family: var(--font-serif);
    font-weight: 700;
    font-size: 14.5px;
    margin: 0;
    color: var(--text-main, var(--nr-ink));
}
.az-widget-tag {
    font-family: var(--font-mono);
    font-size: 9px;
    letter-spacing: 1px;
    text-transform: uppercase;
    padding: 3px 8px;
    border-radius: 3px;
    color: #fff;
}

/* Live Spotlight Band with Glowing Border Sweep */
.az-live-band {
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid var(--nr-line);
    box-shadow: 0 24px 48px -24px rgba(11,17,32,0.4);
    position: relative;
}
.az-live-band::before {
    content: "";
    position: absolute;
    inset: -1px;
    border-radius: 15px;
    padding: 1px;
    background: linear-gradient(120deg, rgba(200,30,58,0.55), transparent 30%, transparent 70%, rgba(200,30,58,0.55));
    background-size: 200% 200%;
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    animation: az-border-sweep 5s linear infinite;
    pointer-events: none;
}
@keyframes az-border-sweep {
    0% { background-position: 0% 0%; }
    100% { background-position: 200% 0%; }
}
.az-live-band-head {
    background: var(--nr-ink);
    padding: 16px 22px;
}

/* News Cards — The Workhorse Editorial Component */
.az-card {
    border: 1px solid var(--nr-line);
    border-radius: 8px;
    overflow: hidden;
    background: var(--card-bg, #fff);
    transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
    height: 100%;
    position: relative;
}
.az-card::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 8px;
    box-shadow: 0 0 0 0 rgba(200,30,58,0);
    transition: box-shadow .35s ease;
    pointer-events: none;
}
.az-card:hover::before {
    box-shadow: 0 0 0 2px rgba(200,30,58,0.18);
}
.az-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 36px -20px rgba(11,17,32,0.3);
    border-color: transparent;
}
.az-card-img {
    position: relative;
    overflow: hidden;
}
.az-card-img img {
    transition: transform .7s cubic-bezier(.16,.7,.24,1), filter .5s ease;
}
.az-card:hover .az-card-img img {
    transform: scale(1.09);
}
.az-card-tag {
    position: absolute;
    top: 10px;
    left: 10px;
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: .6px;
    background: rgba(11,17,32,0.82);
    color: #fff;
    padding: 4px 9px;
    border-radius: 3px;
    backdrop-filter: blur(3px);
    animation: az-pop-in .5s cubic-bezier(.3,1.4,.4,1) both;
    animation-delay: .15s;
}
@keyframes az-pop-in {
    from { opacity: 0; transform: scale(.75); }
    to { opacity: 1; transform: scale(1); }
}
.az-card-body {
    padding: 16px;
}
.az-card-kicker {
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--nr-crimson);
    font-weight: 600;
}
.az-card-title {
    font-family: var(--font-serif);
    font-weight: 600;
    line-height: 1.35;
    color: var(--text-main, var(--nr-ink));
    text-decoration: none;
    display: block;
    margin: 6px 0 10px;
}
.az-card-title:hover {
    color: var(--nr-crimson);
}
.az-card-foot {
    padding-top: 10px;
    border-top: 1px solid var(--nr-line-soft);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Bookmark Icon Bounce */
.az-card-body a[title="Bookmark Article"] {
    display: inline-block;
    transition: transform .3s cubic-bezier(.3,1.6,.4,1), color .2s;
}
.az-card-body a[title="Bookmark Article"]:hover {
    transform: scale(1.3) rotate(-8deg);
    color: var(--nr-crimson) !important;
}

/* Category Tab Pills */
.cat-pills-wrap {
    display: flex;
    flex-wrap: wrap !important;
    gap: 8px 8px !important;
    margin-bottom: 28px;
    padding-bottom: 2px;
}
.cat-tab-pill {
    font-family: var(--font-mono) !important;
    color: var(--nr-steel) !important;
    font-weight: 600;
    font-size: 11px !important;
    letter-spacing: .5px;
    text-transform: uppercase;
    background: transparent !important;
    border: 1px solid var(--nr-line) !important;
    border-radius: 999px !important;
    padding: 7px 15px !important;
    transition: all .2s !important;
    white-space: nowrap;
}
.cat-tab-pill:hover {
    border-color: var(--nr-ink) !important;
    color: var(--nr-ink) !important;
    background: transparent !important;
}
.cat-tab-pill.active {
    background: var(--nr-ink) !important;
    color: #fff !important;
    border-color: var(--nr-ink) !important;
}

/* Category Grid Tiles */
.az-cat-tile {
    border-radius: 10px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 10px 24px -14px rgba(11,17,32,0.35);
    transition: transform .3s ease;
    will-change: transform;
}
.az-cat-tile:hover {
    transform: translateY(-5px);
}
.az-cat-tile-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(11,17,32,0) 30%, rgba(11,17,32,0.92) 100%);
}

/* Video Cards & Play Pulse */
.video-thumb-container {
    position: relative;
    overflow: hidden;
    border-radius: 8px 8px 0 0;
}
.video-thumb-container img {
    transition: transform .6s cubic-bezier(.2,.7,.3,1), filter .5s;
    filter: saturate(.94);
}
.video-thumb-container:hover img {
    transform: scale(1.08);
    filter: saturate(1.1);
}
.video-play-btn-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(11,17,32,0.28);
    transition: background .3s;
}
.video-thumb-container:hover .video-play-btn-overlay {
    background: rgba(11,17,32,0.5);
}
.video-play-icon {
    width: 50px !important;
    height: 50px !important;
    border-radius: 50% !important;
    background: #fff !important;
    color: var(--nr-ink) !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 15px !important;
    box-shadow: 0 8px 20px rgba(0,0,0,.35);
    transition: transform .2s;
    position: relative;
}
.video-play-icon::before {
    content: "";
    position: absolute;
    inset: -8px;
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,0.75);
    opacity: 0;
    animation: az-ring-pulse 2.2s ease-out infinite;
}
.video-thumb-container:hover .video-play-icon::before {
    animation-play-state: running;
}
@keyframes az-ring-pulse {
    0% { opacity: .9; transform: scale(.8); }
    80% { opacity: 0; transform: scale(1.5); }
    100% { opacity: 0; transform: scale(1.5); }
}
.video-thumb-container:hover .video-play-icon {
    transform: scale(1.1);
}

/* Gallery Mono-to-Color Reveal */
.az-gallery-tile {
    display: block;
    height: 104px;
    border-radius: 6px;
    overflow: hidden;
    position: relative;
}
.az-gallery-tile img {
    filter: grayscale(65%) brightness(.92);
    transition: transform .5s cubic-bezier(.2,.7,.3,1), filter .5s ease;
}
.az-gallery-tile:hover img {
    transform: scale(1.1);
    filter: grayscale(0%) brightness(1);
}
.az-gallery-tile::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 60%, rgba(11,17,32,0.55));
    opacity: 0;
    transition: opacity .35s ease;
}
.az-gallery-tile:hover::after {
    opacity: 1;
}

/* Blog / Opinion Kickers */
.az-blog-kicker {
    font-family: var(--font-mono);
    font-size: 9.5px;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    background: rgba(255,255,255,.92);
    color: var(--nr-ink);
    padding: 5px 10px;
    border-radius: 3px;
    border: 1px solid var(--nr-line);
}

/* Newsletter Band */
.az-newsletter {
    background:
        radial-gradient(1200px 400px at 15% -10%, rgba(200,30,58,0.25), transparent 60%),
        linear-gradient(135deg, var(--nr-ink), #050810);
    position: relative;
}
.az-newsletter h3 {
    font-family: var(--font-serif);
    font-weight: 700;
    font-size: 2rem;
    letter-spacing: -0.01em;
}
.az-newsletter .form-control {
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,0.18);
    background: rgba(255,255,255,0.06);
    color: #fff;
}
.az-newsletter .form-control::placeholder {
    color: rgba(255,255,255,0.5);
}
.az-newsletter .form-control:focus {
    background: rgba(255,255,255,0.1);
    border-color: var(--nr-crimson);
    box-shadow: 0 0 0 4px rgba(200,30,58,0.18);
    color: #fff;
}
.az-nl-btn {
    border-radius: 999px;
    background: var(--nr-crimson);
    border: 1px solid var(--nr-crimson);
    color: #fff;
    font-family: var(--font-mono);
    font-size: 12px;
    letter-spacing: .6px;
    text-transform: uppercase;
    font-weight: 700;
    transition: .2s;
    position: relative;
    overflow: hidden;
}
.az-nl-btn::after {
    content: "";
    position: absolute;
    top: 0;
    left: -120%;
    width: 60%;
    height: 100%;
    background: linear-gradient(120deg, transparent, rgba(255,255,255,0.45), transparent);
    transform: skewX(-20deg);
    transition: left .6s ease;
}
.az-nl-btn:hover::after {
    left: 130%;
}
.az-nl-btn:hover {
    background: var(--nr-crimson-deep);
    border-color: var(--nr-crimson-deep);
    color: #fff;
}

/* Scroll-Reveal Entrance Choreography */
.az-reveal {
    opacity: 1;
    transform: none;
    transition: opacity .75s cubic-bezier(.2,.65,.25,1), transform .75s cubic-bezier(.2,.65,.25,1);
}
.az-reveal.is-visible {
    opacity: 1;
    transform: none;
}
.az-reveal > [class*="col-"] {
    opacity: 1;
    transform: none;
    transition: opacity .6s ease, transform .6s ease;
}
.az-reveal.is-visible > [class*="col-"] {
    opacity: 1;
    transform: none;
}
.az-reveal.is-visible > [class*="col-"]:nth-child(1) { transition-delay: .03s; }
.az-reveal.is-visible > [class*="col-"]:nth-child(2) { transition-delay: .09s; }
.az-reveal.is-visible > [class*="col-"]:nth-child(3) { transition-delay: .15s; }
.az-reveal.is-visible > [class*="col-"]:nth-child(4) { transition-delay: .21s; }
.az-reveal.is-visible > [class*="col-"]:nth-child(5) { transition-delay: .27s; }
.az-reveal.is-visible > [class*="col-"]:nth-child(6) { transition-delay: .33s; }
.az-reveal.is-visible > [class*="col-"]:nth-child(7) { transition-delay: .39s; }
.az-reveal.is-visible > [class*="col-"]:nth-child(8) { transition-delay: .45s; }

/* ==========================================================================
   PAGE & FEATURE SPECIFIC COMPONENT STYLES
   ========================================================================== */

/* Category Page Filter Buttons & Live Badges */
.cat-filter-btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 5px !important;
    padding: 6px 14px !important;
    height: 32px !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    border-radius: 20px !important;
    min-width: auto !important;
    margin: 0 !important;
    letter-spacing: 0 !important;
    text-transform: none !important;
    white-space: nowrap !important;
    text-decoration: none !important;
    box-sizing: border-box !important;
    border: none !important;
    transition: all 0.2s !important;
}
.cat-filter-btn::before { display: none !important; }
.cat-filter-btn i { margin: 0 !important; font-size: 11px !important; line-height: 1 !important; }
.cat-section-heading { display: flex; align-items: center; gap: 7px; }
.cat-section-heading i { flex-shrink: 0; }

.live-card-badge {
    position: absolute !important;
    top: 10px !important;
    left: 10px !important;
    z-index: 10 !important;
    background: #dc2626 !important;
    color: #ffffff !important;
    font-weight: 800 !important;
    font-size: 11px !important;
    padding: 3px 10px !important;
    border-radius: 16px !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 5px !important;
    box-shadow: 0 4px 10px rgba(220, 38, 38, 0.5) !important;
    letter-spacing: 0.5px !important;
    text-transform: uppercase !important;
}
.live-card-badge span.dot {
    width: 7px;
    height: 7px;
    background-color: #ffffff;
    border-radius: 50%;
    display: inline-block;
    animation: az-pulse 1.4s ease-in-out infinite;
}

/* Article Reading Toolbar & Share Bar */
.article-toolbar .tool-btn,
.article-share-bar .share-btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 14px !important;
    height: 32px !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    border-radius: 20px !important;
    min-width: auto !important;
    margin: 0 !important;
    letter-spacing: 0 !important;
    text-transform: none !important;
    white-space: nowrap !important;
    gap: 6px !important;
    cursor: pointer !important;
    text-decoration: none !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
}
.article-toolbar .tool-btn::before,
.article-share-bar .share-btn::before {
    display: none !important;
}
.article-toolbar .tool-btn i,
.article-share-bar .share-btn i {
    margin: 0 !important;
    font-size: 12px !important;
    line-height: 1 !important;
}
.article-toolbar .tool-btn-round {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 32px !important;
    height: 32px !important;
    border-radius: 50% !important;
    padding: 0 !important;
    min-width: auto !important;
    margin: 0 !important;
    cursor: pointer !important;
}
.article-toolbar .tool-btn-round::before { display: none !important; }
.article-toolbar .tool-btn-round i { margin: 0 !important; font-size: 12px !important; }

/* Paywall & Teaser Styling */
.paywall-overlay-box {
    background: linear-gradient(to bottom, rgba(255,255,255,0.4) 0%, rgba(255,255,255,0.98) 50%, #ffffff 100%);
    padding: 50px 24px 30px;
    text-align: center;
    border-radius: 12px;
    margin-top: -80px;
    position: relative;
    z-index: 10;
    border: 1px solid #e2e8f0;
}
.teaser-blur {
    filter: blur(3px);
    opacity: 0.5;
    user-select: none;
    pointer-events: none;
}

/* Live Streaming Page Components */
.live-hero-banner {
    background: linear-gradient(135deg, #090e17 0%, #1e1b4b 50%, #881337 100%);
    padding: 32px 0 28px;
    position: relative;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}
.live-breadcrumb {
    background: transparent !important;
    padding: 0 !important;
    margin-bottom: 12px !important;
}
.live-breadcrumb .breadcrumb-item, 
.live-breadcrumb .breadcrumb-item a {
    color: rgba(255, 255, 255, 0.7) !important;
    font-size: 12.5px !important;
    font-weight: 500 !important;
    text-decoration: none !important;
}
.live-breadcrumb .breadcrumb-item a:hover { color: #ffffff !important; }
.live-breadcrumb .breadcrumb-item.active { color: #ffffff !important; font-weight: 600 !important; }
.live-breadcrumb .breadcrumb-item + .breadcrumb-item::before { color: rgba(255, 255, 255, 0.4) !important; }

.live-btn-sync {
    background: rgba(255, 255, 255, 0.12) !important;
    color: #ffffff !important;
    border: 1px solid rgba(255, 255, 255, 0.25) !important;
    border-radius: 24px !important;
    padding: 8px 18px !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    transition: all 0.2s ease !important;
    cursor: pointer !important;
    text-decoration: none !important;
}
.live-btn-sync:hover {
    background: rgba(255, 255, 255, 0.25) !important;
    color: #ffffff !important;
    transform: translateY(-1px);
}

.live-btn-post {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%) !important;
    color: #ffffff !important;
    border: none !important;
    border-radius: 24px !important;
    padding: 8px 20px !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    box-shadow: 0 4px 14px rgba(220, 38, 38, 0.4) !important;
    transition: all 0.2s ease !important;
    text-decoration: none !important;
}
.live-btn-post:hover {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%) !important;
    color: #ffffff !important;
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(220, 38, 38, 0.5) !important;
}

.live-stream-card {
    border-radius: 16px;
    overflow: hidden;
    background: #0f172a;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    border: 1px solid rgba(255,255,255,0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.live-stream-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.25);
}

.video-responsive-wrapper {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 */
    height: 0;
    overflow: hidden;
    background-color: #000000;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}
.video-responsive-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.live-timeline-card {
    background: #ffffff;
    border-radius: 18px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
}
.live-timeline-feed {
    max-height: 520px;
    overflow-y: auto;
    padding-right: 6px;
}
.live-timeline-feed::-webkit-scrollbar { width: 4px; }
.live-timeline-feed::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 4px; }

.live-timeline-item {
    position: relative;
    padding-left: 28px;
    padding-bottom: 20px;
    border-left: 2px solid #e2e8f0;
    margin-left: 10px;
}
.live-timeline-item:last-child {
    border-left: 2px solid transparent;
    padding-bottom: 0;
}
.live-timeline-dot {
    position: absolute;
    left: -7px;
    top: 2px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #dc2626;
    border: 2px solid #ffffff;
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.25);
}
.live-timeline-time {
    font-size: 11px;
    font-weight: 700;
    color: #dc2626;
    background: #fef2f2;
    padding: 2px 8px;
    border-radius: 10px;
    border: 1px solid #fecaca;
    font-family: monospace;
}

.live-art-card {
    background: #ffffff;
    border-radius: 16px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 18px rgba(0,0,0,0.04);
    transition: all 0.25s ease;
    overflow: hidden;
}
.live-art-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 28px rgba(0,0,0,0.08);
}
.live-art-thumb-wrap {
    position: relative;
    width: 100%;
    height: 195px;
    background: #0f172a;
    overflow: hidden;
}
.live-art-thumb-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}
.live-art-card:hover .live-art-thumb-wrap img {
    transform: scale(1.04);
}
.live-badge-overlay {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 10;
    background: #dc2626;
    color: #ffffff !important;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 3px 9px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.4);
}
.live-time-overlay {
    position: absolute;
    bottom: 10px;
    right: 10px;
    z-index: 10;
    background: rgba(15, 23, 42, 0.85);
    color: #ffffff;
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 10.5px;
    font-family: monospace;
    backdrop-filter: blur(2px);
}

/* Magazine Cards & Readers */
.mag-hero-card {
    background: #ffffff;
    border-radius: 20px;
    box-shadow: 0 12px 35px rgba(0,0,0,0.06);
    border: 1px solid #e2e8f0;
    overflow: hidden;
    transition: all 0.3s ease;
}
.mag-cover-frame {
    position: relative;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.18);
    border: 3px solid #ffffff;
    background: #0f172a;
}
.mag-cover-frame img {
    width: 100%;
    height: 360px;
    object-fit: cover;
    transition: transform 0.35s ease;
}
.mag-cover-frame:hover img {
    transform: scale(1.04);
}
.btn-mag-read {
    background: #0f172a !important;
    color: #ffffff !important;
    border: none !important;
    border-radius: 24px !important;
    padding: 10px 24px !important;
    font-size: 13.5px !important;
    font-weight: 700 !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.25) !important;
    transition: all 0.2s ease !important;
    text-decoration: none !important;
}
.btn-mag-read:hover {
    background: #1e293b !important;
    color: #ffffff !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.35) !important;
}
.btn-mag-download {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%) !important;
    color: #ffffff !important;
    border: none !important;
    border-radius: 24px !important;
    padding: 10px 24px !important;
    font-size: 13.5px !important;
    font-weight: 700 !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
    box-shadow: 0 4px 14px rgba(220, 38, 38, 0.35) !important;
    transition: all 0.2s ease !important;
    text-decoration: none !important;
}
.btn-mag-download:hover {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%) !important;
    color: #ffffff !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(220, 38, 38, 0.45) !important;
}
.mag-grid-card {
    background: #ffffff;
    border-radius: 16px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 18px rgba(0,0,0,0.04);
    transition: all 0.25s ease;
}
.mag-grid-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 28px rgba(0,0,0,0.09);
    border-color: #cbd5e1;
}

/* Membership FAQ Accordions */
.membership-faq .accordion-item {
    border-radius: 10px !important;
    overflow: hidden;
    margin-bottom: 12px !important;
    border: 1px solid var(--border-color) !important;
}
.membership-faq .accordion-button {
    background-color: var(--card-bg) !important;
    color: var(--text-main) !important;
    font-weight: 700 !important;
    font-size: 15px !important;
    padding: 16px 20px !important;
    box-shadow: none !important;
    width: 100% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    text-align: left !important;
    border-radius: 0 !important;
}
.membership-faq .accordion-button:not(.collapsed) {
    background-color: var(--primary-color) !important;
    color: #ffffff !important;
}
.membership-faq .accordion-button:focus {
    box-shadow: none !important;
}
.membership-faq .accordion-body {
    background-color: var(--card-bg) !important;
    color: var(--text-muted) !important;
    font-size: 14px !important;
    line-height: 1.6 !important;
    padding: 16px 20px !important;
}

/* Compact Forms (Reporter & Member Registration) */
.compact-card {
    max-width: 780px;
    margin: 0 auto;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    border: 1px solid #e2e8f0;
    overflow: hidden;
}
.compact-header {
    background: linear-gradient(135deg, #0f172a 0%, #1e3a8a 100%);
    color: #ffffff;
    padding: 24px 28px;
    text-align: center;
}
.compact-body {
    padding: 28px 32px;
}
.sec-badge-header {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 700;
    color: #1e3a8a;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 14px;
    margin-bottom: 12px;
    padding-bottom: 6px;
    border-bottom: 1.5px solid #f1f5f9;
}
.sec-badge-header:first-of-type {
    margin-top: 0;
}
.reg-label {
    font-size: 11.5px;
    font-weight: 700;
    color: #475569;
    margin-bottom: 4px;
    display: block;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}
.reg-input {
    border: 1.5px solid #cbd5e1 !important;
    border-radius: 8px !important;
    padding: 8px 12px !important;
    font-size: 13px !important;
    height: 38px !important;
    color: #0f172a !important;
    background-color: #f8fafc !important;
    transition: all 0.2s ease !important;
}
.reg-input:focus {
    background-color: #ffffff !important;
    border-color: #2563eb !important;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15) !important;
    outline: none !important;
}
textarea.reg-input {
    height: auto !important;
}
.kyc-upload-box {
    background: #f8fafc;
    border: 1.5px dashed #cbd5e1;
    border-radius: 8px;
    padding: 10px 14px;
    transition: all 0.2s;
}
.kyc-upload-box:hover {
    border-color: #2563eb;
    background: #eff6ff;
}
.stepper-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255,255,255,0.15);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 11.5px;
    font-weight: 600;
}
.compact-body .nice-select {
    display: none !important;
}
.compact-body select.reg-input {
    display: block !important;
    width: 100% !important;
    max-height: none !important;
    cursor: pointer;
}

/* ==========================================================================
   DARK MODE — "Midnight Desk"
   ========================================================================== */
body.dark-mode,
html.dark-mode-on,
html.dark-mode-on body {
    --primary-color: #3CBF9E;     /* Emerald */
    --primary-hover: #2FA286;
    --accent-color: #E8952F;      /* Saffron */
    --accent-hover: #C97C1D;
    --warning-color: #D9A93B;
    --warning-soft: #3A2F14;
    --card-bg: var(--dark-surface);
    --body-bg: var(--dark-bg);
    --surface-paper: var(--dark-surface);
    --text-main: #F2EFE9;
    --text-muted: #9C9992;
    --border-color: #333333;

    /* Newsroom wire dark tokens */
    --nr-ink: #e6edf3;
    --nr-paper: #161b22;
    --nr-crimson: #f85149;
    --nr-crimson-deep: #da3633;
    --nr-amber: #e3b341;
    --nr-steel: #8b949e;
    --nr-line: rgba(255,255,255,0.1);
    --nr-line-soft: rgba(255,255,255,0.06);

    background-color: var(--dark-bg) !important;
    color: var(--text-main) !important;
}

body.dark-mode .bg-white,
body.dark-mode .card,
html.dark-mode-on .bg-white,
html.dark-mode-on .card {
    background-color: var(--dark-surface) !important;
    color: var(--text-main) !important;
    border-color: var(--border-color) !important;
}

body.dark-mode .text-dark,
html.dark-mode-on .text-dark {
    color: var(--text-main) !important;
}

body.dark-mode .text-muted,
html.dark-mode-on .text-muted {
    color: var(--text-muted) !important;
}

body.dark-mode .table,
body.dark-mode .table td,
body.dark-mode .table th,
html.dark-mode-on .table,
html.dark-mode-on .table td,
html.dark-mode-on .table th {
    background-color: var(--dark-surface) !important;
    color: var(--text-main) !important;
    border-color: var(--border-color) !important;
}

body.dark-mode .form-control,
body.dark-mode .form-select,
html.dark-mode-on .form-control,
html.dark-mode-on .form-select {
    background-color: var(--dark-surface) !important;
    color: var(--text-main) !important;
    border-color: var(--border-color) !important;
}

body.dark-mode .form-control::placeholder,
html.dark-mode-on .form-control::placeholder {
    color: var(--text-muted) !important;
}

/* Dark Mode Overrides for Editorial Components */
body.dark-mode .az-view-all,
html.dark-mode-on .az-view-all {
    color: #e6edf3;
    border-color: rgba(255,255,255,0.15);
}
body.dark-mode .az-view-all:hover,
html.dark-mode-on .az-view-all:hover {
    background: #e6edf3;
    color: #0b1120;
    border-color: #e6edf3;
}

body.dark-mode .az-card,
html.dark-mode-on .az-card {
    background: var(--dark-surface);
    border-color: rgba(255,255,255,0.08);
}

body.dark-mode .az-widget,
html.dark-mode-on .az-widget {
    background: var(--dark-surface);
    border-color: rgba(255,255,255,0.08);
}

body.dark-mode .az-ad-shell,
html.dark-mode-on .az-ad-shell {
    background: var(--dark-surface);
    border-color: rgba(255,255,255,0.08);
}

body.dark-mode .cat-tab-pill,
html.dark-mode-on .cat-tab-pill {
    color: #8b949e !important;
    border-color: rgba(255,255,255,0.12) !important;
}
body.dark-mode .cat-tab-pill.active,
html.dark-mode-on .cat-tab-pill.active {
    background: #e6edf3 !important;
    color: #0b1120 !important;
    border-color: #e6edf3 !important;
}
body.dark-mode .cat-tab-pill:hover,
html.dark-mode-on .cat-tab-pill:hover {
    border-color: #e6edf3 !important;
    color: #e6edf3 !important;
}

body.dark-mode .article-reading-container {
    background-color: #1e293b !important;
    color: #f8fafc !important;
}

body.dark-mode .mag-hero-card,
body.dark-mode .mag-grid-card,
body.dark-mode .live-timeline-card,
body.dark-mode .live-art-card,
body.dark-mode .compact-card {
    background-color: var(--dark-surface) !important;
    border-color: var(--border-color) !important;
}

/* ==========================================================================
   UTILITY CLASSES — Line Clamping, Image Aspect Ratios, and Cards
   ========================================================================== */

/* Line Clamping */
.line-clamp-1 {
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}
.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}
.line-clamp-4 {
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Image Aspect Ratio & Fit Containers */
.img-fit-cover {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.ratio-16x9 {
    position: relative;
    width: 100%;
    padding-top: 56.25%;
    overflow: hidden;
    border-radius: var(--radius-sm);
    background-color: #0f172a;
}
.ratio-16x9 > img,
.ratio-16x9 > iframe,
.ratio-16x9 > video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ratio-4x3 {
    position: relative;
    width: 100%;
    padding-top: 75%;
    overflow: hidden;
    border-radius: var(--radius-sm);
    background-color: #0f172a;
}
.ratio-4x3 > img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Placeholder for missing/loading article images */
.img-placeholder-card {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.4);
    font-size: 28px;
    width: 100%;
    height: 100%;
}

/* Swipeable horizontal pill container for mobile category filters */
.scroll-snap-x {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE 10+ */
    gap: 8px;
    padding-bottom: 4px;
}
.scroll-snap-x::-webkit-scrollbar {
    display: none; /* Chrome/Safari */
}

/* Mobile Adjustments */
@media (max-width: 576px) {
    .cat-tab-pill { padding: 6px 12px !important; font-size: 10.5px !important; }
    .az-hero-title { font-size: 1.2rem !important; }
    .az-section-head h4 { font-size: 1.35rem; }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    .az-live .dot,
    .az-card-img img,
    .az-cat-tile,
    .az-gallery-tile img,
    .video-play-icon,
    .video-play-icon::before,
        animation: none !important;
        transition: none !important;
    }
}

/* Form Controls Safeguard */
select.form-select {
    display: block !important;
}
.form-select + .nice-select {
    display: none !important;
}