:root {
    --primary: #111827;
    --secondary: #f8fafc;
    --accent: #dc2626;
    --text: #1f2937;
    --muted: #6b7280;
    --card: #ffffff;
    --border: #e5e7eb;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 145px;
}

body {
    font-family: 'Inter', sans-serif;
    background: var(--secondary);
    color: var(--text);
    line-height: 1.7;
}

a {
    color: inherit;
}

.container {
    width: min(92%, 1440px);
    margin: 0 auto;
}

/* HOMEPAGE HEADER */

header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: #fff;
    border-bottom: 1px solid var(--border);
}

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    padding: 17px 0;
}

.logo {
    color: var(--primary);
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: 2px;
    text-decoration: none;
}

.logo span {
    color: var(--accent);
}

.header-right {
    display: flex;
    gap: 18px;
    font-size: 1.2rem;
}

nav {
    padding: 0 0 15px;
}

nav ul {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 26px;
    list-style: none;
}

nav a {
    color: var(--primary);
    font-weight: 600;
    text-decoration: none;
    transition: color .2s ease;
}

nav a:hover,
nav a:focus {
    color: var(--accent);
}

/* ARTICLE PAGE NAVBAR - HOMEPAGE MATCH */

.article-home-header {
    position: relative !important;
    width: 100%;
    background: #fff !important;
    border-bottom: 2px solid #e3262e !important;
    padding: 15px 5.7% 24px !important;
    margin: 0;
    z-index: 1000;
}

.article-home-header-inner {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

.article-home-header .article-home-logo {
    display: inline-block;
    color: #111827 !important;
    font-size: 44px !important;
    font-weight: 800 !important;
    letter-spacing: 2px !important;
    line-height: 1.2 !important;
    text-decoration: none !important;
    margin: 0 0 35px !important;
}

.article-home-header .article-home-logo span {
    color: #dc2626 !important;
}

.article-home-header nav.article-home-nav {
    display: flex;
    width: 100%;
    padding: 0 !important;
    margin: 0 !important;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.article-home-header nav.article-home-nav a {
    color: #111827 !important;
    font-family: 'Inter', sans-serif;
    font-size: 21px !important;
    font-weight: 600 !important;
    text-decoration: none !important;
    white-space: nowrap;
}

.article-home-header nav.article-home-nav a:hover {
    color: #dc2626 !important;
}

.article-home-header .menu-toggle {
    display: none;
}

/* BREAKING NEWS */

.breaking {
    overflow: hidden;
    padding: 10px 4%;
    background: var(--accent);
    color: #fff;
    font-weight: 700;
    text-align: center;
}

.breaking-news {
    background: #e3262e;
    color: #fff;
    padding: 15px 20px;
    text-align: center;
}

.breaking-news p {
    margin: 0;
    font-size: 16px;
    font-weight: 800;
}

/* HERO */



.hero {
    min-height: 570px;
    margin-top: 25px;
    display: flex;
    align-items: flex-end;
    overflow: hidden;
    border-radius: 22px;

    background:
        linear-gradient(
            0deg,
            rgba(0,0,0,.78),
            rgba(0,0,0,.12)
        ),
        url("Images/bharat-mandapam.png")
        center center / cover no-repeat;
}



.hero-content {
    max-width: 850px;
    padding: 56px;
    color: #fff;
}

.tag {
    display: inline-block;
    margin-bottom: 18px;
    padding: 7px 15px;
    border-radius: 30px;
    background: var(--accent);
    font-size: .8rem;
    font-weight: 800;
}

.hero h1 {
    margin-bottom: 18px;
    font-family: 'Playfair Display', serif;
    font-size: clamp(2.2rem, 5vw, 4rem);
    line-height: 1.12;
}

.hero p {
    max-width: 700px;
    margin-bottom: 25px;
    font-size: 1.05rem;
}

.hero-btn {
    display: inline-block;
    padding: 12px 24px;
    border-radius: 8px;
    background: #fff;
    color: #111;
    font-weight: 700;
    text-decoration: none;
}

.hero-btn:hover {
    background: #f3f4f6;
}

/* SECTION TITLES */

.section-title {
    margin: 52px 0 22px;
    font-family: 'Playfair Display', serif;
    font-size: clamp(1.7rem, 3vw, 2.2rem);
}

/* TRENDING */

.trending-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 22px;
}

.trend-card,
.news-card,
.side-box {
    background: var(--card);
    border: 1px solid rgba(229,231,235,.7);
    border-radius: 15px;
    box-shadow: 0 3px 16px rgba(0,0,0,.045);
}

.trend-card {
    padding: 23px;
    transition: transform .2s ease, box-shadow .2s ease;
}

.trend-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0,0,0,.08);
}

.trend-card h3 {
    font-size: 1.05rem;
    line-height: 1.45;
}

