/* =========================================================
   Jaihind News — Production Site Design System
   SINGLE SOURCE OF TRUTH for container, type, spacing, grid.
   Branding preserved. Bootstrap retained for components only.
   ========================================================= */

/* ---------- Tokens ---------- */
:root {
    /* Container */
    --site-max-width: 1480px;
    --site-pad: 28px;

    /* Grid */
    --sidebar-width: 300px;
    --grid-gap: 32px;
    --section-gap: 40px;

    /* Spacing scale */
    --space-1: 4px;
    --space-2: 8px;
    --space-3: 12px;
    --space-4: 16px;
    --space-5: 24px;
    --space-6: 32px;
    --space-7: 40px;
    --space-8: 48px;
    --space-9: 56px;
    --space-10: 64px;

    /* Brand (preserve Jaihind identity) */
    --color-bg: #f8f9fa;
    --color-surface: #ffffff;
    --color-text: #121212;
    --color-muted: #6b6b6b;
    --color-border: #e2e2e2;
    --color-primary: #C60C30;
    --color-primary-deep: #a00a28;
    --color-brand-blue: #0038AD;
    --color-brand-red: #C60C30;

    /* Typography — Malayalam-first (Anek Malayalam)
       Homepage news hierarchy matched to editorial screenshot */
    --font-family: "Anek Malayalam", system-ui, -apple-system, "Segoe UI", sans-serif;
    --fs-meta: 0.6875rem;         /* 11px — timestamps */
    --fs-nav: 0.875rem;           /* 14px */
    --fs-body: 1rem;              /* 16px */
    --fs-sidebar-title: 0.875rem; /* 14px — popular / spotlight / compact */
    --fs-card-title: 0.9375rem;   /* 15px — latest list rows */
    --fs-section: 1rem;           /* 16px — POPULAR / LATEST / SPOTLIGHT */
    --fs-hero: clamp(1.375rem, 1.2rem + 0.45vw, 1.5rem); /* 22–24px featured */

    --lh-body: 1.55;
    --lh-title: 1.35;
    --lh-hero: 1.25;

    /* Images */
    --ratio-hero: 16 / 9;
    --ratio-thumb: 4 / 3;
    --radius-media: 0;
}

/* ---------- Base ---------- */
html {
    max-width: 100%;
    overflow-x: clip;
}

body {
    font-family: var(--font-family);
    font-size: var(--fs-body);
    line-height: var(--lh-body);
    color: var(--color-text);
    background: var(--color-bg);
    max-width: 100%;
    overflow-x: clip;
}

img,
video,
iframe {
    max-width: 100%;
}

/* ---------- Container (ONE system) ---------- */
.site-container {
    width: 100%;
    max-width: var(--site-max-width);
    margin-inline: auto;
    padding-inline: var(--site-pad);
    box-sizing: border-box;
}

/* Alias: home root uses the same container — no second max-width */
.home-page {
    width: 100%;
    max-width: var(--site-max-width);
    margin-inline: auto;
    padding-inline: var(--site-pad);
    box-sizing: border-box;
}

/* Full-bleed band; content must nest .site-container */
.site-band {
    width: 100%;
}

.site-band > .site-container {
    width: 100%;
    max-width: var(--site-max-width);
    margin-inline: auto;
    padding-inline: var(--site-pad);
    box-sizing: border-box;
}

main.site-main {
    width: 100%;
    max-width: none;
    padding-inline: 0 !important;
    box-sizing: border-box;
}

/* Neutralize Bootstrap containers inside our canvas */
main.site-main > .container-fluid,
main.site-main > .container,
.home-page > .container-fluid,
.site-container > .container-fluid,
header .container-fluid,
footer .container-fluid,
.sticky-breaking-news > .container-fluid {
    width: 100%;
    max-width: var(--site-max-width);
    margin-inline: auto;
    padding-inline: var(--site-pad) !important;
    box-sizing: border-box;
}

.home-page .container-fluid.px-3,
.home-page .container-fluid.px-md-4 {
    max-width: none;
    padding-inline: 0 !important;
    margin-inline: 0;
}

/* ---------- Typography ---------- */
.jh-meta,
.meta-text,
.meta-date {
    font-size: var(--fs-meta);
    line-height: var(--lh-body);
    color: var(--color-muted);
}

.jh-nav,
header .site-container a {
    font-size: var(--fs-nav);
}

.jh-section-title,
.section-header h5,
.section-header h6 {
    font-family: var(--font-family);
    font-size: var(--fs-section);
    font-weight: 700;
    line-height: var(--lh-title);
    letter-spacing: 0.02em;
    margin: 0;
    color: var(--color-text);
}

