/* -------------------------
   image block
------------------------- */

.block-sciverse-image--small {
    width: 30%;
}

.block-sciverse-image--medium {
    width: 45%;
}

.block-sciverse-image--large {
    width: 75%;
}

.block-sciverse-image--full {
    width: 100%;
    clear: both;
    margin-left: auto;
    margin-right: auto;
}

.block-sciverse-image--center {
    margin-left: auto;
    margin-right: auto;
    text-align: center;
}

.block-sciverse-image img {
    display: block;
    width: 100%;
    height: auto;
}

/* Caption */

.block-sciverse-image__caption {
    font-size: 0.875rem;
    margin-top: 0.5rem;
    color: #666;
    line-height: 1.3;
    margin-left: 0.2rem;
    margin-right: 0.2rem;
}

/* Desktop / tablet only */

@media (min-width: 768px) {

    .block-sciverse-image--left {
        float: left;
        margin: 0 1.5rem 1rem 0;
    }

    .block-sciverse-image--right {
        float: right;
        margin: 0 0 1rem 1.5rem;
    }
}

/* Mobile */

@media (max-width: 767.98px) {

    .block-sciverse-image--left,
    .block-sciverse-image--right,
    .block-sciverse-image--center {
        float: none;
        display: block;
        width: 100%;
        max-width: 100%;
        margin: 1rem auto;
    }
}

/* -------------------------
   interview Q&A block
------------------------- */

.interview-block {
    margin: 2rem 0;
}

.question-row,
.answer-row {
    margin-left: 0;
    max-width: 100%;
    display: flex;
    align-items: flex-start;
    gap: 1.25rem;
}

.answer-row {
    margin-top: 1.5rem;
}

.qa-badge {
    flex-shrink: 0;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    font-weight: 700;
    color: white;
}

.question-badge {
    color: var(--retro-white);
    background-color: var(--retro-red);
}

.answer-badge {
    color: var(--retro-white);
    background-color: var(--retro-slate);
}

.question-content {
    font-size: 1.8rem;
    font-weight: 700;
    line-height: 1.3;
    padding-top: .1rem;
}

.question-content h2 {
    font-size: 1.8rem;
    font-weight: 700;
    line-height: 1.3;
    padding-top: .1rem;
}

.answer-content {
    font-size: 1.05rem;
    line-height: 1.9;
}

.answer-content p {
    font-size: 1.05rem;
    line-height: 1.9;
}


/* ---------------------------------------------------------
   1) TABLETS & MOBILE (< 1024px): Disable Floats
--------------------------------------------------------- */
@media (max-width: 1023px) {
    /* Replace these class names with your actual floated image selectors */
    .block-sciverse-image--left,
    .block-sciverse-image--right,
    .image-float-left,
    .image-float-right {
        float: none !important;
        width: 100% !important;
        max-width: 100% !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        margin-bottom: 1.5rem !important;
    }
}


/* ---------------------------------------------------------
   PHONES (< 768px): Stack Badges Above (Centered) & Text Left
--------------------------------------------------------- */
@media (max-width: 767px) {
    .question-row,
    .answer-row {
        flex-direction: column;
        align-items: flex-start; /* Keeps the text block left-aligned */
        margin-left: 2%;
        max-width: 96%;
        gap: 0.75rem;
    }

    .qa-badge {
        width: 35px;
        height: 35px;
        font-size: 1rem;
        align-self: center; /* Centers only the Q/A badge in the row */
    }

    .question-content,
    .question-content h2,
    .answer-content,
    .answer-content p {
        text-align: left; /* Ensures all question & answer text stays left-aligned */
    }
}

.article-title {
    font-size: clamp(2.25rem, 5vw, 3rem);
    line-height: 1.05;
    font-weight: 700;
}

.article-subtitle {
    font-size: clamp(1.125rem, 2.5vw, 1.375rem);
    line-height: 1.4;
    font-weight: 400;
    color: #4b5563;
    margin-top: 0.5rem;
    margin-bottom: 1.75rem;
}

/* Clear default paragraph margins if the subtitle uses Wagtail's RichTextField */
.article-subtitle p {
    margin: 0;
}

.article-pullquote {
    font-size: 1.4rem;
    line-height: 1.5;
    font-style: italic;
    border-left: 4px solid #ddd;
    padding-left: 1rem;
    color: #555;
}

.article-meta {
    font-size: 0.95rem;
    color: #666;
}

.article-tags .badge {
    font-size: 0.8rem;
    font-weight: 500;
}

.interview-portrait {
    width: 100%;
    height: auto;
    object-fit: cover;
}

/* custom layout blocks */
/*.front-grid {*/
/*    display: grid;*/
/*    gap: 1.5rem;*/
/*}*/

/*.front-section--feature_plus_2 .front-grid {*/
/*    grid-template-columns: 2fr 1fr;*/
/*    grid-template-rows: 1fr 1fr;*/
/*}*/

/*.front-section--feature_plus_2 .front-card--1 {*/
/*    grid-row: span 2;*/
/*}*/

/*.front-card--featured .front-card__title {*/
/*    font-size: 2rem;*/
/*}*/

/*.front-card__title {*/
/*    font-size: 1.25rem;*/
/*}*/

/*.front-card {*/
/*    background: white;*/
/*    overflow: hidden;*/
/*}*/

/*.front-card__link {*/
/*    text-decoration: none;*/
/*    color: inherit;*/
/*    display: block;*/
/*}*/

/*.front-card__image-wrapper {*/
/*    aspect-ratio: 16 / 9;*/
/*    overflow: hidden;*/
/*}*/

/*.front-card__image {*/
/*    width: 100%;*/
/*    height: 100%;*/
/*    object-fit: cover;*/
/*    display: block;*/
/*}*/

/*.front-card__image-wrapper {*/
/*    aspect-ratio: 16 / 9;*/
/*}*/

/*.front-card--featured .front-card__image-wrapper {*/
/*    aspect-ratio: 4 / 3;*/
/*}*/

/*@media (max-width: 991px) {*/
/*    .front-section--feature_plus_2 .front-grid {*/
/*        grid-template-columns: 1fr;*/
/*        grid-template-rows: auto;*/
/*    }*/
/*    .front-section--feature_plus_2 .front-card--1 {*/
/*        grid-row: auto;*/
/*    }*/
/*}*/

.front-row {
    display: grid;
    gap: 1rem;
}

.front-row--2-1-1 {grid-template-columns: 2fr 1fr 1fr;}
.front-row--1-2-1 {grid-template-columns: 1fr 2fr 1fr;}
.front-row--1-1-2 {grid-template-columns: 1fr 1fr 2fr;}
.front-row--1-1-1 {grid-template-columns: repeat(3, 1fr);}
.front-row--1-1-1-1 {grid-template-columns: repeat(4, 1fr);}
.front-row--2-1 {grid-template-columns: 2fr 1fr;}
.front-row--1-2 {grid-template-columns: 1fr 2fr;}
.front-row--1-1 {grid-template-columns: 1fr 1fr;}

@media (max-width: 991px) {
    .front-row {
        grid-template-columns: 1fr !important;
    }
}
.front-card {
    height: 350px;
}

.card-overlay {
    position: relative;
    height: 100%;
}

.card-overlay-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.card-size-small .card-img-top {
    aspect-ratio: 3 / 4;
}

.card-size-large .card-img-top {
    aspect-ratio: 16 / 9;
}

