:root {
    --jaroha-primary: #0F172A;
    --jaroha-secondary: #2563EB;
    --jaroha-accent: #F59E0B;
    --jaroha-success: #10B981;
    --jaroha-bg: #F8FAFC;
    --jaroha-text: #111827;
    --jaroha-muted: #64748b;
    --jaroha-radius: 10px;
    --jaroha-shadow: 0 18px 40px rgba(15, 23, 42, 0.08);
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
    color: var(--jaroha-text);
    background: var(--jaroha-bg);
    margin: 0;
}

h1, h2, h3, h4, h5, h6,
.brand-text,
.navbar-nav .nav-link,
.btn {
    font-family: 'Poppins', system-ui, sans-serif;
}

.page-shell {
    min-height: 100vh;
    padding-top: 88px;
}

.section-title {
    font-size: clamp(1.6rem, 2.5vw, 2.3rem);
    color: var(--jaroha-primary);
    letter-spacing: -0.02em;
}

.section-subtitle {
    color: rgba(255, 255, 255, 0.88);
    font-size: 1.05rem;
    max-width: 680px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.section-link {
    color: var(--jaroha-secondary);
    text-decoration: none;
    font-weight: 600;
}

.shadow-soft {
    box-shadow: var(--jaroha-shadow);
}

.category-pill {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 0.35rem 0.8rem;
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    background: rgba(37, 99, 235, 0.12);
    color: #1d4ed8;
}

.site-header {
    transition: background-color .28s ease, box-shadow .28s ease, backdrop-filter .28s ease;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.78), rgba(15, 23, 42, 0.28));
    z-index: 1040;
}

.site-header.nav-scrolled {
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 8px 30px rgba(15, 23, 42, 0.08);
    backdrop-filter: saturate(180%) blur(10px);
}

.jaroha-navbar {
    padding: 0;
}

.brand-logo {
    width: 40px;
    height: 40px;
}

.brand-logo-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.brand-text {
    color: #ffffff;
    font-size: 1.3rem;
    font-weight: 700;
    letter-spacing: -0.01em;
}

.navbar-nav .nav-link {
    color: rgba(255, 255, 255, 0.92);
    font-weight: 500;
    font-size: 0.91rem;
    border-radius: 10px;
    padding: .5rem .62rem !important;
    transition: all .2s ease;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.16);
}

.navbar-nav .nav-link.active {
    font-weight: 600;
}

.icon-btn,
.btn-newsletter,
.btn-signin {
    border-radius: 12px;
    font-weight: 600;
}

.icon-btn {
    border: 1px solid rgba(255, 255, 255, 0.35);
    width: 42px;
    height: 42px;
    color: #ffffff;
    background: rgba(15, 23, 42, 0.3);
}

.btn-newsletter {
    background: var(--jaroha-secondary);
    color: #fff;
    border: 0;
    padding: .55rem 1rem;
}

.btn-newsletter:hover {
    background: #1f4ed8;
    color: #fff;
    transform: translateY(-1px);
}

.btn-signin {
    border: 1px solid rgba(255, 255, 255, 0.35);
    color: #ffffff;
    padding: .55rem 1rem;
    background: rgba(15, 23, 42, 0.3);
}

.btn-signin:hover {
    border-color: rgba(255, 255, 255, 0.8);
    color: #ffffff;
    background: rgba(15, 23, 42, 0.45);
}

.site-header.nav-scrolled .brand-text {
    color: var(--jaroha-primary);
}

.site-header.nav-scrolled .navbar-nav .nav-link {
    color: #0f172a;
}

.site-header.nav-scrolled .navbar-nav .nav-link:hover,
.site-header.nav-scrolled .navbar-nav .nav-link.active {
    color: var(--jaroha-secondary);
    background: rgba(37, 99, 235, 0.08);
}

.site-header.nav-scrolled .icon-btn {
    border-color: #dbe3ef;
    color: var(--jaroha-primary);
    background: #fff;
}

.site-header.nav-scrolled .btn-signin {
    border-color: #dbe3ef;
    color: var(--jaroha-primary);
    background: #fff;
}

.site-header.nav-scrolled .btn-signin:hover {
    border-color: var(--jaroha-secondary);
    color: var(--jaroha-secondary);
    background: #fff;
}

/* Contain the grid's negative gutter margin so the hero background cannot
   collapse upward over the preceding news ticker. */
.hero-section {
    display: flow-root;
    padding-top: 0;
}