.jh-card-title,
.jh-compact-title {
    font-family: var(--font-family);
    font-size: var(--fs-sidebar-title);
    font-weight: 500; /* secondary stories — lighter than lead */
    line-height: var(--lh-title);
    color: var(--color-text);
    margin: 0;
    overflow-wrap: break-word;
    word-break: normal;
    /* Soft editorial clamp — Malayalam may wrap; avoid 8+ line cards */
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    overflow: hidden;
}

.jh-story-title {
    font-family: var(--font-family);
    font-size: var(--fs-card-title);
    font-weight: 600; /* list under featured — medium */
    line-height: var(--lh-title);
    color: var(--color-text);
    margin: 0;
    overflow-wrap: break-word;
}

.jh-hero-title {
    font-family: var(--font-family);
    font-size: var(--fs-hero);
    font-weight: 800; /* lead / first main news — heaviest */
    line-height: var(--lh-hero);
    color: var(--color-text);
    margin: var(--space-3) 0 0;
    overflow-wrap: break-word;
}

.news-title-link {
    text-decoration: none;
    color: inherit;
}

.news-title-link:hover .jh-compact-title,
.news-title-link:hover .jh-story-title,
.jh-hero-link:hover .jh-hero-title {
    color: var(--color-primary);
}

/* ---------- Section header ---------- */
.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-3);
    border: 0;
    border-bottom: 1px solid var(--color-border);
    border-left: 0 !important;
    padding: 0 0 var(--space-2) !important;
    margin: var(--space-2) 0 var(--space-5);
}

/* Dual brand tick — Royal Blue + Impact Red (replaces solid red bar) */
.section-header::before {
    content: "";
    flex: 0 0 auto;
    width: 10px;
    height: 1.05em;
    margin-right: 2px;
    background:
        linear-gradient(var(--color-brand-blue), var(--color-brand-blue))
            left top / 3.5px 100% no-repeat,
        linear-gradient(var(--color-brand-red), var(--color-brand-red))
            right bottom / 3.5px 72% no-repeat;
}

.section-header .jh-section-title,
.section-header h2,
.section-header h5,
.section-header h6 {
    font-family: var(--font-family);
    font-size: var(--fs-section);
    font-weight: 700;
    line-height: var(--lh-title);
    letter-spacing: 0.04em;
    text-transform: uppercase;
    margin: 0;
    color: var(--color-text);
    flex: 1 1 auto;
    min-width: 0;
}

.section-header a {
    font-size: var(--fs-meta);
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    text-decoration: none;
    color: var(--color-muted);
    flex-shrink: 0;
    margin-left: auto;
}

.section-header a:hover {
    color: var(--color-brand-red);
}

/* ---------- Cards ---------- */
.jh-compact-card {
    display: flex;
    gap: var(--space-3);
    margin-bottom: var(--space-4);
    align-items: flex-start;
}

.jh-compact-card__media {
    flex: 0 0 auto;
    width: 80px;
    aspect-ratio: var(--ratio-thumb);
    overflow: hidden;
    background: var(--color-border);
}

.jh-compact-card__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.jh-compact-card__body {
    min-width: 0;
    flex: 1;
}

.jh-list-card {
    display: flex;
    gap: var(--space-4);
    margin-bottom: var(--space-4);
    align-items: flex-start;
}

.jh-list-card__media {
    flex: 0 0 auto;
    width: 120px;
    aspect-ratio: var(--ratio-thumb);
    overflow: hidden;
    background: var(--color-border);
}

.jh-list-card__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.jh-list-card__body {
    min-width: 0;
    flex: 1;
}

.jh-hero-card {
    margin-bottom: var(--space-5);
}

.jh-hero-card__media {
    display: block;
    width: 100%;
    aspect-ratio: var(--ratio-hero);
    overflow: hidden;
    background: var(--color-border);
}

.jh-hero-card__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.jh-hero-link {
    text-decoration: none;
    color: inherit;
}

.jh-ad-slot {
    margin-bottom: var(--space-5);
    text-align: center;
}

.jh-ad-slot__label {
    font-size: var(--fs-meta);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--color-muted);
    margin-bottom: var(--space-3);
}

.jh-ad-slot__frame {
    width: 100%;
    max-width: 300px;
    margin-inline: auto;
    aspect-ratio: 300 / 250;
    overflow: hidden;
    background: var(--color-border);
}

.jh-ad-slot__frame img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* ---------- Breaking ticker ---------- */
.sticky-breaking-news {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1050;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    background: linear-gradient(to right, var(--color-primary), #1565c0);
}

.sticky-breaking-news .flash-news-bar {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding-block: var(--space-2);
    min-width: 0;
}

.sticky-breaking-news .flash-marquee {
    flex: 1;
    min-width: 0;
    overflow: hidden;
}

.sticky-breaking-news .flash-marquee-track {
    display: inline-flex;
    gap: var(--space-5);
    white-space: nowrap;
    animation: jh-ticker 40s linear infinite;
}

.sticky-breaking-news .flash-marquee-track:hover {
    animation-play-state: paused;
}

.sticky-breaking-news .flash-marquee a {
    color: #fff;
    text-decoration: none;
    font-size: var(--fs-meta);
}

@keyframes jh-ticker {
    from { transform: translateX(0); }
    to { transform: translateX(-50%); }
}

.close-breaking-news {
    cursor: pointer;
    color: #fff;
    opacity: 0.85;
    flex-shrink: 0;
}

body:has(.sticky-breaking-news) {
    padding-bottom: 58px;
}

/* Live signal (existing classes) */
.live-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--color-primary);
    display: inline-block;
}