.card-img-top {
    width: 100%;
    object-fit: cover;
}


/* -------------------------
   HERO CARDS + SIDE CARDS
------------------------- */

.hero-card, .side-card {
    position:relative;
    height:200px;
    border-radius:8px;
    overflow:hidden;

    background-size:cover;
    background-position:center;
}

.hero-card-overlay{
    position:absolute;
    inset:0;

    background:
    linear-gradient(
        to top right,
        rgba(0,0,0,.92) 0%,
        rgba(0,0,0,.72) 28%,
        rgba(0,0,0,.27) 58%,
        rgba(0,0,0,.08) 82%,
        rgba(0,0,0,0) 100%
    );
}

.hero-card-content{
    position:absolute;
    left:5%;
    bottom:5%;
    z-index:2;

    color:white;
    max-width:70%;
}

.hero-card-large .hero-card-content {
    max-width: 65%;
    font-size: 2rem;
    line-height: 1.1;
}

.hero-card-large .hero-card-overlay {
    background: linear-gradient(
        to top,
        rgba(0,0,0,.75) 0%,
        rgba(0,0,0,.45) 35%,
        rgba(0,0,0,0) 100%
    );
}

.hero-card-small .hero-card-overlay {
    background: linear-gradient(
        to top,
        rgba(0,0,0,.9) 0%,
        rgba(0,0,0,.65) 45%,
        rgba(0,0,0,0) 100%
    );
}

.hero-card-xl .hero-card-content {
    max-width: 30%;
    font-size: 2rem;
    line-height: 1.1;
}

.hero-card-xl .hero-card-overlay {
   background: linear-gradient(
        to right,
        rgba(0,0,0,.75) 0%,
        rgba(0,0,0,.4) 40%,
        rgba(0,0,0,0) 100%
    );
}

.hero-card-small .hero-card-content {
    max-width: 90%;
    font-size: 1.1rem;
}

.hero-card-content h3{
    font-size:3rem;
    font-weight:700;
    line-height:1.05;
}

.hero-card-readmore{
    color:white;
    /*font-size:2rem;*/
    transition:.2s ease;
}

.hero-card-readmore:hover{
    color:white;
    opacity:.8;
    text-decoration:none;
    transform:translateX(3px);
}

.hero-card-inner{
    border-radius:0;
    overflow:hidden;
}

.hero-card-link,
.hero-card-link:visited,
.hero-card-link:hover,
.side-card-link,
.side-card-link:visited,
.side-card-link:hover {
    color: inherit;
    text-decoration: none;
}

.hero-card-image, .side-card-image{
    position:absolute;
    inset:0;
    background-size:cover;
    background-position:center;
    transition: transform 0.6s cubic-bezier(.2,.8,.2,1);
    will-change: transform;
}

.hero-card-link:hover .hero-card-image,
.side-card-link:hover .side-card-image
{
    transform: scale(1.2);
}

.hero-card-overlay-elipse{
    position:absolute;
    inset:0;

    background:
    radial-gradient(
        ellipse at bottom left,
        rgba(0,0,0,.95) 0%,
        rgba(0,0,0,.75) 25%,
        rgba(0,0,0,.50) 40%,
        rgba(0,0,0,0) 75%
    );
}

.hero-card-overlay-elipse-light{
    position:absolute;
    inset:0;

    background:
    radial-gradient(
        ellipse at bottom left,
        rgba(255,255,255,.95) 0%,
        rgba(255,255,255,.75) 25%,
        rgba(255,255,255,.0) 50%,
        rgba(255,255,255,0) 75%
    );
}

/*.hero-card-content{*/
/*    color:#222;*/
/*    text-shadow:*/
/*        0 0 8px rgba(255,255,255,.9),*/
/*        0 0 16px rgba(255,255,255,.7);*/
/*}*/

.top-card a {
    text-decoration: none;
}

.top-card img {
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
}

.top-card-grid .card-footer:last-child {
    border-radius:0;
    border-bottom-left-radius: 8px;
    border-bottom-right-radius: 8px;
}

.top-card-grid img {
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
}

.side-card-grid .card-footer:last-child {
    border-radius:0;
    border-bottom-right-radius: 8px;
}

.side-card-grid img {
    border-top-left-radius: 8px;
    border-bottom-left-radius: 8px;
}

/* --------------------------------------------------------------------------
   Author Block (Mobile-First Base Styles - Stacked Layout)
   -------------------------------------------------------------------------- */
.author-bio {
    display: flex;
    flex-direction: column; /* Stacked layout by default for small screens */
    align-items: center;
    text-align: center;
    gap: 12px;
    padding: 12px 0;
    margin: 16px 0;
    width: 100%;
}

.author-avatar {
    flex: 0 0 auto;
}

.author-image {
    width: 140px;
    height: 140px;
    object-fit: cover;
}

.author-content {
    padding: 12px;
    border: dotted var(--retro-brown);
    border-radius: 12px;
    width: 100%; /* Ensures content box takes full container width when stacked */
    box-sizing: border-box;
}

.author-kicker {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #666;
}

.author-title {
    font-size: 0.8rem;
    margin: 2px 0 6px;
}

.author-content p {
    font-size: 0.85rem;
    margin: 0;
    line-height: 1.4;
}

.author-social {
    margin-top: 6px;
    display: flex;
    justify-content: center; /* Centered icons on mobile */
    gap: 8px;
}

.author-social a {
    color: #777;
    font-size: 0.9rem;
}

.author-social a:hover {
    color: #111;
}


/* Extra Bio Block Base Component */
/* Base Mobile Styles (< 640px) */
/* Base Layout Spacing */
.extra-bio {
    display: flex;
    flex-direction: column;
    width: 100%;
    margin: 20px 0;
    box-sizing: border-box;
}

/* Adds breathing room between the bottom of the large headshot and the caption */
.extra-bio--left .extra-bio-content,
.extra-bio--right .extra-bio-content {
    margin-top: 14px;
}

/* Distinct Highlight Style for Box Caption */
.extra-bio-caption-badge {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--sciverse-cubs-blue); /* Sciverse Primary Accent */
    background-color: var(--sciverse-lightblue);; /* Light blue tint */
    border-left: 3px solid var(--sciverse-cubs-blue);; /* Accent bar indicator */
    padding: 3px 8px;
    border-radius: 0 4px 4px 0;
    margin-bottom: 8px;
}

/* Headshot Base Styles */
.extra-bio-image--small {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 50%;
    flex-shrink: 0;
}

.extra-bio-image--large {
    width: 100%;
    max-width: 100%;
    height: auto;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 8px;
}

/* Tablet & Desktop Layouts (>= 640px) */
@media (min-width: 640px) {
    .extra-bio--full {
        flex-direction: row;
        gap: 20px;
    }

    .extra-bio-image--small {
        width: 140px;
        height: 140px;
    }

    .extra-bio--left {
        float: left;
        width: 300px;
        margin-right: 24px;
        margin-bottom: 16px;
    }

    .extra-bio--right {
        float: right;
        width: 300px;
        margin-left: 24px;
        margin-bottom: 16px;
    }

    .extra-bio-image--large {
        max-width: 300px;
    }
}

/* Optional Border Styles */
.extra-bio--bordered {
    border: 3px solid #cbd5e1;
    border-radius: 12px;
    padding: 16px;
    background-color: #f8fafc;
}