.hero-feature {
    position: relative;
    height: clamp(430px, 65vh, 580px);
    min-height: clamp(430px, 65vh, 580px);
    border-radius: 0;
    overflow: hidden;
}

.hero-feature .card-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 28%;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    border-radius: inherit;
    display: flex;
    justify-content: flex-end !important;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.04) 0%, rgba(15, 23, 42, 0.04) 58%, rgba(15, 23, 42, 0.88) 100%);
    padding: clamp(1.4rem, 3vw, 2.4rem);
}

.hero-content {
    width: min(100%, 720px);
    max-height: 40%;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.hero-title {
    color: #fff;
    font-size: clamp(1.8rem, 4vw, 3rem);
    line-height: 1.1;
    letter-spacing: -0.02em;
    text-shadow: 0 3px 14px rgba(0, 0, 0, 0.65);
}

.hero-subtitle {
    color: rgba(255, 255, 255, 0.95);
    font-size: 1.05rem;
    max-width: 680px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.55);
}

.hero-subtitle-wrap {
    position: relative;
    max-height: none;
    overflow: hidden;
}

.hero-subtitle-wrap::after {
    content: "";
    position: absolute;
    inset: auto 0 0 0;
    height: 1.8em;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0), rgba(15, 23, 42, 0.92));
    pointer-events: none;
}

/* The cover story card links to its article through a stretched link; the hero
   buttons sit above that overlay so they stay clickable. */
.hero-overlay .btn {
    position: relative;
    z-index: 2;
}

.hero-feature:hover .hero-title {
    color: var(--jaroha-accent);
}

.btn-primary {
    background: var(--jaroha-secondary);
    border-color: var(--jaroha-secondary);
    border-radius: 12px;
    padding: .75rem 1.35rem;
}

.btn-primary:hover {
    background: #1f4ed8;
    border-color: #1f4ed8;
    transform: translateY(-1px);
}

.btn-outline-light {
    border-radius: 12px;
    padding: .75rem 1.35rem;
}

.btn-accent {
    background: var(--jaroha-accent);
    color: #0f172a;
    border: 0;
    border-radius: 12px;
    padding-inline: 1.2rem;
}

.btn-accent:hover {
    background: #f4a100;
}

.mini-feature-card {
    border-radius: 0;
    overflow: hidden;
}

.mini-feature-card .card-img-top {
    height: 176px;
    object-fit: cover;
}

.mini-feature-title {
    font-size: 1.07rem;
    margin: 0;
    color: var(--jaroha-primary);
}

.story-card-link:hover .mini-feature-title {
    color: var(--jaroha-secondary);
}

.ad-placeholder {
    border: 1px dashed #b9c6dc;
    border-radius: var(--jaroha-radius);
    background: linear-gradient(135deg, #f8fbff, #edf3ff);
    color: #334155;
    font-weight: 600;
    display: flex;
    justify-content: center;
    align-items: center;
}

.ad-top-banner {
    min-height: 96px;
}

.ad-inline {
    min-height: 96px;
}

.ad-sidebar {
    min-height: 300px;
}

.story-card {
    border-radius: var(--jaroha-radius);
    overflow: hidden;
    transition: transform .25s ease, box-shadow .25s ease;
}

.story-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 22px 40px rgba(15, 23, 42, 0.14);
}

.story-card-link {
    display: block;
    height: 100%;
    color: inherit;
    text-decoration: none;
}

.story-card-link:hover .story-title {
    color: var(--jaroha-secondary);
}

.story-card-link:hover .compact-card h4,
.story-card-link:hover .featured-main-title {
    color: var(--jaroha-secondary);
}

.story-image-wrap {
    overflow: hidden;
}

.story-card img {
    height: 210px;
    object-fit: cover;
    transition: transform .45s ease;
}

.story-card:hover img {
    transform: scale(1.07);
}

.story-title {
    font-size: 1.1rem;
    line-height: 1.35;
    color: var(--jaroha-primary);
}

.story-excerpt {
    color: var(--jaroha-muted);
    font-size: 0.95rem;
}

.read-time {
    color: #475569;
    font-weight: 600;
}

.bg-pattern {
    background: radial-gradient(circle at 10% 20%, rgba(37, 99, 235, 0.07), transparent 38%),
                radial-gradient(circle at 90% 10%, rgba(245, 158, 11, 0.08), transparent 36%),
                #f6f9ff;
}