.trend-card p {
    margin-top: 9px;
    color: var(--muted);
    font-size: .93rem;
}

/* MAIN LAYOUT */

.main-layout {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(260px, 1fr);
    gap: 32px;
    align-items: start;
    margin-top: 35px;
}

.news-feed {
    display: flex;
    flex-direction: column;
    gap: 20px;
    min-width: 0;
}

.news-feed > .section-title {
    margin-top: 10px;
}

/* NEWS CARDS */

.news-card {
    display: flex;
    gap: 20px;
    padding: 18px;
}

.news-card img {
    width: 245px;
    min-width: 245px;
    height: 165px;
    object-fit: cover;
    border-radius: 10px;
}

.news-card span {
    color: var(--accent);
    font-size: .78rem;
    font-weight: 800;
    text-transform: uppercase;
}

.news-card h3 {
    margin: 5px 0 8px;
    line-height: 1.35;
}

.news-card p {
    color: var(--muted);
    font-size: .93rem;
}

.read-more {
    display: inline-block;
    margin-top: 9px;
    color: var(--accent);
    font-weight: 700;
    text-decoration: none;
}

/* SIDEBAR */

.sidebar {
    position: sticky;
    top: 145px;
}

.side-box {
    margin-bottom: 22px;
    padding: 22px;
}

.side-box h3 {
    margin-bottom: 13px;
}

.side-box ol {
    padding-left: 20px;
}

.side-box li {
    margin-bottom: 11px;
}

.side-box a {
    color: var(--primary);
    text-decoration: none;
}

.side-box a:hover {
    color: var(--accent);
}

/* CATEGORY SECTIONS */

.category-section {
    margin-top: 42px;
}

.category-section .section-title {
    margin-top: 0;
}

/* VIDEOS */

.video-grid .trend-card img {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    border-radius: 10px;
    margin-bottom: 10px;
}

.video-grid .trend-card a {
    color: inherit;
    text-decoration: none;
    display: block;
}

.video-grid .trend-card h3 {
    margin: 12px 0 0;
}

.video-grid .trend-card a:hover h3 {
    color: var(--accent);
}

.video-error {
    color: #b91c1c;
    margin: 8px 0 12px;
}

/* NEWSLETTER */

.newsletter {
    margin: 75px 0;
    padding: 65px 25px;
    border-radius: 20px;
    background: var(--primary);
    color: #fff;
    text-align: center;
}

.newsletter h2 {
    margin-bottom: 12px;
    font: 700 clamp(1.8rem, 4vw, 3rem)
        'Playfair Display', serif;
}

.newsletter p {
    max-width: 700px;
    margin: 0 auto 25px;
    color: #e5e7eb;
}

.newsletter form {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
}

.newsletter input {
    width: min(350px, 100%);
    padding: 14px 16px;
    border: 0;
    border-radius: 8px;
    font: inherit;
}

.newsletter button {
    padding: 14px 24px;
    border: 0;
    border-radius: 8px;
    background: var(--accent);
    color: #fff;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}

.newsletter button:hover {
    background: #b91c1c;
}

#subscribe-message {
    min-height: 1.5em;
    margin-top: 14px;
    color: #fff;
}

/* FOOTER */

footer {
    margin-top: 70px;
    padding: 60px 0 25px;
    background: #0f172a;
    color: #fff;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 35px;
}

footer h3 {
    margin-bottom: 15px;
}
.top-bar {
    width: 100%;
    background: #111827;
    color: #ffffff;
    padding: 9px 5.7%;
    text-align: center;
}

.top-bar p {
    margin: 0;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 2px;
}

/* =====================================
   FOOTNOTE PREMIUM EDITORIAL HEADER
===================================== */

.premium-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    width: 100%;
    background: #ffffff;
    border-bottom: 5px solid #dc2626;
    box-shadow: 0 4px 18px rgba(0,0,0,0.035);
}

/* Top dark strip */

.premium-topline {
    min-height: 42px;
    padding: 10px 4.5%;
    background: #111827;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1px;
}

/* Main header */

.premium-header-inner {
    padding-top: 18px;
}

/* Masthead and FOOTNOTE logo - consistent on every premium page */

.premium-masthead {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 82px;
    padding: 8px 0 18px;
}

.premium-brand {
    display: inline-flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 5px;
    margin: 0;
    padding: 0;
    color: inherit;
    text-decoration: none !important;
    border: 0;
    box-shadow: none;
    line-height: 1;
}

.premium-brand::before,
.premium-brand::after {
    content: none !important;
    display: none !important;
}

.premium-logo {
    display: block;
    margin: 0;
    padding: 0;
    color: #111827;
    font-size: 39px;
    font-weight: 800;
    line-height: 1;
    letter-spacing: -1.5px;
    text-decoration: none !important;
    border: 0;
}

.premium-logo span {
    color: #dc2626;
}