/* Content Typography */
.extra-bio-content {
    flex: 1;
}

.extra-bio-name {
    font-size: 1.125rem;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 8px;
}

.extra-bio-text {
    font-size: 0.885rem;
    line-height: 1.5;
    color: #334155;
}

.extra-bio-text p {
    margin: 0 0 8px 0;
}

.extra-bio-text p:last-child {
    margin-bottom: 0;
}

/* Base Gallery Container */
.sciverse-gallery {
    margin: 28px auto;
    box-sizing: border-box;
    width: 100%;
}

/* Container Width Options */
.sciverse-gallery--width-full {
    width: 100%;
}

.sciverse-gallery--width-centered {
    width: 100%;
}

/* Base Grid Layout (Mobile First: 1 column) */
.sciverse-gallery-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
    width: 100%;
}

/* Responsive Grid Columns (Tablet & Desktop) */
@media (min-width: 640px) {
    .sciverse-gallery--width-centered {
        width: 75%;
        margin-left: auto;
        margin-right: auto;
    }

    .sciverse-gallery--grid-2 .sciverse-gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .sciverse-gallery--grid-3 .sciverse-gallery-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .sciverse-gallery--grid-4 .sciverse-gallery-grid {
        grid-template-columns: repeat(2, 1fr); /* 2x2 on tablets */
    }
}

@media (min-width: 1024px) {
    .sciverse-gallery--grid-4 .sciverse-gallery-grid {
        grid-template-columns: repeat(4, 1fr); /* 4 across on desktop */
    }
}

/* Stacked Layout Variant */
.sciverse-gallery--stacked .sciverse-gallery-grid {
    grid-template-columns: 1fr;
    gap: 24px;
}

/* Image Frames & Crop Aspect Ratios */
.sciverse-gallery-frame {
    width: 100%;
    overflow: hidden;
    border-radius: 6px;
    background-color: #f1f5f9;
}

.sciverse-gallery-frame--landscape {
    aspect-ratio: 16 / 9;
}

.sciverse-gallery-frame--portrait {
    aspect-ratio: 3 / 4;
}

.sciverse-gallery-frame--square {
    aspect-ratio: 1 / 1;
}

.sciverse-gallery-frame--original {
    aspect-ratio: auto;
}

.sciverse-gallery-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.sciverse-gallery-frame--original .sciverse-gallery-img {
    object-fit: contain;
    height: auto;
}

/* Caption Styles */
.sciverse-gallery-item-caption {
    font-size: 0.8rem;
    color: #64748b;
    margin-top: 6px;
    text-align: center;
}

.sciverse-gallery-caption {
    font-size: 0.85rem;
    font-weight: 500;
    color: #475569;
    text-align: center;
    margin-top: 12px;
    padding-top: 8px;
    border-top: 1px solid #e2e8f0;
}

/* Height Alignment Modifiers */

/* Force all grid items in a row to stretch to match the row's equal height */
.sciverse-gallery--height-first .sciverse-gallery-grid,
.sciverse-gallery--height-shortest .sciverse-gallery-grid,
.sciverse-gallery--height-tallest .sciverse-gallery-grid {
    align-items: stretch;
}

.sciverse-gallery--height-first .sciverse-gallery-item,
.sciverse-gallery--height-shortest .sciverse-gallery-item,
.sciverse-gallery--height-tallest .sciverse-gallery-item {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.sciverse-gallery--height-first .sciverse-gallery-frame,
.sciverse-gallery--height-shortest .sciverse-gallery-frame,
.sciverse-gallery--height-tallest .sciverse-gallery-frame {
    flex: 1;
    height: 100%;
    min-height: 0; /* Prevents overflow in Firefox flex containers */
}

.sciverse-gallery--height-first .sciverse-gallery-img,
.sciverse-gallery--height-shortest .sciverse-gallery-img,
.sciverse-gallery--height-tallest .sciverse-gallery-img {
    height: 100%;
    width: 100%;
    object-fit: cover; /* Crops non-matching aspect ratios smoothly to maintain row height */
}

/* Fixed Row Height Preset Option (Shortest / Tallest) */
.sciverse-gallery--height-shortest .sciverse-gallery-frame {
    max-height: 260px;
}

.sciverse-gallery--height-tallest .sciverse-gallery-frame {
    min-height: 380px;
}

.pswp__img {
    object-fit: contain !important;
    max-width: 100% !important;
    max-height: 100% !important;
    height: auto !important;
}

/* Clearfix for parent containers when using floated children */
.clearfix::after {
    content: "";
    clear: both;
    display: table;
}

/* --------------------------------------------------------------------------
   Desktop & Tablet Responsive Layouts (min-width: 640px)
   -------------------------------------------------------------------------- */
@media (min-width: 640px) {
    .author-bio {
        flex-direction: row;
        align-items: flex-start;
        text-align: left;
    }

    .author-social {
        justify-content: flex-start;
    }

    /* Default full width layout */
    .author-bio--full {
        width: 100%;
        float: none;
    }

    /* Float Left Variant */
    .author-bio--left {
        display: block; /* Switch to block display for native CSS floats */
        float: left;
        width: 40%;
        margin-right: 16px;
        margin-bottom: 12px;
    }

    .author-bio--left .author-avatar {
        margin-bottom: 12px;
    }

    /* Float Right Variant */
    .author-bio--right {
        display: block; /* Switch to block display for native CSS floats */
        float: right;
        width: 40%;
        margin-left: 16px;
        margin-bottom: 12px;
    }

    .author-bio--right .author-avatar {
        margin-bottom: 12px;
    }

    /* Inline Compact Variant */
    .author-bio--inline {
        display: inline-flex;
        max-width: 420px;
    }
}

/*   impact box */
.impact-box {
    display: flex;
    gap: 1rem;
    padding: 1.25rem;
    border-radius: 12px;
    background: var(--color-light-background);
    justify-content: center;
    flex-wrap: wrap;
}

.impact-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 100px;
}

.impact-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 3.5rem;
    height: 3.5rem;
    padding: 0 0.75rem;

    border-radius: 999px;
    background: var(--badge-color);
    color: var(--num-color);

    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1;
}

.impact-label {
    margin-top: 0.5rem;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-text-muted);
}

.impact-articles {
    --num-color: var(--retro-white);
    --badge-color: var(--retro-green);
}

.impact-countries {
    --num-color: var(--retro-white);
    --badge-color: var(--retro-slate);
}

.impact-languages {
    --num-color: var(--retro-white);
    --badge-color: var(--retro-purple);
}

.impact-background {
    --color-light-background: var(--retro-tan)
}


/* -------------------------
   youtube block
------------------------- */


.youtube-embed {
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-radius: 16px;
}

.youtube-embed iframe {
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
}

.youtube-caption {
    margin-top: 0.75rem;
    font-size: 0.9rem;
}

/* -------------------------
   hero 123 block
------------------------- */

/* --- THE NEW GRID CONTROLLER --- */
.editorial-grid {
    display: grid;
    grid-template-columns: 2fr 1fr; /* 2/3 and 1/3 width split */
    grid-template-rows: 250px 250px; /* Two row rows totaling 500px height */
    gap: 16px;
    width: 100%;
}

/* Base card rules to contain your Ken Burns overflows */
.grid-card {
    position: relative;
    overflow: hidden;
    width: 100%;
    height: 100%;
}

/* Article 1: Spans both rows on the left side */
.grid-card-1 {
    grid-column: 1;
    grid-row: 1 / span 2;
}