.category-card {
    --overlay: linear-gradient(180deg, rgba(15, 23, 42, .28), rgba(15, 23, 42, .78));
    border-radius: var(--jaroha-radius);
    min-height: 170px;
    text-decoration: none;
    color: #fff;
    padding: 1rem;
    position: relative;
    isolation: isolate;
    display: flex;
    flex-direction: column;
    justify-content: end;
    overflow: hidden;
    box-shadow: var(--jaroha-shadow);
    transition: transform .25s ease;
}

.category-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background: var(--overlay), var(--bg) center/cover no-repeat;
    z-index: -2;
}

.category-card::after {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(255,255,255,0.14);
    backdrop-filter: blur(5px);
    z-index: -1;
}

.category-card:hover {
    transform: translateY(-5px);
}

.category-card i {
    font-size: 1.2rem;
}

.category-card h3 {
    margin: .45rem 0 0;
    font-size: 1.1rem;
}

.category-card p {
    margin: .15rem 0 0;
    color: rgba(255,255,255,.85);
    font-size: .85rem;
}

.featured-main,
.compact-card,
.video-card,
.newsletter-card {
    border-radius: var(--jaroha-radius);
}

.featured-main img {
    height: 340px;
    object-fit: cover;
}

.featured-main-title {
    color: var(--jaroha-primary);
    font-size: clamp(1.4rem, 2.2vw, 2rem);
}

.compact-card h4 {
    margin-top: .7rem;
    margin-bottom: 0;
    font-size: 1rem;
    line-height: 1.35;
    color: var(--jaroha-primary);
}

.video-thumb {
    position: relative;
    overflow: hidden;
    border-top-left-radius: calc(var(--jaroha-radius) - 1px);
    border-top-right-radius: calc(var(--jaroha-radius) - 1px);
}

.video-thumb img {
    width: 100%;
    height: 230px;
    object-fit: cover;
}

.play-btn {
    width: 58px;
    height: 58px;
    border-radius: 50%;
    background: rgba(15, 23, 42, 0.76);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    font-size: 1.65rem;
}

.video-duration {
    position: absolute;
    right: 12px;
    bottom: 12px;
    background: rgba(0,0,0,.8);
    color: #fff;
    border-radius: 999px;
    padding: .2rem .6rem;
    font-size: .78rem;
    font-weight: 600;
}

.video-title {
    margin: 0;
    color: var(--jaroha-primary);
    font-size: 1.03rem;
}