.premium-brand p {
    margin: 0;
    color: #667085;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 1px;
    line-height: 1.3;
}

/* Search, dark mode, profile */

.premium-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

.premium-actions button,
.premium-actions a {
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0;
    background: transparent;
    color: #111827;
    font-size: 25px;
    cursor: pointer;
    text-decoration: none;
}

.premium-actions .dark-btn {
    padding: 0;
}

/* Navigation: consistent baseline and compact spacing */

.premium-header nav.premium-nav {
    display: block;
    width: 100%;
    padding: 0 !important;
    margin: 0;
    border-top: 2px solid #111827;
}

.premium-header nav.premium-nav ul {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    flex-wrap: nowrap;
    gap: 0 22px;
    width: 100%;
    list-style: none;
    margin: 0;
    padding: 13px 0 0;
}

.premium-header nav.premium-nav li {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    margin: 0;
    padding: 0;
}

.premium-header nav.premium-nav a {
    position: relative;
    display: inline-flex;
    align-items: center;
    min-height: 27px;
    margin: 0;
    padding: 0 0 10px;
    color: #111827;
    font-size: 12px;
    font-weight: 800;
    line-height: 17px;
    letter-spacing: .4px;
    text-decoration: none !important;
    white-space: nowrap;
    transition: color .2s ease;
}

.premium-header nav.premium-nav a:hover,
.premium-header nav.premium-nav a.active,
.premium-header nav.premium-nav a[aria-current="page"] {
    color: #dc2626;
}

/* Active link uses red text only; no underline */

.premium-header nav.premium-nav a.active::after,
.premium-header nav.premium-nav a[aria-current="page"]::after {
    content: none !important;
    display: none !important;
}

@media (max-width: 1100px) {
    .premium-header nav.premium-nav ul {
        gap: 0 18px;
    }
}

/* Mobile and tablet: keep nav on one scrollable line */

@media (max-width: 900px) {
    .premium-header-inner {
        padding-top: 14px;
    }

    .premium-masthead {
        min-height: 65px;
        padding: 5px 0 14px;
    }

    .premium-logo {
        font-size: 34px;
    }

    .premium-header nav.premium-nav ul {
        justify-content: flex-start;
        flex-wrap: nowrap;
        overflow-x: auto;
        gap: 0 20px;
        padding-top: 12px;
        scrollbar-width: none;
    }

    .premium-header nav.premium-nav ul::-webkit-scrollbar {
        display: none;
    }

    .premium-header nav.premium-nav a {
        font-size: 11px;
    }
}

@media (max-width: 650px) {
    .premium-topline {
        justify-content: center;
        text-align: center;
        padding: 9px 10px;
        font-size: 9px;
    }

    .premium-header-inner {
        padding-top: 12px;
    }

    .premium-masthead {
        min-height: 58px;
        padding: 4px 0 12px;
    }

    .premium-logo {
        font-size: 30px;
    }

    .premium-brand p {
        font-size: 8px;
    }

    .premium-actions {
        gap: 12px;
    }

    .premium-actions button,
    .premium-actions a {
        font-size: 20px;
    }

    .premium-header nav.premium-nav ul {
        gap: 0 18px;
    }
}

/* COMPACT BREAKING NEWS BAR */

.breaking {
    padding: 2px 15px !important;
    min-height: 0 !important;
    height: auto !important;
    line-height: 1.2 !important;
    font-size: 14px !important;
    margin: 0 !important;
}

.breaking p {
    margin: 0 !important;
    padding: 0 !important;
}

/* BREAKING NEWS ALIGNMENT FIX */

.breaking {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    min-height: 36px !important;
    padding: 5px 15px !important;
    line-height: 1.3 !important;
    position: relative;
    top: 4px;
    margin-bottom: 4px;
}

/* REMOVE ACTIVE NAVIGATION UNDERLINE */

.premium-header nav.premium-nav a.active::after {
    display: none !important;
}

/* =====================================
   FOOTNOTE DARK MODE DESIGN
===================================== */

body.dark-mode {
    background: #101318 !important;
    color: #e8eaf0 !important;

    --primary: #f1f2f5;
    --secondary: #101318;
    --text: #e8eaf0;
    --muted: #a5adba;
    --card: #1c222c;
    --border: #343b47;
}

/* Main sections */

body.dark-mode main,
body.dark-mode .article-page {
    background: #101318;
    color: #e8eaf0;
}

/* Header */

body.dark-mode .premium-header,
body.dark-mode .premium-header-inner {
    background: #171b22 !important;
}

body.dark-mode .premium-logo,
body.dark-mode .premium-actions button,
body.dark-mode .premium-actions a,
body.dark-mode .premium-nav a {
    color: #f1f2f5 !important;
}

body.dark-mode .premium-brand p {
    color: #a5adba;
}

/* Navigation */