.live-text {
    font-size: var(--fs-meta);
    font-weight: 700;
    letter-spacing: 0.06em;
}

/* ---------- Homepage grid ---------- */
.news-layout {
    display: grid;
    grid-template-columns: var(--sidebar-width) minmax(0, 1fr) var(--sidebar-width);
    gap: var(--grid-gap);
    align-items: start;
    width: 100%;
}

.news-col-popular { grid-column: 1; order: 1; min-width: 0; }
.news-col-main { grid-column: 2; order: 2; min-width: 0; }
.news-col-spotlight { grid-column: 3; order: 3; min-width: 0; }

/*
 * Sticky side rails: page scroll advances the center (up to 15 latest),
 * Popular + Spotlight hold until the news block ends — then full page continues.
 */
@media (min-width: 1280px) {
    .news-col-popular,
    .news-col-spotlight {
        position: sticky;
        top: var(--space-4);
        align-self: start;
        max-height: calc(100vh - var(--space-4) * 2);
        overflow-x: hidden;
        overflow-y: auto;
        overscroll-behavior: contain;
        scrollbar-width: thin;
    }
}

/* 2-col: keep Spotlight pinned while center scrolls */
@media (min-width: 768px) and (max-width: 1279.98px) {
    .news-col-spotlight {
        position: sticky;
        top: var(--space-4);
        align-self: start;
        max-height: calc(100vh - var(--space-4) * 2);
        overflow-x: hidden;
        overflow-y: auto;
        overscroll-behavior: contain;
        scrollbar-width: thin;
    }
}

.jh-latest-feed {
    display: flex;
    flex-direction: column;
}

/* ---------- Spotlight vertical marquee ---------- */
.jh-spotlight-marquee {
    --jh-spotlight-duration: 42s;
    --jh-spotlight-viewport: 28rem;
    position: relative;
    margin-bottom: var(--space-2);
}

.jh-spotlight-marquee__viewport {
    height: var(--jh-spotlight-viewport);
    max-height: min(var(--jh-spotlight-viewport), 70vh);
    overflow: hidden;
    mask-image: linear-gradient(
        to bottom,
        transparent 0,
        #000 12px,
        #000 calc(100% - 12px),
        transparent 100%
    );
    -webkit-mask-image: linear-gradient(
        to bottom,
        transparent 0,
        #000 12px,
        #000 calc(100% - 12px),
        transparent 100%
    );
}

.jh-spotlight-marquee__track {
    will-change: transform;
}

.jh-spotlight-marquee--live .jh-spotlight-marquee__track {
    animation: jh-spotlight-scroll var(--jh-spotlight-duration) linear infinite;
}

.jh-spotlight-marquee--live:hover .jh-spotlight-marquee__track,
.jh-spotlight-marquee--live:focus-within .jh-spotlight-marquee__track {
    animation-play-state: paused;
}

.jh-spotlight-marquee__group .jh-compact-card:last-child {
    margin-bottom: var(--space-4);
}

@keyframes jh-spotlight-scroll {
    from { transform: translate3d(0, 0, 0); }
    to   { transform: translate3d(0, -50%, 0); }
}

@media (prefers-reduced-motion: reduce) {
    .jh-spotlight-marquee--live .jh-spotlight-marquee__track {
        animation: none;
    }

    .jh-spotlight-marquee__viewport {
        height: auto;
        max-height: none;
        mask-image: none;
        -webkit-mask-image: none;
        overflow: visible;
    }

    .jh-spotlight-marquee__group[aria-hidden="true"] {
        display: none;
    }
}

@media (max-width: 767.98px) {
    .jh-spotlight-marquee {
        --jh-spotlight-viewport: 22rem;
    }
}

.home-page .cutz-section,
.home-page .mt-5,
.home-page .category-section {
    margin-top: var(--section-gap);
}

/* ---------- CUTZ short-video rail ---------- */
.jh-cutz {
    margin-top: var(--section-gap);
}

.jh-cutz__header {
    margin-bottom: var(--space-5);
}

.jh-cutz__stage {
    position: relative;
}