.newsletter-card {
    background: linear-gradient(135deg, #0f172a, #1f3b8b 60%, #2563eb);
    padding: clamp(1.25rem, 3vw, 2.25rem);
    box-shadow: var(--jaroha-shadow);
}

.newsletter-card .form-control {
    border-radius: 12px;
    border: 0;
}

.trust-indicators span {
    color: rgba(255,255,255,.88);
    font-size: .9rem;
    font-weight: 500;
}

.trust-indicators i {
    color: #86efac;
}

.site-footer {
    background: #0B1220;
    color: #cbd5e1;
    padding: 3rem 0 2rem;
}

.footer-brand .brand-logo {
    width: 44px;
    height: 44px;
}

.footer-title {
    color: #fff;
    margin-bottom: .9rem;
    font-weight: 600;
}

.footer-text {
    max-width: 360px;
    color: #94a3b8;
}

.footer-links li + li {
    margin-top: .4rem;
}

.footer-links a {
    color: #cbd5e1;
    text-decoration: none;
}

.footer-links a:hover {
    color: #fff;
}

.footer-newsletter .form-control {
    background: #111b2e;
    border: 1px solid #22304a;
    color: #fff;
    border-radius: 12px;
}

.footer-newsletter .form-control::placeholder {
    color: #94a3b8;
}

.social-links a {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #121e33;
    color: #cbd5e1;
    text-decoration: none;
    transition: all .2s ease;
}

.social-links a:hover {
    color: #fff;
    background: var(--jaroha-secondary);
}

.footer-bottom {
    border-top: 1px solid rgba(203, 213, 225, 0.2);
    color: #94a3b8;
    font-size: .9rem;
}

@media (max-width: 1199.98px) {
    .jaroha-navbar {
        background: rgba(255, 255, 255, 0.98);
        border-bottom: 1px solid #e2e8f0;
    }

    .brand-text,
    .navbar-nav .nav-link {
        color: #0f172a;
    }

    .navbar-nav .nav-link:hover,
    .navbar-nav .nav-link.active {
        color: var(--jaroha-secondary);
        background: rgba(37, 99, 235, 0.08);
    }

    .icon-btn {
        border-color: #dbe3ef;
        color: var(--jaroha-primary);
        background: #fff;
    }

    .btn-signin {
        border-color: #dbe3ef;
        color: var(--jaroha-primary);
        background: #fff;
    }

    .nav-actions {
        padding: .75rem 0 .25rem;
    }
}

@media (max-width: 991.98px) {
    .page-shell {
        padding-top: 80px;
    }

    .hero-feature {
        min-height: 480px;
    }

    .featured-main img {
        height: 260px;
    }
}

@media (max-width: 767.98px) {
    .hero-overlay {
        padding: 1.25rem;
    }

    .hero-title {
        font-size: 1.75rem;
    }

    .site-footer {
        padding-top: 2.2rem;
    }
}

/* =========================================================
   Editorial enhancements
   ========================================================= */

.section-kicker {
    display: inline-block;
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: var(--jaroha-secondary);
    margin-bottom: .3rem;
}

/* Grouped navigation dropdowns */
.jaroha-dropdown {
    min-width: 290px;
    padding: .5rem;
    border-radius: 16px;
    box-shadow: 0 24px 60px rgba(15, 23, 42, .18);
}

.jaroha-dropdown .dropdown-item {
    display: flex;
    align-items: flex-start;
    gap: .8rem;
    border-radius: 12px;
    padding: .6rem .7rem;
    white-space: normal;
}

.jaroha-dropdown .dropdown-item i {
    font-size: 1.1rem;
    color: var(--jaroha-secondary);
    margin-top: .12rem;
    flex: 0 0 auto;
}

.jaroha-dropdown .dd-name {
    display: block;
    font-weight: 600;
    color: var(--jaroha-primary);
    line-height: 1.2;
}

.jaroha-dropdown .dd-tagline {
    display: block;
    color: var(--jaroha-muted);
    font-size: .78rem;
    line-height: 1.3;
}

.jaroha-dropdown .dropdown-item:hover,
.jaroha-dropdown .dropdown-item:focus,
.jaroha-dropdown .dropdown-item.active {
    background: rgba(37, 99, 235, .08);
}

.jaroha-dropdown .dropdown-item.active .dd-name {
    color: var(--jaroha-secondary);
}

/* Trending news ticker */
.news-ticker {
    display: flex;
    align-items: stretch;
    background: #0B1220;
    color: #e2e8f0;
    overflow: hidden;
}

.ticker-label {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    background: var(--jaroha-accent);
    color: #0f172a;
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    font-size: .74rem;
    text-transform: uppercase;
    letter-spacing: .06em;
    padding: .6rem 1.1rem;
    flex: 0 0 auto;
}

.ticker-viewport {
    position: relative;
    flex: 1 1 auto;
    overflow: hidden;
    display: flex;
    align-items: center;
}

/* Non-interactive edge fades stay anchored to the viewport as headlines move. */
.ticker-viewport::before,
.ticker-viewport::after {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    width: 3%;
    z-index: 1;
    pointer-events: none;
}

.ticker-viewport::before {
    left: 0;
    background: linear-gradient(90deg, #0B1220, rgba(11, 18, 32, 0));
}

.ticker-viewport::after {
    right: 0;
    background: linear-gradient(270deg, #0B1220, rgba(11, 18, 32, 0));
}

.ticker-track {
    display: flex;
    align-items: center;
    gap: 2.5rem;
    white-space: nowrap;
    padding-left: 1.5rem;
    animation: ticker-scroll 45s linear infinite;
}

.ticker-item {
    display: inline-flex;
    align-items: center;
    color: #e2e8f0;
    text-decoration: none;
    font-size: .88rem;
    font-weight: 500;
}

.ticker-item::before {
    content: "";
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--jaroha-secondary);
    margin-right: .6rem;
    vertical-align: middle;
}

.ticker-item:hover {
    color: #fff;
    text-decoration: underline;
}

@keyframes ticker-scroll {
    from { transform: translateX(0); }
    to { transform: translateX(-50%); }
}

@media (prefers-reduced-motion: reduce) {
    .ticker-track {
        animation: none;
    }
}

/* Advertising units */
.ad-unit {
    text-align: center;
}

.ad-caption {
    display: block;
    font-size: .66rem;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: #94a3b8;
    font-weight: 600;
    margin-bottom: .4rem;
}

/* Most read list */
.most-read-list {
    counter-reset: mr;
    list-style: none;
    padding: 0;
    margin: 0;
}

.most-read-list li {
    counter-increment: mr;
    display: flex;
    gap: .85rem;
    padding: .8rem 0;
    border-bottom: 1px solid #e2e8f0;
}

.most-read-list li:last-child {
    border-bottom: 0;
}

.most-read-list li::before {
    content: counter(mr, decimal-leading-zero);
    font-family: 'Poppins', sans-serif;
    font-weight: 800;
    font-size: 1.2rem;
    line-height: 1;
    color: var(--jaroha-secondary);
}

.most-read-list a {
    color: var(--jaroha-primary);
    text-decoration: none;
    font-weight: 600;
    font-size: .95rem;
    line-height: 1.35;
}

.most-read-list a:hover {
    color: var(--jaroha-secondary);
}

/* Category (section) hero */
.category-hero {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    color: #fff;
    background: #0f172a;
    padding: clamp(2.5rem, 6vw, 4.5rem) 0;
}

.category-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background-image: linear-gradient(120deg, rgba(15, 23, 42, .93), rgba(15, 23, 42, .58)), var(--hero-image);
    background-size: cover;
    background-position: center;
}

.category-hero-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    border-radius: 14px;
    background: rgba(255, 255, 255, .14);
    color: #fff;
    font-size: 1.4rem;
    margin-bottom: 1rem;
}