/* Article 2 & 3: Naturally stack on the right side */
.grid-card-2 { grid-column: 2; grid-row: 1; }
.grid-card-3 { grid-column: 2; grid-row: 2; }

/* --- REUSED CAROUSEL STYLES (Slight adjustments for grid heights) --- */
.carousel-hero {
    position: relative;
    width: 100%;
    height: 100%; /* Spans full height of its grid cell */
}

.carousel-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: inherit;
    background-size: cover;
    background-position: center;
    transform: scale(1);
    z-index: 1;
}

/* Reusing your exact overlay & content styles */
.carousel-overlay {
    position: absolute;
    inset: 0;
    z-index: 2;
    background: linear-gradient(
        to top right,
        rgba(0,0,0,.92) 0%,
        rgba(0,0,0,.72) 28%,
        rgba(0,0,0,.27) 58%,
        rgba(0,0,0,.08) 82%,
        rgba(0,0,0,0) 100%
    );
}

.carousel-content {
    position: absolute;
    left: 30px;
    bottom: 30px;
    z-index: 3;
    color: white;
    max-width: 90%;
}

/* Make text a bit more compact for smaller side blocks */
.grid-card-2 h2, .grid-card-3 h2 {
    font-size: 1.5rem;
    line-height: 1.2;
}
.grid-card-1 h2 {
    font-size: 2.5rem;
    line-height: 1.1;
}

.carousel-readmore {
    color: white;
    transition: .2s ease;
}
.carousel-readmore:hover {
    color: white;
    opacity: .8;
    text-decoration: none;
}

/* --- REUSED ANIMATION TRIGGERS --- */
/* Instead of waiting for Bootstrap's '.active' class,
   these trigger simultaneously as soon as the page renders */
.grid-card-1 .carousel-hero::before {
    animation: kenburns 12s ease forwards;
}
.grid-card-2 .carousel-hero::before {
    animation: kenburns-left 12s ease forwards;
}
.grid-card-3 .carousel-hero::before {
    animation: kenburns-right 12s ease forwards;
}

/* Mobile Fallback: Collapse back into a beautiful vertical stream */
@media (max-width: 768px) {
    .editorial-grid {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
    }
    .grid-card-1, .grid-card-2, .grid-card-3 {
        grid-column: 1;
        grid-row: auto;
        height: 350px; /* Uniform height on mobile viewports */
    }
}

/* -----------------------------------------
   Layout #1: Dynamic Magazine Cover (Overlap)
----------------------------------------- */

.magazine-cover-grid {
    display: grid;
    grid-template-columns: 1.3fr 0.7fr; /* Balanced asymmetry */
    gap: 40px;
    width: 100%;
    align-items: start;
    padding: 20px 0;
}

/* --- MAIN FEATURE (LEFT) --- */
.main-feature-card {
    position: relative;
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    width: 100%;
}

.feature-image-wrapper {
    grid-column: 1 / span 11; /* Image leaves room on the right */
    grid-row: 1;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.06);
    aspect-ratio: 16 / 10;
}

.feature-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1);
}

.main-feature-card:hover .feature-img {
    transform: scale(1.03); /* Subtle, premium feel over dramatic Ken Burns */
}

/* The Overlap Magic */
.feature-overlap-content {
    grid-column: 3 / span 10; /* Starts inside the image, extends past it */
    grid-row: 1;
    align-self: end;
    transform: translateY(15%); /* Pushes down past the bottom edge of image */
    background: #ffffff;
    padding: 35px;
    border-radius: 6px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.1);
    z-index: 10;
}

/* --- SECONDARY STACK (RIGHT) --- */
.secondary-stack {
    display: flex;
    flex-direction: column;
    gap: 48px; /* Generous breathing room */
    padding-top: 20px;
}

.side-card {
    display: flex;
    flex-direction: column;
    gap: 16px;
    text-decoration: none;
}

.side-image-wrapper {
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-radius: 6px;
    box-shadow: 0 10px 20px rgba(0,0,0,0.04);
}

.side-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.side-card:hover .side-image-wrapper img {
    transform: translateY(-4px);
}

/* --- TYPOGRAPHY & TAGS (Less Formal, Fresh) --- */
.magazine-tag {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 12px;
    padding: 4px 10px;
    border-radius: 4px;
}
.tag-primary {
    background: #e0f2fe; /* Soft tech blue */
    color: #0369a1;
}
.tag-secondary {
    background: #f3f4f6;
    color: #4b5563;
}

.feature-overlap-content h2 {
    font-size: 2.25rem;
    line-height: 1.2;
    margin: 0 0 12px 0;
}
.feature-overlap-content h2 a,
.side-content h3 a {
    color: #111827;
    text-decoration: none;
    background: linear-gradient(to right, #0369a1, #0369a1) no-repeat right bottom / 0 2px;
    transition: background-size 0.3s ease;
}
.feature-overlap-content h2 a:hover,
.side-content h3 a:hover {
    background-size: 100% 2px;
    background-position: left bottom;
}

.magazine-subtitle {
    font-size: 1.05rem;
    color: #4b5563;
    line-height: 1.5;
    margin-bottom: 20px;
}

.magazine-readmore {
    font-weight: 600;
    color: #0369a1;
    text-decoration: none;
    font-size: 0.95rem;
}
.magazine-readmore i {
    transition: transform 0.2s ease;
}
.magazine-readmore:hover i {
    transform: translateX(5px);
}

.side-content h3 {
    font-size: 1.35rem;
    line-height: 1.3;
    margin: 0;
}

/* --- RESPONSIVE FALLBACK --- */
@media (max-width: 992px) {
    .magazine-cover-grid {
        grid-template-columns: 1fr;
        gap: 80px; /* Space for the main overlap offset */
    }

    .feature-image-wrapper {
        grid-column: 1 / span 12;
    }

    .feature-overlap-content {
        grid-column: 1 / span 12;
        position: relative;
        transform: translateY(30px);
        padding: 24px;
    }

    .secondary-stack {
        padding-top: 0;
    }
}


/* -----------------------------------------
   Layout #2: Interactive Billboard (Polished)
----------------------------------------- */

/* --- NEW TRENDING HEADER --- */
.billboard-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
    width: 100%;
}

.trending-badge {
    background: #e11d48; /* Punchy energetic crimson/rose */
    color: #ffffff;
    font-size: 0.8rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 6px 14px;
    border-radius: 20px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 4px 12px rgba(225, 29, 72, 0.25);
}

.trending-line {
    flex: 1;
    height: 2px;
    background: linear-gradient(to right, rgba(225, 29, 72, 0.4), rgba(0,0,0,0.05));
    border-radius: 2px;
}

/* The new left-side line pushing the text into its indent */
.trending-line-left {
    width: 40px; /* Controls exactly how far to the right the text starts */
    height: 2px;
    background: linear-gradient(to left, rgba(225, 29, 72, 0.4), rgba(0,0,0,0.05));
    border-radius: 2px;
    flex-shrink: 0; /* Prevents it from crushing down on mobile viewports */
}

.trending-line-right {
    flex: 1;
    height: 2px;
    background: linear-gradient(to right, rgba(0,0,0,0.05), rgba(225, 29, 72, 0.4));
    border-radius: 2px;
}