.jh-cutz__rail {
    display: flex;
    gap: var(--space-4);
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    padding: 4px 2px 12px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.jh-cutz__rail::-webkit-scrollbar {
    display: none;
}

.jh-cutz__card {
    --jh-cutz-w: 210px;
    position: relative;
    flex: 0 0 var(--jh-cutz-w);
    width: var(--jh-cutz-w);
    scroll-snap-align: start;
    border: 0;
    border-radius: 16px;
    overflow: hidden;
    background: #0b1224;
    box-shadow: 0 10px 28px rgba(0, 24, 70, 0.12);
    cursor: pointer;
    transition: transform 0.28s ease, box-shadow 0.28s ease;
}

.jh-cutz__card:hover,
.jh-cutz__card:focus-visible {
    transform: translateY(-5px);
    box-shadow: 0 16px 36px rgba(0, 56, 173, 0.18);
    outline: none;
}

.jh-cutz__card.is-playing {
    box-shadow: 0 10px 28px rgba(0, 24, 70, 0.16);
}

.jh-cutz__media {
    position: relative;
    aspect-ratio: 9 / 14;
    background: #111;
    overflow: hidden;
}

.jh-cutz__thumb {
    position: absolute;
    inset: 0;
    z-index: 2;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: opacity 0.45s ease, transform 0.45s ease;
}

.jh-cutz__card:hover .jh-cutz__thumb {
    transform: scale(1.04);
}

.jh-cutz__card.is-loading .jh-cutz__thumb {
    opacity: 1;
}

.jh-cutz__card.is-ready .jh-cutz__thumb {
    opacity: 0;
    pointer-events: none;
    transform: none;
}

.jh-cutz__player {
    position: absolute;
    inset: 0;
    z-index: 1;
    background: transparent;
}

.jh-cutz__player iframe {
    width: 100%;
    height: 100%;
    border: 0;
    pointer-events: none;
}

.jh-cutz__shade {
    position: absolute;
    inset: 0;
    z-index: 3;
    background:
        linear-gradient(180deg, rgba(0, 24, 70, 0.12) 0%, transparent 30%),
        linear-gradient(0deg, rgba(8, 12, 28, 0.9) 0%, rgba(8, 12, 28, 0.4) 42%, rgba(8, 12, 28, 0.2) 100%);
    pointer-events: none;
    transition: opacity 0.25s ease;
}

.jh-cutz__card.is-ready .jh-cutz__shade {
    opacity: 0.72; /* keep cover so YouTube chrome stays hidden */
}

/* Shared play control — centered + wave rings */
.jh-play {
    --jh-play-size: 48px;
    --jh-play-icon: 1.35rem;
    position: absolute;
    left: 50%;
    top: 50%;
    z-index: 5;
    width: var(--jh-play-size);
    height: var(--jh-play-size);
    margin: 0;
    translate: -50% -50%;
    border-radius: 999px;
    display: grid;
    place-items: center;
    background: var(--color-brand-red);
    color: #fff;
    font-size: var(--jh-play-icon);
    box-shadow: 0 10px 24px rgba(198, 12, 48, 0.4);
    pointer-events: none;
    isolation: isolate;
}

.jh-play i {
    position: relative;
    z-index: 1;
    margin-left: 2px;
    line-height: 1;
}

.jh-play::before,
.jh-play::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    border: 2px solid color-mix(in srgb, var(--color-brand-red) 75%, #fff);
    animation: jh-play-wave 2.2s ease-out infinite;
    pointer-events: none;
}

.jh-play::after {
    animation-delay: 1.1s;
}

.jh-play--sm {
    --jh-play-size: 40px;
    --jh-play-icon: 1.1rem;
}

.jh-play--md {
    --jh-play-size: 52px;
    --jh-play-icon: 1.45rem;
}

.jh-play--lg {
    --jh-play-size: 68px;
    --jh-play-icon: 1.85rem;
}

.jh-cutz__card:hover .jh-play,
.jh-gulf-hero:hover .jh-play,
.jh-gulf-tile:hover .jh-play {
    background: var(--color-brand-blue);
    box-shadow: 0 10px 24px rgba(0, 56, 173, 0.35);
}

.jh-cutz__card:hover .jh-play::before,
.jh-cutz__card:hover .jh-play::after,
.jh-gulf-hero:hover .jh-play::before,
.jh-gulf-hero:hover .jh-play::after,
.jh-gulf-tile:hover .jh-play::before,
.jh-gulf-tile:hover .jh-play::after {
    border-color: color-mix(in srgb, var(--color-brand-blue) 70%, #fff);
}

.jh-cutz__card.is-ready .jh-play,
.jh-gulf-hero.is-ready .jh-play,
.jh-gulf-tile.is-ready .jh-play {
    opacity: 0.92;
}

@keyframes jh-play-wave {
    0% {
        transform: scale(1);
        opacity: 0.7;
    }
    70% {
        opacity: 0.15;
    }
    100% {
        transform: scale(1.85);
        opacity: 0;
    }
}

@media (prefers-reduced-motion: reduce) {
    .jh-play::before,
    .jh-play::after {
        animation: none;
        opacity: 0;
    }
}

.jh-cutz__duration {
    margin-left: auto;
    padding: 2px 7px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.16);
    color: #fff;
    font-size: 0.625rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-transform: none;
}

.jh-cutz__body {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 4;
    padding: 14px 14px 16px;
    pointer-events: none;
}

.jh-cutz__kicker {
    display: flex;
    align-items: center;
    gap: 7px;
    width: 100%;
    margin-bottom: 6px;
    color: rgba(255, 255, 255, 0.82);
    font-size: 0.625rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.jh-cutz__tick {
    width: 9px;
    height: 9px;
    background:
        linear-gradient(var(--color-brand-blue), var(--color-brand-blue)) left / 3px 100% no-repeat,
        linear-gradient(var(--color-brand-red), var(--color-brand-red)) right / 3px 70% no-repeat;
}

.jh-cutz__title {
    margin: 0;
    color: #fff;
    font-family: var(--font-family);
    font-size: 0.9375rem;
    font-weight: 600;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    overflow: hidden;
}

.jh-cutz__pager {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: var(--space-4);
}

.jh-cutz__line {
    width: 28px;
    height: 3px;
    padding: 0;
    border: 0;
    border-radius: 1px;
    cursor: pointer;
    transition: transform 0.2s ease, opacity 0.2s ease, width 0.2s ease;
}

.jh-cutz__line--blue {
    background: var(--color-brand-blue);
}

.jh-cutz__line--red {
    background: var(--color-brand-red);
}

.jh-cutz__line:hover,
.jh-cutz__line:focus-visible {
    transform: scaleY(1.4);
    outline: none;
    opacity: 0.9;
}

.jh-cutz__line:active {
    width: 36px;
}

@media (max-width: 767.98px) {
    .jh-cutz__card {
        --jh-cutz-w: 168px;
    }

    .jh-cutz__title {
        font-size: 0.8125rem;
        -webkit-line-clamp: 2;
    }
}

@media (prefers-reduced-motion: reduce) {
    .jh-cutz__card,
    .jh-cutz__thumb,
    .jh-cutz__line {
        transition: none;
    }

    .jh-cutz__card:hover,
    .jh-cutz__card:focus-visible {
        transform: none;
    }
}

/* CUTZ popup player */
.jh-cutz-modal {
    position: fixed;
    inset: 0;
    z-index: 1100;
    display: grid;
    place-items: center;
    padding: 24px 16px;
}

.jh-cutz-modal[hidden] {
    display: none !important;
}

.jh-cutz-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(8, 12, 28, 0.78);
    backdrop-filter: blur(4px);
}

.jh-cutz-modal__dialog {
    position: relative;
    z-index: 1;
    width: min(420px, 100%);
    background: #0b1224;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
}

.jh-cutz-modal__close {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 2;
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 999px;
    display: grid;
    place-items: center;
    color: #fff;
    background: rgba(0, 0, 0, 0.55);
    cursor: pointer;
}

.jh-cutz-modal__close:hover {
    background: var(--color-brand-red);
}

.jh-cutz-modal__frame {
    aspect-ratio: 9 / 16;
    background: #000;
}

.jh-cutz-modal__frame iframe {
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
}

.jh-cutz-modal__title {
    margin: 0;
    padding: 14px 16px 16px;
    color: #fff;
    font-family: var(--font-family);
    font-size: 0.9375rem;
    font-weight: 700;
    line-height: 1.35;
}

body.jh-cutz-modal-open {
    overflow: hidden;
}

/* ---------- Jaihind Global + Middle East (CNN-style dual rail) ---------- */
.jh-world-rail {
    margin-top: var(--section-gap);
    margin-bottom: var(--space-6);
}

.jh-world-rail__grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--grid-gap);
    align-items: start;
}