body.dark-mode .premium-header nav.premium-nav {
    border-top-color: #414957;
}
body.dark-mode .premium-header nav.premium-nav a.active {
    color: #ff5964 !important;
}

/* Cards */

body.dark-mode .news-card,
body.dark-mode .trend-card,
body.dark-mode .side-box,
body.dark-mode .sidebar-box {
    background: #1c222c;
    color: #e8eaf0;
    border-color: #343b47;
}

body.dark-mode .news-card h3,
body.dark-mode .trend-card h3,
body.dark-mode .side-box h3,
body.dark-mode .sidebar-box h3 {
    color: #f1f2f5;
}

/* Article */

body.dark-mode .article-heading h1,
body.dark-mode .article-body,
body.dark-mode .article-breadcrumb,
body.dark-mode .article-author,
body.dark-mode .related-heading h2 {
    color: #e8eaf0;
}

body.dark-mode .article-subtitle,
body.dark-mode .article-meta,
body.dark-mode .article-breadcrumb a {
    color: #a5adba;
}

body.dark-mode .related-links a {
    background: #1c222c;
    color: #e8eaf0;
    border-color: #343b47;
}

/* Footer */

body.dark-mode footer {
    background: #080b10;
}

/* Breaking news stays red */

body.dark-mode .breaking {
    background: #dc2626;
    color: white;
}

/* FIX NEWSLETTER SECTION IN DARK MODE */

body.dark-mode .newsletter {
    background: #1c222c !important;
    color: #ffffff !important;
    border: 1px solid #343b47;
}

body.dark-mode .newsletter h2 {
    color: #ffffff !important;
}

body.dark-mode .newsletter p {
    color: #cbd5e1 !important;
}

body.dark-mode .newsletter input {
    background: #ffffff !important;
    color: #111827 !important;
    border: 1px solid #475569;
}

body.dark-mode .newsletter input::placeholder {
    color: #6b7280;
}

body.dark-mode .newsletter button {
    background: #dc2626 !important;
    color: #ffffff !important;
}

body.dark-mode #subscribe-message {
    color: #ffffff !important;
}
/* FOOTNOTE NEWSLETTER - LIGHT MODE */

.newsletter {
    background: #e2e8f0 !important;
    color: #111827 !important;
    border: 1px solid #cbd5e1;
    border-radius: 24px;
}

.newsletter h2 {
    color: #111827 !important;
}

.newsletter p {
    color: #334155 !important;
}

.newsletter .newsletter-email-label {
    color: #111827 !important;
}

/* FOOTNOTE ARTICLE TITLE - REFINED SIZE */

.article-heading h1 {
    font-family: 'Playfair Display', Georgia, serif !important;
    font-size: clamp(36px, 4.5vw, 58px) !important;
    line-height: 1.12 !important;
    letter-spacing: -1.3px !important;
    font-weight: 700 !important;
    color: #111827 !important;
    margin-bottom: 22px !important;
}

/* Mobile title */

@media (max-width: 600px) {
    .article-heading h1 {
        font-size: 36px !important;
        line-height: 1.15 !important;
        letter-spacing: -0.8px !important;
    }
}

/* Dark mode */

body.dark-mode .article-heading h1 {
    color: #f1f2f5 !important;
}

.article-heading {
    max-width: 1400px !important;
}

.article-heading h1 {
    font-size: clamp(24px, 3vw, 42px) !important;
    line-height: 1.2 !important;
    letter-spacing: -1px !important;
    white-space: nowrap !important;
}

@media (max-width: 768px) {
    .article-heading h1 {
        white-space: normal !important;
        font-size: 32px !important;
    }
}

/* Active category navigation */

.site-nav .nav-links a.active {
    color: #dc2626 !important;
    font-weight: 800;
}

/* MOBILE NAVIGATION - WITHOUT MENU BUTTON */

@media (max-width: 768px) {
    .site-nav .menu-toggle {
        display: none !important;
    }

    .site-nav .nav-links {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        align-items: center;
        gap: 22px !important;
        overflow-x: auto;
        padding: 12px 0 !important;
        margin: 0;
        list-style: none;
        scrollbar-width: none;
    }

    .site-nav .nav-links::-webkit-scrollbar {
        display: none;
    }

    .site-nav .nav-links li {
        flex-shrink: 0;
    }

    .site-nav .nav-links a {
        white-space: nowrap;
        font-size: 13px;
    }
}

.site-nav a.active,
.premium-nav a.active,
.site-nav a[aria-current="page"] {
    color: #dc2626 !important;
    font-weight: 800 !important;
}

/* FOOTNOTE - Premium Videos Page */

.videos-page {
    max-width: 1250px;
    width: 92%;
    margin: 45px auto 75px;
}

.videos-section {
    width: 100%;
}

.videos-heading {
    margin-bottom: 25px;
}