.trending-line-end {
    width: 40px;
    height: 2px;
    background: linear-gradient(to right, rgba(225, 29, 72, 0.4), rgba(0,0,0,0.05));
    border-radius: 2px;
    flex-shrink: 0;
}

.trending-header {
    display: flex;
    align-items: center;
    gap: 12px;
}

.trending-link {
    text-decoration: none;
    display: inline-flex;
    margin-left: auto;
}

/* --- THE CONTAINER --- */
.billboard-container {
    display: flex;
    width: 100%;
    height: 550px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
}

.billboard-panel {
    position: relative;
    flex: 1;
    height: 100%;
    overflow: hidden;
    display: flex;
    align-items: flex-end;
    padding: 40px;
    transition: flex 0.6s cubic-bezier(0.25, 1, 0.5, 1);
    box-sizing: border-box;
    /*border: solid 15px white;*/
}

.billboard-panel + .billboard-panel {
    border-left: 8px solid #ffffff;
}

.billboard-container:hover .billboard-panel:hover {
    flex: 2;
}

.billboard-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    z-index: 1;
    transition: transform 0.8s cubic-bezier(0.25, 1, 0.5, 1);
}

.billboard-panel:hover .billboard-bg {
    transform: scale(1.05);
}


/* --- TWEAK 1: LIGHTER OVERALL GRADIENT --- */
.billboard-overlay {
    position: absolute;
    inset: 0;
    z-index: 2;
    /* Softened the opacity variables down so the full photo and people pop cleanly */
    background: linear-gradient(
        to top,
        rgba(10, 15, 30, 0.75) 0%,   /* dropped from 0.95 */
        rgba(10, 15, 30, 0.4) 40%,    /* dropped from 0.7 */
        rgba(10, 15, 30, 0.05) 75%,
        rgba(10, 15, 30, 0) 100%
    );
}


/* --- TWEAK 2: BLUR & TRANSPARENCY CONTROLS --- */
.billboard-content {
    position: relative;
    z-index: 3;
    color: white;
    width: 100%;
    max-width: 500px;

    /* Modify these parameters to adjust the look */
    background: rgba(15, 23, 42, 0.35);       /* TRANSPARENCY: Lowered from 0.45 for a cleaner look */
    backdrop-filter: blur(8px);                /* BLUR INTENSITY: Reduced from 12px for a lighter frosting */
    -webkit-backdrop-filter: blur(8px);

    padding: 24px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    transition: background 0.4s ease;
}

/* Slightly deepens the opacity box only on active hover focus */
.billboard-panel:hover .billboard-content {
    background: rgba(15, 23, 42, 0.55);
}


/* --- TYPOGRAPHY & FINISHING --- */
.billboard-tag {
    display: inline-block;
    background: var(--sciverse-green);
    color: #ffffff;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    padding: 4px 10px;
    border-radius: 4px;
    margin-bottom: 12px;
}

.billboard-title {
    font-size: 1.65rem;
    line-height: 1.25;
    font-weight: 700;
    margin: 0;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}
.billboard-title-no-shadow {
    font-size: 1.65rem;
    line-height: 1.25;
    font-weight: 700;
    margin: 0;
}

.billboard-reveal-elements {
    opacity: 0;
    max-height: 0;
    transform: translateY(20px);
    transition: opacity 0.4s ease, max-height 0.4s ease, transform 0.4s ease;
    overflow: hidden;
}

.billboard-panel:hover .billboard-reveal-elements {
    opacity: 1;
    max-height: 200px;
    transform: translateY(0);
    margin-top: 16px;
}

.billboard-subtitle {
    font-size: 0.95rem;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.9);
    margin: 0 0 16px 0;
}

.billboard-btn {
    display: inline-block;
    color: #ffffff;
    font-weight: 600;
    text-decoration: none;
    font-size: 0.9rem;
    border-bottom: 2px solid white;
    padding-bottom: 2px;
}

.billboard-btn i {
    margin-left: 6px;
    transition: transform 0.2s ease;
}

.billboard-btn:hover i {
    transform: translateX(4px);
}

/* -----------------------------------------
   1. TABLET / ACCORDION STAGE (e.g., iPad Mini Portrait: 768px - 992px)
----------------------------------------- */
@media (max-width: 992px) and (min-width: 768px) {
    .billboard-container {
        /* Maintain horizontal layout so accordion works */
        flex-direction: row;
        height: 480px; /* Slightly shorter than desktop (550px) to fit tablet aspect ratios */
    }

    .billboard-panel {
        padding: 24px 16px; /* Reduced padding for narrower initial column widths */
    }

    /* Keep desktop vertical separators intact */
    .billboard-panel + .billboard-panel {
        border-left: 8px solid #ffffff;
        border-top: none;
    }

    /* Scale typography down so titles don't overflow when panels are collapsed */
    .billboard-title {
        font-size: 1.25rem;
        line-height: 1.2;
    }

    /* Slightly lighter frosting so text pops in tight spaces */
    .billboard-content {
        padding: 16px;
        backdrop-filter: blur(6px);
        -webkit-backdrop-filter: blur(6px);
    }

    .billboard-subtitle {
        font-size: 0.85rem;
        margin-bottom: 12px;
    }
}


/* -----------------------------------------
   2. MOBILE / STACKED STAGE (Phones: under 768px)
----------------------------------------- */
@media (max-width: 767px) {
    .billboard-container {
        flex-direction: column;
        height: auto;
    }

    .billboard-panel {
        flex: none;
        width: 100%;
        height: 300px;
        padding: 20px;
    }

    /* Horizontal borders between stacked items */
    .billboard-panel + .billboard-panel {
        border-left: none;
        border-top: 8px solid #ffffff;
    }

    /* Disable panel expansion for mobile stacked view */
    .billboard-container:hover .billboard-panel:hover {
        flex: none;
    }

    .billboard-content {
        padding: 16px;
        background: rgba(15, 23, 42, 0.45);
        backdrop-filter: blur(4px);
        -webkit-backdrop-filter: blur(4px);
        max-width: 100%;
    }

    .billboard-title {
        font-size: 1.3rem;
        line-height: 1.2;
    }

    /* Always reveal content on touch screens without hover */
    .billboard-reveal-elements {
        opacity: 1;
        max-height: none;
        transform: translateY(0);
        margin-top: 8px;
    }

    .billboard-subtitle {
        display: none !important;
    }
}
/* -----------------------------------------
   Topics Section Adjustments (Magazine Flow)
----------------------------------------- */

/* TWEAK 2: Text matching the clean magazine layout text rules */
.topic-headline-text {
    font-size: 1.05rem;
    font-weight: 700;
    margin-top: 12px;
    line-height: 1.3;
}

.topic-headline-text a {
    color: #111827; /* Matching the deep card dark text color */
    text-decoration: none;
    background: linear-gradient(to right, #0284c7, #0284c7) no-repeat right bottom / 0 2px;
    transition: background-size 0.3s ease;
}

/* Hover effect mirrors the main hero link states */
.topic-headline-text a:hover {
    background-size: 100% 2px;
    background-position: left bottom;
    color: #0284c7;
}

/* Optional Integration: Makes the illustrations react nicely when hovered */
.topic-card-wrapper {
    transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}
.topic-illustration {
    transition: transform 0.4s ease;
}

/* Complex trigger: hovering the link text OR the card itself animates the image nicely */
.col-xl-3:hover .topic-illustration {
    transform: scale(1.06);
}
.col-xl-3:hover .topic-card-wrapper {
    transform: translateY(-4px);
}


/* -----------------------------------------
   Layout #3: Visual Feed / Card Stack
----------------------------------------- */

.feed-masonry-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr; /* Asymmetric balance */
    grid-template-rows: auto auto;
    gap: 32px;
    width: 100%;
    padding-top: 8px;
}