.jh-panel {
    min-width: 0;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-top: 3px solid var(--color-brand-blue);
    padding: var(--space-5);
}

.jh-panel--videos {
    border-top-color: var(--color-brand-red);
}

.jh-panel .section-header {
    margin-top: 0;
}

.jh-panel__feature {
    margin-bottom: var(--space-5);
}

.jh-panel__feature-media {
    display: block;
    overflow: hidden;
    background: var(--color-border);
    aspect-ratio: 16 / 9;
}

.jh-panel__feature-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.35s ease;
}

.jh-panel__feature:hover .jh-panel__feature-media img {
    transform: scale(1.03);
}

.jh-panel__feature-body {
    padding-top: var(--space-3);
}

.jh-panel__feature-title {
    margin: 0 0 var(--space-2);
    font-family: var(--font-family);
    font-size: clamp(1.15rem, 1rem + 0.5vw, 1.375rem);
    font-weight: 800;
    line-height: 1.3;
    color: var(--color-text);
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    overflow: hidden;
}

.jh-panel__stack {
    display: flex;
    flex-direction: column;
    border-top: 1px solid var(--color-border);
}

.jh-panel__row {
    display: grid;
    grid-template-columns: 96px minmax(0, 1fr);
    gap: var(--space-3);
    align-items: start;
    padding: var(--space-3) 0;
    border-bottom: 1px solid var(--color-border);
    text-decoration: none !important;
    color: inherit;
}