.category-hero h1 {
    font-size: clamp(2rem, 4.5vw, 3.1rem);
    letter-spacing: -.02em;
    margin-bottom: .75rem;
}

.category-hero p {
    max-width: 660px;
    color: rgba(255, 255, 255, .85);
    font-size: 1.05rem;
}

/* Breadcrumb links read on light pages by default; the dark category hero
   overrides them below. */
.jaroha-breadcrumb a {
    color: var(--jaroha-secondary);
    text-decoration: none;
}

.jaroha-breadcrumb a:hover {
    color: #1f4ed8;
    text-decoration: underline;
}

.category-hero .jaroha-breadcrumb a {
    color: rgba(255, 255, 255, .75);
}

.category-hero .jaroha-breadcrumb a:hover {
    color: #fff;
}

/* Section navigation list (category pages) */
.section-nav-list li + li {
    margin-top: .25rem;
}

.section-nav-list a {
    display: flex;
    align-items: center;
    gap: .6rem;
    padding: .55rem .8rem;
    border-radius: 12px;
    color: var(--jaroha-primary);
    text-decoration: none;
    font-weight: 500;
    background: #fff;
    box-shadow: var(--jaroha-shadow);
}

.section-nav-list a:hover {
    color: var(--jaroha-secondary);
}

.section-nav-list li.active a {
    background: var(--jaroha-secondary);
    color: #fff;
}

/* Advertise page */
.pricing-card,
.stat-card {
    border-radius: var(--jaroha-radius);
}

.pricing-card.featured {
    border: 2px solid var(--jaroha-secondary);
}

.pricing-card h3 {
    font-size: 1.15rem;
    color: var(--jaroha-primary);
}

.stat-value {
    display: block;
    font-family: 'Poppins', sans-serif;
    font-weight: 800;
    font-size: 1.9rem;
    color: var(--jaroha-secondary);
}

.feature-list li {
    display: flex;
    gap: .7rem;
    align-items: flex-start;
    padding: .5rem 0;
    color: var(--jaroha-text);
}

.feature-list i {
    color: var(--jaroha-success);
    margin-top: .15rem;
}

.jaroha-search-panel {
    background: var(--jaroha-bg);
    border-bottom: 3px solid var(--jaroha-secondary);
}

.jaroha-search-panel .offcanvas-body {
    padding-bottom: 2rem;
}

.story-title-link {
    color: inherit;
    text-decoration: none;
}

.story-title-link:hover {
    color: var(--jaroha-secondary);
}

.search-inline .input-group {
    max-width: 640px;
}

/* Simple article page (API-backed stories) */
.article-simple-body {
    color: var(--jaroha-text);
    font-size: 1.05rem;
    line-height: 1.8;
    max-width: 760px;
    white-space: pre-line;
}

@media (max-width: 767.98px) {
    .ticker-label span,
    .ticker-label {
        font-size: .68rem;
    }

    .jaroha-dropdown {
        min-width: 0;
    }
}