/* --- BASE CARD ARCHITECTURE --- */
.feed-card {
    background: #ffffff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
    border: 1px solid #f1f5f9;
    transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1), box-shadow 0.4s ease;
}

.feed-card-link-wrapper {
    text-decoration: none !important;
    color: inherit;
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* Structural Grid Placements */
.feed-card-large {
    grid-column: 1;
    grid-row: 1 / span 2; /* Takes full height on left */
}

/* --- STAGGERED OFFSET TRICK --- */
/* Pushes the last card slightly lower down to generate a casual masonry flow */
.feed-card-standard:last-child {
    transform: translateY(16px);
}

/* --- THE FEED IMAGE BOX --- */
.feed-image-box {
    position: relative;
    width: 100%;
    overflow: hidden;
    background: #f8fafc;
}

.feed-card-large .feed-image-box {
    aspect-ratio: 16 / 10;
}

.feed-card-standard .feed-image-box {
    aspect-ratio: 16 / 9.5;
}

.feed-image-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1);
}

/* --- VIBRANT BADGES --- */
.feed-badge-pill {
    position: absolute;
    top: 16px;
    left: 16px;
    z-index: 2;
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 6px 12px;
    border-radius: 30px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}
.badge-green { background: #10b981; color: #ffffff; }
.badge-gray { background: #ffffff; color: #334155; }

/* --- CARD TEXT CONTENT --- */
.feed-card-body {
    padding: 28px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.feed-card-standard .feed-card-body {
    padding: 20px 24px 24px 24px;
}

.feed-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
    font-size: 0.8rem;
    color: #64748b;
    font-weight: 600;
}

.feed-title {
    color: #0f172a;
    font-weight: 700;
    margin: 0 0 12px 0;
    line-height: 1.25;
    /* Animated underline build */
    background: linear-gradient(to right, #059669, #059669) no-repeat right bottom / 0 2px;
    transition: background-size 0.3s ease, color 0.2s ease;
    display: inline;
}

.feed-card-large .feed-title { font-size: 2rem; }
.feed-card-standard .feed-title { font-size: 1.35rem; }

.feed-excerpt {
    font-size: 0.95rem;
    line-height: 1.5;
    color: #475569;
    margin: 0;
}

/* --- INTERACTION HOVERS --- */
.feed-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 35px rgba(15, 23, 42, 0.08);
    border-color: #e2e8f0;
}

/* Stays balanced with our default offset rule */
.feed-card-standard:last-child:hover {
    transform: translateY(10px); /* Combines default 16px offset down with -6px hover lift */
}

.feed-card:hover .feed-image-box img {
    transform: scale(1.03);
}

.feed-card:hover .feed-title {
    background-size: 100% 2px;
    background-position: left bottom;
    color: #059669;
}

/* --- RESPONSIVE STREAMING --- */
@media (max-width: 992px) {
    .feed-masonry-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    .feed-card-large {
        grid-column: 1;
        grid-row: auto;
    }
    .feed-card-large .feed-title { font-size: 1.6rem; }
    .feed-card-standard .feed-title { font-size: 1.3rem; }

    /* Drop offset adjustments on mobile streams */
    .feed-card-standard:last-child {
        transform: none;
    }
    .feed-card-standard:last-child:hover {
        transform: translateY(-6px);
    }
}


/* -----------------------------------------
   Layout #4: Bold Typography Feature
----------------------------------------- */

.splash-container {
    display: grid;
    grid-template-columns: 1.4fr 0.6fr; /* Heavy priority given to the massive text */
    gap: 56px;
    width: 100%;
    align-items: center;
    padding: 20px 0;
}

/* --- MAIN HERO WRAPPER --- */
.splash-main-hero {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr; /* Text side vs floating image side */
    gap: 32px;
    align-items: center;
    background: linear-gradient(135deg, #fafafa 0%, #f4f4f5 100%); /* Very soft tech gradient tint */
    padding: 40px;
    border-radius: 24px;
    border: 1px solid #e4e4e7;
}

.splash-text-column {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

/* --- THE MASSIVE TYPOGRAPHY HOOK --- */
.splash-huge-title {
    font-size: 2.5rem; /* Large, clean, punchy headline font */
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -1px;
    color: #09090b;
    margin: 12px 0 16px 0;
}

.splash-huge-title a {
    color: inherit;
    text-decoration: none;
    background: linear-gradient(to right, #6366f1, #6366f1) no-repeat right bottom / 0 3px;
    transition: background-size 0.3s ease;
}

.splash-huge-title a:hover {
    background-size: 100% 3px;
    background-position: left bottom;
}

.splash-lead-in {
    font-size: 1.05rem;
    line-height: 1.5;
    color: #52525b;
    margin: 0 0 24px 0;
}

.splash-tag {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--retro-white);
    background: var(--riken-green);
    padding: 4px 10px;
    border-radius: 6px;
}

.splash-action-link {
    font-weight: 700;
    color: #ff0000;
    text-decoration: none;
    font-size: 1rem;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.splash-action-link i {
    transition: transform 0.2s ease;
}
.splash-action-link:hover i {
    transform: translateX(4px);
}

/* --- FLOATING GRAPHIC DESIGN --- */
.splash-graphic-column {
    display: flex;
    justify-content: center;
}

.floating-image-card {
    width: 100%;
    aspect-ratio: 4 / 5; /* Elegant vertical card crop */
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.12);
    transform: rotate(2deg); /* Trendy playful angle tilt */
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.floating-image-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.splash-main-hero:hover .floating-image-card {
    transform: rotate(0deg) scale(1.02); /* Straightens smoothly on interaction */
    box-shadow: 0 30px 60px -12px rgba(99, 102, 241, 0.2);
}

/* --- SIDEBAR LIST --- */
.splash-sidebar-list {
    display: flex;
    flex-direction: column;
    gap: 28px;
    border-left: 2px solid #e4e4e7;
    padding-left: 32px;
    height: 100%;
    justify-content: center;
}

.sidebar-list-title {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: #a1a1aa;
    margin: 0 0 -8px 0;
    font-weight: 700;
}

.sidebar-list-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.sidebar-item-tag {
    font-size: 0.7rem;
    font-weight: 700;
    color: #71717a;
    text-transform: uppercase;
}

.sidebar-list-item  {
    font-size: 1.25rem;
    line-height: 1.3;
    font-weight: 700;
    margin: 0;
}

.sidebar-list-item a {
    color: #18181b;
    text-decoration: none;
    background: linear-gradient(to right, #6366f1, #6366f1) no-repeat right bottom / 0 2px;
    transition: background-size 0.3s ease;
}

.sidebar-list-item  a:hover {
    background-size: 100% 2px;
    background-position: left bottom;
    color: #6366f1;
}

/* --- RESPONSIVE DOWNSIZING --- */
@media (max-width: 1200px) {
    .splash-main-hero {
        grid-template-columns: 1fr; /* Stack text over graphic inside hero component */
        gap: 40px;
    }
    .floating-image-card {
        aspect-ratio: 16 / 9; /* Widescreen layout looks cleaner when stacked vertically */
        transform: none;
    }
    .splash-main-hero:hover .floating-image-card {
        transform: scale(1.01);
    }
}

@media (max-width: 992px) {
    .splash-container {
        grid-template-columns: 1fr; /* Completely un-grid everything to a singular stream */
        gap: 48px;
    }
    .splash-sidebar-list {
        border-left: none;
        border-top: 2px solid #e4e4e7;
        padding-left: 0;
        padding-top: 32px;
    }
    .splash-huge-title {
        font-size: 2rem;
    }
}

/* ==========================================================================
   THEME: ACADEMIC (Serious, Prestige Journal Aesthetic)
   ========================================================================== */

/* 1. Muted Header & Typography */
.theme-academic .trending-badge {
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.75rem;
    font-weight: 700;
    border-radius: 0; /* Sharp, geometric lines instead of rounded pills */
    padding: 4px 12px;
}

/* Replace glowing neon shadows with elegant, razor-thin borders */
.theme-academic .trending-badge[style] {
    box-shadow: none !important;
    border: 1px solid currentColor;
}

/* Thin, precise layout dividers instead of thick colorful gradients */
.theme-academic .trending-line,
.theme-academic .trending-line-left {
    background: #e2e8f0 !important; /* Fixed crisp, neutral gray line */
    height: 1px !important;
}

/* 2. Interactive Billboard (Style 2) Overrides */
.theme-academic .billboard-container {
    border: 1px solid #e2e8f0;
    background: #ffffff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05); /* Soft institutional shadow */
}

/* Mute the active state glow from the sidebar items */
.theme-academic .sidebar-item.active {
    background-color: #f8fafc !important;
    border-left-width: 3px !important;
}

/* 3. Bold Typography Splash (Style 4) Overrides */
/* Soften the aggressive high-contrast sizing for a traditional grid rhythm */
.theme-academic .splash-title-massive {
    font-family: "Georgia", "Times New Roman", serif; /* Serif choice instantly adds gravity */
    font-weight: 600;
    letter-spacing: -0.02em;
    color: #0f172a;
}

/* Smooth out or remove loud hover animations */
.theme-academic .article-card-interactive {
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.3s ease;
}
.theme-academic .article-card-interactive:hover {
    transform: translateY(-2px); /* Muted elevation lift */
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.06);
}


/* for taxonomy landing pages*/
.banner {
    position: relative;
    display: inline-block;
    margin-bottom: 75px; /* reserve space for the part of the logo hanging below */
}

.banner > img:first-child {
    display: block;
}

.icon {
    position: absolute;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%) translateY(50%);
}


/* new grid styles */
/* Card Container Optimization */
.top-card-grid {
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s ease;
    overflow: hidden;
    background: #ffffff;
    border: 1px solid #e2e8f0 !important;
}

.top-card-grid:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 20px rgba(15, 23, 42, 0.08) !important;
}

/* Image zoom effect on hover */
.card-image-wrapper {
    overflow: hidden;
    position: relative;
}
.card-image-wrapper img {
    transition: transform 0.4s ease;
}
.top-card-grid:hover .card-image-wrapper img {
    transform: scale(1.03);
}

/* Integrated Topics Tray */
.border-top-dashed {
    border-top: 1px dashed #e2e8f0;
}

.card-topics-tray {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

/* Sleek Minimalist Badges */
.topic-inline-badge {
    font-size: 0.725rem !important;
    font-weight: 500 !important;
    padding: 3px 8px !important;
    border-radius: 4px !important;
    background-color: #f1f5f9 !important; /* Neutral slate-tint background */
    color: #475569 !important;            /* Readable text color */
    display: inline-block;
    transition: background 0.2s ease, color 0.2s ease;
}

/* Highlight individual badges subtly when hovered directly */
.topic-pill-link:hover .topic-inline-badge {
    background-color: #e2e8f0 !important;
    color: #0f172a !important;
}

/* Restored tight topic wrapping */
.custom-card-footer {
    border-top: 1px dashed #e2e8f0;
    line-height: 1.2 !important; /* Strips away bloated vertical heights between wrapping tags */
    padding-top: 8px;
    text-align: left;
}

/* Ensures badges display tightly inline with correct vertical margins */
.macro-topic-badge {
    display: inline-block !important;
    margin-top: 2px !important;
    margin-bottom: 2px !important;
    margin-right: 4px !important;
    vertical-align: middle;
}

/* Un-comment or add this to test the muted editorial tag look */
.custom-card-footer .macro-topic-badge {
    background-color: #f1f5f9 !important; /* Mutes the bright background to soft slate */
    color: #475569 !important;            /* Mutes the text to matching dark steel */
    border: 1px solid #e2e8f0 !important; /* Gives them a crisp, subtle container border */
    font-weight: 500;
    text-transform: capitalize;           /* Softens the text appearance without forcing lowercase */
}

/* Subtle interactive state when hovering over a muted card tag */
.custom-card-footer a:hover .macro-topic-badge {
    background-color: #e2e8f0 !important;
    color: #0f172a !important;
}


.taxonomy-card {
    overflow: hidden;
}

.taxonomy-card img {
    transition: transform 0.3s ease;
}

.taxonomy-card:hover img {
    transform: scale(1.1);
}

/* ==========================================================================
   Science Hero - Interlocking Puzzle Grid
   ========================================================================== */

.science-hero-wrapper {
  max-width: 1320px;
  margin: 0 auto;
  padding: 2rem 1rem;
}

.hero-section-heading {
  font-size: 0.875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #64748b;
  margin-bottom: 1.5rem;
}

/* --- Masonry Container --- */
.science-puzzle-grid {
  margin: 0 -8px; /* Offset gutter padding */
}

/* 3-Column Base Grid Sizer */
.grid-sizer,
.puzzle-card {
  width: 33.333%; /* 3 columns on desktop */
  padding: 8px;   /* The inter-piece gap */
  box-sizing: border-box;
}

/* --- Card Size Variations --- */

/* Standard Card (1x1) */
.puzzle-card.size-standard .card-inner {
  min-height: 280px;
}

/* Tall Pillar (1x2) - Great for Q&A Interviews */
.puzzle-card.size-tall .card-inner {
  min-height: 576px; /* Spans roughly 2 vertical cards + gutter */
}

/* Wide Banner (2x1) */
.puzzle-card.size-wide {
  width: 66.666%; /* Spans 2 columns */
}
.puzzle-card.size-wide .card-inner {
  min-height: 280px;
}

/* Lead Feature (2x2 with Notched Feel) */
.puzzle-card.size-lead_notched {
  width: 66.666%; /* Spans 2 columns */
}
.puzzle-card.size-lead_notched .card-inner {
  min-height: 576px;
  background-color: #0f172a; /* Dark feature theme */
  color: #ffffff;
}

/* --- Card Inner Structure & Visual Styles --- */
.card-inner {
  position: relative;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  background-color: #f8fafc;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid #e2e8f0;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.puzzle-card:hover .card-inner {
  transform: translateY(-2px);
  box-shadow: 0 12px 24px -10px rgba(0, 0, 0, 0.15);
}

/* Media / Background Image */
.card-media {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

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

.media-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(15, 23, 42, 0.92) 0%,
    rgba(15, 23, 42, 0.4) 60%,
    rgba(15, 23, 42, 0.05) 100%
  );
}

/* Content Body Typography */
.card-content {
  position: relative;
  z-index: 2;
  padding: 1.5rem;
}

.card-kicker {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #38bdf8;
  margin-bottom: 0.5rem;
}

.card-title {
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.3;
  margin: 0 0 0.5rem 0;
}

.size-lead_notched .card-title {
  font-size: 1.85rem;
}

.card-title a {
  color: inherit;
  text-decoration: none;
}

.card-title a:hover {
  text-decoration: underline;
}

.card-summary {
  font-size: 0.925rem;
  line-height: 1.5;
  color: #cbd5e1;
  margin-bottom: 1rem;
}

.card-meta {
  font-size: 0.775rem;
  color: #94a3b8;
  font-weight: 500;
}

.meta-separator {
  margin: 0 0.35rem;
}

/* --- Notched L-Shape Visual Accent --- */
/* Gives the lead story a distinct cutout notch in the top right corner */
.puzzle-card.size-lead_notched .notch-accent {
  position: absolute;
  top: 0;
  right: 0;
  width: 60px;
  height: 60px;
  background-color: #ffffff;
  clip-path: polygon(100% 0, 0 0, 100% 100%);
  z-index: 3;
}

/* --- Responsive Breakpoints --- */

/* Tablet (2 columns) */
@media (max-width: 992px) {
  .grid-sizer,
  .puzzle-card {
    width: 50%;
  }

  .puzzle-card.size-wide,
  .puzzle-card.size-lead_notched {
    width: 100%;
  }
}

/* Mobile (1 column stacked) */
@media (max-width: 640px) {
  .grid-sizer,
  .puzzle-card,
  .puzzle-card.size-wide,
  .puzzle-card.size-lead_notched {
    width: 100%;
  }

  .puzzle-card.size-tall .card-inner,
  .puzzle-card.size-lead_notched .card-inner {
    min-height: 360px;
  }
}


.story-section {
    margin: 3rem 0;
}

.story-section-title {
    margin-bottom: 1.25rem;
    font-weight: 700;
    line-height: 1.2;
}

/* 1. Left bar */

.story-section-title--bar {
    padding-left: 1rem;
    border-left: 6px solid var(--retro-orange);
    font-size: 2rem;
}

/* 2. Underline */

.story-section-title--underline {
    display: inline-block;
    padding-bottom: .3rem;
    border-bottom: 4px solid var(--retro-orange);
    font-size: 2rem;
}

/* 3. Pill */

.story-section-title--pill {
    display: inline-block;
    padding: .35rem .9rem;
    border-radius: 999px;
    background: #eef6ff;
    color: var(--retro-orange);
    font-size: 1.8rem;
}


.article--dropcap > p:first-child::first-letter {
    float: left;
    font-size: 4.5rem;
    line-height: .8;
    font-weight: 700;
    padding-right: .15em;
    padding-top: .05em;
    color:var(--retro-orange);
}

.article--first-paragraph > p:first-child{
    font-weight: 600;
    font-size:1.2rem;
    margin-bottom: 2rem;
}


/*  tetris grid test */
.tetris-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: repeat(3, 1fr);
  gap: 12px; /* Spacing between blocks */
  width: 100%;

  /* Forces the grid to scale fluidly to full width
     while maintaining the 4:3 layout proportions */
  aspect-ratio: 4 / 3;
}

.shape {
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: sans-serif;
  font-weight: bold;
  color: #ffffff;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.6);

  /* Background & Image Configuration */
  background-color: var(--bg-color, #333);
  background-image: var(--bg-image, none);
  background-size: cover;
  background-position: center;

  padding: 1.5rem;
  box-sizing: border-box;
}

/* Shape 1: Red L-Shape (Cells 1, 2, 5, 9) */
.shape-1 {
  grid-column: 1 / 3;
  grid-row: 1 / 4;
  --bg-color: #e63946;
  clip-path: polygon(
    0% 0%,
    100% 0%,
    100% 33.33%,
    50% 33.33%,
    50% 100%,
    0% 100%
  );
}

/* Shape 2: Blue 2x2 Block (Cells 3, 4, 7, 8) */
.shape-2 {
  grid-column: 3 / 5;
  grid-row: 1 / 3;
  --bg-color: #0077b6;
}

/* Shape 3: Yellow Reversed L-Shape (Cells 6, 10, 11, 12) */
.shape-3 {
  grid-column: 2 / 5;
  grid-row: 2 / 4;
  --bg-color: #e0a96d;
  clip-path: polygon(
    0% 0%,
    33.33% 0%,
    33.33% 50%,
    100% 50%,
    100% 100%,
    0% 100%
  );
}


/* ==========================================
   Custom Styled Table Block Styles
   ========================================== */

/* 1. Base Table Formatting */
.custom-table-container table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 0.5rem;
}

/* 2. Base Wrapper & Width Utility Classes */
.table-block-wrapper {
    display: table; /* Shrinks container width to fit the enclosed table */
    box-sizing: border-box;
}

.table-block-wrapper.w-full {
    width: 100%;
    display: block;
}

.table-block-wrapper.w-3\/4,
.table-block-wrapper.w-3-4 {
    width: 75%;
    margin-left: auto;
    margin-right: auto;
}

.table-block-wrapper.w-1\/2,
.table-block-wrapper.w-1-2 {
    width: 50%;
    margin-left: auto;
    margin-right: auto;
}

.table-block-wrapper.w-auto {
    width: fit-content;
    margin-left: auto;
    margin-right: auto;
}

/* 3. Header Shading Styles */
.table-header-shaded-light table thead th {
    background-color: #f1f5f9;
    color: #0f172a;
    font-weight: 600;
}

.table-header-shaded-dark table thead th {
    background-color: #1e293b;
    color: #ffffff;
    font-weight: 600;
}

.table-header-shaded-brand table thead th {
    background-color: var(--sciverse-bears-navy);
    color: #ffffff;
    font-weight: 600;
}

/* 4. Border Styles */
.table-border-bordered-full table,
.table-border-bordered-full table th,
.table-border-bordered-full table td {
    border: 1px solid #cbd5e1;
    padding: 8px 12px;
}

.table-border-bordered-horizontal table th,
.table-border-bordered-horizontal table td {
    border-bottom: 1px solid #e2e8f0;
    padding: 8px 12px;
}

.table-border-bordered-none table th,
.table-border-bordered-none table td {
    border: none;
    padding: 8px 12px;
}

/* 5. Column Alignment Overrides */
.table-block-wrapper.text-left th,
.table-block-wrapper.text-left td {
    text-align: left;
}

.table-block-wrapper.text-center th,
.table-block-wrapper.text-center td {
    text-align: center;
}

.table-block-wrapper.text-right th,
.table-block-wrapper.text-right td {
    text-align: right;
}

/* 6. Caption & Footer Notes Left-Alignment */
.table-caption,
.table-footer-notes {
    text-align: left;
    width: 100%;
}


/* =========================================================
   PHOTOSWIPE FULLSCREEN FIX
   ========================================================= */

/* Force PhotoSwipe root overlay container to occupy full viewport height/width */
.pswp {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    z-index: 99999 !important;
}

/* Ensure the zoom wrapper fills its target viewport calculations */
.pswp__zoom-wrap {
    min-width: 1px !important;
    min-height: 1px !important;
}

/* Ensure the lightbox image fits inside without collapsing */
.pswp__img {
    max-width: none !important;
    max-height: none !important;
    object-fit: contain !important;
}