.jh-panel__row:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.jh-panel__row:hover .jh-panel__row-title {
    color: var(--color-brand-red);
}

.jh-panel__row-media {
    display: block;
    overflow: hidden;
    background: var(--color-border);
    aspect-ratio: 4 / 3;
}

.jh-panel__row-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.jh-panel__row-body {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.jh-panel__row-title {
    font-family: var(--font-family);
    font-size: 0.9375rem;
    font-weight: 500;
    line-height: 1.35;
    color: var(--color-text);
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    overflow: hidden;
    transition: color 0.2s ease;
}

/* Gulf / Middle East videos */
.jh-gulf-hero {
    margin: 0 0 var(--space-4);
    border: 0;
    background: #0b1224;
    cursor: pointer;
    overflow: hidden;
}

.jh-gulf-hero__media {
    position: relative;
    aspect-ratio: 16 / 9;
    background: #111;
    overflow: hidden;
}

.jh-gulf-hero__thumb {
    position: absolute;
    inset: 0;
    z-index: 2;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.jh-gulf-hero.is-ready .jh-gulf-hero__thumb {
    opacity: 0;
    pointer-events: none;
}

.jh-gulf-hero__player {
    position: absolute;
    inset: 0;
    z-index: 1;
}

.jh-gulf-hero__player iframe {
    width: 100%;
    height: 100%;
    border: 0;
    pointer-events: none;
}

.jh-gulf-hero__shade {
    position: absolute;
    inset: 0;
    z-index: 3;
    background:
        linear-gradient(0deg, rgba(8, 12, 28, 0.65) 0%, rgba(8, 12, 28, 0.25) 48%, rgba(8, 12, 28, 0.2) 100%);
    pointer-events: none;
}

.jh-gulf-hero__live {
    position: absolute;
    left: 12px;
    bottom: 12px;
    z-index: 6;
    padding: 4px 10px;
    background: var(--color-brand-blue);
    color: #fff;
    font-size: 0.625rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.jh-gulf-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--space-3);
}

.jh-gulf-tile {
    display: block;
    width: 100%;
    padding: 0;
    border: 0;
    background: #0b1224;
    cursor: pointer;
    overflow: hidden;
    text-align: left;
}

.jh-gulf-tile__media {
    position: relative;
    display: block;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #111;
}

.jh-gulf-tile__thumb {
    position: absolute;
    inset: 0;
    z-index: 2;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 0.35s ease, transform 0.35s ease;
}

.jh-gulf-tile:hover .jh-gulf-tile__thumb {
    transform: scale(1.04);
}

.jh-gulf-tile.is-ready .jh-gulf-tile__thumb {
    opacity: 0;
    pointer-events: none;
    transform: none;
}

.jh-gulf-tile__player {
    position: absolute;
    inset: 0;
    z-index: 1;
}

.jh-gulf-tile__player iframe {
    width: 100%;
    height: 100%;
    border: 0;
    pointer-events: none;
}

.jh-gulf-tile__shade {
    position: absolute;
    inset: 0;
    z-index: 3;
    background: rgba(8, 12, 28, 0.28);
    pointer-events: none;
}

.jh-gulf-modal {
    position: fixed;
    inset: 0;
    z-index: 1100;
    display: grid;
    place-items: center;
    padding: 24px 16px;
}

.jh-gulf-modal[hidden] {
    display: none !important;
}

.jh-gulf-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(8, 12, 28, 0.8);
    backdrop-filter: blur(4px);
}

.jh-gulf-modal__dialog {
    position: relative;
    z-index: 1;
    width: min(920px, 100%);
    background: #0b1224;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
}

.jh-gulf-modal__close {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 2;
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 999px;
    display: grid;
    place-items: center;
    color: #fff;
    background: rgba(0, 0, 0, 0.55);
    cursor: pointer;
}

.jh-gulf-modal__close:hover {
    background: var(--color-brand-red);
}

.jh-gulf-modal__frame {
    aspect-ratio: 16 / 9;
    background: #000;
}

.jh-gulf-modal__frame iframe {
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
}

body.jh-gulf-modal-open {
    overflow: hidden;
}

@media (max-width: 991.98px) {
    .jh-world-rail__grid {
        grid-template-columns: 1fr;
        gap: var(--space-6);
    }
}