.videos-heading .category-label {
    color: #dc2626;
    font-weight: 700;
    letter-spacing: 1.5px;
}

.videos-heading h1 {
    font-size: 38px;
    margin: 12px 0;
    color: #172033;
}

.videos-heading h1 span {
    color: #dc2626;
}

.videos-heading p {
    color: #64748b;
    font-size: 15px;
}

/* Video gallery layout is defined below for the actual .trend-card markup. */

/* =================================
   FOOTNOTE PREMIUM VIDEO CARD DESIGN
================================= */

#youtubeVideos {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 24px;
    width: 100%;
    margin-top: 25px;
    align-items: start;
}

#youtubeVideos .trend-card {
    display: block;
    min-width: 0;
    overflow: hidden;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.07);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

#youtubeVideos .trend-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.12);
}

#youtubeVideos .trend-card a {
    display: block;
    text-decoration: none;
    color: inherit;
}

#youtubeVideos .trend-card img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    border-radius: 0;
}

#youtubeVideos .trend-card h3 {
    font-size: 16px;
    font-weight: 700;
    line-height: 1.5;
    color: #172033;
    padding: 15px 16px 18px;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 80px;
}

/* Loading and error messages */

#youtubeVideos > p {
    grid-column: 1 / -1;
    color: #64748b;
    padding: 20px 0;
}

#youtubeError {
    color: #dc2626;
    margin-top: 12px;
}

/* Dark mode */

body.dark-mode #youtubeVideos .trend-card {
    background: #1e293b;
    border-color: #334155;
}

body.dark-mode #youtubeVideos .trend-card h3 {
    color: #f1f5f9;
}

/* Tablet */

@media (max-width: 900px) {
    #youtubeVideos {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* Mobile */

@media (max-width: 600px) {
    #youtubeVideos {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    #youtubeVideos .trend-card h3 {
        font-size: 16px;
    }
}

/* FOOTNOTE LOGO - HOMEPAGE AND CATEGORY PAGES */

.premium-header .premium-brand {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
        justify-content: center;
    gap: 3px;
    margin: 0;
    padding: 0;
}

.premium-header .premium-brand .premium-logo {
    display: inline-block;
    margin: 0;
    padding: 0;
    color: #111827;
    font-size: 39px;
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -1.5px;
    text-decoration: none !important;
    border: 0 !important;
}

.premium-header .premium-brand .premium-logo span {
    color: #dc2626;
}

.premium-header .premium-brand p {
    margin: 0;
    padding: 0;
    color: #777;
    font-size: 10px;
    font-weight: 600;
    line-height: 1.4;
    letter-spacing: 1.3px;
}

@media (max-width: 650px) {
    .premium-header .premium-brand .premium-logo {
        font-size: 30px;
    }

    .premium-header .premium-brand p {
        font-size: 8px;
        letter-spacing: 1px;
    }
}

/* Homepage Technology, Business & Opinion cards */

#homepageTechnologyGrid .trend-card,
#homepageBusinessGrid .trend-card,
#homepageOpinionGrid .trend-card {
    height: 220px;
    overflow: hidden;
}

#homepageTechnologyGrid .trend-card p,
#homepageBusinessGrid .trend-card p,
#homepageOpinionGrid .trend-card p {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    overflow: hidden;
}

/* =====================================
   FOOTNOTE CATEGORY NEWS CARD GRID
===================================== */

#categoryNewsGrid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 22px;
    width: 100%;
    align-items: stretch;
    margin: 25px 0 50px;
}

.category-news-card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    height: 100%;
    overflow: hidden;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-news-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.09);
}

.category-news-card > img {
    display: block;
    width: 100%;
    height: 175px;
    object-fit: cover;
}

.category-news-content {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0;
    padding: 17px;
}

.category-news-label {
    color: #dc2626;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    margin-bottom: 8px;
}

.category-news-content h3 {
    font-size: 17px;
    line-height: 1.4;
    margin: 0 0 10px;
    color: #111827;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    overflow: hidden;
}

.category-news-description {
    color: #64748b;
    font-size: 14px;
    line-height: 1.6;
    margin: 0 0 12px;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    overflow: hidden;
}

.category-news-content small {
    color: #64748b;
    font-size: 12px;
    margin-top: auto;
    padding-top: 8px;
}

.category-read-more {
    display: inline-block;
    color: #dc2626;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    margin-top: 10px;
}

.category-read-more:hover {
    text-decoration: underline;
}

/* Tablet */

@media (max-width: 1100px) {
    #categoryNewsGrid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* Mobile */

@media (max-width: 600px) {
    #categoryNewsGrid {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .category-news-card > img {
        height: 200px;
    }
}

/* Dark mode */

body.dark-mode .category-news-card {
    background: #1c222c;
    border-color: #343b47;
}

body.dark-mode .category-news-content h3 {
    color: #f1f2f5;
}

