html, body { color-scheme: light; }
/**
 * ========================================
 * SOEC BLOCK SYSTEM - FRONTEND STYLES
 * Complete CSS for all block types
 * ========================================
 * 
 * BLOCK STATUS OVERVIEW:
 * ✓ COMPLETE: accordion-block, data-block, download-block, flip-block, 
 *             form-block, frame-block, image-block, inspirational-block, 
 *             news-block, quote-block, section-block, split-block, 
 *             text-block, video-block
 * ⚠ PLACEHOLDER: progressive-block (awaiting development)
 * 
 * DOCUMENT STRUCTURE:
 * 1. CSS Custom Properties (Design Tokens)
 * 2. Core Layout Components (Section/Block Wrappers)
 * 3. Shared Utilities (Colors, Typography)
 * 4. Individual Block Styles (A-Z)
 * 5. Responsive Breakpoints
 * 6. Accessibility & Print Styles
 * 
 * VERSION: 2.0
 * LAST UPDATED: 2025
 */

/* ========================================
   1. CSS CUSTOM PROPERTIES
   ======================================== */

:root {
    /* Force light color scheme — prevents OS/browser dark mode from
       recolouring the site's own designed colours.
       On Android Chrome with forced dark mode, we also set this on
       html and body since some implementations ignore :root. */
    color-scheme: light;

    /* Spacing System (existing) */
    --block-spacing: 0.75rem;
    --section-spacing: 0;
    --base-spacing: clamp(1rem, 2.5vw, 2rem);
    --side-margin: clamp(1rem, 3vw, 4rem);
    
    /* ADD THESE - H-Gap values */
    --h-gap-none: 0px;
    --h-gap-narrow: 8px;
    --h-gap-normal: 16px;
    --h-gap-wide: 24px;
    --h-gap-spacious: 32px;
    
    /* ADD THESE - V-Gap values */
    --v-gap-none: 0px;
    --v-gap-narrow: 4px;
    --v-gap-normal: 8px;
    --v-gap-wide: 12px;
    --v-gap-spacious: 16px;
    
    /* ADD THESE - Spacing multipliers for density */
    --spacing-mult-none: 0.6;
    --spacing-mult-narrow: 0.8;
    --spacing-mult-normal: 1;
    --spacing-mult-wide: 1.25;
    --spacing-mult-spacious: 1.5;
    /* Block spacing variables — used by spacing-* classes on soec-block */
    --spacing-none: 0px;
    --spacing-tight: 4px;
    --spacing-narrow: 10px;
    --spacing-normal: 20px;
    --spacing-wide: 40px;
    --spacing-spacious: 60px;
    
    /* ADD THESE - Base values for calculations */
    --base-padding: 16px;
    --base-line-height: 1.6;
    --base-element-gap: 12px;
    
    /* Site Color Palette */
    --burgundy: #8b2635;
    --forest-green: #1b5137;
    --emerald-green: #059669;
    --sage-green: #8ca280;
    --tab-blue: #4f9aa8;
    --highlight-orange: #e1a038;
    --rust-red: #cc4020;
    --brick-red: #8c1a22;
    --hazelnut: #371c00;
    --charcoal: #333;
    
    /* ========================================
       UNIVERSAL SHADOW SYSTEM
       6-level shadows with layered approach
       ======================================== */
    
    /* Default shadow HSL for neutral elements */
    --shadow-hsl: 220deg 15% 20%;
    
    /* Shadow HSLs matched to site colors (for colored elements) */
    --shadow-hsl-burgundy: 350deg 40% 20%;
    --shadow-hsl-forest-green: 140deg 35% 15%;
    --shadow-hsl-emerald-green: 158deg 60% 20%;
    --shadow-hsl-sage-green: 100deg 20% 25%;
    --shadow-hsl-tab-blue: 190deg 50% 20%;
    --shadow-hsl-highlight-orange: 30deg 60% 18%;
    --shadow-hsl-rust-red: 12deg 55% 20%;
    --shadow-hsl-hazelnut: 30deg 60% 8%;
    --shadow-hsl-charcoal: 240deg 10% 10%;
    --shadow-hsl-white: 220deg 15% 20%;
    
    /* Layout Constraints */
    --max-content-width: 1200px;
}

/* ========================================
   UNIVERSAL SHADOW CLASSES
   Use these on any block/card element
   ======================================== */

/* None - No shadow */
.shadow-none {
    box-shadow: none !important;
}

/* Light - Very subtle, barely visible */
.shadow-light {
    box-shadow:
        1px 1px 2px hsl(var(--shadow-hsl) / 0.15),
        2px 2px 4px hsl(var(--shadow-hsl) / 0.10),
        3px 4px 6px hsl(var(--shadow-hsl) / 0.06);
}

/* Moderate - Soft, slightly deeper */
.shadow-moderate {
    box-shadow:
        1px 2px 4px hsl(var(--shadow-hsl) / 0.20),
        2px 4px 10px hsl(var(--shadow-hsl) / 0.14),
        4px 8px 16px hsl(var(--shadow-hsl) / 0.10);
}

/* Medium - Standard UI depth */
.shadow-medium {
    box-shadow:
        2px 4px 6px hsl(var(--shadow-hsl) / 0.26),
        4px 8px 16px hsl(var(--shadow-hsl) / 0.18),
        8px 12px 22px hsl(var(--shadow-hsl) / 0.14);
}

/* Heavy - Dramatic elevation */
.shadow-heavy {
    box-shadow:
        3px 6px 10px hsl(var(--shadow-hsl) / 0.32),
        6px 12px 24px hsl(var(--shadow-hsl) / 0.22),
        12px 20px 32px hsl(var(--shadow-hsl) / 0.16);
}

/* V. Heavy - High elevation, exaggerated depth */
.shadow-vheavy {
    box-shadow:
        4px 8px 14px hsl(var(--shadow-hsl) / 0.38),
        10px 18px 32px hsl(var(--shadow-hsl) / 0.28),
        18px 30px 48px hsl(var(--shadow-hsl) / 0.20);
}

/* Hover enhancement - add subtle lift */
.shadow-light:hover,
.shadow-moderate:hover {
    box-shadow:
        2px 4px 8px hsl(var(--shadow-hsl) / 0.22),
        4px 8px 16px hsl(var(--shadow-hsl) / 0.16),
        6px 12px 24px hsl(var(--shadow-hsl) / 0.12);
}

.shadow-medium:hover {
    box-shadow:
        3px 6px 10px hsl(var(--shadow-hsl) / 0.30),
        6px 12px 22px hsl(var(--shadow-hsl) / 0.22),
        10px 18px 32px hsl(var(--shadow-hsl) / 0.16);
}

.shadow-heavy:hover,
.shadow-vheavy:hover {
    box-shadow:
        4px 8px 14px hsl(var(--shadow-hsl) / 0.40),
        10px 18px 32px hsl(var(--shadow-hsl) / 0.30),
        18px 30px 50px hsl(var(--shadow-hsl) / 0.22);
}

/* Block wrappers should NOT have shadows - only their cards should */
/* These overrides must come after the base shadow classes */
.split-block-wrapper.shadow-none,
.split-block-wrapper.shadow-light,
.split-block-wrapper.shadow-moderate,
.split-block-wrapper.shadow-medium,
.split-block-wrapper.shadow-heavy,
.split-block-wrapper.shadow-vheavy,
.split-block-wrapper.shadow-mild,
.split-block-wrapper.shadow-strong,
.split-block-wrapper.shadow-very-strong,
.data-block-wrapper.shadow-none,
.data-block-wrapper.shadow-light,
.data-block-wrapper.shadow-moderate,
.data-block-wrapper.shadow-medium,
.data-block-wrapper.shadow-heavy,
.data-block-wrapper.shadow-vheavy,
.data-block-wrapper.shadow-mild,
.data-block-wrapper.shadow-strong,
.data-block-wrapper.shadow-very-strong,
.image-block-wrapper.shadow-none,
.image-block-wrapper.shadow-light,
.image-block-wrapper.shadow-moderate,
.image-block-wrapper.shadow-medium,
.image-block-wrapper.shadow-heavy,
.image-block-wrapper.shadow-vheavy,
.image-block-wrapper.shadow-mild,
.image-block-wrapper.shadow-strong,
.image-block-wrapper.shadow-very-strong,
.text-block-wrapper.shadow-none,
.text-block-wrapper.shadow-light,
.text-block-wrapper.shadow-moderate,
.text-block-wrapper.shadow-medium,
.text-block-wrapper.shadow-heavy,
.text-block-wrapper.shadow-vheavy,
.text-block-wrapper.shadow-mild,
.text-block-wrapper.shadow-strong,
.text-block-wrapper.shadow-very-strong,
.flip-block-wrapper.shadow-none,
.flip-block-wrapper.shadow-light,
.flip-block-wrapper.shadow-moderate,
.flip-block-wrapper.shadow-medium,
.flip-block-wrapper.shadow-heavy,
.flip-block-wrapper.shadow-vheavy,
.flip-block-wrapper.shadow-mild,
.flip-block-wrapper.shadow-strong,
.flip-block-wrapper.shadow-very-strong,
.frame-block-wrapper.shadow-none,
.frame-block-wrapper.shadow-light,
.frame-block-wrapper.shadow-moderate,
.frame-block-wrapper.shadow-medium,
.frame-block-wrapper.shadow-heavy,
.frame-block-wrapper.shadow-vheavy,
.frame-block-wrapper.shadow-mild,
.frame-block-wrapper.shadow-strong,
.frame-block-wrapper.shadow-very-strong,
.news-block-wrapper.shadow-none,
.news-block-wrapper.shadow-light,
.news-block-wrapper.shadow-moderate,
.news-block-wrapper.shadow-medium,
.news-block-wrapper.shadow-heavy,
.news-block-wrapper.shadow-vheavy
.news-block-wrapper.shadow-mild,
.news-block-wrapper.shadow-strong,
.news-block-wrapper.shadow-very-strong {
    box-shadow: none !important;
}

/* ========================================
   2. CORE LAYOUT COMPONENTS
   ======================================== */

/* Section Wrapper (Page-level container) */
.section-wrapper {
    position: relative;
    margin-bottom: var(--block-spacing);
    width: 100%;
}

.section-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(8px);
    z-index: 0;
    pointer-events: none;
}

.section-content {
    position: relative;
    z-index: 1;
    max-width: 100%;
    margin: 0 auto;
    padding: var(--block-spacing) 0;
}

/* Block Wrapper (Individual block container) */
.soec-block {
    position: relative;
    width: 100%;
    margin: 0 auto;
}

.soec-block .full-width {
    max-width: 100%;
    width: 100%;
    padding: 0;
}

.soec-block .contained-width {
    max-width: 100%;
    width: 100%;
    margin: 0 auto;
    box-shadow: none !important;
}

/* ========================================
   3. SHARED UTILITIES
   ======================================== */

/* Background Colors */
.bg-burgundy { background: var(--burgundy); }
.bg-forest-green { background: var(--forest-green); }
.bg-emerald-green { background: var(--emerald-green); }
.bg-sage-green { background: var(--sage-green); }
.bg-tab-blue { background: var(--tab-blue); }
.bg-highlight-orange { background: var(--highlight-orange); }
.bg-rust-red { background: var(--rust-red); }
.bg-brick-red { background: var(--brick-red); }
.bg-charcoal { background: var(--charcoal); }
.bg-black { background: #000; }
.bg-white { background: #fff; }
.bg-transparent { background: transparent !important; }

/* Text Colors */
.text-white { color: #fff; }
.text-black { color: #000; }
.text-charcoal { color: var(--charcoal); }
.text-forest-green { color: var(--forest-green); }
.text-burgundy { color: var(--burgundy); }
.text-emerald-green { color: var(--emerald-green); }
.text-sage-green { color: var(--sage-green); }
.text-tab-blue { color: var(--tab-blue); }
.text-highlight-orange { color: var(--highlight-orange); }
.text-rust-red { color: var(--rust-red); }
.text-brick-red { color: var(--brick-red); }

/* Background Colors (with -color- prefix) */
.bg-color-burgundy { background: var(--burgundy) !important; }
.bg-color-forest-green { background: var(--forest-green) !important; }
.bg-color-emerald-green { background: var(--emerald-green) !important; }
.bg-color-sage-green { background: var(--sage-green) !important; }
.bg-color-tab-blue { background: var(--tab-blue) !important; }
.bg-color-highlight-orange { background: var(--highlight-orange) !important; }
.bg-color-ochre { background: var(--highlight-orange) !important; }
.bg-color-rust-red { background: var(--rust-red) !important; }
.bg-color-brick-red { background: var(--brick-red) !important; }
.bg-color-charcoal { background: var(--charcoal) !important; }
.bg-color-black { background: #000 !important; }
.bg-color-white { background: #fff !important; }
.bg-color-transparent { background: transparent !important; }

/* Text Colors (with -color- prefix) */
.text-color-white { color: #fff !important; }
.text-color-black { color: #000 !important; }
.text-color-charcoal { color: var(--charcoal) !important; }
.text-color-forest-green { color: var(--forest-green) !important; }
.text-color-burgundy { color: var(--burgundy) !important; }
.text-color-emerald-green { color: var(--emerald-green) !important; }
.text-color-sage-green { color: var(--sage-green) !important; }
.text-color-tab-blue { color: var(--tab-blue) !important; }
.text-color-highlight-orange { color: var(--highlight-orange) !important; }
.text-color-ochre { color: var(--highlight-orange) !important; }
.text-color-rust-red { color: var(--rust-red) !important; }
.text-color-brick-red { color: var(--brick-red) !important; }

/* Error States */
.block-error {
    padding: 1.5rem;
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 20px;
    color: #856404;
    text-align: center;
}

.block-error p {
    margin: 0;
    font-weight: 500;
}

/* ========================================
   3.5. MIDWAY ZOOM SYSTEM
   ======================================== */

/**
 * Midway Zoom Effect
 * Elements with .midway-zoomable class scale to 1.1x when they overlap
 * the vertical midpoint of the viewport.
 * 
 * Applied to: title boxes, accordion items, and other block elements
 * Excludes: full-width items, backgrounds
 */

.midway-zoomable {
    transition: transform 0.6s cubic-bezier(0.4, 0.0, 0.2, 1), 
                margin 0.6s cubic-bezier(0.4, 0.0, 0.2, 1),
                z-index 0s; /* Instant z-index change */
    transform-origin: center center;
    will-change: transform, margin; /* Optimization hint for browser */
}

/* Class added at near-full zoom for any additional styling needs */
.midway-zoomable.midway-zoomed {
    /* Styles are applied via JavaScript inline for smooth interpolation */
}

/* Ensure smooth transitions don't conflict with other transforms */
.midway-zoomable.midway-zoomed .accordion-icon {
    /* Icon rotation should still work independently */
    transition: transform 0.3s ease;
}

/* ========================================
   4. INDIVIDUAL BLOCK STYLES
   ======================================== */

/* ===== ACCORDION BLOCK ===== */

.accordion-block-wrapper {
    display: grid;
    gap: 1rem; /* REDUCED from 1.25rem (20px) to 1rem (16px) */
    width: 100%;
    padding: 1.33rem 0 2rem 0; /* REDUCED top padding from 2rem to 1.33rem (2/3) */
}

.accordion-block-wrapper.columns-1 {
    grid-template-columns: 1fr;
}

.accordion-block-wrapper.columns-2 {
    grid-template-columns: repeat(2, 1fr);
}

.accordion-block-wrapper.columns-3 {
    grid-template-columns: repeat(3, 1fr);
}

/* Equal height mode */
.accordion-block-wrapper.equal-height.columns-2 .accordion-item,
.accordion-block-wrapper.equal-height.columns-3 .accordion-item {
    display: flex;
    flex-direction: column;
}

.accordion-block-wrapper.equal-height .accordion-content {
    flex: 1;
}

/* Accordion item */
.accordion-item {
    border-radius: 15px;
    overflow: hidden;
    box-shadow: -3px 3px 8px rgba(0, 0, 0, 0.15);
}

.accordion-header {
    width: 100%;
    padding: 1rem 1.25rem;
    background: inherit;
    border: none;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: 'Fraunces', serif;
    font-weight: 600;
    transition: background-color 0.2s ease;
    text-align: left;
    outline: none !important; /* REMOVE BLACK BORDER */
}

.accordion-header:hover {
    filter: brightness(0.95);
}

.accordion-header:focus {
    outline: none !important; /* REMOVE BLACK BORDER */
    box-shadow: none !important; /* REMOVE BLACK BORDER */
}

/* Header alignment - text only, icon always stays right */
.accordion-header .header-text {
    flex: 1;
    padding-right: 1rem;
}

.accordion-header.align-left .header-text {
    text-align: left;
}

.accordion-header.align-center .header-text {
    text-align: center;
}

.accordion-header.align-right .header-text {
    text-align: right;
}

/* Icon positioning - ALWAYS ON RIGHT */
.accordion-icon {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease;
    margin-left: auto; /* Push to right side always */
}

.accordion-icon svg {
    width: 100%;
    height: 100%;
    fill: currentColor;
}

/* Icon colors - inherit from header text */
.accordion-icon.icon-color-white {
    color: white;
    fill: white;
}

.accordion-icon.icon-color-black,
.accordion-icon.icon-color-charcoal {
    color: #333333;
    fill: #333333;
}

.accordion-icon.icon-color-burgundy { color: #8b2635; }
.accordion-icon.icon-color-forest-green { color: #1b5137; }
.accordion-icon.icon-color-emerald-green { color: #059669; }
.accordion-icon.icon-color-sage-green { color: #8ca280; }
.accordion-icon.icon-color-tab-blue { color: #4f9aa8; }
.accordion-icon.icon-color-highlight-orange { color: #e1a038; }
.accordion-icon.icon-color-rust-red { color: #cc4020; }
.accordion-icon.icon-color-brick-red { color: #8c1a22; }

/* Icon rotation states */
.accordion-icon.rotated.icon-triangle-light,
.accordion-icon.rotated.icon-triangle-bold {
    transform: rotate(180deg);
}

/* Plus icons rotate to 45° X when open */
.accordion-icon.rotated.icon-plus-light,
.accordion-icon.rotated.icon-plus-bold {
    transform: rotate(45deg);
}

/* Plus bold is slightly larger */
.icon-plus-bold {
    transform: scale(1.15);
}

.accordion-icon.rotated.icon-plus-bold {
    transform: rotate(45deg) scale(1.15);
}

/* Triangle bold is slightly larger */
.icon-triangle-bold {
    transform: scale(1.2);
}

.accordion-icon.rotated.icon-triangle-bold {
    transform: rotate(180deg) scale(1.2);
}

/* Content area */
.accordion-content {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.5s ease-out, 
                opacity 0.4s ease-out,
                padding 0.5s ease-out;
}

.accordion-content.open {
    opacity: 1;
}

.accordion-inner {
    padding: 1.5rem 1.25rem;
}

/* Content text alignment */
.content-text.align-left {
    text-align: left;
}

.content-text.align-center {
    text-align: center;
}

.content-text.align-right {
    text-align: right;
}

/* Animation: Smooth Slide - SLOWER AND GENTLER */
/* Animation: Smooth Slide - Fast start, slow descent, fast settle with subtle bob */
.accordion-block-wrapper.animation-smooth .accordion-content {
    transition: max-height 0.7s cubic-bezier(0.68, -0.55, 0.265, 1.55),
                opacity 0.5s ease-out,
                padding 0.7s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

/* Animation: Bounce & Settle - MATCHES HEADER DROPDOWN */
.accordion-block-wrapper.animation-bounce .accordion-content {
    transition: max-height 0.4s cubic-bezier(.34, 1.56, .64, 1),
                opacity 0.3s ease-out,
                padding 0.4s cubic-bezier(.34, 1.56, .64, 1);
}

/* Header text font sizes */
.header-text.size-xxs { font-size: 0.75rem; }
.header-text.size-xs { font-size: 0.875rem; }
.header-text.size-small { font-size: 1rem; }
.header-text.size-medium { font-size: 1.125rem; }
.header-text.size-large { font-size: 1.25rem; }
.header-text.size-xl { font-size: 1.5rem; }
.header-text.size-xxl { font-size: 1.875rem; }

/* Content text font sizes */
.content-text.size-xxs { font-size: 0.75rem; }
.content-text.size-xs { font-size: 0.875rem; }
.content-text.size-small { font-size: 0.9375rem; }
.content-text.size-medium { font-size: 1rem; }
.content-text.size-large { font-size: 1.125rem; }
.content-text.size-xl { font-size: 1.25rem; }
.content-text.size-xxl { font-size: 1.5rem; }

/* Button styles */
/* Accordion body text alignment */
.accordion-body-text {
    width: 100%;
}

.accordion-body-text.align-left {
    text-align: left;
}

.accordion-body-text.align-center {
    text-align: center;
}

.accordion-body-text.align-right {
    text-align: right;
}

/* Accordion button wrapper alignment */
.accordion-button-wrapper {
    margin-top: 3rem; /* INCREASED from 1rem to 3rem (3x spacing) */
}

.accordion-button-wrapper.align-left { 
    text-align: left; 
}

.accordion-button-wrapper.align-center { 
    text-align: center; 
}

.accordion-button-wrapper.align-right { 
    text-align: right; 
}

.accordion-button {
    display: inline-block;
    padding: 0.625rem 1.25rem;
    text-decoration: none;
    border-radius: 15px;
    font-weight: 600;
    font-family: 'Work Sans', sans-serif;
    
    /* Default state: transparent background with border matching answer text color */
    background: transparent;
    border: 2px solid var(--btn-border-color, #333333);
    color: var(--btn-border-color, #333333);
    
    transition: all 0.3s ease;
}

.accordion-button::after {
    content: " →";
    display: inline;
}

.accordion-button:hover {
    /* Hover state: solid background with button colors */
    background: var(--btn-hover-bg, #1b5137);
    border: 2px solid var(--btn-hover-bg, #1b5137);
    color: var(--btn-hover-text, #ffffff);
}

.accordion-button:focus {
    outline: 2px solid currentColor;
    outline-offset: 2px;
}

/* Button font sizes */
.accordion-button.size-xxs { font-size: 0.65rem; }
.accordion-button.size-xs { font-size: 0.75rem; }
.accordion-button.size-small { font-size: 0.875rem; }
.accordion-button.size-medium { font-size: 1rem; }
.accordion-button.size-large { font-size: 1.125rem; }
.accordion-button.size-xl { font-size: 1.25rem; }
.accordion-button.size-xxl { font-size: 1.5rem; }

/* Responsive breakpoints */
@media (max-width: 992px) {
    .accordion-block-wrapper.columns-3 {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .accordion-block-wrapper.columns-2,
    .accordion-block-wrapper.columns-3 {
        grid-template-columns: 1fr;
    }
    
    .accordion-header {
        padding: 0.875rem 1rem;
        font-size: 0.95rem;
    }
    
    .accordion-inner {
        padding: 1.25rem 1rem;
    }
}

/* ========================================
   ACCORDION BLOCK - V3 WITH IMAGE SUPPORT
   ======================================== */

/* Accordion inner with image support */
.accordion-inner.with-image {
    padding: 0 !important;
}

.accordion-content-split {
    display: flex;
    width: 100%;
    min-height: 200px;
}

/* Image on right (default) */
.accordion-inner.image-right .accordion-content-split {
    flex-direction: row;
}

.accordion-inner.image-right .accordion-text-container {
    flex: 0 0 66.666%;
    padding: 1.5rem 1.25rem;
}

.accordion-inner.image-right .accordion-image-container {
    flex: 0 0 33.333%;
    order: 2;
}

/* Image on left */
.accordion-inner.image-left .accordion-content-split {
    flex-direction: row;
}

.accordion-inner.image-left .accordion-text-container {
    flex: 0 0 66.666%;
    padding: 1.5rem 1.25rem;
    order: 2;
}

.accordion-inner.image-left .accordion-image-container {
    flex: 0 0 33.333%;
    order: 1;
}

/* Image container styling */
.accordion-image-container {
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.accordion-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
    display: block;
}

/* Image overlay for prototyping */
.accordion-image-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
}

/* Slideshow container needs to establish positioning context */
.accordion-image-container {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Slideshow mode: all images stack absolutely except first which provides height */
/* Important: Even when absolute, these maintain 'position' context for child overlays */
.accordion-image-wrapper.slideshow {
    position: absolute !important; /* Override any other position rules */
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1s ease-in-out;
    pointer-events: none;
}

/* Active slideshow image is visible */
.accordion-image-wrapper.slideshow.active {
    opacity: 1;
    z-index: 2;
    pointer-events: auto;
}

/* First slideshow image stays relative to provide container height and is visible by default */
.accordion-image-wrapper.slideshow:first-child {
    position: relative !important; /* Must be relative to provide height */
    opacity: 1;
    z-index: 1;
}

/* Ken Burns Effect - smooth zoom settle from 120% to 100% */
.accordion-image-wrapper.ken-burns img {
    transform: scale(1.2);
    animation: kenBurnsSettle 2s ease-out forwards;
}

@keyframes kenBurnsSettle {
    from { 
        transform: scale(1.2); 
    }
    to { 
        transform: scale(1); 
    }
}

/* Overlay positioning works because .accordion-image-wrapper has position:relative by default (line 565) */
/* No additional positioning needed - absolute and relative wrappers both create positioning context */

.accordion-image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    pointer-events: none;
}

.accordion-overlay-text {
    font-family: 'Fraunces', serif;
    font-weight: 700;
    color: #1b5137;
    text-align: center;
    line-height: 1.3;
    /* Dynamic font sizing */
    font-size: clamp(14px, 3vw, 24px);
    max-width: 100%;
    word-wrap: break-word;
}

/* Responsive font sizing based on container */
@container (min-width: 300px) {
    .accordion-overlay-text {
        font-size: clamp(16px, 2.5vw, 28px);
    }
}

@container (min-width: 500px) {
    .accordion-overlay-text {
        font-size: clamp(18px, 2vw, 32px);
    }
}

/* Fallback for browsers without container queries */
@media screen and (min-width: 768px) {
    .accordion-overlay-text {
        font-size: 20px;
    }
}

@media screen and (min-width: 1024px) {
    .accordion-overlay-text {
        font-size: 24px;
    }
}

/* Responsive adjustments for image layout */
@media (max-width: 768px) {
    .accordion-content-split {
        flex-direction: column !important;
    }
    
    .accordion-inner.image-right .accordion-text-container,
    .accordion-inner.image-left .accordion-text-container {
        flex: 1 !important;
        order: 2 !important;
        padding: 1.25rem 1rem !important;
    }
    
    .accordion-inner.image-right .accordion-image-container,
    .accordion-inner.image-left .accordion-image-container {
        flex: 0 0 300px !important;
        order: 1 !important;
        width: 100%;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        position: relative !important;
    }
    
    /* DRAMATIC FIX: Force image to absolute center with transform */
    .accordion-inner.image-right .accordion-image,
    .accordion-inner.image-left .accordion-image {
        position: absolute !important;
        top: 50% !important;
        left: 50% !important;
        transform: translate(-50%, -50%) !important;
        width: 100% !important;
        height: auto !important;
        max-height: 100% !important;
        object-fit: cover !important;
    }
}

@media (max-width: 480px) {
    .accordion-inner.image-right .accordion-image-container,
    .accordion-inner.image-left .accordion-image-container {
        flex: 0 0 300px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        position: relative !important;
    }
    
    /* DRAMATIC FIX: Force image to absolute center with transform */
    .accordion-inner.image-right .accordion-image,
    .accordion-inner.image-left .accordion-image {
        position: absolute !important;
        top: 50% !important;
        left: 50% !important;
        transform: translate(-50%, -50%) !important;
        width: 100% !important;
        height: auto !important;
        max-height: 100% !important;
        object-fit: cover !important;
    }
}

/* ========================================
   DATA/STATISTICS BLOCK
   ======================================== */

/* Data Cards Wrapper - Column Layout */
.data-cards-wrapper {
    display: grid;
    gap: 2rem;
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
}

.data-cards-wrapper.columns-1 {
    grid-template-columns: 1fr;
    max-width: 600px;
}

.data-cards-wrapper.columns-2 {
    grid-template-columns: repeat(2, 1fr);
}

.data-cards-wrapper.columns-3 {
    grid-template-columns: repeat(3, 1fr);
}

.data-cards-wrapper.columns-4 {
    grid-template-columns: repeat(4, 1fr);
}

/* Responsive Columns */
@media (max-width: 1024px) {
    .data-cards-wrapper.columns-4 {
        grid-template-columns: repeat(2, 1fr);
    }
    .data-cards-wrapper.columns-3 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .data-cards-wrapper.columns-2,
    .data-cards-wrapper.columns-3,
    .data-cards-wrapper.columns-4 {
        grid-template-columns: 1fr;
    }
}

/* Data Card Base */
.data-card {
    aspect-ratio: 1/1;
    border-radius: 20px;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    box-shadow: 0 8px 24px rgba(6, 39, 53, 0.25);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

/* Aspect Ratio Classes */
.data-card.aspect-32-9 { aspect-ratio: 32/9; }
.data-card.aspect-21-9 { aspect-ratio: 21/9; }
.data-card.aspect-8-1 { aspect-ratio: 8/1; }
.data-card.aspect-6-1 { aspect-ratio: 6/1; }
.data-card.aspect-5-1 { aspect-ratio: 5/1; }
.data-card.aspect-4-1 { aspect-ratio: 4/1; }
.data-card.aspect-3-1 { aspect-ratio: 3/1; }
.data-card.aspect-16-9 { aspect-ratio: 16/9; }
.data-card.aspect-5-4 { aspect-ratio: 5/4; }
.data-card.aspect-4-3 { aspect-ratio: 4/3; }
.data-card.aspect-3-2 { aspect-ratio: 3/2; }
.data-card.aspect-1-1 { aspect-ratio: 1/1; }
.data-card.aspect-2-3 { aspect-ratio: 2/3; }
.data-card.aspect-3-4 { aspect-ratio: 3/4; }
.data-card.aspect-4-5 { aspect-ratio: 4/5; }
.data-card.aspect-9-16 { aspect-ratio: 9/16; }

.data-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(6, 39, 53, 0.35);
}

/* Hero Style - Larger */
.data-card-hero {
    aspect-ratio: 16/9;
    padding: 3rem;
    min-height: 400px;
}

/* Background Image Overlay */
.data-card.has-bg-image {
    background-size: cover;
    background-position: center;
}

.data-card-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1;
}

.data-card-content {
    position: relative;
    z-index: 2;
    width: 100%;
}

/* Typography */
.stat-description {
    font-family: 'Fraunces', serif;
    font-size: clamp(1.1rem, 2vw, 1.4rem);
    line-height: 1.3;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.stat-description-2 {
    margin-top: 0.5rem;
    margin-bottom: 1rem;
}

.stat-number {
    font-family: 'Fraunces', serif;
    font-size: clamp(3rem, 6vw, 5rem);
    font-weight: 700;
    line-height: 1;
    margin: 1rem 0;
}

.data-card-hero .stat-number {
    font-size: clamp(4rem, 8vw, 7rem);
}

.stat-attribution {
    font-size: 0.9rem;
    margin-top: 1rem;
    opacity: 0.9;
    font-style: italic;
}

/* Verified Badge */
.stat-verified-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    margin-top: 0.5rem;
    font-weight: 600;
}

.stat-verified-badge svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
}

/* Icons */
.stat-icons {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
    justify-content: center;
}

/* Manual Entry Icons */
.stat-icon {
    margin: 1rem 0;
    display: flex;
    justify-content: center;
}

.stat-icon-above {
    order: -1;
    margin-bottom: 1.5rem;
}

.stat-icon-below {
    order: 999;
    margin-top: 1.5rem;
}

.stat-icon img,
.stat-icon svg {
    max-width: 80px;
    max-height: 80px;
    width: auto;
    height: auto;
    opacity: 0.9;
}

/* Text Size Classes */
.data-card.text-size-small .stat-description {
    font-size: clamp(0.9rem, 1.5vw, 1.1rem);
}

.data-card.text-size-small .stat-number {
    font-size: clamp(2rem, 4vw, 3.5rem);
}

.data-card.text-size-medium .stat-description {
    font-size: clamp(1.1rem, 2vw, 1.4rem);
}

.data-card.text-size-medium .stat-number {
    font-size: clamp(3rem, 6vw, 5rem);
}

.data-card.text-size-large .stat-description {
    font-size: clamp(1.3rem, 2.5vw, 1.8rem);
}

.data-card.text-size-large .stat-number {
    font-size: clamp(4rem, 7vw, 6rem);
}

.data-card.text-size-xl .stat-description {
    font-size: clamp(1.5rem, 3vw, 2.2rem);
}

.data-card.text-size-xl .stat-number {
    font-size: clamp(5rem, 9vw, 8rem);
}

/* Text Alignment Classes */
.data-card.text-align-left .data-card-content {
    text-align: left;
    align-items: flex-start;
}

.data-card.text-align-center .data-card-content {
    text-align: center;
    align-items: center;
}

.data-card.text-align-right .data-card-content {
    text-align: right;
    align-items: flex-end;
}

.stat-info-icon,
.stat-link-icon {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    color: inherit;
    text-decoration: none;
}

.stat-info-icon:hover,
.stat-link-icon:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.stat-info-icon svg,
.stat-link-icon svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

/* Modal Styles */
.stat-modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    z-index: 10000;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.stat-modal.active {
    display: flex;
}

.stat-modal-content {
    background: white;
    border-radius: 20px;
    max-width: 600px;
    width: 100%;
    padding: 2rem;
    position: relative;
    max-height: 80vh;
    overflow-y: auto;
}

.stat-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.stat-modal-header h3 {
    font-family: 'Fraunces', serif;
    font-size: 1.5rem;
    color: #1b5137;
}

.stat-modal-close {
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: #666;
    line-height: 1;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.stat-modal-close:hover {
    color: #000;
}

.stat-modal-section {
    margin-bottom: 1.5rem;
}

.stat-modal-section h4 {
    font-family: 'Fraunces', serif;
    font-size: 1.1rem;
    color: #8c1a22;
    margin-bottom: 0.5rem;
}

.stat-modal-section p {
    line-height: 1.6;
    color: #333;
}

.stat-modal-verified {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: #059669;
    color: white;
    border-radius: 20px;
    font-weight: 600;
}

/* Error State */
.stat-error {
    padding: 2rem;
    background: #fee;
    border: 2px solid #fcc;
    border-radius: 8px;
    color: #c00;
    text-align: center;
}

/* Grid Layouts */
.data-grid {
    display: grid;
    gap: var(--block-spacing);
    margin: var(--block-spacing) 0;
}

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

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

.data-grid.columns-4 {
    grid-template-columns: repeat(4, 1fr);
}

/* ========================================
   DOWNLOAD BLOCK
   ======================================== */

.download-block-wrapper {
    display: grid;
    gap: 1rem;
    margin: var(--block-spacing) 0;
    width: 100%;
}

/* The wrapper itself is invisible - only the file cards show. It carries a
   bg-color-* class from the block's BG setting (default white), and those
   utility classes use !important, so this needs the extra specificity. */
.download-block-wrapper,
.download-block-wrapper[class*="bg-color-"] {
    background: transparent !important;
    border: none;
    box-shadow: none;
}

/* Layout variations */
.download-block-wrapper.layout-list {
    grid-template-columns: 1fr;
}

.download-block-wrapper.layout-list.columns-2 {
    grid-template-columns: repeat(2, 1fr);
}

.download-block-wrapper.layout-grid.columns-1 {
    grid-template-columns: 1fr;
}

.download-block-wrapper.layout-grid.columns-2 {
    grid-template-columns: repeat(2, 1fr);
}

.download-block-wrapper.layout-grid.columns-3 {
    grid-template-columns: repeat(3, 1fr);
}

.download-block-wrapper.layout-grid.columns-4 {
    grid-template-columns: repeat(4, 1fr);
}

/* Responsive: Stack on mobile */
@media (max-width: 768px) {
    .download-block-wrapper.layout-list.columns-2,
    .download-block-wrapper.layout-grid.columns-2,
    .download-block-wrapper.layout-grid.columns-3,
    .download-block-wrapper.layout-grid.columns-4 {
        grid-template-columns: 1fr;
    }
}

/* Download Item */
.download-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem 1.5rem;
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.download-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
    border-color: #4f9aa8;
}

/* Icon Container */
.download-icon {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(79, 154, 168, 0.1);
    border-radius: 10px;
    transition: all 0.3s ease;
}

/* Icon Sizes */
.download-item.icon-size-small .download-icon {
    width: 40px;
    height: 40px;
}

.download-item.icon-size-small .download-icon svg {
    width: 24px;
    height: 24px;
}

.download-item.icon-size-medium .download-icon {
    width: 48px;
    height: 48px;
}

.download-item.icon-size-medium .download-icon svg {
    width: 28px;
    height: 28px;
}

.download-item.icon-size-large .download-icon {
    width: 56px;
    height: 56px;
}

.download-item.icon-size-large .download-icon svg {
    width: 32px;
    height: 32px;
}

.download-item.icon-size-xl .download-icon {
    width: 64px;
    height: 64px;
}

.download-item.icon-size-xl .download-icon svg {
    width: 36px;
    height: 36px;
}

/* Icon Colors */
.download-item.icon-color-burgundy .download-icon {
    background: rgba(139, 38, 53, 0.1);
    color: #8b2635;
}

.download-item.icon-color-forest-green .download-icon {
    background: rgba(27, 81, 55, 0.1);
    color: #1b5137;
}

.download-item.icon-color-emerald-green .download-icon {
    background: rgba(5, 150, 105, 0.1);
    color: #059669;
}

.download-item.icon-color-sage-green .download-icon {
    background: rgba(140, 162, 128, 0.1);
    color: #8ca280;
}

.download-item.icon-color-tab-blue .download-icon {
    background: rgba(79, 154, 168, 0.1);
    color: #4f9aa8;
}

.download-item.icon-color-highlight-orange .download-icon {
    background: rgba(225, 160, 56, 0.1);
    color: #e1a038;
}

.download-item.icon-color-rust-red .download-icon {
    background: rgba(204, 64, 32, 0.1);
    color: #cc4020;
}

.download-item.icon-color-brick-red .download-icon {
    background: rgba(140, 26, 34, 0.1);
    color: #8c1a22;
}

.download-item.icon-color-charcoal .download-icon {
    background: rgba(51, 51, 51, 0.1);
    color: #333;
}

.download-item.icon-color-black .download-icon {
    background: rgba(0, 0, 0, 0.1);
    color: #000;
}

.download-item.icon-color-white .download-icon {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
}

/* Download Content */
.download-content {
    flex: 1;
    min-width: 0;
}

.download-title {
    display: block;
    font-family: 'Work Sans', sans-serif;
    font-weight: 600;
    font-size: 1rem;
    color: #1d2327;
    margin-bottom: 0.25rem;
    line-height: 1.3;
}

.download-meta {
    display: flex;
    gap: 1rem;
    font-family: 'Work Sans', sans-serif;
    font-size: 0.85rem;
    color: #757575;
    margin-top: 0.5rem;
}

.download-meta span {
    display: inline-block;
}

.download-meta span:not(:last-child)::after {
    content: "•";
    margin-left: 1rem;
    color: #ccc;
}

.download-description {
    display: block;
    font-family: 'Work Sans', sans-serif;
    font-size: 0.875rem;
    color: #666;
    line-height: 1.4;
    margin-top: 0.5rem;
}

/* Download Arrow */
.download-arrow {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #4f9aa8;
    transition: transform 0.3s ease;
}

.download-arrow svg {
    width: 24px;
    height: 24px;
}

.download-item:hover .download-arrow {
    transform: translateX(4px);
}

/* Grid Layout Variant */
.download-block-wrapper.layout-grid .download-item {
    flex-direction: column;
    text-align: center;
    padding: 2rem 1.5rem;
}

.download-block-wrapper.layout-grid .download-icon {
    margin-bottom: 1rem;
}

.download-block-wrapper.layout-grid .download-content {
    width: 100%;
}

.download-block-wrapper.layout-grid .download-title,
.download-block-wrapper.layout-grid .download-meta,
.download-block-wrapper.layout-grid .download-description {
    text-align: center;
}

.download-block-wrapper.layout-grid .download-meta {
    justify-content: center;
}

.download-block-wrapper.layout-grid .download-arrow {
    margin-top: 1rem;
}

/* No Downloads Message */
.no-downloads {
    padding: 2rem;
    text-align: center;
    color: #757575;
    font-style: italic;
    background: #f6f7f7;
    border-radius: 8px;
}

/* ========================================
   FLIP BLOCK FINAL v17.1
   Complete with mobile spacing fix
   ======================================== */

/* FLIP BLOCK WRAPPER - Always visible overflow with proper grid spacing */
.flip-block-wrapper {
    display: grid;
    gap: 20px; /* Default gap */
    row-gap: 25px; /* Vertical spacing between rows */
    width: 100%;
    position: relative;
    overflow: visible !important; /* Always show shadows and hover effects */
    grid-auto-flow: row;
    align-items: start; /* Align cards to top of grid cells */
    /* ============================================================================
       BLOCK-TO-BLOCK SPACING (Top Gap / Bottom Gap)
       ----------------------------------------------------------------------------
       Rebuilt to match how Image Block does it: Image Block's spacing is one
       unconditional padding declared directly on .image-block-wrapper's own
       base rule, so there's nothing elsewhere in this file that can outrank or
       silently cancel it. Flip Block's version instead lived entirely on
       separate, far-more-specific .flip-block-wrapper.v-gap-X / .block-gap-X
       selectors, which is inherently more fragile — it depends on no later
       rule in a 15,000+ line stylesheet ever matching with equal-or-higher
       precedence, which is exactly the trap earlier fixes here kept falling
       into (a hidden margin from an unrelated shared system, then a mobile
       rule losing its !important standoff).
       Now: padding-top / padding-bottom are declared ONCE, right here, reading
       from --flip-gap-top / --flip-gap-bottom. The gap-class rules below only
       ever set those two variables — they never touch `padding` directly — so
       there is exactly one place in the whole stylesheet that decides the
       actual padding, the same way Image Block has exactly one. */
    padding-top: var(--flip-gap-top, 16px);
    padding-bottom: var(--flip-gap-bottom, 10px);
}

/* Tighter block spacing */
.soec-block.block-type-flip {
    margin-top: 0;
    margin-bottom: 0;
}

/* Give the block containing a flipped card a very high z-index so it appears above all other content */
.soec-block.block-type-flip:has(.flip-card-pair.flipped),
.soec-block.block-type-flip:has(.flip-card-pair.flipping),
.soec-block.block-type-flip:has(.flip-card-pair.closing) {
    z-index: 100000 !important;
}

.flip-block-wrapper.block-gap-none   { --flip-gap-bottom: 0px; }
.flip-block-wrapper.block-gap-tight  { --flip-gap-bottom: 5px; }
.flip-block-wrapper.block-gap-normal { --flip-gap-bottom: 10px; }
.flip-block-wrapper.block-gap-loose  { --flip-gap-bottom: 30px; }
.flip-block-wrapper.block-gap-wide   { --flip-gap-bottom: 60px; }

.flip-block-wrapper.v-gap-none     { --flip-gap-top: 0px; }
.flip-block-wrapper.v-gap-narrow   { --flip-gap-top: 8px; }
.flip-block-wrapper.v-gap-normal   { --flip-gap-top: 16px; }
.flip-block-wrapper.v-gap-wide     { --flip-gap-top: 32px; }
.flip-block-wrapper.v-gap-spacious { --flip-gap-top: 48px; }


/* Column layouts - Desktop */
.flip-block-wrapper.columns-1 { 
    grid-template-columns: 1fr;
    row-gap: 30px;
}
.flip-block-wrapper.columns-2 { 
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    row-gap: 30px;
}
.flip-block-wrapper.columns-3 { 
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    row-gap: 25px;
}
.flip-block-wrapper.columns-4 { 
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    row-gap: 20px;
}

/* H-Gap (horizontal gap between cards) */
.flip-block-wrapper.h-gap-none { column-gap: var(--h-gap-none, 0px); }
.flip-block-wrapper.h-gap-narrow { column-gap: var(--h-gap-narrow, 8px); }
.flip-block-wrapper.h-gap-normal { column-gap: var(--h-gap-normal, 16px); }
.flip-block-wrapper.h-gap-wide { column-gap: var(--h-gap-wide, 24px); }
.flip-block-wrapper.h-gap-spacious { column-gap: var(--h-gap-spacious, 32px); }

/* V-Gap (vertical gap between rows) */
.flip-block-wrapper.v-gap-none { row-gap: var(--v-gap-none, 0px); }
.flip-block-wrapper.v-gap-narrow { row-gap: var(--v-gap-narrow, 4px); }
.flip-block-wrapper.v-gap-normal { row-gap: var(--v-gap-normal, 8px); }
.flip-block-wrapper.v-gap-wide { row-gap: var(--v-gap-wide, 12px); }
.flip-block-wrapper.v-gap-spacious { row-gap: var(--v-gap-spacious, 16px); }

/* Spacing (internal card density) */
.flip-block-wrapper.spacing-none { --spacing-mult: 0.6; }
.flip-block-wrapper.spacing-narrow { --spacing-mult: 0.8; }
.flip-block-wrapper.spacing-normal { --spacing-mult: 1; }
.flip-block-wrapper.spacing-wide { --spacing-mult: 1.25; }
.flip-block-wrapper.spacing-spacious { --spacing-mult: 1.5; }

/* CENTER CARDS WHEN FEWER THAN EXPECTED */
/* Key principle: Cards should be the same size as they would be in a full row */
/* For columns-4, each card is 25% of width. Keep this size even with fewer cards. */

/* Single card - use the column width from the columns setting */
.flip-block-wrapper.columns-2.actual-cards-1 {
    grid-template-columns: calc((100% - 20px) / 2);
    justify-content: center;
}

.flip-block-wrapper.columns-3.actual-cards-1 {
    grid-template-columns: calc((100% - 40px) / 3);
    justify-content: center;
}

.flip-block-wrapper.columns-4.actual-cards-1 {
    grid-template-columns: calc((100% - 45px) / 4);
    justify-content: center;
}

/* Two cards - each card sized as if in full row */
.flip-block-wrapper.columns-3.actual-cards-2 {
    grid-template-columns: repeat(2, calc((100% - 40px) / 3));
    justify-content: center;
    gap: 20px;
}

.flip-block-wrapper.columns-4.actual-cards-2 {
    grid-template-columns: repeat(2, calc((100% - 45px) / 4));
    justify-content: center;
    gap: 15px;
}

/* Three cards (3 of 4 columns) - each card sized as if in full row */
.flip-block-wrapper.columns-4.actual-cards-3 {
    grid-template-columns: repeat(3, calc((100% - 45px) / 4));
    justify-content: center;
    gap: 15px;
}

/* Mobile adjustments for centered cards */
@media (max-width: 768px) {
    .flip-block-wrapper.columns-3.actual-cards-2,
    .flip-block-wrapper.columns-4.actual-cards-2,
    .flip-block-wrapper.columns-4.actual-cards-3 {
        grid-template-columns: 1fr;
        justify-content: stretch;
    }
    
    .flip-block-wrapper.columns-3.actual-cards-1,
    .flip-block-wrapper.columns-4.actual-cards-1 {
        grid-template-columns: 1fr;
        justify-content: stretch;
    }
}

/* MOBILE GRID LAYOUTS - Proper spacing */
@media (max-width: 768px) {
    .flip-block-wrapper {
        --v-gap-none: 0px;
        --v-gap-narrow: 0px;
        --v-gap-normal: 0px;
        --v-gap-wide: 0px;
        --v-gap-spacious: 0px;
        padding-left: 10px;
        padding-right: 10px;
        gap: 0 !important;
        row-gap: 0 !important;
        min-height: calc(
            var(--row-count-tablet, 1) *
            (var(--card-height-approx-tablet, calc(50vw - 30px)) + 20px)
        );
    }
    
    /* 2 column layout on tablets */
    .flip-block-wrapper.columns-3,
    .flip-block-wrapper.columns-4 {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 20px !important;
        row-gap: 0 !important; /* More space between rows */
    }
    
    /* Already 2 columns stays 2 columns */
    .flip-block-wrapper.columns-2 {
        gap: 20px !important;
        row-gap: 0 !important;
    }
    
    /* Single column stays single */
    .flip-block-wrapper.columns-1 {
        row-gap: 0 !important;
    }
}

@media (max-width: 480px) {
    /* Single column stacking. Min-height is calculated from:
       --card-count (number of rows on mobile, = total cards since always 1 col)
       × (image-height-approx + text-section-buffer + row-gap).
       This compensates for a grid-sizing quirk with the flip cards' 3D
       transforms (perspective / preserve-3d) — removing it was tried and
       caused severe overlap between stacked blocks on real devices, so it's
       structurally necessary, not just a defensive extra. The PHP sets
       --card-count on the wrapper. */
    /* Zero out v-gap variables so late !important v-gap rules also become 0 */
    .flip-block-wrapper {
        --v-gap-none: 0px;
        --v-gap-narrow: 0px;
        --v-gap-normal: 0px;
        --v-gap-wide: 0px;
        --v-gap-spacious: 0px;
        overflow: visible;
        padding-left: 5px;
        padding-right: 5px;
        gap: 0 !important;
        row-gap: 0 !important;
        min-height: calc(
            var(--card-count, 1) *
            (var(--card-height-approx, 90vw) + 20px)
        );
    }
    
    /* Everything becomes single column on small screens */
    .flip-block-wrapper.columns-2,
    .flip-block-wrapper.columns-3,
    .flip-block-wrapper.columns-4 {
        grid-template-columns: 1fr !important;
        gap: 0 !important;
        row-gap: 0 !important;
    }
    
    .flip-block-wrapper.columns-1 {
        row-gap: 0 !important;
    }

    /* DO NOT change transform-style — preserve-3d is needed for flip animation.
       Height is handled by min-height above. */

    /* Disable perspective on mobile */
    .flip-card-grid {
        perspective: none;
    }

    /* Reduce card shadow on mobile so stacked cards don't have
       a visual gap from the shadow bleeding below each card */
    .flip-card-grid-inner {
        box-shadow: 0 2px 8px rgba(6, 39, 53, 0.15);
    }

    /* On mobile, the last real card of one flip block can sit close enough
       to the first card of the next that they visually overlap when Top
       Gap / Bottom Gap are set low. Same --flip-gap-top / --flip-gap-bottom
       variables as the desktop rules above (read by the single padding
       declaration on .flip-block-wrapper's base rule) — this just raises
       the floor on the lowest settings for this breakpoint only. Loose/
       Wide/Spacious are already above the floor and are left untouched. */
    .flip-block-wrapper.block-gap-none   { --flip-gap-bottom: 10px; }
    .flip-block-wrapper.block-gap-tight  { --flip-gap-bottom: 10px; }
    .flip-block-wrapper.block-gap-normal { --flip-gap-bottom: 10px; }

    .flip-block-wrapper.v-gap-none     { --flip-gap-top: 10px; }
    .flip-block-wrapper.v-gap-narrow   { --flip-gap-top: 10px; }
}

/* Per-aspect-ratio image height approximations for tablet/landscape min-height.
   At ≤768px with 2 columns, each card is ~(50vw - 30px) wide. */
@media (max-width: 768px) {
    .flip-block-wrapper.aspect-16-9  { --card-height-approx-tablet: calc((50vw - 30px) * 9 / 16); }
    .flip-block-wrapper.aspect-5-4   { --card-height-approx-tablet: calc((50vw - 30px) * 4 / 5); }
    .flip-block-wrapper.aspect-4-3   { --card-height-approx-tablet: calc((50vw - 30px) * 3 / 4); }
    .flip-block-wrapper.aspect-3-2   { --card-height-approx-tablet: calc((50vw - 30px) * 2 / 3); }
    .flip-block-wrapper.aspect-1-1   { --card-height-approx-tablet: calc(50vw - 30px); }
    .flip-block-wrapper.aspect-2-3   { --card-height-approx-tablet: calc((50vw - 30px) * 3 / 2); }
    .flip-block-wrapper.aspect-3-4   { --card-height-approx-tablet: calc((50vw - 30px) * 4 / 3); }
    .flip-block-wrapper.aspect-4-5   { --card-height-approx-tablet: calc((50vw - 30px) * 5 / 4); }
    .flip-block-wrapper.aspect-9-16  { --card-height-approx-tablet: calc((50vw - 30px) * 16 / 9); }
    .flip-block-wrapper.aspect-21-9  { --card-height-approx-tablet: calc((50vw - 30px) * 9 / 21); }
}

/* Per-aspect-ratio image height approximations for mobile min-height.
   On mobile (single column), each card is ~90vw wide.
   Image height = width × (height/width ratio).
   A fixed 140px is added for text content below image (name, role, bio). */
@media (max-width: 480px) {
    .flip-block-wrapper.aspect-16-9  { --card-height-approx: calc(90vw * 9 / 16); }
    .flip-block-wrapper.aspect-5-4   { --card-height-approx: calc(90vw * 4 / 5); }
    .flip-block-wrapper.aspect-4-3   { --card-height-approx: calc(90vw * 3 / 4); }
    .flip-block-wrapper.aspect-3-2   { --card-height-approx: calc(90vw * 2 / 3); }
    .flip-block-wrapper.aspect-1-1   { --card-height-approx: 90vw; }
    .flip-block-wrapper.aspect-2-3   { --card-height-approx: calc(90vw * 3 / 2); }
    .flip-block-wrapper.aspect-3-4   { --card-height-approx: calc(90vw * 4 / 3); }
    .flip-block-wrapper.aspect-4-5   { --card-height-approx: calc(90vw * 5 / 4); }
    .flip-block-wrapper.aspect-9-16  { --card-height-approx: calc(90vw * 16 / 9); }
    .flip-block-wrapper.aspect-21-9  { --card-height-approx: calc(90vw * 9 / 21); }
}

/* BACKDROP OVERLAY - a real DOM node parented directly to <body>
   (blocks.js creates/reuses a single .flip-backdrop element there), not a
   ::before pseudo-element scoped to .flip-block-wrapper. It used to be a
   wrapper-scoped pseudo-element, but .flip-block-wrapper lives inside
   .soec-block.block-type-flip, which gets forced into its own stacking
   context by the z-index:100000 :has() rule above whenever a card is
   open/animating — so a pseudo-element scoped to the wrapper only won
   z-index comparisons *within* that local context, the same bug the
   expanded card overlay had. Pseudo-elements can't be reparented the way
   .flip-card-expanded is, so this is a real element instead, always a
   direct child of <body> from the start. */
.flip-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 99998;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}

.flip-backdrop.is-visible {
    opacity: 1;
    pointer-events: auto;
}

/* Remove body overlay */
body::after {
    display: none !important;
}

/* ANIMATED TITLE */
.flip-animated-title-wrapper {
    max-width: 100%;
    margin: 0 auto 15px auto;
}

.flip-animated-title-wrapper .section-header {
    margin: 0 auto;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    width: 100%;
}

.flip-animated-title-wrapper .title-box {
    align-items: center;
    border-radius: 20px;
    box-shadow: -3px 3px 8px rgba(0, 0, 0, 0.15);
    color: #fff;
    display: inline-flex;
    justify-content: center;
    margin: 0 auto;
    opacity: 1;
    overflow: hidden;
    padding: 35px 10px 35px 20px;
    position: relative;
    width: 100%;
    background-color: var(--title-bg-color, #1b5137);
    transition: box-shadow 0.3s ease;
}

.flip-animated-title-wrapper .title-content {
    display: inline-flex;
    font-family: 'Fraunces', serif;
    font-size: 48px;
    font-weight: 900;
    justify-content: center;
    left: calc(-5% - 20px);
    line-height: 60px;
    position: relative;
    white-space: nowrap;
    z-index: 3;
    padding: 0 20px;
    color: white;
}

.flip-animated-title-wrapper .title-text {
    display: inline-block;
    text-align: center;
    white-space: nowrap;
}

.flip-animated-title-wrapper .line-static {
    height: 85%;
    left: 0;
    margin-left: -7px;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 12px;
    z-index: 5;
    background: var(--accent-color, #d4a574);
}

.flip-animated-title-wrapper .line-animated {
    animation: flipBarSlideAndMorph 1.8s ease-out forwards;
    animation-play-state: paused;
    height: 85%;
    left: 0;
    margin-left: -7px;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 12px;
    z-index: 20;
    background: var(--accent-color, #d4a574);
}

.flip-animated-title-wrapper .circle-1,
.flip-animated-title-wrapper .circle-2 {
    position: absolute;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--accent-color, #d4a574);
    left: 100%;
    bottom: 12px;
    opacity: 0;
    z-index: 20;
}

.flip-animated-title-wrapper .circle-1 {
    animation: flipSlideCircle1 0.3s ease-out forwards 1.5s;
    animation-play-state: paused;
}

.flip-animated-title-wrapper .circle-2 {
    animation: flipSlideCircle2 0.3s ease-out forwards 1.6s;
    animation-play-state: paused;
}

.flip-animated-title-wrapper .reveal-mask {
    animation: revealMask 1.8s ease-out forwards;
    animation-play-state: paused;
    bottom: 0;
    position: absolute;
    right: 0;
    top: 0;
    width: 100%;
    z-index: 4;
    background-color: var(--title-bg-color, #1b5137);
}

.flip-animated-title-wrapper .title-box.visible .line-animated,
.flip-animated-title-wrapper .title-box.visible .circle-1,
.flip-animated-title-wrapper .title-box.visible .circle-2,
.flip-animated-title-wrapper .title-box.visible .reveal-mask {
    animation-play-state: running;
}

/* Title animations */
@keyframes flipBarSlideAndMorph {
    0% {
        border-radius: 0;
        height: 85%;
        left: 0;
        margin-left: -7px;
        opacity: 1;
        top: 50%;
        transform: translateY(-50%);
        width: 12px;
    }
    83.33% {
        border-radius: 0;
        height: 85%;
        left: 100%;
        margin-left: 3px;
        opacity: 1;
        top: 50%;
        transform: translateY(-50%);
        width: 12px;
    }
    100% {
        border-radius: 6px;
        height: 12px;
        left: 100%;
        margin-left: 3px;
        opacity: 1;
        top: auto;
        bottom: 12px;
        transform: none;
        width: 12px;
    }
}

@keyframes flipSlideCircle1 {
    0% { 
        margin-left: 3px;
        opacity: 0;
    }
    100% { 
        margin-left: 23px;
        opacity: 1;
    }
}

@keyframes flipSlideCircle2 {
    0% { 
        margin-left: 3px;
        opacity: 0;
    }
    100% { 
        margin-left: 43px;
        opacity: 1;
    }
}

@keyframes revealMask {
    0% { width: 100%; }
    100% { width: 0%; }
}

@media (max-width: 768px) {
    .flip-animated-title-wrapper .title-content {
        font-size: 29px !important;
        line-height: 36px !important;
    }
}

/* CARD PAIR */
.flip-card-pair {
    position: relative;
    width: 100%;
    --card-offset-x: 0px;
}

/* GRID CARD */
.flip-card-grid {
    position: relative;
    width: 100%;
    cursor: pointer;
    perspective: 1000px;
    z-index: 1;
}

.flip-card-grid-inner {
    position: relative;
    width: 100%;
    transform-style: preserve-3d;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    transform-origin: center center;
    border-radius: 20px;
    box-shadow: 0 8px 24px rgba(6, 39, 53, 0.25);
    background: white;
    overflow: hidden;
    backface-visibility: hidden;
}

/* Hover effect - fully visible with overflow */
.flip-card-pair:not(.flipping):not(.flipped) .flip-card-grid:hover .flip-card-grid-inner {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(6, 39, 53, 0.3);
}

/* OPENING: Front rotates 0° to 90° then hides */
.flip-card-pair.flipping .flip-card-grid-inner {
    transform: rotateY(90deg);
}

.flip-card-pair.flipped .flip-card-grid-inner {
    transform: rotateY(90deg);
    visibility: hidden;
}

/* CLOSING: Front becomes visible at 90° then rotates to 0° */
.flip-card-pair.closing .flip-card-grid-inner {
    transform: rotateY(0deg);
    visibility: visible;
    transition-delay: 0.4s;
}

/* EXPANDED CARD */
.flip-card-expanded {
    position: fixed !important;
    top: 50%  !important;
    left: 50%  !important;
    width: 90vw;
    max-width: 1200px;
    height: auto;
    max-height: 85vh;
    z-index: 99999 !important;
    perspective: 1000px;
    transform: translate(-50%, -50%) !important;
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
}

/* MOBILE EXPANDED CARD
   
   Height/centering: every max-height/min-height/flex/width/order property
   here now carries !important, not just the ones from the first pass at
   this fix. That's not decorative — this stylesheet defines the BASE
   (non-mobile) rules for .flip-card-expanded/-inner/.flip-card-back/-image/
   -content LATER in the file than this media query block. Neither set of
   rules is more specific than the other (plain single-class selectors
   either way), and a media query doesn't add specificity — so without
   !important, the base rules were winning any such tie purely by appearing
   later in the file. The first pass at this fix only added !important to
   the properties that were visibly broken at the time (max-height,
   min-height); it turned out the same base-rule-wins-by-source-order
   problem was also silently overriding flex (the base rule's
   flex: 0 0 40% beating this block's flex: 0 0 auto), which — combined
   with flex-direction: column correctly applying, putting flex-basis on
   the vertical axis instead of horizontal — is the more likely explanation
   for the image rendering in the wrong proportions than the aspect-ratio
   value itself being wrong. Being thorough about !important here instead
   of chasing individual properties one at a time as they turn out to be
   broken.
   
   Height is 0.95x the previous 95vh (~90vh) per feedback that 95vh read as
   slightly too tall.
   
   Centering: top:50% for a true center — the old top:55% "shift down to
   clear a fixed header" offset made sense for the previous, much shorter
   80vh card; at ~90vh tall there's barely room to usefully offset it at
   all. */
@media (max-width: 768px) {
    .flip-card-expanded {
        top: 50%;
        width: 95vw;
        height: 90vh !important;
        max-height: 90vh !important;
    }
    
    .flip-card-expanded-inner {
        height: 90vh !important;
        max-height: 90vh !important;
    }
    
    .flip-card-back {
        flex-direction: column !important;
        height: 90vh !important;
        max-height: 90vh !important;
    }
    
    /* 4:5 portrait image on mobile, filling the full card width. Every
       sizing-related property carries !important now (see the block
       comment above) — flex specifically, since the base rule's
       flex: 0 0 40% was winning over this block's flex value and applying
       its 40% basis to the vertical (column) axis instead of the
       horizontal one it was written for, fighting the aspect-ratio.
       
       This can't be a clean, literal 50/50 height split alongside a true
       4:5 ratio — at 95vw wide, a 4:5 crop naturally wants around 54vh of
       height (width x 5/4), more than half of 90vh. Forcing it back down
       to exactly half would fight the aspect-ratio and squash the image
       instead of showing a proper portrait crop. Given a straight choice
       between "exactly 50/50" and "a correctly-proportioned 4:5 image",
       this goes with the latter: full-width, genuinely 4:5, allowed up to
       55vh (close to what a true 4:5 crop wants at this width, still
       leaving real room for text below) — object-fit: cover on the <img>
       itself (below) does the actual cropping so the source photo fills
       that box cleanly with no distortion, however its own dimensions
       compare to 4:5. Text gets flex: 1 and takes whatever's left, same
       overflow-y: auto safety net as before if it runs long. */
    .flip-card-back-image {
        width: 100% !important;
        aspect-ratio: 4 / 5 !important;
        height: auto !important;
        flex: 0 0 auto !important;
        min-height: unset !important;
        max-width: 100% !important;
        max-height: 55vh !important;
        order: 0 !important;
    }
    
    .flip-card-back-image img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }
    
    .flip-card-back-content {
        padding: 1.5rem;
        flex: 1 !important;
        min-height: 0;
        overflow-y: auto;
        max-height: none !important;
    }
}

@media (max-width: 480px) {
    .flip-card-expanded {
        top: 50%;
        width: 98vw;
        height: 90vh !important;
        max-height: 90vh !important;
    }
    
    .flip-card-expanded-inner {
        height: 90vh !important;
        max-height: 90vh !important;
    }
    
    .flip-card-back {
        height: 90vh !important;
        max-height: 90vh !important;
    }
    
    .flip-card-back-image {
        max-height: 55vh !important;
    }
    
    .flip-card-back-content {
        max-height: none !important;
        padding: 1.25rem;
    }
}

/* Show when animating.
   These state classes (flipping/flipped/closing) are mirrored by JS directly
   onto .flip-card-expanded itself (in addition to .flip-card-pair), so this
   still matches once the element is portaled to <body> and is no longer a
   descendant of .flip-card-pair. */
.flip-card-expanded.flipping,
.flip-card-expanded.flipped,
.flip-card-expanded.closing {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    z-index: 99999 !important;
}

.flip-card-expanded-inner {
    position: relative;
    width: 100%;
    height: auto;
    max-height: 85vh;
    transform-style: preserve-3d;
    transform-origin: center center;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(6, 39, 53, 0.4);
    background: white;
    overflow: hidden;
    backface-visibility: hidden;
    z-index: 9999 !important;
    transform: rotateY(-90deg) translateX(var(--card-offset-x, 0px));
    visibility: hidden;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), visibility 0s;
}

/* OPENING: Back appears at 90° at card position, rotates to 0° at center */
.flip-card-expanded.flipping .flip-card-expanded-inner {
    animation: backCardAppear 0.4s ease-out forwards 0.4s;
}

@keyframes backCardAppear {
    0% {
        transform: rotateY(-90deg) translateX(var(--card-offset-x, 0px));
        visibility: visible;
    }
    100% {
        transform: rotateY(0deg) translateX(0px);
        visibility: visible;
    }
}

.flip-card-expanded.flipped .flip-card-expanded-inner {
    transform: rotateY(0deg) translateX(0px);
    visibility: visible;
}

/* CLOSING: Back rotates from 0° at center to 90° at card position then hides */
.flip-card-expanded.closing .flip-card-expanded-inner {
    animation: backCardDisappear 0.4s ease-out forwards;
}

@keyframes backCardDisappear {
    0% {
        transform: rotateY(0deg) translateX(0px);
        visibility: visible;
    }
    99% {
        transform: rotateY(-90deg) translateX(var(--card-offset-x, 0px));
        visibility: visible;
    }
    100% {
        transform: rotateY(-90deg) translateX(var(--card-offset-x, 0px));
        visibility: hidden;
    }
}

/* Mobile animations without offset */
@media (max-width: 768px) {
    @keyframes backCardAppearMobile {
        0% {
            transform: rotateY(-90deg);
            visibility: visible;
        }
        100% {
            transform: rotateY(0deg);
            visibility: visible;
        }
    }
    
    @keyframes backCardDisappearMobile {
        0% {
            transform: rotateY(0deg);
            visibility: visible;
        }
        99% {
            transform: rotateY(-90deg);
            visibility: visible;
        }
        100% {
            transform: rotateY(-90deg);
            visibility: hidden;
        }
    }
    
    .flip-card-expanded.flipping .flip-card-expanded-inner {
        animation: backCardAppearMobile 0.4s ease-out forwards 0.4s;
    }
    
    .flip-card-expanded.closing .flip-card-expanded-inner {
        animation: backCardDisappearMobile 0.4s ease-out forwards;
    }

    /* On mobile: make the front card grid transitions instant so steps 1 and 4
       (front card fold/unfold) are invisible — only the overlay back card animates */
    .flip-card-grid-inner {
        transition: transform 0s, visibility 0s !important;
    }

    /* Open: back card appears immediately (0s delay instead of 0.4s) */
    .flip-card-expanded.flipping .flip-card-expanded-inner {
        animation: backCardAppearMobile 0.4s ease-out forwards 0s;
    }

    /* Close: keep grid-inner hidden throughout — it only needs to be visible
       on desktop for step 4. On mobile step 4 is invisible anyway so just
       keep it hidden until fully closed, eliminating any visible snap. */
    .flip-card-pair.closing .flip-card-grid-inner {
        visibility: hidden !important;
        transition-delay: 0s !important;
    }

    /* After close completes, grid-inner becomes visible again instantly */
    .flip-card-pair:not(.flipping):not(.flipped):not(.closing) .flip-card-grid-inner {
        visibility: visible;
    }
}

/* FRONT CARD LAYOUT */
.flip-card-front {
    width: 100%;
    background: white;
    display: flex;
    flex-direction: column;
    border-radius: 20px;
    overflow: hidden;
}

.flip-card-front.image-only .flip-card-front-image {
    height: 300px;
}

@media (max-width: 768px) {
    .flip-card-front.image-only .flip-card-front-image {
        height: 200px;
    }
}

.flip-card-front.split-layout.position-top {
    flex-direction: column;
}

.flip-card-front.split-layout.position-bottom {
    flex-direction: column-reverse;
}

/* Image container */
.flip-card-front-image {
    position: relative;
    background: #9b9b9b;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
}

/* Aspect ratios */
.flip-block-wrapper.aspect-16-9 .flip-card-front-image,
.flip-block-wrapper.aspect-16-9 .flip-card-back-image { aspect-ratio: 16 / 9; }
.flip-block-wrapper.aspect-5-4 .flip-card-front-image,
.flip-block-wrapper.aspect-5-4 .flip-card-back-image { aspect-ratio: 5 / 4; }
.flip-block-wrapper.aspect-4-3 .flip-card-front-image,
.flip-block-wrapper.aspect-4-3 .flip-card-back-image { aspect-ratio: 4 / 3; }
.flip-block-wrapper.aspect-3-2 .flip-card-front-image,
.flip-block-wrapper.aspect-3-2 .flip-card-back-image { aspect-ratio: 3 / 2; }
.flip-block-wrapper.aspect-1-1 .flip-card-front-image,
.flip-block-wrapper.aspect-1-1 .flip-card-back-image { aspect-ratio: 1 / 1; }
.flip-block-wrapper.aspect-2-3 .flip-card-front-image,
.flip-block-wrapper.aspect-2-3 .flip-card-back-image { aspect-ratio: 2 / 3; }
.flip-block-wrapper.aspect-3-4 .flip-card-front-image,
.flip-block-wrapper.aspect-3-4 .flip-card-back-image { aspect-ratio: 3 / 4; }
.flip-block-wrapper.aspect-4-5 .flip-card-front-image,
.flip-block-wrapper.aspect-4-5 .flip-card-back-image { aspect-ratio: 4 / 5; }
.flip-block-wrapper.aspect-9-16 .flip-card-front-image,
.flip-block-wrapper.aspect-9-16 .flip-card-back-image { aspect-ratio: 9 / 16; }

.flip-card-front-image img,
.flip-card-back-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.flip-card-front-image svg {
    width: 60px;
    height: 60px;
    fill: white;
    opacity: 0.8;
}

.flip-card-front-image.with-overlay::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.3);
    z-index: 1;
}

.flip-card-front-image.ken-burns img {
    animation: kenBurnsZoom 20s ease-in-out infinite alternate;
}

@keyframes kenBurnsZoom {
    0% { transform: scale(1); }
    100% { transform: scale(1.1); }
}

/* Text container */
.flip-card-front-text {
    padding: 0.75rem 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

@media (max-width: 768px) {
    .flip-card-front-text {
        padding: 0.5rem 0.75rem;
    }
}

.flip-card-front-text .text-content {
    width: 100%;
}

.flip-card-front-text .name {
    font-family: 'Fraunces', serif;
    font-weight: 700;
    margin-bottom: 0.2rem;
    line-height: 1.15;
}

.flip-card-front-text .title {
    font-family: 'Work Sans', sans-serif;
    font-weight: 500;
    line-height: 1.2;
}

/* Optional: Use Fraunces font for title (like the name) */
.flip-card-front-content.use-fraunces-title .flip-front-title,
.flip-card-back-content.use-fraunces-title .flip-back-title {
    font-family: 'Fraunces', serif;
    font-weight: 600;
}

/* BACK CARD */
.flip-card-back {
    position: relative;
    width: 100%;
    height: auto;
    min-height: 400px;
    max-height: 85vh;
    background: white;
    display: flex;
    border-radius: 20px;
    overflow: hidden;
}

.flip-card-back-image {
    flex: 0 0 40%;
    min-height: 400px;
    background: #9b9b9b;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.flip-card-back-image.position-left { order: 0; }
.flip-card-back-image.position-right { order: 1; }

.flip-card-back-image svg {
    width: 80px;
    height: 80px;
    fill: white;
    opacity: 0.8;
}

.flip-card-back-image.with-overlay::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.3);
    z-index: 1;
}

.flip-card-back-image.ken-burns img {
    animation: kenBurnsZoom 20s ease-in-out infinite alternate;
}

/* Back content */
.flip-card-back-content {
    flex: 1;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    max-height: 85vh;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain; /* stop the scroll "chaining" to whatever's
                                      behind once this content hits the top/
                                      bottom of its own scroll range */
}

.flip-card-back-content h3 {
    font-family: 'Fraunces', serif;
    font-size: 1.8rem;
    margin: 0 0 0.5rem 0;
    font-weight: 700;
    flex-shrink: 0;
}

.flip-card-back-content h4 {
    font-family: 'Work Sans', sans-serif;
    color: #e1a038;
    font-size: 1.1rem;
    margin: 0 0 1.5rem 0;
    font-weight: 600;
    flex-shrink: 0;
}

.flip-card-back-content p {
    font-size: 1rem;
    line-height: 1.6;
    font-family: 'Work Sans', sans-serif;
    margin: 0;
}

@media (max-width: 768px) {
    .flip-card-back-content h3 { font-size: 1.5rem; }
    .flip-card-back-content h4 { font-size: 1rem; }
}

/* Close button */
.close-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 2rem;
    font-weight: bold;
    cursor: pointer;
    color: #666;
    transition: color 0.3s, transform 0.2s;
    z-index: 10000 !important;
    background: white;
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.close-btn:hover {
    color: #333;
    transform: rotate(90deg);
}

@media (max-width: 480px) {
    .close-btn {
        top: 0.5rem;
        right: 0.5rem;
    }
}

/* ============================================================================
   FLIP CARD BUTTONS
   ============================================================================ */

.flip-button-wrapper {
    margin-top: 1rem;
}

.flip-button-wrapper.align-left { text-align: left; }
.flip-button-wrapper.align-center { text-align: center; }
.flip-button-wrapper.align-right { text-align: right; }

.flip-card-button {
    background: transparent;
    border: 2px solid var(--forest-green);
    color: var(--forest-green);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    display: inline-block;
    align-self: flex-start;
    transition: all 0.3s ease;
}

.flip-card-button:hover {
    background: var(--button-hover-bg, var(--forest-green));
    border-color: var(--button-hover-bg, var(--forest-green));
    color: white;
    transform: translateY(-2px);
}

/* Button size variants */
.flip-card-button.btn-small {
    font-size: 0.85rem;
    padding: 0.4rem 0.8rem;
}

.flip-card-button.btn-medium {
    font-size: 1rem;
    padding: 0.5rem 1rem;
}

.flip-card-button.btn-large {
    font-size: 1.15rem;
    padding: 0.6rem 1.2rem;
}

/* Button text color variants (also controls border) */
.flip-card-button.btn-burgundy { color: var(--burgundy); border-color: var(--burgundy); }
.flip-card-button.btn-forest-green { color: var(--forest-green); border-color: var(--forest-green); }
.flip-card-button.btn-emerald-green { color: var(--emerald-green); border-color: var(--emerald-green); }
.flip-card-button.btn-sage-green { color: var(--sage-green); border-color: var(--sage-green); }
.flip-card-button.btn-tab-blue { color: var(--tab-blue); border-color: var(--tab-blue); }
.flip-card-button.btn-highlight-orange { color: var(--highlight-orange); border-color: var(--highlight-orange); }
.flip-card-button.btn-rust-red { color: var(--rust-red); border-color: var(--rust-red); }
.flip-card-button.btn-brick-red { color: var(--brick-red); border-color: var(--brick-red); }
.flip-card-button.btn-charcoal { color: var(--charcoal); border-color: var(--charcoal); }
.flip-card-button.btn-black { color: #000; border-color: #000; }
.flip-card-button.btn-white { color: #fff; border-color: #fff; }

/* Button with background */
.flip-card-button.has-bg {
    color: #fff !important;
}

/* TEXT STYLES */
.size-xxs { font-size: 0.7rem !important; }
.size-xs { font-size: 0.8rem !important; }
.size-small { font-size: 0.9rem !important; }
.size-medium { font-size: 1.1rem !important; }
.size-large { font-size: 1.3rem !important; }
.size-xl { font-size: 1.5rem !important; }
.size-xxl { font-size: 1.8rem !important; }

@media (max-width: 480px) {
    .flip-card-front-text .name.size-medium { font-size: 1rem; }
    .flip-card-front-text .title.size-small { font-size: 0.85rem; }
}

/* Colors */
.color-white { color: white !important; }
.color-charcoal { color: #333 !important; }
.color-burgundy { color: #8b2635 !important; }
.color-forest-green { color: #1b5137 !important; }
.color-emerald-green { color: #059669 !important; }
.color-sage-green { color: #8ca280 !important; }
.color-tab-blue { color: #4f9aa8 !important; }
.color-highlight-orange { color: #e1a038 !important; }
.color-rust-red { color: #cc4020 !important; }
.color-brick-red { color: #8c1a22 !important; }

/* Alignment */
.align-left { text-align: left !important; }
.align-center { text-align: center !important; }
.align-right { text-align: right !important; }

/* ── Shared inline-link shorthand (~label~[url]) ─────────────────────────
   Styling for links produced by SOEC_Block_Base::linkify_text() (directly,
   or via parse_rich_text()). Fixed site-wide rather than set per-field, so
   every live link reads the same wherever it appears: bold, tab-blue
   (#4f9aa8 — the palette's existing blue; used here as "dusty blue"). */
.soec-inline-link {
    text-decoration: none;
    font-weight: 700;
    color: #4f9aa8;
}

.soec-inline-link:hover,
.soec-inline-link:focus {
    color: #3d7a86; /* tab-blue, darkened ~20% for hover/focus feedback */
}

/* Same reasoning as .soec-inline-link above: an explicit weight rather than
   the browser's font-weight:bolder default, which is relative to whatever
   the surrounding text's own weight is set to (e.g. bolder from a 300/Light
   base only reaches 400 - barely different, not visually "bold"). Applied
   by soec_format_text() (utilities.php) to every [b]...[/b] it generates,
   wherever that runs - forms, Split Block, Text block, and so on. */
.soec-format-bold {
    font-weight: 700;
}

/* ── Shared list shorthand (soec_format_rich_text in utilities.php) ──────
   "- item", "-- sub-item", "1. item" lines in body text fields.
   Hanging indent: the bullet/number sits on the same left edge as the
   surrounding text, and the item text is indented from it - so a list
   never pushes out past the text's left edge. Bullets and numbers take the
   text's own colour. !important on list-style/padding/margin guards against
   theme or browser list defaults re-adding their own indent. */
ul.soec-list,
ol.soec-list {
    list-style: none !important;
    margin: 0.5em 0 0.75em !important;
    padding: 0 !important;
    text-align: left;
}

ul.soec-list > li,
ol.soec-list > li {
    position: relative;
    margin: 0 0 0.35em !important;
    padding: 0 0 0 1.25em !important;
    list-style: none !important;
}

ul.soec-list > li:last-child,
ol.soec-list > li:last-child {
    margin-bottom: 0 !important;
}

ul.soec-list > li::before {
    content: '\2022';           /* • */
    position: absolute;
    left: 0;
    top: 0;
    width: 1.25em;
    font-weight: 700;
    color: currentColor;
}

ol.soec-list {
    counter-reset: soec-ol;
}

ol.soec-list > li {
    counter-increment: soec-ol;
    padding-left: 1.75em !important;
}

ol.soec-list > li::before {
    content: counter(soec-ol) '.';
    position: absolute;
    left: 0;
    top: 0;
    width: 1.75em;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    color: currentColor;
}

/* Sub-bullets: start at the parent item's text edge, same hanging indent */
ul.soec-list.soec-list-sub {
    margin: 0.35em 0 0 !important;
}

ul.soec-list.soec-list-sub > li::before {
    content: '\2013';           /* – */
    font-weight: 400;
}

/* Centred or right-aligned text: keep the list itself left-aligned
   (bullets need a shared left edge) and centre/right the list as a block. */
.align-center ul.soec-list:not(.soec-list-sub),
.align-center ol.soec-list {
    display: table;
    margin-left: auto !important;
    margin-right: auto !important;
}

.align-right ul.soec-list:not(.soec-list-sub),
.align-right ol.soec-list {
    display: table;
    margin-left: auto !important;
    margin-right: 0 !important;
}


/* ── Shared inline-table shorthand ([TABLE]/[TABLE1]) ────────────────────
   Styling for tables produced by SOEC_Block_Base::render_table() (directly,
   or via parse_rich_text()). Text colour is applied inline per-table (see
   render_table()'s docblock for why it can't just inherit via CSS), so this
   only needs to handle borders/shading. Two variants, chosen by which
   shorthand tag was used — [TABLE] for light lines, [TABLE1] for darker,
   higher-contrast lines — so the same table shorthand still reads clearly
   against different card background shades. Only the header row is shaded;
   data rows are left plain rather than zebra-striped. Wrapped in a scroll
   container on narrow screens rather than trying to reflow columns, since a
   squeezed 5-column table is usually less readable than one you can swipe
   sideways through. */
.soec-inline-table-wrap {
    max-width: 100%;
    overflow-x: auto;
    margin: 0.75em 0;
    -webkit-overflow-scrolling: touch;
}

.soec-inline-table {
    border-collapse: collapse;
    width: 100%;
    min-width: 320px;
    font-size: 0.9em;
}

.soec-inline-table th,
.soec-inline-table td {
    padding: 0.5em 0.75em;
    text-align: left;
    vertical-align: top;
}

/* [TABLE] — light lines */
.soec-inline-table:not(.soec-inline-table-dark) th,
.soec-inline-table:not(.soec-inline-table-dark) td {
    border: 1px solid rgba(128, 128, 128, 0.25);
}

.soec-inline-table:not(.soec-inline-table-dark) thead th {
    background: rgba(128, 128, 128, 0.1);
    font-weight: 700;
}

/* [TABLE1] — darker, higher-contrast lines */
.soec-inline-table-dark th,
.soec-inline-table-dark td {
    border: 1px solid rgba(128, 128, 128, 0.6);
}

.soec-inline-table-dark thead th {
    background: rgba(128, 128, 128, 0.28);
    font-weight: 700;
}

/* ── Shared inline-box / speech-bubble shorthand ([box]/[speech...]) ─────
   Box fills the width of whatever text field/column it sits in (block-level,
   like a paragraph) with a small side margin from its own padding rather
   than a set width, so it naturally matches the surrounding text column at
   any size. Background + text colour come from render_box(): background is
   the field's own colour (set inline, per-instance), text is fixed white
   here since white-on-colour is the entire point of the shape. */
.soec-inline-box {
    position: relative;
    display: block;
    border-radius: 12px;
    padding: 0.9em 1.1em;
    margin: 1em 0;
}

/* When a tail is present, the outer .soec-inline-box-wrap carries the
   margin instead (see below) — the box itself sits flush inside it. */
.soec-inline-box-wrap .soec-inline-box {
    margin: 0;
}

.soec-inline-box p {
    margin: 0;
    color: #ffffff;
}

/* The wrapper's PADDING (not the box's own MARGIN) reserves room for the
   tail. Padding never collapses between adjacent siblings the way margin
   does — without this, a [speechBL] box immediately followed by a
   [speechTR] box would have their facing tails' clearance collapse down to
   whichever single gap is larger.
   
   These numbers are derived from the tail SVG's actual internal geometry,
   not treated as a plain 30px box — the curve's "attachment" region (where
   it should tuck behind the box, not the tip) sits in roughly the first
   third of its own height, and its real tip is at about 27px down a 30px
   tall SVG, not 30px flat. Worked through properly this time (the previous
   two attempts didn't get this right — first no visible overlap at all,
   then the tail visibly detached from the box) using the box-to-box gap G
   needed to satisfy "BL tail's bottom level with TR tail's middle, and TR
   tail's top level with BL tail's middle": with L ≈ 21px as the tail's real
   reach past its box edge, that works out to G = 1.5L ≈ 32px between two
   facing tailed boxes. Split evenly, 16px of padding on each side gets
   there (16 + 16 = 32, replacing the wrap's own 1em margin on that specific
   side — see margin-bottom/margin-top: 0 below — so the two don't stack on
   top of each other and blow the total past what was actually calculated). */
.soec-inline-box-wrap {
    position: relative;
    margin: 1em 0;
}

.soec-inline-box-wrap.tail-bl,
.soec-inline-box-wrap.tail-br {
    margin-bottom: 0;
    padding-bottom: 16px;
}

.soec-inline-box-wrap.tail-tl,
.soec-inline-box-wrap.tail-tr {
    margin-top: 0;
    padding-top: 16px;
}

/* Tail is positioned relative to .soec-inline-box-wrap (its actual parent
   in the DOM — see render_box()), not .soec-inline-box, since it's placed
   as a sibling before the box rather than nested inside it.
   
   bottom: -5px / top: -5px (not the plain -10px the previous attempt
   used) is what actually keeps the tail visually attached to its own box
   while still reaching the 16px padding above: with the wrap's
   padding on the tail's side set to 16px, this offset puts about 9px of
   the tail's own height tucked behind the box (hidden — the box paints on
   top of it, see render_box()'s docblock on DOM order) and lets the
   visible part reach roughly 21px past the box edge, matching the L used
   to size the padding above.
   fill="currentColor" in the SVG picks up the `color` set inline on
   .soec-inline-box (see render_box()), so it always matches the box's own
   background without needing a second colour passed in separately — the
   tail's own colour comes from that even though it's no longer nested
   inside the element that declares it, since currentColor still resolves
   through where the SVG sits in the DOM tree, not paint order. */
.soec-inline-box-tail {
    position: absolute;
    width: 42px;
    height: 30px;
    color: inherit;
}

.soec-inline-box-tail-bl { left: 4px; bottom: -5px; }
.soec-inline-box-tail-br { right: 4px; bottom: -5px; }
.soec-inline-box-tail-tl { left: 4px; top: -5px; }
.soec-inline-box-tail-tr { right: 4px; top: -5px; }

/* Backgrounds */
.bg-white { background-color: white; }
.bg-charcoal { background-color: #333; }
.bg-burgundy { background-color: #8b2635; }
.bg-forest-green { background-color: #1b5137; }
.bg-emerald-green { background-color: #059669; }
.bg-sage-green { background-color: #8ca280; }
.bg-tab-blue { background-color: #4f9aa8; }
.bg-highlight-orange { background-color: #e1a038; }
.bg-rust-red { background-color: #cc4020; }
.bg-brick-red { background-color: #8c1a22; }
.bg-transparent { background-color: transparent; }

/* ACCESSIBILITY */
@media (prefers-reduced-motion: reduce) {
    .flip-animated-title-wrapper .line-animated,
    .flip-animated-title-wrapper .circle-1,
    .flip-animated-title-wrapper .circle-2,
    .flip-animated-title-wrapper .reveal-mask,
    .flip-card-grid-inner,
    .flip-card-expanded-inner {
        animation: none !important;
        transition-duration: 0.01ms !important;
    }
    
    .flip-card-front-image.ken-burns img,
    .flip-card-back-image.ken-burns img {
        animation: none !important;
    }
}

.flip-card-grid:focus-visible {
    outline: 3px solid #4f9aa8;
    outline-offset: 4px;
    border-radius: 20px;
}

.close-btn:focus-visible {
    outline: 2px solid #1b5137;
    outline-offset: 2px;
}

/* Custom scrollbar */
.flip-card-back-content::-webkit-scrollbar {
    width: 6px;
}

.flip-card-back-content::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.flip-card-back-content::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 3px;
}

.flip-card-back-content::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* ========================================
   FLIP BLOCK - VERSION 4.3.0 ADDITIONS
   - Flip icon styling
   - Fraunces font enforcement for names
   - Front card spacing variations
   - Additional aspect ratios (5:4 and 3:2)
   ======================================== */

/* FLIP ICON STYLING (NEW) - Bottom right corner of front cards */
.flip-card-front-content {
    position: relative;
    padding: 0.75rem 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
}

/* Ensure name always uses Fraunces font */
.flip-front-name {
    font-family: 'Fraunces', serif !important;
    font-weight: 700;
    margin: 0;
    line-height: 1.15;
}

.flip-front-title {
    font-family: 'Work Sans', sans-serif;
    font-weight: 500;
    margin: 0;
    line-height: 1.2;
}

/* Flip icon container */
.flip-icon {
    position: absolute;
    bottom: 0.5rem;
    right: 0.5rem;
    width: 28px;
    height: 28px;
    opacity: 0.8;
    transition: opacity 0.3s ease, transform 0.3s ease;
    z-index: 10;
}

.flip-card-grid:hover .flip-icon {
    opacity: 1;
    transform: scale(1.1);
}

.flip-icon svg {
    width: 100%;
    height: 100%;
    display: block;
    fill: currentColor;
    color: var(--flip-button-color, currentColor);
}

/* Icon colour classes */
.flip-icon.color-white svg { color: white; }
.flip-icon.color-charcoal svg { color: #333; }
.flip-icon.color-burgundy svg { color: #8b2635; }
.flip-icon.color-forest-green svg { color: #1b5137; }
.flip-icon.color-emerald-green svg { color: #059669; }
.flip-icon.color-sage-green svg { color: #8ca280; }
.flip-icon.color-tab-blue svg { color: #4f9aa8; }
.flip-icon.color-highlight-orange svg { color: #e1a038; }
.flip-icon.color-rust-red svg { color: #cc4020; }
.flip-icon.color-brick-red svg { color: #8c1a22; }

@media (max-width: 768px) {
    .flip-icon {
        width: 24px;
        height: 24px;
        bottom: 0.4rem;
        right: 0.4rem;
    }
}

@media (max-width: 480px) {
    .flip-icon {
        width: 32px;
        height: 32px;
        bottom: 0.3rem;
        right: 0.3rem;
    }
}

/* FRONT CARD SPACING VARIATIONS (NEW) */
/* Slimline spacing - minimal gaps */
.flip-block-wrapper.front-spacing-slimline .flip-card-front-content {
    padding: 0.4rem 0.75rem;
    gap: 0.1rem;
}

.flip-block-wrapper.front-spacing-slimline .flip-front-name {
    margin-bottom: 0.1rem;
}

.flip-block-wrapper.front-spacing-slimline .flip-front-title {
    margin-top: 0;
}

/* Normal spacing - default balanced spacing */
.flip-block-wrapper.front-spacing-normal .flip-card-front-content {
    padding: 0.6rem 0.9rem;
    gap: 0.2rem;
}

.flip-block-wrapper.front-spacing-normal .flip-front-name {
    margin-bottom: 0.15rem;
}

.flip-block-wrapper.front-spacing-normal .flip-front-title {
    margin-top: 0;
}

/* Medium spacing - more than normal */
.flip-block-wrapper.front-spacing-medium .flip-card-front-content {
    padding: 0.75rem 1rem;
    gap: 0.25rem;
}

.flip-block-wrapper.front-spacing-medium .flip-front-name {
    margin-bottom: 0.2rem;
}

.flip-block-wrapper.front-spacing-medium .flip-front-title {
    margin-top: 0;
}

/* Larger spacing - generous gaps */
.flip-block-wrapper.front-spacing-larger .flip-card-front-content {
    padding: 1rem 1.15rem;
    gap: 0.35rem;
}

.flip-block-wrapper.front-spacing-larger .flip-front-name {
    margin-bottom: 0.3rem;
}

.flip-block-wrapper.front-spacing-larger .flip-front-title {
    margin-top: 0.05rem;
}

/* Spacious spacing - even more generous gaps */
.flip-block-wrapper.front-spacing-spacious .flip-card-front-content {
    padding: 1.25rem 1.25rem;
    gap: 0.5rem;
}

.flip-block-wrapper.front-spacing-spacious .flip-front-name {
    margin-bottom: 0.4rem;
}

.flip-block-wrapper.front-spacing-spacious .flip-front-title {
    margin-top: 0.1rem;
}

/* Very Spacious spacing - maximum gaps */
.flip-block-wrapper.front-spacing-very-spacious .flip-card-front-content {
    padding: 1.5rem 1.4rem;
    gap: 0.65rem;
}

.flip-block-wrapper.front-spacing-very-spacious .flip-front-name {
    margin-bottom: 0.5rem;
}

.flip-block-wrapper.front-spacing-very-spacious .flip-front-title {
    margin-top: 0.15rem;
}

/* Mobile adjustments for spacing */
@media (max-width: 768px) {
    .flip-block-wrapper.front-spacing-slimline .flip-card-front-content {
        padding: 0.3rem 0.6rem;
    }
    
    .flip-block-wrapper.front-spacing-normal .flip-card-front-content {
        padding: 0.5rem 0.75rem;
    }
    
    .flip-block-wrapper.front-spacing-medium .flip-card-front-content {
        padding: 0.6rem 0.85rem;
    }
    
    .flip-block-wrapper.front-spacing-larger .flip-card-front-content {
        padding: 0.85rem 1rem;
    }
    
    .flip-block-wrapper.front-spacing-spacious .flip-card-front-content {
        padding: 1rem 1rem;
    }
    
    .flip-block-wrapper.front-spacing-very-spacious .flip-card-front-content {
        padding: 1.25rem 1.15rem;
    }
}

@media (max-width: 480px) {
    .flip-block-wrapper.front-spacing-slimline .flip-card-front-content {
        padding: 0.25rem 0.5rem;
    }
    
    .flip-block-wrapper.front-spacing-normal .flip-card-front-content {
        padding: 0.4rem 0.65rem;
    }
    
    .flip-block-wrapper.front-spacing-medium .flip-card-front-content {
        padding: 0.5rem 0.75rem;
    }
    
    .flip-block-wrapper.front-spacing-larger .flip-card-front-content {
        padding: 0.75rem 0.85rem;
    }
    
    .flip-block-wrapper.front-spacing-spacious .flip-card-front-content {
        padding: 0.85rem 0.85rem;
    }
    
    .flip-block-wrapper.front-spacing-very-spacious .flip-card-front-content {
        padding: 1.1rem 1rem;
    }
}

/* ADDITIONAL ASPECT RATIOS (NEW) */
/* 5:4 aspect ratio */
.flip-block-wrapper.aspect-5-4 .flip-card-front-image,
.flip-block-wrapper.aspect-5-4 .flip-card-back-image { 
    aspect-ratio: 5 / 4; 
}

/* 3:2 aspect ratio */
.flip-block-wrapper.aspect-3-2 .flip-card-front-image,
.flip-block-wrapper.aspect-3-2 .flip-card-back-image { 
    aspect-ratio: 3 / 2; 
}

/* SLIDESHOW SUPPORT */
.flip-card-front-image.has-slideshow,
.flip-card-back-image.has-slideshow {
    position: relative;
    /* Container must have explicit height for absolute children to fill */
}

.flip-card-front-image .slideshow-image,
.flip-card-back-image .slideshow-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    opacity: 0;
    transition: opacity 0.6s ease-in-out;
}

/* First image also holds the container open — shown above all others */
.flip-card-front-image .slideshow-image:first-child,
.flip-card-back-image .slideshow-image:first-child {
    position: relative; /* drives container height */
    opacity: 0;
}

.flip-card-front-image .slideshow-image.active,
.flip-card-back-image .slideshow-image.active {
    opacity: 1;
    z-index: 1;
}

/* First child when active: stay relative but also z-index 1 */
.flip-card-front-image .slideshow-image:first-child.active,
.flip-card-back-image .slideshow-image:first-child.active {
    opacity: 1;
}

/* Ken Burns animation for slideshows */
.flip-card-front-image.ken-burns .slideshow-image,
.flip-card-back-image.ken-burns .slideshow-image {
    animation: kenBurnsZoom 20s ease-in-out infinite alternate;
}

/* Hero image slideshows */
.flip-hero-img-wrap .slideshow-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    opacity: 0;
    transition: opacity 0.6s ease-in-out;
}

/* First hero image holds container height */
.flip-hero-img-wrap .slideshow-image:first-child {
    position: relative;
    opacity: 0;
}

/* Show active hero image */
.flip-hero-img-wrap .slideshow-image.active {
    opacity: 1;
    z-index: 1;
}

/* First child when active */
.flip-hero-img-wrap .slideshow-image:first-child.active {
    opacity: 1;
}

/* Dot navigation for flip back card slideshows */
.flip-card-back-image .slideshow-dots {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 6px;
    z-index: 10;
}

.flip-card-back-image .slideshow-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,0.8);
    background: transparent;
    cursor: pointer;
    padding: 0;
    transition: background 0.2s ease;
}

.flip-card-back-image .slideshow-dot:hover {
    background: rgba(255,255,255,0.5);
}

.flip-card-back-image .slideshow-dot.active {
    background: #ffffff;
    border-color: #ffffff;
}

/* IMAGE OVERLAYS */
.flip-card-front-image.has-overlay::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.3);
    z-index: 1;
    pointer-events: none;
}

.flip-card-back-image.has-overlay::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.3);
    z-index: 1;
    pointer-events: none;
}

/* Ensure text is above overlays */
.flip-card-front-content {
    position: relative;
    z-index: 2;
}

/* IMPROVED TEXT SIZING */
/* Name font sizes */
.flip-front-name.size-xxs { font-size: 0.7rem !important; }
.flip-front-name.size-xs { font-size: 0.8rem !important; }
.flip-front-name.size-small { font-size: 0.9rem !important; }
.flip-front-name.size-medium { font-size: 1.1rem !important; }
.flip-front-name.size-large { font-size: 1.3rem !important; }
.flip-front-name.size-xl { font-size: 1.5rem !important; }
.flip-front-name.size-xxl { font-size: 1.8rem !important; }

/* Title font sizes */
.flip-front-title.size-xxs { font-size: 0.65rem !important; }
.flip-front-title.size-xs { font-size: 0.75rem !important; }
.flip-front-title.size-small { font-size: 0.85rem !important; }
.flip-front-title.size-medium { font-size: 1rem !important; }
.flip-front-title.size-large { font-size: 1.2rem !important; }
.flip-front-title.size-xl { font-size: 1.4rem !important; }
.flip-front-title.size-xxl { font-size: 1.6rem !important; }

/* Mobile font size adjustments */
@media (max-width: 768px) {
    .flip-front-name.size-medium { font-size: 1rem !important; }
    .flip-front-name.size-large { font-size: 1.15rem !important; }
    .flip-front-name.size-xl { font-size: 1.3rem !important; }
    .flip-front-name.size-xxl { font-size: 1.5rem !important; }
    
    .flip-front-title.size-small { font-size: 0.8rem !important; }
    .flip-front-title.size-medium { font-size: 0.95rem !important; }
    .flip-front-title.size-large { font-size: 1.1rem !important; }
}

@media (max-width: 480px) {
    .flip-front-name.size-medium { font-size: 0.95rem !important; }
    .flip-front-name.size-large { font-size: 1.05rem !important; }
    .flip-front-name.size-xl { font-size: 1.2rem !important; }
    .flip-front-name.size-xxl { font-size: 1.35rem !important; }
    
    .flip-front-title.size-small { font-size: 0.75rem !important; }
    .flip-front-title.size-medium { font-size: 0.85rem !important; }
    .flip-front-title.size-large { font-size: 1rem !important; }
}

/* ACCESSIBILITY IMPROVEMENTS */
.flip-icon svg {
    pointer-events: none; /* Don't interfere with card clicks */
}

@media (prefers-reduced-motion: reduce) {
    .flip-icon {
        transition: none;
    }
    
    .flip-card-grid:hover .flip-icon {
        transform: none;
    }
}

/* HIGH CONTRAST MODE */
@media (prefers-contrast: high) {
    .flip-icon {
        opacity: 1;
    }
    
    .flip-icon svg {
        stroke-width: 2.5;
    }
}

/* PRINT STYLES */
@media print {
    .flip-icon {
        display: none;
    }
    
    .flip-card-expanded {
        position: relative !important;
        transform: none !important;
    }
}

/* ========================================
   FORM BLOCK
   ======================================== */

.form-container {
    background: white;
    padding: 2rem;
    border-radius: 20px;
    box-shadow: 0 8px 24px rgba(6, 39, 53, 0.25);
    transition: all 0.3s ease;
    margin: var(--block-spacing) 0;
}

.form-container:hover {
    box-shadow: 0 12px 32px rgba(6, 39, 53, 0.3);
    transform: translateY(-2px);
}

.form-container h2 {
    font-family: 'Fraunces', serif;
    font-size: 1.8rem;
    font-weight: 700;
    margin: 0 0 var(--block-spacing) 0;
    color: var(--forest-green);
    text-align: center;
}

.form-container > p {
    font-family: 'Work Sans', sans-serif;
    font-size: 1rem;
    line-height: 1.6;
    margin: 0 0 var(--block-spacing) 0;
    color: #333;
    text-align: center;
}

.form-content {
    display: flex;
    flex-direction: column;
    gap: var(--block-spacing);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--block-spacing);
}

.form-field {
    display: flex;
    flex-direction: column;
}

.form-field label {
    font-family: 'Work Sans', sans-serif;
    font-size: 0.875rem;
    font-weight: 500;
    color: #333;
    margin-bottom: 0.25rem;
}

.form-field input,
.form-field select,
.form-field textarea {
    font-family: 'Work Sans', sans-serif;
    font-size: 1rem;
    padding: 0.5rem 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    background: #fff;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
    outline: none;
    border-color: var(--forest-green);
    box-shadow: 0 0 0 3px rgba(27, 81, 55, 0.2);
}

.form-field textarea {
    resize: vertical;
    min-height: 100px;
}

.form-checkbox,
.form-radio {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.form-checkbox input,
.form-radio input {
    width: 1rem;
    height: 1rem;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    accent-color: var(--forest-green);
}

.form-checkbox label,
.form-radio label {
    font-family: 'Work Sans', sans-serif;
    font-size: 0.875rem;
    color: #333;
    margin: 0;
}

/* Enhanced Field Types */
.star-rating-input {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.star-rating-display {
    display: flex;
    gap: 4px;
}

.star-rating-display .star {
    font-size: 2rem;
    color: #ddd;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
}

.star-rating-display .star:hover,
.star-rating-display .star.active,
.star-rating-display .star.selected {
    color: #e1a038;
    transform: scale(1.1);
}

.star-rating-display .star.selected {
    text-shadow: 0 0 8px rgba(225, 160, 56, 0.4);
}

.star-rating-label {
    font-size: 0.875rem;
    color: #666;
    font-style: italic;
}

/* Slider Input */
.slider-input-wrapper {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.slider-input-wrapper input[type="range"] {
    width: 100%;
    height: 8px;
    border-radius: 4px;
    background: #e0e0e0;
    outline: none;
    -webkit-appearance: none;
}

.slider-input-wrapper input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--forest-green);
    cursor: pointer;
    transition: transform 0.2s;
}

.slider-input-wrapper input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.2);
}

.slider-input-wrapper input[type="range"]:active::-webkit-slider-thumb {
    transform: scale(1.3);
    box-shadow: 0 0 12px rgba(27, 81, 55, 0.4);
}

.slider-input-wrapper input[type="range"]::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--forest-green);
    cursor: pointer;
    border: none;
    transition: transform 0.2s;
}

.slider-input-wrapper input[type="range"]::-moz-range-thumb:hover {
    transform: scale(1.2);
}

.slider-input-wrapper input[type="range"]:active::-moz-range-thumb {
    transform: scale(1.3);
    box-shadow: 0 0 12px rgba(27, 81, 55, 0.4);
}

.slider-value-display {
    display: flex;
    justify-content: space-between;
    font-size: 0.875rem;
    color: #666;
}

.slider-current {
    font-weight: 600;
    color: var(--forest-green);
}

/* File Upload Input */
.file-input-wrapper {
    position: relative;
}

.file-input-wrapper input[type="file"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.file-input-label {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    background: var(--sage-green);
    color: white;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
}

.file-input-label:hover {
    background: var(--forest-green);
    transform: translateY(-2px);
}

.file-input-wrapper.drag-over .file-input-label {
    background: var(--highlight-orange);
    transform: scale(1.02);
    border: 2px dashed white;
}

.file-input-label .dashicons {
    font-size: 20px;
}

.file-name-display {
    display: block;
    margin-top: 8px;
    font-size: 0.875rem;
    color: #666;
    font-style: italic;
}

/* Date Input */
.date-input-wrapper {
    position: relative;
}

.date-input-wrapper input[type="date"] {
    padding-right: 40px;
}

.date-icon {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--forest-green);
    pointer-events: none;
}

.date-input-wrapper input[type="date"]:focus ~ .date-icon {
    animation: pulse 0.6s ease;
}

@keyframes pulse {
    0%, 100% { transform: translateY(-50%) scale(1); }
    50% { transform: translateY(-50%) scale(1.2); }
}

/* Required Mark */
.required-mark {
    color: #dc3232;
    font-weight: bold;
    margin-left: 2px;
}

/* Validation States */
.field-error {
    border-color: #c62828 !important;
    background: #ffebee !important;
}

.field-error:focus {
    outline: 2px solid #c62828 !important;
    outline-offset: 2px;
}

.field-error-message {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-top: 4px;
    font-size: 0.875rem;
    color: #c62828;
    font-weight: 500;
}

.field-error-message::before {
    content: "⚠";
    font-size: 1rem;
}

/* Submit Button */
.form-submit {
    display: flex;
    margin-top: 0.5rem;
}

.form-submit.align-left {
    justify-content: flex-start;
}

.form-submit.align-center {
    justify-content: center;
}

.form-submit.align-right {
    justify-content: flex-end;
}

.form-submit button {
    font-family: 'Work Sans', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    border: 2px solid;
    cursor: pointer;
    transition: all 0.3s ease;
}

button[type="submit"]:disabled {
    cursor: not-allowed;
    opacity: 0.6;
    position: relative;
}

button[type="submit"]:disabled::after {
    content: "";
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    border: 2px solid white;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to { transform: translateY(-50%) rotate(360deg); }
}

.form-submit button.btn-forest-green {
    background: white;
    color: var(--forest-green);
    border-color: var(--forest-green);
}

.form-submit button.btn-forest-green:hover {
    background: var(--highlight-orange);
    color: white;
    border-color: var(--highlight-orange);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.form-submit button.btn-burgundy {
    background: white;
    color: var(--burgundy);
    border-color: var(--burgundy);
}

.form-submit button.btn-burgundy:hover {
    background: var(--burgundy);
    color: white;
}

.form-submit button.btn-tab-blue {
    background: white;
    color: var(--tab-blue);
    border-color: var(--tab-blue);
}

.form-submit button.btn-tab-blue:hover {
    background: var(--tab-blue);
    color: white;
}

.form-message {
    font-family: 'Work Sans', sans-serif;
    font-size: 0.875rem;
    color: var(--forest-green);
    text-align: center;
    margin-top: var(--block-spacing);
    padding: 1rem;
    background: rgba(27, 81, 55, 0.1);
    border-radius: 8px;
    display: none;
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.3s ease;
}

.form-message.visible {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

/* Enhanced Interaction States */
.form-checkbox:hover,
.form-radio:hover {
    background: rgba(27, 81, 55, 0.05);
    border-radius: 4px;
}

.form-checkbox input[type="checkbox"]:checked,
.form-radio input[type="radio"]:checked {
    accent-color: var(--forest-green);
}

/* ========================================
   FRAME BLOCK
   ======================================== */

.frame-block-wrapper {
    display: grid;
    gap: var(--block-spacing, 1.5rem);
    margin-bottom: var(--block-spacing, 1.5rem);
    width: 100%;
    max-width: 100%;
    overflow: hidden;
}

.frame-block-wrapper.columns-1 {
    grid-template-columns: 1fr;
}

.frame-block-wrapper.columns-2 {
    grid-template-columns: repeat(2, 1fr);
}

.frame-block-wrapper.columns-3 {
    grid-template-columns: repeat(3, 1fr);
}

.frame-item {
    position: relative;
    overflow: hidden;
    border-radius: 20px;
    box-shadow: 0 8px 24px rgba(6, 39, 53, 0.25);
    transition: all 0.3s ease;
    width: 100%;
    max-width: 100%;
}

.frame-item:hover {
    box-shadow: 0 12px 32px rgba(6, 39, 53, 0.3);
    transform: translateY(-2px);
}

.frame-container {
    position: relative;
    width: 100%;
    max-width: 100%;
    background: #f5f5f5;
}

/* Aspect ratios - Complete set with narrow formats */
.frame-item.aspect-32-9 .frame-container { aspect-ratio: 32/9; }
.frame-item.aspect-21-9 .frame-container { aspect-ratio: 21/9; }
.frame-item.aspect-16-9 .frame-container { aspect-ratio: 16/9; }
.frame-item.aspect-8-1 .frame-container { aspect-ratio: 8/1; }
.frame-item.aspect-6-1 .frame-container { aspect-ratio: 6/1; }
.frame-item.aspect-5-1 .frame-container { aspect-ratio: 5/1; }
.frame-item.aspect-4-1 .frame-container { aspect-ratio: 4/1; }
.frame-item.aspect-3-1 .frame-container { aspect-ratio: 3/1; }
.frame-item.aspect-5-4 .frame-container { aspect-ratio: 5/4; }
.frame-item.aspect-4-3 .frame-container { aspect-ratio: 4/3; }
.frame-item.aspect-3-2 .frame-container { aspect-ratio: 3/2; }
.frame-item.aspect-1-1 .frame-container { aspect-ratio: 1/1; }
.frame-item.aspect-2-3 .frame-container { aspect-ratio: 2/3; }
.frame-item.aspect-3-4 .frame-container { aspect-ratio: 3/4; }
.frame-item.aspect-4-5 .frame-container { aspect-ratio: 4/5; }
.frame-item.aspect-9-16 .frame-container { aspect-ratio: 9/16; }

.frame-container iframe,
.frame-container embed {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

/* Placeholder when no embed code */
.frame-placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #9b9b9b;
    color: white;
    gap: 1rem;
}

.frame-placeholder svg {
    width: 80px;
    height: 80px;
    fill: white;
    opacity: 0.7;
}

.frame-placeholder p {
    font-family: 'Work Sans', sans-serif;
    font-size: 0.9rem;
    opacity: 0.8;
    margin: 0;
}

/* Overlay link for clickable frames */
.frame-overlay-link {
    position: absolute;
    inset: 0;
    z-index: 10;
    cursor: pointer;
    transition: background 0.3s ease;
}

.frame-overlay-link:hover {
    background: rgba(0, 0, 0, 0.05);
}

/* ============================================================================
   FRAME BLOCK BADGES
   ============================================================================ */

.frame-badge {
    position: absolute;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

/* Badge positioning */
.frame-badge.position-tl {
    top: 0.75rem;
    left: 0.75rem;
}

.frame-badge.position-tr {
    top: 0.75rem;
    right: 0.75rem;
}

.frame-badge.position-bl {
    bottom: 0.75rem;
    left: 0.75rem;
}

.frame-badge.position-br {
    bottom: 0.75rem;
    right: 0.75rem;
}

.frame-badge.position-centre {
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

/* Badge sizing */
.frame-badge.badge-small {
    width: calc(25% * 0.8);
    height: auto;
    max-width: 80px;
}

.frame-badge.badge-medium {
    width: 25%;
    height: auto;
    max-width: 100px;
}

.frame-badge.badge-large {
    width: calc(25% * 1.2);
    height: auto;
    max-width: 120px;
}

/* Badge image styling */
.frame-badge img {
    width: 100%;
    height: auto;
    object-fit: contain;
    display: block;
}

/* Badge SVG styling */
.frame-badge svg {
    width: 100%;
    height: auto;
}

/* MAPBOX MAP HEIGHT FIX */
.frame-item.frame-map-mode {
    height: 500px !important;
    min-height: 500px !important;
}

.frame-item.frame-map-mode .frame-container {
    height: 100% !important;
}

.mapbox-map {
    width: 100% !important;
    height: 100% !important;
    min-height: 500px !important;
}

/* ============================================================================
   MAPBOX MARKER ENHANCED SHADOWS & HOVER
   ============================================================================ */

/* Base marker styling with realistic drop shadow */
.soec-map-marker {
    cursor: pointer;
    transition: transform 0.3s ease-out;
    transform-origin: center bottom; /* Scale from the bottom/point - base stays anchored */
    position: relative;
    z-index: 1;
    /* Darker, bolder drop shadow from base of marker */
    filter: drop-shadow(0 10px 16px rgba(0, 0, 0, 0.45)) drop-shadow(0 6px 10px rgba(0, 0, 0, 0.35));
}

/* Hover effect - 1.05x scale upward, same shadow (no extra shadow) */
.soec-map-marker:hover {
    transform: scale(1.05);
    z-index: 1000 !important; /* Bring to front on hover */
}

/* Smooth transitions for all marker interactions */
.mapboxgl-marker {
    transition: all 0.3s ease-out;
}

/* Ensure marker stays anchored at bottom point during transform */
.mapboxgl-marker .soec-map-marker {
    transform-origin: center bottom;
}

/* From marker (badgeIDmarker) slightly different styling */
.soec-map-marker.from-marker {
    opacity: 0.9;
    filter: drop-shadow(0 6px 10px rgba(27, 81, 55, 0.3)) drop-shadow(0 3px 5px rgba(27, 81, 55, 0.2));
}

/* Optional: Add a subtle pulse animation on initial load */
@keyframes markerPulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

.soec-map-marker.animate-in {
    animation: markerPulse 0.6s ease-out;
}

/* ============================================================================
   MAP WRAPPER & SUBTITLE BAR - Route Calculator
   ============================================================================ */

.map-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
}

/* Reset/Home button - top left corner */
.map-reset-btn {
    position: absolute;
    top: 10px;
    left: 10px;
    width: 40px;
    height: 40px;
    background: #1b5137;
    border: 2px solid #1b5137;
    border-radius: 8px;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.map-reset-btn:hover {
    background: #165030;
    border-color: #165030;
    transform: scale(1.05);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.map-reset-btn svg {
    width: 20px;
    height: 20px;
    transition: fill 0.2s ease;
}

.map-reset-btn svg path,
.map-reset-btn svg .home-icon-path {
    fill: #ffffff;
    transition: fill 0.2s ease;
}

/* Away from home state - white background, green icon */
.map-reset-btn.away-from-home {
    background: rgba(255, 255, 255, 0.95);
    border-color: rgba(27, 81, 55, 0.2);
}

.map-reset-btn.away-from-home:hover {
    background: #ffffff;
    border-color: #1b5137;
}

.map-reset-btn.away-from-home svg path,
.map-reset-btn.away-from-home svg .home-icon-path {
    fill: #1b5137;
}

.map-reset-btn:active {
    transform: scale(0.95);
}

/* Search toggle button - below reset button */
.map-search-toggle-btn {
    position: absolute;
    top: 60px;
    left: 10px;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.95);
    border: 2px solid rgba(27, 81, 55, 0.2);
    border-radius: 8px;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.map-search-toggle-btn:hover {
    background: #ffffff;
    border-color: #1b5137;
    transform: scale(1.05);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.map-search-toggle-btn.active {
    background: #1b5137;
    border-color: #1b5137;
}

.map-search-toggle-btn svg {
    width: 18px;
    height: 18px;
    transition: fill 0.2s ease;
}

.map-search-toggle-btn svg path,
.map-search-toggle-btn svg .search-icon-path {
    fill: #ffffff;
    transition: fill 0.2s ease;
}

.map-search-toggle-btn.active svg path,
.map-search-toggle-btn.active svg .search-icon-path {
    fill: #ffffff;
}

.map-search-toggle-btn:active {
    transform: scale(0.95);
}

/* Compact MapBox attribution - more subtle but still compliant */
.mapboxgl-ctrl-attrib {
    opacity: 0.7;
    font-size: 10px !important;
    transition: opacity 0.3s ease;
}

.mapboxgl-ctrl-attrib:hover {
    opacity: 1;
}

.mapboxgl-ctrl-logo {
    opacity: 0.7 !important;
    transition: opacity 0.3s ease;
}

.mapboxgl-ctrl-logo:hover {
    opacity: 1 !important;
}

/* Map subtitle bar - positioned below attribution */
.map-subtitle-bar {
    position: absolute;
    bottom: 30px; /* Positioned above Mapbox logo/attribution */
    left: 0;
    right: 0;
    background: rgba(27, 81, 55, 0.95);
    backdrop-filter: blur(8px);
    padding: 14px 18px;
    border-top: 2px solid rgba(255, 255, 255, 0.1);
    z-index: 1;
    font-family: 'Fraunces', serif;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

/* Hidden state for route bar */
.map-subtitle-bar.hidden {
    opacity: 0;
    transform: translateY(20px);
    pointer-events: none;
}

/* Route calculator layout */
.route-calculator {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
}

.route-label {
    color: #ffffff;
    font-size: 16px;
    font-weight: 600;
    font-family: 'Fraunces', serif;
}

.route-from,
.route-to {
    padding: 8px 14px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.15);
    color: #ffffff;
    font-family: 'Fraunces', serif;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.2s ease;
}

.route-from {
    min-width: 150px;
}

.route-from::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.route-to {
    min-width: 120px;
    cursor: pointer;
}

.route-from:focus,
.route-to:focus {
    outline: none;
    border-color: #e6a756;
    background: rgba(255, 255, 255, 0.25);
}

.route-go-btn {
    padding: 8px 24px;
    background: #e6a756;
    color: #062735;
    border: none;
    border-radius: 6px;
    font-family: 'Fraunces', serif;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}

.route-go-btn:hover {
    background: #f4b566;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.route-go-btn:active {
    transform: translateY(0);
}

.route-result {
    color: #ffffff !important;
    font-size: 16px;
    font-weight: 700;
    font-family: 'Fraunces', serif;
    margin-left: 10px;
    min-width: 150px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.route-result-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.route-result-icon.visible {
    opacity: 1;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .map-subtitle-bar {
        padding: 12px 14px;
    }
    
    .route-calculator {
        gap: 10px;
    }
    
    .route-label,
    .route-from,
    .route-to,
    .route-go-btn,
    .route-result {
        font-size: 14px;
        font-weight: 600;
    }
    
    .route-from {
        min-width: 110px;
        padding: 7px 12px;
    }
    
    .route-to {
        min-width: 100px;
        padding: 7px 12px;
    }
    
    .route-go-btn {
        padding: 7px 18px;
    }
    
    .route-result-icon {
        width: 18px;
        height: 18px;
    }
}

/* ========================================
   IMAGE BLOCK
   ======================================== */

.image-item {
    position: relative;
    overflow: hidden;
    border-radius: 20px;
    box-sizing: border-box;
    transition: all 0.3s ease;
}

.image-link {
    display: block;
    text-decoration: none;
}

.image-container {
    position: relative;
    width: 100%;
    background: #9b9b9b;
    /* Display block for aspect-ratio to work properly */
    display: block;
    overflow: hidden;
    box-sizing: border-box;
    /* Height will be set by aspect-ratio CSS or JavaScript */
}

.image-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    box-sizing: border-box;
}

/* Slideshow mode: all images stack with opacity transitions */
.image-wrapper.slideshow {
    position: absolute !important;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1s ease-in-out;
    pointer-events: none;
}

/* Active slideshow image is visible */
.image-wrapper.slideshow.active {
    opacity: 1;
    z-index: 2;
    pointer-events: auto;
}

/* First slideshow image stays relative to provide container height */
.image-wrapper.slideshow:first-child {
    position: relative !important;
    opacity: 1;
    z-index: 1;
}

/* Aspect ratios - Complete set */
.image-item.aspect-16-9 .image-container { aspect-ratio: 16/9; }
.image-item.aspect-5-4 .image-container { aspect-ratio: 5/4; }
.image-item.aspect-4-3 .image-container { aspect-ratio: 4/3; }
.image-item.aspect-3-2 .image-container { aspect-ratio: 3/2; }
.image-item.aspect-1-1 .image-container { aspect-ratio: 1/1; }
.image-item.aspect-2-3 .image-container { aspect-ratio: 2/3; }
.image-item.aspect-3-4 .image-container { aspect-ratio: 3/4; }
.image-item.aspect-4-5 .image-container { aspect-ratio: 4/5; }
.image-item.aspect-9-16 .image-container { aspect-ratio: 9/16; }
.image-item.aspect-auto .image-container { aspect-ratio: auto; }

/* Narrow aspect ratios for banner-style layouts */
.image-item.aspect-16-1 .image-container { aspect-ratio: 16/1; }
.image-item.aspect-14-1 .image-container { aspect-ratio: 14/1; }
.image-item.aspect-12-1 .image-container { aspect-ratio: 12/1; }
.image-item.aspect-10-1 .image-container { aspect-ratio: 10/1; }
.image-item.aspect-8-1 .image-container { aspect-ratio: 8/1; }
.image-item.aspect-6-1 .image-container { aspect-ratio: 6/1; }
.image-item.aspect-5-1 .image-container { aspect-ratio: 5/1; }
.image-item.aspect-4-1 .image-container { aspect-ratio: 4/1; }
.image-item.aspect-3-1 .image-container { aspect-ratio: 3/1; }
.image-item.aspect-32-9 .image-container { aspect-ratio: 32/9; }
.image-item.aspect-21-9 .image-container { aspect-ratio: 21/9; }

.block-image {
    position: absolute;
    /* JavaScript will set: left, top, width, height */
    /* No object-fit needed - JS calculates exact dimensions */
    display: block;
    /* Critical: Allow images to be larger than container */
    max-width: none !important;
    max-height: none !important;
    min-width: 0 !important;
    min-height: 0 !important;
}

.image-placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #9b9b9b;
}

.image-placeholder svg {
    width: 80px;
    height: 80px;
    fill: white;
    opacity: 0.6;
}

.image-caption {
    padding: 1rem 1.5rem;
    background: rgba(255, 255, 255, 0.95);
    font-family: 'Work Sans', sans-serif;
    font-size: 0.9rem;
    color: #333;
    text-align: center;
    line-height: 1.4;
    box-sizing: border-box;
}

/**
 * IMAGE BLOCK - FRONTEND CSS (FIXED)
 * Add these styles to blocks.css (frontend stylesheet)
 * Version: 1.1
 * Date: November 11, 2025
 * 
 * FIXES:
 * - Properly implemented overlay effect
 * - Properly implemented Ken Burns effect
 * - Added midway-zoom integration
 * - Removed shimmer effects
 */

/* ============================================
   IMAGE BLOCK - MIDWAY ZOOM INTEGRATION
   ============================================ */

/* Apply to entire image block */
.image-block-wrapper.midway-zoomable {
    /* Midway zoom already defined globally - just needs the class */
}

/* Apply to individual image items */
.image-item.midway-zoomable {
    /* Midway zoom already defined globally - just needs the class */
}

/* ============================================
   IMAGE BLOCK - OVERLAY EFFECT
   ============================================ */

/* Overlay requires position context */
.image-item.has-overlay .image-container {
    position: relative;
    overflow: hidden;
}

/* Dark overlay pseudo-element */
.image-item.has-overlay .image-container::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3); /* 30% black overlay */
    pointer-events: none;
    z-index: 2;
    transition: background 0.3s ease;
}

/* Lighten overlay on hover */
.image-item.has-overlay:hover .image-container::after {
    background: rgba(0, 0, 0, 0.2); /* 20% on hover */
}

/* Ensure image is below overlay */
.image-item.has-overlay .block-image {
    position: relative;
    z-index: 1;
}

/* For links, ensure they work above overlay */
.image-item.has-overlay .image-link {
    position: relative;
    display: block;
    z-index: 3;
}

/* Caption should be visible above overlay */
.image-item.has-overlay .image-caption {
    position: relative;
    z-index: 4;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

/* ============================================
   IMAGE BLOCK - KEN BURNS EFFECT
   ============================================ */

/* Container must hide overflow */
.image-item.ken-burns .image-container {
    overflow: hidden;
    position: relative;
}

/* Apply animation to image */
.image-item.ken-burns .block-image {
    animation: kenBurnsEffect 20s ease-in-out infinite alternate;
    transform-origin: center center;
    will-change: transform;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

/* Ken Burns transforms the image after JS has positioned it */
@keyframes kenBurnsEffect {
    0% {
        transform: scale(1) translate(0, 0);
    }
    25% {
        transform: scale(1.05) translate(20px, 20px);
    }
    50% {
        transform: scale(1.08) translate(-20px, 20px);
    }
    75% {
        transform: scale(1.05) translate(20px, -20px);
    }
    100% {
        transform: scale(1.1) translate(-20px, -20px);
    }
}

/* Pause animation on hover */
.image-item.ken-burns:hover .block-image {
    animation-play-state: paused;
}

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
    .image-item.ken-burns .block-image {
        animation: none !important;
        transform: none !important;
    }
}

/* ============================================
   COMBINED EFFECTS (Overlay + Ken Burns)
   ============================================ */

/* When both effects are enabled, ensure they work together */
.image-item.has-overlay.ken-burns .image-container {
    overflow: hidden;
    position: relative;
}

.image-item.has-overlay.ken-burns .block-image {
    animation: kenBurnsEffect 20s ease-in-out infinite alternate;
    position: relative;
    z-index: 1;
}

.image-item.has-overlay.ken-burns .image-container::after {
    background: rgba(0, 0, 0, 0.35); /* Slightly darker for animated images */
    z-index: 2;
}

.image-item.has-overlay.ken-burns:hover .image-container::after {
    background: rgba(0, 0, 0, 0.25);
}

/* ============================================
   IMAGE BLOCK - RESPONSIVE ADJUSTMENTS
   ============================================ */

/* Reduce Ken Burns intensity on mobile */
@media (max-width: 768px) {
    @keyframes kenBurnsEffect {
        0% {
            transform: scale(1) translate(0, 0);
        }
        100% {
            transform: scale(1.05) translate(-10px, -10px);
        }
    }
    
    .image-item.ken-burns .block-image {
        animation-duration: 15s; /* Faster on mobile */
    }
}

/* ============================================
   IMAGE BLOCK - ACCESSIBILITY
   ============================================ */

/* Focus states for linked images */
.image-item .image-link:focus {
    outline: 3px solid #0073aa;
    outline-offset: 2px;
}

.image-item .image-link:focus .block-image {
    opacity: 0.9;
}

/* Ensure alt text is properly handled */
.image-item .block-image[alt=""] {
    /* Browser will show broken image icon if alt is empty */
}

/* ============================================
   IMAGE BLOCK - PERFORMANCE OPTIMIZATIONS
   ============================================ */

/* Use GPU acceleration for Ken Burns */
.image-item.ken-burns .block-image {
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    perspective: 1000px;
    -webkit-perspective: 1000px;
}

/* Optimize overlay rendering */
.image-item.has-overlay .image-container::after {
    will-change: background;
}

/* ============================================
   IMAGE BLOCK - PRINT STYLES
   ============================================ */

@media print {
    /* Disable animations for print */
    .image-item.ken-burns .block-image {
        animation: none !important;
        transform: none !important;
    }
    
    /* Remove overlay for print (better print quality) */
    .image-item.has-overlay .image-container::after {
        display: none !important;
    }
    
    /* Disable midway zoom for print */
    .image-block-wrapper.midway-zoomable,
    .image-item.midway-zoomable {
        transform: none !important;
    }
}

/* ============================================
   IMAGE BLOCK - DARK MODE SUPPORT (OPTIONAL)
   ============================================ */

@media (prefers-color-scheme: dark) {
    /* Lighter overlay in dark mode for better visibility */
    .image-item.has-overlay .image-container::after {
        background: rgba(0, 0, 0, 0.4);
    }
    
    .image-item.has-overlay:hover .image-container::after {
        background: rgba(0, 0, 0, 0.3);
    }
}

/* ============================================
   IMAGE BLOCK - ASPECT RATIO CONTAINERS
   ============================================ */

/* Ensure aspect ratios work with overlay and Ken Burns */
.image-item .image-container {
    position: relative;
    width: 100%;
    overflow: hidden;
}

.image-item.has-overlay .image-container,
.image-item.ken-burns .image-container {
    position: relative;
    overflow: hidden;
}

/* ============================================
   NO SHIMMER/LOADING EFFECTS ON FRONTEND
   ============================================ */

/* The image block should load images cleanly */
/* Use browser's native lazy loading instead of shimmer effects */
/* Shimmer effects can be distracting and aren't necessary */

/* If you want loading states, use simple opacity transitions */
.image-item .block-image {
    opacity: 0;
    transition: opacity 0.3s ease-in;
}

.image-item .block-image.loaded,
.image-item .block-image[loading="lazy"] {
    opacity: 1;
}

/* END IMAGE BLOCK FRONTEND STYLES */

/* ============================================
   IMAGE BLOCK - ACCESSIBILITY
   ============================================ */

/* Ensure text over overlay remains readable */
.image-item.has-overlay .image-caption {
    position: relative;
    z-index: 3;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

/* Focus states for linked images */
.image-item .image-link:focus {
    outline: 3px solid #0073aa;
    outline-offset: 2px;
}

.image-item .image-link:focus .block-image {
    opacity: 0.9;
}

/* ============================================
   IMAGE BLOCK - PERFORMANCE OPTIMIZATIONS
   ============================================ */

/* Use GPU acceleration for Ken Burns */
.image-item.ken-burns .block-image {
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    perspective: 1000px;
    -webkit-perspective: 1000px;
}

/* Optimize overlay rendering */
.image-item.has-overlay .image-container::after {
    will-change: opacity;
}

/* Lazy load optimization */
.block-image[loading="lazy"] {
    /* Reserve space to prevent layout shift */
    min-height: 200px;
    background: #f0f0f0;
}

/* ============================================
   IMAGE BLOCK - PRINT STYLES
   ============================================ */

@media print {
    /* Disable animations for print */
    .image-item.ken-burns .block-image {
        animation: none !important;
        transform: none !important;
    }
    
    /* Remove overlay for print (better print quality) */
    .image-item.has-overlay .image-container::after {
        display: none !important;
    }
}

/* ============================================
   IMAGE BLOCK - DARK MODE SUPPORT (OPTIONAL)
   ============================================ */

@media (prefers-color-scheme: dark) {
    /* Lighter overlay in dark mode for better visibility */
    .image-item.has-overlay .image-container::after {
        background: rgba(0, 0, 0, 0.4);
    }
    
    .image-item.has-overlay:hover .image-container::after {
        background: rgba(0, 0, 0, 0.3);
    }
}

/* ============================================
   IMAGE BLOCK - LOADING STATES
   ============================================ */

/* Image loading placeholder */
.image-container .block-image {
    opacity: 0;
    transition: opacity 0.3s ease-in;
}

.image-container .block-image.loaded {
    opacity: 1;
}

/* Shimmer effect while loading */
.image-container:not(.loaded)::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        90deg,
        #f0f0f0 25%,
        #e0e0e0 50%,
        #f0f0f0 75%
    );
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}


/* ============================================
   IMAGE BLOCK - WRAPPER SPACING
   ============================================ */

.image-block-wrapper {
    display: grid;
    width: 100%;
    box-sizing: border-box;
    padding: 0.5rem 0 0.5rem 0;
}

.image-block-wrapper.columns-1 {
    grid-template-columns: 1fr;
}

.image-block-wrapper.columns-2 {
    grid-template-columns: repeat(2, 1fr);
}

.image-block-wrapper.columns-3 {
    grid-template-columns: repeat(3, 1fr);
}

.image-block-wrapper.columns-4 {
    grid-template-columns: repeat(4, 1fr);
}

/* ============================================
   IMAGE BLOCK - MIDWAY ZOOM
   ============================================ */

.image-block-wrapper.midway-zoomable,
.image-item.midway-zoomable {
    /* Midway zoom already defined globally - just needs the class */
}

/* ============================================
   IMAGE BLOCK - OVERLAY (Accordion Style)
   ============================================ */

/* Image wrapper with overlay */
.image-wrapper.with-overlay {
    position: relative;
}

/* Overlay div (like accordion) */
.image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.7); /* Default 70% white - can be overridden by inline style */
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    /* Removed transition on hover - brightness effect removed per user request */
}

/* Hover effect removed - was making overlay brighter on hover */

/* Overlay text (like accordion) - FULLY RESPONSIVE */
.image-overlay-text {
    font-family: 'Fraunces', serif;
    font-weight: 700;
    color: #1b5137;
    text-align: center;
    line-height: 1.3;
    /* Fluid typography: scales from 14px to 36px based on viewport */
    font-size: clamp(14px, 1.2vw + 0.5rem, 36px);
    /* Additional scaling for narrow containers */
    max-width: 90%;
}

/* Container queries for overlay text - Better scaling in different containers */
@container (min-width: 400px) {
    .image-overlay-text {
        font-size: clamp(16px, 2vw + 0.3rem, 28px);
    }
}

@container (min-width: 600px) {
    .image-overlay-text {
        font-size: clamp(18px, 2.5vw + 0.2rem, 32px);
    }
}

@container (min-width: 800px) {
    .image-overlay-text {
        font-size: clamp(20px, 3vw, 36px);
    }
}

/* Fallback for browsers without container queries */
@media screen and (min-width: 480px) {
    .image-overlay-text {
        font-size: clamp(16px, 2vw + 0.3rem, 24px);
    }
}

@media screen and (min-width: 768px) {
    .image-overlay-text {
        font-size: clamp(18px, 2.5vw + 0.2rem, 28px);
    }
}

@media screen and (min-width: 1024px) {
    .image-overlay-text {
        font-size: clamp(20px, 3vw, 32px);
    }
}

@media screen and (min-width: 1440px) {
    .image-overlay-text {
        font-size: clamp(22px, 2.5vw, 36px);
    }
}

/* ============================================
   IMAGE BLOCK - KEN BURNS (Accordion Style)
   ============================================ */

/* Ken Burns: starts at 1.2x, settles to 1x */
.image-wrapper.ken-burns img {
    transform: scale(1.2);
    animation: kenBurnsSettle 2s ease-out forwards;
}

@keyframes kenBurnsSettle {
    from {
        transform: scale(1.2);
    }
    to {
        transform: scale(1);
    }
}

/* ============================================
   IMAGE BLOCK - BASIC STRUCTURE
   ============================================ */

.image-item {
    position: relative;
    overflow: hidden;
}

.image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
    display: block;
}

/* Image captions */
.image-caption {
    padding: 0.75rem 1rem;
    text-align: center;
    font-size: 14px;
    color: #666;
    background: #f5f5f5;
}

/* ============================================
   IMAGE BLOCK - LINKS
   ============================================ */

.image-link {
    display: block;
    text-decoration: none;
    transition: opacity 0.2s ease;
}

.image-link:hover {
    opacity: 0.95;
}

.image-link:focus {
    outline: 3px solid #0073aa;
    outline-offset: 2px;
}

/* ============================================
   IMAGE BLOCK - PLACEHOLDER
   ============================================ */

.image-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f0f0f0;
    color: #999;
}

.image-placeholder svg {
    width: 60px;
    height: 60px;
    opacity: 0.5;
}

/* ============================================
   IMAGE BLOCK - RESPONSIVE
   ============================================ */

@media (max-width: 768px) {
    .image-block-wrapper.columns-3,
    .image-block-wrapper.columns-4 {
        grid-template-columns: repeat(2, 1fr);
        row-gap: 16px !important;
    }
}

@media (max-width: 480px) {
    .image-block-wrapper.columns-2,
    .image-block-wrapper.columns-3,
    .image-block-wrapper.columns-4 {
        grid-template-columns: 1fr;
        row-gap: 16px !important; /* override tiny v-gap values when stacked */
    }
}

/* Explicit mobile column-count override (mob_columns setting). Takes
   precedence over the auto-collapse rules above via !important, since both
   sets of rules have equal (two-class) selector specificity. Blank/unset
   mob_columns means no .mob-columns-N class is rendered at all, so the
   auto-collapse behaviour above is untouched. */
@media (max-width: 768px) {
    .image-block-wrapper.mob-columns-1 { grid-template-columns: 1fr !important; }
    .image-block-wrapper.mob-columns-2 { grid-template-columns: repeat(2, 1fr) !important; }
    .image-block-wrapper.mob-columns-3 { grid-template-columns: repeat(3, 1fr) !important; }
    .image-block-wrapper.mob-columns-4 { grid-template-columns: repeat(4, 1fr) !important; }
}

/* ============================================
   IMAGE BLOCK - ACCESSIBILITY
   ============================================ */

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
    .image-wrapper.ken-burns img {
        animation: none !important;
        transform: scale(1) !important;
    }
    
    .image-item.midway-zoomable {
        transform: none !important;
        transition: none !important;
    }
}

/* Ensure focus is visible */
.image-link:focus-visible {
    outline: 3px solid #0073aa;
    outline-offset: 3px;
}

/* ============================================
   IMAGE BLOCK - PRINT STYLES
   ============================================ */

@media print {
    /* Remove overlay for print */
    .image-overlay {
        display: none !important;
    }
    
    /* Reset Ken Burns for print */
    .image-wrapper.ken-burns img {
        animation: none !important;
        transform: scale(1) !important;
    }
    
    /* Reset midway zoom for print */
    .image-item.midway-zoomable {
        transform: none !important;
    }
    
    /* Adjust spacing for print */
    .image-block-wrapper {
        padding: 0.5rem 0;
        gap: 0.5rem;
    }
}

/* ============================================
   IMAGE BLOCK - DARK MODE (Optional)
   ============================================ */

@media (prefers-color-scheme: dark) {
    /* Adjust overlay opacity in dark mode */
    .image-overlay {
        background: rgba(0, 0, 0, 0.6);
    }
    
    .image-overlay-text {
        color: #ffffff;
    }
    
    .image-caption {
        background: #1a1a1a;
        color: #e0e0e0;
    }
}

/* ========================================
   INSPIRATIONAL BLOCK
   ======================================== */

/* ── Desktop vs Mobile wrapper visibility ───────────────────────────────── */
.inspirational-block-wrapper.insp-desktop { display: flex; }
.inspirational-block-wrapper.insp-mobile  { display: none; }

@media (max-width: 768px) {
    .inspirational-block-wrapper.insp-desktop { display: none; }
    .inspirational-block-wrapper.insp-mobile  { display: flex; }
}

/* ========================================
   INSPIRATIONAL BLOCK
   ======================================== */

.inspirational-block-wrapper {
    width: 100%;
    position: relative;
    display: flex;
    gap: 20px;
}

.inspirational-block-wrapper.columns-1 {
    display: block;
}

.inspirational-column {
    position: relative;
    flex: 1;
    overflow: hidden;
    border-radius: 16px;
}

.columns-1 .inspirational-column { width: 100%; }
.columns-2 .inspirational-column { width: calc(50% - 10px); }

/* Image container — padding-bottom drives the aspect ratio */
.inspirational-image {
    position: relative;
    width: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    border-radius: 16px;
}

/* Aspect ratios */
.aspect-4-1  .inspirational-image { padding-bottom: 25%; }
.aspect-3-1  .inspirational-image { padding-bottom: 33.33%; }
.aspect-21-9 .inspirational-image { padding-bottom: 42.86%; }
.aspect-16-9 .inspirational-image { padding-bottom: 56.25%; }
.aspect-5-4  .inspirational-image { padding-bottom: 80%; }
.aspect-4-3  .inspirational-image { padding-bottom: 75%; }
.aspect-3-2  .inspirational-image { padding-bottom: 66.67%; }
.aspect-1-1  .inspirational-image { padding-bottom: 100%; }
.aspect-2-3  .inspirational-image { padding-bottom: 150%; }
.aspect-3-4  .inspirational-image { padding-bottom: 133.33%; }
.aspect-4-5  .inspirational-image { padding-bottom: 125%; }
.aspect-9-16 .inspirational-image { padding-bottom: 177.78%; }

/* ── Overlay base ─────────────────────────────────────────────────────────── */

.inspirational-overlay {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.inspirational-overlay.overlay-left  { left: 0; }
.inspirational-overlay.overlay-right { right: 0; }

/* ── Margin variants: adjust inset and width ─────────────────────────────── */

/* Full — flush to edges, radius on outer corners only */
.margin-full .inspirational-overlay.overlay-left  {
    top: 0; bottom: 0; left: 0;
    width: 50%;
    border-radius: 16px 0 0 16px;
}
.margin-full .inspirational-overlay.overlay-right {
    top: 0; bottom: 0; right: 0;
    width: 50%;
    border-radius: 0 16px 16px 0;
}

/* When both overlays are present and full-cover, add a 1px separator line */
.margin-full .has-both-overlays .inspirational-overlay.overlay-left {
    border-radius: 16px 0 0 16px;
}

/* Narrow — inset 25px on all sides, each overlay 50% minus inset */
.margin-narrow .inspirational-overlay.overlay-left,
.margin-narrow .inspirational-overlay.overlay-right {
    top: 25px; bottom: 25px;
    width: calc(50% - 25px);
    border-radius: 12px;
}
.margin-narrow .inspirational-overlay.overlay-left  { left: 25px; }
.margin-narrow .inspirational-overlay.overlay-right { right: 25px; }

/* Wide — inset 40px */
.margin-wide .inspirational-overlay.overlay-left,
.margin-wide .inspirational-overlay.overlay-right {
    top: 40px; bottom: 40px;
    width: calc(50% - 40px);
    border-radius: 16px;
}
.margin-wide .inspirational-overlay.overlay-left  { left: 40px; }
.margin-wide .inspirational-overlay.overlay-right { right: 40px; }

/* ── Gap between left and right overlays ─────────────────────────────────── */
/* Gap is implemented by reducing each overlay's width and offsetting it inward. */

/* gap-small: 10px gap = 5px inset from centre on each side */
.gap-small .inspirational-overlay.overlay-left  { right: calc(50% + 5px); width: auto; left: 0; }
.gap-small .inspirational-overlay.overlay-right { left: calc(50% + 5px);  width: auto; right: 0; }

.gap-small.margin-narrow .inspirational-overlay.overlay-left  { right: calc(50% + 5px); left: 25px; width: auto; }
.gap-small.margin-narrow .inspirational-overlay.overlay-right { left: calc(50% + 5px);  right: 25px; width: auto; }
.gap-small.margin-wide   .inspirational-overlay.overlay-left  { right: calc(50% + 5px); left: 40px; width: auto; }
.gap-small.margin-wide   .inspirational-overlay.overlay-right { left: calc(50% + 5px);  right: 40px; width: auto; }

/* gap-medium: 20px gap */
.gap-medium .inspirational-overlay.overlay-left  { right: calc(50% + 10px); width: auto; left: 0; }
.gap-medium .inspirational-overlay.overlay-right { left: calc(50% + 10px);  width: auto; right: 0; }

.gap-medium.margin-narrow .inspirational-overlay.overlay-left  { right: calc(50% + 10px); left: 25px; width: auto; }
.gap-medium.margin-narrow .inspirational-overlay.overlay-right { left: calc(50% + 10px);  right: 25px; width: auto; }
.gap-medium.margin-wide   .inspirational-overlay.overlay-left  { right: calc(50% + 10px); left: 40px; width: auto; }
.gap-medium.margin-wide   .inspirational-overlay.overlay-right { left: calc(50% + 10px);  right: 40px; width: auto; }

/* gap-large: 40px gap */
.gap-large .inspirational-overlay.overlay-left  { right: calc(50% + 20px); width: auto; left: 0; }
.gap-large .inspirational-overlay.overlay-right { left: calc(50% + 20px);  width: auto; right: 0; }

.gap-large.margin-narrow .inspirational-overlay.overlay-left  { right: calc(50% + 20px); left: 25px; width: auto; }
.gap-large.margin-narrow .inspirational-overlay.overlay-right { left: calc(50% + 20px);  right: 25px; width: auto; }
.gap-large.margin-wide   .inspirational-overlay.overlay-left  { right: calc(50% + 20px); left: 40px; width: auto; }
.gap-large.margin-wide   .inspirational-overlay.overlay-right { left: calc(50% + 20px);  right: 40px; width: auto; }

/* ── Overlay content ─────────────────────────────────────────────────────── */

.overlay-content {
    padding: 40px;
    text-align: center;
    width: 100%;
}

/* Primary and secondary text share the same size system */
.overlay-text {
    margin: 0 0 12px 0;
    line-height: 1.3;
    font-family: 'Fraunces', serif;
}

.overlay-text:last-child { margin-bottom: 0; }

.overlay-text-secondary {
    opacity: 0.92;
}

/* Text sizes — works both as descendant class on parent AND class on the element itself */
.text-size-xxs  .overlay-text, .overlay-text.text-size-xxs   { font-size: 1rem; }
.text-size-xs   .overlay-text, .overlay-text.text-size-xs    { font-size: 1.25rem; }
.text-size-small .overlay-text, .overlay-text.text-size-small { font-size: 1.5rem; }
.text-size-smedium .overlay-text, .overlay-text.text-size-smedium { font-size: 1.75rem; }
.text-size-medium .overlay-text, .overlay-text.text-size-medium { font-size: 2rem; }
.text-size-large .overlay-text, .overlay-text.text-size-large { font-size: 2.5rem; }
.text-size-xl   .overlay-text, .overlay-text.text-size-xl    { font-size: 3rem; }
.text-size-xxl  .overlay-text, .overlay-text.text-size-xxl   { font-size: 3.5rem; }
.text-size-xxxl .overlay-text, .overlay-text.text-size-xxxl  { font-size: 4.5rem; }
.text-size-xxxxl .overlay-text, .overlay-text.text-size-xxxxl { font-size: 6rem; }

/* Text alignment */
.overlay-text.align-left   { text-align: left; }
.overlay-text.align-center { text-align: center; }
.overlay-text.align-right  { text-align: right; }

/* Text colour — applied directly to element */
.overlay-text.text-white          { color: #ffffff; }
.overlay-text.text-black          { color: #000000; }
.overlay-text.text-forest-green   { color: #1b5137; }
.overlay-text.text-tab-blue       { color: #4f9aa8; }
.overlay-text.text-highlight-orange { color: #e1a038; }
.overlay-text.text-rust-red       { color: #cc4020; }
.overlay-text.text-burgundy       { color: #8b2635; }
.overlay-text.text-charcoal       { color: #333333; }
.overlay-text.text-sage-green     { color: #8ca280; }

/* Hidden text */
.overlay-text.hidden { display: none; }

/* Bold / italic applied directly to the element */
.overlay-text.font-bold   { font-weight: 700; }
.overlay-text.font-italic { font-style: italic; }

/* Font weight classes for granular control */
.overlay-text.weight-300 { font-weight: 300; }
.overlay-text.weight-400 { font-weight: 400; }
.overlay-text.weight-500 { font-weight: 500; }
.overlay-text.weight-600 { font-weight: 600; }
.overlay-text.weight-700 { font-weight: 700; }
.overlay-text.weight-800 { font-weight: 800; }
.overlay-text.weight-900 { font-weight: 900; }

/* Secondary text — slight top spacing from primary */
.overlay-text-2 { margin-top: 8px; }

/* ── Mobile landscape (481-768px): moderate reduction ──────────────────────*/
@media (max-width: 768px) {
    .overlay-text.text-size-xxs    { font-size: 0.8rem; }
    .overlay-text.text-size-xs     { font-size: 0.9rem; }
    .overlay-text.text-size-small  { font-size: 1rem; }
    .overlay-text.text-size-smedium { font-size: 1.1rem; }
    .overlay-text.text-size-medium { font-size: 1.25rem; }
    .overlay-text.text-size-large  { font-size: 1.5rem; }
    .overlay-text.text-size-xl     { font-size: 1.75rem; }
    .overlay-text.text-size-xxl    { font-size: 2rem; }
    .overlay-text.text-size-xxxl   { font-size: 2.5rem; }
    .overlay-text.text-size-xxxxl  { font-size: 3rem; }

    .overlay-content { padding: 16px; }
}

/* ── Mobile portrait (≤480px): aggressive reduction ────────────────────────*/
@media (max-width: 480px) {
    .overlay-text.text-size-xxs    { font-size: 0.5rem; }
    .overlay-text.text-size-xs     { font-size: 0.6rem; }
    .overlay-text.text-size-small  { font-size: 0.7rem; }
    .overlay-text.text-size-smedium { font-size: 0.75rem; }
    .overlay-text.text-size-medium { font-size: 0.8rem; }
    .overlay-text.text-size-large  { font-size: 0.875rem; }
    .overlay-text.text-size-xl     { font-size: 1rem; }
    .overlay-text.text-size-xxl    { font-size: 1.1rem; }
    .overlay-text.text-size-xxxl   { font-size: 1.25rem; }
    .overlay-text.text-size-xxxxl  { font-size: 1.5rem; }

    .overlay-content { padding: 12px; }
}

/* Text colour classes (set on the overlay div) */
.text-white .overlay-text  { color: #ffffff; }
.text-black .overlay-text  { color: #000000; }
.text-forest-green .overlay-text  { color: #1b5137; }
.text-tab-blue .overlay-text  { color: #4f9aa8; }
.text-highlight-orange .overlay-text { color: #e1a038; }
.text-rust-red .overlay-text  { color: #cc4020; }
.text-burgundy .overlay-text  { color: #8b2635; }

/* ── Button ──────────────────────────────────────────────────────────────── */

.inspirational-button {
    display: inline-block;
    padding: 12px 30px;
    margin-top: 16px;
    background-color: rgba(255,255,255,0.2);
    color: var(--btn-color, currentColor);
    text-decoration: none;
    border: 2px solid var(--btn-color, currentColor);
    border-radius: 6px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.inspirational-button:hover {
    background-color: var(--btn-hover-bg, rgba(255,255,255,0.35));
    border-color: var(--btn-hover-bg, var(--btn-color, currentColor));
    transform: translateY(-2px);
}

/* Button size variants */
.inspirational-button.btn-size-xxs  { font-size: 0.7rem;  padding: 4px 10px; }
.inspirational-button.btn-size-xs   { font-size: 0.8rem;  padding: 6px 14px; }
.inspirational-button.btn-size-small { font-size: 0.875rem; padding: 8px 18px; }
.inspirational-button.btn-size-medium { font-size: 1rem;   padding: 10px 24px; }
.inspirational-button.btn-size-large  { font-size: 1.125rem; padding: 14px 32px; }

/* Button weight */
.inspirational-button.btn-weight-300 { font-weight: 300; }
.inspirational-button.btn-weight-400 { font-weight: 400; }
.inspirational-button.btn-weight-500 { font-weight: 500; }
.inspirational-button.btn-weight-600 { font-weight: 600; }
.inspirational-button.btn-weight-700 { font-weight: 700; }
.inspirational-button.btn-weight-800 { font-weight: 800; }

/* Button alignment — wrapper centres/right-aligns the block-level button */
.insp-btn-wrapper { display: block; width: 100%; }
.insp-btn-wrapper.align-left   { text-align: left; }
.insp-btn-wrapper.align-center { text-align: center; }
.insp-btn-wrapper.align-right  { text-align: right; }

/* ── Admin UI ────────────────────────────────────────────────────────────── */

.text-style-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    padding: 0;
    margin: 0 1px;
    border: 2px solid #ddd;
    background: #fff;
    cursor: pointer;
    border-radius: 4px;
    font-size: 13px;
    font-weight: bold;
    transition: all 0.2s ease;
}

.text-style-toggle:hover         { border-color: #999; background: #f5f5f5; }
.text-style-toggle.active        { border-color: #2271b1; background: #2271b1; color: #fff; }
.text-style-toggle strong,
.text-style-toggle em            { font-style: normal; }
.text-style-toggle.italic-toggle em { font-style: italic; }

.inspirational-column-section {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 15px;
    padding: 15px;
    margin-bottom: 15px;
}

.inspirational-column-section.hidden { display: none; }

.inspirational-column-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid #e5e5e5;
}

.inspirational-column-header h5 { margin: 0; font-size: 14px; font-weight: 600; }

.insp-side-panel { container-type: inline-size; }

/* ========================================
   NEWS BLOCK
   ======================================== */

.news-block-wrapper {
    display: grid;
    gap: 1rem;
    width: 100%;
    padding: 0.5rem 0 0.5rem 0;
    aspect-ratio: unset !important; /* Never apply aspect ratio to wrapper */
    height: auto !important; /* Always auto height */
}

/* Aspect ratios - comprehensive set */
.news-block-wrapper.aspect-16-9 .news-card { aspect-ratio: 16/9; }
.news-block-wrapper.aspect-5-4 .news-card { aspect-ratio: 5/4; }
.news-block-wrapper.aspect-4-3 .news-card { aspect-ratio: 4/3; }
.news-block-wrapper.aspect-3-2 .news-card { aspect-ratio: 3/2; }
.news-block-wrapper.aspect-1-1 .news-card { aspect-ratio: 1/1; }
.news-block-wrapper.aspect-2-3 .news-card { aspect-ratio: 2/3; }
.news-block-wrapper.aspect-3-4 .news-card { aspect-ratio: 3/4; }
.news-block-wrapper.aspect-4-5 .news-card { aspect-ratio: 4/5; }
.news-block-wrapper.aspect-9-16 .news-card { aspect-ratio: 9/16; }

/* News block animated title */
.news-animated-title-wrapper {
    max-width: 100%;
    margin: 0 auto 15px auto;
}

.news-animated-title-wrapper .section-header {
    max-width: 100%;
}

.news-animated-title-wrapper .title-box {
    width: 100%;
    max-width: 100%;
}

.news-card:hover {
    box-shadow: 0 16px 40px rgba(6, 39, 53, 0.35);
    transform: translateY(-4px);
}

/* Ensure the card has a defined height from aspect-ratio */
.news-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(6, 39, 53, 0.25);
    display: flex;
    transition: all 0.3s ease;
    position: relative;
}

/* VERTICAL LAYOUT - Image on top/bottom, text below/above */
.news-card.layout-vertical {
    flex-direction: column !important;
}

.news-card.layout-vertical.pattern-1 {
    flex-direction: column !important;
}

.news-card.layout-vertical.pattern-2 {
    flex-direction: column-reverse !important;
}

.news-card.layout-vertical .split-card-image {
    width: 100% !important;
    flex: 0 0 50% !important;  /* FIXED: Don't grow/shrink - exactly 50% */
    min-height: 0;
    position: relative;
}

.news-card.layout-vertical .split-card-text {
    width: 100% !important;
    flex: 0 0 50% !important;  /* FIXED: Don't grow/shrink - exactly 50% */
    min-height: 0;
    overflow: auto;
}

/* HORIZONTAL LAYOUT - Image on left/right */
.news-card.layout-horizontal {
    flex-direction: row;
}

.news-card.layout-horizontal.pattern-1 {
    flex-direction: row;
}

.news-card.layout-horizontal.pattern-2 {
    flex-direction: row-reverse;
}

.news-card.layout-horizontal .split-card-image {
    flex: 0 0 50% !important;  /* FIXED: Don't grow/shrink - exactly 50% */
    min-height: 0;
    height: 100%;
}

.news-card.layout-horizontal .split-card-text {
    flex: 0 0 50% !important;  /* FIXED: Don't grow/shrink - exactly 50% */
    min-height: 0;
    height: 100%;
}

/* Image container - fill space completely */
.news-card .split-card-image {
    position: relative;
    background: #9b9b9b;
    overflow: hidden;
}

/* Image wrapper - absolutely positioned to fill container */
.news-card .split-card-image .image-wrapper,
.news-card .split-card-image > a {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* Image itself - cover the wrapper */
.news-card .split-card-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
}

/* Placeholder styling */
.news-card .split-card-image .image-placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.news-card .split-card-image .image-placeholder svg {
    width: 60px;
    height: 60px;
    fill: white;
    opacity: 0.8;
}

/* Text container */
.news-card .split-card-text {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    min-height: 0;
}

/* Heading */
.news-card .split-card-text h3,
.news-card .split-card-heading {
    color: var(--forest-green);
    font-family: 'Fraunces', serif;
    font-weight: 700;
    margin: 0 0 0.4rem 0;
    text-align: center;
    line-height: 1.2;
    flex-shrink: 0;
}

/* Title size variations */
.news-card .split-card-heading.size-xxs { font-size: clamp(0.75rem, 1.5vw, 1rem) !important; }
.news-card .split-card-heading.size-xs { font-size: clamp(0.9rem, 1.8vw, 1.2rem) !important; }
.news-card .split-card-heading.size-small { font-size: clamp(1rem, 2vw, 1.4rem) !important; }
.news-card .split-card-heading.size-medium { font-size: clamp(1.1rem, 2.2vw, 1.6rem) !important; }
.news-card .split-card-heading.size-large { font-size: clamp(1.3rem, 2.5vw, 1.9rem) !important; }
.news-card .split-card-heading.size-xl { font-size: clamp(1.5rem, 3vw, 2.2rem) !important; }
.news-card .split-card-heading.size-xxl { font-size: clamp(1.8rem, 3.5vw, 2.6rem) !important; }

/* Meta information */
.news-card .split-card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
    font-size: 0.85rem;
    color: var(--highlight-orange);
    font-family: 'Work Sans', sans-serif;
    font-weight: 500;
    gap: 1rem;
    flex-shrink: 0;
}

.news-card .split-card-date,
.news-card .split-card-read-time {
    display: flex;
    font-size: 0.85rem;
    align-items: center;
    gap: 0.3rem;
}

.news-card .split-card-meta svg {
    width: 12px;
    height: 12px;
    fill: var(--highlight-orange);
    flex-shrink: 0;
}

/* Body text */
.news-card .split-card-text p,
.news-card .split-card-body {
    color: #333;
    font-family: 'Work Sans', sans-serif;
    line-height: 1.5;
    text-align: left;
    margin-bottom: 0.5rem;
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 6;
    -webkit-box-orient: vertical;
}

/* Body size variations */
.news-card .split-card-body.size-xxs { font-size: clamp(0.65rem, 0.9vw, 0.75rem) !important; }
.news-card .split-card-body.size-xs { font-size: clamp(0.75rem, 1vw, 0.85rem) !important; }
.news-card .split-card-body.size-small { font-size: clamp(0.8rem, 1.1vw, 0.9rem) !important; }
.news-card .split-card-body.size-medium { font-size: clamp(0.9rem, 1.2vw, 1rem) !important; }
.news-card .split-card-body.size-large { font-size: clamp(1rem, 1.3vw, 1.1rem) !important; }
.news-card .split-card-body.size-xl { font-size: clamp(1.1rem, 1.4vw, 1.25rem) !important; }
.news-card .split-card-body.size-xxl { font-size: clamp(1.25rem, 1.6vw, 1.4rem) !important; }

/* Button */
.news-card .split-card-button {
    background: white;
    border: 2px solid var(--forest-green);
    color: var(--forest-green);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    display: inline-block;
    transition: all 0.3s ease;
    font-family: 'Work Sans', sans-serif;
}

.news-card .split-card-button:hover {
    background: var(--highlight-orange);
    border-color: var(--highlight-orange);
    color: white;
    transform: translateY(-2px);
}

/* Button alignment */
.news-card .split-card-button-wrapper {
    margin-top: 0;
    padding-top: 0.25rem;
    flex-shrink: 0;
}

.news-card .split-card-button-wrapper.align-left { text-align: left; }
.news-card .split-card-button-wrapper.align-center { text-align: center; }
.news-card .split-card-button-wrapper.align-right { text-align: right; }

/* Featured badge */
.news-card .card-featured-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--highlight-orange);
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    z-index: 10;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* ============================================================================
   NEWS BLOCK CUSTOM BADGES
   ============================================================================ */

.news-badge {
    position: absolute;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

/* Badge positioning */
.news-badge.position-tl {
    top: 0.75rem;
    left: 0.75rem;
}

.news-badge.position-tr {
    top: 0.75rem;
    right: 0.75rem;
}

.news-badge.position-bl {
    bottom: 0.75rem;
    left: 0.75rem;
}

.news-badge.position-br {
    bottom: 0.75rem;
    right: 0.75rem;
}

.news-badge.position-centre {
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

/* Badge sizing */
.news-badge.badge-small {
    width: calc(25% * 0.8);
    height: auto;
    max-width: 80px;
}

.news-badge.badge-medium {
    width: 25%;
    height: auto;
    max-width: 100px;
}

.news-badge.badge-large {
    width: calc(25% * 1.2);
    height: auto;
    max-width: 120px;
}

/* Badge image styling */
.news-badge img {
    width: 100%;
    height: auto;
    object-fit: contain;
    display: block;
}

/* Badge SVG styling */
.news-badge svg {
    width: 100%;
    height: auto;
}

/* ========================================
   PROGRESSIVE BLOCK (PLACEHOLDER)
   ⚠ AWAITING DEVELOPMENT
   ======================================== */

/* This is a placeholder for the progressive block
   which is currently under development.
   Styles will be added here when the block is ready. */

.progressive-block-wrapper {
    /* Placeholder styles */
    padding: 2rem;
    background: #f0f0f0;
    border: 2px dashed #999;
    border-radius: 8px;
    text-align: center;
    color: #666;
}

.progressive-block-placeholder::before {
    content: "Progressive Block - Coming Soon";
    font-weight: 600;
}

/* ========================================
   QUOTE BLOCK
   ======================================== */

.quote-card {
    margin: var(--block-spacing) 0;
    position: relative;
}

/* Base styles for both styles */
blockquote.style1,
blockquote.style2 {
    align-items: center;
    border-radius: 20px;
    box-shadow: 0 8px 24px rgba(6, 39, 53, 0.25);
    color: #fff;
    display: flex;
    flex-direction: column;
    font-style: italic;
    font-family: 'Fraunces', serif;
    font-weight: 500;
    justify-content: center;
    min-height: 100px;
    overflow: visible;
    position: relative;
    margin: 0 auto;
    padding: clamp(1.5rem, 4vw, 3rem) clamp(1.5rem, 6vw, 4rem);
}

/* Style 1: Compact Quote */
blockquote.style1 {
    font-size: clamp(0.95rem, 1.8vw, 1.8rem);
    line-height: 1.5;
}

/* Style 2: Large Quote */
blockquote.style2 {
    font-size: clamp(1rem, 2vw, 2.2rem);
    line-height: 1.4;
}

blockquote .content {
    text-align: center;
    z-index: 10;
    position: relative;
}

blockquote.style2 .content {
    font-size: clamp(1.1rem, 2.2vw, 2.4rem);
}

blockquote.style1 .content {
    font-size: clamp(0.95rem, 1.8vw, 1.8rem);
}

/* Quote Marks */
blockquote:before {
    color: #fff;
    content: '\201C';
    font-family: 'Fraunces', serif;
    font-style: italic;
    font-size: clamp(3rem, 12vw, 6rem);
    font-weight: 300;
    left: 0px;
    opacity: 0.3;
    position: absolute;
    top: 30px;
    z-index: 1;
}

blockquote:after {
    bottom: -20px;
    color: #fff;
    content: '\201D';
    font-style: italic;
    font-family: 'Fraunces', serif;
    font-size: clamp(3rem, 12vw, 6rem);
    font-weight: 300;
    opacity: 0.3;
    position: absolute;
    right: 20px;
    z-index: 1;
}

/* Author Attribution */
blockquote .author {
    color: #fff;
    font-style: italic;
    font-size: clamp(0.9rem, 1.9vw, 2rem);
    margin-top: 0.5rem;
    font-family: 'Fraunces', serif;
    opacity: 0.8;
    z-index: 10;
    position: relative;
    text-align: center;
}

/* Decorative Lines */
blockquote .line-top,
blockquote .line-bottom {
    background: #fff;
    height: 4px;
    opacity: 0.3;
    position: absolute;
    z-index: 5;
}

blockquote .line-top {
    left: clamp(30px, 8vw, 60px);
    top: 8px;
    width: calc(100% - 80px);
}

blockquote .line-bottom {
    bottom: 8px;
    right: clamp(30px, 8vw, 60px);
    width: calc(100% - 80px);
}

/* Verification Icon */
.quote-info-icon {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 32px;
    height: 32px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 20;
}

.quote-info-icon:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.quote-info-icon svg {
    width: 20px;
    height: 20px;
    fill: white;
}

/* Quote Modal */
.quote-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 10000;
    align-items: center;
    justify-content: center;
}

.quote-modal.active {
    display: flex;
}

.quote-modal-content {
    background: white;
    padding: 2rem;
    border-radius: 20px;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
}

.quote-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #e0e0e0;
}

.quote-modal-header h3 {
    margin: 0;
    color: var(--forest-green);
    font-family: 'Fraunces', serif;
    font-size: 1.5rem;
}

.quote-modal-close {
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: #666;
    transition: color 0.3s;
    line-height: 1;
}

.quote-modal-close:hover {
    color: var(--forest-green);
}

.quote-modal-body {
    font-family: 'Work Sans', sans-serif;
    line-height: 1.6;
    color: #333;
}

.quote-modal-section {
    margin-bottom: 1.5rem;
}

.quote-modal-section h4 {
    margin: 0 0 0.5rem 0;
    color: var(--forest-green);
    font-family: 'Fraunces', serif;
    font-size: 1.1rem;
}

.quote-modal-section p {
    margin: 0;
}

.quote-verified-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: #e8f5e9;
    color: #2e7d32;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.9rem;
}

.quote-verified-badge svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
}

/* Error State */
.quote-error {
    padding: 2rem;
    background: #fff3cd;
    border: 2px solid #ffc107;
    border-radius: 20px;
    color: #856404;
    text-align: center;
    font-family: 'Work Sans', sans-serif;
    font-weight: 500;
}

/* ========================================
   QUOTE CAROUSEL
   ======================================== */

.quote-carousel-wrapper {
    position: relative;
    max-width: 100%;
    margin: var(--block-spacing) 0;
}

.quote-carousel-track {
    position: relative;
    width: 100%;
    overflow: hidden;
}

.quote-carousel-track .carousel-item {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    opacity: 0;
    transform: translateX(100%);
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
}

.quote-carousel-track .carousel-item.active {
    position: relative;
    opacity: 1;
    transform: translateX(0);
    pointer-events: all;
}

.quote-carousel-track .carousel-item.slide-out-left {
    opacity: 0;
    transform: translateX(-100%);
}

.quote-carousel-track .carousel-item.slide-out-right {
    opacity: 0;
    transform: translateX(100%);
}

.quote-carousel-track .carousel-item.slide-in-left {
    animation: slideInFromLeft 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.quote-carousel-track .carousel-item.slide-in-right {
    animation: slideInFromRight 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes slideInFromLeft {
    from {
        opacity: 0;
        transform: translateX(-100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInFromRight {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Carousel navigation buttons */
.carousel-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.carousel-nav:hover {
    background: rgba(255, 255, 255, 1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
    transform: translateY(-50%) scale(1.1);
}

.carousel-nav:active {
    transform: translateY(-50%) scale(0.95);
}

.carousel-prev {
    left: -60px;
}

.carousel-next {
    right: -60px;
}

.carousel-nav svg {
    fill: var(--forest-green);
}

/* Carousel indicators */
.carousel-indicators {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
}

.indicator-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.2);
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0;
}

.indicator-dot:hover {
    background: rgba(0, 0, 0, 0.4);
    transform: scale(1.2);
}

.indicator-dot.active {
    background: var(--forest-green);
    width: 32px;
    border-radius: 6px;
}

/* ========================================
   SECTION BLOCK
   ======================================== */

   /* ========================================
   SECTION BLOCK - GRANULAR SPACING
   ======================================== */

/* Section wrapper - full width container */
.soec-section-wrapper {
    position: relative;
    width: 100vw;
    margin-left: calc(-50vw + 50%);
    overflow: visible;
}

/* Remove bottom margin from last section */
.soec-section-wrapper:last-of-type {
    margin-bottom: 0 !important;
}

/* ============================================
   TOP SPACING - 10px intervals (0–60px)
   ============================================ */

.section-spacing-top-none     { padding-top: 0   !important; --section-top-spacing: 0px; }
.section-spacing-top-10       { padding-top: 10px !important; --section-top-spacing: 10px; }
.section-spacing-top-narrower { padding-top: 20px !important; --section-top-spacing: 20px; } /* legacy */
.section-spacing-top-20       { padding-top: 20px !important; --section-top-spacing: 20px; }
.section-spacing-top-30       { padding-top: 30px !important; --section-top-spacing: 30px; }
.section-spacing-top-40       { padding-top: 40px !important; --section-top-spacing: 40px; }
.section-spacing-top-narrow   { padding-top: 40px !important; --section-top-spacing: 40px; } /* legacy */
.section-spacing-top-50       { padding-top: 50px !important; --section-top-spacing: 50px; }
.section-spacing-top-normal   { padding-top: 50px !important; --section-top-spacing: 50px; } /* legacy */
.section-spacing-top-60       { padding-top: 60px !important; --section-top-spacing: 60px; }
.section-spacing-top-large    { padding-top: 60px !important; --section-top-spacing: 60px; } /* legacy */

/* ============================================
   BOTTOM SPACING - 10px intervals (0–60px)
   ============================================ */

.section-spacing-bottom-none     { padding-bottom: 0   !important; }
.section-spacing-bottom-10       { padding-bottom: 10px !important; }
.section-spacing-bottom-narrower { padding-bottom: 20px !important; } /* legacy */
.section-spacing-bottom-20       { padding-bottom: 20px !important; }
.section-spacing-bottom-30       { padding-bottom: 30px !important; }
.section-spacing-bottom-40       { padding-bottom: 40px !important; }
.section-spacing-bottom-narrow   { padding-bottom: 40px !important; } /* legacy */
.section-spacing-bottom-50       { padding-bottom: 50px !important; }
.section-spacing-bottom-normal   { padding-bottom: 50px !important; } /* legacy */
.section-spacing-bottom-60       { padding-bottom: 60px !important; }
.section-spacing-bottom-large    { padding-bottom: 60px !important; } /* legacy */

/* ============================================
   GAP SPACING - 10px intervals (0–60px)
   ============================================ */

.section-gap-none      { margin-bottom: 0 !important; }

/* Title-to-content gap: controls space between section title and block content */
.section-title-gap-none   { --section-title-gap: 0px; }
.section-title-gap-5      { --section-title-gap: 5px; }
.section-title-gap-10     { --section-title-gap: 10px; }
.section-title-gap-20     { --section-title-gap: 20px; }
.section-title-gap-30     { --section-title-gap: 30px; }
.section-title-gap-40     { --section-title-gap: 40px; }
.section-title-gap-50     { --section-title-gap: 50px; }
.section-gap-10        { margin-bottom: 10px !important; }
.section-gap-narrower  { margin-bottom: 20px !important; }  /* legacy alias: 20px */
.section-gap-20        { margin-bottom: 20px !important; }
.section-gap-30        { margin-bottom: 30px !important; }
.section-gap-narrow    { margin-bottom: 30px !important; }  /* legacy alias: 30px */
.section-gap-40        { margin-bottom: 40px !important; }
.section-gap-normal    { margin-bottom: 40px !important; }  /* legacy alias: 40px */
.section-gap-50        { margin-bottom: 50px !important; }
.section-gap-60        { margin-bottom: 60px !important; }
.section-gap-large     { margin-bottom: 60px !important; }  /* legacy alias: 60px */

/* ============================================
   SECTION STRUCTURE
   ============================================ */

/* Section background overlay */
.section-background-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
}

/* Section content container - constrained width */
.section-content {
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    z-index: 1;
}

/* Section header wrapper - DYNAMIC BOTTOM MARGIN */
/* ============================================
   ACCORDION ANIMATED TITLE - WIDTH & POSITIONING FIXES
   ============================================ */

/* Constrain the animated title wrapper to match accordion item widths */
.accordion-animated-title-wrapper {
    max-width: 100%;
    margin: 0 auto 15px auto; /* REDUCED from 30px to 15px */
}

.accordion-animated-title-wrapper .section-header {
    max-width: 100%;
}

.accordion-animated-title-wrapper .title-box {
    width: 100%;
    max-width: 100%;
}

/* Adjust bar (line) positioning - move MUCH closer to text (50% of previous distance) */
.accordion-animated-title-wrapper .line-static {
    margin-left: -7px; /* CHANGED from -15px - now 50% closer to text */
}

.accordion-animated-title-wrapper .line-animated {
    margin-left: -7px; /* CHANGED from -15px - now 50% closer to text */
}

/* Mobile: reduce title font size to 60% */
@media (max-width: 768px) {
    .accordion-animated-title-wrapper .title-content {
        font-size: 29px !important; /* 60% of 48px */
        line-height: 36px !important; /* 60% of 60px */
    }
}

/* Adjust circle positioning - 25% gap from right edge of text */
.accordion-animated-title-wrapper .circle-1,
.accordion-animated-title-wrapper .circle-2 {
    left: 100%;
}

/* Update bar animation for accordion titles - closer endpoint and starting point */
@keyframes accordionBarSlideAndMorph {
    0% {
        border-radius: 0;
        height: 85%;
        left: 0;
        margin-left: -7px; /* UPDATED to match static position */
        opacity: 1;
        top: 50%;
        transform: translateY(-50%);
        width: 12px;
    }
    83.33% {
        border-radius: 0;
        height: 85%;
        left: 100%;
        margin-left: 3px; /* REDUCED - closer to text edge (25% gap) */
        opacity: 1;
        top: 50%;
        transform: translateY(-50%);
        width: 12px;
    }
    100% {
        border-radius: 6px;
        height: 12px;
        left: 100%;
        margin-left: 3px; /* REDUCED */
        opacity: 1; /* FIXED - keep dot visible */
        top: auto;
        bottom: 12px;
        transform: none;
        width: 12px;
    }
}

/* Update circle animations - 25% gap from text, closer starting points */
@keyframes accordionSlideCircle1 {
    0% { 
        margin-left: 3px; /* REDUCED - circles start closer */
        opacity: 0; 
        bottom: 12px;
    }
    100% { 
        margin-left: 23px; /* First dot positioned with 25% gap */
        opacity: 1; 
        bottom: 12px;
    }
}

@keyframes accordionSlideCircle2 {
    0% { 
        margin-left: 3px; /* REDUCED - circles start closer */
        opacity: 0; 
        bottom: 12px;
    }
    100% { 
        margin-left: 43px; /* Second dot - maintaining spacing */
        opacity: 1; 
        bottom: 12px;
    }
}

/* Apply the new animations to accordion title elements */
.accordion-animated-title-wrapper .line-animated {
    animation: accordionBarSlideAndMorph 1.8s ease-out forwards;
}

.accordion-animated-title-wrapper .circle-1 {
    animation: accordionSlideCircle1 0.3s ease-out forwards 1.5s;
}

.accordion-animated-title-wrapper .circle-2 {
    animation: accordionSlideCircle2 0.3s ease-out forwards 1.6s;
}

/* ============================================
   SECTION HEADER (ORIGINAL ANIMATIONS)
   ============================================ */

.section-header {
    margin: 0 auto;
    margin-bottom: var(--section-title-gap, 20px);
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    width: 100%;
}

/* When section has NO title, reduce top padding slightly */
.soec-section-wrapper:not(:has(.section-header)) {
    padding-top: 40px;
}

/* Ensure blocks within sections have proper spacing */
.section-content > *:first-child {
    margin-top: 0;
}

.section-content > *:last-child {
    margin-bottom: 0;
}

.section-content > .admin-block-wrapper:first-child,
.section-content > [class*="-block-wrapper"]:first-child {
    margin-top: 0;
}

.section-content > .admin-block-wrapper:last-child,
.section-content > [class*="-block-wrapper"]:last-child {
    margin-bottom: 0;
}

/* Override for split and news blocks - they manage their own spacing */
.section-content > .split-block-wrapper,
.section-content > .news-block-wrapper {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
}

/* ============================================
   TITLE BOX & ANIMATION - 1.4X WIDER
   ============================================ */

.title-block {
    margin: 0 auto var(--block-spacing, 0.75rem) auto;
    text-align: center;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.title-box {
    align-items: center;
    border-radius: 20px;
    box-shadow: -3px 3px 8px rgba(0, 0, 0, 0.15);
    color: #fff;
    display: inline-flex;
    justify-content: center;
    margin: 0 auto;
    opacity: 1;
    overflow: hidden; /* CRITICAL: Must be hidden, not visible! */
    padding: 35px 10px 35px 20px; /* Exact padding from reference: top right bottom left */
    position: relative;
    transition: box-shadow 0.3s ease, background-color 0.3s ease; /* Removed transform to prevent hover movement */
    background-color: var(--tab-color, #4f9aa8);
    text-decoration: none;
    cursor: default;
    width: 100%;
}

/* Explicitly prevent hover movement */
.title-box:hover {
    transform: none !important;
    box-shadow: -3px 3px 8px rgba(0, 0, 0, 0.15); /* Keep same shadow */
}

/* Prevent title box from being affected by midway zoom on hover */
.title-box.midway-zoomable:hover {
    transform: scale(1) !important; /* Force back to normal scale on hover */
}

.section-header .title-box {
    background-color: var(--title-bg-color);
}

.title-content {
    display: inline-flex;
    font-family: 'Fraunces', serif;
    font-size: 48px;
    font-weight: 900;
    justify-content: center;
    left: calc(-5% - 20px); /* CRITICAL: Offset from reference implementation */
    line-height: 60px;
    position: relative;
    transform-origin: center;
    white-space: nowrap;
    z-index: 3;
    pointer-events: none;
    padding: 0 20px;
}

.title-text {
    display: inline-block;
    text-align: center;
    white-space: nowrap;
}

/* Reveal mask animation */
.reveal-mask {
    animation: revealMask 1.8s ease-out forwards;
    animation-play-state: paused;
    bottom: 0;
    position: absolute;
    right: 0;
    top: 0;
    width: 100%;
    z-index: 4;
    background-color: var(--tab-color, #4f9aa8);
}

.section-header .reveal-mask {
    background-color: var(--title-bg-color);
}

.title-box.visible .reveal-mask {
    animation-play-state: running;
}

/* Vertical line elements - 85% of title box height */
.line-static {
    height: 85%;
    left: 0;
    margin-left: -40px;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 12px; /* FIXED size to match reference */
    z-index: 5;
    background: var(--highlight-color, #e1a038);
}

.section-header .line-static {
    background: var(--accent-color);
}

.line-animated {
    animation: barSlideAndMorph 1.8s ease-out forwards;
    animation-play-state: paused;
    height: 85%;
    left: 0;
    margin-left: -40px;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    transform-origin: center;
    width: 12px; /* FIXED size to match reference */
    z-index: 20;
    background: var(--highlight-color, #e1a038);
}

.section-header .line-animated {
    background: var(--accent-color);
}

.title-box.visible .line-animated {
    animation-play-state: running;
}

/* Circle decorations */
.circle-1,
.circle-2 {
    border-radius: 50%;
    bottom: 12px;
    height: 12px; /* FIXED size to match reference */
    left: 100%;
    opacity: 0;
    position: absolute;
    pointer-events: none;
    transform: none;
    width: 12px; /* FIXED size to match reference */
    z-index: 25;
    background: var(--highlight-color, #e1a038);
}

.section-header .circle-1,
.section-header .circle-2 {
    background: var(--accent-color);
}

.circle-1 {
    animation: slideCircle1 0.3s ease-out forwards 1.5s;
    animation-play-state: paused;
}

.circle-2 {
    animation: slideCircle2 0.3s ease-out forwards 1.6s;
    animation-play-state: paused;
}

.title-box.visible .circle-1,
.title-box.visible .circle-2 {
    animation-play-state: running;
}

/* ============================================
   TITLE ANIMATION KEYFRAMES
   ============================================ */

@keyframes revealMask {
    0% { width: 100%; }
    100% { width: 0; }
}

@keyframes barSlideAndMorph {
    0% {
        border-radius: 0;
        height: 85%;
        left: 0;
        margin-left: -40px;
        opacity: 1;
        top: 50%;
        transform: translateY(-50%);
        width: 12px; /* FIXED size, not clamp() */
    }
    83.33% {
        border-radius: 0;
        height: 85%;
        left: 100%;
        margin-left: 32px;
        opacity: 1;
        top: 50%;
        transform: translateY(-50%);
        width: 12px; /* FIXED size, not clamp() */
    }
    94.44% {
        border-radius: 50%;
        bottom: 15px;
        height: 12px; /* FIXED size, not clamp() */
        left: 100%;
        margin-left: 32px;
        opacity: 1;
        top: auto;
        transform: translateY(0);
        width: 12px; /* FIXED size, not clamp() */
    }
    100% {
        border-radius: 50%;
        bottom: 12px;
        height: 12px; /* FIXED size, not clamp() - this is the final dot! */
        left: 100%;
        margin-left: 32px;
        opacity: 1;
        top: auto;
        transform: translateY(0);
        width: 12px; /* FIXED size, not clamp() - this is the final dot! */
    }
}

@keyframes slideCircle1 {
    0% { 
        margin-left: 32px; /* Exact value from working implementation */
        opacity: 0; 
        bottom: 12px;
    }
    100% { 
        margin-left: 52px; /* Exact value from working implementation */
        opacity: 1; 
        bottom: 12px;
    }
}

@keyframes slideCircle2 {
    0% { 
        margin-left: 32px; /* Exact value from working implementation */
        opacity: 0; 
        bottom: 12px;
    }
    100% { 
        margin-left: 72px; /* Exact value from working implementation */
        opacity: 1; 
        bottom: 12px;
    }
}

/* ============================================
   MOBILE ANIMATED TITLE KEYFRAMES (≤768px)
   Matches reduced left offset (-14px bar, 10px circles)
   ============================================ */
@keyframes barSlideAndMorphMobile {
    0% {
        border-radius: 0;
        height: 85%;
        left: 0;
        margin-left: -14px;
        opacity: 1;
        top: 50%;
        transform: translateY(-50%);
        width: 12px;
    }
    83.33% {
        border-radius: 0;
        height: 85%;
        left: 100%;
        margin-left: 10px;
        opacity: 1;
        top: 50%;
        transform: translateY(-50%);
        width: 12px;
    }
    94.44% {
        border-radius: 50%;
        bottom: 15px;
        height: 12px;
        left: 100%;
        margin-left: 10px;
        opacity: 1;
        top: auto;
        transform: translateY(0);
        width: 12px;
    }
    100% {
        border-radius: 50%;
        bottom: 12px;
        height: 12px;
        left: 100%;
        margin-left: 10px;
        opacity: 1;
        top: auto;
        transform: translateY(0);
        width: 12px;
    }
}

@keyframes slideCircle1Mobile {
    0%   { margin-left: 10px; opacity: 0; bottom: 12px; }
    100% { margin-left: 28px; opacity: 1; bottom: 12px; }
}

@keyframes slideCircle2Mobile {
    0%   { margin-left: 10px; opacity: 0; bottom: 12px; }
    100% { margin-left: 46px; opacity: 1; bottom: 12px; }
}

@media (max-width: 768px) {
    .line-animated {
        animation-name: barSlideAndMorphMobile;
    }
    .circle-1 {
        animation-name: slideCircle1Mobile;
    }
    .circle-2 {
        animation-name: slideCircle2Mobile;
    }
}

/* ============================================
   EXPANDED COLOR SCHEMES - EXPLICIT DEFINITIONS
   ============================================ */

/* Burgundy backgrounds */
.section-header .title-box.burgundy-ochre {
    --title-bg-color: #8b2635;
    --accent-color: #d4a574;
}
.section-header .title-box.burgundy-rust-red {
    --title-bg-color: #8b2635;
    --accent-color: #cc4020;
}
.section-header .title-box.burgundy-emerald-green {
    --title-bg-color: #8b2635;
    --accent-color: #059669;
}
.section-header .title-box.burgundy-highlight-orange {
    --title-bg-color: #8b2635;
    --accent-color: #e1a038;
}
.section-header .title-box.burgundy-sage-green {
    --title-bg-color: #8b2635;
    --accent-color: #8ca280;
}
.section-header .title-box.burgundy-tab-blue {
    --title-bg-color: #8b2635;
    --accent-color: #4f9aa8;
}
.section-header .title-box.burgundy-burgundy {
    --title-bg-color: #8b2635;
    --accent-color: #8c1a22;
}
.section-header .title-box.burgundy-brick-red {
    --title-bg-color: #8b2635;
    --accent-color: #8c1a22;
}
.section-header .title-box.burgundy-white {
    --title-bg-color: #8b2635;
    --accent-color: #ffffff;
}

/* Forest Green backgrounds */
.section-header .title-box.forest-green-ochre {
    --title-bg-color: #1b5137;
    --accent-color: #d4a574;
}
.section-header .title-box.forest-green-rust-red {
    --title-bg-color: #1b5137;
    --accent-color: #cc4020;
}
.section-header .title-box.forest-green-emerald-green {
    --title-bg-color: #1b5137;
    --accent-color: #059669;
}
.section-header .title-box.forest-green-highlight-orange {
    --title-bg-color: #1b5137;
    --accent-color: #e1a038;
}
.section-header .title-box.forest-green-sage-green {
    --title-bg-color: #1b5137;
    --accent-color: #8ca280;
}
.section-header .title-box.forest-green-tab-blue {
    --title-bg-color: #1b5137;
    --accent-color: #4f9aa8;
}
.section-header .title-box.forest-green-burgundy {
    --title-bg-color: #1b5137;
    --accent-color: #8b2635;
}
.section-header .title-box.forest-green-brick-red {
    --title-bg-color: #1b5137;
    --accent-color: #8c1a22;
}
.section-header .title-box.forest-green-white {
    --title-bg-color: #1b5137;
    --accent-color: #ffffff;
}

/* Emerald Green backgrounds */
.section-header .title-box.emerald-green-ochre {
    --title-bg-color: #059669;
    --accent-color: #d4a574;
}
.section-header .title-box.emerald-green-rust-red {
    --title-bg-color: #059669;
    --accent-color: #cc4020;
}
.section-header .title-box.emerald-green-emerald-green {
    --title-bg-color: #059669;
    --accent-color: #8ca280;
}
.section-header .title-box.emerald-green-highlight-orange {
    --title-bg-color: #059669;
    --accent-color: #e1a038;
}
.section-header .title-box.emerald-green-sage-green {
    --title-bg-color: #059669;
    --accent-color: #8ca280;
}
.section-header .title-box.emerald-green-tab-blue {
    --title-bg-color: #059669;
    --accent-color: #4f9aa8;
}
.section-header .title-box.emerald-green-burgundy {
    --title-bg-color: #059669;
    --accent-color: #8b2635;
}
.section-header .title-box.emerald-green-brick-red {
    --title-bg-color: #059669;
    --accent-color: #8c1a22;
}
.section-header .title-box.emerald-green-white {
    --title-bg-color: #059669;
    --accent-color: #ffffff;
}

/* Sage Green backgrounds */
.section-header .title-box.sage-green-ochre {
    --title-bg-color: #8ca280;
    --accent-color: #d4a574;
}
.section-header .title-box.sage-green-rust-red {
    --title-bg-color: #8ca280;
    --accent-color: #cc4020;
}
.section-header .title-box.sage-green-emerald-green {
    --title-bg-color: #8ca280;
    --accent-color: #059669;
}
.section-header .title-box.sage-green-highlight-orange {
    --title-bg-color: #8ca280;
    --accent-color: #e1a038;
}
.section-header .title-box.sage-green-sage-green {
    --title-bg-color: #8ca280;
    --accent-color: #1b5137;
}
.section-header .title-box.sage-green-tab-blue {
    --title-bg-color: #8ca280;
    --accent-color: #4f9aa8;
}
.section-header .title-box.sage-green-burgundy {
    --title-bg-color: #8ca280;
    --accent-color: #8b2635;
}
.section-header .title-box.sage-green-brick-red {
    --title-bg-color: #8ca280;
    --accent-color: #8c1a22;
}
.section-header .title-box.sage-green-white {
    --title-bg-color: #8ca280;
    --accent-color: #ffffff;
}

/* Tab Blue backgrounds */
.section-header .title-box.tab-blue-ochre {
    --title-bg-color: #4f9aa8;
    --accent-color: #d4a574;
}
.section-header .title-box.tab-blue-rust-red {
    --title-bg-color: #4f9aa8;
    --accent-color: #cc4020;
}
.section-header .title-box.tab-blue-emerald-green {
    --title-bg-color: #4f9aa8;
    --accent-color: #059669;
}
.section-header .title-box.tab-blue-highlight-orange {
    --title-bg-color: #4f9aa8;
    --accent-color: #e1a038;
}
.section-header .title-box.tab-blue-sage-green {
    --title-bg-color: #4f9aa8;
    --accent-color: #8ca280;
}
.section-header .title-box.tab-blue-tab-blue {
    --title-bg-color: #4f9aa8;
    --accent-color: #1b5137;
}
.section-header .title-box.tab-blue-burgundy {
    --title-bg-color: #4f9aa8;
    --accent-color: #8b2635;
}
.section-header .title-box.tab-blue-brick-red {
    --title-bg-color: #4f9aa8;
    --accent-color: #8c1a22;
}
.section-header .title-box.tab-blue-white {
    --title-bg-color: #4f9aa8;
    --accent-color: #ffffff;
}

/* Highlight Orange backgrounds */
.section-header .title-box.highlight-orange-ochre {
    --title-bg-color: #e1a038;
    --accent-color: #d4a574;
}
.section-header .title-box.highlight-orange-rust-red {
    --title-bg-color: #e1a038;
    --accent-color: #cc4020;
}
.section-header .title-box.highlight-orange-emerald-green {
    --title-bg-color: #e1a038;
    --accent-color: #059669;
}
.section-header .title-box.highlight-orange-highlight-orange {
    --title-bg-color: #e1a038;
    --accent-color: #cc4020;
}
.section-header .title-box.highlight-orange-sage-green {
    --title-bg-color: #e1a038;
    --accent-color: #8ca280;
}
.section-header .title-box.highlight-orange-tab-blue {
    --title-bg-color: #e1a038;
    --accent-color: #4f9aa8;
}
.section-header .title-box.highlight-orange-burgundy {
    --title-bg-color: #e1a038;
    --accent-color: #8b2635;
}
.section-header .title-box.highlight-orange-brick-red {
    --title-bg-color: #e1a038;
    --accent-color: #8c1a22;
}
.section-header .title-box.highlight-orange-white {
    --title-bg-color: #e1a038;
    --accent-color: #ffffff;
}

/* Rust Red backgrounds */
.section-header .title-box.rust-red-ochre {
    --title-bg-color: #cc4020;
    --accent-color: #d4a574;
}
.section-header .title-box.rust-red-rust-red {
    --title-bg-color: #cc4020;
    --accent-color: #8c1a22;
}
.section-header .title-box.rust-red-emerald-green {
    --title-bg-color: #cc4020;
    --accent-color: #059669;
}
.section-header .title-box.rust-red-highlight-orange {
    --title-bg-color: #cc4020;
    --accent-color: #e1a038;
}
.section-header .title-box.rust-red-sage-green {
    --title-bg-color: #cc4020;
    --accent-color: #8ca280;
}
.section-header .title-box.rust-red-tab-blue {
    --title-bg-color: #cc4020;
    --accent-color: #4f9aa8;
}
.section-header .title-box.rust-red-burgundy {
    --title-bg-color: #cc4020;
    --accent-color: #8b2635;
}
.section-header .title-box.rust-red-brick-red {
    --title-bg-color: #cc4020;
    --accent-color: #8c1a22;
}
.section-header .title-box.rust-red-white {
    --title-bg-color: #cc4020;
    --accent-color: #ffffff;
}

/* Brick Red backgrounds */
.section-header .title-box.brick-red-ochre {
    --title-bg-color: #8c1a22;
    --accent-color: #d4a574;
}
.section-header .title-box.brick-red-rust-red {
    --title-bg-color: #8c1a22;
    --accent-color: #cc4020;
}
.section-header .title-box.brick-red-emerald-green {
    --title-bg-color: #8c1a22;
    --accent-color: #059669;
}
.section-header .title-box.brick-red-highlight-orange {
    --title-bg-color: #8c1a22;
    --accent-color: #e1a038;
}
.section-header .title-box.brick-red-sage-green {
    --title-bg-color: #8c1a22;
    --accent-color: #8ca280;
}
.section-header .title-box.brick-red-tab-blue {
    --title-bg-color: #8c1a22;
    --accent-color: #4f9aa8;
}
.section-header .title-box.brick-red-burgundy {
    --title-bg-color: #8c1a22;
    --accent-color: #8b2635;
}
.section-header .title-box.brick-red-brick-red {
    --title-bg-color: #8c1a22;
    --accent-color: #cc4020;
}
.section-header .title-box.brick-red-white {
    --title-bg-color: #8c1a22;
    --accent-color: #ffffff;
}

/* Charcoal backgrounds */
.section-header .title-box.charcoal-ochre {
    --title-bg-color: #333333;
    --accent-color: #d4a574;
}
.section-header .title-box.charcoal-rust-red {
    --title-bg-color: #333333;
    --accent-color: #cc4020;
}
.section-header .title-box.charcoal-emerald-green {
    --title-bg-color: #333333;
    --accent-color: #059669;
}
.section-header .title-box.charcoal-highlight-orange {
    --title-bg-color: #333333;
    --accent-color: #e1a038;
}
.section-header .title-box.charcoal-sage-green {
    --title-bg-color: #333333;
    --accent-color: #8ca280;
}
.section-header .title-box.charcoal-tab-blue {
    --title-bg-color: #333333;
    --accent-color: #4f9aa8;
}
.section-header .title-box.charcoal-burgundy {
    --title-bg-color: #333333;
    --accent-color: #8b2635;
}
.section-header .title-box.charcoal-brick-red {
    --title-bg-color: #333333;
    --accent-color: #8c1a22;
}
.section-header .title-box.charcoal-white {
    --title-bg-color: #333333;
    --accent-color: #ffffff;
}

/* Black backgrounds */
.section-header .title-box.black-ochre {
    --title-bg-color: #000000;
    --accent-color: #d4a574;
}
.section-header .title-box.black-rust-red {
    --title-bg-color: #000000;
    --accent-color: #cc4020;
}
.section-header .title-box.black-emerald-green {
    --title-bg-color: #000000;
    --accent-color: #059669;
}
.section-header .title-box.black-highlight-orange {
    --title-bg-color: #000000;
    --accent-color: #e1a038;
}
.section-header .title-box.black-sage-green {
    --title-bg-color: #000000;
    --accent-color: #8ca280;
}
.section-header .title-box.black-tab-blue {
    --title-bg-color: #000000;
    --accent-color: #4f9aa8;
}
.section-header .title-box.black-burgundy {
    --title-bg-color: #000000;
    --accent-color: #8b2635;
}
.section-header .title-box.black-brick-red {
    --title-bg-color: #000000;
    --accent-color: #8c1a22;
}
.section-header .title-box.black-white {
    --title-bg-color: #000000;
    --accent-color: #ffffff;
}

/* Slate backgrounds */
.section-header .title-box.slate-ochre {
    --title-bg-color: #5c6e7a;
    --accent-color: #d4a574;
}
.section-header .title-box.slate-rust-red {
    --title-bg-color: #5c6e7a;
    --accent-color: #cc4020;
}
.section-header .title-box.slate-emerald-green {
    --title-bg-color: #5c6e7a;
    --accent-color: #059669;
}
.section-header .title-box.slate-highlight-orange {
    --title-bg-color: #5c6e7a;
    --accent-color: #e1a038;
}
.section-header .title-box.slate-sage-green {
    --title-bg-color: #5c6e7a;
    --accent-color: #8ca280;
}
.section-header .title-box.slate-tab-blue {
    --title-bg-color: #5c6e7a;
    --accent-color: #4f9aa8;
}
.section-header .title-box.slate-burgundy {
    --title-bg-color: #5c6e7a;
    --accent-color: #8b2635;
}
.section-header .title-box.slate-brick-red {
    --title-bg-color: #5c6e7a;
    --accent-color: #8c1a22;
}
.section-header .title-box.slate-white {
    --title-bg-color: #5c6e7a;
    --accent-color: #ffffff;
}

/* Fallback for any undefined combinations */
.section-header .title-box {
    background-color: var(--title-bg-color, #1b5137);
}

.section-header .line-static,
.section-header .line-animated,
.section-header .circle-1,
.section-header .circle-2 {
    background: var(--accent-color, #d4a574);
}

.section-header .reveal-mask {
    background-color: var(--title-bg-color, #1b5137);
}

/* ========================================
   SPLIT BLOCK
   ======================================== */

.split-block-wrapper {
    display: grid;
    width: 100%;
    padding: 0.5rem 0 0.5rem 0;
    aspect-ratio: unset !important; /* Never apply aspect ratio to wrapper */
    height: auto !important; /* Always auto height */
}

.split-block-wrapper.columns-1 {
    grid-template-columns: 1fr;
}

.split-block-wrapper.columns-2 {
    grid-template-columns: repeat(2, 1fr);
}

.split-block-wrapper.columns-3 {
    grid-template-columns: repeat(3, 1fr);
}

.split-block-wrapper.columns-4 {
    grid-template-columns: repeat(4, 1fr);
}

/* Aspect ratios - comprehensive set (widest to tallest) */
.split-block-wrapper.aspect-16-1 .split-card { aspect-ratio: 16/1; }
.split-block-wrapper.aspect-14-1 .split-card { aspect-ratio: 14/1; }
.split-block-wrapper.aspect-12-1 .split-card { aspect-ratio: 12/1; }
.split-block-wrapper.aspect-10-1 .split-card { aspect-ratio: 10/1; }
.split-block-wrapper.aspect-8-1 .split-card { aspect-ratio: 8/1; }
.split-block-wrapper.aspect-6-1 .split-card { aspect-ratio: 6/1; }
.split-block-wrapper.aspect-5-1 .split-card { aspect-ratio: 5/1; }
.split-block-wrapper.aspect-4-1 .split-card { aspect-ratio: 4/1; }
.split-block-wrapper.aspect-32-9 .split-card { aspect-ratio: 32/9; }
.split-block-wrapper.aspect-3-1 .split-card { aspect-ratio: 3/1; }
.split-block-wrapper.aspect-21-9 .split-card { aspect-ratio: 21/9; }
.split-block-wrapper.aspect-2-1 .split-card { aspect-ratio: 2/1; }
.split-block-wrapper.aspect-16-9 .split-card { aspect-ratio: 16/9; }
.split-block-wrapper.aspect-3-2 .split-card { aspect-ratio: 3/2; }
.split-block-wrapper.aspect-4-3 .split-card { aspect-ratio: 4/3; }
.split-block-wrapper.aspect-5-4 .split-card { aspect-ratio: 5/4; }
.split-block-wrapper.aspect-1-1 .split-card { aspect-ratio: 1/1; }
.split-block-wrapper.aspect-4-5 .split-card { aspect-ratio: 4/5; }
.split-block-wrapper.aspect-3-4 .split-card { aspect-ratio: 3/4; }
.split-block-wrapper.aspect-2-3 .split-card { aspect-ratio: 2/3; }
.split-block-wrapper.aspect-9-16 .split-card { aspect-ratio: 9/16; }
.split-block-wrapper.aspect-1-2 .split-card { aspect-ratio: 1/2; }

/* Split block animated title */
/* ===================================================================
   UNIVERSAL ANIMATED TITLE WRAPPER
   Applies to all block types: split, text, image, accordion, flip,
   data, download, frame, quote, news — rendered by render_animated_title()
   =================================================================== */
[class$="-animated-title-wrapper"],
[class*="-animated-title-wrapper "] {
    max-width: 100%;
    /* --section-title-gap is set by the .section-title-gap-N class that
       render_section_break() (base-block.php) puts on the section wrapper
       when "Section Break" is enabled - previously nothing anywhere in this
       stylesheet actually read that variable, so the Title Gap admin
       control had no effect at all, on any block. 15px is the fallback for
       when no section break is enabled (matches the previous fixed value). */
    margin: 0 auto var(--section-title-gap, 15px) auto;
}
[class$="-animated-title-wrapper"] .section-header,
[class*="-animated-title-wrapper "] .section-header {
    max-width: 100%;
}
[class$="-animated-title-wrapper"] .title-box,
[class*="-animated-title-wrapper "] .title-box {
    width: 100%;
    max-width: 100%;
}
[class$="-animated-title-wrapper"].no-hover .title-box,
[class*="-animated-title-wrapper "].no-hover .title-box {
    pointer-events: none;
}

[class$="-simple-title-wrapper"],
[class*="-simple-title-wrapper "] {
    max-width: 100%;
    margin: 0 auto 15px auto;
}
[class$="-simple-title-wrapper"] .simple-title-box,
[class*="-simple-title-wrapper "] .simple-title-box {
    width: 100%;
}
[class$="-simple-title-wrapper"].no-hover .simple-title-box,
[class*="-simple-title-wrapper "].no-hover .simple-title-box {
    pointer-events: none;
}

.split-animated-title-wrapper {
    max-width: 100%;
    margin: 0 auto 15px auto;
}

.split-animated-title-wrapper .section-header {
    max-width: 100%;
}

.split-animated-title-wrapper .title-box {
    width: 100%;
    max-width: 100%;
}

/* Split block simple title style */
.split-simple-title-wrapper {
    max-width: 100%;
    margin: 0 auto 15px auto;
}

.split-simple-title-wrapper .simple-title-box {
    width: 100%;
    aspect-ratio: 16 / 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    overflow: hidden;
}

.split-simple-title-wrapper .simple-title-text {
    color: #ffffff;
    font-family: 'Fraunces', serif;
    font-weight: 600;
    font-size: clamp(14px, 2vw, 20px);
    letter-spacing: 0.5px;
    text-align: center;
    padding: 0 20px;
}

.split-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    display: flex;
    transition: all 0.3s ease;
}

/* Split card background colors */
.split-card.bg-white { background-color: #fff !important; }
.split-card.bg-burgundy { background-color: #8b2635 !important; }
.split-card.bg-forest-green { background-color: #1b5137 !important; }
.split-card.bg-emerald-green { background-color: #059669 !important; }
.split-card.bg-sage-green { background-color: #8ca280 !important; }
.split-card.bg-tab-blue { background-color: #4f9aa8 !important; }
.split-card.bg-highlight-orange { background-color: #e1a038 !important; }
.split-card.bg-rust-red { background-color: #cc4020 !important; }
.split-card.bg-brick-red { background-color: #8c1a22 !important; }
.split-card.bg-charcoal { background-color: #333 !important; }
.split-card.bg-black { background-color: #000 !important; }
.split-card.bg-transparent { background-color: transparent !important; }

/* Shadow strength variations for cards - Universal 6-level system */
.split-block-wrapper.shadow-none .split-card {
    box-shadow: none;
}
.split-block-wrapper.shadow-light .split-card {
    box-shadow:
        1px 1px 2px hsl(var(--shadow-hsl) / 0.15),
        2px 2px 4px hsl(var(--shadow-hsl) / 0.10),
        3px 4px 6px hsl(var(--shadow-hsl) / 0.06);
}
.split-block-wrapper.shadow-moderate .split-card {
    box-shadow:
        1px 2px 4px hsl(var(--shadow-hsl) / 0.20),
        2px 4px 10px hsl(var(--shadow-hsl) / 0.14),
        4px 8px 16px hsl(var(--shadow-hsl) / 0.10);
}
.split-block-wrapper.shadow-medium .split-card {
    box-shadow:
        2px 4px 6px hsl(var(--shadow-hsl) / 0.26),
        4px 8px 16px hsl(var(--shadow-hsl) / 0.18),
        8px 12px 22px hsl(var(--shadow-hsl) / 0.14);
}
.split-block-wrapper.shadow-heavy .split-card {
    box-shadow:
        3px 6px 10px hsl(var(--shadow-hsl) / 0.32),
        6px 12px 24px hsl(var(--shadow-hsl) / 0.22),
        12px 20px 32px hsl(var(--shadow-hsl) / 0.16);
}
.split-block-wrapper.shadow-vheavy .split-card {
    box-shadow:
        4px 8px 14px hsl(var(--shadow-hsl) / 0.38),
        10px 18px 32px hsl(var(--shadow-hsl) / 0.28),
        18px 30px 48px hsl(var(--shadow-hsl) / 0.20);
}

/* Backward compatibility for old shadow values */
.split-block-wrapper.shadow-mild .split-card { /* maps to light */
    box-shadow:
        1px 1px 2px hsl(var(--shadow-hsl) / 0.15),
        2px 2px 4px hsl(var(--shadow-hsl) / 0.10),
        3px 4px 6px hsl(var(--shadow-hsl) / 0.06);
}
.split-block-wrapper.shadow-strong .split-card { /* maps to heavy */
    box-shadow:
        3px 6px 10px hsl(var(--shadow-hsl) / 0.32),
        6px 12px 24px hsl(var(--shadow-hsl) / 0.22),
        12px 20px 32px hsl(var(--shadow-hsl) / 0.16);
}
.split-block-wrapper.shadow-very-strong .split-card { /* maps to vheavy */
    box-shadow:
        4px 8px 14px hsl(var(--shadow-hsl) / 0.38),
        10px 18px 32px hsl(var(--shadow-hsl) / 0.28),
        18px 30px 48px hsl(var(--shadow-hsl) / 0.20);
}

/* Shadow strength variations for badges - using filter for PNG transparency */
.split-block-wrapper.shadow-none .split-card-badge {
    filter: none;
}
.split-block-wrapper.shadow-light .split-card-badge,
.split-block-wrapper.shadow-mild .split-card-badge {
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.2));
}
.split-block-wrapper.shadow-moderate .split-card-badge {
    filter: drop-shadow(0 5px 10px rgba(0, 0, 0, 0.22));
}
.split-block-wrapper.shadow-medium .split-card-badge {
    filter: drop-shadow(0 5px 10px rgba(0, 0, 0, 0.25));
}
.split-block-wrapper.shadow-heavy .split-card-badge,
.split-block-wrapper.shadow-strong .split-card-badge {
    filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.3));
}
.split-block-wrapper.shadow-vheavy .split-card-badge,
.split-block-wrapper.shadow-very-strong .split-card-badge {
    filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.4));
}

/* Hover effect only when card has a link AND mouseover is enabled */
.split-card:not(.no-hover):hover {
    transform: translateY(-4px);
}
.split-block-wrapper.shadow-none .split-card:not(.no-hover):hover {
    box-shadow:
        1px 2px 4px hsl(var(--shadow-hsl) / 0.20),
        2px 4px 10px hsl(var(--shadow-hsl) / 0.14),
        4px 8px 16px hsl(var(--shadow-hsl) / 0.10);
}
.split-block-wrapper.shadow-light .split-card:not(.no-hover):hover,
.split-block-wrapper.shadow-mild .split-card:not(.no-hover):hover {
    box-shadow:
        2px 4px 8px hsl(var(--shadow-hsl) / 0.22),
        4px 8px 16px hsl(var(--shadow-hsl) / 0.16),
        6px 12px 24px hsl(var(--shadow-hsl) / 0.12);
}
.split-block-wrapper.shadow-moderate .split-card:not(.no-hover):hover {
    box-shadow:
        2px 4px 8px hsl(var(--shadow-hsl) / 0.24),
        4px 8px 18px hsl(var(--shadow-hsl) / 0.18),
        8px 14px 28px hsl(var(--shadow-hsl) / 0.14);
}
.split-block-wrapper.shadow-medium .split-card:not(.no-hover):hover {
    box-shadow:
        3px 6px 10px hsl(var(--shadow-hsl) / 0.30),
        6px 12px 22px hsl(var(--shadow-hsl) / 0.22),
        10px 18px 32px hsl(var(--shadow-hsl) / 0.16);
}
.split-block-wrapper.shadow-heavy .split-card:not(.no-hover):hover,
.split-block-wrapper.shadow-strong .split-card:not(.no-hover):hover {
    box-shadow:
        4px 8px 14px hsl(var(--shadow-hsl) / 0.40),
        10px 18px 32px hsl(var(--shadow-hsl) / 0.30),
        18px 30px 50px hsl(var(--shadow-hsl) / 0.22);
}
.split-block-wrapper.shadow-vheavy .split-card:not(.no-hover):hover,
.split-block-wrapper.shadow-very-strong .split-card:not(.no-hover):hover {
    box-shadow:
        5px 10px 18px hsl(var(--shadow-hsl) / 0.42),
        12px 22px 38px hsl(var(--shadow-hsl) / 0.32),
        22px 36px 56px hsl(var(--shadow-hsl) / 0.24);
}

/* No hover effect when no-hover class is applied */
.split-card.no-hover:hover {
    transform: none;
}

/* Layout variations */
.split-card.layout-vertical {
    flex-direction: column !important;
}

.split-card.layout-vertical.pattern-1 {
    flex-direction: column !important;
}

.split-card.layout-vertical.pattern-2 {
    flex-direction: column-reverse !important;
}

.split-card.layout-vertical .split-card-image {
    width: 100% !important;
    flex: 0 0 50%;
    min-height: 0;
}

.split-card.layout-vertical .split-card-text {
    width: 100% !important;
    flex: 0 0 50%;
    min-height: 0;
    overflow: auto;
}

.split-card.layout-horizontal {
    flex-direction: row;
}

.split-card.layout-horizontal.pattern-1 {
    flex-direction: row;
}

.split-card.layout-horizontal.pattern-2 {
    flex-direction: row-reverse;
}

.split-card.layout-horizontal .split-card-image,
.split-card.layout-horizontal .split-card-text {
    flex: 1 1 50%;
    min-height: 0;
}

/* Pattern classes for backward compatibility */
.split-card.pattern-1 {
    flex-direction: column;
}

.split-card.pattern-2 {
    flex-direction: column-reverse;
}

.split-card-image,
.split-card-text {
    flex: 1 1 50%;
    min-height: 0;
}

.split-card-image {
    position: relative;
    background: #9b9b9b;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

/* For vertical layouts, image takes full width */
.split-card.layout-vertical .split-card-image {
    width: 100%;
}

.split-card-image img {
    width: 100%;
    height: 100%;
    /* object-fit is controlled by .split-card-img rules below — do not set here */
}

.split-card-image .image-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.split-card-image .image-placeholder svg {
    width: 60px;
    height: 60px;
    fill: white;
    opacity: 0.8;
}

/* Image wrapper - fills the container, clips overflow */
.split-card-image .image-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
    display: block; /* block, not flex — flex interferes with object-fit layout */
}

/* The <a> tag that wraps the image-wrapper must also be block + full height.
   By default <a> is display:inline which collapses to zero height, making
   height:100% on .image-wrapper resolve to nothing. */
.split-card-image > a {
    display: block;
    width: 100%;
    height: 100%;
}

/* ---------------------------------------------------------------
   BASE IMAGE STYLES
   By default: cover fit, scale 1, centered position.
   transform-origin is overridden per-position below.
--------------------------------------------------------------- */
.split-card-image .split-card-img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;          /* default fit */
    object-position: center center;
    transform-origin: center center;
    transform: scale(var(--img-scale, 1));
    transition: opacity 0.8s ease-in-out;
}

/* =============================================
   IMAGE FIT VARIANTS
   Set via data-fit attribute on .image-wrapper.
   !important beats the base rule above.
   Scale continues to work on top of any fit:
   - cover/fill/none → scale zooms in from the fill
   - contain → scale zooms into the letterboxed result
   ============================================= */
.split-card-image .image-wrapper[data-fit="cover"]   .split-card-img { object-fit: cover   !important; }
.split-card-image .image-wrapper[data-fit="contain"] .split-card-img { object-fit: contain !important; }
.split-card-image .image-wrapper[data-fit="fill"]    .split-card-img { object-fit: fill    !important; }

/* fit:none — render at natural pixel size, centred, clipped by overflow:hidden on wrapper */
.split-card-image .image-wrapper[data-fit="none"] .split-card-img {
    object-fit: none !important;
    width: auto      !important;
    height: auto     !important;
    min-width: 0;
    min-height: 0;
    /* Centre in wrapper using absolute positioning */
    position: absolute !important;
    top: 50%  !important;
    left: 50% !important;
    transform: translate(-50%, -50%) scale(var(--img-scale, 1)) !important;
}

/* Image Block - Universal 6-level Shadow System */
.image-block-wrapper.shadow-none .image-item {
    box-shadow: none;
}

.image-block-wrapper.shadow-light .image-item {
    box-shadow:
        1px 1px 2px hsl(var(--shadow-hsl) / 0.15),
        2px 2px 4px hsl(var(--shadow-hsl) / 0.10),
        3px 4px 6px hsl(var(--shadow-hsl) / 0.06);
}

.image-block-wrapper.shadow-moderate .image-item {
    box-shadow:
        1px 2px 4px hsl(var(--shadow-hsl) / 0.20),
        2px 4px 10px hsl(var(--shadow-hsl) / 0.14),
        4px 8px 16px hsl(var(--shadow-hsl) / 0.10);
}

.image-block-wrapper.shadow-medium .image-item {
    box-shadow:
        2px 4px 6px hsl(var(--shadow-hsl) / 0.26),
        4px 8px 16px hsl(var(--shadow-hsl) / 0.18),
        8px 12px 22px hsl(var(--shadow-hsl) / 0.14);
}

.image-block-wrapper.shadow-heavy .image-item {
    box-shadow:
        3px 6px 10px hsl(var(--shadow-hsl) / 0.32),
        6px 12px 24px hsl(var(--shadow-hsl) / 0.22),
        12px 20px 32px hsl(var(--shadow-hsl) / 0.16);
}

.image-block-wrapper.shadow-vheavy .image-item {
    box-shadow:
        4px 8px 14px hsl(var(--shadow-hsl) / 0.38),
        10px 18px 32px hsl(var(--shadow-hsl) / 0.28),
        18px 30px 48px hsl(var(--shadow-hsl) / 0.20);
}

/* Backward compatibility for old shadow values */
.image-block-wrapper.shadow-mild .image-item {
    box-shadow:
        1px 1px 2px hsl(var(--shadow-hsl) / 0.15),
        2px 2px 4px hsl(var(--shadow-hsl) / 0.10),
        3px 4px 6px hsl(var(--shadow-hsl) / 0.06);
}

.image-block-wrapper.shadow-strong .image-item {
    box-shadow:
        3px 6px 10px hsl(var(--shadow-hsl) / 0.32),
        6px 12px 24px hsl(var(--shadow-hsl) / 0.22),
        12px 20px 32px hsl(var(--shadow-hsl) / 0.16);
}

/* Data Block - Medium Shadow (if missing) */
.data-block-wrapper.shadow-medium .data-card-grid-inner {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

/* Flip Block - Shadow Variations (targets .flip-card-grid-inner) */
.flip-block-wrapper.shadow-none .flip-card-grid-inner {
    box-shadow: none;
}

.flip-block-wrapper.shadow-light .flip-card-grid-inner {
    box-shadow: 
        1px 1px 2px hsl(var(--shadow-hsl) / 0.15),
        2px 2px 4px hsl(var(--shadow-hsl) / 0.10),
        3px 4px 6px hsl(var(--shadow-hsl) / 0.06);
}

.flip-block-wrapper.shadow-moderate .flip-card-grid-inner {
    box-shadow: 
        1px 2px 4px hsl(var(--shadow-hsl) / 0.20),
        2px 4px 10px hsl(var(--shadow-hsl) / 0.14),
        4px 8px 16px hsl(var(--shadow-hsl) / 0.10);
}

.flip-block-wrapper.shadow-medium .flip-card-grid-inner {
    box-shadow: 
        2px 4px 6px hsl(var(--shadow-hsl) / 0.26),
        4px 8px 16px hsl(var(--shadow-hsl) / 0.18),
        8px 12px 22px hsl(var(--shadow-hsl) / 0.14);
}

.flip-block-wrapper.shadow-heavy .flip-card-grid-inner {
    box-shadow: 
        3px 6px 10px hsl(var(--shadow-hsl) / 0.32),
        6px 12px 24px hsl(var(--shadow-hsl) / 0.22),
        12px 20px 32px hsl(var(--shadow-hsl) / 0.16);
}

.flip-block-wrapper.shadow-vheavy .flip-card-grid-inner {
    box-shadow: 
        4px 8px 14px hsl(var(--shadow-hsl) / 0.38),
        10px 18px 32px hsl(var(--shadow-hsl) / 0.28),
        18px 30px 48px hsl(var(--shadow-hsl) / 0.20);
}

/* Backward compatibility for old shadow values */
.flip-block-wrapper.shadow-mild .flip-card-grid-inner {
    box-shadow: 
        1px 1px 2px hsl(var(--shadow-hsl) / 0.15),
        2px 2px 4px hsl(var(--shadow-hsl) / 0.10),
        3px 4px 6px hsl(var(--shadow-hsl) / 0.06);
}

.flip-block-wrapper.shadow-strong .flip-card-grid-inner {
    box-shadow: 
        3px 6px 10px hsl(var(--shadow-hsl) / 0.32),
        6px 12px 24px hsl(var(--shadow-hsl) / 0.22),
        12px 20px 32px hsl(var(--shadow-hsl) / 0.16);
}


/* =============================================
   SLIDESHOW STYLES - Multiple Images
   ============================================= */

/* For slideshows, we need images to stack on top of each other */
.split-card-image.has-slideshow .image-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
}

/* All slideshow images are positioned absolutely within the wrapper */
.split-card-image.has-slideshow .split-card-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    z-index: 1;
    transition: opacity 0.8s ease-in-out;
}

/* The active image is visible */
.split-card-image.has-slideshow .split-card-img.active {
    opacity: 1;
    z-index: 2;
}

/* First image provides the height context (position static to establish flow) */
.split-card-image.has-slideshow .split-card-img:first-child {
    position: relative;
    opacity: 0;
}

/* If first child is also active, show it */
.split-card-image.has-slideshow .split-card-img:first-child.active {
    opacity: 1;
}

/* =============================================
   KEN BURNS ANIMATION
   Starts at 1.2x zoom, eases gently back to selected zoom level
   Respects the image position setting for transform-origin
   ============================================= */

/* Ken Burns images - animation handles the transform */
.split-card-image.ken-burns .split-card-img {
    /* Start at 1.2x (or 1.2 * selected scale if scale is set) */
    animation: splitKenBurns 12s ease-in-out infinite alternate;
    /* transform-origin is set by the position classes above */
}

/* For slideshows with Ken Burns, pause animation on non-active images */
/* This ensures each image starts fresh when it becomes active */
.split-card-image.ken-burns.has-slideshow .split-card-img {
    animation-play-state: paused;
}

/* Only run Ken Burns on the active image in slideshows */
.split-card-image.ken-burns.has-slideshow .split-card-img.active {
    animation-play-state: running;
}

@keyframes splitKenBurns {
    0% { 
        /* Start 20% more zoomed than the target scale */
        transform: scale(calc(var(--img-scale, 1) * 1.2)); 
    }
    100% { 
        /* End at the selected zoom level */
        transform: scale(var(--img-scale, 1)); 
    }
}

/* ==============================================
   IMAGE POSITIONING WITH ZOOM
   When zoomed, the selected position determines which corner/edge stays anchored
   The excess image spills in the opposite direction
   ============================================== */

/* Default: center positioning */
.split-card-image .split-card-img {
    object-position: center center;
    transform-origin: center center;
}

/* Top-left: anchor top-left corner, excess spills to bottom-right */
.split-card-image .image-wrapper[data-position="top-left"] .split-card-img,
.split-card-image .image-wrapper[data-position="tl"] .split-card-img { 
    object-position: left top; 
    transform-origin: left top;
}

/* Top-right: anchor top-right corner, excess spills to bottom-left */
.split-card-image .image-wrapper[data-position="top-right"] .split-card-img,
.split-card-image .image-wrapper[data-position="tr"] .split-card-img { 
    object-position: right top; 
    transform-origin: right top;
}

/* Bottom-left: anchor bottom-left corner, excess spills to top-right */
.split-card-image .image-wrapper[data-position="bottom-left"] .split-card-img,
.split-card-image .image-wrapper[data-position="bl"] .split-card-img { 
    object-position: left bottom; 
    transform-origin: left bottom;
}

/* Bottom-right: anchor bottom-right corner, excess spills to top-left */
.split-card-image .image-wrapper[data-position="bottom-right"] .split-card-img,
.split-card-image .image-wrapper[data-position="br"] .split-card-img { 
    object-position: right bottom; 
    transform-origin: right bottom;
}

/* Center: anchor center, excess spills evenly in all directions */
.split-card-image .image-wrapper[data-position="center"] .split-card-img,
.split-card-image .image-wrapper[data-position="centre"] .split-card-img { 
    object-position: center center; 
    transform-origin: center center;
}

/* Button hover effect when card is hovered (only if card hover enabled) */
/* This makes button fill with color when hovering anywhere on the card */
.split-card:not(.no-hover):hover .split-card-button {
    background-color: var(--button-hover-bg, #1b5137);
    color: white;
    border-color: var(--button-hover-bg, #1b5137);
}

/* When card has no-hover class, only the button itself should show hover */
/* The button's own :hover rule in .split-card-button:hover handles this */

/* Image overlay */
.split-card-image .image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3;
    /* background-color is set inline with rgba for opacity control */
}
.split-card-image .overlay-text {
    font-family: 'Fraunces', serif;
    font-weight: 600;
    font-size: clamp(1rem, 2vw, 1.5rem);
    text-align: center;
    padding: 1rem;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

/* =============================================
   OVERLAY TEXT SIZE VARIANTS
   Applied via .overlay-text-size-{size} on .image-wrapper
   ============================================= */
.split-card-image .image-wrapper.overlay-text-size-xxs  .overlay-text { font-size: 0.75rem; }
.split-card-image .image-wrapper.overlay-text-size-xs   .overlay-text { font-size: 0.875rem; }
.split-card-image .image-wrapper.overlay-text-size-small .overlay-text { font-size: 1rem; }
.split-card-image .image-wrapper.overlay-text-size-medium .overlay-text { font-size: 1.5rem; }
.split-card-image .image-wrapper.overlay-text-size-large  .overlay-text { font-size: 2rem; }
.split-card-image .image-wrapper.overlay-text-size-xl    .overlay-text { font-size: 2.5rem; }
.split-card-image .image-wrapper.overlay-text-size-xxl   .overlay-text { font-size: 3rem; }

/* =============================================
   SECTION BREAK TITLE HOVER TOGGLE
   .no-hover on the animated/simple title wrapper disables mouse reactions
   ============================================= */
.split-animated-title-wrapper.no-hover .title-box,
.split-simple-title-wrapper.no-hover .simple-title-box {
    pointer-events: none;
}

/* Slideshow navigation dots */
.split-card-image .slideshow-dots {
    position: absolute;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 5;
}
.split-card-image .slideshow-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    border: none;
    padding: 0;
    cursor: pointer;
    transition: all 0.3s ease;
}
.split-card-image .slideshow-dot:hover {
    background: rgba(255, 255, 255, 0.8);
}
.split-card-image .slideshow-dot.active {
    background: white;
    transform: scale(1.2);
}

.split-card-text {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

/* =============================================
   FIX 4: IMAGE BLOCK SLIDESHOW DOTS
   ============================================= */

.image-container {
    position: relative; /* Ensure dots can be positioned */
}

.image-container .slideshow-dots {
    position: absolute;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 10;
}

.image-container .slideshow-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    border: 2px solid rgba(255, 255, 255, 0.8);
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0;
    box-sizing: border-box;
}

.image-container .slideshow-dot:hover {
    background: rgba(255, 255, 255, 0.8);
}

.image-container .slideshow-dot.active {
    background: white;
    transform: scale(1.2);
}
/* =============================================
   FIX 5: IMAGE BLOCK SCALE & POSITION
   CSS rules for scale and position weren't targeting image-block
   ============================================= */

/* Base scale using CSS variable */
.image-item .image-wrapper {
    overflow: hidden; /* Ensure scaled images don't overflow */
}

/* Every image fills its frame at the smallest size that covers it
   (object-fit: cover): one dimension fits exactly and the other is cropped
   only as much as needed. The browser keeps this exact at every size, on
   every slide. Position (object-position / transform-origin) and Scale
   (--img-scale) apply on top. This used to be done by JavaScript, which
   sometimes left images at their natural size - a heavy crop on large
   images - when it measured too early or skipped hidden slides. */
.image-item .image-wrapper .block-image {
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(var(--img-scale, 1));
    transition: opacity 0.8s ease-in-out, transform 0.3s ease;
}

/* Position variations for Image Block */
.image-item .image-wrapper[data-position="top-left"] .block-image,
.image-item .image-wrapper[data-position="tl"] .block-image { 
    object-position: left top; 
    transform-origin: left top;
}

.image-item .image-wrapper[data-position="top-right"] .block-image,
.image-item .image-wrapper[data-position="tr"] .block-image { 
    object-position: right top; 
    transform-origin: right top;
}

.image-item .image-wrapper[data-position="bottom-left"] .block-image,
.image-item .image-wrapper[data-position="bl"] .block-image { 
    object-position: left bottom; 
    transform-origin: left bottom;
}

.image-item .image-wrapper[data-position="bottom-right"] .block-image,
.image-item .image-wrapper[data-position="br"] .block-image { 
    object-position: right bottom; 
    transform-origin: right bottom;
}

.image-item .image-wrapper[data-position="center"] .block-image,
.image-item .image-wrapper[data-position="centre"] .block-image { 
    object-position: center center; 
    transform-origin: center center;
}

/* Ken Burns for Image Block */
.image-item .image-wrapper.ken-burns .block-image {
    animation: imageBlockKenBurns 12s ease-in-out infinite alternate;
}

/* Pause Ken Burns on non-active slideshow images */
.image-item.has-slideshow .image-wrapper.slideshow:not(.active) .block-image {
    animation-play-state: paused;
}

/* Run Ken Burns only on active slideshow images */
.image-item.has-slideshow .image-wrapper.slideshow.active .block-image {
    animation-play-state: running;
}

@keyframes imageBlockKenBurns {
    0% { 
        transform: scale(calc(var(--img-scale, 1) * 1.2)); 
    }
    100% { 
        transform: scale(var(--img-scale, 1)); 
    }
}

/* =============================================
   END OF CSS BUG FIXES PATCH
   ============================================= */


   























































































































































.split-card-text h3 {
    color: var(--forest-green);
    font-family: 'Fraunces', serif;
    font-weight: 700;
    margin: 0 0 0.8rem 0;
    line-height: 1.2;
}

/* Heading size variations */
.split-card-text h3.size-xxs { font-size: clamp(0.75rem, 1.5vw, 1rem) !important; }
.split-card-text h3.size-xs { font-size: clamp(0.9rem, 1.8vw, 1.2rem) !important; }
.split-card-text h3.size-small { font-size: clamp(1rem, 2vw, 1.4rem) !important; }
.split-card-text h3.size-medium { font-size: clamp(1.1rem, 2.2vw, 1.6rem) !important; }
.split-card-text h3.size-large { font-size: clamp(1.3rem, 2.5vw, 1.9rem) !important; }
.split-card-text h3.size-xl { font-size: clamp(1.5rem, 3vw, 2.2rem) !important; }
.split-card-text h3.size-xxl { font-size: clamp(1.8rem, 3.5vw, 2.6rem) !important; }

/* Heading alignment */
.split-card-text h3.align-left { text-align: left; }
.split-card-text h3.align-center { text-align: center; }
.split-card-text h3.align-right { text-align: right; }

/* Heading color classes */
.split-card-text h3.text-burgundy { color: #8b2635 !important; }
.split-card-text h3.text-forest-green { color: #1b5137 !important; }
.split-card-text h3.text-emerald-green { color: #059669 !important; }
.split-card-text h3.text-sage-green { color: #8ca280 !important; }
.split-card-text h3.text-tab-blue { color: #4f9aa8 !important; }
.split-card-text h3.text-highlight-orange { color: #e1a038 !important; }
.split-card-text h3.text-rust-red { color: #cc4020 !important; }
.split-card-text h3.text-brick-red { color: #8c1a22 !important; }
.split-card-text h3.text-charcoal { color: #333333 !important; }
.split-card-text h3.text-black { color: #000000 !important; }
.split-card-text h3.text-white { color: #ffffff !important; }

.split-card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    font-size: 1.05rem;
    color: var(--highlight-orange);
    font-family: 'Work Sans', sans-serif;
    font-weight: 500;
}

.split-card-date,
.split-card-read-time {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.split-card-meta svg {
    width: 12px;
    height: 12px;
    fill: var(--highlight-orange);
    flex-shrink: 0;
}

.split-card-text p {
    color: #333;
    font-family: 'Work Sans', sans-serif;
    line-height: 1.4;
    text-align: left;
    margin-bottom: 1rem;
    /* --max-lines set inline per block via PHP; defaults to 4 for old saved blocks */
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: var(--max-lines, 4);
    overflow: hidden;
}

/* Body size variations */
.split-card-text p.size-xxs { font-size: clamp(0.65rem, 0.9vw, 0.75rem) !important; }
.split-card-text p.size-xs { font-size: clamp(0.75rem, 1vw, 0.85rem) !important; }
.split-card-text p.size-small { font-size: clamp(0.8rem, 1.1vw, 0.9rem) !important; }
.split-card-text p.size-medium { font-size: clamp(0.9rem, 1.2vw, 1rem) !important; }
.split-card-text p.size-large { font-size: clamp(1rem, 1.3vw, 1.1rem) !important; }
.split-card-text p.size-xl { font-size: clamp(1.1rem, 1.4vw, 1.25rem) !important; }
.split-card-text p.size-xxl { font-size: clamp(1.25rem, 1.6vw, 1.4rem) !important; }

/* Body alignment */
.split-card-text p.align-left { text-align: left; }
.split-card-text p.align-center { text-align: center; }
.split-card-text p.align-right { text-align: right; }

/* Body color classes */
.split-card-text p.text-burgundy { color: #8b2635 !important; }
.split-card-text p.text-forest-green { color: #1b5137 !important; }
.split-card-text p.text-emerald-green { color: #059669 !important; }
.split-card-text p.text-sage-green { color: #8ca280 !important; }
.split-card-text p.text-tab-blue { color: #4f9aa8 !important; }
.split-card-text p.text-highlight-orange { color: #e1a038 !important; }
.split-card-text p.text-rust-red { color: #cc4020 !important; }
.split-card-text p.text-brick-red { color: #8c1a22 !important; }
.split-card-text p.text-charcoal { color: #333333 !important; }
.split-card-text p.text-black { color: #000000 !important; }
.split-card-text p.text-white { color: #ffffff !important; }

.split-card-button-wrapper {
    margin-top: auto;
    padding-top: 1rem;
    flex-shrink: 0;
}

.split-card-button-wrapper.align-left { text-align: left; }
.split-card-button-wrapper.align-center { text-align: center; }
.split-card-button-wrapper.align-right { text-align: right; }

.split-card-button {
    background: transparent;
    border: 2px solid var(--forest-green);
    color: var(--forest-green);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    display: inline-block;
    align-self: flex-start;
    transition: all 0.3s ease;
}

/* Button hover - only the button itself, uses CSS variable */
.split-card-button:hover {
    background: var(--button-hover-bg, var(--forest-green));
    border-color: var(--button-hover-bg, var(--forest-green));
    color: white;
    transform: translateY(-2px);
}

/* Button size variants */
.split-card-button.size-xxs {
    font-size: 0.65rem;
    padding: 0.25rem 0.5rem;
}

.split-card-button.size-xs {
    font-size: 0.75rem;
    padding: 0.3rem 0.6rem;
}

.split-card-button.size-small {
    font-size: 0.85rem;
    padding: 0.4rem 0.8rem;
}

.split-card-button.size-medium {
    font-size: 1rem;
    padding: 0.5rem 1rem;
}

.split-card-button.size-large {
    font-size: 1.15rem;
    padding: 0.6rem 1.2rem;
}

/* Button text color variants (also controls border) */
.split-card-button.text-burgundy { color: var(--burgundy); border-color: var(--burgundy); }
.split-card-button.text-forest-green { color: var(--forest-green); border-color: var(--forest-green); }
.split-card-button.text-emerald-green { color: var(--emerald-green); border-color: var(--emerald-green); }
.split-card-button.text-sage-green { color: var(--sage-green); border-color: var(--sage-green); }
.split-card-button.text-tab-blue { color: var(--tab-blue); border-color: var(--tab-blue); }
.split-card-button.text-highlight-orange { color: var(--highlight-orange); border-color: var(--highlight-orange); }
.split-card-button.text-rust-red { color: var(--rust-red); border-color: var(--rust-red); }
.split-card-button.text-brick-red { color: var(--brick-red); border-color: var(--brick-red); }
.split-card-button.text-charcoal { color: var(--charcoal); border-color: var(--charcoal); }
.split-card-button.text-black { color: #000; border-color: #000; }
.split-card-button.text-white { color: #fff; border-color: #fff; }

/* Button background color variants */
.split-card-button.bg-burgundy { background: var(--burgundy) !important; border-color: var(--burgundy) !important; color: #fff !important; }
.split-card-button.bg-forest-green { background: var(--forest-green) !important; border-color: var(--forest-green) !important; color: #fff !important; }
.split-card-button.bg-emerald-green { background: var(--emerald-green) !important; border-color: var(--emerald-green) !important; color: #fff !important; }
.split-card-button.bg-sage-green { background: var(--sage-green) !important; border-color: var(--sage-green) !important; color: #fff !important; }
.split-card-button.bg-tab-blue { background: var(--tab-blue) !important; border-color: var(--tab-blue) !important; color: #fff !important; }
.split-card-button.bg-highlight-orange { background: var(--highlight-orange) !important; border-color: var(--highlight-orange) !important; color: #fff !important; }
.split-card-button.bg-rust-red { background: var(--rust-red) !important; border-color: var(--rust-red) !important; color: #fff !important; }
.split-card-button.bg-brick-red { background: var(--brick-red) !important; border-color: var(--brick-red) !important; color: #fff !important; }
.split-card-button.bg-charcoal { background: var(--charcoal) !important; border-color: var(--charcoal) !important; color: #fff !important; }
.split-card-button.bg-black { background: #000 !important; border-color: #000 !important; color: #fff !important; }
.split-card-button.bg-white { background: #fff !important; border-color: #fff !important; color: var(--charcoal) !important; }
.split-card-button.bg-transparent { background: transparent !important; }

/* Button hover background color variants */
.split-card-button.hover-bg-burgundy:hover { background: var(--burgundy); border-color: var(--burgundy); color: white; }
.split-card-button.hover-bg-forest-green:hover { background: var(--forest-green); border-color: var(--forest-green); color: white; }
.split-card-button.hover-bg-emerald-green:hover { background: var(--emerald-green); border-color: var(--emerald-green); color: white; }
.split-card-button.hover-bg-sage-green:hover { background: var(--sage-green); border-color: var(--sage-green); color: white; }
.split-card-button.hover-bg-tab-blue:hover { background: var(--tab-blue); border-color: var(--tab-blue); color: white; }
.split-card-button.hover-bg-highlight-orange:hover { background: var(--highlight-orange); border-color: var(--highlight-orange); color: white; }
.split-card-button.hover-bg-rust-red:hover { background: var(--rust-red); border-color: var(--rust-red); color: white; }
.split-card-button.hover-bg-brick-red:hover { background: var(--brick-red); border-color: var(--brick-red); color: white; }
.split-card-button.hover-bg-charcoal:hover { background: var(--charcoal); border-color: var(--charcoal); color: white; }
.split-card-button.hover-bg-black:hover { background: #000; border-color: #000; color: white; }
.split-card-button.hover-bg-white:hover { background: #fff; border-color: #fff; color: var(--charcoal); }

/* ========================================
   SPLIT CARD BADGE STYLES
   ======================================== */

.split-card {
    position: relative; /* Ensure badge positioning works */
}

.split-card-badge {
    position: absolute;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

/* Badge positioning */
.split-card-badge.badge-pos-tl {
    top: 0.75rem;
    left: 0.75rem;
}

.split-card-badge.badge-pos-tr {
    top: 0.75rem;
    right: 0.75rem;
}

.split-card-badge.badge-pos-bl {
    bottom: 0.75rem;
    left: 0.75rem;
}

.split-card-badge.badge-pos-br {
    bottom: 0.75rem;
    right: 0.75rem;
}

.split-card-badge.badge-pos-centre {
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

/* Badge sizing - based on card width */
/* Medium is 25% of card width (1/4), Small is 0.8x, Large is 1.2x */
.split-card-badge.badge-size-small {
    width: calc(25% * 0.8);
    height: auto;
    max-width: 80px;
}

.split-card-badge.badge-size-medium {
    width: 25%;
    height: auto;
    max-width: 100px;
}

.split-card-badge.badge-size-large {
    width: calc(25% * 1.2);
    height: auto;
    max-width: 120px;
}

/* Badge image styling */
.split-card-badge img {
    width: 100%;
    height: auto;
    object-fit: contain;
    display: block;
}

/* Badge SVG styling */
.split-card-badge svg {
    width: 100%;
    height: auto;
    display: block;
}

/* Badge drop shadow for visibility */
.split-card-badge img,
.split-card-badge svg {
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

/* Responsive badge sizing */
@media (max-width: 768px) {
    .split-card-badge.badge-size-small {
        width: calc(30% * 0.8);
        max-width: 60px;
    }
    
    .split-card-badge.badge-size-medium {
        width: 30%;
        max-width: 75px;
    }
    
    .split-card-badge.badge-size-large {
        width: calc(30% * 1.2);
        max-width: 90px;
    }
    
    .split-card-badge.badge-pos-tl,
    .split-card-badge.badge-pos-tr,
    .split-card-badge.badge-pos-bl,
    .split-card-badge.badge-pos-br {
        top: 0.5rem;
        left: 0.5rem;
        right: auto;
        bottom: auto;
    }
    
    .split-card-badge.badge-pos-tr {
        left: auto;
        right: 0.5rem;
    }
    
    .split-card-badge.badge-pos-bl {
        top: auto;
        bottom: 0.5rem;
    }
    
    .split-card-badge.badge-pos-br {
        top: auto;
        left: auto;
        right: 0.5rem;
        bottom: 0.5rem;
    }
}

/* ========================================
   TEXT BLOCK
   ======================================== */

.text-block-wrapper {
    display: grid;
    gap: var(--block-spacing);
    margin-bottom: var(--block-spacing);
}

/* ── Desktop vs Mobile wrapper visibility ───────────────────────────────── */
.text-block-wrapper.text-desktop { display: grid; }
.text-block-wrapper.text-mobile  { display: none; }

@media (max-width: 768px) {
    .text-block-wrapper.text-desktop { display: none; }
    .text-block-wrapper.text-mobile  { display: grid; }
}

.text-block-wrapper.columns-1 {
    grid-template-columns: 1fr;
}

.text-block-wrapper.columns-2 {
    grid-template-columns: 1fr 1fr;
}

.text-block-wrapper.columns-3 {
    grid-template-columns: 1fr 1fr 1fr;
}

.text-block-wrapper.columns-4 {
    grid-template-columns: 1fr 1fr 1fr 1fr;
}

/* TEXT BLOCK SPACING VARIATIONS */
.text-block-wrapper.spacing-slimline {
    margin-top: 10px;
    margin-bottom: 10px;
}

.text-block-wrapper.spacing-slimline .text-content-box {
    padding: 1.2rem;
}

.text-block-wrapper.spacing-normal {
    margin-top: 20px;
    margin-bottom: 20px;
}

.text-block-wrapper.spacing-normal .text-content-box {
    padding: 1.5rem;
}

.text-block-wrapper.spacing-medium {
    margin-top: 30px;
    margin-bottom: 30px;
}

.text-block-wrapper.spacing-medium .text-content-box {
    padding: 2rem;
}

.text-block-wrapper.spacing-larger {
    margin-top: 40px;
    margin-bottom: 40px;
}

.text-block-wrapper.spacing-larger .text-content-box {
    padding: 2.5rem;
}

.text-block-wrapper.spacing-spacious {
    margin-top: 50px;
    margin-bottom: 50px;
}

.text-block-wrapper.spacing-spacious .text-content-box {
    padding: 3rem;
}

.text-block-wrapper.spacing-very-spacious {
    margin-top: 60px;
    margin-bottom: 60px;
}

.text-block-wrapper.spacing-very-spacious .text-content-box {
    padding: 3.5rem;
}

/* Mobile adjustments for text-block spacing */
@media (max-width: 768px) {
    .text-block-wrapper.spacing-slimline { margin-top: 8px; margin-bottom: 8px; }
    .text-block-wrapper.spacing-normal { margin-top: 15px; margin-bottom: 15px; }
    .text-block-wrapper.spacing-medium { margin-top: 22px; margin-bottom: 22px; }
    .text-block-wrapper.spacing-larger { margin-top: 30px; margin-bottom: 30px; }
    .text-block-wrapper.spacing-spacious { margin-top: 38px; margin-bottom: 38px; }
    .text-block-wrapper.spacing-very-spacious { margin-top: 45px; margin-bottom: 45px; }
    
    .text-block-wrapper.spacing-slimline .text-content-box { padding: 1rem; }
    .text-block-wrapper.spacing-normal .text-content-box { padding: 1.2rem; }
    .text-block-wrapper.spacing-medium .text-content-box { padding: 1.5rem; }
    .text-block-wrapper.spacing-larger .text-content-box { padding: 1.8rem; }
    .text-block-wrapper.spacing-spacious .text-content-box { padding: 2.2rem; }
    .text-block-wrapper.spacing-very-spacious .text-content-box { padding: 2.5rem; }
}

@media (max-width: 480px) {
    .text-block-wrapper.spacing-slimline { margin-top: 6px; margin-bottom: 6px; }
    .text-block-wrapper.spacing-normal { margin-top: 12px; margin-bottom: 12px; }
    .text-block-wrapper.spacing-medium { margin-top: 18px; margin-bottom: 18px; }
    .text-block-wrapper.spacing-larger { margin-top: 24px; margin-bottom: 24px; }
    .text-block-wrapper.spacing-spacious { margin-top: 30px; margin-bottom: 30px; }
    .text-block-wrapper.spacing-very-spacious { margin-top: 36px; margin-bottom: 36px; }
    
    .text-block-wrapper.spacing-slimline .text-content-box { padding: 0.8rem; }
    .text-block-wrapper.spacing-normal .text-content-box { padding: 1rem; }
    .text-block-wrapper.spacing-medium .text-content-box { padding: 1.2rem; }
    .text-block-wrapper.spacing-larger .text-content-box { padding: 1.5rem; }
    .text-block-wrapper.spacing-spacious .text-content-box { padding: 1.8rem; }
    .text-block-wrapper.spacing-very-spacious .text-content-box { padding: 2rem; }
}

.text-content-box {
    padding: 2rem;
    border-radius: 20px;
    box-shadow: 0 8px 24px rgba(6, 39, 53, 0.25);
}

.full-width .text-content-box {
    border-radius: 0;
}

.text-box-heading {
    font-family: 'Fraunces', serif;
    font-weight: 700;
    margin: 0;
}

/* Heading sizes - comprehensive */
.text-box-heading.heading-xxs { font-size: clamp(0.9rem, 1.5vw, 1.2rem) !important; }
.text-box-heading.heading-xs { font-size: clamp(1.1rem, 1.8vw, 1.5rem) !important; }
.text-box-heading.heading-small { font-size: clamp(1.3rem, 2vw, 1.7rem) !important; }
.text-box-heading.heading-medium { font-size: clamp(1.5rem, 2.5vw, 1.8rem) !important; }
.text-box-heading.heading-normal { font-size: 1.8rem; }
.text-box-heading.heading-large { font-size: clamp(1.8rem, 3vw, 2.2rem) !important; }
.text-box-heading.heading-xl { font-size: clamp(2.1rem, 3.5vw, 2.5rem) !important; }
.text-box-heading.heading-xxl { font-size: clamp(2.5rem, 4vw, 3rem) !important; }

/* Text block heading mobile sizes */
@media (max-width: 768px) {
    .text-box-heading.heading-xxs    { font-size: clamp(0.54rem, 0.9vw, 0.72rem) !important; }
    .text-box-heading.heading-xs     { font-size: clamp(0.66rem, 1.08vw, 0.9rem) !important; }
    .text-box-heading.heading-small  { font-size: clamp(0.78rem, 1.2vw, 1.02rem) !important; }
    .text-box-heading.heading-medium { font-size: clamp(0.9rem, 1.5vw, 1.08rem) !important; }
    .text-box-heading.heading-normal { font-size: 1.08rem !important; }
    .text-box-heading.heading-large  { font-size: clamp(1.08rem, 1.8vw, 1.32rem) !important; }
    .text-box-heading.heading-xl     { font-size: clamp(1.26rem, 2.1vw, 1.5rem) !important; }
    .text-box-heading.heading-xxl    { font-size: clamp(1.5rem, 2.4vw, 1.8rem) !important; }
}

@media (max-width: 480px) {
    .text-box-heading.heading-xxs    { font-size: clamp(0.54rem, 0.9vw, 0.72rem) !important; }
    .text-box-heading.heading-xs     { font-size: clamp(0.66rem, 1.08vw, 0.9rem) !important; }
    .text-box-heading.heading-small  { font-size: clamp(0.78rem, 1.2vw, 1.02rem) !important; }
    .text-box-heading.heading-medium { font-size: clamp(0.9rem, 1.5vw, 1.08rem) !important; }
    .text-box-heading.heading-normal { font-size: 1.08rem !important; }
    .text-box-heading.heading-large  { font-size: clamp(1.08rem, 1.8vw, 1.32rem) !important; }
    .text-box-heading.heading-xl     { font-size: clamp(1.26rem, 2.1vw, 1.5rem) !important; }
    .text-box-heading.heading-xxl    { font-size: clamp(1.5rem, 2.4vw, 1.8rem) !important; }
}

/* Selector restored - it had been lost, leaving a stray "}" that made
   browsers discard the .align-center rule below. */
.text-box-heading.align-left {
    text-align: left;
}

.text-box-heading.align-center {
    text-align: center;
}

.text-box-heading.align-right {
    text-align: right;
}

.text-box-content {
    font-family: 'Work Sans', sans-serif;
    line-height: 1.6;
}

/* Prevent wpautop trailing empty paragraphs from adding bottom space */
.text-box-content > p:last-child,
.text-box-content > p:empty,
.text-box-content > *:last-child { margin-bottom: 0; padding-bottom: 0; }
.text-box-content > p:empty { display: none; }

/* Selector restored (same issue as .text-box-heading.align-left above) */
.text-box-content.align-left {
    text-align: left;
}

.text-box-content.align-center {
    text-align: center;
}

.text-box-content.align-right {
    text-align: right;
}

/* Body font sizes - comprehensive */
.text-content-box.font-xxs .text-box-content { font-size: clamp(0.65rem, 0.9vw, 0.75rem) !important; }
.text-content-box.font-xs .text-box-content { font-size: clamp(0.75rem, 1vw, 0.85rem) !important; }
.text-content-box.font-small .text-box-content { font-size: clamp(0.85rem, 1.1vw, 0.9rem) !important; }
.text-content-box.font-medium .text-box-content { font-size: clamp(0.95rem, 1.2vw, 1rem) !important; }
.text-content-box.font-normal .text-box-content { font-size: 1rem; }
.text-content-box.font-large .text-box-content { font-size: clamp(1.05rem, 1.3vw, 1.1rem) !important; }
.text-content-box.font-xl .text-box-content { font-size: clamp(1.15rem, 1.4vw, 1.25rem) !important; }
.text-content-box.font-xxl .text-box-content { font-size: clamp(1.3rem, 1.6vw, 1.4rem) !important; }

.text-box-content p {
    margin: 0 0 1rem 0;
}

.text-box-content p:last-child {
    margin-bottom: 0;
}

.text-block-action {
    margin-top: 1.5rem;
}

.text-block-action.align-left {
    text-align: left;
}

.text-block-action.align-center {
    text-align: center;
}

.text-block-action.align-right {
    text-align: right;
}

.text-block-button {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 600;
    font-family: 'Work Sans', sans-serif;
    transition: all 0.3s ease;
    border: 2px solid;
    cursor: pointer;
}

/* Light background button styles */
.text-content-box.bg-white .text-block-button,
.text-content-box.bg-sage-green .text-block-button,
.text-content-box.bg-highlight-orange .text-block-button,
.text-content-box.bg-transparent .text-block-button {
    background: white;
    color: #1b5137;
    border-color: #1b5137;
}

.text-content-box.bg-white .text-block-button:hover,
.text-content-box.bg-sage-green .text-block-button:hover,
.text-content-box.bg-highlight-orange .text-block-button:hover,
.text-content-box.bg-transparent .text-block-button:hover {
    background: #e1a038;
    color: white;
    border-color: #e1a038;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* Dark background button styles */
.text-content-box.bg-burgundy .text-block-button,
.text-content-box.bg-forest-green .text-block-button,
.text-content-box.bg-emerald-green .text-block-button,
.text-content-box.bg-tab-blue .text-block-button,
.text-content-box.bg-rust-red .text-block-button,
.text-content-box.bg-brick-red .text-block-button,
.text-content-box.bg-charcoal .text-block-button,
.text-content-box.bg-black .text-block-button {
    background: transparent;
    color: white;
    border-color: white;
}

.text-content-box.bg-burgundy .text-block-button:hover,
.text-content-box.bg-forest-green .text-block-button:hover,
.text-content-box.bg-emerald-green .text-block-button:hover,
.text-content-box.bg-tab-blue .text-block-button:hover,
.text-content-box.bg-rust-red .text-block-button:hover,
.text-content-box.bg-brick-red .text-block-button:hover,
.text-content-box.bg-charcoal .text-block-button:hover,
.text-content-box.bg-black .text-block-button:hover {
    background: #e1a038;
    color: white;
    border-color: #e1a038;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}

/* Button row - up to 3 buttons side by side beneath all the text boxes,
   shared by the whole block (not per-box, see render_button_row() in
   text-block.php). Each button carries its own explicit background/text
   colour inline (set in PHP), since - unlike .text-block-button above -
   this row has no single .text-content-box background to auto-contrast
   against. */
.text-block-button-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

.text-block-button-row.align-left    { justify-content: flex-start; }
.text-block-button-row.align-center  { justify-content: center; }
.text-block-button-row.align-right   { justify-content: flex-end; }

.text-block-row-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 600;
    font-family: 'Work Sans', sans-serif;
    transition: all 0.3s ease;
    border: 2px solid;
    cursor: pointer;
}

.text-block-row-button:hover {
    filter: brightness(1.1);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* Stack vertically, full width, on mobile - as requested. */
@media (max-width: 640px) {
    .text-block-button-row {
        flex-direction: column;
        align-items: stretch;
    }
    .text-block-row-button {
        width: 100%;
    }
}

/* ========================================
   VIDEO BLOCK
   ======================================== */

.video-block-wrapper {
    position: relative;

    width: 100vw;
    margin-left: calc(-50vw + 50%);
    margin-bottom: var(--block-spacing);
}

.video-container {
    position: relative;
    width: 100%;
    aspect-ratio: 16/9;
    background: #000;
    overflow: hidden;
}

.video-container video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.video-placeholder {
    position: absolute;
    display: flex;
    inset: 0;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #333;
    color: white;
    gap: 1rem;
}

.video-placeholder svg {
    width: 100px;
    height: 100px;
    fill: white;
    opacity: 0.6;
}

.video-placeholder p {
    font-family: 'Work Sans', sans-serif;
    font-size: 0.9rem;
    opacity: 0.8;
    margin: 0;
}

/* Subtitle base styles */
.video-subtitle {
    position: absolute;
    left: 0;
    right: 0;
    max-width: 100%;
    /* width removed - left:0 + right:0 handles full width */
    padding: 1.5rem 2rem;
    font-family: 'Fraunces', serif;
    font-weight: 700;
    text-align: center;
    line-height: 1.3;
    opacity: 0;
    transition: opacity 0.8s cubic-bezier(0.65, 0, 0.35, 1), transform 0.8s cubic-bezier(0.65, 0, 0.35, 1);
    z-index: 5;
    box-sizing: border-box;
    overflow: hidden;
    word-wrap: break-word;
}

/* Position variants */
.video-subtitle.subtitle-bottom {
    bottom: 0;
    transform: translateY(100%);
}

.video-subtitle.subtitle-top {
    top: 0;
    transform: translateY(-100%);
}

.video-subtitle.subtitle-center {
    top: 50%;
    transform: translateY(-50%);
    opacity: 0;
}

/* Font size variants */
.video-subtitle.subtitle-size-small {
    font-size: clamp(0.9rem, 2vw, 1.2rem);
}

.video-subtitle.subtitle-size-normal {
    font-size: clamp(1.1rem, 2.5vw, 1.8rem);
}

.video-subtitle.subtitle-size-large {
    font-size: clamp(1.4rem, 3vw, 2.2rem);
}

.video-subtitle.subtitle-size-xl {
    font-size: clamp(1.8rem, 4vw, 2.8rem);
}

/* Text alignment variants */
.video-subtitle.subtitle-align-left {
    text-align: left !important;
}

.video-subtitle.subtitle-align-center {
    text-align: center !important;
}

.video-subtitle.subtitle-align-right {
    text-align: right !important;
}

/* Static positioning */
.video-subtitle.subtitle-static {
    position: absolute;
}

.video-subtitle.subtitle-static.subtitle-bottom {
    bottom: 0;
    transform: translateY(0);
}

.video-subtitle.subtitle-static.subtitle-top {
    top: 0;
    transform: translateY(0);
}

.video-subtitle.subtitle-static.subtitle-center {
    top: 50%;
    transform: translateY(-50%);
}

/* Floating positioning (default - animates in) */
.video-subtitle.subtitle-floating {
    position: absolute;
    /* width removed - inherits from base .video-subtitle */
}

.video-subtitle.subtitle-floating.subtitle-bottom {
    bottom: 0;
}

.video-subtitle.subtitle-floating.subtitle-top {
    top: 0;
}

.video-subtitle.subtitle-floating.subtitle-center {
    top: 50%;
}

/* Animated in state */
.video-subtitle.animate-in {
    opacity: 1;
}

.video-subtitle.subtitle-bottom.animate-in {
    transform: translateY(0);
}

.video-subtitle.subtitle-top.animate-in {
    transform: translateY(0);
}

.video-subtitle.subtitle-center.animate-in {
    transform: translateY(-50%);
    opacity: 1;
}

.video-subtitle h2 {
    white-space: normal;
    font-size: inherit;
    margin: 0;
    font-weight: inherit;
    color: inherit !important;
}

/* Fullscreen button */
.fullscreen-button {
    position: absolute;
    top: 15px;
    right: 25px;
    width: 40px;
    height: 40px;
    background: rgba(0, 0, 0, 0.6);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10;
    opacity: 0;
    visibility: hidden;
}

.video-container:hover .fullscreen-button {
    opacity: 1;
    visibility: visible;
}

/* Touch devices never trigger :hover, so the button above was permanently
   opacity:0 / visibility:hidden on mobile and tablet - meaning it wasn't just
   invisible, it was un-tappable. Show it unconditionally wherever there's no
   real hover capability. */
@media (hover: none) {
    .fullscreen-button {
        opacity: 1;
        visibility: visible;
    }
}

.fullscreen-button:hover {
    transform: scale(1.1);
    background: rgba(0, 0, 0, 0.8);
}

.fullscreen-button svg {
    width: 20px;
    height: 20px;
    fill: white;
}

/* Fullscreen mode */
.video-container:fullscreen,
.video-container:-webkit-full-screen,
.video-container:-moz-full-screen {
    width: 100vw;
    height: 100vh;
    aspect-ratio: auto;
}

.video-container:fullscreen .fullscreen-button,
.video-container:-webkit-full-screen .fullscreen-button,
.video-container:-moz-full-screen .fullscreen-button {
    opacity: 1;
    visibility: visible;
}

/* ========================================
   VIDEO BLOCK - ASPECT RATIOS
   ======================================== */

/* Super-wide landscape */
.video-block-wrapper.aspect-16-1 .video-container { aspect-ratio: 16/1; }
.video-block-wrapper.aspect-14-1 .video-container { aspect-ratio: 14/1; }
.video-block-wrapper.aspect-12-1 .video-container { aspect-ratio: 12/1; }
.video-block-wrapper.aspect-10-1 .video-container { aspect-ratio: 10/1; }
.video-block-wrapper.aspect-8-1 .video-container { aspect-ratio: 8/1; }
.video-block-wrapper.aspect-6-1 .video-container { aspect-ratio: 6/1; }
.video-block-wrapper.aspect-5-1 .video-container { aspect-ratio: 5/1; }
.video-block-wrapper.aspect-4-1 .video-container { aspect-ratio: 4/1; }
.video-block-wrapper.aspect-3-1 .video-container { aspect-ratio: 3/1; }
.video-block-wrapper.aspect-32-9 .video-container { aspect-ratio: 32/9; }
.video-block-wrapper.aspect-21-9 .video-container { aspect-ratio: 21/9; }
.video-block-wrapper.aspect-2-1 .video-container { aspect-ratio: 2/1; }

/* Standard */
.video-block-wrapper.aspect-16-9 .video-container { aspect-ratio: 16/9; }
.video-block-wrapper.aspect-5-4 .video-container { aspect-ratio: 5/4; }
.video-block-wrapper.aspect-4-3 .video-container { aspect-ratio: 4/3; }
.video-block-wrapper.aspect-3-2 .video-container { aspect-ratio: 3/2; }
.video-block-wrapper.aspect-1-1 .video-container { aspect-ratio: 1/1; }

/* Portrait */
.video-block-wrapper.aspect-2-3 .video-container { aspect-ratio: 2/3; }
.video-block-wrapper.aspect-3-4 .video-container { aspect-ratio: 3/4; }
.video-block-wrapper.aspect-4-5 .video-container { aspect-ratio: 4/5; }
.video-block-wrapper.aspect-9-16 .video-container { aspect-ratio: 9/16; }

/* ========================================
   VIDEO BLOCK - SHADOW STRENGTHS
   ======================================== */

.video-block-wrapper.shadow-none .video-container {
    box-shadow: none;
}

.video-block-wrapper.shadow-light .video-container {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.video-block-wrapper.shadow-moderate .video-container {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.video-block-wrapper.shadow-medium .video-container {
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.video-block-wrapper.shadow-heavy .video-container {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
}

.video-block-wrapper.shadow-vheavy .video-container {
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.35);
}

/* ========================================
   VIDEO BLOCK - V-GAP (VERTICAL SPACING)
   ======================================== */

.video-block-wrapper.v-gap-none {
    margin-top: 0;
    margin-bottom: 0;
}

.video-block-wrapper.v-gap-narrow {
    margin-top: 1rem;
    margin-bottom: 1rem;
}

.video-block-wrapper.v-gap-normal {
    margin-top: 2rem;
    margin-bottom: 2rem;
}

.video-block-wrapper.v-gap-wide {
    margin-top: 3rem;
    margin-bottom: 3rem;
}

.video-block-wrapper.v-gap-spacious {
    margin-top: 4rem;
    margin-bottom: 4rem;
}

/* When this video opens its own section break, the section's own top-spacing
   (and title-gap, when a title is present) setting is meant to be the sole
   control for the space above it. Without this, the block's regular v-gap
   top margin stacks on top of the section padding, and the section's
   background overlay is visible through that extra margin even when top/
   title spacing are set to 0. */
.video-block-wrapper.section-break-first {
    margin-top: 0 !important;
}

/* ========================================
   VIDEO BLOCK - BADGE OVERLAY
   ======================================== */

.video-badge {
    position: absolute;
    z-index: 6;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.video-badge img,
.video-badge svg {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.video-badge svg {
    fill: var(--badge-color, #ffffff);
}

/* Badge sizes */
.video-badge.badge-small {
    width: 40px;
    height: 40px;
}

.video-badge.badge-medium {
    width: 60px;
    height: 60px;
}

.video-badge.badge-large {
    width: 80px;
    height: 80px;
}

.video-badge.badge-xl {
    width: 120px;
    height: 120px;
}

/* Badge positions */
.video-badge.badge-position-tl {
    top: 15px;
    left: 15px;
}

.video-badge.badge-position-tr {
    top: 15px;
    right: 70px; /* Offset for fullscreen button */
}

.video-badge.badge-position-bl {
    bottom: 80px; /* Offset for subtitle */
    left: 15px;
}

.video-badge.badge-position-br {
    bottom: 80px; /* Offset for subtitle */
    right: 15px;
}

.video-badge.badge-position-tc {
    top: 15px;
    left: 50%;
    transform: translateX(-50%);
}

.video-badge.badge-position-bc {
    bottom: 80px; /* Offset for subtitle */
    left: 50%;
    transform: translateX(-50%);
}

/* ========================================
   VIDEO BLOCK - SUBTITLE FONT WEIGHTS
   ======================================== */

.video-subtitle.subtitle-weight-300 { font-weight: 300; }
.video-subtitle.subtitle-weight-300 h2 { font-weight: 300; }

.video-subtitle.subtitle-weight-400 { font-weight: 400; }
.video-subtitle.subtitle-weight-400 h2 { font-weight: 400; }

.video-subtitle.subtitle-weight-500 { font-weight: 500; }
.video-subtitle.subtitle-weight-500 h2 { font-weight: 500; }

.video-subtitle.subtitle-weight-600 { font-weight: 600; }
.video-subtitle.subtitle-weight-600 h2 { font-weight: 600; }

.video-subtitle.subtitle-weight-700 { font-weight: 700; }
.video-subtitle.subtitle-weight-700 h2 { font-weight: 700; }

.video-subtitle.subtitle-weight-800 { font-weight: 800; }
.video-subtitle.subtitle-weight-800 h2 { font-weight: 800; }

/* ========================================
   VIDEO BLOCK - SIMPLE TITLE STYLE
   ======================================== */

.video-simple-title-wrapper {
    width: 100%;
}

.video-simple-title-wrapper .simple-title-box {
    width: 100%;
    padding: 0.75rem 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.video-simple-title-wrapper .simple-title-text {
    font-family: 'Work Sans', sans-serif;
    font-size: clamp(1rem, 2vw, 1.5rem);
    font-weight: 700;
    color: #ffffff;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ========================================
   5. RESPONSIVE BREAKPOINTS
   ======================================== */

@media (max-width: 1200px) {
    .image-block-wrapper.columns-4,
    .text-block-wrapper.columns-4,
    .split-block-wrapper.columns-4,
    .flip-block-wrapper.columns-4,
    .download-block-wrapper.layout-grid.columns-4,
    .data-grid.columns-4 {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .carousel-prev {
        left: 10px;
    }
    
    .carousel-next {
        right: 10px;
    }
}

@media (max-width: 900px) {

    /* Title box responsive behavior - remove all width constraints */
    .title-box {
        padding: calc(var(--base-spacing, 1.5rem) * 0.7) calc(var(--base-spacing, 1.5rem) * 0.9);
    }

    .accordion-block-wrapper.columns-3 {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .image-block-wrapper.columns-3,
    .frame-block-wrapper.columns-3,
    .text-block-wrapper.columns-3,
    .split-block-wrapper.columns-3,
    .flip-block-wrapper.columns-3,
    .download-block-wrapper.layout-grid.columns-3,
    .download-block-wrapper.layout-grid.columns-4,
    .data-grid.columns-3,
    .data-grid.columns-4 {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .download-block-wrapper.columns-2 {
        grid-template-columns: 1fr;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .title-content {
        font-size: clamp(28px, 5vw, 40px); /* Fluid scaling */
        line-height: 1.25;
        white-space: normal; /* Allow wrapping */
        word-break: break-word;
        /* Reduce the left offset — on desktop -5%-20px works but on mobile
           it pushes bar off-screen left and circles off-screen right */
        left: calc(-1% - 4px);
    }

    /* Reduce bar margin to match the smaller content offset */
    .line-static,
    .line-animated {
        margin-left: -14px;
    }

    /* Reduce circle margin so they sit snugly right of text, not floating far right */
    .circle-1,
    .circle-2 {
        margin-left: 10px; /* resting position before animation */
    }
}

@media (max-width: 768px) {
    :root {
        --block-spacing: 0.5rem;
        --base-spacing: 1.5rem;
    }
    
    .accordion-block-wrapper.columns-2,
    .accordion-block-wrapper.columns-3 {
        grid-template-columns: 1fr;
    }
    
    .accordion-header {
        padding: 0.875rem 1rem;
    }
    
    .accordion-inner {
        padding: 1rem;
    }
    
    .image-block-wrapper.columns-2,
    .image-block-wrapper.columns-3,
    .image-block-wrapper.columns-4,
    .frame-block-wrapper.columns-2,
    .frame-block-wrapper.columns-3,
    .text-block-wrapper.columns-2,
    .text-block-wrapper.columns-3,
    .text-block-wrapper.columns-4,
    .split-block-wrapper.columns-2,
    .split-block-wrapper.columns-3,
    .split-block-wrapper.columns-4,
    .flip-block-wrapper.columns-2,
    .flip-block-wrapper.columns-3,
    .flip-block-wrapper.columns-4,
    .download-block-wrapper.layout-grid,
    .data-grid.columns-2,
    .data-grid.columns-3,
    .data-grid.columns-4 {
        grid-template-columns: 1fr;
    }
    
    .text-content-box {
        padding: 1.5rem;
    }
    
    .text-box-heading {
        font-size: 1.5rem !important;
    }
    
    .video-subtitle {
        font-size: 1rem;
        padding: 1rem 1.5rem;
    }
    
    .fullscreen-button {
        width: 36px;
        height: 36px;
        right: 15px;
        top: 10px;
    }
    
    .fullscreen-button svg {
        width: 18px;
        height: 18px;
    }
    
    .frame-placeholder svg {
        width: 60px;
        height: 60px;
    }
    
    .split-card {
        flex-direction: row !important;
        min-height: 200px;
        aspect-ratio: auto !important;
    }
    
    .split-card-text {
        padding: 1rem;
    }
    
    .flip-card-back {
        flex-direction: column;
    }
    
    .flip-card-back-image {
        width: 100%;
        height: 200px;
        flex: 0 0 200px;
    }
    
    body > .flip-card-inner {
        width: 95vw;
        height: auto;
        max-height: 90vh;
    }
    
    .download-item {
        padding: 1rem 1.25rem;
    }
    
    .download-item.icon-size-large .download-icon,
    .download-item.icon-size-xl .download-icon {
        width: 48px;
        height: 48px;
    }
    
    .download-item.icon-size-large .download-icon svg,
    .download-item.icon-size-xl .download-icon svg {
        width: 28px;
        height: 28px;
    }
    
    .data-card {
        padding: 1.5rem;
    }
    
    .data-card-hero {
        aspect-ratio: 1/1;
        min-height: auto;
    }
    
    .stat-modal-content {
        padding: 1.5rem;
    }
    
    blockquote.style1,
    blockquote.style2 {
        padding: 1.5rem 1rem;
    }
    
    blockquote:before {
        font-size: 3rem;
        left: -5px;
    }
    
    blockquote:after {
        font-size: 3rem;
        right: 10px;
    }
    
    .quote-info-icon {
        width: 28px;
        height: 28px;
        top: 10px;
        right: 10px;
    }
    
    .quote-modal-content {
        padding: 1.5rem;
        width: 95%;
    }
    
    .carousel-nav {
        width: 40px;
        height: 40px;
    }
    
    .carousel-nav svg {
        width: 24px;
        height: 24px;
    }
    
    .carousel-prev {
        left: 5px;
    }
    
    .carousel-next {
        right: 5px;
    }
    
    .indicator-dot {
        width: 10px;
        height: 10px;
    }
    
    .indicator-dot.active {
        width: 24px;
    }
    
    /* Inspirational block mobile */
    .inspirational-block-wrapper {
        flex-direction: column;
        gap: 20px;
    }
    
    .columns-2 .inspirational-column {
        width: 100%;
    }
    
    .margin-full .overlay-left .inspirational-overlay,
    .margin-full .overlay-right .inspirational-overlay {
        width: 100%;
        height: 50%;
        top: auto;
        bottom: 0;
        left: 0;
        right: 0;
        border-radius: 0 0 16px 16px;
    }
    
    .margin-narrow .overlay-left .inspirational-overlay,
    .margin-narrow .overlay-right .inspirational-overlay {
        width: calc(100% - 50px);
        height: calc(50% - 25px);
        top: auto;
        bottom: 25px;
        left: 25px;
        right: 25px;
    }
    
    .margin-wide .overlay-left .inspirational-overlay,
    .margin-wide .overlay-right .inspirational-overlay {
        width: calc(100% - 80px);
        height: calc(50% - 40px);
        top: auto;
        bottom: 40px;
        left: 40px;
        right: 40px;
    }
    
    .overlay-content {
        padding: 20px;
    }
    
    .text-size-xxxxl .overlay-text { font-size: 3rem; }
    .text-size-xxxl .overlay-text { font-size: 2.5rem; }
    .text-size-xxl .overlay-text { font-size: 2rem; }
    .text-size-xl .overlay-text { font-size: 1.75rem; }
    .text-size-large .overlay-text { font-size: 1.5rem; }
    
    /* News block mobile */
    .news-card.layout-horizontal {
        flex-direction: column !important;
    }
    
    .news-card.layout-horizontal .split-card-image,
    .news-card.layout-horizontal .split-card-text {
        width: 100% !important;
        flex: none !important;
    }
    
    .news-card .split-card-text {
        padding: 1rem;
    }
    
    .news-card .split-card-meta {
        font-size: 0.9rem;
    }
    
    /* Form block mobile */
    .star-rating-display .star {
        font-size: 1.8rem;
    }
    
    .file-input-label {
        padding: 10px 15px;
        font-size: 0.9rem;
    }
    
    .field-error-message {
        font-size: 0.8rem;
    }
    
    button[type="submit"]:disabled::after {
        right: 8px;
        width: 14px;
        height: 14px;
    }
    
    .soec-section-wrapper .title-text {
        font-size: 2rem !important;
    }
}

@media (max-width: 480px) {
    .text-content-box {
        padding: 1.25rem;
    }
    
    .download-block-wrapper.layout-grid .download-item {
        padding: 1.5rem 1rem;
    }
    
    .download-title {
        font-size: 0.9rem;
    }
    
    .download-meta,
    .download-description {
        font-size: 0.8rem;
    }
    
    .data-card.style-standard {
        aspect-ratio: auto;
        min-height: 220px;
    }
    
    .stat-modal-content {
        padding: 1.5rem 1rem;
    }
}

/* ========================================
   6. ACCESSIBILITY & PRINT STYLES
   ======================================== */

/* Keyboard focus states */
.accordion-header:focus-visible,
.download-item:focus-visible,
.split-card-button:focus-visible,
.text-block-button:focus-visible,
.frame-overlay-link:focus-visible,
.soec-block a:focus-visible,
.soec-block button:focus-visible {
    outline: 2px solid var(--tab-blue);
    outline-offset: 2px;
}

.form-field input:focus-visible,
.form-field select:focus-visible,
.form-field textarea:focus-visible {
    outline: 2px solid var(--tab-blue);
    outline-offset: 2px;
}

.star-rating-display .star:focus-visible {
    outline: 2px solid var(--tab-blue);
    outline-offset: 4px;
    border-radius: 4px;
}

.stat-info-icon:focus-visible,
.stat-link-icon:focus-visible,
.quote-info-icon:focus-visible {
    outline: 2px solid white;
    outline-offset: 2px;
}

.carousel-nav:focus-visible,
.indicator-dot:focus-visible {
    outline: 2px solid var(--tab-blue);
    outline-offset: 2px;
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .accordion-icon,
    .accordion-content,
    .download-item,
    .download-arrow,
    .flip-card-inner,
    .flip-card.animation-zoom .flip-card-inner,
    .flip-card.animation-slide .flip-card-inner,
    .data-card,
    .stat-info-icon,
    .stat-link-icon,
    .stat-modal,
    .quote-info-icon,
    .quote-modal,
    .carousel-nav,
    .indicator-dot {
        transition: none !important;
        animation: none !important;
    }
}

/* Print styles */
@media print {
    .form-message,
    .field-error-message,
    .fullscreen-button,
    .carousel-nav,
    .carousel-indicators,
    .quote-info-icon,
    .stat-info-icon,
    .stat-link-icon {
        display: none;
    }
    
    .soec-block,
    .split-card,
    .text-content-box,
    .data-card,
    blockquote {
        box-shadow: none;
        border: 1px solid #ddd;
        break-inside: avoid;
    }
}

/* ========================================
   DATA CARD FLIP FEATURE - CSS ADDITIONS
   Version 2.0 - Matches flip-block animation exactly
   Add this CSS to the END of blocks.css
   ======================================== */

/* ===== DATA CARD FLIP PAIR WRAPPER ===== */
.data-card-flip-pair {
    position: relative;
    width: 100%;
    --card-offset-x: 0px;
}

/* ===== GRID CARD (FRONT) ===== */
.data-card-grid {
    position: relative;
    width: 100%;
    cursor: pointer;
    perspective: 1000px;
    z-index: 1;
}

.data-card-grid-inner {
    position: relative;
    width: 100%;
    transform-style: preserve-3d;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    transform-origin: center center;
    border-radius: 20px;
    box-shadow: 0 8px 24px rgba(6, 39, 53, 0.25);
    overflow: hidden;
    backface-visibility: hidden;
}

/* Hover effect - only when not animating AND card has back */
.data-card-flip-pair[data-has-back="true"]:not(.flipping):not(.flipped) .data-card-grid:hover .data-card-grid-inner {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(6, 39, 53, 0.3);
}

/* Hover effect on cursor for flippable cards only */
.data-card-flip-pair[data-has-back="true"] .data-card-grid {
    cursor: pointer;
}

/* Non-flippable cards should not respond to hover */
.data-card-flip-pair[data-has-back="false"] .data-card-grid {
    cursor: default;
}

/* OPENING: Front rotates 0° to 90° then hides */
.data-card-flip-pair.flipping .data-card-grid-inner {
    transform: rotateY(90deg);
}

.data-card-flip-pair.flipped .data-card-grid-inner {
    transform: rotateY(90deg);
    visibility: hidden;
}

/* CLOSING: Front becomes visible at 90° then rotates to 0° */
.data-card-flip-pair.closing .data-card-grid-inner {
    transform: rotateY(0deg);
    visibility: visible;
    transition-delay: 0.4s;
}

/* Flip icon on grid cards */
.data-card-grid-inner .flip-icon {
    position: absolute;
    bottom: 0.5rem;
    right: 0.5rem;
    width: 40px;
    height: 40px;
    opacity: 0.8;
    transition: opacity 0.3s ease, transform 0.3s ease;
    z-index: 10;
}

.data-card-flip-pair[data-has-back="true"] .data-card-grid:hover .flip-icon {
    opacity: 1;
    transform: scale(1.1);
}

/* Non-flippable cards keep icon hidden/static */
.data-card-flip-pair[data-has-back="false"] .flip-icon {
    opacity: 0;
    pointer-events: none;
}

.data-card-grid-inner .flip-icon svg {
    width: 100%;
    height: 100%;
    display: block;
    color: var(--flip-button-color, currentColor);
}

/* Flip icon colors */
.data-card-grid-inner .flip-icon.color-white svg { stroke: white; }
.data-card-grid-inner .flip-icon.color-charcoal svg { stroke: #333; }
.data-card-grid-inner .flip-icon.color-burgundy svg { stroke: #8b2635; }
.data-card-grid-inner .flip-icon.color-forest-green svg { stroke: #1b5137; }
.data-card-grid-inner .flip-icon.color-emerald-green svg { stroke: #059669; }
.data-card-grid-inner .flip-icon.color-sage-green svg { stroke: #8ca280; }
.data-card-grid-inner .flip-icon.color-tab-blue svg { stroke: #4f9aa8; }
.data-card-grid-inner .flip-icon.color-highlight-orange svg { stroke: #e1a038; }
.data-card-grid-inner .flip-icon.color-rust-red svg { stroke: #cc4020; }
.data-card-grid-inner .flip-icon.color-brick-red svg { stroke: #8c1a22; }

/* ===== EXPANDED CARD (BACK) ===== */
.data-card-expanded {
    position: fixed !important;
    top: 50% !important;
    left: 50% !important;
    width: 90vw !important;
    max-width: 1200px !important;
    height: auto !important;
    max-height: 85vh !important;
    z-index: 99999 !important;
    perspective: 1000px;
    transform: translate(-50%, -50%) !important;
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    padding: 0 !important;
    margin: 0 !important;
}

/* Show when animating */
.data-card-expanded.flipping,
.data-card-expanded.flipped,
.data-card-expanded.closing {
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto;
    z-index: 99999 !important;
}

.data-card-expanded-inner {
    position: relative;
    width: 100%;
    height: auto;
    max-height: 85vh;
    transform-style: preserve-3d;
    transform-origin: center center;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(6, 39, 53, 0.4);
    overflow: hidden;
    backface-visibility: hidden;
    z-index: 99999;
    transform: rotateY(-90deg) translateX(var(--card-offset-x, 0px));
    visibility: hidden;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), visibility 0s;
}

/* OPENING: Back appears at 90° at card position, rotates to 0° at center */
.data-card-expanded.flipping .data-card-expanded-inner {
    animation: dataBackCardAppear 0.4s ease-out forwards 0.4s;
}

@keyframes dataBackCardAppear {
    0% {
        transform: rotateY(-90deg) translateX(var(--card-offset-x, 0px));
        visibility: visible;
    }
    100% {
        transform: rotateY(0deg) translateX(0px);
        visibility: visible;
    }
}

.data-card-expanded.flipped .data-card-expanded-inner {
    transform: rotateY(0deg) translateX(0px);
    visibility: visible;
}

/* CLOSING: Back rotates from 0° at center to 90° at card position then hides */
.data-card-expanded.closing .data-card-expanded-inner {
    animation: dataBackCardDisappear 0.4s ease-out forwards;
}

@keyframes dataBackCardDisappear {
    0% {
        transform: rotateY(0deg) translateX(0px);
        visibility: visible;
    }
    99% {
        transform: rotateY(-90deg) translateX(var(--card-offset-x, 0px));
        visibility: visible;
    }
    100% {
        transform: rotateY(-90deg) translateX(var(--card-offset-x, 0px));
        visibility: hidden;
    }
}

/* ===== BACK CARD STYLING ===== */
.data-card-back {
    position: relative;
    width: 100%;
    height: auto;
    min-height: 400px;
    max-height: 85vh;
    display: flex;
    border-radius: 20px;
    overflow: hidden;
}

/* Background colors for back card */
.data-card-back.bg-white { background-color: white; }
.data-card-back.bg-charcoal { background-color: #333; }
.data-card-back.bg-burgundy { background-color: #8b2635; }
.data-card-back.bg-forest-green { background-color: #1b5137; }
.data-card-back.bg-emerald-green { background-color: #059669; }
.data-card-back.bg-sage-green { background-color: #8ca280; }
.data-card-back.bg-tab-blue { background-color: #4f9aa8; }
.data-card-back.bg-highlight-orange { background-color: #e1a038; }
.data-card-back.bg-rust-red { background-color: #cc4020; }
.data-card-back.bg-brick-red { background-color: #8c1a22; }
.data-card-back.bg-black { background-color: #000; }
.data-card-back.bg-transparent { background-color: transparent; }

/* Back image */
.data-card-back-image {
    flex: 0 0 40%;
    min-height: 400px;
    background: #9b9b9b;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.data-card-back-image.position-left { order: 0; }
.data-card-back-image.position-right { order: 1; }

/* Image background colors */
.data-card-back-image.bg-white { background-color: white; }
.data-card-back-image.bg-charcoal { background-color: #333; }
.data-card-back-image.bg-burgundy { background-color: #8b2635; }
.data-card-back-image.bg-forest-green { background-color: #1b5137; }
.data-card-back-image.bg-emerald-green { background-color: #059669; }
.data-card-back-image.bg-sage-green { background-color: #8ca280; }
.data-card-back-image.bg-tab-blue { background-color: #4f9aa8; }
.data-card-back-image.bg-highlight-orange { background-color: #e1a038; }
.data-card-back-image.bg-rust-red { background-color: #cc4020; }
.data-card-back-image.bg-brick-red { background-color: #8c1a22; }
.data-card-back-image.bg-black { background-color: #000; }
.data-card-back-image.bg-transparent { background-color: transparent; }

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

.data-card-back-image svg {
    width: 80px;
    height: 80px;
    fill: white;
    opacity: 0.8;
}

/* Slideshow images */
.data-card-back-image .slideshow-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 1s ease-in-out;
}

.data-card-back-image .slideshow-image.active {
    opacity: 1;
}

/* Overlay effect */
.data-card-back-image.has-overlay::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.3);
    z-index: 1;
}

/* Ken Burns effect */
.data-card-back-image.ken-burns img,
.data-card-back-image.ken-burns .slideshow-image {
    animation: kenBurnsZoom 20s ease-in-out infinite alternate;
}

/* Slideshow dots */
.data-card-back-image .slideshow-dots {
    position: absolute;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 10;
}

.data-card-back-image .slideshow-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0;
}

.data-card-back-image .slideshow-dot:hover {
    background: rgba(255, 255, 255, 0.8);
}

.data-card-back-image .slideshow-dot.active {
    background: white;
    transform: scale(1.2);
}

/* Image overlay - inline style controlled */
.data-card-back-image .image-overlay {
    position: absolute;
    inset: 0;
    z-index: 2;
    pointer-events: none;
}

/* Back content */
.data-card-back-content {
    flex: 1;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    max-height: 85vh;
    -webkit-overflow-scrolling: touch;
}

.data-card-back-content h3 {
    font-family: 'Fraunces', serif;
    font-size: 1.8rem;
    margin: 0 0 0.5rem 0;
    font-weight: 700;
    flex-shrink: 0;
}

.data-card-back-content h4 {
    font-family: 'Work Sans', sans-serif;
    color: #e1a038;
    font-size: 1.1rem;
    margin: 0 0 1.5rem 0;
    font-weight: 600;
    flex-shrink: 0;
}

.data-card-back-content p {
    font-size: 1rem;
    line-height: 1.6;
    font-family: 'Work Sans', sans-serif;
    margin: 0;
}

/* Close button */
.data-card-back .close-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 2rem;
    font-weight: bold;
    cursor: pointer;
    color: #666;
    transition: color 0.3s, transform 0.2s;
    z-index: 10000 !important;
    background: white;
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.data-card-back .close-btn:hover {
    color: #333;
    transform: rotate(90deg);
}

/* ===== MOBILE RESPONSIVE ===== */
@media (max-width: 768px) {
    .data-card-expanded {
        top: 50%;
        width: 95vw !important;
        height: 90vh !important;
        max-height: 90vh !important;
    }
    
    .data-card-expanded-inner {
        height: 90vh !important;
        max-height: 90vh !important;
    }
    
    .data-card-back {
        flex-direction: column;
        height: 90vh !important;
        max-height: 90vh !important;
    }
    
    .data-card-back-image {
        width: 100%;
        aspect-ratio: 1 / 1 !important;
        height: auto;
        flex: 0 0 auto;
        min-height: unset;
        max-width: 100%;
        max-height: 35vh;
        order: 0;
    }
    
    .data-card-back-content {
        padding: 1.5rem;
        flex: 1;
        min-height: 0;
        overflow-y: auto;
        max-height: calc(90vh - 35vh);
    }
    
    /* Mobile animations without offset */
    @keyframes dataBackCardAppearMobile {
        0% {
            transform: rotateY(-90deg);
            visibility: visible;
        }
        100% {
            transform: rotateY(0deg);
            visibility: visible;
        }
    }
    
    @keyframes dataBackCardDisappearMobile {
        0% {
            transform: rotateY(0deg);
            visibility: visible;
        }
        99% {
            transform: rotateY(-90deg);
            visibility: visible;
        }
        100% {
            transform: rotateY(-90deg);
            visibility: hidden;
        }
    }
    
    .data-card-expanded.flipping .data-card-expanded-inner {
        animation: dataBackCardAppearMobile 0.4s ease-out forwards 0.4s;
    }
    
    .data-card-expanded.closing .data-card-expanded-inner {
        animation: dataBackCardDisappearMobile 0.4s ease-out forwards;
    }
    
    .data-card-grid-inner .flip-icon {
        width: 36px;
        height: 36px;
        bottom: 0.4rem;
        right: 0.4rem;
    }
}

@media (max-width: 480px) {
    .data-card-expanded {
        top: 50%;
        width: 98vw !important;
        height: 90vh !important;
        max-height: 90vh !important;
    }
    
    .data-card-expanded-inner {
        height: 90vh !important;
        max-height: 90vh !important;
    }
    
    .data-card-back {
        height: 90vh !important;
        max-height: 90vh !important;
    }
    
    .data-card-back-image {
        max-height: 30vh;
    }
    
    .data-card-back-content {
        max-height: calc(90vh - 30vh);
        padding: 1.25rem;
    }
    
    .data-card-back .close-btn {
        top: 0.5rem;
        right: 0.5rem;
    }
    
    .data-card-back-content h3 { font-size: 1.5rem; }
    .data-card-back-content h4 { font-size: 1rem; }
    
    .data-card-grid-inner .flip-icon {
        width: 32px;
        height: 32px;
        bottom: 0.3rem;
        right: 0.3rem;
    }
}

/* ===== ACCESSIBILITY ===== */
@media (prefers-reduced-motion: reduce) {
    .data-card-grid-inner,
    .data-card-expanded-inner {
        animation: none !important;
        transition-duration: 0.01ms !important;
    }
    
    .data-card-back-image.ken-burns img,
    .data-card-back-image.ken-burns .slideshow-image {
        animation: none !important;
    }
}

.data-card-grid:focus-visible {
    outline: 3px solid #4f9aa8;
    outline-offset: 4px;
    border-radius: 20px;
}

.data-card-back .close-btn:focus-visible {
    outline: 2px solid #4f9aa8;
    outline-offset: 2px;
}

/* Body class for preventing scroll */
body.has-flipped-data-card {
    overflow: hidden;
}

/* =============================================
   DATA BLOCK V2 FRONTEND STYLES
   =============================================
   Add this to blocks.css
   ============================================= */

/* =============================================
   DATA BLOCK WRAPPER
   ============================================= */

.data-block-wrapper {
    display: grid;
    width: 100%;
    padding: 0.5rem 0 0.5rem 0;
    aspect-ratio: unset !important; /* Never apply aspect ratio to wrapper */
    height: auto !important; /* Always auto height */
}

/* Column Layouts - Desktop (matching flip-block behavior) */
.data-block-wrapper.columns-1 { 
    grid-template-columns: 1fr;
}
.data-block-wrapper.columns-2 { 
    grid-template-columns: repeat(2, 1fr);
}
.data-block-wrapper.columns-3 { 
    grid-template-columns: repeat(3, 1fr);
}
.data-block-wrapper.columns-4 { 
    grid-template-columns: repeat(4, 1fr);
}

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

/* H-Gap (horizontal gap between cards) */
.data-block-wrapper.h-gap-none { column-gap: var(--h-gap-none, 0px); }
.data-block-wrapper.h-gap-narrow { column-gap: var(--h-gap-narrow, 8px); }
.data-block-wrapper.h-gap-normal { column-gap: var(--h-gap-normal, 16px); }
.data-block-wrapper.h-gap-wide { column-gap: var(--h-gap-wide, 24px); }
.data-block-wrapper.h-gap-spacious { column-gap: var(--h-gap-spacious, 32px); }

/* V-Gap (vertical gap between rows) */
.data-block-wrapper.v-gap-none { row-gap: var(--v-gap-none, 0px); }
.data-block-wrapper.v-gap-narrow { row-gap: var(--v-gap-narrow, 4px); }
.data-block-wrapper.v-gap-normal { row-gap: var(--v-gap-normal, 8px); }
.data-block-wrapper.v-gap-wide { row-gap: var(--v-gap-wide, 12px); }
.data-block-wrapper.v-gap-spacious { row-gap: var(--v-gap-spacious, 16px); }

/* Spacing (internal card density) */
.data-block-wrapper.spacing-none { --spacing-mult: 0.6; }
.data-block-wrapper.spacing-narrow { --spacing-mult: 0.8; }
.data-block-wrapper.spacing-normal { --spacing-mult: 1; }
.data-block-wrapper.spacing-wide { --spacing-mult: 1.25; }
.data-block-wrapper.spacing-spacious { --spacing-mult: 1.5; }

/* CENTER CARDS WHEN FEWER THAN EXPECTED */
/* Key principle: Cards should be the same size as they would be in a full row */
/* For columns-4, each card is 25% of width. Keep this size even with fewer cards. */

/* Single card - use the column width from the columns setting */
.data-block-wrapper.columns-2.actual-cards-1 {
    grid-template-columns: calc((100% - 20px) / 2);
    justify-content: center;
}

.data-block-wrapper.columns-3.actual-cards-1 {
    grid-template-columns: calc((100% - 40px) / 3);
    justify-content: center;
}

.data-block-wrapper.columns-4.actual-cards-1 {
    grid-template-columns: calc((100% - 45px) / 4);
    justify-content: center;
}

/* Two cards - each card sized as if in full row */
.data-block-wrapper.columns-3.actual-cards-2 {
    grid-template-columns: repeat(2, calc((100% - 40px) / 3));
    justify-content: center;
    gap: 20px;
}

.data-block-wrapper.columns-4.actual-cards-2 {
    grid-template-columns: repeat(2, calc((100% - 45px) / 4));
    justify-content: center;
    gap: 15px;
}

/* Three cards (3 of 4 columns) - each card sized as if in full row */
.data-block-wrapper.columns-4.actual-cards-3 {
    grid-template-columns: repeat(3, calc((100% - 45px) / 4));
    justify-content: center;
    gap: 15px;
}

/* Tablet: every row uses the same 2-column layout as full rows, so a row of
   3 cards matches a row of 4 (it previously collapsed to 1 full-width card
   from 768px, making those cards more than twice the size of the others). */
@media (max-width: 1024px) {
    .data-block-wrapper.columns-3.actual-cards-2,
    .data-block-wrapper.columns-4.actual-cards-2,
    .data-block-wrapper.columns-4.actual-cards-3 {
        grid-template-columns: repeat(2, 1fr);
        justify-content: stretch;
        gap: var(--v-gap-normal, 16px) var(--h-gap-normal, 16px);
    }
    
    .data-block-wrapper.columns-3.actual-cards-1,
    .data-block-wrapper.columns-4.actual-cards-1 {
        grid-template-columns: calc((100% - 16px) / 2);
        justify-content: center;
    }
}

/* When a row of cards wraps onto several lines (tablet/phone), keep a gap
   between the stacked cards even if the block's vertical gap is 'none' -
   'none' suits desktop, where each block is a single row. */
/* (stacked-card gap for tablet/phone: see the DATA BLOCK v-gap rules further down) */

/* Phone: one card per row */
@media (max-width: 640px) {
    .data-block-wrapper.columns-3.actual-cards-2,
    .data-block-wrapper.columns-4.actual-cards-2,
    .data-block-wrapper.columns-4.actual-cards-3,
    .data-block-wrapper.columns-3.actual-cards-1,
    .data-block-wrapper.columns-4.actual-cards-1 {
        grid-template-columns: 1fr;
        justify-content: stretch;
    }
}

/* Responsive Columns - Tablet */
@media (max-width: 1024px) {
    .data-block-wrapper.columns-4 {
        grid-template-columns: repeat(2, 1fr);
    }
    .data-block-wrapper.columns-3 {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Responsive Columns - Mobile */
@media (max-width: 640px) {
    .data-block-wrapper.columns-2,
    .data-block-wrapper.columns-3,
    .data-block-wrapper.columns-4 {
        grid-template-columns: 1fr;
    }
}

/* =============================================
   DATA CARD PAIR (Front + Optional Back)
   ============================================= */

.data-card-pair {
    position: relative;
    cursor: default;
}

.data-card-pair.has-back {
    cursor: pointer;
}

/* =============================================
   FRONT CARD (Grid View)
   ============================================= */

.data-card-grid {
    width: 100%;
    height: 100%;
}

.data-card-grid-inner {
    width: 100%;
    height: 100%;
    border-radius: 20px;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* Text alignment for flex items using align-self */
.data-card-grid-inner .framehero-desc1.text-left,
.data-card-grid-inner .framehero-stat-number.text-left,
.data-card-grid-inner .framehero-desc2.text-left {
    align-self: flex-start !important;
    width: 100% !important;
    text-align: left !important;
}

.data-card-grid-inner .framehero-desc1.text-center,
.data-card-grid-inner .framehero-stat-number.text-center,
.data-card-grid-inner .framehero-desc2.text-center {
    align-self: center !important;
    width: 100% !important;
    text-align: center !important;
}

.data-card-grid-inner .framehero-desc1.text-right,
.data-card-grid-inner .framehero-stat-number.text-right,
.data-card-grid-inner .framehero-desc2.text-right {
    align-self: flex-end !important;
    width: 100% !important;
    text-align: right !important;
}

/* Aspect Ratios */
.data-block-wrapper.aspect-16-1 .data-card-grid-inner { aspect-ratio: 16/1; }
.data-block-wrapper.aspect-14-1 .data-card-grid-inner { aspect-ratio: 14/1; }
.data-block-wrapper.aspect-12-1 .data-card-grid-inner { aspect-ratio: 12/1; }
.data-block-wrapper.aspect-10-1 .data-card-grid-inner { aspect-ratio: 10/1; }
.data-block-wrapper.aspect-8-1 .data-card-grid-inner { aspect-ratio: 8/1; }
.data-block-wrapper.aspect-6-1 .data-card-grid-inner { aspect-ratio: 6/1; }
.data-block-wrapper.aspect-5-1 .data-card-grid-inner { aspect-ratio: 5/1; }
.data-block-wrapper.aspect-4-1 .data-card-grid-inner { aspect-ratio: 4/1; }
.data-block-wrapper.aspect-32-9 .data-card-grid-inner { aspect-ratio: 32/9; }
.data-block-wrapper.aspect-3-1 .data-card-grid-inner { aspect-ratio: 3/1; }
.data-block-wrapper.aspect-21-9 .data-card-grid-inner { aspect-ratio: 21/9; }
.data-block-wrapper.aspect-2-1 .data-card-grid-inner { aspect-ratio: 2/1; }
.data-block-wrapper.aspect-16-9 .data-card-grid-inner { aspect-ratio: 16/9; }
.data-block-wrapper.aspect-3-2 .data-card-grid-inner { aspect-ratio: 3/2; }
.data-block-wrapper.aspect-4-3 .data-card-grid-inner { aspect-ratio: 4/3; }
.data-block-wrapper.aspect-5-4 .data-card-grid-inner { aspect-ratio: 5/4; }
.data-block-wrapper.aspect-1-1 .data-card-grid-inner { aspect-ratio: 1/1; }
.data-block-wrapper.aspect-4-5 .data-card-grid-inner { aspect-ratio: 4/5; }
.data-block-wrapper.aspect-3-4 .data-card-grid-inner { aspect-ratio: 3/4; }
.data-block-wrapper.aspect-2-3 .data-card-grid-inner { aspect-ratio: 2/3; }
.data-block-wrapper.aspect-9-16 .data-card-grid-inner { aspect-ratio: 9/16; }
.data-block-wrapper.aspect-1-2 .data-card-grid-inner { aspect-ratio: 1/2; }

/* Shadow Variants */
.data-block-wrapper.shadow-none .data-card-grid-inner {
    box-shadow: none;
}

.data-block-wrapper.shadow-light .data-card-grid-inner {
    box-shadow: 
        1px 1px 2px hsl(var(--shadow-hsl) / 0.15),
        2px 2px 4px hsl(var(--shadow-hsl) / 0.10),
        3px 4px 6px hsl(var(--shadow-hsl) / 0.06);
}

.data-block-wrapper.shadow-moderate .data-card-grid-inner {
    box-shadow: 
        1px 2px 4px hsl(var(--shadow-hsl) / 0.20),
        2px 4px 10px hsl(var(--shadow-hsl) / 0.14),
        4px 8px 16px hsl(var(--shadow-hsl) / 0.10);
}

.data-block-wrapper.shadow-medium .data-card-grid-inner {
    box-shadow: 
        2px 4px 6px hsl(var(--shadow-hsl) / 0.26),
        4px 8px 16px hsl(var(--shadow-hsl) / 0.18),
        8px 12px 22px hsl(var(--shadow-hsl) / 0.14);
}

.data-block-wrapper.shadow-heavy .data-card-grid-inner {
    box-shadow: 
        3px 6px 10px hsl(var(--shadow-hsl) / 0.32),
        6px 12px 24px hsl(var(--shadow-hsl) / 0.22),
        12px 20px 32px hsl(var(--shadow-hsl) / 0.16);
}

.data-block-wrapper.shadow-vheavy .data-card-grid-inner {
    box-shadow: 
        4px 8px 14px hsl(var(--shadow-hsl) / 0.38),
        10px 18px 32px hsl(var(--shadow-hsl) / 0.28),
        18px 30px 48px hsl(var(--shadow-hsl) / 0.20);
}

/* Backward compatibility for old shadow values */
.data-block-wrapper.shadow-mild .data-card-grid-inner {
    box-shadow: 
        1px 1px 2px hsl(var(--shadow-hsl) / 0.15),
        2px 2px 4px hsl(var(--shadow-hsl) / 0.10),
        3px 4px 6px hsl(var(--shadow-hsl) / 0.06);
}

.data-block-wrapper.shadow-strong .data-card-grid-inner {
    box-shadow: 
        3px 6px 10px hsl(var(--shadow-hsl) / 0.32),
        6px 12px 24px hsl(var(--shadow-hsl) / 0.22),
        12px 20px 32px hsl(var(--shadow-hsl) / 0.16);
}

.data-block-wrapper.shadow-very-strong .data-card-grid-inner {
    box-shadow: 
        4px 8px 14px hsl(var(--shadow-hsl) / 0.38),
        10px 18px 32px hsl(var(--shadow-hsl) / 0.28),
        18px 30px 48px hsl(var(--shadow-hsl) / 0.20);
}


/* Shadow strength variations for badges - using filter for PNG transparency */
.data-block-wrapper.shadow-none .data-card-badge {
    filter: none;
}
.data-block-wrapper.shadow-light .data-card-badge,
.data-block-wrapper.shadow-mild .data-card-badge {
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.2));
}
.data-block-wrapper.shadow-moderate .data-card-badge {
    filter: drop-shadow(0 5px 10px rgba(0, 0, 0, 0.22));
}
.data-block-wrapper.shadow-medium .data-card-badge {
    filter: drop-shadow(0 5px 10px rgba(0, 0, 0, 0.25));
}
.data-block-wrapper.shadow-heavy .data-card-badge,
.data-block-wrapper.shadow-strong .data-card-badge {
    filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.3));
}
.data-block-wrapper.shadow-vheavy .data-card-badge,
.data-block-wrapper.shadow-very-strong .data-card-badge {
    filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.4));
}

/* Hover Effect */
.data-card-pair.has-back:hover .data-card-grid-inner {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(6, 39, 53, 0.3);
}

/* Front Layout: Icon Top (default) */
.data-card-pair.front-top .data-card-grid-inner {
    flex-direction: column;
}

/* Front Layout: Icon Bottom */
.data-card-pair.front-bottom .data-card-grid-inner {
    flex-direction: column-reverse;
}

/* =============================================
   FRONT CARD ICON
   ============================================= */

.data-card-icon {
    width: 60px;
    height: 60px;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.data-card-pair.front-bottom .data-card-icon {
    margin-bottom: 0;
    margin-top: 1rem;
}

.data-card-icon svg {
    width: 100%;
    height: 100%;
}

.data-card-icon img.icon-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* Icon Colors */
.data-card-icon.color-white svg { fill: #ffffff; color: #ffffff; }
.data-card-icon.color-black svg { fill: #000000; color: #000000; }
.data-card-icon.color-charcoal svg { fill: #333333; color: #333333; }
.data-card-icon.color-forest-green svg { fill: #1b5137; color: #1b5137; }
.data-card-icon.color-emerald-green svg { fill: #059669; color: #059669; }
.data-card-icon.color-sage-green svg { fill: #8ca280; color: #8ca280; }
.data-card-icon.color-burgundy svg { fill: #8b2635; color: #8b2635; }
.data-card-icon.color-rust-red svg { fill: #cc4020; color: #cc4020; }
.data-card-icon.color-tab-blue svg { fill: #4f9aa8; color: #4f9aa8; }
.data-card-icon.color-highlight-orange svg { fill: #e1a038; color: #e1a038; }

/* =============================================
   FRONT CARD CONTENT
   ============================================= */

.data-card-front-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

/* Description 1 (above stat) */
.data-desc1 {
    font-family: 'Fraunces', serif;
    font-weight: 600;
    line-height: 1.3;
    margin: 0 0 0.25rem 0;
}

/* Stat Number */
.data-stat-number {
    font-family: 'Fraunces', serif;
    font-weight: 700;
    line-height: 1;
    margin: 0.5rem 0;
}

/* Description 2 (below stat) */
.data-desc2 {
    font-family: 'Fraunces', serif;
    font-weight: 500;
    line-height: 1.3;
    margin: 0.25rem 0 0 0;
}

/* Size Classes */
.data-desc1.size-xs, .data-desc2.size-xs { font-size: clamp(0.7rem, 1.2vw, 0.85rem); }
.data-desc1.size-small, .data-desc2.size-small { font-size: clamp(0.85rem, 1.5vw, 1rem); }
.data-desc1.size-medium, .data-desc2.size-medium { font-size: clamp(1rem, 1.8vw, 1.2rem); }
.data-desc1.size-large, .data-desc2.size-large { font-size: clamp(1.1rem, 2vw, 1.4rem); }
.data-desc1.size-xl, .data-desc2.size-xl { font-size: clamp(1.25rem, 2.2vw, 1.6rem); }
.data-desc1.size-xxl, .data-desc2.size-xxl { font-size: clamp(1.5rem, 2.5vw, 1.9rem); }

.data-stat-number.size-xs { font-size: clamp(1.5rem, 4vw, 2rem); }
.data-stat-number.size-small { font-size: clamp(2rem, 5vw, 2.5rem); }
.data-stat-number.size-medium { font-size: clamp(2.5rem, 6vw, 3.5rem); }
.data-stat-number.size-large { font-size: clamp(3rem, 7vw, 4.5rem); }
.data-stat-number.size-xl { font-size: clamp(3.5rem, 8vw, 5.5rem); }
.data-stat-number.size-xxl { font-size: clamp(4rem, 10vw, 7rem); }

/* Text Colors */
.data-desc1.color-white, .data-desc2.color-white, .data-stat-number.color-white { color: #ffffff; }
.data-desc1.color-black, .data-desc2.color-black, .data-stat-number.color-black { color: #000000; }
.data-desc1.color-charcoal, .data-desc2.color-charcoal, .data-stat-number.color-charcoal { color: #333333; }
.data-desc1.color-forest-green, .data-desc2.color-forest-green, .data-stat-number.color-forest-green { color: #1b5137; }
.data-desc1.color-emerald-green, .data-desc2.color-emerald-green, .data-stat-number.color-emerald-green { color: #059669; }
.data-desc1.color-sage-green, .data-desc2.color-sage-green, .data-stat-number.color-sage-green { color: #8ca280; }
.data-desc1.color-burgundy, .data-desc2.color-burgundy, .data-stat-number.color-burgundy { color: #8b2635; }
.data-desc1.color-rust-red, .data-desc2.color-rust-red, .data-stat-number.color-rust-red { color: #cc4020; }
.data-desc1.color-tab-blue, .data-desc2.color-tab-blue, .data-stat-number.color-tab-blue { color: #4f9aa8; }
.data-desc1.color-highlight-orange, .data-desc2.color-highlight-orange, .data-stat-number.color-highlight-orange { color: #e1a038; }

/* Alignment */
.data-desc1.align-left, .data-desc2.align-left, .data-stat-number.align-left { text-align: left; align-self: flex-start; }
.data-desc1.align-center, .data-desc2.align-center, .data-stat-number.align-center { text-align: center; align-self: center; }
.data-desc1.align-right, .data-desc2.align-right, .data-stat-number.align-right { text-align: right; align-self: flex-end; }

/* =============================================
   FLIP INDICATOR ICON
   ============================================= */

.data-flip-icon {
    position: absolute;
    bottom: 12px;
    right: 12px;
    width: 24px;
    height: 24px;
    opacity: 0.7;
    transition: opacity 0.2s ease;
}

.data-card-pair.has-back:hover .data-flip-icon {
    opacity: 1;
}

.data-flip-icon svg {
    width: 100%;
    height: 100%;
}

.data-flip-icon.color-white svg { color: #ffffff; }
.data-flip-icon.color-black svg { color: #000000; }
.data-flip-icon.color-charcoal svg { color: #333333; }
.data-flip-icon.color-forest-green svg { color: #1b5137; }

/* =============================================
   BACK CARD (Expanded View)
   ============================================= */
   
.data-card-expanded.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

@keyframes dataFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Left over from an earlier pop-up design (the .active / dataSlideUp
   modal, no longer used by any script). Its max-width: 900px capped the
   open back inside the 1200px frame, so the panel sat against the frame's
   left edge and fell short on the right, unlike Flip cards. Sizing now
   comes solely from the main .data-card-expanded rules, which match
   .flip-card-expanded exactly. */
.data-card-expanded-inner {
    width: 100%;
}

@keyframes dataSlideUp {
    from { transform: translateY(20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

/* Left over from the earlier pop-up design: this used to switch the back
   to a two-column GRID (45% image / 55% text + a 2rem gap = 100% + 2rem),
   so the text column always ran 2rem past the card's right edge and lost
   its right-hand margin. The back is now the same flex layout as Flip
   cards (image 40%, text takes the rest) from the main .data-card-back
   rule; the grid-template rules below no longer apply. */
.data-card-back {
    border-radius: 20px;
    overflow: hidden;
    position: relative;
    min-height: 400px;
}

/* Let the text column shrink to its share (flex items default to
   min-width:auto, so a long unwrapped row of tab buttons could otherwise
   force it wider than the card) and let the tab buttons wrap if needed. */
.data-card-back-content {
    min-width: 0;
}
.data-card-back-content .flip-icon-tabs-row {
    flex-wrap: wrap;
}

/* Back Layout: Image Left */
.data-card-back.layout-left {
    grid-template-columns: 45% 55%;
}

/* Back Layout: Image Right */
.data-card-back.layout-right {
    grid-template-columns: 55% 45%;
}

.data-card-back.layout-right .data-card-back-image {
    order: 2;
}

.data-card-back.layout-right .data-card-back-content {
    order: 1;
}

/* Close Button */
.data-card-back .close-btn {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 36px;
    height: 36px;
    border: none;
    background: rgba(0, 0, 0, 0.5);
    color: #fff;
    font-size: 24px;
    line-height: 1;
    border-radius: 50%;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
}

.data-card-back .close-btn:hover {
    background: rgba(0, 0, 0, 0.8);
}

/* =============================================
   BACK CARD IMAGE
   ============================================= */

.data-card-back-image {
    position: relative;
    overflow: hidden;
    background: #f0f0f0;
}

.data-card-back-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 0.3s ease;
}

.data-card-back-image[data-position="top"] img { object-position: top; }
.data-card-back-image[data-position="bottom"] img { object-position: bottom; }
.data-card-back-image[data-position="center"] img { object-position: center; }

/* Scale */
.data-card-back-image img {
    transform: scale(var(--img-scale, 1));
}

/* Ken Burns */
.data-card-back-image.ken-burns img {
    animation: dataKenBurns 15s ease-in-out infinite alternate;
}

@keyframes dataKenBurns {
    0% { transform: scale(var(--img-scale, 1)); }
    100% { transform: scale(calc(var(--img-scale, 1) * 1.1)); }
}

/* Overlay */
.data-card-back-image .image-overlay {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

/* Slideshow */
.data-card-back-image .slideshow-image {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 0.8s ease;
}

.data-card-back-image .slideshow-image.active {
    opacity: 1;
}

/* =============================================
   BACK CARD CONTENT
   ============================================= */

.data-card-back-content {
    padding: 2rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Heading */
.data-back-heading {
    font-family: 'Fraunces', serif;
    font-weight: 700;
    line-height: 1.2;
    margin: 0 0 0.5rem 0;
}

.data-back-heading.size-xs { font-size: clamp(1rem, 2vw, 1.25rem); }
.data-back-heading.size-small { font-size: clamp(1.25rem, 2.5vw, 1.5rem); }
.data-back-heading.size-medium { font-size: clamp(1.5rem, 3vw, 2rem); }
.data-back-heading.size-large { font-size: clamp(1.75rem, 3.5vw, 2.5rem); }
.data-back-heading.size-xl { font-size: clamp(2rem, 4vw, 3rem); }
.data-back-heading.size-xxl { font-size: clamp(2.5rem, 5vw, 3.5rem); }

/* Subheading */
.data-back-subheading {
    font-family: var(--font-primary);
    font-weight: 600;
    line-height: 1.3;
    margin: 0 0 1rem 0;
}

.data-back-subheading.size-xs { font-size: clamp(0.75rem, 1.2vw, 0.875rem); }
.data-back-subheading.size-small { font-size: clamp(0.875rem, 1.4vw, 1rem); }
.data-back-subheading.size-medium { font-size: clamp(1rem, 1.6vw, 1.125rem); }
.data-back-subheading.size-large { font-size: clamp(1.125rem, 1.8vw, 1.25rem); }
.data-back-subheading.size-xl { font-size: clamp(1.25rem, 2vw, 1.5rem); }
.data-back-subheading.size-xxl { font-size: clamp(1.5rem, 2.5vw, 1.75rem); }

/* Body */
.data-back-body {
    font-family: var(--font-primary);
    line-height: 1.6;
    margin: 0 0 1.5rem 0;
}

.data-back-body.size-xs { font-size: clamp(0.75rem, 1.2vw, 0.85rem); }
.data-back-body.size-small { font-size: clamp(0.85rem, 1.4vw, 0.95rem); }
.data-back-body.size-medium { font-size: clamp(0.95rem, 1.6vw, 1.1rem); }
.data-back-body.size-large { font-size: clamp(1.05rem, 1.8vw, 1.2rem); }
.data-back-body.size-xl { font-size: clamp(1.15rem, 2vw, 1.35rem); }
.data-back-body.size-xxl { font-size: clamp(1.25rem, 2.2vw, 1.5rem); }

/* Back Text Colors */
.data-back-heading.color-white, .data-back-subheading.color-white, .data-back-body.color-white { color: #ffffff; }
.data-back-heading.color-black, .data-back-subheading.color-black, .data-back-body.color-black { color: #000000; }
.data-back-heading.color-charcoal, .data-back-subheading.color-charcoal, .data-back-body.color-charcoal { color: #333333; }
.data-back-heading.color-forest-green, .data-back-subheading.color-forest-green, .data-back-body.color-forest-green { color: #1b5137; }
.data-back-heading.color-emerald-green, .data-back-subheading.color-emerald-green, .data-back-body.color-emerald-green { color: #059669; }
.data-back-heading.color-sage-green, .data-back-subheading.color-sage-green, .data-back-body.color-sage-green { color: #8ca280; }
.data-back-heading.color-burgundy, .data-back-subheading.color-burgundy, .data-back-body.color-burgundy { color: #8b2635; }
.data-back-heading.color-rust-red, .data-back-subheading.color-rust-red, .data-back-body.color-rust-red { color: #cc4020; }
.data-back-heading.color-tab-blue, .data-back-subheading.color-tab-blue, .data-back-body.color-tab-blue { color: #4f9aa8; }
.data-back-heading.color-highlight-orange, .data-back-subheading.color-highlight-orange, .data-back-body.color-highlight-orange { color: #e1a038; }

/* Back Alignment */
.data-back-heading.align-left, .data-back-subheading.align-left, .data-back-body.align-left { text-align: left; }
.data-back-heading.align-center, .data-back-subheading.align-center, .data-back-body.align-center { text-align: center; }
.data-back-heading.align-right, .data-back-subheading.align-right, .data-back-body.align-right { text-align: right; }

/* =============================================
   BUTTON
   ============================================= */

.data-card-button-wrapper {
    margin-top: auto;
}

.data-card-button-wrapper.align-left { text-align: left; }
.data-card-button-wrapper.align-center { text-align: center; }
.data-card-button-wrapper.align-right { text-align: right; }

.data-card-button {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-family: var(--font-primary);
    font-weight: 600;
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.data-card-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.data-card-button.size-small { font-size: 0.85rem; padding: 0.5rem 1rem; }
.data-card-button.size-medium { font-size: 1rem; padding: 0.75rem 1.5rem; }
.data-card-button.size-large { font-size: 1.1rem; padding: 1rem 2rem; }

/* =============================================
   BADGE
   ============================================= */

.data-card-badge {
    position: absolute;
    z-index: 5;
}

.data-card-badge.badge-pos-tl { top: 16px; left: 16px; }
.data-card-badge.badge-pos-tr { top: 16px; right: 16px; }
.data-card-badge.badge-pos-bl { bottom: 16px; left: 16px; }
.data-card-badge.badge-pos-br { bottom: 16px; right: 16px; }

.data-card-badge.badge-size-small img,
.data-card-badge.badge-size-small svg { width: 40px; height: auto; }

.data-card-badge.badge-size-medium img,
.data-card-badge.badge-size-medium svg { width: 60px; height: auto; }

.data-card-badge.badge-size-large img,
.data-card-badge.badge-size-large svg { width: 80px; height: auto; }

/* =============================================
   BACKGROUND COLORS
   ============================================= */

.bg-white { background-color: #ffffff; }
.bg-black { background-color: #000000; }
.bg-charcoal { background-color: #333333; }
.bg-forest-green { background-color: #1b5137; }
.bg-emerald-green { background-color: #059669; }
.bg-sage-green { background-color: #8ca280; }
.bg-burgundy { background-color: #8b2635; }
.bg-rust-red { background-color: #cc4020; }
.bg-brick-red { background-color: #8c1a22; }
.bg-tab-blue { background-color: #4f9aa8; }
.bg-highlight-orange { background-color: #e1a038; }
.bg-ochre { background-color: #d4a574; }

/* Button BG */
.data-card-button.bg-white { background-color: #ffffff; }
.data-card-button.bg-forest-green { background-color: #1b5137; }
.data-card-button.bg-emerald-green { background-color: #059669; }
.data-card-button.bg-burgundy { background-color: #8b2635; }
.data-card-button.bg-rust-red { background-color: #cc4020; }
.data-card-button.bg-tab-blue { background-color: #4f9aa8; }
.data-card-button.bg-highlight-orange { background-color: #e1a038; }

/* Button Text */
.data-card-button.text-white { color: #ffffff; }
.data-card-button.text-black { color: #000000; }
.data-card-button.text-forest-green { color: #1b5137; }
.data-card-button.text-charcoal { color: #333333; }

/* =============================================
   RESPONSIVE - BACK CARD
   ============================================= */

@media (max-width: 768px) {
    .data-card-expanded {
        padding: 1rem;
    }
    
    .data-card-back {
        grid-template-columns: 1fr !important;
        grid-template-rows: auto 1fr;
    }
    
    .data-card-back.layout-right .data-card-back-image,
    .data-card-back.layout-right .data-card-back-content {
        order: unset;
    }
    
    .data-card-back-image {
        min-height: 200px;
    }
    
    .data-card-back-content {
        padding: 1.5rem;
    }
}

/* ============================================================================
   UNIVERSAL SIMPLE TITLE STYLES - FINAL
   ============================================================================
   Used by: Split, Flip, News, Frame, Data blocks
   
   Specifications:
   - Width: 100% of card container
   - Height: aspect-ratio 16:1
   - Border radius: 20px (well rounded)
   - Font: Fraunces, 500 weight, normal case
   ============================================================================ */

/* Universal Simple Title Wrapper */
.block-simple-title-wrapper,
.split-simple-title-wrapper,
.flip-simple-title-wrapper,
.news-simple-title-wrapper,
.frame-simple-title-wrapper,
.data-simple-title-wrapper,
.text-simple-title-wrapper,
.accordion-simple-title-wrapper,
.download-simple-title-wrapper,
.inspirational-simple-title-wrapper,
.image-simple-title-wrapper,
.form-simple-title-wrapper {
    width: 100%;
    max-width: 100%;
    /* See the animated-title-wrapper rule above for why var() is used here -
       same previously-dead --section-title-gap variable, same fix. 8px is
       the fallback for when no section break is enabled. */
    margin: 0 auto var(--section-title-gap, 8px) auto;
    padding: 0;
    box-sizing: border-box;
}

/* Universal Simple Title Box */
.block-simple-title-wrapper .simple-title-box,
.split-simple-title-wrapper .simple-title-box,
.flip-simple-title-wrapper .simple-title-box,
.news-simple-title-wrapper .simple-title-box,
.frame-simple-title-wrapper .simple-title-box,
.data-simple-title-wrapper .simple-title-box,
.text-simple-title-wrapper .simple-title-box,
.accordion-simple-title-wrapper .simple-title-box,
.download-simple-title-wrapper .simple-title-box,
.inspirational-simple-title-wrapper .simple-title-box,
.image-simple-title-wrapper .simple-title-box,
.form-simple-title-wrapper .simple-title-box {
    width: 100%;
    aspect-ratio: 16 / 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
    box-sizing: border-box;
    padding: 0 20px;
    margin: 0;
}

/* Universal Simple Title Text */
.block-simple-title-wrapper .simple-title-text,
.split-simple-title-wrapper .simple-title-text,
.flip-simple-title-wrapper .simple-title-text,
.news-simple-title-wrapper .simple-title-text,
.frame-simple-title-wrapper .simple-title-text,
.data-simple-title-wrapper .simple-title-text,
.text-simple-title-wrapper .simple-title-text,
.accordion-simple-title-wrapper .simple-title-text,
.download-simple-title-wrapper .simple-title-text,
.inspirational-simple-title-wrapper .simple-title-text,
.image-simple-title-wrapper .simple-title-text,
.form-simple-title-wrapper .simple-title-text {
    color: #ffffff;
    font-family: 'Fraunces', serif;
    font-optical-sizing: auto;
    font-weight: 500;
    font-style: normal;
    font-variation-settings: "SOFT" 50, "WONK" 0.5;
    font-size: clamp(1.5rem, 3.4vw, 2.125rem);
    letter-spacing: 0.02em;
    text-transform: none;
    text-align: center;
    line-height: 1.2;
    margin: 0;
    padding: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ============================================================================
   RESPONSIVE ADJUSTMENTS
   ============================================================================ */

@media (max-width: 768px) {
    .block-simple-title-wrapper .simple-title-box,
    .split-simple-title-wrapper .simple-title-box,
    .flip-simple-title-wrapper .simple-title-box,
    .news-simple-title-wrapper .simple-title-box,
    .frame-simple-title-wrapper .simple-title-box,
    .data-simple-title-wrapper .simple-title-box,
    .text-simple-title-wrapper .simple-title-box,
    .accordion-simple-title-wrapper .simple-title-box,
    .download-simple-title-wrapper .simple-title-box,
    .inspirational-simple-title-wrapper .simple-title-box,
    .image-simple-title-wrapper .simple-title-box,
    .form-simple-title-wrapper .simple-title-box {
        min-height: 56px;
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 16px;
    }
    
    .block-simple-title-wrapper .simple-title-text,
    .split-simple-title-wrapper .simple-title-text,
    .flip-simple-title-wrapper .simple-title-text,
    .news-simple-title-wrapper .simple-title-text,
    .frame-simple-title-wrapper .simple-title-text,
    .data-simple-title-wrapper .simple-title-text,
    .text-simple-title-wrapper .simple-title-text,
    .accordion-simple-title-wrapper .simple-title-text,
    .download-simple-title-wrapper .simple-title-text,
    .inspirational-simple-title-wrapper .simple-title-text,
    .image-simple-title-wrapper .simple-title-text,
    .form-simple-title-wrapper .simple-title-text {
        font-size: clamp(27px, 3vw, 31px);
    }
}

@media (max-width: 480px) {
    .block-simple-title-wrapper .simple-title-box,
    .split-simple-title-wrapper .simple-title-box,
    .flip-simple-title-wrapper .simple-title-box,
    .news-simple-title-wrapper .simple-title-box,
    .frame-simple-title-wrapper .simple-title-box,
    .data-simple-title-wrapper .simple-title-box,
    .text-simple-title-wrapper .simple-title-box,
    .accordion-simple-title-wrapper .simple-title-box,
    .download-simple-title-wrapper .simple-title-box,
    .inspirational-simple-title-wrapper .simple-title-box,
    .image-simple-title-wrapper .simple-title-box,
    .form-simple-title-wrapper .simple-title-box {
        min-height: 52px;
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 12px;
    }
    
    .block-simple-title-wrapper .simple-title-text,
    .split-simple-title-wrapper .simple-title-text,
    .flip-simple-title-wrapper .simple-title-text,
    .news-simple-title-wrapper .simple-title-text,
    .frame-simple-title-wrapper .simple-title-text,
    .data-simple-title-wrapper .simple-title-text,
    .text-simple-title-wrapper .simple-title-text,
    .accordion-simple-title-wrapper .simple-title-text,
    .download-simple-title-wrapper .simple-title-text,
    .inspirational-simple-title-wrapper .simple-title-text,
    .image-simple-title-wrapper .simple-title-text,
    .form-simple-title-wrapper .simple-title-text {
        font-size: clamp(24px, 2.5vw, 27px);
    }
}

/* =============================================
   FIX 1: SLIDESHOW VISIBILITY
   The :first-child rule was making first image always visible
   ============================================= */

/* IMAGE BLOCK - Fix first-child visibility */
.image-wrapper.slideshow:first-child {
    position: relative !important;
    z-index: 1;
    /* Don't force opacity:1 - let .active class control visibility */
}

/* When first child is NOT active, hide it */
.image-wrapper.slideshow:first-child:not(.active) {
    opacity: 0 !important;
}

/* Active slideshow wrapper - ensure it shows */
.image-wrapper.slideshow.active {
    opacity: 1 !important;
    z-index: 2 !important;
}

/* SPLIT BLOCK - Fix first-child visibility */
.split-card-image.has-slideshow .split-card-img:first-child:not(.active) {
    opacity: 0 !important;
}

    /* ============================================================================
   UNIVERSAL SPACING SYSTEM - CORRECTED VERSION
   ============================================================================
   
   This replaces the section from line ~9825 to ~10270 in blocks.css
   
   WHAT THIS FIXES:
   1. H-Gap now uses column-gap (was using gap which overwrote v-gap)
   2. V-Gap now uses row-gap (was incorrectly using margins)
   3. Spacing now controls block margins (new addition)
   4. Added missing --spacing-* CSS variables
   5. Consolidated duplicate wrapper definitions
   
   THREE CONTROLS:
   - H-Gap: Horizontal space between columns (column-gap)
   - V-Gap: Vertical space between rows in multi-row grids (row-gap)
   - Spacing: Margins above/below the entire block
   
   ============================================================================ */


/* ============================================================================
   CSS CUSTOM PROPERTIES (Design Tokens)
   ============================================================================ */
/* ============================================================================
   H-GAP CLASSES (Horizontal Gap Between Columns)
   ============================================================================
   Uses column-gap so it doesn't interfere with row-gap
   ============================================================================ */

/* --- SPLIT BLOCK --- */
.split-block-wrapper.h-gap-none { column-gap: var(--h-gap-none) !important; }
.split-block-wrapper.h-gap-narrow { column-gap: var(--h-gap-narrow) !important; }
.split-block-wrapper.h-gap-normal { column-gap: var(--h-gap-normal) !important; }
.split-block-wrapper.h-gap-wide { column-gap: var(--h-gap-wide) !important; }
.split-block-wrapper.h-gap-spacious { column-gap: var(--h-gap-spacious) !important; }

/* --- IMAGE BLOCK --- */
.image-block-wrapper.h-gap-none { column-gap: var(--h-gap-none) !important; }
.image-block-wrapper.h-gap-narrow { column-gap: var(--h-gap-narrow) !important; }
.image-block-wrapper.h-gap-normal { column-gap: var(--h-gap-normal) !important; }
.image-block-wrapper.h-gap-wide { column-gap: var(--h-gap-wide) !important; }
.image-block-wrapper.h-gap-spacious { column-gap: var(--h-gap-spacious) !important; }

/* --- FLIP BLOCK --- */
.flip-block-wrapper.h-gap-none { column-gap: var(--h-gap-none) !important; }
.flip-block-wrapper.h-gap-narrow { column-gap: var(--h-gap-narrow) !important; }
.flip-block-wrapper.h-gap-normal { column-gap: var(--h-gap-normal) !important; }
.flip-block-wrapper.h-gap-wide { column-gap: var(--h-gap-wide) !important; }
.flip-block-wrapper.h-gap-spacious { column-gap: var(--h-gap-spacious) !important; }

/* --- DATA BLOCK --- */
.data-block-wrapper.h-gap-none { column-gap: var(--h-gap-none) !important; }
.data-block-wrapper.h-gap-narrow { column-gap: var(--h-gap-narrow) !important; }
.data-block-wrapper.h-gap-normal { column-gap: var(--h-gap-normal) !important; }
.data-block-wrapper.h-gap-wide { column-gap: var(--h-gap-wide) !important; }
.data-block-wrapper.h-gap-spacious { column-gap: var(--h-gap-spacious) !important; }

/* --- ACCORDION BLOCK --- */
.accordion-block-wrapper.h-gap-none { column-gap: var(--h-gap-none) !important; }
.accordion-block-wrapper.h-gap-narrow { column-gap: var(--h-gap-narrow) !important; }
.accordion-block-wrapper.h-gap-normal { column-gap: var(--h-gap-normal) !important; }
.accordion-block-wrapper.h-gap-wide { column-gap: var(--h-gap-wide) !important; }
.accordion-block-wrapper.h-gap-spacious { column-gap: var(--h-gap-spacious) !important; }

/* --- FRAME BLOCK --- */
.frame-block-wrapper.h-gap-none { column-gap: var(--h-gap-none) !important; }
.frame-block-wrapper.h-gap-narrow { column-gap: var(--h-gap-narrow) !important; }
.frame-block-wrapper.h-gap-normal { column-gap: var(--h-gap-normal) !important; }
.frame-block-wrapper.h-gap-wide { column-gap: var(--h-gap-wide) !important; }
.frame-block-wrapper.h-gap-spacious { column-gap: var(--h-gap-spacious) !important; }

/* --- NEWS BLOCK --- */
.news-block-wrapper.h-gap-none { column-gap: var(--h-gap-none) !important; }
.news-block-wrapper.h-gap-narrow { column-gap: var(--h-gap-narrow) !important; }
.news-block-wrapper.h-gap-normal { column-gap: var(--h-gap-normal) !important; }
.news-block-wrapper.h-gap-wide { column-gap: var(--h-gap-wide) !important; }
.news-block-wrapper.h-gap-spacious { column-gap: var(--h-gap-spacious) !important; }


/* ============================================================================
   V-GAP CLASSES (Vertical Gap Between Rows)
   ============================================================================
   Uses row-gap for space between rows in multi-row grids
   ============================================================================ */

/* --- SPLIT BLOCK --- */
.split-block-wrapper.v-gap-none { row-gap: var(--v-gap-none) !important; }
.split-block-wrapper.v-gap-narrow { row-gap: var(--v-gap-narrow) !important; }
.split-block-wrapper.v-gap-normal { row-gap: var(--v-gap-normal) !important; }
.split-block-wrapper.v-gap-wide { row-gap: var(--v-gap-wide) !important; }
.split-block-wrapper.v-gap-spacious { row-gap: var(--v-gap-spacious) !important; }

/* --- IMAGE BLOCK --- */
.image-block-wrapper.v-gap-none { row-gap: var(--v-gap-none) !important; }
.image-block-wrapper.v-gap-narrow { row-gap: var(--v-gap-narrow) !important; }
.image-block-wrapper.v-gap-normal { row-gap: var(--v-gap-normal) !important; }
.image-block-wrapper.v-gap-wide { row-gap: var(--v-gap-wide) !important; }
.image-block-wrapper.v-gap-spacious { row-gap: var(--v-gap-spacious) !important; }

/* Mobile stacking: override all v-gap values with a usable row gap */
@media (max-width: 768px) {
    .image-block-wrapper.columns-3.v-gap-none,
    .image-block-wrapper.columns-3.v-gap-narrow,
    .image-block-wrapper.columns-3.v-gap-normal,
    .image-block-wrapper.columns-4.v-gap-none,
    .image-block-wrapper.columns-4.v-gap-narrow,
    .image-block-wrapper.columns-4.v-gap-normal { row-gap: 16px !important; }
}
@media (max-width: 480px) {
    .image-block-wrapper.columns-2.v-gap-none,
    .image-block-wrapper.columns-2.v-gap-narrow,
    .image-block-wrapper.columns-2.v-gap-normal,
    .image-block-wrapper.columns-3.v-gap-none,
    .image-block-wrapper.columns-3.v-gap-narrow,
    .image-block-wrapper.columns-3.v-gap-normal,
    .image-block-wrapper.columns-4.v-gap-none,
    .image-block-wrapper.columns-4.v-gap-narrow,
    .image-block-wrapper.columns-4.v-gap-normal { row-gap: 16px !important; }
}

/* --- FLIP BLOCK --- */
.flip-block-wrapper.v-gap-none     { row-gap: 0    !important; }
.flip-block-wrapper.v-gap-narrow    { row-gap: 10px !important; }
.flip-block-wrapper.v-gap-normal    { row-gap: 20px !important; }
.flip-block-wrapper.v-gap-wide      { row-gap: 32px !important; }
.flip-block-wrapper.v-gap-spacious  { row-gap: 48px !important; }

/* Flip block spacing multiplier — applied to card text padding */
.flip-block-wrapper.spacing-none     .flip-card-text { padding: 8px; }
.flip-block-wrapper.spacing-narrow   .flip-card-text { padding: 10px 12px; }
.flip-block-wrapper.spacing-normal   .flip-card-text { padding: 14px 16px; }
.flip-block-wrapper.spacing-wide     .flip-card-text { padding: 18px 20px; }
.flip-block-wrapper.spacing-spacious .flip-card-text { padding: 24px 28px; }

/* --- DATA BLOCK --- */
.data-block-wrapper.v-gap-none { row-gap: var(--v-gap-none) !important; }
.data-block-wrapper.v-gap-narrow { row-gap: var(--v-gap-narrow) !important; }
.data-block-wrapper.v-gap-normal { row-gap: var(--v-gap-normal) !important; }
.data-block-wrapper.v-gap-wide { row-gap: var(--v-gap-wide) !important; }
.data-block-wrapper.v-gap-spacious { row-gap: var(--v-gap-spacious) !important; }
/* When a row of cards wraps onto several lines (tablet/phone), keep a gap
   between stacked cards even if the block's vertical gap is 'none' - 'none'
   suits desktop, where each block is a single row. Must come after the
   rules above, which are also !important. */
@media (max-width: 1024px) {
    .data-block-wrapper.v-gap-none { row-gap: var(--h-gap-normal, 16px) !important; }
}

/* --- ACCORDION BLOCK --- */
.accordion-block-wrapper.v-gap-none { row-gap: var(--v-gap-none) !important; }
.accordion-block-wrapper.v-gap-narrow { row-gap: var(--v-gap-narrow) !important; }
.accordion-block-wrapper.v-gap-normal { row-gap: var(--v-gap-normal) !important; }
.accordion-block-wrapper.v-gap-wide { row-gap: var(--v-gap-wide) !important; }
.accordion-block-wrapper.v-gap-spacious { row-gap: var(--v-gap-spacious) !important; }

/* --- FRAME BLOCK --- */
.frame-block-wrapper.v-gap-none { row-gap: var(--v-gap-none) !important; }
.frame-block-wrapper.v-gap-narrow { row-gap: var(--v-gap-narrow) !important; }
.frame-block-wrapper.v-gap-normal { row-gap: var(--v-gap-normal) !important; }
.frame-block-wrapper.v-gap-wide { row-gap: var(--v-gap-wide) !important; }
.frame-block-wrapper.v-gap-spacious { row-gap: var(--v-gap-spacious) !important; }

/* --- NEWS BLOCK --- */
.news-block-wrapper.v-gap-none { row-gap: var(--v-gap-none) !important; }
.news-block-wrapper.v-gap-narrow { row-gap: var(--v-gap-narrow) !important; }
.news-block-wrapper.v-gap-normal { row-gap: var(--v-gap-normal) !important; }
.news-block-wrapper.v-gap-wide { row-gap: var(--v-gap-wide) !important; }
.news-block-wrapper.v-gap-spacious { row-gap: var(--v-gap-spacious) !important; }


/* ============================================================================
   SPACING CLASSES (Block Margins)
   ============================================================================
   Controls margins above/below the entire block
   Uses :has() to apply margins to outer .soec-block based on inner wrapper class
   ============================================================================ */

/* Spacing None */
.soec-block:has(.spacing-none),
.block-type-split:has(.spacing-none),
.block-type-image:has(.spacing-none),
.block-type-flip:has(.spacing-none),
.block-type-data:has(.spacing-none),
.block-type-accordion:has(.spacing-none),
.block-type-frame:has(.spacing-none),
.block-type-news:has(.spacing-none),
.block-type-text:has(.spacing-none),
.block-type-quote:has(.spacing-none),
.block-type-download:has(.spacing-none),
.block-type-video:has(.spacing-none),
.block-type-form:has(.spacing-none),
.block-type-inspirational:has(.spacing-none) {
    margin-top: var(--spacing-none) !important;
    margin-bottom: var(--spacing-none) !important;
}

/* Spacing Tight */
.soec-block:has(.spacing-tight),
.block-type-split:has(.spacing-tight),
.block-type-image:has(.spacing-tight),
.block-type-flip:has(.spacing-tight),
.block-type-data:has(.spacing-tight),
.block-type-accordion:has(.spacing-tight),
.block-type-frame:has(.spacing-tight),
.block-type-news:has(.spacing-tight),
.block-type-text:has(.spacing-tight),
.block-type-quote:has(.spacing-tight),
.block-type-download:has(.spacing-tight),
.block-type-video:has(.spacing-tight),
.block-type-form:has(.spacing-tight),
.block-type-inspirational:has(.spacing-tight) {
    margin-top: var(--spacing-tight) !important;
    margin-bottom: var(--spacing-tight) !important;
}

/* Spacing Narrow */
.soec-block:has(.spacing-narrow),
.block-type-split:has(.spacing-narrow),
.block-type-image:has(.spacing-narrow),
.block-type-flip:has(.spacing-narrow),
.block-type-data:has(.spacing-narrow),
.block-type-accordion:has(.spacing-narrow),
.block-type-frame:has(.spacing-narrow),
.block-type-news:has(.spacing-narrow),
.block-type-text:has(.spacing-narrow),
.block-type-quote:has(.spacing-narrow),
.block-type-download:has(.spacing-narrow),
.block-type-video:has(.spacing-narrow),
.block-type-form:has(.spacing-narrow),
.block-type-inspirational:has(.spacing-narrow) {
    margin-top: var(--spacing-narrow) !important;
    margin-bottom: var(--spacing-narrow) !important;
}

/* Spacing Normal */
.soec-block:has(.spacing-normal),
.block-type-split:has(.spacing-normal),
.block-type-image:has(.spacing-normal),
.block-type-flip:has(.spacing-normal),
.block-type-data:has(.spacing-normal),
.block-type-accordion:has(.spacing-normal),
.block-type-frame:has(.spacing-normal),
.block-type-news:has(.spacing-normal),
.block-type-text:has(.spacing-normal),
.block-type-quote:has(.spacing-normal),
.block-type-download:has(.spacing-normal),
.block-type-video:has(.spacing-normal),
.block-type-form:has(.spacing-normal),
.block-type-inspirational:has(.spacing-normal) {
    margin-top: var(--spacing-normal) !important;
    margin-bottom: var(--spacing-normal) !important;
}

/* Spacing Spacious */
.soec-block:has(.spacing-spacious),
.block-type-split:has(.spacing-spacious),
.block-type-image:has(.spacing-spacious),
.block-type-flip:has(.spacing-spacious),
.block-type-data:has(.spacing-spacious),
.block-type-accordion:has(.spacing-spacious),
.block-type-frame:has(.spacing-spacious),
.block-type-news:has(.spacing-spacious),
.block-type-text:has(.spacing-spacious),
.block-type-quote:has(.spacing-spacious),
.block-type-download:has(.spacing-spacious),
.block-type-video:has(.spacing-spacious),
.block-type-form:has(.spacing-spacious),
.block-type-inspirational:has(.spacing-spacious) {
    margin-top: var(--spacing-spacious) !important;
    margin-bottom: var(--spacing-spacious) !important;
}

/* Spacing Wide */
.soec-block:has(.spacing-wide),
.block-type-split:has(.spacing-wide),
.block-type-image:has(.spacing-wide),
.block-type-flip:has(.spacing-wide),
.block-type-data:has(.spacing-wide),
.block-type-accordion:has(.spacing-wide),
.block-type-frame:has(.spacing-wide),
.block-type-news:has(.spacing-wide),
.block-type-text:has(.spacing-wide),
.block-type-quote:has(.spacing-wide),
.block-type-download:has(.spacing-wide),
.block-type-video:has(.spacing-wide),
.block-type-form:has(.spacing-wide),
.block-type-inspirational:has(.spacing-wide) {
    margin-top: var(--spacing-wide) !important;
    margin-bottom: var(--spacing-wide) !important;
}


/* ============================================================================
   FLIP BLOCK GAP OVERRIDES
   These must come AFTER the spacing-* rules above so they win the cascade
   ----------------------------------------------------------------------------
   Flip Block gets wrapped in .soec-block.block-type-flip (via the inherited
   render_block_wrapper() helper) same as every other block type, so it was
   also picking up the unified .block-type-flip:has(.spacing-X) margin rules
   above — a FIXED margin-top/margin-bottom (20px at the default "normal"
   density) that isn't exposed as an adjustable control anywhere in the Flip
   Block editor. That fixed margin was swamping the dedicated Top Gap /
   Bottom Gap (v-gap / block-gap) padding controls on .flip-block-wrapper,
   which is why changing those settings appeared to do nothing — the visible
   gap was mostly this hidden, constant margin. Zeroing it out here makes
   Top Gap / Bottom Gap the sole source of spacing between flip blocks.
   ============================================================================ */
.soec-block.block-type-flip {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
}

/* ============================================================================
   INTERNAL DENSITY CLASSES (Card Content Spacing)
   ============================================================================
   Controls padding, line-height, and gaps between internal elements
   Uses the --spacing-mult-* multipliers
   ============================================================================ */

/* --- SPLIT BLOCK INTERNAL SPACING --- */

.split-block-wrapper.density-none .split-card-text {
    padding: calc(var(--base-padding) * var(--spacing-mult-none)) !important;
}
.split-block-wrapper.density-none .split-card-text h3 {
    margin-bottom: calc(var(--base-element-gap) * var(--spacing-mult-none)) !important;
}
.split-block-wrapper.density-none .split-card-text p {
    line-height: calc(var(--base-line-height) * var(--spacing-mult-none)) !important;
}

.split-block-wrapper.density-narrow .split-card-text {
    padding: calc(var(--base-padding) * var(--spacing-mult-narrow)) !important;
}
.split-block-wrapper.density-narrow .split-card-text h3 {
    margin-bottom: calc(var(--base-element-gap) * var(--spacing-mult-narrow)) !important;
}
.split-block-wrapper.density-narrow .split-card-text p {
    line-height: calc(var(--base-line-height) * var(--spacing-mult-narrow)) !important;
}

.split-block-wrapper.density-normal .split-card-text {
    padding: calc(var(--base-padding) * var(--spacing-mult-normal)) !important;
}
.split-block-wrapper.density-normal .split-card-text h3 {
    margin-bottom: calc(var(--base-element-gap) * var(--spacing-mult-normal)) !important;
}
.split-block-wrapper.density-normal .split-card-text p {
    line-height: calc(var(--base-line-height) * var(--spacing-mult-normal)) !important;
}

.split-block-wrapper.density-wide .split-card-text {
    padding: calc(var(--base-padding) * var(--spacing-mult-wide)) !important;
}
.split-block-wrapper.density-wide .split-card-text h3 {
    margin-bottom: calc(var(--base-element-gap) * var(--spacing-mult-wide)) !important;
}
.split-block-wrapper.density-wide .split-card-text p {
    line-height: calc(var(--base-line-height) * var(--spacing-mult-wide)) !important;
}

.split-block-wrapper.density-spacious .split-card-text {
    padding: calc(var(--base-padding) * var(--spacing-mult-spacious)) !important;
}
.split-block-wrapper.density-spacious .split-card-text h3 {
    margin-bottom: calc(var(--base-element-gap) * var(--spacing-mult-spacious)) !important;
}
.split-block-wrapper.density-spacious .split-card-text p {
    line-height: calc(var(--base-line-height) * var(--spacing-mult-spacious)) !important;
}

/* --- SPLIT/NEWS BLOCK: BUTTON SPACING ---
   Controls the gap between body text and button via padding-top on the button
   wrapper. margin-top: auto on .split-card-button-wrapper ensures the button
   always anchors to the card bottom regardless of body text length. */

.split-block-wrapper.button-spacing-none .split-card-button-wrapper {
    padding-top: 0 !important;
}
.split-block-wrapper.button-spacing-narrow .split-card-button-wrapper {
    padding-top: 0.5rem !important;
}
.split-block-wrapper.button-spacing-normal .split-card-button-wrapper {
    padding-top: 1rem !important;
}
.split-block-wrapper.button-spacing-wide .split-card-button-wrapper {
    padding-top: 1.5rem !important;
}
.split-block-wrapper.button-spacing-spacious .split-card-button-wrapper {
    padding-top: 2.25rem !important;
}


/* --- IMAGE BLOCK INTERNAL SPACING --- */

.image-block-wrapper.density-none .image-caption {
    padding: calc(8px * var(--spacing-mult-none)) !important;
    margin-top: calc(4px * var(--spacing-mult-none)) !important;
}

.image-block-wrapper.density-narrow .image-caption {
    padding: calc(8px * var(--spacing-mult-narrow)) !important;
    margin-top: calc(4px * var(--spacing-mult-narrow)) !important;
}

.image-block-wrapper.density-normal .image-caption {
    padding: calc(8px * var(--spacing-mult-normal)) !important;
    margin-top: calc(4px * var(--spacing-mult-normal)) !important;
}

.image-block-wrapper.density-wide .image-caption {
    padding: calc(8px * var(--spacing-mult-wide)) !important;
    margin-top: calc(4px * var(--spacing-mult-wide)) !important;
}

.image-block-wrapper.density-spacious .image-caption {
    padding: calc(8px * var(--spacing-mult-spacious)) !important;
    margin-top: calc(4px * var(--spacing-mult-spacious)) !important;
}


/* --- FLIP BLOCK INTERNAL SPACING --- */

.flip-block-wrapper.density-none .flip-card-text {
    padding: calc(var(--base-padding) * var(--spacing-mult-none)) !important;
}
.flip-block-wrapper.density-narrow .flip-card-text {
    padding: calc(var(--base-padding) * var(--spacing-mult-narrow)) !important;
}
.flip-block-wrapper.density-normal .flip-card-text {
    padding: calc(var(--base-padding) * var(--spacing-mult-normal)) !important;
}
.flip-block-wrapper.density-wide .flip-card-text {
    padding: calc(var(--base-padding) * var(--spacing-mult-wide)) !important;
}
.flip-block-wrapper.density-spacious .flip-card-text {
    padding: calc(var(--base-padding) * var(--spacing-mult-spacious)) !important;
}


/* --- DATA BLOCK INTERNAL SPACING --- */

.data-block-wrapper.density-none .data-card-content {
    padding: calc(var(--base-padding) * var(--spacing-mult-none)) !important;
}
.data-block-wrapper.density-narrow .data-card-content {
    padding: calc(var(--base-padding) * var(--spacing-mult-narrow)) !important;
}
.data-block-wrapper.density-normal .data-card-content {
    padding: calc(var(--base-padding) * var(--spacing-mult-normal)) !important;
}
.data-block-wrapper.density-wide .data-card-content {
    padding: calc(var(--base-padding) * var(--spacing-mult-wide)) !important;
}
.data-block-wrapper.density-spacious .data-card-content {
    padding: calc(var(--base-padding) * var(--spacing-mult-spacious)) !important;
}


/* --- ACCORDION BLOCK INTERNAL SPACING --- */

.accordion-block-wrapper.density-none .accordion-content {
    padding: calc(var(--base-padding) * var(--spacing-mult-none)) !important;
}
.accordion-block-wrapper.density-narrow .accordion-content {
    padding: calc(var(--base-padding) * var(--spacing-mult-narrow)) !important;
}
.accordion-block-wrapper.density-normal .accordion-content {
    padding: calc(var(--base-padding) * var(--spacing-mult-normal)) !important;
}
.accordion-block-wrapper.density-wide .accordion-content {
    padding: calc(var(--base-padding) * var(--spacing-mult-wide)) !important;
}
.accordion-block-wrapper.density-spacious .accordion-content {
    padding: calc(var(--base-padding) * var(--spacing-mult-spacious)) !important;
}


/* --- NEWS BLOCK INTERNAL SPACING --- */

.news-block-wrapper.density-none .news-card-text {
    padding: calc(var(--base-padding) * var(--spacing-mult-none)) !important;
}
.news-block-wrapper.density-narrow .news-card-text {
    padding: calc(var(--base-padding) * var(--spacing-mult-narrow)) !important;
}
.news-block-wrapper.density-normal .news-card-text {
    padding: calc(var(--base-padding) * var(--spacing-mult-normal)) !important;
}
.news-block-wrapper.density-wide .news-card-text {
    padding: calc(var(--base-padding) * var(--spacing-mult-wide)) !important;
}
.news-block-wrapper.density-spacious .news-card-text {
    padding: calc(var(--base-padding) * var(--spacing-mult-spacious)) !important;
}


/* ============================================================================
   BACKWARD COMPATIBILITY
   ============================================================================
   Map old class names to new system
   ============================================================================ */

/* Old gap-* classes → now use column-gap (horizontal only) */
.split-block-wrapper.gap-none { column-gap: var(--h-gap-none) !important; row-gap: var(--v-gap-normal) !important; }
.split-block-wrapper.gap-narrow { column-gap: var(--h-gap-narrow) !important; row-gap: var(--v-gap-normal) !important; }
.split-block-wrapper.gap-normal { column-gap: var(--h-gap-normal) !important; row-gap: var(--v-gap-normal) !important; }
.split-block-wrapper.gap-wide { column-gap: var(--h-gap-wide) !important; row-gap: var(--v-gap-normal) !important; }
.split-block-wrapper.gap-spacious { column-gap: var(--h-gap-spacious) !important; row-gap: var(--v-gap-normal) !important; }

.image-block-wrapper.gap-none { column-gap: var(--h-gap-none) !important; row-gap: var(--v-gap-normal) !important; }
.image-block-wrapper.gap-narrow { column-gap: var(--h-gap-narrow) !important; row-gap: var(--v-gap-normal) !important; }
.image-block-wrapper.gap-normal { column-gap: var(--h-gap-normal) !important; row-gap: var(--v-gap-normal) !important; }
.image-block-wrapper.gap-wide { column-gap: var(--h-gap-wide) !important; row-gap: var(--v-gap-normal) !important; }
.image-block-wrapper.gap-spacious { column-gap: var(--h-gap-spacious) !important; row-gap: var(--v-gap-normal) !important; }

.data-block-wrapper.gap-none { column-gap: var(--h-gap-none) !important; row-gap: var(--v-gap-normal) !important; }
.data-block-wrapper.gap-narrow { column-gap: var(--h-gap-narrow) !important; row-gap: var(--v-gap-normal) !important; }
.data-block-wrapper.gap-normal { column-gap: var(--h-gap-normal) !important; row-gap: var(--v-gap-normal) !important; }
.data-block-wrapper.gap-wide { column-gap: var(--h-gap-wide) !important; row-gap: var(--v-gap-normal) !important; }
.data-block-wrapper.gap-spacious { column-gap: var(--h-gap-spacious) !important; row-gap: var(--v-gap-normal) !important; }

/* ============================================================================
   END OF UNIVERSAL SPACING SYSTEM
   ============================================================================ */

   /* ============================================================================
   COMPREHENSIVE ASPECT RATIO CLASSES
   All ratios offered in Image Block admin
   ============================================================================ */

/* Ultra-wide and Banner ratios */
.aspect-16-1 { aspect-ratio: 16 / 1; }
.aspect-14-1 { aspect-ratio: 14 / 1; }
.aspect-12-1 { aspect-ratio: 12 / 1; }
.aspect-10-1 { aspect-ratio: 10 / 1; }
.aspect-8-1 { aspect-ratio: 8 / 1; }
.aspect-6-1 { aspect-ratio: 6 / 1; }
.aspect-5-1 { aspect-ratio: 5 / 1; }
.aspect-4-1 { aspect-ratio: 4 / 1; }
.aspect-3-1 { aspect-ratio: 3 / 1; }
.aspect-2-1 { aspect-ratio: 2 / 1; }

/* Cinema and Widescreen */
.aspect-32-9 { aspect-ratio: 32 / 9; }
.aspect-21-9 { aspect-ratio: 21 / 9; }
.aspect-16-9 { aspect-ratio: 16 / 9; }

/* Standard */
.aspect-5-4 { aspect-ratio: 5 / 4; }
.aspect-4-3 { aspect-ratio: 4 / 3; }
.aspect-3-2 { aspect-ratio: 3 / 2; }
.aspect-1-1 { aspect-ratio: 1 / 1; }

/* Portrait */
.aspect-2-3 { aspect-ratio: 2 / 3; }
.aspect-3-4 { aspect-ratio: 3 / 4; }
.aspect-4-5 { aspect-ratio: 4 / 5; }
.aspect-9-16 { aspect-ratio: 9 / 16; }
.aspect-1-2 { aspect-ratio: 1 / 2; }

/* Apply to image items as well */
.image-item.aspect-16-1 { aspect-ratio: 16 / 1; }
.image-item.aspect-14-1 { aspect-ratio: 14 / 1; }
.image-item.aspect-12-1 { aspect-ratio: 12 / 1; }
.image-item.aspect-10-1 { aspect-ratio: 10 / 1; }
.image-item.aspect-8-1 { aspect-ratio: 8 / 1; }
.image-item.aspect-6-1 { aspect-ratio: 6 / 1; }
.image-item.aspect-5-1 { aspect-ratio: 5 / 1; }
.image-item.aspect-4-1 { aspect-ratio: 4 / 1; }
.image-item.aspect-3-1 { aspect-ratio: 3 / 1; }
.image-item.aspect-2-1 { aspect-ratio: 2 / 1; }
.image-item.aspect-32-9 { aspect-ratio: 32 / 9; }
.image-item.aspect-21-9 { aspect-ratio: 21 / 9; }
.image-item.aspect-16-9 { aspect-ratio: 16 / 9; }
.image-item.aspect-5-4 { aspect-ratio: 5 / 4; }
.image-item.aspect-4-3 { aspect-ratio: 4 / 3; }
.image-item.aspect-3-2 { aspect-ratio: 3 / 2; }
.image-item.aspect-1-1 { aspect-ratio: 1 / 1; }
.image-item.aspect-2-3 { aspect-ratio: 2 / 3; }
.image-item.aspect-3-4 { aspect-ratio: 3 / 4; }
.image-item.aspect-4-5 { aspect-ratio: 4 / 5; }
.image-item.aspect-9-16 { aspect-ratio: 9 / 16; }
.image-item.aspect-1-2 { aspect-ratio: 1 / 2; }


/* ============================================================================
   IMAGE BLOCK - BADGE SUPPORT
   ============================================================================ */

.image-item {
    position: relative;
}

.image-card-badge {
    position: absolute;
    z-index: 10;
    pointer-events: none;
}

.image-card-badge img,
.image-card-badge svg {
    display: block;
    width: 100%;
    height: auto;
}

/* Badge sizes */
.image-card-badge.badge-size-small { width: 40px; }
.image-card-badge.badge-size-medium { width: 60px; }
.image-card-badge.badge-size-large { width: 80px; }

/* Badge positions */
.image-card-badge.badge-pos-tl { top: 10px; left: 10px; }
.image-card-badge.badge-pos-tr { top: 10px; right: 10px; }
.image-card-badge.badge-pos-bl { bottom: 10px; left: 10px; }
.image-card-badge.badge-pos-br { bottom: 10px; right: 10px; }

/* SVG badge color inheritance via currentColor */
.image-card-badge svg path,
.image-card-badge svg circle,
.image-card-badge svg rect,
.image-card-badge svg polygon,
.image-card-badge svg line,
.image-card-badge svg ellipse {
    fill: currentColor;
}

/* Badge color classes (sets currentColor) */
.badge-color-white { color: #ffffff; }
.badge-color-black { color: #000000; }
.badge-color-charcoal { color: #333333; }
.badge-color-forest-green { color: #1b5137; }
.badge-color-emerald-green { color: #059669; }
.badge-color-sage-green { color: #8ca280; }
.badge-color-burgundy { color: #8b2635; }
.badge-color-rust-red { color: #cc4020; }
.badge-color-tab-blue { color: #4f9aa8; }
.badge-color-highlight-orange { color: #e1a038; }

/* Split block badges use same color classes */
.split-card-badge.badge-color-white { color: #ffffff; }
.split-card-badge.badge-color-black { color: #000000; }
.split-card-badge.badge-color-charcoal { color: #333333; }
.split-card-badge.badge-color-forest-green { color: #1b5137; }
.split-card-badge.badge-color-emerald-green { color: #059669; }
.split-card-badge.badge-color-sage-green { color: #8ca280; }
.split-card-badge.badge-color-burgundy { color: #8b2635; }
.split-card-badge.badge-color-rust-red { color: #cc4020; }
.split-card-badge.badge-color-tab-blue { color: #4f9aa8; }
.split-card-badge.badge-color-highlight-orange { color: #e1a038; }

.split-card-badge svg path,
.split-card-badge svg circle,
.split-card-badge svg rect,
.split-card-badge svg polygon,
.split-card-badge svg line,
.split-card-badge svg ellipse {
    fill: currentColor;
}

/* ============================================================================
   QUOTE BLOCK - BADGE
   Same positioning/sizing convention as .image-card-badge / .split-card-badge;
   .quote-card already has position: relative.
   ============================================================================ */
.quote-card-badge {
    position: absolute;
    z-index: 10;
    pointer-events: none;
}

.quote-card-badge img,
.quote-card-badge svg {
    display: block;
    width: 100%;
    height: auto;
}

/* Badge sizes */
.quote-card-badge.badge-size-small { width: 40px; }
.quote-card-badge.badge-size-medium { width: 60px; }
.quote-card-badge.badge-size-large { width: 80px; }
.quote-card-badge.badge-size-xl { width: 120px; }

/* Badge positions */
.quote-card-badge.badge-pos-tl { top: 10px; left: 10px; }
.quote-card-badge.badge-pos-tr { top: 10px; right: 10px; }
.quote-card-badge.badge-pos-bl { bottom: 10px; left: 10px; }
.quote-card-badge.badge-pos-br { bottom: 10px; right: 10px; }

/* Quote block badges use the same shared .badge-color-* classes defined above */
.quote-card-badge svg path,
.quote-card-badge svg circle,
.quote-card-badge svg rect,
.quote-card-badge svg polygon,
.quote-card-badge svg line,
.quote-card-badge svg ellipse {
    fill: currentColor;
}


/* ============================================================================
   IMAGE BLOCK - NO-HOVER STATE (Mouseover Toggle)
   ============================================================================ */

/* ============================================
   IMAGE BLOCK - UNIFIED HOVER BEHAVIOR
   (Matching Split Block pattern)
   ============================================ */

/* Hover effect only when mouseover is enabled */
.image-item:not(.no-hover):hover {
    transform: translateY(-4px);
}

/* Hover shadows - apply based on shadow-strength class */
.image-block-wrapper.shadow-none .image-item:not(.no-hover):hover {
    box-shadow:
        1px 2px 4px hsl(var(--shadow-hsl) / 0.20),
        2px 4px 10px hsl(var(--shadow-hsl) / 0.14),
        4px 8px 16px hsl(var(--shadow-hsl) / 0.10);
}

.image-block-wrapper.shadow-light .image-item:not(.no-hover):hover,
.image-block-wrapper.shadow-mild .image-item:not(.no-hover):hover {
    box-shadow:
        2px 4px 8px hsl(var(--shadow-hsl) / 0.22),
        4px 8px 16px hsl(var(--shadow-hsl) / 0.16),
        6px 12px 24px hsl(var(--shadow-hsl) / 0.12);
}

.image-block-wrapper.shadow-moderate .image-item:not(.no-hover):hover {
    box-shadow:
        2px 4px 8px hsl(var(--shadow-hsl) / 0.24),
        4px 8px 18px hsl(var(--shadow-hsl) / 0.18),
        8px 14px 28px hsl(var(--shadow-hsl) / 0.14);
}

.image-block-wrapper.shadow-medium .image-item:not(.no-hover):hover {
    box-shadow:
        3px 6px 10px hsl(var(--shadow-hsl) / 0.30),
        6px 12px 22px hsl(var(--shadow-hsl) / 0.22),
        10px 18px 32px hsl(var(--shadow-hsl) / 0.16);
}

.image-block-wrapper.shadow-heavy .image-item:not(.no-hover):hover,
.image-block-wrapper.shadow-strong .image-item:not(.no-hover):hover {
    box-shadow:
        4px 8px 14px hsl(var(--shadow-hsl) / 0.40),
        10px 18px 32px hsl(var(--shadow-hsl) / 0.30),
        18px 30px 50px hsl(var(--shadow-hsl) / 0.22);
}

.image-block-wrapper.shadow-vheavy .image-item:not(.no-hover):hover,
.image-block-wrapper.shadow-very-strong .image-item:not(.no-hover):hover {
    box-shadow:
        5px 10px 18px hsl(var(--shadow-hsl) / 0.42),
        12px 22px 38px hsl(var(--shadow-hsl) / 0.32),
        22px 36px 56px hsl(var(--shadow-hsl) / 0.24);
}

/* ============================================
   IMAGE BLOCK - NO-HOVER PROTECTION
   (Suppress hover effects when mouseover_enabled is unchecked)
   ============================================ */

.image-item.no-hover {
    cursor: default;
}

.image-item.no-hover:hover {
    transform: none !important;
    box-shadow: none !important;
}

.image-item.no-hover .image-wrapper:hover img {
    transform: scale(var(--img-scale, 1)) !important;
}

.image-item.no-hover .image-link:hover {
    transform: none !important;
    box-shadow: none !important;
}

.image-item.no-hover.has-overlay:hover .image-container::after {
    background: inherit !important;
    opacity: inherit !important;
}

.image-item.no-hover.ken-burns .image-wrapper:hover img {
    transform: none !important;
}

/* Suppress scroll-zoom (midway-zoomable) on no-hover items */
.image-item.no-hover.midway-zoomable {
    transform: none !important;
    transition: none !important;
}


/* ============================================================================
   FRAME BLOCK - MARKER SHADOW CLASSES
   ============================================================================ */

/* Marker shadow levels using filter drop-shadow for better PNG/SVG support */
.soec-map-marker.marker-shadow-none {
    filter: none;
}

.soec-map-marker.marker-shadow-light {
    filter: drop-shadow(1px 2px 3px rgba(0, 0, 0, 0.25));
}

.soec-map-marker.marker-shadow-moderate {
    filter: drop-shadow(2px 3px 5px rgba(0, 0, 0, 0.30));
}

.soec-map-marker.marker-shadow-medium {
    filter: drop-shadow(3px 4px 7px rgba(0, 0, 0, 0.35));
}

.soec-map-marker.marker-shadow-heavy {
    filter: drop-shadow(4px 6px 10px rgba(0, 0, 0, 0.40));
}

.soec-map-marker.marker-shadow-vheavy {
    filter: drop-shadow(6px 8px 14px rgba(0, 0, 0, 0.50));
}


/* ============================================================================
   FRAME BLOCK - SCROLL ZOOM LOCK INDICATOR
   ============================================================================ */

/* Visual indicator when scroll zoom is active */
.mapbox-map.scroll-zoom-active {
    outline: 2px solid var(--color-highlight-orange, #e1a038);
    outline-offset: -2px;
}

/* Cursor hint when scroll zoom is locked */
.mapbox-map:not(.scroll-zoom-active) {
    cursor: grab;
}

.mapbox-map.scroll-zoom-active {
    cursor: default;
}


/* ============================================================================
   FRAME BLOCK SHADOW CLASSES
   ============================================================================ */

.frame-block-wrapper.shadow-none .frame-item {
    box-shadow: none;
}

.frame-block-wrapper.shadow-light .frame-item {
    box-shadow: 
        1px 1px 2px hsl(var(--shadow-hsl) / 0.15),
        2px 2px 4px hsl(var(--shadow-hsl) / 0.10),
        3px 4px 6px hsl(var(--shadow-hsl) / 0.06);
}

.frame-block-wrapper.shadow-moderate .frame-item {
    box-shadow: 
        1px 2px 4px hsl(var(--shadow-hsl) / 0.20),
        2px 4px 10px hsl(var(--shadow-hsl) / 0.14),
        4px 8px 16px hsl(var(--shadow-hsl) / 0.10);
}

.frame-block-wrapper.shadow-medium .frame-item {
    box-shadow: 
        2px 4px 6px hsl(var(--shadow-hsl) / 0.26),
        4px 8px 16px hsl(var(--shadow-hsl) / 0.18),
        8px 12px 22px hsl(var(--shadow-hsl) / 0.14);
}

.frame-block-wrapper.shadow-heavy .frame-item {
    box-shadow: 
        3px 6px 10px hsl(var(--shadow-hsl) / 0.32),
        6px 12px 24px hsl(var(--shadow-hsl) / 0.22),
        12px 20px 32px hsl(var(--shadow-hsl) / 0.16);
}

.frame-block-wrapper.shadow-vheavy .frame-item {
    box-shadow: 
        4px 8px 14px hsl(var(--shadow-hsl) / 0.38),
        10px 18px 32px hsl(var(--shadow-hsl) / 0.28),
        18px 30px 48px hsl(var(--shadow-hsl) / 0.20);
}

/* Backward compatibility for old shadow values */
.frame-block-wrapper.shadow-mild .frame-item {
    box-shadow: 
        1px 1px 2px hsl(var(--shadow-hsl) / 0.15),
        2px 2px 4px hsl(var(--shadow-hsl) / 0.10),
        3px 4px 6px hsl(var(--shadow-hsl) / 0.06);
}

.frame-block-wrapper.shadow-strong .frame-item {
    box-shadow: 
        3px 6px 10px hsl(var(--shadow-hsl) / 0.32),
        6px 12px 24px hsl(var(--shadow-hsl) / 0.22),
        12px 20px 32px hsl(var(--shadow-hsl) / 0.16);
}


/* ============================================================================
   OVERLAY BACKGROUND COLOR UTILITIES
   ============================================================================ */

/* Overlay background color classes for use with rgba */
.overlay-bg-white { --overlay-base-rgb: 255, 255, 255; }
.overlay-bg-black { --overlay-base-rgb: 0, 0, 0; }
.overlay-bg-charcoal { --overlay-base-rgb: 51, 51, 51; }
.overlay-bg-forest-green { --overlay-base-rgb: 27, 81, 55; }
.overlay-bg-emerald-green { --overlay-base-rgb: 5, 150, 105; }
.overlay-bg-sage-green { --overlay-base-rgb: 140, 162, 128; }
.overlay-bg-burgundy { --overlay-base-rgb: 139, 38, 53; }
.overlay-bg-rust-red { --overlay-base-rgb: 204, 64, 32; }
.overlay-bg-tab-blue { --overlay-base-rgb: 79, 154, 168; }
.overlay-bg-highlight-orange { --overlay-base-rgb: 225, 160, 56; }


/* ============================================================================
   END OF ADDITIONS
   ============================================================================ */

/* ========================================
   END OF BLOCKS.CSS
   ======================================== *//* ===========================================
   QUOTE BLOCK ENHANCEMENTS
   Add this to end of blocks.css
   =========================================== */

/* Quote block wrapper - full width fix */
.quote-block-wrapper {
    width: 100%;
    max-width: 100%;
    box-shadow: none !important;
}

.quote-card {
    width: 100%;
    max-width: 100%;
}

.quote-animated-title-wrapper {
    max-width: 100%;
}

/* ===========================================
   SHADOW CLASSES
   =========================================== */
.quote-block-wrapper.shadow-none blockquote {
    box-shadow: none !important;
}

.quote-block-wrapper.shadow-light blockquote {
    box-shadow:
        1px 1px 2px hsl(var(--shadow-hsl, 210 50% 20%) / 0.15),
        2px 2px 4px hsl(var(--shadow-hsl, 210 50% 20%) / 0.10),
        3px 4px 6px hsl(var(--shadow-hsl, 210 50% 20%) / 0.06) !important;
}

.quote-block-wrapper.shadow-moderate blockquote {
    box-shadow:
        1px 2px 4px hsl(var(--shadow-hsl, 210 50% 20%) / 0.20),
        2px 4px 10px hsl(var(--shadow-hsl, 210 50% 20%) / 0.14),
        4px 8px 16px hsl(var(--shadow-hsl, 210 50% 20%) / 0.10) !important;
}

.quote-block-wrapper.shadow-medium blockquote {
    box-shadow: 0 8px 24px rgba(6, 39, 53, 0.25) !important;
}

.quote-block-wrapper.shadow-heavy blockquote {
    box-shadow:
        3px 6px 10px hsl(var(--shadow-hsl, 210 50% 20%) / 0.32),
        6px 12px 24px hsl(var(--shadow-hsl, 210 50% 20%) / 0.22),
        12px 20px 32px hsl(var(--shadow-hsl, 210 50% 20%) / 0.16) !important;
}

.quote-block-wrapper.shadow-vheavy blockquote {
    box-shadow:
        4px 8px 14px hsl(var(--shadow-hsl, 210 50% 20%) / 0.38),
        10px 18px 32px hsl(var(--shadow-hsl, 210 50% 20%) / 0.28),
        18px 30px 48px hsl(var(--shadow-hsl, 210 50% 20%) / 0.20) !important;
}

/* ===========================================
   V-GAP CLASSES
   =========================================== */
.quote-block-wrapper.v-gap-none { margin-top: 0; margin-bottom: 0; }
.quote-block-wrapper.v-gap-narrow { margin-top: 10px; margin-bottom: 10px; }
.quote-block-wrapper.v-gap-normal { margin-top: 20px; margin-bottom: 20px; }
.quote-block-wrapper.v-gap-wide { margin-top: 40px; margin-bottom: 40px; }
.quote-block-wrapper.v-gap-spacious { margin-top: 60px; margin-bottom: 60px; }

/* ===========================================
   DENSITY/SPACING CLASSES
   =========================================== */
.quote-block-wrapper.density-none blockquote { 
    padding: 1rem 2rem !important; 
}
.quote-block-wrapper.density-narrow blockquote { 
    padding: 1.5rem 2.5rem !important; 
}
.quote-block-wrapper.density-normal blockquote { 
    padding: clamp(2rem, 5vw, 4rem) clamp(3rem, 10vw, 6rem) !important; 
}
.quote-block-wrapper.density-wide blockquote { 
    padding: clamp(3rem, 7vw, 5rem) clamp(4rem, 12vw, 8rem) !important; 
}
.quote-block-wrapper.density-spacious blockquote { 
    padding: clamp(4rem, 9vw, 6rem) clamp(5rem, 14vw, 10rem) !important; 
}

/* ===========================================
   SVG QUOTE MARKS
   =========================================== */
blockquote .quote-mark-svg {
    position: absolute;
    width: clamp(20px, 4vw, 41px);
    height: auto;
    opacity: 0.3;
    z-index: 1;
    pointer-events: none;
}

blockquote .quote-mark-svg.quote-mark-left {
    top: 20px;
    left: 12px;
}

blockquote .quote-mark-svg.quote-mark-right {
    bottom: 25px;
    right: 12px;
    transform: rotate(180deg);
}

blockquote .quote-mark-svg path {
    fill: currentColor;
}

/* Hide legacy marks when SVG present */
blockquote.has-svg-marks:before,
blockquote.has-svg-marks:after {
    display: none !important;
}

/* ===========================================
   TEXT MARGINS & PADDING
   =========================================== */
blockquote.style1,
blockquote.style2 {
    padding: clamp(2rem, 5vw, 4rem) clamp(3rem, 10vw, 6rem);
}

blockquote .content {
    margin: 0 clamp(10px, 3vw, 30px);
    max-width: 90%;
}

/* ===========================================
   SIMPLE TITLE STYLE
   =========================================== */
.quote-simple-title-wrapper {
    width: 100%;
    max-width: 100%;
}

.quote-simple-title-wrapper .simple-title-box {
    aspect-ratio: 16 / 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    overflow: hidden;
}

.quote-simple-title-wrapper .simple-title-text {
    color: #fff;
    font-family: 'Fraunces', serif;
    font-size: clamp(1rem, 2vw, 1.5rem);
    font-weight: 600;
    text-align: center;
    padding: 0 20px;
}

/* ===========================================
   MOBILE RESPONSIVE
   =========================================== */
@media (max-width: 768px) {
    blockquote.style1,
    blockquote.style2 {
        padding: 1.5rem 2rem !important;
    }
    
    blockquote .content {
        margin: 0 10px;
    }
    
    blockquote .quote-mark-svg {
        width: 17px;
    }
    
    blockquote .quote-mark-svg.quote-mark-left {
        top: 15px;
        left: 8px;
    }
    
    blockquote .quote-mark-svg.quote-mark-right {
        bottom: 18px;
        right: 8px;
    }
    
    .quote-block-wrapper.density-wide blockquote,
    .quote-block-wrapper.density-spacious blockquote {
        padding: 2rem 2.5rem !important;
    }
}

/**
 * ============================================================================
 * SOEC Form Modal Styles
 * ============================================================================
 * Styles for the AJAX-loaded form modal
 * Include this in your theme's stylesheet or enqueue separately
 * 
 * VERSION: 1.0.0
 */

/* Modal Container */
.soec-form-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.soec-form-modal.is-active {
    opacity: 1;
    visibility: visible;
}

/* Backdrop */
.soec-form-modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.75);
    cursor: pointer;
}

/* Modal Container */
.soec-form-modal-container {
    position: relative;
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

.soec-form-modal.is-active .soec-form-modal-container {
    transform: translateY(0);
}

/* Close Button */
.soec-form-modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 40px;
    height: 40px;
    border: none;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s ease;
    z-index: 10;
}

.soec-form-modal-close:hover {
    background: rgba(0, 0, 0, 0.2);
}

.soec-form-modal-close svg {
    width: 20px;
    height: 20px;
    color: #333;
}

/* Modal Content */
.soec-form-modal-content {
    padding: 40px;
}

.soec-form-modal-title {
    margin: 0 0 25px 0;
    font-size: 1.75rem;
    font-weight: 600;
    color: #1a1a1a;
    padding-right: 40px; /* Space for close button */
}

/* Form Fields */
.soec-form-fields {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.soec-field {
    width: 100%;
}

.soec-field-width-half {
    width: calc(50% - 10px);
}

.soec-field-width-third {
    width: calc(33.333% - 14px);
}

.soec-field.condition-hidden {
    display: none !important;
}

/* Labels */
.soec-label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    color: #333;
    font-size: 0.95rem;
}

.soec-required {
    color: #c00;
    margin-left: 2px;
}

/* Inputs */
.soec-input,
.soec-textarea,
.soec-select {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    background: #fff;
}

.soec-input:focus,
.soec-textarea:focus,
.soec-select:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 0 3px rgba(0, 115, 170, 0.15);
}

.soec-textarea {
    resize: vertical;
    min-height: 100px;
}

/* Error States */
.soec-field.has-error .soec-input,
.soec-field.has-error .soec-textarea,
.soec-field.has-error .soec-select {
    border-color: #c00;
}

.soec-field-error {
    color: #c00;
    font-size: 0.85rem;
    margin-top: 5px;
    min-height: 1.2em;
}

/* Radio & Checkbox Groups */
.soec-radio-group,
.soec-checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.soec-radio-label,
.soec-checkbox-label,
.soec-checkbox-single {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 0.95rem;
}

.soec-radio-label input,
.soec-checkbox-label input,
.soec-checkbox-single input {
    width: 18px;
    height: 18px;
    margin: 0;
    cursor: pointer;
}

/* Headings & Paragraphs in form */
.soec-field-heading {
    margin: 10px 0 5px 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
}

.soec-field-paragraph {
    margin: 5px 0;
    color: #666;
    font-size: 0.95rem;
    line-height: 1.5;
}

/* Form Messages */
.soec-form-messages {
    margin-top: 20px;
}

.soec-form-success {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 15px;
}

.soec-form-error {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 15px;
}

/* Form Footer / Submit Button */
.soec-form-footer {
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.soec-form-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 30px;
    background: #0073aa;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s ease;
    min-width: 150px;
}

.soec-form-submit:hover {
    background: #005a87;
}

.soec-form-submit:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.soec-form-submit.is-loading .soec-btn-text {
    display: none;
}

.soec-form-submit.is-loading .soec-btn-loading {
    display: inline-flex !important;
}

.soec-spinner {
    animation: soec-spin 1s linear infinite;
}

@keyframes soec-spin {
    to { transform: rotate(360deg); }
}

/* Responsive */
@media (max-width: 600px) {
    .soec-form-modal-content {
        padding: 30px 20px;
    }
    
    .soec-form-modal-title {
        font-size: 1.4rem;
    }
    
    .soec-field-width-half,
    .soec-field-width-third {
        width: 100%;
    }
    
    .soec-form-modal-close {
        top: 10px;
        right: 10px;
        width: 36px;
        height: 36px;
    }
}
/* ==========================================================================
   UNIFIED fs SCALE — fixed-N and fluid-N font size classes
   N is the approximate equivalent pixel size at 16px browser base.
   fixed-N : constant size, unaffected by viewport width.
   fluid-N : responsive via CSS clamp(), tuned per element context.
   Legacy .size-* / .text-size-* classes are preserved below each section
   as a fallback for blocks saved before this system was introduced.
   ========================================================================== */

/* Generic fixed-N — applies to most block contexts (text, flip, quote, data, accordion) */
.fixed-10 { font-size: 0.625rem !important; }
.fixed-11 { font-size: 0.6875rem !important; }
.fixed-12 { font-size: 0.75rem !important; }
.fixed-13 { font-size: 0.8125rem !important; }
.fixed-14 { font-size: 0.875rem !important; }
.fixed-15 { font-size: 0.9375rem !important; }
.fixed-16 { font-size: 1.0rem !important; }
.fixed-17 { font-size: 1.0625rem !important; }
.fixed-18 { font-size: 1.125rem !important; }
.fixed-19 { font-size: 1.1875rem !important; }
.fixed-20 { font-size: 1.25rem !important; }
.fixed-22 { font-size: 1.375rem !important; }
.fixed-24 { font-size: 1.5rem !important; }
.fixed-26 { font-size: 1.625rem !important; }
.fixed-28 { font-size: 1.75rem !important; }
.fixed-30 { font-size: 1.875rem !important; }
.fixed-32 { font-size: 2.0rem !important; }
.fixed-36 { font-size: 2.25rem !important; }
.fixed-40 { font-size: 2.5rem !important; }
.fixed-44 { font-size: 2.75rem !important; }
.fixed-48 { font-size: 3.0rem !important; }
.fixed-56 { font-size: 3.5rem !important; }
.fixed-64 { font-size: 4.0rem !important; }
.fixed-72 { font-size: 4.5rem !important; }
.fixed-80 { font-size: 5.0rem !important; }
.fixed-96 { font-size: 6.0rem !important; }

/* Accordion header text (Fraunces, fixed) */
.header-text.fixed-10 { font-size: 0.625rem; }
.header-text.fixed-11 { font-size: 0.6875rem; }
.header-text.fixed-12 { font-size: 0.75rem; }
.header-text.fixed-13 { font-size: 0.8125rem; }
.header-text.fixed-14 { font-size: 0.875rem; }
.header-text.fixed-15 { font-size: 0.9375rem; }
.header-text.fixed-16 { font-size: 1.0rem; }
.header-text.fixed-17 { font-size: 1.0625rem; }
.header-text.fixed-18 { font-size: 1.125rem; }
.header-text.fixed-19 { font-size: 1.1875rem; }
.header-text.fixed-20 { font-size: 1.25rem; }
.header-text.fixed-22 { font-size: 1.375rem; }
.header-text.fixed-24 { font-size: 1.5rem; }
.header-text.fixed-26 { font-size: 1.625rem; }
.header-text.fixed-28 { font-size: 1.75rem; }
.header-text.fixed-30 { font-size: 1.875rem; }
.header-text.fixed-32 { font-size: 2.0rem; }
.header-text.fixed-36 { font-size: 2.25rem; }
.header-text.fixed-40 { font-size: 2.5rem; }
.header-text.fixed-44 { font-size: 2.75rem; }
.header-text.fixed-48 { font-size: 3.0rem; }
.header-text.fixed-56 { font-size: 3.5rem; }
.header-text.fixed-64 { font-size: 4.0rem; }
.header-text.fixed-72 { font-size: 4.5rem; }
.header-text.fixed-80 { font-size: 5.0rem; }
.header-text.fixed-96 { font-size: 6.0rem; }

/* Accordion body text (Work Sans, fixed) */
.content-text.fixed-10 { font-size: 0.625rem; }
.content-text.fixed-11 { font-size: 0.6875rem; }
.content-text.fixed-12 { font-size: 0.75rem; }
.content-text.fixed-13 { font-size: 0.8125rem; }
.content-text.fixed-14 { font-size: 0.875rem; }
.content-text.fixed-15 { font-size: 0.9375rem; }
.content-text.fixed-16 { font-size: 1.0rem; }
.content-text.fixed-17 { font-size: 1.0625rem; }
.content-text.fixed-18 { font-size: 1.125rem; }
.content-text.fixed-19 { font-size: 1.1875rem; }
.content-text.fixed-20 { font-size: 1.25rem; }
.content-text.fixed-22 { font-size: 1.375rem; }
.content-text.fixed-24 { font-size: 1.5rem; }
.content-text.fixed-26 { font-size: 1.625rem; }
.content-text.fixed-28 { font-size: 1.75rem; }
.content-text.fixed-30 { font-size: 1.875rem; }
.content-text.fixed-32 { font-size: 2.0rem; }
.content-text.fixed-36 { font-size: 2.25rem; }
.content-text.fixed-40 { font-size: 2.5rem; }
.content-text.fixed-44 { font-size: 2.75rem; }
.content-text.fixed-48 { font-size: 3.0rem; }
.content-text.fixed-56 { font-size: 3.5rem; }
.content-text.fixed-64 { font-size: 4.0rem; }
.content-text.fixed-72 { font-size: 4.5rem; }
.content-text.fixed-80 { font-size: 5.0rem; }
.content-text.fixed-96 { font-size: 6.0rem; }

/* Accordion button trigger (fixed) */
.accordion-button.fixed-10 { font-size: 0.625rem !important; }
.accordion-button.fixed-11 { font-size: 0.6875rem !important; }
.accordion-button.fixed-12 { font-size: 0.75rem !important; }
.accordion-button.fixed-13 { font-size: 0.8125rem !important; }
.accordion-button.fixed-14 { font-size: 0.875rem !important; }
.accordion-button.fixed-15 { font-size: 0.9375rem !important; }
.accordion-button.fixed-16 { font-size: 1.0rem !important; }
.accordion-button.fixed-17 { font-size: 1.0625rem !important; }
.accordion-button.fixed-18 { font-size: 1.125rem !important; }
.accordion-button.fixed-19 { font-size: 1.1875rem !important; }
.accordion-button.fixed-20 { font-size: 1.25rem !important; }
.accordion-button.fixed-22 { font-size: 1.375rem !important; }
.accordion-button.fixed-24 { font-size: 1.5rem !important; }
.accordion-button.fixed-26 { font-size: 1.625rem !important; }
.accordion-button.fixed-28 { font-size: 1.75rem !important; }
.accordion-button.fixed-30 { font-size: 1.875rem !important; }
.accordion-button.fixed-32 { font-size: 2.0rem !important; }
.accordion-button.fixed-36 { font-size: 2.25rem !important; }
.accordion-button.fixed-40 { font-size: 2.5rem !important; }
.accordion-button.fixed-44 { font-size: 2.75rem !important; }
.accordion-button.fixed-48 { font-size: 3.0rem !important; }
.accordion-button.fixed-56 { font-size: 3.5rem !important; }
.accordion-button.fixed-64 { font-size: 4.0rem !important; }
.accordion-button.fixed-72 { font-size: 4.5rem !important; }
.accordion-button.fixed-80 { font-size: 5.0rem !important; }
.accordion-button.fixed-96 { font-size: 6.0rem !important; }

/* Split / News card heading (Fraunces, fluid) */
.split-card-text h3.fluid-10,
.news-card .split-card-heading.fluid-10 { font-size: clamp(0.4688rem, 0.9375vw, 0.8438rem) !important; }
.split-card-text h3.fluid-11,
.news-card .split-card-heading.fluid-11 { font-size: clamp(0.5156rem, 1.0312vw, 0.9281rem) !important; }
.split-card-text h3.fluid-12,
.news-card .split-card-heading.fluid-12 { font-size: clamp(0.5625rem, 1.125vw, 1.0125rem) !important; }
.split-card-text h3.fluid-13,
.news-card .split-card-heading.fluid-13 { font-size: clamp(0.6094rem, 1.2188vw, 1.0969rem) !important; }
.split-card-text h3.fluid-14,
.news-card .split-card-heading.fluid-14 { font-size: clamp(0.6562rem, 1.3125vw, 1.1813rem) !important; }
.split-card-text h3.fluid-15,
.news-card .split-card-heading.fluid-15 { font-size: clamp(0.7031rem, 1.4062vw, 1.2656rem) !important; }
.split-card-text h3.fluid-16,
.news-card .split-card-heading.fluid-16 { font-size: clamp(0.75rem, 1.5vw, 1.35rem) !important; }
.split-card-text h3.fluid-17,
.news-card .split-card-heading.fluid-17 { font-size: clamp(0.7969rem, 1.5938vw, 1.4344rem) !important; }
.split-card-text h3.fluid-18,
.news-card .split-card-heading.fluid-18 { font-size: clamp(0.8438rem, 1.6875vw, 1.5188rem) !important; }
.split-card-text h3.fluid-19,
.news-card .split-card-heading.fluid-19 { font-size: clamp(0.8906rem, 1.7812vw, 1.6031rem) !important; }
.split-card-text h3.fluid-20,
.news-card .split-card-heading.fluid-20 { font-size: clamp(0.9375rem, 1.875vw, 1.6875rem) !important; }
.split-card-text h3.fluid-22,
.news-card .split-card-heading.fluid-22 { font-size: clamp(1.0312rem, 2.0625vw, 1.8563rem) !important; }
.split-card-text h3.fluid-24,
.news-card .split-card-heading.fluid-24 { font-size: clamp(1.125rem, 2.25vw, 2.025rem) !important; }
.split-card-text h3.fluid-26,
.news-card .split-card-heading.fluid-26 { font-size: clamp(1.2188rem, 2.4375vw, 2.1938rem) !important; }
.split-card-text h3.fluid-28,
.news-card .split-card-heading.fluid-28 { font-size: clamp(1.3125rem, 2.625vw, 2.3625rem) !important; }
.split-card-text h3.fluid-30,
.news-card .split-card-heading.fluid-30 { font-size: clamp(1.4062rem, 2.8125vw, 2.5312rem) !important; }
.split-card-text h3.fluid-32,
.news-card .split-card-heading.fluid-32 { font-size: clamp(1.5rem, 3.0vw, 2.7rem) !important; }
.split-card-text h3.fluid-36,
.news-card .split-card-heading.fluid-36 { font-size: clamp(1.6875rem, 3.375vw, 3.0375rem) !important; }
.split-card-text h3.fluid-40,
.news-card .split-card-heading.fluid-40 { font-size: clamp(1.875rem, 3.75vw, 3.375rem) !important; }
.split-card-text h3.fluid-44,
.news-card .split-card-heading.fluid-44 { font-size: clamp(2.0625rem, 4.125vw, 3.7125rem) !important; }
.split-card-text h3.fluid-48,
.news-card .split-card-heading.fluid-48 { font-size: clamp(2.25rem, 4.5vw, 4.05rem) !important; }
.split-card-text h3.fluid-56,
.news-card .split-card-heading.fluid-56 { font-size: clamp(2.625rem, 5.25vw, 4.725rem) !important; }
.split-card-text h3.fluid-64,
.news-card .split-card-heading.fluid-64 { font-size: clamp(3.0rem, 6.0vw, 5.4rem) !important; }
.split-card-text h3.fluid-72,
.news-card .split-card-heading.fluid-72 { font-size: clamp(3.375rem, 6.75vw, 6.075rem) !important; }
.split-card-text h3.fluid-80,
.news-card .split-card-heading.fluid-80 { font-size: clamp(3.75rem, 7.5vw, 6.75rem) !important; }
.split-card-text h3.fluid-96,
.news-card .split-card-heading.fluid-96 { font-size: clamp(4.5rem, 9.0vw, 8.1rem) !important; }

/* Split / News card body text (Work Sans, fluid) */
.split-card-text p.fluid-10,
.news-card .split-card-body.fluid-10 { font-size: clamp(0.5312rem, 0.75vw, 0.7188rem) !important; }
.split-card-text p.fluid-11,
.news-card .split-card-body.fluid-11 { font-size: clamp(0.5844rem, 0.825vw, 0.7906rem) !important; }
.split-card-text p.fluid-12,
.news-card .split-card-body.fluid-12 { font-size: clamp(0.6375rem, 0.9vw, 0.8625rem) !important; }
.split-card-text p.fluid-13,
.news-card .split-card-body.fluid-13 { font-size: clamp(0.6906rem, 0.975vw, 0.9344rem) !important; }
.split-card-text p.fluid-14,
.news-card .split-card-body.fluid-14 { font-size: clamp(0.7438rem, 1.05vw, 1.0062rem) !important; }
.split-card-text p.fluid-15,
.news-card .split-card-body.fluid-15 { font-size: clamp(0.7969rem, 1.125vw, 1.0781rem) !important; }
.split-card-text p.fluid-16,
.news-card .split-card-body.fluid-16 { font-size: clamp(0.85rem, 1.2vw, 1.15rem) !important; }
.split-card-text p.fluid-17,
.news-card .split-card-body.fluid-17 { font-size: clamp(0.9031rem, 1.275vw, 1.2219rem) !important; }
.split-card-text p.fluid-18,
.news-card .split-card-body.fluid-18 { font-size: clamp(0.9562rem, 1.35vw, 1.2937rem) !important; }
.split-card-text p.fluid-19,
.news-card .split-card-body.fluid-19 { font-size: clamp(1.0094rem, 1.425vw, 1.3656rem) !important; }
.split-card-text p.fluid-20,
.news-card .split-card-body.fluid-20 { font-size: clamp(1.0625rem, 1.5vw, 1.4375rem) !important; }
.split-card-text p.fluid-22,
.news-card .split-card-body.fluid-22 { font-size: clamp(1.1687rem, 1.65vw, 1.5812rem) !important; }
.split-card-text p.fluid-24,
.news-card .split-card-body.fluid-24 { font-size: clamp(1.275rem, 1.8vw, 1.725rem) !important; }
.split-card-text p.fluid-26,
.news-card .split-card-body.fluid-26 { font-size: clamp(1.3812rem, 1.95vw, 1.8687rem) !important; }
.split-card-text p.fluid-28,
.news-card .split-card-body.fluid-28 { font-size: clamp(1.4875rem, 2.1vw, 2.0125rem) !important; }
.split-card-text p.fluid-30,
.news-card .split-card-body.fluid-30 { font-size: clamp(1.5938rem, 2.25vw, 2.1562rem) !important; }
.split-card-text p.fluid-32,
.news-card .split-card-body.fluid-32 { font-size: clamp(1.7rem, 2.4vw, 2.3rem) !important; }
.split-card-text p.fluid-36,
.news-card .split-card-body.fluid-36 { font-size: clamp(1.9125rem, 2.7vw, 2.5875rem) !important; }
.split-card-text p.fluid-40,
.news-card .split-card-body.fluid-40 { font-size: clamp(2.125rem, 3.0vw, 2.875rem) !important; }
.split-card-text p.fluid-44,
.news-card .split-card-body.fluid-44 { font-size: clamp(2.3375rem, 3.3vw, 3.1625rem) !important; }
.split-card-text p.fluid-48,
.news-card .split-card-body.fluid-48 { font-size: clamp(2.55rem, 3.6vw, 3.45rem) !important; }
.split-card-text p.fluid-56,
.news-card .split-card-body.fluid-56 { font-size: clamp(2.975rem, 4.2vw, 4.025rem) !important; }
.split-card-text p.fluid-64,
.news-card .split-card-body.fluid-64 { font-size: clamp(3.4rem, 4.8vw, 4.6rem) !important; }
.split-card-text p.fluid-72,
.news-card .split-card-body.fluid-72 { font-size: clamp(3.825rem, 5.4vw, 5.175rem) !important; }
.split-card-text p.fluid-80,
.news-card .split-card-body.fluid-80 { font-size: clamp(4.25rem, 6.0vw, 5.75rem) !important; }
.split-card-text p.fluid-96,
.news-card .split-card-body.fluid-96 { font-size: clamp(5.1rem, 7.2vw, 6.9rem) !important; }

/* Flip block: front name (Fraunces, fixed) */
.flip-front-name.fixed-10 { font-size: 0.625rem !important; }
.flip-front-name.fixed-11 { font-size: 0.6875rem !important; }
.flip-front-name.fixed-12 { font-size: 0.75rem !important; }
.flip-front-name.fixed-13 { font-size: 0.8125rem !important; }
.flip-front-name.fixed-14 { font-size: 0.875rem !important; }
.flip-front-name.fixed-15 { font-size: 0.9375rem !important; }
.flip-front-name.fixed-16 { font-size: 1.0rem !important; }
.flip-front-name.fixed-17 { font-size: 1.0625rem !important; }
.flip-front-name.fixed-18 { font-size: 1.125rem !important; }
.flip-front-name.fixed-19 { font-size: 1.1875rem !important; }
.flip-front-name.fixed-20 { font-size: 1.25rem !important; }
.flip-front-name.fixed-22 { font-size: 1.375rem !important; }
.flip-front-name.fixed-24 { font-size: 1.5rem !important; }
.flip-front-name.fixed-26 { font-size: 1.625rem !important; }
.flip-front-name.fixed-28 { font-size: 1.75rem !important; }
.flip-front-name.fixed-30 { font-size: 1.875rem !important; }
.flip-front-name.fixed-32 { font-size: 2.0rem !important; }
.flip-front-name.fixed-36 { font-size: 2.25rem !important; }
.flip-front-name.fixed-40 { font-size: 2.5rem !important; }
.flip-front-name.fixed-44 { font-size: 2.75rem !important; }
.flip-front-name.fixed-48 { font-size: 3.0rem !important; }
.flip-front-name.fixed-56 { font-size: 3.5rem !important; }
.flip-front-name.fixed-64 { font-size: 4.0rem !important; }
.flip-front-name.fixed-72 { font-size: 4.5rem !important; }
.flip-front-name.fixed-80 { font-size: 5.0rem !important; }
.flip-front-name.fixed-96 { font-size: 6.0rem !important; }

/* Flip block: front title/role (Work Sans, fixed) */
.flip-front-title.fixed-10 { font-size: 0.625rem !important; }
.flip-front-title.fixed-11 { font-size: 0.6875rem !important; }
.flip-front-title.fixed-12 { font-size: 0.75rem !important; }
.flip-front-title.fixed-13 { font-size: 0.8125rem !important; }
.flip-front-title.fixed-14 { font-size: 0.875rem !important; }
.flip-front-title.fixed-15 { font-size: 0.9375rem !important; }
.flip-front-title.fixed-16 { font-size: 1.0rem !important; }
.flip-front-title.fixed-17 { font-size: 1.0625rem !important; }
.flip-front-title.fixed-18 { font-size: 1.125rem !important; }
.flip-front-title.fixed-19 { font-size: 1.1875rem !important; }
.flip-front-title.fixed-20 { font-size: 1.25rem !important; }
.flip-front-title.fixed-22 { font-size: 1.375rem !important; }
.flip-front-title.fixed-24 { font-size: 1.5rem !important; }
.flip-front-title.fixed-26 { font-size: 1.625rem !important; }
.flip-front-title.fixed-28 { font-size: 1.75rem !important; }
.flip-front-title.fixed-30 { font-size: 1.875rem !important; }
.flip-front-title.fixed-32 { font-size: 2.0rem !important; }
.flip-front-title.fixed-36 { font-size: 2.25rem !important; }
.flip-front-title.fixed-40 { font-size: 2.5rem !important; }
.flip-front-title.fixed-44 { font-size: 2.75rem !important; }
.flip-front-title.fixed-48 { font-size: 3.0rem !important; }
.flip-front-title.fixed-56 { font-size: 3.5rem !important; }
.flip-front-title.fixed-64 { font-size: 4.0rem !important; }
.flip-front-title.fixed-72 { font-size: 4.5rem !important; }
.flip-front-title.fixed-80 { font-size: 5.0rem !important; }
.flip-front-title.fixed-96 { font-size: 6.0rem !important; }

/* Inspirational block overlay text (Fraunces, hero fluid — large display scale) */
.text-size-fluid-10 .overlay-text,
.overlay-text.text-size-fluid-10 { font-size: clamp(0.375rem, 1.5625vw, 0.75rem); }
.text-size-fluid-11 .overlay-text,
.overlay-text.text-size-fluid-11 { font-size: clamp(0.4125rem, 1.7188vw, 0.825rem); }
.text-size-fluid-12 .overlay-text,
.overlay-text.text-size-fluid-12 { font-size: clamp(0.45rem, 1.875vw, 0.9rem); }
.text-size-fluid-13 .overlay-text,
.overlay-text.text-size-fluid-13 { font-size: clamp(0.4875rem, 2.0312vw, 0.975rem); }
.text-size-fluid-14 .overlay-text,
.overlay-text.text-size-fluid-14 { font-size: clamp(0.525rem, 2.1875vw, 1.05rem); }
.text-size-fluid-15 .overlay-text,
.overlay-text.text-size-fluid-15 { font-size: clamp(0.5625rem, 2.3438vw, 1.125rem); }
.text-size-fluid-16 .overlay-text,
.overlay-text.text-size-fluid-16 { font-size: clamp(0.6rem, 2.5vw, 1.2rem); }
.text-size-fluid-17 .overlay-text,
.overlay-text.text-size-fluid-17 { font-size: clamp(0.6375rem, 2.6562vw, 1.275rem); }
.text-size-fluid-18 .overlay-text,
.overlay-text.text-size-fluid-18 { font-size: clamp(0.675rem, 2.8125vw, 1.35rem); }
.text-size-fluid-19 .overlay-text,
.overlay-text.text-size-fluid-19 { font-size: clamp(0.7125rem, 2.9688vw, 1.425rem); }
.text-size-fluid-20 .overlay-text,
.overlay-text.text-size-fluid-20 { font-size: clamp(0.75rem, 3.125vw, 1.5rem); }
.text-size-fluid-22 .overlay-text,
.overlay-text.text-size-fluid-22 { font-size: clamp(0.825rem, 3.4375vw, 1.65rem); }
.text-size-fluid-24 .overlay-text,
.overlay-text.text-size-fluid-24 { font-size: clamp(0.9rem, 3.75vw, 1.8rem); }
.text-size-fluid-26 .overlay-text,
.overlay-text.text-size-fluid-26 { font-size: clamp(0.975rem, 4.0625vw, 1.95rem); }
.text-size-fluid-28 .overlay-text,
.overlay-text.text-size-fluid-28 { font-size: clamp(1.05rem, 4.375vw, 2.1rem); }
.text-size-fluid-30 .overlay-text,
.overlay-text.text-size-fluid-30 { font-size: clamp(1.125rem, 4.6875vw, 2.25rem); }
.text-size-fluid-32 .overlay-text,
.overlay-text.text-size-fluid-32 { font-size: clamp(1.2rem, 5.0vw, 2.4rem); }
.text-size-fluid-36 .overlay-text,
.overlay-text.text-size-fluid-36 { font-size: clamp(1.35rem, 5.625vw, 2.7rem); }
.text-size-fluid-40 .overlay-text,
.overlay-text.text-size-fluid-40 { font-size: clamp(1.5rem, 6.25vw, 3.0rem); }
.text-size-fluid-44 .overlay-text,
.overlay-text.text-size-fluid-44 { font-size: clamp(1.65rem, 6.875vw, 3.3rem); }
.text-size-fluid-48 .overlay-text,
.overlay-text.text-size-fluid-48 { font-size: clamp(1.8rem, 7.5vw, 3.6rem); }
.text-size-fluid-56 .overlay-text,
.overlay-text.text-size-fluid-56 { font-size: clamp(2.1rem, 8.75vw, 4.2rem); }
.text-size-fluid-64 .overlay-text,
.overlay-text.text-size-fluid-64 { font-size: clamp(2.4rem, 10.0vw, 4.8rem); }
.text-size-fluid-72 .overlay-text,
.overlay-text.text-size-fluid-72 { font-size: clamp(2.7rem, 11.25vw, 5.4rem); }
.text-size-fluid-80 .overlay-text,
.overlay-text.text-size-fluid-80 { font-size: clamp(3.0rem, 12.5vw, 6.0rem); }
.text-size-fluid-96 .overlay-text,
.overlay-text.text-size-fluid-96 { font-size: clamp(3.6rem, 15.0vw, 7.2rem); }

/* Split card image overlay text (Fraunces, fluid) */
.split-card-image .image-wrapper.overlay-text-fluid-10 .overlay-text { font-size: clamp(0.4688rem, 0.9375vw, 0.8438rem); }
.split-card-image .image-wrapper.overlay-text-fluid-11 .overlay-text { font-size: clamp(0.5156rem, 1.0312vw, 0.9281rem); }
.split-card-image .image-wrapper.overlay-text-fluid-12 .overlay-text { font-size: clamp(0.5625rem, 1.125vw, 1.0125rem); }
.split-card-image .image-wrapper.overlay-text-fluid-13 .overlay-text { font-size: clamp(0.6094rem, 1.2188vw, 1.0969rem); }
.split-card-image .image-wrapper.overlay-text-fluid-14 .overlay-text { font-size: clamp(0.6562rem, 1.3125vw, 1.1813rem); }
.split-card-image .image-wrapper.overlay-text-fluid-15 .overlay-text { font-size: clamp(0.7031rem, 1.4062vw, 1.2656rem); }
.split-card-image .image-wrapper.overlay-text-fluid-16 .overlay-text { font-size: clamp(0.75rem, 1.5vw, 1.35rem); }
.split-card-image .image-wrapper.overlay-text-fluid-17 .overlay-text { font-size: clamp(0.7969rem, 1.5938vw, 1.4344rem); }
.split-card-image .image-wrapper.overlay-text-fluid-18 .overlay-text { font-size: clamp(0.8438rem, 1.6875vw, 1.5188rem); }
.split-card-image .image-wrapper.overlay-text-fluid-19 .overlay-text { font-size: clamp(0.8906rem, 1.7812vw, 1.6031rem); }
.split-card-image .image-wrapper.overlay-text-fluid-20 .overlay-text { font-size: clamp(0.9375rem, 1.875vw, 1.6875rem); }
.split-card-image .image-wrapper.overlay-text-fluid-22 .overlay-text { font-size: clamp(1.0312rem, 2.0625vw, 1.8563rem); }
.split-card-image .image-wrapper.overlay-text-fluid-24 .overlay-text { font-size: clamp(1.125rem, 2.25vw, 2.025rem); }
.split-card-image .image-wrapper.overlay-text-fluid-26 .overlay-text { font-size: clamp(1.2188rem, 2.4375vw, 2.1938rem); }
.split-card-image .image-wrapper.overlay-text-fluid-28 .overlay-text { font-size: clamp(1.3125rem, 2.625vw, 2.3625rem); }
.split-card-image .image-wrapper.overlay-text-fluid-30 .overlay-text { font-size: clamp(1.4062rem, 2.8125vw, 2.5312rem); }
.split-card-image .image-wrapper.overlay-text-fluid-32 .overlay-text { font-size: clamp(1.5rem, 3.0vw, 2.7rem); }
.split-card-image .image-wrapper.overlay-text-fluid-36 .overlay-text { font-size: clamp(1.6875rem, 3.375vw, 3.0375rem); }
.split-card-image .image-wrapper.overlay-text-fluid-40 .overlay-text { font-size: clamp(1.875rem, 3.75vw, 3.375rem); }
.split-card-image .image-wrapper.overlay-text-fluid-44 .overlay-text { font-size: clamp(2.0625rem, 4.125vw, 3.7125rem); }
.split-card-image .image-wrapper.overlay-text-fluid-48 .overlay-text { font-size: clamp(2.25rem, 4.5vw, 4.05rem); }
.split-card-image .image-wrapper.overlay-text-fluid-56 .overlay-text { font-size: clamp(2.625rem, 5.25vw, 4.725rem); }
.split-card-image .image-wrapper.overlay-text-fluid-64 .overlay-text { font-size: clamp(3.0rem, 6.0vw, 5.4rem); }
.split-card-image .image-wrapper.overlay-text-fluid-72 .overlay-text { font-size: clamp(3.375rem, 6.75vw, 6.075rem); }
.split-card-image .image-wrapper.overlay-text-fluid-80 .overlay-text { font-size: clamp(3.75rem, 7.5vw, 6.75rem); }
.split-card-image .image-wrapper.overlay-text-fluid-96 .overlay-text { font-size: clamp(4.5rem, 9.0vw, 8.1rem); }

/* Image block overlay text (Fraunces, fixed) */
.image-overlay-text.fixed-10 { font-size: 0.625rem !important; }
.image-overlay-text.fixed-11 { font-size: 0.6875rem !important; }
.image-overlay-text.fixed-12 { font-size: 0.75rem !important; }
.image-overlay-text.fixed-13 { font-size: 0.8125rem !important; }
.image-overlay-text.fixed-14 { font-size: 0.875rem !important; }
.image-overlay-text.fixed-15 { font-size: 0.9375rem !important; }
.image-overlay-text.fixed-16 { font-size: 1.0rem !important; }
.image-overlay-text.fixed-17 { font-size: 1.0625rem !important; }
.image-overlay-text.fixed-18 { font-size: 1.125rem !important; }
.image-overlay-text.fixed-19 { font-size: 1.1875rem !important; }
.image-overlay-text.fixed-20 { font-size: 1.25rem !important; }
.image-overlay-text.fixed-22 { font-size: 1.375rem !important; }
.image-overlay-text.fixed-24 { font-size: 1.5rem !important; }
.image-overlay-text.fixed-26 { font-size: 1.625rem !important; }
.image-overlay-text.fixed-28 { font-size: 1.75rem !important; }
.image-overlay-text.fixed-30 { font-size: 1.875rem !important; }
.image-overlay-text.fixed-32 { font-size: 2.0rem !important; }
.image-overlay-text.fixed-36 { font-size: 2.25rem !important; }
.image-overlay-text.fixed-40 { font-size: 2.5rem !important; }
.image-overlay-text.fixed-44 { font-size: 2.75rem !important; }
.image-overlay-text.fixed-48 { font-size: 3.0rem !important; }
.image-overlay-text.fixed-56 { font-size: 3.5rem !important; }
.image-overlay-text.fixed-64 { font-size: 4.0rem !important; }
.image-overlay-text.fixed-72 { font-size: 4.5rem !important; }
.image-overlay-text.fixed-80 { font-size: 5.0rem !important; }
.image-overlay-text.fixed-96 { font-size: 6.0rem !important; }

/* Data block stat descriptions (fluid) */
.data-desc1.fluid-10, .data-desc2.fluid-10 { font-size: clamp(0.5312rem, 0.75vw, 0.7188rem); }
.data-desc1.fluid-11, .data-desc2.fluid-11 { font-size: clamp(0.5844rem, 0.825vw, 0.7906rem); }
.data-desc1.fluid-12, .data-desc2.fluid-12 { font-size: clamp(0.6375rem, 0.9vw, 0.8625rem); }
.data-desc1.fluid-13, .data-desc2.fluid-13 { font-size: clamp(0.6906rem, 0.975vw, 0.9344rem); }
.data-desc1.fluid-14, .data-desc2.fluid-14 { font-size: clamp(0.7438rem, 1.05vw, 1.0062rem); }
.data-desc1.fluid-15, .data-desc2.fluid-15 { font-size: clamp(0.7969rem, 1.125vw, 1.0781rem); }
.data-desc1.fluid-16, .data-desc2.fluid-16 { font-size: clamp(0.85rem, 1.2vw, 1.15rem); }
.data-desc1.fluid-17, .data-desc2.fluid-17 { font-size: clamp(0.9031rem, 1.275vw, 1.2219rem); }
.data-desc1.fluid-18, .data-desc2.fluid-18 { font-size: clamp(0.9562rem, 1.35vw, 1.2937rem); }
.data-desc1.fluid-19, .data-desc2.fluid-19 { font-size: clamp(1.0094rem, 1.425vw, 1.3656rem); }
.data-desc1.fluid-20, .data-desc2.fluid-20 { font-size: clamp(1.0625rem, 1.5vw, 1.4375rem); }
.data-desc1.fluid-22, .data-desc2.fluid-22 { font-size: clamp(1.1687rem, 1.65vw, 1.5812rem); }
.data-desc1.fluid-24, .data-desc2.fluid-24 { font-size: clamp(1.275rem, 1.8vw, 1.725rem); }
.data-desc1.fluid-26, .data-desc2.fluid-26 { font-size: clamp(1.3812rem, 1.95vw, 1.8687rem); }
.data-desc1.fluid-28, .data-desc2.fluid-28 { font-size: clamp(1.4875rem, 2.1vw, 2.0125rem); }
.data-desc1.fluid-30, .data-desc2.fluid-30 { font-size: clamp(1.5938rem, 2.25vw, 2.1562rem); }
.data-desc1.fluid-32, .data-desc2.fluid-32 { font-size: clamp(1.7rem, 2.4vw, 2.3rem); }
.data-desc1.fluid-36, .data-desc2.fluid-36 { font-size: clamp(1.9125rem, 2.7vw, 2.5875rem); }
.data-desc1.fluid-40, .data-desc2.fluid-40 { font-size: clamp(2.125rem, 3.0vw, 2.875rem); }
.data-desc1.fluid-44, .data-desc2.fluid-44 { font-size: clamp(2.3375rem, 3.3vw, 3.1625rem); }
.data-desc1.fluid-48, .data-desc2.fluid-48 { font-size: clamp(2.55rem, 3.6vw, 3.45rem); }
.data-desc1.fluid-56, .data-desc2.fluid-56 { font-size: clamp(2.975rem, 4.2vw, 4.025rem); }
.data-desc1.fluid-64, .data-desc2.fluid-64 { font-size: clamp(3.4rem, 4.8vw, 4.6rem); }
.data-desc1.fluid-72, .data-desc2.fluid-72 { font-size: clamp(3.825rem, 5.4vw, 5.175rem); }
.data-desc1.fluid-80, .data-desc2.fluid-80 { font-size: clamp(4.25rem, 6.0vw, 5.75rem); }
.data-desc1.fluid-96, .data-desc2.fluid-96 { font-size: clamp(5.1rem, 7.2vw, 6.9rem); }

/* Data block stat numbers (Fraunces, hero fluid) */
.data-stat-number.fluid-10 { font-size: clamp(0.375rem, 1.5625vw, 0.75rem); }
.data-stat-number.fluid-11 { font-size: clamp(0.4125rem, 1.7188vw, 0.825rem); }
.data-stat-number.fluid-12 { font-size: clamp(0.45rem, 1.875vw, 0.9rem); }
.data-stat-number.fluid-13 { font-size: clamp(0.4875rem, 2.0312vw, 0.975rem); }
.data-stat-number.fluid-14 { font-size: clamp(0.525rem, 2.1875vw, 1.05rem); }
.data-stat-number.fluid-15 { font-size: clamp(0.5625rem, 2.3438vw, 1.125rem); }
.data-stat-number.fluid-16 { font-size: clamp(0.6rem, 2.5vw, 1.2rem); }
.data-stat-number.fluid-17 { font-size: clamp(0.6375rem, 2.6562vw, 1.275rem); }
.data-stat-number.fluid-18 { font-size: clamp(0.675rem, 2.8125vw, 1.35rem); }
.data-stat-number.fluid-19 { font-size: clamp(0.7125rem, 2.9688vw, 1.425rem); }
.data-stat-number.fluid-20 { font-size: clamp(0.75rem, 3.125vw, 1.5rem); }
.data-stat-number.fluid-22 { font-size: clamp(0.825rem, 3.4375vw, 1.65rem); }
.data-stat-number.fluid-24 { font-size: clamp(0.9rem, 3.75vw, 1.8rem); }
.data-stat-number.fluid-26 { font-size: clamp(0.975rem, 4.0625vw, 1.95rem); }
.data-stat-number.fluid-28 { font-size: clamp(1.05rem, 4.375vw, 2.1rem); }
.data-stat-number.fluid-30 { font-size: clamp(1.125rem, 4.6875vw, 2.25rem); }
.data-stat-number.fluid-32 { font-size: clamp(1.2rem, 5.0vw, 2.4rem); }
.data-stat-number.fluid-36 { font-size: clamp(1.35rem, 5.625vw, 2.7rem); }
.data-stat-number.fluid-40 { font-size: clamp(1.5rem, 6.25vw, 3.0rem); }
.data-stat-number.fluid-44 { font-size: clamp(1.65rem, 6.875vw, 3.3rem); }
.data-stat-number.fluid-48 { font-size: clamp(1.8rem, 7.5vw, 3.6rem); }
.data-stat-number.fluid-56 { font-size: clamp(2.1rem, 8.75vw, 4.2rem); }
.data-stat-number.fluid-64 { font-size: clamp(2.4rem, 10.0vw, 4.8rem); }
.data-stat-number.fluid-72 { font-size: clamp(2.7rem, 11.25vw, 5.4rem); }
.data-stat-number.fluid-80 { font-size: clamp(3.0rem, 12.5vw, 6.0rem); }
.data-stat-number.fluid-96 { font-size: clamp(3.6rem, 15.0vw, 7.2rem); }

/* Data block card back heading (Fraunces, fluid) */
.data-back-heading.fluid-10 { font-size: clamp(0.4688rem, 0.9375vw, 0.8438rem); }
.data-back-heading.fluid-11 { font-size: clamp(0.5156rem, 1.0312vw, 0.9281rem); }
.data-back-heading.fluid-12 { font-size: clamp(0.5625rem, 1.125vw, 1.0125rem); }
.data-back-heading.fluid-13 { font-size: clamp(0.6094rem, 1.2188vw, 1.0969rem); }
.data-back-heading.fluid-14 { font-size: clamp(0.6562rem, 1.3125vw, 1.1813rem); }
.data-back-heading.fluid-15 { font-size: clamp(0.7031rem, 1.4062vw, 1.2656rem); }
.data-back-heading.fluid-16 { font-size: clamp(0.75rem, 1.5vw, 1.35rem); }
.data-back-heading.fluid-17 { font-size: clamp(0.7969rem, 1.5938vw, 1.4344rem); }
.data-back-heading.fluid-18 { font-size: clamp(0.8438rem, 1.6875vw, 1.5188rem); }
.data-back-heading.fluid-19 { font-size: clamp(0.8906rem, 1.7812vw, 1.6031rem); }
.data-back-heading.fluid-20 { font-size: clamp(0.9375rem, 1.875vw, 1.6875rem); }
.data-back-heading.fluid-22 { font-size: clamp(1.0312rem, 2.0625vw, 1.8563rem); }
.data-back-heading.fluid-24 { font-size: clamp(1.125rem, 2.25vw, 2.025rem); }
.data-back-heading.fluid-26 { font-size: clamp(1.2188rem, 2.4375vw, 2.1938rem); }
.data-back-heading.fluid-28 { font-size: clamp(1.3125rem, 2.625vw, 2.3625rem); }
.data-back-heading.fluid-30 { font-size: clamp(1.4062rem, 2.8125vw, 2.5312rem); }
.data-back-heading.fluid-32 { font-size: clamp(1.5rem, 3.0vw, 2.7rem); }
.data-back-heading.fluid-36 { font-size: clamp(1.6875rem, 3.375vw, 3.0375rem); }
.data-back-heading.fluid-40 { font-size: clamp(1.875rem, 3.75vw, 3.375rem); }
.data-back-heading.fluid-44 { font-size: clamp(2.0625rem, 4.125vw, 3.7125rem); }
.data-back-heading.fluid-48 { font-size: clamp(2.25rem, 4.5vw, 4.05rem); }
.data-back-heading.fluid-56 { font-size: clamp(2.625rem, 5.25vw, 4.725rem); }
.data-back-heading.fluid-64 { font-size: clamp(3.0rem, 6.0vw, 5.4rem); }
.data-back-heading.fluid-72 { font-size: clamp(3.375rem, 6.75vw, 6.075rem); }
.data-back-heading.fluid-80 { font-size: clamp(3.75rem, 7.5vw, 6.75rem); }
.data-back-heading.fluid-96 { font-size: clamp(4.5rem, 9.0vw, 8.1rem); }

/* Data block back subheading (fluid) */
.data-back-subheading.fluid-10 { font-size: clamp(0.5312rem, 0.75vw, 0.7188rem); }
.data-back-subheading.fluid-11 { font-size: clamp(0.5844rem, 0.825vw, 0.7906rem); }
.data-back-subheading.fluid-12 { font-size: clamp(0.6375rem, 0.9vw, 0.8625rem); }
.data-back-subheading.fluid-13 { font-size: clamp(0.6906rem, 0.975vw, 0.9344rem); }
.data-back-subheading.fluid-14 { font-size: clamp(0.7438rem, 1.05vw, 1.0062rem); }
.data-back-subheading.fluid-15 { font-size: clamp(0.7969rem, 1.125vw, 1.0781rem); }
.data-back-subheading.fluid-16 { font-size: clamp(0.85rem, 1.2vw, 1.15rem); }
.data-back-subheading.fluid-17 { font-size: clamp(0.9031rem, 1.275vw, 1.2219rem); }
.data-back-subheading.fluid-18 { font-size: clamp(0.9562rem, 1.35vw, 1.2937rem); }
.data-back-subheading.fluid-19 { font-size: clamp(1.0094rem, 1.425vw, 1.3656rem); }
.data-back-subheading.fluid-20 { font-size: clamp(1.0625rem, 1.5vw, 1.4375rem); }
.data-back-subheading.fluid-22 { font-size: clamp(1.1687rem, 1.65vw, 1.5812rem); }
.data-back-subheading.fluid-24 { font-size: clamp(1.275rem, 1.8vw, 1.725rem); }
.data-back-subheading.fluid-26 { font-size: clamp(1.3812rem, 1.95vw, 1.8687rem); }
.data-back-subheading.fluid-28 { font-size: clamp(1.4875rem, 2.1vw, 2.0125rem); }
.data-back-subheading.fluid-30 { font-size: clamp(1.5938rem, 2.25vw, 2.1562rem); }
.data-back-subheading.fluid-32 { font-size: clamp(1.7rem, 2.4vw, 2.3rem); }
.data-back-subheading.fluid-36 { font-size: clamp(1.9125rem, 2.7vw, 2.5875rem); }
.data-back-subheading.fluid-40 { font-size: clamp(2.125rem, 3.0vw, 2.875rem); }
.data-back-subheading.fluid-44 { font-size: clamp(2.3375rem, 3.3vw, 3.1625rem); }
.data-back-subheading.fluid-48 { font-size: clamp(2.55rem, 3.6vw, 3.45rem); }
.data-back-subheading.fluid-56 { font-size: clamp(2.975rem, 4.2vw, 4.025rem); }
.data-back-subheading.fluid-64 { font-size: clamp(3.4rem, 4.8vw, 4.6rem); }
.data-back-subheading.fluid-72 { font-size: clamp(3.825rem, 5.4vw, 5.175rem); }
.data-back-subheading.fluid-80 { font-size: clamp(4.25rem, 6.0vw, 5.75rem); }
.data-back-subheading.fluid-96 { font-size: clamp(5.1rem, 7.2vw, 6.9rem); }

/* Data block back body text (fluid) */
.data-back-body.fluid-10 { font-size: clamp(0.5312rem, 0.75vw, 0.7188rem); }
.data-back-body.fluid-11 { font-size: clamp(0.5844rem, 0.825vw, 0.7906rem); }
.data-back-body.fluid-12 { font-size: clamp(0.6375rem, 0.9vw, 0.8625rem); }
.data-back-body.fluid-13 { font-size: clamp(0.6906rem, 0.975vw, 0.9344rem); }
.data-back-body.fluid-14 { font-size: clamp(0.7438rem, 1.05vw, 1.0062rem); }
.data-back-body.fluid-15 { font-size: clamp(0.7969rem, 1.125vw, 1.0781rem); }
.data-back-body.fluid-16 { font-size: clamp(0.85rem, 1.2vw, 1.15rem); }
.data-back-body.fluid-17 { font-size: clamp(0.9031rem, 1.275vw, 1.2219rem); }
.data-back-body.fluid-18 { font-size: clamp(0.9562rem, 1.35vw, 1.2937rem); }
.data-back-body.fluid-19 { font-size: clamp(1.0094rem, 1.425vw, 1.3656rem); }
.data-back-body.fluid-20 { font-size: clamp(1.0625rem, 1.5vw, 1.4375rem); }
.data-back-body.fluid-22 { font-size: clamp(1.1687rem, 1.65vw, 1.5812rem); }
.data-back-body.fluid-24 { font-size: clamp(1.275rem, 1.8vw, 1.725rem); }
.data-back-body.fluid-26 { font-size: clamp(1.3812rem, 1.95vw, 1.8687rem); }
.data-back-body.fluid-28 { font-size: clamp(1.4875rem, 2.1vw, 2.0125rem); }
.data-back-body.fluid-30 { font-size: clamp(1.5938rem, 2.25vw, 2.1562rem); }
.data-back-body.fluid-32 { font-size: clamp(1.7rem, 2.4vw, 2.3rem); }
.data-back-body.fluid-36 { font-size: clamp(1.9125rem, 2.7vw, 2.5875rem); }
.data-back-body.fluid-40 { font-size: clamp(2.125rem, 3.0vw, 2.875rem); }
.data-back-body.fluid-44 { font-size: clamp(2.3375rem, 3.3vw, 3.1625rem); }
.data-back-body.fluid-48 { font-size: clamp(2.55rem, 3.6vw, 3.45rem); }
.data-back-body.fluid-56 { font-size: clamp(2.975rem, 4.2vw, 4.025rem); }
.data-back-body.fluid-64 { font-size: clamp(3.4rem, 4.8vw, 4.6rem); }
.data-back-body.fluid-72 { font-size: clamp(3.825rem, 5.4vw, 5.175rem); }
.data-back-body.fluid-80 { font-size: clamp(4.25rem, 6.0vw, 5.75rem); }
.data-back-body.fluid-96 { font-size: clamp(5.1rem, 7.2vw, 6.9rem); }

/* Quote block: quote text and attribution (Fraunces, fixed) */
.quote-text.fixed-10, .author.fixed-10 { font-size: 0.625rem !important; }
.quote-text.fixed-11, .author.fixed-11 { font-size: 0.6875rem !important; }
.quote-text.fixed-12, .author.fixed-12 { font-size: 0.75rem !important; }
.quote-text.fixed-13, .author.fixed-13 { font-size: 0.8125rem !important; }
.quote-text.fixed-14, .author.fixed-14 { font-size: 0.875rem !important; }
.quote-text.fixed-15, .author.fixed-15 { font-size: 0.9375rem !important; }
.quote-text.fixed-16, .author.fixed-16 { font-size: 1.0rem !important; }
.quote-text.fixed-17, .author.fixed-17 { font-size: 1.0625rem !important; }
.quote-text.fixed-18, .author.fixed-18 { font-size: 1.125rem !important; }
.quote-text.fixed-19, .author.fixed-19 { font-size: 1.1875rem !important; }
.quote-text.fixed-20, .author.fixed-20 { font-size: 1.25rem !important; }
.quote-text.fixed-22, .author.fixed-22 { font-size: 1.375rem !important; }
.quote-text.fixed-24, .author.fixed-24 { font-size: 1.5rem !important; }
.quote-text.fixed-26, .author.fixed-26 { font-size: 1.625rem !important; }
.quote-text.fixed-28, .author.fixed-28 { font-size: 1.75rem !important; }
.quote-text.fixed-30, .author.fixed-30 { font-size: 1.875rem !important; }
.quote-text.fixed-32, .author.fixed-32 { font-size: 2.0rem !important; }
.quote-text.fixed-36, .author.fixed-36 { font-size: 2.25rem !important; }
.quote-text.fixed-40, .author.fixed-40 { font-size: 2.5rem !important; }
.quote-text.fixed-44, .author.fixed-44 { font-size: 2.75rem !important; }
.quote-text.fixed-48, .author.fixed-48 { font-size: 3.0rem !important; }
.quote-text.fixed-56, .author.fixed-56 { font-size: 3.5rem !important; }
.quote-text.fixed-64, .author.fixed-64 { font-size: 4.0rem !important; }
.quote-text.fixed-72, .author.fixed-72 { font-size: 4.5rem !important; }
.quote-text.fixed-80, .author.fixed-80 { font-size: 5.0rem !important; }
.quote-text.fixed-96, .author.fixed-96 { font-size: 6.0rem !important; }

/* Video block subtitle (Fraunces, fixed) */
.video-subtitle.fixed-10 { font-size: 0.625rem !important; }
.video-subtitle.fixed-11 { font-size: 0.6875rem !important; }
.video-subtitle.fixed-12 { font-size: 0.75rem !important; }
.video-subtitle.fixed-13 { font-size: 0.8125rem !important; }
.video-subtitle.fixed-14 { font-size: 0.875rem !important; }
.video-subtitle.fixed-15 { font-size: 0.9375rem !important; }
.video-subtitle.fixed-16 { font-size: 1.0rem !important; }
.video-subtitle.fixed-17 { font-size: 1.0625rem !important; }
.video-subtitle.fixed-18 { font-size: 1.125rem !important; }
.video-subtitle.fixed-19 { font-size: 1.1875rem !important; }
.video-subtitle.fixed-20 { font-size: 1.25rem !important; }
.video-subtitle.fixed-22 { font-size: 1.375rem !important; }
.video-subtitle.fixed-24 { font-size: 1.5rem !important; }
.video-subtitle.fixed-26 { font-size: 1.625rem !important; }
.video-subtitle.fixed-28 { font-size: 1.75rem !important; }
.video-subtitle.fixed-30 { font-size: 1.875rem !important; }
.video-subtitle.fixed-32 { font-size: 2.0rem !important; }
.video-subtitle.fixed-36 { font-size: 2.25rem !important; }
.video-subtitle.fixed-40 { font-size: 2.5rem !important; }
.video-subtitle.fixed-44 { font-size: 2.75rem !important; }
.video-subtitle.fixed-48 { font-size: 3.0rem !important; }
.video-subtitle.fixed-56 { font-size: 3.5rem !important; }
.video-subtitle.fixed-64 { font-size: 4.0rem !important; }
.video-subtitle.fixed-72 { font-size: 4.5rem !important; }
.video-subtitle.fixed-80 { font-size: 5.0rem !important; }
.video-subtitle.fixed-96 { font-size: 6.0rem !important; }

/* Text block heading (Fraunces, fixed) */
.text-box-heading.fixed-10 { font-size: 0.625rem !important; }
.text-box-heading.fixed-11 { font-size: 0.6875rem !important; }
.text-box-heading.fixed-12 { font-size: 0.75rem !important; }
.text-box-heading.fixed-13 { font-size: 0.8125rem !important; }
.text-box-heading.fixed-14 { font-size: 0.875rem !important; }
.text-box-heading.fixed-15 { font-size: 0.9375rem !important; }
.text-box-heading.fixed-16 { font-size: 1.0rem !important; }
.text-box-heading.fixed-17 { font-size: 1.0625rem !important; }
.text-box-heading.fixed-18 { font-size: 1.125rem !important; }
.text-box-heading.fixed-19 { font-size: 1.1875rem !important; }
.text-box-heading.fixed-20 { font-size: 1.25rem !important; }
.text-box-heading.fixed-22 { font-size: 1.375rem !important; }
.text-box-heading.fixed-24 { font-size: 1.5rem !important; }
.text-box-heading.fixed-26 { font-size: 1.625rem !important; }
.text-box-heading.fixed-28 { font-size: 1.75rem !important; }
.text-box-heading.fixed-30 { font-size: 1.875rem !important; }
.text-box-heading.fixed-32 { font-size: 2.0rem !important; }
.text-box-heading.fixed-36 { font-size: 2.25rem !important; }
.text-box-heading.fixed-40 { font-size: 2.5rem !important; }
.text-box-heading.fixed-44 { font-size: 2.75rem !important; }
.text-box-heading.fixed-48 { font-size: 3.0rem !important; }
.text-box-heading.fixed-56 { font-size: 3.5rem !important; }
.text-box-heading.fixed-64 { font-size: 4.0rem !important; }
.text-box-heading.fixed-72 { font-size: 4.5rem !important; }
.text-box-heading.fixed-80 { font-size: 5.0rem !important; }
.text-box-heading.fixed-96 { font-size: 6.0rem !important; }

/* --- Text block body: fluid-N on container → .text-box-content font size --- */
.text-content-box.fluid-10 .text-box-content { font-size: clamp(0.5312rem, 0.75vw, 0.7188rem) !important; }
.text-content-box.fluid-11 .text-box-content { font-size: clamp(0.5844rem, 0.825vw, 0.7906rem) !important; }
.text-content-box.fluid-12 .text-box-content { font-size: clamp(0.6375rem, 0.9vw, 0.8625rem) !important; }
.text-content-box.fluid-13 .text-box-content { font-size: clamp(0.6906rem, 0.975vw, 0.9344rem) !important; }
.text-content-box.fluid-14 .text-box-content { font-size: clamp(0.7438rem, 1.05vw, 1.0062rem) !important; }
.text-content-box.fluid-15 .text-box-content { font-size: clamp(0.7969rem, 1.125vw, 1.0781rem) !important; }
.text-content-box.fluid-16 .text-box-content { font-size: clamp(0.85rem, 1.2vw, 1.15rem) !important; }
.text-content-box.fluid-17 .text-box-content { font-size: clamp(0.9031rem, 1.275vw, 1.2219rem) !important; }
.text-content-box.fluid-18 .text-box-content { font-size: clamp(0.9562rem, 1.35vw, 1.2937rem) !important; }
.text-content-box.fluid-19 .text-box-content { font-size: clamp(1.0094rem, 1.425vw, 1.3656rem) !important; }
.text-content-box.fluid-20 .text-box-content { font-size: clamp(1.0625rem, 1.5vw, 1.4375rem) !important; }
.text-content-box.fluid-22 .text-box-content { font-size: clamp(1.1687rem, 1.65vw, 1.5812rem) !important; }
.text-content-box.fluid-24 .text-box-content { font-size: clamp(1.275rem, 1.8vw, 1.725rem) !important; }
.text-content-box.fluid-26 .text-box-content { font-size: clamp(1.3812rem, 1.95vw, 1.8687rem) !important; }
.text-content-box.fluid-28 .text-box-content { font-size: clamp(1.4875rem, 2.1vw, 2.0125rem) !important; }
.text-content-box.fluid-30 .text-box-content { font-size: clamp(1.5938rem, 2.25vw, 2.1562rem) !important; }
.text-content-box.fluid-32 .text-box-content { font-size: clamp(1.7rem, 2.4vw, 2.3rem) !important; }
.text-content-box.fluid-36 .text-box-content { font-size: clamp(1.9125rem, 2.7vw, 2.5875rem) !important; }
.text-content-box.fluid-40 .text-box-content { font-size: clamp(2.125rem, 3.0vw, 2.875rem) !important; }
.text-content-box.fluid-44 .text-box-content { font-size: clamp(2.3375rem, 3.3vw, 3.1625rem) !important; }
.text-content-box.fluid-48 .text-box-content { font-size: clamp(2.55rem, 3.6vw, 3.45rem) !important; }
.text-content-box.fluid-56 .text-box-content { font-size: clamp(2.975rem, 4.2vw, 4.025rem) !important; }
.text-content-box.fluid-64 .text-box-content { font-size: clamp(3.4rem, 4.8vw, 4.6rem) !important; }
.text-content-box.fluid-72 .text-box-content { font-size: clamp(3.825rem, 5.4vw, 5.175rem) !important; }
.text-content-box.fluid-80 .text-box-content { font-size: clamp(4.25rem, 6.0vw, 5.75rem) !important; }
.text-content-box.fluid-96 .text-box-content { font-size: clamp(5.1rem, 7.2vw, 6.9rem) !important; }


/* ==========================================================================
   FLIP HERO BLOCK
   4 flip cards (corners) + 1 hero image (centre 2×2)
   ========================================================================== */

/* Defensive: in this theme's own CSS neither .soec-block nor .contained-width
   sets overflow at all (see the generic rules for both, above) - but forcing
   overflow:visible here explicitly, scoped to FlipHero only, guarantees
   nothing can clip these cards' shadows at the wrapper level regardless of
   where a conflicting rule might come from (a plugin, page builder, or
   customizer CSS this stylesheet has no visibility into). Scoped to
   .block-type-fliphero so it can't affect any other block type. */
.soec-block.block-type-fliphero,
.soec-block.block-type-fliphero .contained-width,
.soec-block.block-type-fliphero .full-width {
    overflow: visible;
}

/* ── Grid container ─────────────────────────────────────────────────────── */
/* The grid uses grid-template-columns with explicit card sizing.
   Each card column = 25% of grid width. With 1:1 cards the card height = card width.
   We set the row height explicitly using a calc so the grid has real dimensions. */
.flip-hero-wrapper {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: repeat(2, 1fr);
    width: 100%;
    position: relative;
    /* No overflow:hidden — that clips individual card shadows.
       Shadow is applied to individual card inners, not the wrapper. */
}

/* Flip Hero's dark overlay backdrop is handled by the same shared
   .flip-backdrop element used by Flip Block — see setupBackdropObserver()
   in blocks.js and the .flip-backdrop rule earlier in this file. It used to
   be its own ::before pseudo-element scoped to .flip-hero-wrapper, driven
   by :has(), but that has the same stacking-context problem the expanded
   card itself had (and pseudo-elements can't be portaled to <body> the way
   a real element can). */

/* Drive grid height from card aspect ratio:
   card width = 25% of grid = 25vw (approx). Row height = card width × ratio.
   We use aspect-ratio on the wrapper itself to set total height = 50% of width (for 1:1 cards).
   Hero cell then fills via align-self: stretch (default). */
.flip-hero-wrapper.aspect-1-1  { aspect-ratio: 2 / 1; }
.flip-hero-wrapper.aspect-3-4  { aspect-ratio: 3 / 2; }
.flip-hero-wrapper.aspect-4-5  { aspect-ratio: 8 / 5; }
.flip-hero-wrapper.aspect-16-9 { aspect-ratio: 32 / 9; }

/* H-Gap */
.flip-hero-wrapper.h-gap-none     { column-gap: 0; }
.flip-hero-wrapper.h-gap-narrow   { column-gap: 8px; }
.flip-hero-wrapper.h-gap-normal   { column-gap: 16px; }
.flip-hero-wrapper.h-gap-wide     { column-gap: 24px; }
.flip-hero-wrapper.h-gap-spacious { column-gap: 32px; }

/* V-Gap */
.flip-hero-wrapper.v-gap-none     { row-gap: 0; }
.flip-hero-wrapper.v-gap-narrow   { row-gap: 8px; }
.flip-hero-wrapper.v-gap-normal   { row-gap: 16px; }
.flip-hero-wrapper.v-gap-wide     { row-gap: 24px; }
.flip-hero-wrapper.v-gap-spacious { row-gap: 32px; }

/* ── Card positions — 4-card layout (2 per side, default) ────────────── */
.flip-hero-wrapper.cards-2 .flip-hero-card--tl { grid-column: 1; grid-row: 1; }
.flip-hero-wrapper.cards-2 .flip-hero-card--bl { grid-column: 1; grid-row: 2; }
.flip-hero-wrapper.cards-2 .flip-hero-card--tr { grid-column: 4; grid-row: 1; }
.flip-hero-wrapper.cards-2 .flip-hero-card--br { grid-column: 4; grid-row: 2; }

/* Fallback: no cards class = 4-card layout */
.flip-hero-card--tl { grid-column: 1; grid-row: 1; }
.flip-hero-card--bl { grid-column: 1; grid-row: 2; }
.flip-hero-card--tr { grid-column: 4; grid-row: 1; }
.flip-hero-card--br { grid-column: 4; grid-row: 2; }

/* ── 6-card layout (3 per side) ─────────────────────────────────────────── */
/* Grid: 4 columns × 3 rows. Cards in col 1 (left) and col 4 (right).
   Hero spans cols 2–3, all 3 rows → width=50%, height=75% → 2:3 portrait.
   Wrapper aspect-ratio: 4:3 (width=W, height=¾W; card width=¼W = card height). */
.flip-hero-wrapper.cards-3 {
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: repeat(3, 1fr);
}

.flip-hero-wrapper.cards-3 .flip-hero-card--tl { grid-column: 1; grid-row: 1; }
.flip-hero-wrapper.cards-3 .flip-hero-card--ml { grid-column: 1; grid-row: 2; }
.flip-hero-wrapper.cards-3 .flip-hero-card--bl { grid-column: 1; grid-row: 3; }
.flip-hero-wrapper.cards-3 .flip-hero-card--tr { grid-column: 4; grid-row: 1; }
.flip-hero-wrapper.cards-3 .flip-hero-card--mr { grid-column: 4; grid-row: 2; }
.flip-hero-wrapper.cards-3 .flip-hero-card--br { grid-column: 4; grid-row: 3; }

/* Hero cell spans both middle columns and all 3 rows */
.flip-hero-wrapper.cards-3 .flip-hero-image-cell {
    grid-column: 2 / 4;
    grid-row: 1 / 4;
}

/* Aspect ratio on wrapper: 4:3 for 6-card (overrides the aspect-* class) */
.flip-hero-wrapper.cards-3.aspect-4-3 { aspect-ratio: 4 / 3; }

/* Card aspect ratio: always square in 6-card layout */
.flip-hero-wrapper.cards-3 .flip-hero-card { aspect-ratio: 1 / 1; }
.flip-hero-wrapper.cards-3 .flip-hero-card .flip-card-grid-inner { aspect-ratio: 1 / 1; }

/* Flip card cells: aspect-ratio on the grid item drives row height */
.flip-hero-card {
    position: relative;
    min-height: 0;
}

/* Aspect ratio on the grid item itself — this is what actually sets row height */
/* 4-card layout: aspect controlled by the aspect-* class on the wrapper */
.flip-hero-wrapper.cards-2.aspect-1-1  .flip-hero-card,
.flip-hero-wrapper.aspect-1-1  .flip-hero-card  { aspect-ratio: 1 / 1; }
.flip-hero-wrapper.cards-2.aspect-3-4  .flip-hero-card,
.flip-hero-wrapper.aspect-3-4  .flip-hero-card  { aspect-ratio: 3 / 4; }
.flip-hero-wrapper.cards-2.aspect-4-5  .flip-hero-card,
.flip-hero-wrapper.aspect-4-5  .flip-hero-card  { aspect-ratio: 4 / 5; }
.flip-hero-wrapper.cards-2.aspect-16-9 .flip-hero-card,
.flip-hero-wrapper.aspect-16-9 .flip-hero-card  { aspect-ratio: 16 / 9; }

.flip-hero-card .flip-card-pair {
    width: 100%;
}
.flip-hero-card .flip-card-grid {
    width: 100%;
    /* Border-radius here (not just on -inner below) so that a box-shadow
       placed on this element - which, unlike -inner, has no overflow:hidden
       to clip its own shadow - still follows the card's rounded shape.
       See "Shadow variants" below for why the shadow lives here now. */
    border-radius: 16px;
}
.flip-hero-card .flip-card-grid-inner {
    width: 100%;
    position: relative;
    border-radius: 16px;
    overflow: hidden;
}

/* Match inner to card aspect ratio so it fills the card correctly */
/* 4-card layout */
.flip-hero-wrapper.cards-2.aspect-1-1  .flip-hero-card .flip-card-grid-inner,
.flip-hero-wrapper.aspect-1-1  .flip-hero-card .flip-card-grid-inner  { aspect-ratio: 1 / 1; }
.flip-hero-wrapper.cards-2.aspect-3-4  .flip-hero-card .flip-card-grid-inner,
.flip-hero-wrapper.aspect-3-4  .flip-hero-card .flip-card-grid-inner  { aspect-ratio: 3 / 4; }
.flip-hero-wrapper.cards-2.aspect-4-5  .flip-hero-card .flip-card-grid-inner,
.flip-hero-wrapper.aspect-4-5  .flip-hero-card .flip-card-grid-inner  { aspect-ratio: 4 / 5; }
.flip-hero-wrapper.cards-2.aspect-16-9 .flip-hero-card .flip-card-grid-inner,
.flip-hero-wrapper.aspect-16-9 .flip-hero-card .flip-card-grid-inner  { aspect-ratio: 16 / 9; }

/* ── Front image fills the card ─────────────────────────────────────────── */
.flip-hero-card .flip-card-front-image {
    position: absolute;
    inset: 0;
    overflow: hidden;
}
.flip-hero-card .flip-card-front-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transform: scale(var(--image-scale, 1));
}

/* ── Front overlay layer (colour tint) ─────────────────────────────────── */
.flip-hero-overlay-layer {
    position: absolute;
    pointer-events: none;
    z-index: 1;
}

/* ── Overlay scope: whole (default) ── */
.flip-hero-overlay-layer.scope-whole { inset: 0; }
/* third variants — default to bottom third.
   NOTE: adding 'upper'/'lower' means these 5 bands no longer split the image
   into equal thirds — top/bottom are now tighter edge bands, inset slightly
   from the true image edge (see below), with upper/lower as larger
   transitional bands and middle centred. Existing cards using
   top/middle/bottom will shift slightly as a result.
   Top/bottom bands are inset 4% from the true edge rather than sitting
   flush against it — their far edge (bordering upper/lower) is unchanged,
   only the edge nearest the image border moves in, so upper/middle/lower
   are unaffected. */
.flip-hero-overlay-layer.scope-third.pos-top    { top: 4%;   left: 0; right: 0; height: 11%; }
.flip-hero-overlay-layer.scope-third.pos-upper  { top: 15%;  left: 0; right: 0; height: 25%; }
.flip-hero-overlay-layer.scope-third.pos-middle { top: 40%;  left: 0; right: 0; height: 20%; }
.flip-hero-overlay-layer.scope-third.pos-lower  { top: 60%;  left: 0; right: 0; height: 25%; }
.flip-hero-overlay-layer.scope-third.pos-bottom { bottom: 4%; left: 0; right: 0; height: 11%; }

/* ── Front overlay text ─────────────────────────────────────────────────── */
.flip-hero-overlay-text {
    position: absolute;
    left: 0;
    right: 0;
    padding: 12px 14px;
    z-index: 2;
    font-family: 'Fraunces', serif;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    line-height: 1.25;
}

/* Whole scope: text positioned by pos class.
   Anchors run 0% (top) → 20% (upper) → 50% (middle) → 80% (lower) → 100%
   (bottom) — upper/lower sit off-centre, closer to the edge they lean
   toward than to the middle. */
.flip-hero-overlay-text.scope-whole.pos-top    { top: 0;      bottom: auto; align-items: flex-start; }
.flip-hero-overlay-text.scope-whole.pos-upper  { top: 20%;    bottom: auto; transform: translateY(-50%); align-items: center; }
.flip-hero-overlay-text.scope-whole.pos-middle { top: 50%;    bottom: auto; transform: translateY(-50%); align-items: center; }
.flip-hero-overlay-text.scope-whole.pos-lower  { top: 80%;    bottom: auto; transform: translateY(-50%); align-items: center; }
.flip-hero-overlay-text.scope-whole.pos-bottom { bottom: 0;   top: auto;    align-items: flex-end; }

/* Third scope: text sits centred in its band, same as before — the band
   itself (see layer rules above) is what moved, not the text's alignment
   within it. */
.flip-hero-overlay-text.scope-third.pos-top    { top: 4%;    height: 11%; align-items: center; }
.flip-hero-overlay-text.scope-third.pos-upper  { top: 15%;   height: 25%; align-items: center; }
.flip-hero-overlay-text.scope-third.pos-middle { top: 40%;   height: 20%; align-items: center; }
.flip-hero-overlay-text.scope-third.pos-lower  { top: 60%;  height: 25%; align-items: center; }
.flip-hero-overlay-text.scope-third.pos-bottom { bottom: 4%; height: 11%; align-items: center; }

/* On mobile, force the overlay scope to the full card regardless of the
   desktop "third" setting — a title confined to a band that's only ~15-25%
   of the card's height ends up taking up disproportionately more relative
   space on a small screen than it does on desktop, so on mobile every card
   behaves like scope-whole instead. Uses !important since the pos-specific
   rules above (3 classes) are otherwise more specific than these (2
   classes) — needed to reliably win regardless of source order. */
@media (max-width: 768px) {
    .flip-hero-overlay-layer.scope-third {
        inset: 0 !important;
        height: auto !important;
    }

    .flip-hero-overlay-text.scope-third {
        height: auto !important;
    }
    .flip-hero-overlay-text.scope-third.pos-top    { top: 0 !important;    bottom: auto !important; align-items: flex-start !important; }
    .flip-hero-overlay-text.scope-third.pos-upper  { top: 20% !important;  bottom: auto !important; transform: translateY(-50%); align-items: center !important; }
    .flip-hero-overlay-text.scope-third.pos-middle { top: 50% !important;  bottom: auto !important; transform: translateY(-50%); align-items: center !important; }
    .flip-hero-overlay-text.scope-third.pos-lower  { top: 80% !important;  bottom: auto !important; transform: translateY(-50%); align-items: center !important; }
    .flip-hero-overlay-text.scope-third.pos-bottom { bottom: 0 !important; top: auto !important;    align-items: flex-end !important; }
}

.flip-hero-overlay-text.align-center { justify-content: center; }
.flip-hero-overlay-text.align-left   { justify-content: flex-start; text-align: left; }
.flip-hero-overlay-text.align-right  { justify-content: flex-end;  text-align: right; }

/* Flip icon positioning */
.flip-hero-card .flip-icon {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 22px;
    height: 22px;
    z-index: 3;
    opacity: 0.7;
}
.flip-hero-card .flip-icon svg { width: 100%; height: 100%; }

/* ── Hero image cell ────────────────────────────────────────────────────── */
.flip-hero-image-cell {
    grid-column: 2 / 4; /* spans columns 2 and 3 */
    grid-row: 1 / 3;    /* spans both rows */
    position: relative;
    min-height: 0;
    display: flex; /* ensures the inner can fill the cell */
    /* Border-radius here (not just on -inner below) so the box-shadow that
       now lives on this element - see "Shadow variants" - follows the same
       rounded shape as the visible hero image, without needing this element
       to also have overflow:hidden (which would clip its own shadow, the
       original bug - see .flip-hero-image-inner below). */
    border-radius: 16px;
}

.flip-hero-image-inner {
    flex: 1;            /* fill the flex parent (the cell) */
    min-height: 0;
    min-width: 0;
    border-radius: 16px;
    overflow: hidden;
    position: relative; /* so absolutely positioned children work */
    display: flex;
    align-items: center;
    justify-content: center;
}

.flip-hero-img-wrap {
    position: absolute;
    inset: 0;
    overflow: hidden;
}
.flip-hero-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transform: scale(var(--image-scale, 1));
}

.flip-hero-img-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.4;
}
.flip-hero-img-placeholder svg {
    width: 48px;
    height: 48px;
}

/* ── Hero overlay text ──────────────────────────────────────────────────── */
.flip-hero-image-cell .flip-hero-overlay-layer {
    border-radius: 16px;
}
.flip-hero-image-cell .flip-hero-overlay-text {
    padding: 20px 24px;
    font-family: 'Fraunces', serif;
}

/* ── Back face typography (Fraunces) ────────────────────────────────────── */
.flip-hero-back-heading {
    font-family: 'Fraunces', serif;
    font-weight: 700;
    margin: 0 0 0.6rem;
    line-height: 1.2;
}
.flip-hero-card .flip-back-bio {
    font-family: 'Fraunces', serif;
}

/* ── Persistent footer (heading-tab system) ─────────────────────────────── */
/* Selector strengthened (ancestor + class) to beat the generic
   `.flip-card-back-content p { margin: 0; }` reset rule. */
.flip-card-back-content .flip-hero-card-footer {
    font-family: 'Fraunces', serif;
    font-weight: 400;
    line-height: 1.4;
    margin: 0.75rem 0 0;
    padding-top: 0.6rem;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

/* ── Heading tabs (white-text rounded button tabs) ──────────────────────── */
.flip-hero-heading-tabs-wrapper {
    margin: 0.75rem 0;
}

.flip-hero-heading-tabs-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}

.flip-hero-heading-tab-btn {
    flex: 1 1 auto;
    min-width: 0;
    background-color: var(--flip-hero-tab-bg, #1b5137);
    color: #ffffff;
    border: none;
    border-radius: 8px;
    padding: 8px 12px;
    font-family: 'Fraunces', serif;
    font-weight: 600;
    font-size: 0.8rem;
    line-height: 1.2;
    text-align: center;
    cursor: pointer;
    opacity: 0.5;
    transition: opacity 0.3s ease, transform 0.2s ease;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.flip-hero-heading-tab-btn:hover {
    opacity: 0.85;
}

.flip-hero-heading-tab-btn.active {
    opacity: 1;
}

.flip-hero-heading-tabs-content {
    position: relative;
}

.flip-hero-heading-tab-content {
    display: none;
    font-family: 'Fraunces', serif;
    line-height: 1.5;
}

.flip-hero-heading-tab-content.active {
    display: block;
    animation: flipHeroTabFadeIn 0.3s ease;
}

/* Selector strengthened (ancestor + class) to beat the generic
   `.flip-card-back-content p { margin: 0; }` reset rule — otherwise this
   margin is silently discarded and the two paragraphs run together. */
.flip-card-back-content .flip-hero-tab-para {
    margin: 0 0 1rem;
}

.flip-card-back-content .flip-hero-tab-para:last-child {
    margin-bottom: 0;
}

.flip-hero-tab-link {
    text-decoration: none;
    font-weight: 600;
}

@keyframes flipHeroTabFadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

@media (max-width: 768px) {
    .flip-hero-heading-tab-btn {
        font-size: 0.7rem;
        padding: 6px 8px;
    }
}

/* ── Shadow variants ────────────────────────────────────────────────────── */
/* Applied to .flip-card-grid / .flip-hero-image-cell (the parents), NOT
   their -inner children - the -inner elements need overflow:hidden to crop
   the flip faces/image to the rounded corners, and overflow:hidden on an
   element clips that same element's own box-shadow. Putting the shadow on
   the parent (which has no overflow:hidden) avoids that self-clipping. */
.flip-hero-wrapper.shadow-none   .flip-card-grid,
.flip-hero-wrapper.shadow-none   .flip-hero-image-cell { box-shadow: none; }
.flip-hero-wrapper.shadow-mild   .flip-card-grid,
.flip-hero-wrapper.shadow-mild   .flip-hero-image-cell { box-shadow: 0 4px 16px rgba(6,39,53,0.15); }
.flip-hero-wrapper.shadow-medium .flip-card-grid,
.flip-hero-wrapper.shadow-medium .flip-hero-image-cell { box-shadow: 0 8px 24px rgba(6,39,53,0.25); }
.flip-hero-wrapper.shadow-strong .flip-card-grid,
.flip-hero-wrapper.shadow-strong .flip-hero-image-cell { box-shadow: 0 12px 32px rgba(6,39,53,0.4); }

/* ── Hover lift on flip cards ───────────────────────────────────────────── */
/* Transform + shadow now both apply to .flip-card-grid itself (the hovered
   element) rather than reaching into its -inner child - which also nicely
   separates the hover "lift" from the flip animation's own rotateY()
   transform on -inner, so the two no longer have to share one element's
   transform property. */
.flip-hero-card .flip-card-pair:not(.flipping):not(.flipped) .flip-card-grid:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(6,39,53,0.3);
}

/* ── Mobile: stack vertically ───────────────────────────────────────────── */
@media (max-width: 640px) {
    /* Defensive fix for cross-browser sub-pixel rounding differences in CSS
       Grid track sizing (observed as the card grid bleeding slightly past the
       right edge on Android Chrome while iOS Safari/Chrome render it flush).
       Forces border-box sizing throughout and hard-caps the wrapper to the
       viewport width as a safety net. */
    .flip-hero-wrapper {
        max-width: 100%;
        overflow-x: hidden;
    }

    .flip-hero-wrapper,
    .flip-hero-wrapper * {
        box-sizing: border-box;
    }

    .flip-hero-card,
    .flip-hero-image-cell {
        min-width: 0;
    }

    /* ── 4-card mobile: hero full width, 2×2 grid below ── */
    .flip-hero-wrapper.cards-2,
    .flip-hero-wrapper:not(.cards-3) {
        grid-template-columns: repeat(2, 1fr);
        grid-template-rows: auto auto auto;
        aspect-ratio: unset;
    }

    .flip-hero-wrapper.cards-2 .flip-hero-image-cell,
    .flip-hero-wrapper:not(.cards-3) .flip-hero-image-cell {
        grid-column: 1 / 3;
        grid-row: 1;
        aspect-ratio: 1 / 1;
    }

    .flip-hero-wrapper.cards-2 .flip-hero-card--tl,
    .flip-hero-wrapper:not(.cards-3) .flip-hero-card--tl { grid-column: 1; grid-row: 2; aspect-ratio: 1 / 1; }
    .flip-hero-wrapper.cards-2 .flip-hero-card--bl,
    .flip-hero-wrapper:not(.cards-3) .flip-hero-card--bl { grid-column: 1; grid-row: 3; aspect-ratio: 1 / 1; }
    .flip-hero-wrapper.cards-2 .flip-hero-card--tr,
    .flip-hero-wrapper:not(.cards-3) .flip-hero-card--tr { grid-column: 2; grid-row: 2; aspect-ratio: 1 / 1; }
    .flip-hero-wrapper.cards-2 .flip-hero-card--br,
    .flip-hero-wrapper:not(.cards-3) .flip-hero-card--br { grid-column: 2; grid-row: 3; aspect-ratio: 1 / 1; }

    /* ── 6-card mobile: hero full width (portrait), 2×3 grid below ── */
    .flip-hero-wrapper.cards-3 {
        grid-template-columns: repeat(2, 1fr) !important;
        grid-template-rows: auto auto auto auto !important;
        aspect-ratio: unset !important;
        display: grid !important;
        row-gap: 12px;
    }

    .flip-hero-wrapper.cards-3 .flip-hero-image-cell {
        grid-column: 1 / 3;
        grid-row: 1;
        aspect-ratio: 2 / 3; /* maintain portrait ratio on mobile */
    }

    /* 6 cards in 2×3 grid below hero */
    .flip-hero-wrapper.cards-3 .flip-hero-card--tl { grid-column: 1; grid-row: 2; aspect-ratio: 1 / 1; }
    .flip-hero-wrapper.cards-3 .flip-hero-card--ml { grid-column: 1; grid-row: 3; aspect-ratio: 1 / 1; }
    .flip-hero-wrapper.cards-3 .flip-hero-card--bl { grid-column: 1; grid-row: 4; aspect-ratio: 1 / 1; }
    .flip-hero-wrapper.cards-3 .flip-hero-card--tr { grid-column: 2; grid-row: 2; aspect-ratio: 1 / 1; }
    .flip-hero-wrapper.cards-3 .flip-hero-card--mr { grid-column: 2; grid-row: 3; aspect-ratio: 1 / 1; }
    .flip-hero-wrapper.cards-3 .flip-hero-card--br { grid-column: 2; grid-row: 4; aspect-ratio: 1 / 1; }

    /* 6-card mobile layout fixes: prevent overlap */
    .flip-hero-wrapper.cards-3 {
        display: grid;
        row-gap: 12px;
    }

    .flip-hero-wrapper.cards-3 .flip-hero-image-cell {
        position: relative;
        z-index: 1;
        min-height: 0;
        overflow: hidden;
    }

    .flip-hero-wrapper.cards-3 .flip-hero-card {
        position: relative;
        z-index: 2;
        min-height: 0;
        overflow: hidden;
        width: 100%;
        height: 100%;
    }
}

/* ── Flipped/expanded back card on mobile: 95vw wide, height depends on
   orientation (75vh portrait, 40vh landscape — landscape viewports are much
   shorter, so it gets a smaller share). Layout depends on device orientation:
     - Portrait (the default mobile case): stacked, image on top, text below.
     - Landscape: side-by-side 50/50, image on the LEFT, text on the right.
   Scoped via .is-hero-expanded (a class openCard() adds to .flip-card-expanded
   itself when it detects the pair is inside .flip-hero-wrapper) rather than
   ancestry, so the plain Flip block's own expanded-card modal (which shares
   the same class names) stays untouched. Ancestry alone doesn't work here
   because .flip-card-expanded is portaled to a direct child of <body> on
   open, so it's no longer a descendant of .flip-hero-wrapper by the time
   these rules need to apply.

   The shared positioning/sizing rules use a 900px threshold rather than
   768px specifically so they still apply to phones that are wider than
   768px once rotated into landscape (common on larger phones) — otherwise
   the centering and header-offset would silently stop applying right when
   switching to landscape.

   Centering uses inset:0 + margin:auto instead of left:50%/translate(-50%),
   since the translate approach is what was causing the card to hang off
   the right edge on Android Chrome — auto-margins center a box within its
   containing block without relying on transform math, which sidesteps that
   rounding difference between browsers.

   The site header sits fixed at the top of the screen, so straight
   viewport-centering would put the card partly behind it. Setting `top` to
   the full header height (rather than 0) shifts the centered position down
   by exactly half the header height — the card keeps its own height, it
   just centers within the space below the header instead of the full
   screen, so its middle ends up header-height/2 further down. */
@media (max-width: 900px) {
    .flip-card-expanded.is-hero-expanded {
        left: 0 !important;
        right: 0 !important;
        top: var(--header-height, 65px) !important;
        bottom: 0 !important;
        margin: auto !important;
        transform: none !important;
        width: 95vw !important;
        max-width: none;
        max-height: none;
        aspect-ratio: unset;
    }

    .flip-card-expanded.is-hero-expanded .flip-card-expanded-inner {
        height: 100% !important;
        max-height: none;
    }

    .flip-card-expanded.is-hero-expanded .flip-card-back {
        display: flex;
        height: 100% !important;
        max-height: none;
    }

    .flip-card-expanded.is-hero-expanded .flip-card-back-image {
        min-height: 0;
        max-height: none;
        max-width: none;
        aspect-ratio: unset !important;
    }

    .flip-card-expanded.is-hero-expanded .flip-card-back-content {
        min-height: 0;
        max-height: none;
        overflow-y: auto;
    }
}

/* Portrait (default mobile): stacked, image on top, text below.
   bottom:30px (instead of 0) shifts the centred position up by 15px —
   with top/bottom both feeding the auto-margin centering, moving bottom
   from 0 to 30px raises the box's centre by half that, i.e. 15px. */
@media (max-width: 900px) and (orientation: portrait) {
    .flip-card-expanded.is-hero-expanded {
        bottom: 30px !important;
        height: 78vh !important;
    }

    .flip-card-expanded.is-hero-expanded .flip-card-back {
        flex-direction: column;
    }

    .flip-card-expanded.is-hero-expanded .flip-card-back-image {
        flex: 1 1 50%;
        width: 100%;
        height: auto;
        order: 0;
    }

    .flip-card-expanded.is-hero-expanded .flip-card-back-content {
        flex: 1 1 50%;
        width: 100%;
        order: 1;
        padding: 1.25rem;
    }
}

@media (max-width: 480px) and (orientation: portrait) {
    .flip-card-expanded.is-hero-expanded .flip-card-back-content {
        padding: 1rem;
    }
}

@media (max-width: 480px) {
    .flip-hero-wrapper.cards-3 {
        row-gap: 10px;
    }
}

/* Landscape: side-by-side 50/50, image LEFT, text RIGHT. Height is shorter
   than portrait since the viewport itself is short once rotated. */
@media (max-width: 900px) and (orientation: landscape) {
    .flip-card-expanded.is-hero-expanded {
        height: 65vh !important;
    }

    .flip-card-expanded.is-hero-expanded .flip-card-back {
        flex-direction: row;
    }

    .flip-card-expanded.is-hero-expanded .flip-card-back-image {
        flex: 0 0 50%;
        width: 50%;
        height: 100%;
        order: 0;
    }

    .flip-card-expanded.is-hero-expanded .flip-card-back-content {
        flex: 0 0 50%;
        width: 50%;
        order: 1;
        padding: 1rem 1.25rem;
    }
}

/* ═══════════════════════════════════════════════════════════════════════════════
   FrameHero Block — Asymmetric grid with central Mapbox map and data cards
   ═════════════════════════════════════════════════════════════════════════════════ */

.framehero-wrapper {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: repeat(2, 1fr);
    width: 100%;
    position: relative;
}

/* Frame Hero's dark overlay backdrop (for both its "read more" data-card
   modal and its in-place mini flip cards) is handled by the same shared
   .flip-backdrop element used by Flip Block/Flip Hero/Data Block — see
   setupBackdropObserver() in blocks.js. This used to be two separate,
   duplicate ::before declarations on .framehero-wrapper (one per
   mechanism) — same stacking-context problem the other card overlays had,
   plus since only one ::before can exist per element, the second
   declaration was silently overriding the first's base styling anyway. */

/* Aspect ratios: locked by layout choice
   2-row layout: 1:1 square (wrapper aspect = 2:1)
   3-row layout: 2:3 portrait (wrapper aspect = 4:3) */
.framehero-wrapper.aspect-1-1  { aspect-ratio: 2 / 1; }
.framehero-wrapper.aspect-2-3  { aspect-ratio: 4 / 3; }

/* H-Gap */
.framehero-wrapper.h-gap-none     { column-gap: 0; }
.framehero-wrapper.h-gap-narrow   { column-gap: 8px; }
.framehero-wrapper.h-gap-normal   { column-gap: 16px; }
.framehero-wrapper.h-gap-wide     { column-gap: 24px; }
.framehero-wrapper.h-gap-spacious { column-gap: 32px; }

/* V-Gap */
.framehero-wrapper.v-gap-none     { row-gap: 0; }
.framehero-wrapper.v-gap-narrow   { row-gap: 8px; }
.framehero-wrapper.v-gap-normal   { row-gap: 16px; }
.framehero-wrapper.v-gap-wide     { row-gap: 24px; }
.framehero-wrapper.v-gap-spacious { row-gap: 32px; }

/* ── Card positions — 4-card layout (2 per side, default) ────────────── */
.framehero-wrapper.cards-2 .card-1 { grid-column: 1; grid-row: 1; }
.framehero-wrapper.cards-2 .card-2 { grid-column: 1; grid-row: 2; }
.framehero-wrapper.cards-2 .card-3 { grid-column: 4; grid-row: 1; }
.framehero-wrapper.cards-2 .card-4 { grid-column: 4; grid-row: 2; }

/* Fallback: no cards class = 4-card layout */
.framehero-card.card-1 { grid-column: 1; grid-row: 1; }
.framehero-card.card-2 { grid-column: 1; grid-row: 2; }
.framehero-card.card-3 { grid-column: 4; grid-row: 1; }
.framehero-card.card-4 { grid-column: 4; grid-row: 2; }

/* ── 6-card layout (3 per side) ─────────────────────────────────────────── */
.framehero-wrapper.cards-3 {
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: repeat(3, 1fr);
}

.framehero-wrapper.cards-3 .card-1 { grid-column: 1; grid-row: 1; }
.framehero-wrapper.cards-3 .card-2 { grid-column: 1; grid-row: 2; }
.framehero-wrapper.cards-3 .card-3 { grid-column: 1; grid-row: 3; }
.framehero-wrapper.cards-3 .card-4 { grid-column: 4; grid-row: 1; }
.framehero-wrapper.cards-3 .card-5 { grid-column: 4; grid-row: 2; }
.framehero-wrapper.cards-3 .card-6 { grid-column: 4; grid-row: 3; }

/* Hero cell spans both middle columns */
.framehero-wrapper.cards-2 .framehero-hero { 
    grid-column: 2 / 4;
    grid-row: 1 / 3;
}

.framehero-wrapper.cards-3 .framehero-hero { 
    grid-column: 2 / 4;
    grid-row: 1 / 4;
}

/* Data card container styles */
.framehero-card {
    position: relative;
    min-height: 0;
    display: flex;
}

/* 2-card layout: square cards */
.framehero-wrapper.cards-2 .framehero-card { aspect-ratio: 1 / 1; }

/* 3-card layout: square cards */
.framehero-wrapper.cards-3 .framehero-card { aspect-ratio: 1 / 1; }

/* Flip inner container (for flippable cards) */
.framehero-card .flip-inner {
    width: 100%;
    height: 100%;
    position: relative;
    transform-style: preserve-3d;
    transition: transform 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.framehero-card.flippable .flip-inner {
    cursor: pointer;
}

.framehero-card.flippable.flipped .flip-inner {
    transform: rotateY(180deg);
}

/* Front and back face containers */
.framehero-card .flip-front,
.framehero-card .flip-back {
    width: 100%;
    height: 100%;
    position: absolute;
    backface-visibility: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    overflow: hidden;
    padding: 24px;
    box-sizing: border-box;
}

.framehero-card .flip-back {
    transform: rotateY(180deg);
}

/* Front content layout */
.card-front-content {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    text-align: center;
}

.card-icon-wrapper {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.card-icon {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.card-icon.svg-icon {
    width: 100%;
    height: 100%;
}

.card-icon.svg-icon svg {
    width: 100%;
    height: 100%;
}

.card-icon.image-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.card-stat {
    font-weight: 700;
    line-height: 1.2;
}

.card-desc {
    line-height: 1.4;
}

/* Back content layout */
.card-back-content {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    gap: 12px;
    overflow-y: auto;
    padding: 0;
}

.card-back-heading {
    margin: 0;
    line-height: 1.2;
}

.card-back-subheading {
    margin: 0;
    line-height: 1.3;
}

.card-back-body {
    flex: 1;
    line-height: 1.5;
    overflow-y: auto;
}

.card-back-image {
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: 8px;
    overflow: hidden;
    margin: 8px 0;
}

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

.card-back-badge {
    position: absolute;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.card-back-badge.badge-tr { top: 10px; right: 10px; }
.card-back-badge.badge-tl { top: 10px; left: 10px; }
.card-back-badge.badge-br { bottom: 10px; right: 10px; }
.card-back-badge.badge-bl { bottom: 10px; left: 10px; }

.card-back-badge img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.card-back-button-wrapper {
    margin-top: auto;
}

.card-back-button {
    display: inline-block;
    padding: 8px 16px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: opacity 0.2s;
    cursor: pointer;
    border: none;
}

.card-back-button:hover {
    opacity: 0.85;
}

/* ── Hero Map Cell ────────────────────────────────────────────────────── */
.framehero-hero {
    position: relative;
    min-height: 0;
    display: flex;
    align-items: stretch;
}

.framehero-map-container {
    width: 100%;
    height: 100%;
    border-radius: 16px;
    overflow: hidden;
}

.framehero-map {
    width: 100%;
    height: 100%;
}

/* Shadow strength modifiers */
.framehero-wrapper.shadow-none {
    --card-shadow: none;
}

.framehero-wrapper.shadow-mild {
    --card-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.framehero-wrapper.shadow-medium {
    --card-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.framehero-wrapper.shadow-strong {
    --card-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.framehero-card .flip-front,
.framehero-card .flip-back {
    box-shadow: var(--card-shadow, 0 2px 8px rgba(0, 0, 0, 0.1));
}

.framehero-hero {
    box-shadow: var(--card-shadow, 0 2px 8px rgba(0, 0, 0, 0.1));
}

/* ── Mobile / Tablet Responsive ────────────────────────────────────────── */
@media (max-width: 1024px) {
    .framehero-wrapper {
        grid-template-columns: repeat(2, 1fr);
        grid-template-rows: auto;
    }

    .framehero-wrapper.cards-2 .framehero-hero {
        grid-column: 1 / 3;
        grid-row: 1;
        aspect-ratio: 1 / 1;
        margin-bottom: 16px;
    }

    .framehero-wrapper.cards-2 .card-1 { grid-column: 1; grid-row: 2; }
    .framehero-wrapper.cards-2 .card-2 { grid-column: 2; grid-row: 2; }
    .framehero-wrapper.cards-2 .card-3 { grid-column: 1; grid-row: 3; }
    .framehero-wrapper.cards-2 .card-4 { grid-column: 2; grid-row: 3; }

    .framehero-wrapper.cards-3 .framehero-hero {
        grid-column: 1 / 3;
        grid-row: 1;
        aspect-ratio: 2 / 3;
        margin-bottom: 16px;
    }

    .framehero-wrapper.cards-3 .card-1 { grid-column: 1; grid-row: 2; }
    .framehero-wrapper.cards-3 .card-2 { grid-column: 2; grid-row: 2; }
    .framehero-wrapper.cards-3 .card-3 { grid-column: 1; grid-row: 3; }
    .framehero-wrapper.cards-3 .card-4 { grid-column: 2; grid-row: 3; }
    .framehero-wrapper.cards-3 .card-5 { grid-column: 1; grid-row: 4; }
    .framehero-wrapper.cards-3 .card-6 { grid-column: 2; grid-row: 4; }
}

@media (max-width: 768px) {
    .framehero-wrapper {
        grid-template-columns: 1fr;
    }

    .framehero-wrapper.cards-2 .framehero-hero,
    .framehero-wrapper.cards-3 .framehero-hero {
        grid-column: 1;
        width: 100%;
        margin-bottom: 12px;
    }

    .framehero-card {
        aspect-ratio: 1 / 1;
    }

    .framehero-card .flip-front,
    .framehero-card .flip-back {
        padding: 16px;
    }

    .card-icon {
        width: 50px;
        height: 50px;
    }
}

@media (max-width: 480px) {
    .framehero-wrapper {
        column-gap: 10px;
        row-gap: 10px;
    }

    .framehero-card .flip-front,
    .framehero-card .flip-back {
        padding: 12px;
    }

    .card-icon {
        width: 40px;
        height: 40px;
    }

    .card-stat {
        font-size: 14px;
    }

    .card-desc {
        font-size: 12px;
    }
}
/* ===== FRAMEHERO BLOCK CRITICAL FIXES ===== */

/* 1. SIMPLE TITLE - Add framehero support to universal selectors */
.framehero-simple-title-wrapper {
    width: 100%;
    max-width: 100%;
    margin: 0 auto 8px auto;
    padding: 0;
    box-sizing: border-box;
}

.framehero-simple-title-wrapper .simple-title-box {
    width: 100%;
    aspect-ratio: 16 / 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
    box-sizing: border-box;
    padding: 0 20px;
    margin: 0;
}

.framehero-simple-title-wrapper .simple-title-text {
    color: #ffffff;
    font-family: 'Fraunces', serif;
    font-optical-sizing: auto;
    font-weight: 500;
    font-style: normal;
    font-variation-settings: "SOFT" 50, "WONK" 0.5;
    font-size: clamp(1.5rem, 3.4vw, 2.125rem);
    letter-spacing: 0.02em;
    text-transform: none;
    text-align: center;
    line-height: 1.2;
    margin: 0;
    padding: 0;
}

/* 2. WRAPPER - Remove shadow clipping */
.framehero-wrapper {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: repeat(2, 1fr);
    width: 100%;
    position: relative;
    box-shadow: none !important; /* NO shadow on wrapper */
}

/* 3. CARDS - Add curved corners and proper shadows */
.framehero-card {
    border-radius: 16px;
    overflow: hidden;
}

.framehero-card .flip-front,
.framehero-card .flip-back {
    border-radius: 16px;
    box-shadow: 0 4px 16px rgba(6, 39, 53, 0.15);
}

.framehero-wrapper.shadow-mild .framehero-card .flip-front,
.framehero-wrapper.shadow-mild .framehero-card .flip-back {
    box-shadow: 0 4px 16px rgba(6, 39, 53, 0.15);
}

.framehero-wrapper.shadow-medium .framehero-card .flip-front,
.framehero-wrapper.shadow-medium .framehero-card .flip-back {
    box-shadow: 0 8px 24px rgba(6, 39, 53, 0.25);
}

.framehero-wrapper.shadow-strong .framehero-card .flip-front,
.framehero-wrapper.shadow-strong .framehero-card .flip-back {
    box-shadow: 0 12px 32px rgba(6, 39, 53, 0.4);
}

.framehero-wrapper.shadow-none .framehero-card .flip-front,
.framehero-wrapper.shadow-none .framehero-card .flip-back {
    box-shadow: none;
}

/* 4. MAP CONTAINER - Ensure proper sizing and visibility */
.framehero-hero {
    position: relative;
    min-height: 0;
    display: flex;
    align-items: stretch;
    border-radius: 16px;
    overflow: hidden;
}

.framehero-map-wrapper {
    width: 100%;
    height: 100%;
    position: relative;
    border-radius: 16px;
    overflow: hidden;
}

.framehero-map-wrapper.shadow-mild {
    box-shadow: 0 4px 16px rgba(6, 39, 53, 0.15);
}

.framehero-map-wrapper.shadow-medium {
    box-shadow: 0 8px 24px rgba(6, 39, 53, 0.25);
}

.framehero-map-wrapper.shadow-strong {
    box-shadow: 0 12px 32px rgba(6, 39, 53, 0.4);
}

.framehero-map-wrapper.shadow-none {
    box-shadow: none;
}

#framehero-map-0,
.mapbox-map {
    width: 100% !important;
    height: 100% !important;
    min-height: 400px !important;
    border-radius: 16px;
}

/* 5. ICON SIZING - Ensure icons display properly */
.framehero-icon {
    width: 60px;
    height: 60px;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.framehero-icon svg {
    width: 100%;
    height: 100%;
}

.framehero-icon img.icon-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.framehero-icon .icon-svg {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.framehero-icon .icon-svg svg {
    width: 100%;
    height: 100%;
}

/* Icon color variants for FrameHero cards */
.framehero-icon.color-white svg { fill: #ffffff; color: #ffffff; }
.framehero-icon.color-charcoal svg { fill: #333; color: #333; }
.framehero-icon.color-burgundy svg { fill: #8b2635; color: #8b2635; }
.framehero-icon.color-forest-green svg { fill: #1b5137; color: #1b5137; }
.framehero-icon.color-emerald-green svg { fill: #059669; color: #059669; }
.framehero-icon.color-sage-green svg { fill: #8ca280; color: #8ca280; }
.framehero-icon.color-tab-blue svg { fill: #4f9aa8; color: #4f9aa8; }
.framehero-icon.color-highlight-orange svg { fill: #e1a038; color: #e1a038; }
.framehero-icon.color-rust-red svg { fill: #cc4020; color: #cc4020; }
.framehero-icon.color-brick-red svg { fill: #8c1a22; color: #8c1a22; }

/* 6. FRONT/BACK CONTENT - Proper layout */
.framehero-front-content,
.framehero-back-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    text-align: center;
}

.framehero-back-content {
    align-items: flex-start;
    justify-content: flex-start;
    text-align: left;
}

/* 7. FLIP ANIMATION - Proper 3D + Overlay Depth */
.framehero-card.flippable {
    cursor: pointer;
}

.framehero-card .flip-inner {
    width: 100%;
    height: 100%;
    position: relative;
    transform-style: preserve-3d;
    transition: transform 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.framehero-card.flippable.flipped .flip-inner {
    transform: rotateY(180deg);
}

.framehero-card.flippable.flipping .flip-inner {
    animation: cardFlip 0.6s ease-out;
}

.framehero-card.flippable.closing .flip-inner {
    animation: cardClose 0.3s ease-in;
}

@keyframes cardFlip {
    from { transform: rotateY(0deg); }
    to { transform: rotateY(180deg); }
}

@keyframes cardClose {
    from { transform: rotateY(180deg); }
    to { transform: rotateY(0deg); }
}

.framehero-card .flip-front,
.framehero-card .flip-back {
    width: 100%;
    height: 100%;
    position: absolute;
    backface-visibility: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    overflow: auto;
    padding: 24px;
    box-sizing: border-box;
}

.framehero-card .flip-back {
    transform: rotateY(180deg);
}

/* 8. DARK OVERLAY - handled by the shared .flip-backdrop element instead
   (see setupBackdropObserver() in blocks.js, and the comment near the top
   of the FrameHero Block section above, where the matching duplicate
   .data-card-flip-pair-driven backdrop was also removed). */

/* 9. FLIP ICON - Style the flip indicator */
.framehero-flip-icon {
    position: absolute;
    bottom: 12px;
    right: 12px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    color: white;
    opacity: 0.7;
    transition: opacity 0.3s;
}

.framehero-card:hover .framehero-flip-icon {
    opacity: 1;
}

.framehero-flip-icon svg {
    width: 18px;
    height: 18px;
    stroke-width: 2.5;
}

/* 10. BACK SIDE IMAGES */
.framehero-back-image {
    width: 100%;
    max-height: 40%;
    margin-bottom: 12px;
    border-radius: 8px;
    overflow: hidden;
}

.framehero-back-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.framehero-back-image .slideshow-image {
    display: none;
}

.framehero-back-image .slideshow-image.active {
    display: block;
}

/* 11. BACK CONTENT TEXT */
.framehero-back-heading {
    margin: 0 0 8px 0;
    font-size: 1.25rem;
}

.framehero-back-subheading {
    margin: 0 0 12px 0;
    font-size: 0.95rem;
    opacity: 0.9;
}

.framehero-back-body {
    margin: 0 0 16px 0;
    font-size: 0.9rem;
    line-height: 1.5;
}

/* 12. BACK BUTTON */
.framehero-button-wrapper {
    margin-top: auto;
    width: 100%;
}

.framehero-button {
    display: inline-block;
    padding: 8px 16px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
    border: none;
    cursor: pointer;
}

.framehero-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* ============================================================================
   MAP CONTROLS - Home and Search buttons
   ============================================================================ */

.map-controls-top-left {
    position: absolute;
    top: 12px;
    left: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    z-index: 10;
}

.map-reset-btn,
.map-search-toggle-btn {
    width: 40px;
    height: 40px;
    border-radius: 4px;
    background: #1b5137;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
    color: white;
}

.map-reset-btn:hover,
.map-search-toggle-btn:hover {
    background: #0f3d26;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    transform: scale(1.05);
}

.map-reset-btn svg,
.map-search-toggle-btn svg {
    width: 24px;
    height: 24px;
    fill: #1b5137 !important;
    color: #1b5137 !important;
}

/* ============================================================================
   ROUTE CALCULATOR - Search/distance calculator bar
   ============================================================================ */

.route-calculator {
    position: absolute;
    bottom: 12px;
    left: 12px;
    right: 12px;
    background: white;
    border-radius: 6px;
    padding: 12px 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    z-index: 10;
    font-size: 14px;
}

.route-label {
    color: #666;
    white-space: nowrap;
}

.route-from {
    padding: 6px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    min-width: 120px;
}

.route-from:focus {
    outline: none;
    border-color: #333;
    box-shadow: 0 0 0 2px rgba(51, 51, 51, 0.1);
}

.route-to {
    padding: 6px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    min-width: 140px;
    background: white;
    cursor: pointer;
}

.route-to:focus {
    outline: none;
    border-color: #333;
    box-shadow: 0 0 0 2px rgba(51, 51, 51, 0.1);
}

.route-go-btn {
    padding: 6px 16px;
    background: #1b5137;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.route-go-btn:hover {
    background: #134028;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(27, 81, 55, 0.3);
}

.route-result {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-left: auto;
    color: #333;
    font-weight: 600;
}

.route-result-icon-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
}

.route-result-icon {
    width: 20px;
    height: 20px;
    fill: #1b5137;
}

.route-result-text {
    min-height: 20px;
    white-space: nowrap;
}

/* ============================================================================
   FULL-WIDTH MODAL - Data card expanded state
   Scoped via .is-framehero-expanded (a class openDataCard() adds to
   .data-card-expanded itself when it detects the pair is inside
   .framehero-wrapper) rather than ancestry, so the plain Data Block's own
   expanded-card modal (which shares the same class names) stays untouched.
   Ancestry alone doesn't work here because .data-card-expanded is portaled
   to a direct child of <body> on open, so it's no longer a descendant of
   .framehero-wrapper by the time these rules need to apply.
   ============================================================================ */

.data-card-expanded.is-framehero-expanded .data-card-expanded-inner {
    position: relative;
    width: 100%;
    height: auto;
    max-width: none !important;
    max-height: 85vh;
    transform-style: preserve-3d;
    transform-origin: center center;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(6, 39, 53, 0.4);
    background: white;
    overflow: hidden;
    backface-visibility: hidden;
    z-index: 9999 !important;
    display: flex;
    flex-direction: row;
}

/* Framehero-specific flipped state to ensure transform is reset */
.data-card-expanded.is-framehero-expanded.flipped .data-card-expanded-inner {
    transform: rotateY(0deg) translateX(0px);
    visibility: visible;
}

.data-card-expanded.is-framehero-expanded .data-card-back {
    width: 100%;
    height: auto;
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: row;
    position: relative;
}

.data-card-expanded.is-framehero-expanded .data-card-back-image {
    flex: 0 0 40%;
    min-height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    background: #f5f5f5;
}

.data-card-expanded.is-framehero-expanded .data-card-back-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.data-card-expanded.is-framehero-expanded .data-card-back-content {
    flex: 0 0 60%;
    display: flex;
    flex-direction: column;
    padding: 40px;
    overflow-y: auto;
}
.data-card-back .close-btn {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.95);
    border: none;
    border-radius: 50%;
    font-size: 28px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    color: #333;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.data-card-back .close-btn:hover {
    background: white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    transform: scale(1.1);
}

/* Data Card's dark overlay backdrop is now handled by the same shared
   .flip-backdrop element used by Flip Block/Flip Hero — see
   setupBackdropObserver() in blocks.js. It used to be this
   body.has-flipped-data-card::before pseudo-element, but that had
   `display: none !important` hardcoded onto it (disabled regardless of
   state) even before the portal work, so it was already non-functional.
   Note: body.has-flipped-data-card itself is still used elsewhere in this
   file for a genuine overflow:hidden scroll-lock rule — only the backdrop
   pseudo-element tied to it is removed here. */

/* ============================================================================
   TEXT ALIGNMENT CLASSES - Applied by alignment toggles
   ============================================================================ */

.text-left {
    text-align: left !important;
}

.text-center {
    text-align: center !important;
}

.text-right {
    text-align: right !important;
}

/* Front card specific text alignment overrides */
.framehero-desc1.text-left,
.framehero-desc2.text-left,
.framehero-stat-number.text-left {
    text-align: left !important;
}

.framehero-desc1.text-center,
.framehero-desc2.text-center,
.framehero-stat-number.text-center {
    text-align: center !important;
}

.framehero-desc1.text-right,
.framehero-desc2.text-right,
.framehero-stat-number.text-right {
    text-align: right !important;
}

/* ============================================================================
   BUTTON ALIGNMENT CLASSES
   ============================================================================ */

.framehero-button-wrapper.align-left {
    text-align: left;
}

.framehero-button-wrapper.align-center {
    text-align: center;
}

.framehero-button-wrapper.align-right {
    text-align: right;
}

/* ============================================================================
   ICON TABS COMPONENT - Tabbed content with icon buttons
   ============================================================================ */

.framehero-icon-tabs-wrapper {
    margin: 16px 0;
    padding: 8px 0;
}

.framehero-icon-tabs-row {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.framehero-icon-tab-btn {
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    padding: 0;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.3s ease, border-color 0.3s ease;
    position: relative;
    width: 70px;
    height: 70px;
    color: var(--icon-color, #333333);
}

.framehero-icon-tab-btn:hover {
    opacity: 1 !important;
}

.framehero-icon-tab-btn.active {
    opacity: 1;
    border-bottom-color: var(--icon-color, #333333);
}

.framehero-icon-tab-btn:not(.active) {
    opacity: 0.5;
}

@media (max-width: 768px) {
    .framehero-icon-tab-btn {
        width: 49px;
        height: 49px;
    }
    
    .framehero-icon-tab-svg {
        width: 39px;
        height: 39px;
    }
}

.framehero-icon-tab-svg {
    display: block;
    width: 56px;
    height: 56px;
}

/* Sizes the actual pasted <svg> (now a normal, non-nested child - see the
   PHP comment in frame-hero-block.php on why it isn't wrapped in another
   <svg> anymore) down to fill this wrapper, the same way .framehero-icon
   svg does for the main card icon. Without this, an icon exported with its
   own explicit width="200px" height="200px" renders at that native size
   instead of the intended 56px/39px slot. */
.framehero-icon-tab-svg svg {
    width: 100%;
    height: 100%;
}

.framehero-icon-tabs-content {
    position: relative;
    min-height: 1px;
}

.framehero-icon-tab-text {
    transition: all 0.3s ease;
}

.framehero-icon-tab-text.active {
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* ============================================================================
   FLIP BLOCK ICON TABS STYLING
   ============================================================================ */

.flip-icon-tabs-wrapper {
    margin: 16px 0;
    padding: 8px 0;
}

.flip-icon-tabs-row {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 12px;
}

.flip-icon-tab-btn {
    width: 70px;
    height: 70px;
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    padding: 0;
    cursor: pointer;
    transition: opacity 0.3s ease, border-color 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--icon-color, #333333);
}

.flip-icon-tab-btn:hover {
    opacity: 1 !important;
}

.flip-icon-tab-btn.active {
    opacity: 1;
    border-bottom-color: var(--icon-color, #333333);
}

.flip-icon-tab-btn:not(.active) {
    opacity: 0.5;
}

/* Title-mode tab (used when no icon is set): white-text rounded box,
   matching the FlipHero heading-tab style, instead of a fixed icon square. */
.flip-icon-tab-btn.is-title-tab {
    width: auto;
    height: auto;
    min-width: 70px;
    padding: 8px 14px;
    border-radius: 8px;
}

.flip-icon-tab-title-label {
    display: block;
    color: #ffffff;
    font-family: 'Fraunces', serif;
    font-weight: 600;
    font-size: 0.8rem;
    line-height: 1.2;
    text-align: center;
    white-space: nowrap;
}

@media (max-width: 768px) {
    .flip-icon-tab-btn.is-title-tab {
        width: auto;
        height: auto;
        min-width: 49px;
        padding: 6px 10px;
    }

    .flip-icon-tab-title-label {
        font-size: 0.7rem;
    }
}

@media (max-width: 768px) {
    .flip-icon-tab-btn {
        width: 49px;
        height: 49px;
    }
    
    .flip-icon-tab-svg {
        width: 39px;
        height: 39px;
    }
}

.flip-icon-tab-svg {
    width: 56px;
    height: 56px;
    color: var(--icon-color, #333333);
}

.flip-icon-tab-svg svg {
    width: 100%;
    height: 100%;
    fill: currentColor;
    stroke: currentColor;
}

.flip-icon-tab-svg svg * {
    fill: inherit;
    stroke: inherit;
}

.flip-icon-tab-content {
    display: none;
    transition: all 0.3s ease;
    padding: 12px 0;
}

.flip-icon-tab-content.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

.flip-icon-tab-subheading {
    margin: 0 0 6px 0;
    line-height: 1.4;
}

.flip-icon-tab-subheading.size-small {
    font-size: 13px;
}

.flip-icon-tab-subheading.size-medium {
    font-size: 16px;
}

.flip-icon-tab-subheading.size-large {
    font-size: 19px;
}

.flip-icon-tab-subheading.weight-400 {
    font-weight: 400;
}

.flip-icon-tab-subheading.weight-600 {
    font-weight: 600;
}

.flip-icon-tab-subheading.weight-700 {
    font-weight: 700;
}

.flip-icon-tab-subheading.font-serif {
    font-family: 'Fraunces', serif;
}

.flip-icon-tab-subheading.font-sans {
    font-family: 'Work Sans', sans-serif;
}

.flip-icon-tab-subheading.align-left {
    text-align: left;
}

.flip-icon-tab-subheading.align-center {
    text-align: center;
}

.flip-icon-tab-subheading.align-right {
    text-align: right;
}

.flip-icon-tab-body {
    margin: 0;
    line-height: 1.6;
}

.flip-icon-tab-body.size-small {
    font-size: 12px;
}

.flip-icon-tab-body.size-medium {
    font-size: 14px;
}

.flip-icon-tab-body.size-large {
    font-size: 16px;
}

.flip-icon-tab-body.weight-400 {
    font-weight: 400;
}

.flip-icon-tab-body.weight-600 {
    font-weight: 600;
}

.flip-icon-tab-body.weight-700 {
    font-weight: 700;
}

.flip-icon-tab-body.font-serif {
    font-family: 'Fraunces', serif;
}

.flip-icon-tab-body.font-sans {
    font-family: 'Work Sans', sans-serif;
}

.flip-icon-tab-body.align-left {
    text-align: left;
}

.flip-icon-tab-body.align-center {
    text-align: center;
}

.flip-icon-tab-body.align-right {
    text-align: right;
}

.flip-icon-tab-body + .flip-icon-tab-body {
    margin-top: 0.75rem;
}

/* ============================================================================
   MOBILE LAYOUT - Responsive improvements for frame-hero
   ============================================================================ */

@media (max-width: 1024px) {
    .framehero-wrapper {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    /* Stack layout vertically on mobile */
    .framehero-wrapper {
        display: flex;
        flex-direction: column;
    }

    /* FrameHero simple title mobile styling */
    .framehero-simple-title-wrapper .simple-title-box {
        min-height: 56px;
        aspect-ratio: auto;
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 16px;
    }

    .framehero-simple-title-wrapper .simple-title-text {
        font-size: clamp(27px, 3vw, 31px);
    }

    /* Hero map appears first and takes full width */
    .framehero-hero {
        order: -1;
        width: 100% !important;
        margin-bottom: 16px;
    }

    /* Map maintains proper aspect ratio */
    .framehero-map-wrapper {
        width: 100%;
        padding-bottom: 66.67%;
        position: relative;
        border-radius: 8px;
        overflow: hidden;
    }

    .framehero-map-wrapper .mapbox-map {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
    }

    /* Data cards grid on mobile */
    .framehero-cards-grid {
        width: 100%;
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }

    .data-card-flip-pair {
        width: 100%;
    }

    .data-card-grid-inner {
        aspect-ratio: 1 / 1;
        padding: 16px;
    }

    /* Full-width modal adjustments */
    .data-card-expanded.is-framehero-expanded {
        width: 95vw;
        max-width: 100vw;
        max-height: 90vh;
    }

    /* Stack modal content vertically on mobile */
    .data-card-expanded.is-framehero-expanded .data-card-back {
        flex-direction: column;
        height: auto;
        max-height: 90vh;
    }

    .data-card-expanded.is-framehero-expanded .data-card-back-image {
        flex: 0 0 auto;
        width: 100%;
        aspect-ratio: 1 / 1;
        min-height: 250px;
        max-height: 40vh;
        order: 0;
    }

    .data-card-expanded.is-framehero-expanded .data-card-back-content {
        flex: 1;
        width: 100%;
        padding: 20px;
        overflow-y: auto;
    }

    /* Modal content responsive */
    .data-card-back-image {
        max-height: 35vh;
    }

    .data-card-back-content {
        padding: 20px;
        overflow-y: auto;
    }

    /* Button styling on mobile */
    .data-card-back .close-btn {
        width: 36px;
        height: 36px;
        font-size: 24px;
        top: 12px;
        right: 12px;
    }
}

@media (max-width: 480px) {
    /* Extra small screens */
    /* FrameHero simple title mobile styling */
    .framehero-simple-title-wrapper .simple-title-box {
        min-height: 52px;
        aspect-ratio: auto;
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 12px;
    }

    .framehero-simple-title-wrapper .simple-title-text {
        font-size: clamp(24px, 2.5vw, 27px);
    }

    .framehero-cards-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    /* Frame Hero cards only. This used to target every .data-card-grid-inner,
       so on Data blocks (where the block's aspect-ratio rule overrides the
       'auto' here) the 220px minimum height was multiplied up by the aspect
       ratio - e.g. 220px x 21/9 = 513px minimum width - pushing every card
       off the right-hand side of the screen on phones. */
    .framehero-wrapper .data-card-grid-inner {
        aspect-ratio: auto;
        padding: 12px;
        min-height: 220px;
    }

    .framehero-map-wrapper {
        padding-bottom: 75%;
    }

    .route-calculator {
        padding: 10px 12px;
        gap: 6px;
        bottom: 8px;
        left: 8px;
        right: 8px;
    }

    .route-label {
        font-size: 12px;
    }

    .route-from,
    .route-to {
        padding: 4px 8px;
        font-size: 12px;
    }

    .route-go-btn {
        padding: 4px 12px;
        font-size: 12px;
    }

    .map-controls-top-left {
        top: 8px;
        left: 8px;
        gap: 6px;
    }

    .map-reset-btn,
    .map-search-toggle-btn {
        width: 36px;
        height: 36px;
    }

    .map-reset-btn svg,
    .map-search-toggle-btn svg {
        width: 20px;
        height: 20px;
    }
}

/* Links in Data card tab text (e.g. source links) sit on dark card backs,
   where the standard link blue is hard to read: use the text colour,
   underlined, with a subtle hover. */
.data-card-expanded .flip-icon-tab-body a.soec-inline-link,
.data-card-expanded .flip-icon-tab-body2 a.soec-inline-link {
    color: inherit !important;
    text-decoration: underline;
    text-underline-offset: 2px;
}
.data-card-expanded .flip-icon-tab-body a.soec-inline-link:hover,
.data-card-expanded .flip-icon-tab-body2 a.soec-inline-link:hover {
    opacity: 0.8;
}

/* Links inside text boxes with white text (i.e. coloured backgrounds): the
   standard link colour can match the box itself (e.g. a tab-blue link on a
   tab-blue box, which made the link invisible), so use the text colour,
   underlined. */
.text-content-box.text-white a.soec-inline-link {
    color: inherit !important;
    text-decoration: underline;
    text-underline-offset: 2px;
}
.text-content-box.text-white a.soec-inline-link:hover {
    opacity: 0.8;
}

/* In-page anchors on block titles (see render_animated_title): leave room
   for the fixed site header when jumping to a section. */
[class$="-simple-title-wrapper"][id],
[class$="-animated-title-wrapper"][id],
[class*="-simple-title-wrapper "][id],
[class*="-animated-title-wrapper "][id] {
    scroll-margin-top: 120px;
}

/* Split block: two buttons side by side (button 2 is optional per card).
   Follows the card's button alignment and wraps onto a second line if the
   card is too narrow for both. */
.split-card-button-wrapper.has-two-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: flex-start;
}
.split-card-button-wrapper.has-two-buttons.align-center { justify-content: center; }
.split-card-button-wrapper.has-two-buttons.align-right  { justify-content: flex-end; }
.split-card-button-wrapper.has-two-buttons .split-card-button { align-self: auto; }

/* Block titles are now real headings (h1 for the first on a page, h2 after).
   Keep them looking exactly as they did when they were spans. */
.title-content > .title-text {
  margin: 0;
  font-family: inherit;
  font-size: inherit;
  font-weight: inherit;
  line-height: inherit;
  color: inherit;
  height: auto;
  visibility: visible;
}
.simple-title-box > .simple-title-text {
  height: auto;
  visibility: visible;
}

/* Visually hidden, still read by screen readers and search engines */
.screen-reader-text {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}


/* ===== HOMEPAGE HERO LINE AS <h1> (30 Oct) ===== */
/* Keeps the video subtitle looking the same now it can be the page's <h1> */
.video-subtitle h1 {
  margin: 0;
  font-family: inherit;
  font-size: inherit;
  font-weight: inherit;
  line-height: 1.3;
  color: inherit;
}
@media (min-width: 901px) {
  .video-subtitle h1 { line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
}
@media (max-width: 900px) {
  .video-subtitle h1 { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
}

/* ===== FLIP CARDS WITH NOTHING ON THE BACK (30 Oct) ===== */
/* e.g. a staff profile with no bio yet. flip-block.php leaves out the flip icon
   and back panel; these rules remove the pointer cursor and hover lift. */
.flip-card-pair.no-back .flip-card-grid { cursor: default; }
.flip-card-pair.no-back .flip-icon { display: none; }
.flip-card-pair.no-back:not(.flipping):not(.flipped) .flip-card-grid:hover .flip-card-grid-inner {
    transform: none;
    box-shadow: 0 8px 24px rgba(6, 39, 53, 0.25);
}

/* ===== LITE MODE: SLOW CONNECTION OR DEVICE (30 Oct) ===== */
/* .soec-lite is added to <html> by soec_lite_mode_script() in utilities.php.
   The motion scripts keep running but these !important rules override the
   inline styles they set, so nothing visibly moves. */
/* Parallax background: shapes stay, but don't move on scroll */
.soec-lite .parallax-layer {
    transform: none !important;
}
/* Homepage section scale/brightness on scroll (scroll-effects.js) */
.soec-lite .scroll-physics-element {
    transform: none !important;
    filter: none !important;
}
/* "Midway zoom" on titles while scrolling (blocks.js) */
.soec-lite .midway-zoomable {
    transform: none !important;
}
/* Ken Burns slow-zoom off (also beats the inline animation some blocks set) */
.soec-lite .ken-burns img,
.soec-lite .ken-burns .slideshow-image {
    animation: none !important;
}
/* Background blur is costly on weak devices; drop it everywhere */
.soec-lite * {
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
}
.soec-lite .cards-background-banner,
.soec-lite .inspiring-background-banner,
.soec-lite .background-banner {
    background: rgba(255, 255, 255, 0.88);
}

/* ==========================================================================
   HAZELNUT (#371c00) - added Nov 2026
   A deep warm brown, first used for the News & Articles tab. These rules
   mirror every Rust Red colour rule above, so Hazelnut works in the same
   places (backgrounds, text, buttons, icons, title boxes, cards).
   Seasonal palettes recolour it like the other slot colours.
   ========================================================================== */
.bg-hazelnut { background: var(--hazelnut); }
.text-hazelnut { color: var(--hazelnut); }
.bg-color-hazelnut { background: var(--hazelnut) !important; }
.text-color-hazelnut { color: var(--hazelnut) !important; }
.accordion-icon.icon-color-hazelnut { color: #371c00; }
.download-item.icon-color-hazelnut .download-icon { background: rgba(55, 28, 0, 0.1); color: #371c00; }
.flip-card-button.btn-hazelnut { color: var(--hazelnut); border-color: var(--hazelnut); }
.color-hazelnut { color: #371c00 !important; }
.bg-hazelnut { background-color: #371c00; }
.flip-icon.color-hazelnut svg { color: #371c00; }
.overlay-text.text-hazelnut { color: #371c00; }
.text-hazelnut .overlay-text { color: #371c00; }
.section-header .title-box.burgundy-hazelnut { --title-bg-color: #8b2635; --accent-color: #371c00; }
.section-header .title-box.forest-green-hazelnut { --title-bg-color: #1b5137; --accent-color: #371c00; }
.section-header .title-box.emerald-green-hazelnut { --title-bg-color: #059669; --accent-color: #371c00; }
.section-header .title-box.sage-green-hazelnut { --title-bg-color: #8ca280; --accent-color: #371c00; }
.section-header .title-box.tab-blue-hazelnut { --title-bg-color: #4f9aa8; --accent-color: #371c00; }
.section-header .title-box.highlight-orange-hazelnut { --title-bg-color: #e1a038; --accent-color: #371c00; }
.section-header .title-box.hazelnut-ochre { --title-bg-color: #371c00; --accent-color: #d4a574; }
.section-header .title-box.hazelnut-hazelnut { --title-bg-color: #371c00; --accent-color: #8c1a22; }
.section-header .title-box.hazelnut-emerald-green { --title-bg-color: #371c00; --accent-color: #059669; }
.section-header .title-box.hazelnut-highlight-orange { --title-bg-color: #371c00; --accent-color: #e1a038; }
.section-header .title-box.hazelnut-sage-green { --title-bg-color: #371c00; --accent-color: #8ca280; }
.section-header .title-box.hazelnut-tab-blue { --title-bg-color: #371c00; --accent-color: #4f9aa8; }
.section-header .title-box.hazelnut-burgundy { --title-bg-color: #371c00; --accent-color: #8b2635; }
.section-header .title-box.hazelnut-brick-red { --title-bg-color: #371c00; --accent-color: #8c1a22; }
.section-header .title-box.hazelnut-white { --title-bg-color: #371c00; --accent-color: #ffffff; }
.section-header .title-box.brick-red-hazelnut { --title-bg-color: #8c1a22; --accent-color: #371c00; }
.section-header .title-box.charcoal-hazelnut { --title-bg-color: #333333; --accent-color: #371c00; }
.section-header .title-box.black-hazelnut { --title-bg-color: #000000; --accent-color: #371c00; }
.section-header .title-box.slate-hazelnut { --title-bg-color: #5c6e7a; --accent-color: #371c00; }
.split-card.bg-hazelnut { background-color: #371c00 !important; }
.split-card-text h3.text-hazelnut { color: #371c00 !important; }
.split-card-text p.text-hazelnut { color: #371c00 !important; }
.split-card-button.text-hazelnut { color: var(--hazelnut); border-color: var(--hazelnut); }
.split-card-button.bg-hazelnut { background: var(--hazelnut) !important; border-color: var(--hazelnut) !important; color: #fff !important; }
.split-card-button.hover-bg-hazelnut:hover { background: var(--hazelnut); border-color: var(--hazelnut); color: white; }
.text-content-box.bg-hazelnut .text-block-button { background: transparent; color: white; border-color: white; }
.text-content-box.bg-hazelnut .text-block-button:hover { background: #e1a038; color: white; border-color: #e1a038; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5); }
.data-card-grid-inner .flip-icon.color-hazelnut svg { stroke: #371c00; }
.data-card-back.bg-hazelnut { background-color: #371c00; }
.data-card-back-image.bg-hazelnut { background-color: #371c00; }
.data-card-icon.color-hazelnut svg { fill: #371c00; color: #371c00; }
.data-desc1.color-hazelnut,
.data-desc2.color-hazelnut,
.data-stat-number.color-hazelnut { color: #371c00; }
.data-back-heading.color-hazelnut,
.data-back-subheading.color-hazelnut,
.data-back-body.color-hazelnut { color: #371c00; }
.bg-hazelnut { background-color: #371c00; }
.data-card-button.bg-hazelnut { background-color: #371c00; }
.badge-color-hazelnut { color: #371c00; }
.split-card-badge.badge-color-hazelnut { color: #371c00; }
.overlay-bg-hazelnut { --overlay-base-rgb: 55, 28, 0; }
.framehero-icon.color-hazelnut svg { fill: #371c00; color: #371c00; }