@media (max-width: 575.98px) {
    .jh-panel {
        padding: var(--space-4);
    }

    .jh-panel__row {
        grid-template-columns: 80px minmax(0, 1fr);
    }

    .jh-play--lg {
        --jh-play-size: 56px;
        --jh-play-icon: 1.45rem;
    }

    .jh-play--md {
        --jh-play-size: 46px;
        --jh-play-icon: 1.25rem;
    }
}

/* Keep Bootstrap rows inside the editorial canvas */
.home-page .row {
    max-width: 100%;
}

/* Homepage leaderboard / full-width ad — never crop */
.jh-home-banner {
    width: 100%;
}

.jh-home-banner a {
    display: block;
    line-height: 0;
}

.jh-home-banner__img {
    width: 100%;
    max-width: 100%;
    height: auto;
    aspect-ratio: auto;
    object-fit: contain;
    object-position: center;
    display: block;
    margin-inline: auto;
}

/* Editorial image ratios for lower category blocks */
.jh-cat-image {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    display: block;
}

.jh-cat-image--sm {
    aspect-ratio: 4 / 3;
}

.jh-cat-image--thumb {
    width: 90px;
    height: 70px;
    aspect-ratio: auto;
    flex-shrink: 0;
    object-fit: cover;
}

/* Lifestyle panel (migrated from inline) */
.jh-lifestyle-panel {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 10px;
    overflow: hidden;
}