body.dark-mode .category-news-description,
body.dark-mode .category-news-content small {
    color: #a5adba;
}

/* =================================
   FOOTNOTE PREMIUM EDITORIAL FOOTER
================================= */

.premium-footer {
    background: #101827;
    color: #ffffff;
    padding: 65px 0 22px;
    margin-top: 60px;
    border-top: 4px solid #dc2626;
}

.premium-footer-top {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    gap: 45px;
    padding-bottom: 45px;
}

.footer-brand .footer-logo {
    display: inline-block;
    color: #ffffff;
    font-family: 'Inter', sans-serif;
    font-size: 30px;
    font-weight: 800;
    letter-spacing: -1.5px;
    text-decoration: none;
}

.footer-brand .footer-logo span {
    color: #ef4444;
}

.footer-brand p {
    color: #cbd5e1;
    font-size: 14px;
    line-height: 1.9;
    margin-top: 15px;
}

.footer-brand-line {
    width: 45px;
    height: 3px;
    background: #dc2626;
    margin-top: 22px;
}

.footer-column {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 13px;
}

.footer-column h3 {
    color: #ffffff;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 1.5px;
    margin: 4px 0 9px;
}

.footer-column a {
    color: #cbd5e1;
    font-size: 14px;
    text-decoration: none;
    transition: color 0.2s ease, transform 0.2s ease;
}

.footer-column a:hover {
    color: #ff5964;
    transform: translateX(4px);
}

.premium-footer-bottom {
    border-top: 1px solid #374151;
    padding-top: 22px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
}

.premium-footer-bottom p {
    color: #94a3b8;
    font-size: 11px;
    letter-spacing: 0.7px;
    line-height: 1.7;
}

/* TABLET */

@media (max-width: 900px) {
    .premium-footer-top {
        grid-template-columns: repeat(2, 1fr);
        gap: 35px;
    }
}

/* MOBILE */

@media (max-width: 550px) {
    .premium-footer {
        padding: 45px 0 20px;
    }

    .premium-footer-top {
                grid-template-columns: repeat(2, 1fr);
        gap: 35px 20px;
    }

    .footer-brand {
        grid-column: 1 / -1;
    }

    .premium-footer-bottom {
        flex-direction: column;
        align-items: flex-start;
        gap: 7px;
    }
}

/* =========================================
   FOOTNOTE - MODERN PREMIUM NEWSLETTER
========================================= */

.newsletter.newsletter-split {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 45px;
    align-items: center;

    width: calc(100% - 46px);
    max-width: 1500px;
    margin: 65px auto;

    padding: 65px 7%;
    background: #e9edf3;
    border-radius: 20px;
    text-align: left;
    box-sizing: border-box;
}

/* LEFT SIDE */

.newsletter-split .newsletter-left {
    min-width: 0;
}

.newsletter-eyebrow {
    display: inline-block;
    color: #dc2626;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 2px;
    margin-bottom: 18px;
}

.newsletter-split .newsletter-left h2 {
    font-family: 'Playfair Display', serif;
    font-size: clamp(34px, 4vw, 53px);
    line-height: 1.16;
    color: #111827;
    margin: 0 0 18px;
}

.newsletter-split .newsletter-left h2 span {
    color: #dc2626;
}

.newsletter-split .newsletter-left > p {
    max-width: 520px;
    color: #475569;
    font-size: 15px;
    line-height: 1.85;
    margin-bottom: 25px;
}

/* FORM */

.newsletter-split #newsletter-form {
    display: flex;
    gap: 10px;
    width: 100%;
    max-width: 570px;
    margin: 0;
}

.newsletter-split #newsletter-form input {
    flex: 1;
    min-width: 0;
    height: 54px;
    padding: 0 17px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    background: #ffffff;
    color: #111827;
    font-size: 14px;
    outline: none;
    box-sizing: border-box;
}

.newsletter-split #newsletter-form input:focus {
    border-color: #dc2626;
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.10);
}

.newsletter-split #newsletter-form button {
    height: 54px;
    padding: 0 23px;
    border: none;
    border-radius: 8px;
    background: #dc2626;
    color: #ffffff;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    transition: background .2s ease, transform .2s ease;
}

.newsletter-split #newsletter-form button:hover {
    background: #b91c1c;
    transform: translateY(-2px);
}

/* MESSAGE */

.newsletter-split #subscribe-message {
    margin-top: 12px;
    font-size: 13px;
    color: #475569;
}

/* TRUST LINE */

.newsletter-note {
    display: flex;
    align-items: center;
    gap: 9px;
    flex-wrap: wrap;
    margin-top: 18px;
    color: #64748b;
    font-size: 12px;
    font-weight: 600;
}

.newsletter-note span:first-child {
    color: #16a34a;
    font-weight: 900;
}

.newsletter-dot {
    color: #dc2626;
}