/* Home page polish */
.hero-section {
    background:
        radial-gradient(circle at 12% 8%, rgba(37, 99, 235, 0.12), transparent 32%),
        radial-gradient(circle at 88% 14%, rgba(245, 158, 11, 0.10), transparent 35%),
        linear-gradient(180deg, #f8fbff, #f8fafc 58%);
}

/* Recently Published section — light off-white gradient overlay */
.recently-published-section {
    background: linear-gradient(180deg, #f1f5f9, #e8edf5 50%, #f1f5f9);
}

/* Most Read section */
.most-read-section {
    background: var(--jaroha-bg);
}

.section-header {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

/* Append at end of file to override earlier rules safely */

/* Strong scoped overrides for Trending + hero alignment */

.hero-section .row {
    align-items: stretch;
}

.hero-side-column {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.hero-side-column .story-card-link {
    flex: 1 1 0;
    min-height: 0;
}

.hero-side-column .mini-feature-card {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.trending-section {
    padding-top: 1.5rem;
    padding-bottom: 1.5rem;
}

/* Keep cards fixed square in Trending + Latest */
.trending-section .trending-card-col,
.recently-published-section .row > [class*="col-"] {
    display: flex;
}

.trending-section .trending-card-link,
.recently-published-section .story-card-link {
    width: 100%;
}

.trending-section .story-card,
.recently-published-section .story-card {
    width: 100%;
    aspect-ratio: 1 / 1;
    display: grid;
    grid-template-rows: 52% 48%;
    overflow: hidden;
}

/* Category pill on image bottom */
.trending-section .story-image-wrap,
.recently-published-section .story-image-wrap {
    position: relative;
    height: 100%;
    overflow: hidden;
}

.story-image-category {
    position: absolute;
    left: 0.75rem;
    bottom: 0.75rem;
    z-index: 2;
    width: auto;
    max-width: max-content;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.18);
}

/* Better title/excerpt readability with fixed height */
.trending-section .story-card .card-body,
.recently-published-section .story-card .card-body {
    min-height: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    padding: 0.95rem 1rem 1rem;
}

.trending-section .story-title,
.recently-published-section .story-title {
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.trending-section .story-excerpt,
.recently-published-section .story-excerpt {
    margin-top: auto;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Hero cards: keep category pill natural width and prevent content clipping */
.hero-content {
    align-items: flex-start;
    max-height: none;
}

.hero-content .category-pill {
    align-self: flex-start;
}

.hero-subtitle-wrap {
    max-height: none;
}

.hero-side-column .mini-feature-card {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.hero-side-column .mini-feature-card .card-body {
    overflow: hidden;
}

.hero-side-column .mini-feature-title {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Trending title should look like plain heading text, but remain clickable */
.section-title-link,
.section-title-link:link,
.section-title-link:visited,
.section-title-link:hover,
.section-title-link:active,
.section-title-link:focus {
    color: var(--jaroha-primary);
    text-decoration: none;
}

/* Main hero: stronger contrast for title readability */
.hero-overlay {
    background: linear-gradient(
        180deg,
        rgba(15, 23, 42, 0.14) 0%,
        rgba(15, 23, 42, 0.28) 42%,
        rgba(15, 23, 42, 0.76) 72%,
        rgba(15, 23, 42, 0.94) 100%);
}

.hero-title {
    text-shadow: 0 3px 14px rgba(0, 0, 0, 0.65);
}

.hero-subtitle {
    color: rgba(255, 255, 255, 0.95);
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.55);
}

/* Hero small cards: category pill on image bottom */
.hero-side-column .story-image-wrap {
    position: relative;
    overflow: hidden;
}

.hero-side-column .story-image-category {
    position: absolute;
    left: 0.75rem;
    bottom: 0.75rem;
    z-index: 2;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.2);
}

/* Privacy Policy and Terms of Use */
.legal-page { max-width: 780px; line-height: 1.7; }
.legal-page h2 { font-size: 1.35rem; margin-top: 2.25rem; margin-bottom: .75rem; scroll-margin-top: 110px; }
.legal-page h3 { font-size: 1.05rem; margin-top: 1.5rem; }
.legal-page table { font-size: .92rem; }
.legal-toc { position: sticky; top: 110px; display: flex; flex-direction: column; gap: .35rem; }
.legal-toc a { color: var(--jaroha-secondary, #475569); text-decoration: none; font-size: .92rem; }
.legal-toc a:hover { color: #1f4ed8; }
.legal-hero { padding: clamp(2rem, 4vw, 3rem) 0; }