.jh-lifestyle-tabs {
    display: flex;
    border-bottom: 1px solid var(--color-border);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.life-tab {
    padding: 10px 15px;
    font-size: var(--fs-meta);
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    border-right: 1px solid #eee;
    flex-shrink: 0;
}

.jh-lifestyle-content {
    padding: var(--space-3);
}

/* ---------- Breakpoints (deliberate set) ---------- */

/* XL desktop ≥1600 */
@media (min-width: 1600px) {
    :root {
        --site-max-width: 1480px;
        --site-pad: 28px;
        --sidebar-width: 300px;
        --grid-gap: 32px;
    }
}

/* Large desktop 1280–1599 */
@media (max-width: 1599.98px) {
    :root {
        --site-max-width: 1480px;
        --site-pad: 24px;
        --sidebar-width: 280px;
        --grid-gap: 28px;
    }
}

/* Around ≤1280: leaner sidebars, still 3-col */
@media (max-width: 1280px) {
    :root {
        --site-max-width: 100%;
        --site-pad: 24px;
        --sidebar-width: 250px;
        --grid-gap: 24px;
    }

    /* Give Malayalam titles more width before shrinking type */
    .jh-compact-card {
        gap: var(--space-2);
    }

    .jh-compact-card__media {
        width: 56px;
    }
}

/* Desktop ≤1279: 2-column (main + spotlight), popular below */
@media (max-width: 1279.98px) {
    :root {
        --site-pad: 16px;
        --grid-gap: 24px;
        --section-gap: 32px;
        --site-max-width: 100%;
    }

    .news-layout {
        grid-template-columns: minmax(0, 1fr) minmax(220px, 280px);
    }

    .news-col-main { grid-column: 1; order: 1; }
    .news-col-spotlight { grid-column: 2; order: 2; }
    .news-col-popular {
        grid-column: 1 / -1;
        order: 3;
        display: block !important;
    }
}

/* Tablet 640–1023 */
@media (max-width: 767.98px) {
    :root {
        --site-pad: 16px;
        --grid-gap: 20px;
        --fs-card-title: 0.875rem;
        --fs-hero: 1.25rem;
    }

    .news-layout {
        grid-template-columns: minmax(0, 1fr);
    }

    .news-col-main { grid-column: 1; order: 1; }
    .news-col-popular {
        grid-column: 1;
        order: 2;
        display: block !important;
    }
    .news-col-spotlight { grid-column: 1; order: 3; }

    .jh-list-card__media { width: 96px; }
}

/* Mobile <640 */
@media (max-width: 639.98px) {
    :root {
        --site-pad: 16px;
        --section-gap: 28px;
        --fs-section: 0.9375rem;
    }

    .jh-compact-card__media { width: 72px; }
    .jh-list-card {
        gap: var(--space-3);
    }
}

/* Kill legacy ultra-wide stretch overrides */
@media (min-width: 2048px) {
    .container-fluid,
    main.container-fluid {
        max-width: var(--site-max-width) !important;
        margin-inline: auto !important;
        border-radius: 0 !important;
        box-shadow: none !important;
    }
}

/* ---------- Account menu (header) ---------- */
header .jh-account {
    position: relative;
}

header .jh-account__trigger {
    -webkit-appearance: none !important;
    appearance: none !important;
    display: inline-flex !important;
    align-items: center;
    gap: 8px;
    margin: 0;
    padding: 3px 8px 3px 3px !important;
    border: 1px solid transparent !important;
    border-radius: 999px !important;
    background: transparent !important;
    box-shadow: none !important;
    color: #121212 !important;
    font: inherit;
    line-height: 1;
    cursor: pointer;
}

header .jh-account__trigger:hover,
header .jh-account__trigger:focus,
header .jh-account__trigger[aria-expanded="true"] {
    background: #f3f5f8 !important;
    border-color: #e5e9ef !important;
    outline: none !important;
    box-shadow: none !important;
}

header .jh-account__avatar {
    width: 32px !important;
    height: 32px !important;
    border-radius: 50% !important;
    object-fit: cover !important;
    display: block !important;
    flex-shrink: 0;
}

header .jh-account__avatar--lg {
    width: 40px !important;
    height: 40px !important;
}

header .jh-account__avatar--fallback {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    background: #0038AD !important;
    color: #fff !important;
    font-size: 0.75rem;
    font-weight: 700;
}

header .jh-account__name {
    font-size: 0.875rem;
    font-weight: 600;
    max-width: 7.5rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

header .jh-account__caret {
    font-size: 0.65rem;
    color: #0038AD;
    transition: transform 0.15s ease;
}

header .jh-account__trigger[aria-expanded="true"] .jh-account__caret {
    transform: rotate(180deg);
}

header .dropdown-menu.jh-account__menu {
    width: 280px;
    max-width: calc(100vw - 24px);
    margin-top: 8px !important;
    padding: 0 !important;
    border: 1px solid #e8edf3 !important;
    border-radius: 12px !important;
    background: #fff !important;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.12) !important;
    overflow: hidden;
}

header .jh-account__pad {
    padding: 14px 14px 8px;
}

header .jh-account__identity {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 10px;
    margin-bottom: 12px;
}

header .jh-account__identity-copy {
    min-width: 0;
    flex: 1;
}

header .jh-account__identity-name {
    margin: 0;
    font-size: 0.9375rem;
    font-weight: 700;
    color: #121212;
    line-height: 1.2;
}

header .jh-account__identity-email {
    margin: 2px 0 0;
    font-size: 0.75rem;
    color: #6b6b6b;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

header .jh-account__plan {
    margin-bottom: 10px;
    padding: 10px 12px;
    border-radius: 10px;
    background: #f5f7fa;
    border: 1px solid #e8edf3;
}

header .jh-account__plan--active {
    background: #f3f6fc;
    border-color: #d7e0f2;
}

header .jh-account__plan-row {
    display: flex !important;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
}

header .jh-account__plan-name {
    margin: 0;
    font-size: 0.875rem;
    font-weight: 700;
    color: #121212;
    line-height: 1.25;
}

header .jh-account__plan-meta {
    margin: 2px 0 0;
    font-size: 0.75rem;
    color: #6b6b6b;
}

header .jh-account__plan-badge {
    flex-shrink: 0;
    font-size: 0.625rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    padding: 3px 8px;
    border-radius: 999px;
    background: #fff;
    color: #0038AD;
    border: 1px solid #cfd9ef;
    line-height: 1.2;
}

header .jh-account__plan--active .jh-account__plan-badge {
    background: #0038AD;
    color: #fff;
    border-color: #0038AD;
}

header .jh-account__plan-cta {
    display: inline-block !important;
    margin-top: 8px;
    font-size: 0.8125rem;
    font-weight: 700;
    color: #0038AD !important;
    text-decoration: none !important;
}

header .jh-account__plan-cta:hover {
    color: #C60C30 !important;
}

header .jh-account__nav {
    display: grid;
    gap: 2px;
}

header .jh-account__link {
    display: flex !important;
    align-items: center;
    gap: 10px;
    padding: 9px 10px !important;
    border-radius: 8px;
    color: #121212 !important;
    text-decoration: none !important;
    font-size: 0.875rem !important;
    font-weight: 600;
}

header .jh-account__link i {
    width: 1rem;
    text-align: center;
    color: #64748b;
    font-size: 0.95rem;
}

header .jh-account__link:hover {
    background: #f3f5f8 !important;
}

header .jh-account__footer {
    border-top: 1px solid #eef1f5;
    padding: 6px 8px 8px;
}

header .jh-account__signout {
    -webkit-appearance: none !important;
    appearance: none !important;
    display: flex !important;
    width: 100%;
    align-items: center;
    gap: 10px;
    margin: 0;
    padding: 9px 10px !important;
    border: 0 !important;
    border-radius: 8px !important;
    background: transparent !important;
    box-shadow: none !important;
    color: #C60C30 !important;
    font: inherit;
    font-size: 0.875rem;
    font-weight: 700;
    text-align: left;
    cursor: pointer;
}

header .jh-account__signout:hover,
header .jh-account__signout:focus {
    background: rgba(198, 12, 48, 0.06) !important;
    outline: none !important;
    box-shadow: none !important;
}

header .jh-account__signout i {
    width: 1rem;
    text-align: center;
}