/* RIGHT SIDE CARD */

.newsletter-right {
    min-height: 310px;
    padding: 35px;
    display: flex;
    flex-direction: column;
    justify-content: center;

    background: linear-gradient(145deg, #172338, #0b1220);
    border-radius: 16px;
    color: #ffffff;
    box-shadow: 0 15px 35px rgba(15, 23, 42, 0.16);
    position: relative;
    overflow: hidden;
}

.newsletter-right::after {
    content: "";
    position: absolute;
    width: 220px;
    height: 220px;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 50%;
    right: -80px;
    top: -90px;
}

.newsletter-icon {
    width: 48px;
    height: 48px;
    display: flex;
    justify-content: center;
    align-items: center;
    background: rgba(220, 38, 38, 0.16);
    color: #ff5964;
    border-radius: 12px;
    font-size: 25px;
    margin-bottom: 25px;
}

.newsletter-card-label {
    color: #ff5964;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 2px;
    margin-bottom: 13px;
}

.newsletter-right h3 {
    color: #ffffff;
    font-family: 'Playfair Display', serif;
    font-size: clamp(28px, 3vw, 39px);
    line-height: 1.2;
    margin: 0 0 13px;
}

.newsletter-right p {
    color: #cbd5e1;
    font-size: 14px;
    line-height: 1.8;
    max-width: 300px;
}

.newsletter-card-line {
    width: 45px;
    height: 3px;
    background: #dc2626;
    margin: 25px 0;
}

.newsletter-card-bottom {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    color: #94a3b8;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 1px;
}

/* TABLET */

@media (max-width: 900px) {
    .newsletter.newsletter-split {
        grid-template-columns: 1fr;
        gap: 30px;
        padding: 45px;
    }

    .newsletter-right {
        min-height: 250px;
    }
}

/* MOBILE */

@media (max-width: 600px) {
    .newsletter.newsletter-split {
        width: calc(100% - 28px);
        margin: 40px auto;
        padding: 30px 20px;
        gap: 25px;
        border-radius: 14px;
    }

    .newsletter-split #newsletter-form {
        flex-direction: column;
    }

    .newsletter-split #newsletter-form input,
    .newsletter-split #newsletter-form button {
        width: 100%;
        height: 52px;
    }

    .newsletter-right {
        padding: 27px 23px;
        min-height: 240px;
    }

    .newsletter-card-bottom {
        font-size: 8px;
    }
}

/* Consistent and compact news card headlines */

.trending-grid h3,
#categoryNewsGrid .category-news-content h3 {
    font-size: 19px;
    line-height: 1.4;
    font-weight: 700;
    text-align: left;
    margin: 0 0 10px;
}

/* Consistent card text spacing */

.trending-grid .news-card,
.trending-grid .trending-card,
#categoryNewsGrid .category-news-card {
    text-align: left;
}

/* Mobile headline size */

@media (max-width: 600px) {
    .trending-grid h3,
    #categoryNewsGrid .category-news-content h3 {
        font-size: 17px;
        line-height: 1.4;
    }
}

/* FOOTNOTE - ALL NEWS CARDS EQUAL SIZE */
/* Trending and homepage category cards */

.trending-grid {
    align-items: stretch;
}

.trending-grid .trend-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-width: 0;
    padding: 0;
    overflow: hidden;
}

/* All card images same height */

.trending-grid .trend-card img {
    display: block;
    width: 100%;
    height: 190px;
    object-fit: cover;
    margin: 0;
    border-radius: 0;
}

/* Headline size and equal text area */

.trending-grid .trend-card h3 {
    font-size: 16px !important;
    line-height: 1.45 !important;
    font-weight: 700;
    text-align: left;
    padding: 14px 16px 16px;
    margin: 0;
    min-height: 92px;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 4;
    line-clamp: 4;
    overflow: hidden;
}

/* Category page cards */

.category-news-card > img {
    height: 190px;
}

.category-news-content h3 {
    font-size: 16px !important;
    line-height: 1.45;
    min-height: 46px;
}

/* Dark mode */

body.dark-mode .trending-grid .trend-card h3 {
    color: #f1f2f5;
}

/* TRENDING CARDS - EQUAL ALIGNMENT */

.trending-grid .trend-card {
    padding: 0 !important;
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
}

.trending-grid .trend-card img {
    width: 100%;
    height: 190px !important;
    object-fit: cover;
    display: block;
    margin: 0;
    border-radius: 0;
}

.trending-grid .trend-card h3 {
    font-size: 17px !important;
    line-height: 1.45 !important;
    font-weight: 700;
    text-align: left;
    padding: 14px 16px !important;
    margin: 0 !important;
    min-height: 88px;
    max-height: 88px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    line-clamp: 3;
}

/* =====================================
   FOOTNOTE YOUTUBE VIDEO CARDS FIX
===================================== */

#youtubeVideos {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 24px;
    width: 100%;
    align-items: stretch;
}

#youtubeVideos .trend-card {
    width: 100%;
    min-width: 0;
    height: auto;
    min-height: 0;
    overflow: hidden;
    border-radius: 18px;
    background: #fff;
    box-sizing: border-box;
}

#youtubeVideos .trend-card a {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
    color: inherit;
    text-decoration: none;
}

#youtubeVideos .trend-card img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    object-position: center;
    background: #000;
    flex-shrink: 0;
}

#youtubeVideos .trend-card h3 {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    overflow: hidden;
    margin: 16px 20px 20px;
    padding: 0;
    font-size: 23px;
    line-height: 1.4;
    font-weight: 700;
    overflow-wrap: anywhere;
}

@media (max-width: 900px) {
    #youtubeVideos {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 18px;
    }
}

@media (max-width: 550px) {
    #youtubeVideos {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    #youtubeVideos .trend-card h3 {
        font-size: 19px;
    }
}

/* =========================================
   FOOTNOTE YOUTUBE VIDEOS - FINAL FIX
   Only affects YouTube video section
========================================= */

#youtubeVideos {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 22px;
    align-items: stretch;
}

#youtubeVideos .trend-card {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: auto;
    min-width: 0;
    padding: 0;
    overflow: hidden;
    border-radius: 12px;
    box-sizing: border-box;
}

#youtubeVideos .trend-card a {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
    text-decoration: none;
}

#youtubeVideos .trend-card img {
    display: block;
    width: 100%;
    height: auto !important;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    margin: 0;
    border-radius: 0;
}

#youtubeVideos .trend-card h3 {
    font-size: 17px !important;
    line-height: 1.45 !important;
    font-weight: 700;
    text-align: left;
    padding: 14px 16px !important;
    margin: 0 !important;
    min-height: 0 !important;
    max-height: none !important;
    display: block;
    overflow: visible;
    -webkit-line-clamp: unset;
    line-clamp: unset;
}

@media (max-width: 900px) {
    #youtubeVideos {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 550px) {
    #youtubeVideos {
        grid-template-columns: 1fr;
        gap: 16px;
    }
}

/* =====================================
   YOUTUBE VIDEO GRID - FINAL OVERRIDE
===================================== */

#youtubeVideos .trend-card {
    display: flex;
    flex-direction: column;
    height: auto;
    min-width: 0;
    overflow: hidden;
}

#youtubeVideos .trend-card a {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
    color: inherit;
    text-decoration: none;
}

#youtubeVideos .trend-card img {
    display: block;
    width: 100%;
    height: auto !important;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    margin: 0 !important;
    border-radius: 0;
}

#youtubeVideos .trend-card h3 {
    margin: 0 !important;
    padding: 14px 16px !important;
    min-height: 0 !important;
    max-height: none !important;
    display: block;
    overflow: visible;
    -webkit-line-clamp: unset;
    line-clamp: unset;
}

/* =====================================
   YOUTUBE VIDEO TITLE - CLEAN WRAPPING
===================================== */

#youtubeVideos .trend-card {
    height: 100%;
}

#youtubeVideos .trend-card a {
    display: flex;
    flex-direction: column;
    height: 100%;
}

#youtubeVideos .trend-card h3 {
    font-size: 13px !important;
    line-height: 1.4 !important;
    font-weight: 700;
    text-align: left;

    padding: 14px 16px 18px !important;
    margin: 0 !important;

    min-height: 0 !important;
    max-height: none !important;
    height: 100px;

    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    line-clamp: 3;

    overflow: hidden;
    overflow-wrap: break-word;
    word-break: normal;
    text-wrap: pretty;

    box-sizing: border-box;
}

@media (max-width: 600px) {
    #youtubeVideos .trend-card h3 {
        font-size: 12px !important;
        height: 95px;
        padding: 12px 14px !important;
    }
}

/* YOUTUBE VIDEO TITLES - FIXED 2 LINES */

#youtubeVideos .trend-card h3 {
    display: -webkit-box !important;
    -webkit-box-orient: vertical !important;
    -webkit-line-clamp: 2 !important;
    line-clamp: 2;

    height: 42px !important;
    min-height: 42px !important;
    max-height: 42px !important;

    overflow: hidden !important;
    text-overflow: ellipsis;

    font-size: 14px !important;
    line-height: 21px !important;
    font-weight: 700;

    padding: 0 14px !important;
    margin: 12px 0 14px !important;

    white-space: normal !important;
    overflow-wrap: break-word;
    word-break: normal;
    box-sizing: border-box;
}
/* Newsletter email label alignment */

.newsletter-email-label {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    height: 74px;
    min-width: 190px;
    margin: 0 !important;
    padding: 0 16px;
    text-align: center;
    box-sizing: border-box;
    white-space: nowrap;
}
