/* ==========================================================================
   CST Cannabis Portal — Layout, Components, GP Overrides, Responsive
   ========================================================================== */

/* ==========================================================================
   Animation Keyframes
   ========================================================================== */

@keyframes cst-fade-in-up {
    from {
        opacity: 0;
        transform: translateY(24px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes cst-scale-in {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes cst-gradient-shift {
    0%   { background-position: 0% 50%; }
    50%  { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes cst-slide-down {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Scroll-triggered animation base — JS adds this class */
.cst-animate {
    opacity: 0;
}

.cst-animate.is-visible {
    animation: cst-fade-in-up 0.6s var(--cst-transition-slow) forwards;
}

/* Staggered children */
.cst-animate-stagger.is-visible > * {
    animation: cst-fade-in-up 0.5s ease forwards;
    opacity: 0;
}

.cst-animate-stagger.is-visible > *:nth-child(1) { animation-delay: 0s; }
.cst-animate-stagger.is-visible > *:nth-child(2) { animation-delay: 0.1s; }
.cst-animate-stagger.is-visible > *:nth-child(3) { animation-delay: 0.2s; }
.cst-animate-stagger.is-visible > *:nth-child(4) { animation-delay: 0.3s; }
.cst-animate-stagger.is-visible > *:nth-child(5) { animation-delay: 0.4s; }
.cst-animate-stagger.is-visible > *:nth-child(6) { animation-delay: 0.5s; }

/* Reduced motion — show everything immediately */
@media (prefers-reduced-motion: reduce) {
    .cst-animate,
    .cst-animate-stagger > * {
        opacity: 1 !important;
        animation: none !important;
    }
}

/* --- Reset & Base --- */

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    overflow-x: hidden;
}

body {
    font-family: var(--cst-font-body);
    font-size: var(--cst-font-size-base);
    line-height: var(--cst-line-height);
    color: var(--cst-color-text);
    background-color: var(--cst-color-bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--cst-font-heading);
    line-height: var(--cst-line-height-tight);
    color: var(--cst-color-gray-900);
    letter-spacing: -0.01em;
    text-wrap: balance;
}

/* --- GP Container Override — let .cst-container control widths --- */

.site.grid-container#page {
    max-width: 100%;
    padding-left: 0;
    padding-right: 0;
    margin: 0;
}

.site-content {
    padding: 0;
    margin: 0;
}

/* Custom templates use <main class="cst-main"> instead of GP's
   .content-area wrapper. GP sets .site-content to display:flex,
   so the main element must explicitly fill the flex container. */
.cst-main {
    width: 100%;
    min-width: 0;
}

.separate-containers .site-main > *,
.separate-containers .inside-article {
    padding: 0;
    margin-bottom: 0;
    background: transparent;
}

.separate-containers .content-area {
    margin: 0;
    width: 100%;
}

.separate-containers .page-header {
    padding: 0;
    margin-bottom: 0;
    background: transparent;
}

/* --- Container --- */

.cst-container {
    max-width: var(--cst-container-max);
    margin-inline: auto;
    padding-inline: var(--cst-space-md);
}

/* --- Section --- */

.cst-section {
    padding-block: var(--cst-space-3xl);
}

.cst-section:nth-child(even) {
    background: var(--cst-gradient-section);
}

.cst-section__footer {
    margin-top: var(--cst-space-xl);
}

/* Section wave dividers */
.cst-section--objectives,
.cst-section--events,
.cst-section--stats {
    position: relative;
}

.cst-section--objectives::after,
.cst-section--events::after,
.cst-section--stats::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: var(--cst-divider-height);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 48' preserveAspectRatio='none'%3E%3Cpath d='M0 24C200 44 400 4 600 24C800 44 1000 4 1200 24V48H0Z' fill='%23ffffff'/%3E%3C/svg%3E");
    background-size: 100% 100%;
    background-repeat: no-repeat;
    pointer-events: none;
    z-index: 1;
}

.cst-section--objectives:nth-child(even)::after,
.cst-section--events:nth-child(even)::after,
.cst-section--stats:nth-child(even)::after {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 48' preserveAspectRatio='none'%3E%3Cpath d='M0 24C200 44 400 4 600 24C800 44 1000 4 1200 24V48H0Z' fill='%23F8F9FA'/%3E%3C/svg%3E");
}

/* --- Section Heading --- */

.cst-section-heading {
    text-align: center;
    margin-bottom: var(--cst-space-2xl);
}

.cst-section-heading__title {
    font-size: var(--cst-font-size-3xl);
    font-weight: 700;
    color: var(--cst-color-primary);
    margin-bottom: var(--cst-space-sm);
    position: relative;
    padding-bottom: var(--cst-space-md);
    background: var(--cst-gradient-text);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.cst-section-heading__title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 3px;
    background: var(--cst-gradient-accent);
    border-radius: 2px;
    transition: width 0.6s var(--cst-transition-slow);
}

.cst-section-heading.is-visible .cst-section-heading__title::after,
.cst-section-heading__title:only-child::after {
    width: 60px;
}

.cst-section-heading__subtitle {
    font-size: var(--cst-font-size-lg);
    color: var(--cst-color-text-muted);
    max-width: 600px;
    margin-inline: auto;
}

/* ==========================================================================
   Government Banner
   ========================================================================== */

.cst-gov-banner {
    background-color: var(--cst-banner-bg);
    color: var(--cst-banner-text);
    font-size: var(--cst-font-size-sm);
    padding-block: var(--cst-space-sm);
}

.cst-gov-banner__inner {
    display: flex;
    flex-direction: column;
}

.cst-gov-banner__text {
    display: flex;
    align-items: center;
    gap: var(--cst-space-sm);
    margin: 0;
    flex-wrap: wrap;
}

.cst-gov-banner__flag {
    flex-shrink: 0;
}

.cst-gov-banner__toggle {
    background: none;
    border: none;
    color: var(--cst-color-accent);
    cursor: pointer;
    font-size: inherit;
    display: inline-flex;
    align-items: center;
    gap: 0.25em;
    text-decoration: underline;
    padding: 0;
}

.cst-gov-banner__toggle:hover {
    color: var(--cst-color-white);
}

.cst-gov-banner__toggle svg {
    transition: transform var(--cst-transition);
}

.cst-gov-banner__toggle[aria-expanded="true"] svg {
    transform: rotate(180deg);
}

.cst-gov-banner__details {
    margin-top: var(--cst-space-md);
}

.cst-gov-banner__columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--cst-space-xl);
}

.cst-gov-banner__col p {
    margin-top: var(--cst-space-xs);
    opacity: 0.8;
}

/* ==========================================================================
   Institutional Header
   ========================================================================== */

.cst-institutional-header {
    background-color: var(--cst-color-secondary);
    border-bottom: 3px solid var(--cst-color-primary);
    padding-block: var(--cst-space-md);
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: box-shadow var(--cst-transition-slow);
}

.cst-institutional-header.is-scrolled {
    box-shadow: var(--cst-shadow-md);
}

.cst-institutional-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--cst-space-md);
}

.cst-institutional-header__branding {
    display: flex;
    align-items: center;
    gap: var(--cst-space-md);
}

.cst-institutional-header__logo-link {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.cst-institutional-header__seal {
    height: 60px;
    width: auto;
}

.cst-institutional-header__seal-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    background: var(--cst-color-primary);
    color: var(--cst-color-white);
    font-weight: 700;
    border-radius: 50%;
    font-size: var(--cst-font-size-lg);
}

.cst-institutional-header__titles {
    display: flex;
    flex-direction: column;
    text-align: center;
    flex: 1;
}

@media (min-width: 992px) {
    /* On desktop, push the portal title further right of the seal so it
       sits closer to the language switcher rather than crowding the logo. */
    .cst-institutional-header__titles {
        text-align: left;
        margin-left: var(--cst-space-2xl, 3rem);
    }
}

.cst-institutional-header__agency {
    font-size: var(--cst-font-size-sm);
    color: var(--cst-alpha-white-80);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.cst-institutional-header__portal-name {
    font-family: var(--cst-font-heading);
    font-size: var(--cst-font-size-xl);
    font-weight: 700;
    color: var(--cst-color-white, #ffffff);
    letter-spacing: 0.01em;
}

.cst-institutional-header__actions {
    display: flex;
    align-items: center;
    gap: var(--cst-space-md);
}

/* Search — Toggle + Live Results */

.cst-search {
    position: relative;
    display: flex;
    align-items: center;
}

/* Toggle button (magnifying glass) */
.cst-search__toggle {
    background: none;
    border: 1px solid var(--cst-alpha-white-20);
    border-radius: var(--cst-border-radius);
    color: var(--cst-alpha-white-75);
    cursor: pointer;
    padding: var(--cst-space-xs);
    min-height: 44px;
    min-width: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color var(--cst-transition), border-color var(--cst-transition), background var(--cst-transition);
}

.cst-search__toggle:hover {
    color: var(--cst-color-white);
    border-color: var(--cst-alpha-white-50);
    background: var(--cst-alpha-white-8);
}

.cst-search__toggle:focus-visible {
    outline: 3px solid var(--cst-color-focus);
    outline-offset: 2px;
}

/* Form — hidden by default, slides open */
.cst-search__form {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    opacity: 0;
    overflow: visible;
    pointer-events: none;
    transition: width 0.25s ease, opacity 0.2s ease;
}

.cst-search.is-open .cst-search__toggle {
    opacity: 0;
    pointer-events: none;
    position: absolute;
}

.cst-search.is-open .cst-search__form {
    position: relative;
    width: 280px;
    opacity: 1;
    pointer-events: auto;
    top: auto;
    transform: none;
}

/* Input wrapper */
.cst-search__input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.cst-search__input {
    width: 100%;
    padding: var(--cst-space-xs) var(--cst-space-sm);
    padding-right: 40px;
    border: 1px solid var(--cst-alpha-white-30);
    border-radius: var(--cst-border-radius);
    background: var(--cst-alpha-white-10);
    color: var(--cst-color-white);
    font-size: var(--cst-font-size-sm);
    font-family: var(--cst-font-body);
    min-height: 44px;
    transition: border-color var(--cst-transition), background var(--cst-transition);
}

.cst-search__input::placeholder {
    color: var(--cst-alpha-white-60);
}

.cst-search__input:focus {
    outline: 3px solid var(--cst-color-focus);
    outline-offset: 2px;
    border-color: var(--cst-color-focus);
    background: var(--cst-alpha-white-15);
}

/* Submit button inside input */
.cst-search__submit {
    position: absolute;
    right: 2px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--cst-alpha-white-75);
    cursor: pointer;
    padding: var(--cst-space-xs);
    min-height: 44px;
    min-width: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cst-search__submit:hover {
    color: var(--cst-color-white);
}

.cst-search__submit:focus-visible {
    outline: 3px solid var(--cst-color-focus);
    outline-offset: 2px;
}

/* Results dropdown */
.cst-search__results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin-top: var(--cst-space-xs);
    background: var(--cst-color-white);
    border: 1px solid var(--cst-color-gray-300);
    border-radius: var(--cst-border-radius);
    box-shadow: var(--cst-shadow-lg);
    list-style: none;
    padding: var(--cst-space-xs) 0;
    z-index: 1000;
    max-height: 320px;
    overflow-y: auto;
}

.cst-search__result-item,
.cst-search__view-all,
.cst-search__no-results,
.cst-search__loading {
    padding: var(--cst-space-sm) var(--cst-space-md);
    font-size: var(--cst-font-size-sm);
}

.cst-search__result-item a,
.cst-search__view-all a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--cst-space-sm);
    text-decoration: none;
    color: var(--cst-color-gray-900);
}

.cst-search__result-item.is-active,
.cst-search__view-all.is-active {
    background: var(--cst-alpha-green-8);
}

.cst-search__result-item a:hover,
.cst-search__view-all a:hover {
    color: var(--cst-color-green-dark);
}

.cst-search__result-title {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cst-search__result-type {
    font-size: var(--cst-font-size-xs);
    color: var(--cst-color-gray-500);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    flex-shrink: 0;
}

.cst-search__no-results,
.cst-search__loading {
    color: var(--cst-color-gray-500);
    font-style: italic;
}

.cst-search__view-all {
    border-top: 1px solid var(--cst-color-gray-200);
    margin-top: var(--cst-space-xs);
    padding-top: var(--cst-space-sm);
}

.cst-search__view-all a {
    color: var(--cst-color-green-dark);
    font-weight: 600;
    justify-content: center;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .cst-search__form {
        transition: none;
    }
}

/* Language Switcher */

.cst-lang-switcher__list {
    list-style: none;
    display: inline-flex;
    align-items: center;
    gap: 2px;
    margin: 0;
    padding: 2px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.25);
}

.cst-lang-switcher__list li a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 4px 12px;
    /* Override the global 44px touch-target rule from accessibility.css.
       The pills sit in a tight header; 30px height with 12px horizontal
       padding still meets WCAG 2.5.8 (the entire pill IS the target). */
    min-height: 30px !important;
    height: 30px;
    line-height: 1;
    border-radius: 999px;
    text-decoration: none;
    text-transform: uppercase;
    font-size: 0.75rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.7);
    letter-spacing: 0.05em;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.cst-lang-switcher__list li a:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
}

.cst-lang-switcher__list li.current-lang a {
    background-color: #fff;
    color: var(--cst-color-navy);
}

/* ==========================================================================
   Breadcrumbs
   ========================================================================== */

.cst-breadcrumbs {
    background: var(--cst-color-gray-100);
    padding-block: var(--cst-space-sm);
    font-size: var(--cst-font-size-sm);
}

.cst-breadcrumbs p {
    margin: 0;
}

.cst-breadcrumbs a {
    color: var(--cst-color-green-dark);
    text-decoration: none;
}

.cst-breadcrumbs a:hover {
    text-decoration: underline;
}

/* ==========================================================================
   Hero Section
   ========================================================================== */

.cst-hero {
    position: relative;
    background-color: var(--cst-color-primary);
    background-size: cover;
    background-position: center;
    padding-block: var(--cst-space-4xl);
    color: var(--cst-color-white);
    overflow: hidden;
}

.cst-hero--home {
    min-height: 85vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.cst-hero--home .cst-hero__title {
    font-family: var(--cst-font-heading, 'Montserrat', system-ui, sans-serif);
    font-size: clamp(1.75rem, 4vw, 2.75rem);
    font-weight: 700;
    line-height: 1.15;
    /* Small-caps treatment — uppercase + tracked-out spacing in Montserrat
       reads as "small caps" across the broadest browser/font support. */
    text-transform: uppercase;
    letter-spacing: 0.08em;
    word-spacing: 0.06em;
    max-width: 22ch;
    margin-inline: auto;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.45);
}

/* Small-caps fallback removed 2026-05-14 — was rendering the conjunction "y"
   visibly shorter than its neighbors. Stick to plain text-transform: uppercase. */

.cst-hero--page {
    padding-block: var(--cst-space-3xl);
}

.cst-hero--slim {
    padding-block: var(--cst-space-2xl);
}

.cst-hero--slim .cst-hero__title {
    font-size: var(--cst-font-size-3xl);
    margin-bottom: var(--cst-space-sm);
}

.cst-hero--slim .cst-hero__subtitle {
    font-size: var(--cst-font-size-lg);
    margin-bottom: 0;
}

.cst-hero__overlay {
    position: absolute;
    inset: 0;
    background: var(--cst-gradient-hero);
}

/* Home hero shows a photographic night-driving background, so swap the heavy
   green tint for a darker navy scrim that keeps the title legible while
   letting the image read through. */
.cst-hero--home .cst-hero__overlay {
    background:
        /* subtle brand-green accent washing in from the lower-left */
        linear-gradient(
            120deg,
            rgba(127, 163, 91, 0.32) 0%,
            rgba(127, 163, 91, 0.08) 36%,
            rgba(127, 163, 91, 0) 58%
        ),
        linear-gradient(
            180deg,
            rgba(15, 23, 42, 0.52) 0%,
            rgba(15, 23, 42, 0.33) 42%,
            rgba(28, 40, 84, 0.70) 100%
        );
}

/* Decorative dot-grid pattern */
.cst-hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(var(--cst-alpha-white-8) 1px, transparent 1px);
    background-size: 24px 24px;
    pointer-events: none;
    z-index: 0;
}

.cst-hero__content {
    position: relative;
    z-index: 1;
    max-width: var(--cst-container-narrow);
    margin-inline: auto;
    text-align: center;
}

.cst-hero__title {
    font-size: var(--cst-font-size-4xl);
    font-weight: 700;
    margin-bottom: var(--cst-space-md);
    color: var(--cst-color-white);
    text-shadow: 0 2px 4px var(--cst-alpha-black-20);
    letter-spacing: -0.02em;
}

.cst-hero__subtitle {
    font-size: var(--cst-font-size-xl);
    margin-bottom: var(--cst-space-xl);
    /* Warm cream — distinct from the white H1 and pops against the green video. */
    color: #FFE9A8;
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.45);
    opacity: 1;
}

/* --- Floating decorative shapes --- */

@keyframes cst-float-1 {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    33%      { transform: translate(15px, -20px) rotate(5deg); }
    66%      { transform: translate(-10px, 10px) rotate(-3deg); }
}

@keyframes cst-float-2 {
    0%, 100% { transform: translate(0, 0); }
    50%      { transform: translate(-20px, -15px); }
}

@keyframes cst-float-3 {
    0%, 100% { transform: translate(0, 0); }
    50%      { transform: translate(10px, 20px); }
}

.cst-hero__float {
    position: absolute;
    z-index: 0;
    pointer-events: none;
}

.cst-hero__float--1 {
    top: 10%;
    right: 8%;
    animation: cst-float-1 10s ease-in-out infinite;
}

.cst-hero__float--2 {
    bottom: 20%;
    left: 5%;
    animation: cst-float-2 8s ease-in-out infinite;
}

.cst-hero__float--3 {
    top: 50%;
    right: 30%;
    animation: cst-float-3 12s ease-in-out infinite;
}

/* --- Hero illustration --- */

.cst-hero__illustration {
    position: absolute;
    right: 0;
    bottom: 0;
    width: 45%;
    max-width: 600px;
    height: auto;
    opacity: 0.35;
    z-index: 0;
    pointer-events: none;
}

/* --- Hero wave divider --- */

.cst-hero__wave {
    display: none;
}

/* --- Hero trust badges --- */

.cst-hero__badges {
    display: flex;
    flex-wrap: wrap;
    gap: var(--cst-space-md);
    justify-content: center;
    margin-top: var(--cst-space-xl);
}

.cst-hero__badge {
    display: inline-flex;
    align-items: center;
    gap: var(--cst-space-xs);
    padding: var(--cst-space-xs) var(--cst-space-md);
    background: var(--cst-alpha-white-15);
    border-radius: 999px;
    font-size: var(--cst-font-size-sm);
    font-weight: 600;
    color: var(--cst-color-white);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.cst-hero__badge-icon {
    font-size: 1.125rem;
    line-height: 1;
}

/* --- Hero scroll indicator --- */

.cst-hero__scroll-indicator {
    position: absolute;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 3;
    color: var(--cst-color-white);
    opacity: 0.7;
    animation: cst-scroll-bounce 2s ease-in-out infinite;
}

@keyframes cst-scroll-bounce {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50%      { transform: translateX(-50%) translateY(8px); }
}

/* ==========================================================================
   Trust Strip
   ========================================================================== */

.cst-trust-strip {
    background-color: var(--cst-color-secondary);
    color: var(--cst-color-white);
    padding-block: var(--cst-space-lg);
}

.cst-trust-strip__list {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: var(--cst-space-2xl);
    list-style: none;
    margin: 0;
    padding: 0;
    flex-wrap: wrap;
}

.cst-trust-strip__item {
    display: flex;
    align-items: center;
    gap: var(--cst-space-sm);
    font-weight: 600;
    font-size: var(--cst-font-size-sm);
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.cst-trust-strip__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.85;
}

@media (max-width: 768px) {
    .cst-trust-strip__list {
        gap: var(--cst-space-lg) var(--cst-space-xl);
    }
}

@media (max-width: 480px) {
    .cst-trust-strip__list {
        flex-direction: column;
        gap: var(--cst-space-md);
    }
}

/* ==========================================================================
   Buttons
   ========================================================================== */

.cst-btn {
    display: inline-flex;
    align-items: center;
    gap: var(--cst-space-sm);
    padding: var(--cst-space-md) var(--cst-space-xl);
    font-family: var(--cst-font-body);
    font-size: var(--cst-font-size-base);
    font-weight: 600;
    text-decoration: none;
    border-radius: var(--cst-border-radius);
    border: 2px solid transparent;
    cursor: pointer;
    transition: all var(--cst-transition), transform var(--cst-transition), box-shadow var(--cst-transition);
    line-height: 1;
}

.cst-btn--primary {
    background: var(--cst-gradient-primary);
    color: var(--cst-color-white);
    border-color: var(--cst-color-primary);
    position: relative;
    overflow: hidden;
}

/* Sheen animation on primary buttons */
.cst-btn--primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, var(--cst-alpha-white-20), transparent);
    transition: left 0.5s ease;
}

.cst-btn--primary:hover::before {
    left: 100%;
}

.cst-btn--primary:hover {
    background: var(--cst-gradient-primary);
    border-color: var(--cst-color-green-dark);
    color: var(--cst-color-white);
    box-shadow: var(--cst-shadow-glow-primary);
    transform: translateY(-1px);
}

.cst-btn--secondary {
    background-color: var(--cst-color-secondary);
    color: var(--cst-color-white);
    border-color: var(--cst-color-secondary);
}

.cst-btn--secondary:hover {
    background-color: var(--cst-color-navy-light);
    border-color: var(--cst-color-navy-light);
    color: var(--cst-color-white);
}

.cst-btn--outline {
    background-color: transparent;
    color: var(--cst-color-primary);
    border-color: var(--cst-color-primary);
}

.cst-btn--outline:hover {
    background: var(--cst-gradient-primary);
    color: var(--cst-color-white);
    border-color: var(--cst-color-primary);
    box-shadow: var(--cst-shadow-glow-primary);
    transform: translateY(-1px);
}

.cst-btn--hero {
    background-color: var(--cst-color-secondary);
    color: var(--cst-color-white);
    border-color: var(--cst-color-secondary);
    font-size: var(--cst-font-size-lg);
    padding: var(--cst-space-md) var(--cst-space-2xl);
    box-shadow: var(--cst-shadow-glow-navy);
    position: relative;
    overflow: hidden;
}

/* Inner gradient sheen */
.cst-btn--hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, var(--cst-alpha-white-20), transparent);
    transition: left 0.5s ease;
}

.cst-btn--hero:hover::before {
    left: 100%;
}

.cst-btn--hero:hover {
    background-color: var(--cst-color-navy-light);
    color: var(--cst-color-white);
    border-color: var(--cst-color-navy-light);
    box-shadow: 0 6px 28px var(--cst-alpha-navy-45);
    transform: translateY(-2px);
}

.cst-btn--sm {
    padding: var(--cst-space-sm) var(--cst-space-md);
    font-size: var(--cst-font-size-sm);
}

/* --- Hero Dual-Button Layout --- */

.cst-hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--cst-space-md);
    align-items: center;
    justify-content: center;
}

.cst-btn--outline-hero {
    background: transparent;
    color: var(--cst-color-white);
    border: 2px solid var(--cst-alpha-white-50);
    font-size: var(--cst-font-size-lg);
    padding: var(--cst-space-md) var(--cst-space-2xl);
}

.cst-btn--outline-hero:hover {
    background: var(--cst-alpha-white-15);
    border-color: var(--cst-color-white);
    color: var(--cst-color-white);
    transform: translateY(-1px);
}

/* ==========================================================================
   Card Grid
   ========================================================================== */

.cst-card-grid {
    display: grid;
    gap: var(--cst-space-xl);
}

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

.cst-card-grid--resources {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}

/* --- Card Base --- */

.cst-card {
    background: var(--cst-color-white);
    border-radius: var(--cst-border-radius-lg);
    border: 1px solid var(--cst-alpha-black-6);
    box-shadow: 0 1px 2px var(--cst-alpha-black-4);
    overflow: hidden;
    transition: box-shadow 0.3s ease, transform 0.25s ease;
    display: flex;
    flex-direction: column;
}

.cst-card:hover {
    box-shadow: var(--cst-shadow-lg);
    transform: translateY(-3px);
}

.cst-card__image {
    overflow: hidden;
}

.cst-card__image img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

.cst-card:hover .cst-card__image img {
    transform: scale(1.03);
}

.cst-card__body {
    padding: var(--cst-space-lg);
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: var(--cst-space-xs);
}

.cst-card__meta {
    display: flex;
    align-items: center;
    gap: var(--cst-space-sm);
    font-size: var(--cst-font-size-xs);
    color: var(--cst-color-text-muted);
}

.cst-card__category {
    background: var(--cst-alpha-green-10);
    color: var(--cst-color-green-dark);
    padding: 2px 10px;
    border-radius: 999px;
    font-size: 0.6875rem;
    font-weight: 600;
}

.cst-card__title {
    font-size: var(--cst-font-size-lg);
    line-height: var(--cst-line-height-tight);
}

.cst-card__title a {
    color: var(--cst-color-gray-900);
    text-decoration: none;
    transition: color 0.15s ease;
}

.cst-card__title a:hover {
    color: var(--cst-color-green-dark);
}

.cst-card__excerpt {
    color: var(--cst-color-text-muted);
    font-size: var(--cst-font-size-sm);
    line-height: 1.6;
    flex: 1;
}

.cst-card__link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--cst-color-green-dark);
    font-size: var(--cst-font-size-sm);
    font-weight: 600;
    text-decoration: none;
    margin-top: auto;
    padding-top: var(--cst-space-sm);
    transition: color 0.15s ease;
}

.cst-card__link svg {
    transition: transform 0.2s ease;
}

.cst-card:hover .cst-card__link svg {
    transform: translateX(3px);
}

.cst-card__link:hover {
    color: var(--cst-color-green-dark);
}

.cst-card__actions {
    margin-top: auto;
    padding-top: var(--cst-space-md);
}

/* --- Tags --- */

.cst-card__tags {
    display: flex;
    flex-wrap: wrap;
    gap: var(--cst-space-xs);
    margin-bottom: var(--cst-space-sm);
}

.cst-tag {
    background: var(--cst-color-gray-100);
    color: var(--cst-color-green-dark);
    padding: 2px 10px;
    border-radius: 999px;
    font-size: var(--cst-font-size-xs);
    font-weight: 600;
}

/* --- Event Card --- */

.cst-card--event {
    flex-direction: row;
}

.cst-card__date-badge {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 80px;
    background: var(--cst-gradient-primary);
    color: var(--cst-color-white);
    padding: var(--cst-space-md);
    position: relative;
    transition: background var(--cst-transition-slow);
}

.cst-card__date-badge::after {
    content: '';
    position: absolute;
    right: 0;
    top: 20%;
    height: 60%;
    width: 2px;
    background: var(--cst-alpha-white-30);
    border-radius: 1px;
}

.cst-card--event:hover .cst-card__date-badge {
    background: var(--cst-gradient-accent);
}

.cst-card__date-day {
    font-size: var(--cst-font-size-2xl);
    font-weight: 700;
    line-height: 1;
    font-variant-numeric: tabular-nums;
}

.cst-card__date-month {
    font-size: var(--cst-font-size-sm);
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.08em;
}

.cst-card__event-venue {
    display: flex;
    align-items: center;
    gap: var(--cst-space-xs);
}

/* ==========================================================================
   Objectives Grid
   ========================================================================== */

.cst-objectives-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--cst-space-xl);
}

.cst-objective-card {
    text-align: center;
    padding: var(--cst-space-2xl) var(--cst-space-xl);
    background: var(--cst-color-white);
    border-radius: var(--cst-border-radius-lg);
    box-shadow: var(--cst-shadow-sm);
    transition: box-shadow var(--cst-transition-slow), transform var(--cst-transition-spring);
    position: relative;
    overflow: hidden;
    border: 1px solid var(--cst-color-gray-200);
}

/* Large faded step number */
.cst-objective-card[data-step]::before {
    content: "0" attr(data-step);
    position: absolute;
    top: -10px;
    right: 10px;
    font-family: var(--cst-font-heading);
    font-size: 7.5rem;
    font-weight: 800;
    line-height: 1;
    color: var(--cst-color-navy);
    opacity: 0.1;
    pointer-events: none;
    z-index: 0;
}

.cst-objective-card:hover {
    box-shadow: var(--cst-shadow-lg);
    transform: translateY(-6px);
}

.cst-objective-card__icon {
    color: var(--cst-color-primary);
    margin-bottom: var(--cst-space-md);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 72px;
    height: 72px;
    margin-inline: auto;
    background: var(--cst-alpha-green-8);
    border-radius: 50%;
    transition: background var(--cst-transition), transform var(--cst-transition-spring), box-shadow var(--cst-transition), color var(--cst-transition);
}

.cst-objective-card:hover .cst-objective-card__icon {
    background: var(--cst-gradient-primary);
    color: var(--cst-color-white);
    transform: translateY(-4px) scale(1.1);
    box-shadow: var(--cst-shadow-glow-primary);
}

.cst-objective-card__title {
    font-size: var(--cst-font-size-xl);
    color: var(--cst-color-primary);
    margin-bottom: var(--cst-space-sm);
}

.cst-objective-card__desc {
    color: var(--cst-color-text-muted);
}

/* ==========================================================================
   Course Features
   ========================================================================== */

.cst-course-features__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--cst-space-lg);
    margin-top: var(--cst-space-2xl);
}

.cst-section--course-features .cst-course-feature {
    text-align: center;
    padding: var(--cst-space-xl) var(--cst-space-lg);
    background: var(--cst-color-white);
    border: 1px solid var(--cst-color-gray-200);
    border-radius: var(--cst-border-radius-lg);
    box-shadow: var(--cst-shadow-sm);
    transition: box-shadow var(--cst-transition), transform var(--cst-transition);
    display: block;
}

.cst-section--course-features .cst-course-feature:hover {
    box-shadow: var(--cst-shadow-md);
    transform: translateY(-2px);
}

.cst-section--course-features .cst-course-feature__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    margin-bottom: var(--cst-space-md);
    border-radius: 50%;
    background: var(--cst-alpha-green-10);
    color: var(--cst-color-green-dark);
}

.cst-course-feature__label {
    font-family: var(--cst-font-heading);
    font-size: var(--cst-font-size-base);
    font-weight: 700;
    color: var(--cst-color-navy);
    margin: 0 0 var(--cst-space-xs) 0;
}

.cst-course-feature__value {
    font-size: var(--cst-font-size-sm);
    color: var(--cst-color-gray-600);
    line-height: 1.5;
    margin: 0;
}

@media (max-width: 768px) {
    .cst-course-features__grid {
        grid-template-columns: 1fr;
    }

    .cst-section--course-features .cst-course-feature:hover {
        transform: none;
    }
}

/* ==========================================================================
   Statistics Grid
   ========================================================================== */

.cst-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--cst-space-lg);
}

.cst-stat-card {
    display: flex;
    flex-direction: column;
    gap: var(--cst-space-sm);
    padding: var(--cst-space-xl);
    background: var(--cst-color-white);
    border-radius: var(--cst-border-radius-lg);
    border: 1px solid var(--cst-alpha-black-6);
    box-shadow: 0 1px 2px var(--cst-alpha-black-4);
    position: relative;
    overflow: hidden;
    transition: box-shadow 0.3s ease, transform 0.25s ease;
}

/* Gradient top accent bar */
.cst-stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
}

.cst-stat-card:nth-child(1)::before { background: var(--cst-gradient-primary); }
.cst-stat-card:nth-child(2)::before { background: linear-gradient(135deg, var(--cst-color-navy), var(--cst-color-navy-light)); }
.cst-stat-card:nth-child(3)::before { background: linear-gradient(135deg, var(--cst-color-blue), var(--cst-color-blue-light)); }
.cst-stat-card:nth-child(4)::before { background: linear-gradient(135deg, var(--cst-color-green-light), #C5DEB0); }

.cst-stat-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--cst-shadow-lg);
}

/* Icon — gradient rounded square */
.cst-stat-card__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 10px;
    font-size: 22px;
    color: var(--cst-color-white);
    transition: transform 0.25s ease;
}

.cst-stat-card:nth-child(1) .cst-stat-card__icon { background: var(--cst-gradient-primary); }
.cst-stat-card:nth-child(2) .cst-stat-card__icon { background: linear-gradient(135deg, var(--cst-color-navy), var(--cst-color-navy-light)); }
.cst-stat-card:nth-child(3) .cst-stat-card__icon { background: linear-gradient(135deg, var(--cst-color-blue), var(--cst-color-blue-light)); }
.cst-stat-card:nth-child(4) .cst-stat-card__icon { background: linear-gradient(135deg, var(--cst-color-green-light), #C5DEB0); }

.cst-stat-card:hover .cst-stat-card__icon {
    transform: scale(1.06);
}

/* Value */
.cst-stat-card__value {
    display: flex;
    align-items: baseline;
    gap: 2px;
    font-family: var(--cst-font-heading);
    font-size: 2.75rem;
    font-weight: 700;
    color: var(--cst-color-gray-900);
    line-height: 1;
    font-variant-numeric: tabular-nums;
}

/* Unit — inline with value at smaller size */
.cst-stat-card__unit {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--cst-color-gray-500, #6C757D);
}

/* Label */
.cst-stat-card__label {
    display: block;
    font-size: var(--cst-font-size-sm);
    font-weight: 500;
    color: var(--cst-color-gray-500, #6C757D);
}

/* Source — bottom-aligned with separator */
.cst-stat-card__source {
    display: block;
    font-size: var(--cst-font-size-xs);
    color: var(--cst-color-gray-500, #6C757D);
    margin-top: auto;
    padding-top: var(--cst-space-sm);
    border-top: 1px solid var(--cst-color-gray-200);
    opacity: 0.8;
}

/* --- Stats dark background (home page) --- */

.cst-section.cst-section--stats-dark {
    background: var(--cst-color-secondary);
}

.cst-section--stats-dark .cst-section-heading__title {
    color: var(--cst-color-white);
    background: none;
    -webkit-background-clip: unset;
    background-clip: unset;
    -webkit-text-fill-color: var(--cst-color-white);
}

.cst-section--stats-dark .cst-section-heading__subtitle {
    color: var(--cst-alpha-white-80);
}

.cst-section--stats-dark .cst-section-heading__title::after {
    background: var(--cst-color-white);
    opacity: 0.4;
}

.cst-section--stats-dark .cst-stat-card {
    background: var(--cst-alpha-white-8);
    border-color: var(--cst-alpha-white-10);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.cst-section--stats-dark .cst-stat-card__value {
    color: var(--cst-color-white);
}

.cst-section--stats-dark .cst-stat-card__unit {
    color: var(--cst-alpha-white-80);
}

.cst-section--stats-dark .cst-stat-card__label {
    color: var(--cst-alpha-white-85);
}

.cst-section--stats-dark .cst-stat-card__source {
    color: var(--cst-alpha-white-60);
    border-top-color: var(--cst-alpha-white-15);
}

.cst-section--stats-dark .cst-stat-card:hover {
    background: var(--cst-alpha-white-14);
    box-shadow: 0 8px 32px var(--cst-alpha-black-30);
}

.cst-section--stats-dark .cst-btn--outline {
    color: var(--cst-color-white);
    border-color: var(--cst-alpha-white-50);
}

.cst-section--stats-dark .cst-btn--outline:hover {
    background: var(--cst-alpha-white-15);
    border-color: var(--cst-color-white);
    color: var(--cst-color-white);
    box-shadow: none;
}

/* --- Stat card responsive --- */

@media (max-width: 1024px) {
    .cst-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .cst-stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--cst-space-md);
    }

    .cst-stat-card {
        padding: var(--cst-space-lg);
    }

    .cst-stat-card__value {
        font-size: 2.25rem;
    }

    .cst-stat-card__icon {
        width: 40px;
        height: 40px;
        font-size: 20px;
    }
}

@media (max-width: 480px) {
    .cst-stats-grid {
        grid-template-columns: 1fr;
    }

    .cst-stat-card {
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
        gap: 0 var(--cst-space-md);
        padding: var(--cst-space-md) var(--cst-space-lg);
    }

    .cst-stat-card__icon {
        flex-shrink: 0;
    }

    .cst-stat-card__value {
        font-size: 2rem;
        flex: 1;
    }

    .cst-stat-card__unit {
        font-size: 1rem;
    }

    .cst-stat-card__label {
        width: 100%;
        padding-left: calc(44px + var(--cst-space-md));
    }

    .cst-stat-card__source {
        width: 100%;
        margin-top: var(--cst-space-xs);
    }
}

/* ==========================================================================
   Enrollment CTA
   ========================================================================== */

.cst-enrollment-cta {
    position: relative;
    background: linear-gradient(135deg, var(--cst-color-secondary) 0%, var(--cst-color-navy-light) 100%);
    color: var(--cst-color-white);
    padding-block: var(--cst-space-4xl);
    overflow: hidden;
}

.cst-enrollment-cta__pattern {
    position: absolute;
    inset: 0;
    background-image: radial-gradient(var(--cst-alpha-white-6) 1px, transparent 1px);
    background-size: 24px 24px;
    pointer-events: none;
}

.cst-enrollment-cta__content {
    position: relative;
    z-index: 1;
    text-align: center;
    max-width: var(--cst-container-narrow);
    margin-inline: auto;
}

.cst-enrollment-cta__title {
    font-size: var(--cst-font-size-3xl);
    font-weight: 700;
    margin-bottom: var(--cst-space-md);
    color: var(--cst-color-white);
}

.cst-enrollment-cta__subtitle {
    font-size: var(--cst-font-size-xl);
    opacity: 0.9;
    margin-bottom: var(--cst-space-xl);
}

.cst-enrollment-cta__actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--cst-space-md);
    justify-content: center;
    align-items: center;
}

.cst-btn--lg {
    font-size: var(--cst-font-size-lg);
    padding: var(--cst-space-md) var(--cst-space-2xl);
}

@media (max-width: 480px) {
    .cst-enrollment-cta__actions {
        flex-direction: column;
    }

    .cst-enrollment-cta__title {
        font-size: var(--cst-font-size-2xl);
    }
}

/* ==========================================================================
   Contact Page
   ========================================================================== */

.cst-contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--cst-space-2xl);
    align-items: start;
}

.cst-contact-info {
    display: flex;
    flex-direction: column;
    gap: var(--cst-space-md);
}

.cst-contact-card {
    display: flex;
    gap: var(--cst-space-md);
    padding: var(--cst-space-lg);
    background: var(--cst-color-white);
    border-radius: var(--cst-border-radius-lg);
    box-shadow: var(--cst-shadow-sm);
    transition: box-shadow var(--cst-transition-slow), transform var(--cst-transition);
}

.cst-contact-card:hover {
    box-shadow: var(--cst-shadow-lg);
    transform: translateY(-3px);
}

.cst-contact-card__icon {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--cst-alpha-green-8);
    border-radius: 50%;
    color: var(--cst-color-primary);
    transition: background var(--cst-transition);
}

.cst-contact-card:hover .cst-contact-card__icon {
    background: var(--cst-alpha-green-15);
}

.cst-contact-card__icon--whatsapp {
    background: linear-gradient(135deg, #25d366, #128c42);
    color: var(--cst-color-white);
}

.cst-contact-card:hover .cst-contact-card__icon--whatsapp {
    background: linear-gradient(135deg, #2ee873, #25d366);
}

.cst-contact-card__body h3 {
    font-size: var(--cst-font-size-base);
    font-weight: 600;
    margin-bottom: var(--cst-space-xs);
}

.cst-contact-card__body a {
    color: var(--cst-color-green-dark);
    text-decoration: none;
}

.cst-contact-card__body a:hover {
    text-decoration: underline;
}

.cst-contact-form h2 {
    margin-bottom: var(--cst-space-lg);
}

/* --- Contact Form 7 Integration --- */

.cst-contact-form .wpcf7 {
    max-width: 100%;
}

.cst-contact-form .wpcf7-form p {
    margin-bottom: var(--cst-space-md);
}

.cst-contact-form .wpcf7-form label {
    display: block;
    font-weight: 600;
    font-size: var(--cst-font-size-sm);
    color: var(--cst-color-gray-700);
    margin-bottom: var(--cst-space-xs);
}

.cst-contact-form .wpcf7-form-control:not([type="submit"]) {
    width: 100%;
    padding: var(--cst-space-sm) var(--cst-space-md);
    font-family: var(--cst-font-body);
    font-size: var(--cst-font-size-base);
    color: var(--cst-color-text);
    background-color: var(--cst-color-white);
    border: 2px solid var(--cst-color-gray-300);
    border-radius: var(--cst-border-radius);
    transition: border-color var(--cst-transition), box-shadow var(--cst-transition);
    min-height: 44px;
}

.cst-contact-form .wpcf7-form-control:not([type="submit"]):focus {
    border-color: var(--cst-color-primary);
    box-shadow: 0 0 0 3px var(--cst-alpha-green-15);
    outline: none;
}

.cst-contact-form .wpcf7-textarea {
    min-height: 140px;
    resize: vertical;
}

.cst-contact-form .wpcf7-form-control[type="submit"] {
    display: inline-flex;
    align-items: center;
    gap: var(--cst-space-sm);
    padding: var(--cst-space-md) var(--cst-space-xl);
    font-family: var(--cst-font-body);
    font-size: var(--cst-font-size-base);
    font-weight: 600;
    color: var(--cst-color-white);
    background: var(--cst-gradient-primary);
    border: 2px solid var(--cst-color-primary);
    border-radius: var(--cst-border-radius);
    cursor: pointer;
    transition: all var(--cst-transition), transform var(--cst-transition), box-shadow var(--cst-transition);
    line-height: 1;
    min-height: 44px;
}

.cst-contact-form .wpcf7-form-control[type="submit"]:hover {
    border-color: var(--cst-color-green-dark);
    box-shadow: var(--cst-shadow-glow-primary);
    transform: translateY(-1px);
}

/* Validation messages */
.cst-contact-form .wpcf7-not-valid-tip {
    color: var(--cst-color-danger);
    font-size: var(--cst-font-size-sm);
    margin-top: var(--cst-space-xs);
    display: block;
}

.cst-contact-form .wpcf7-not-valid {
    border-color: var(--cst-color-danger);
}

.cst-contact-form .wpcf7-not-valid:focus {
    box-shadow: 0 0 0 3px var(--cst-alpha-red-15);
}

/* Privacy disclosure below forms (Ley 39-2012) */
.cst-form-privacy {
    font-size: var(--cst-font-size-xs);
    color: var(--cst-color-gray-500);
    line-height: 1.5;
    margin-top: var(--cst-space-md);
}

.cst-form-privacy a {
    color: var(--cst-color-green-dark);
    text-decoration: underline;
}

/* Response output — success/error banner */
.cst-contact-form .wpcf7-response-output {
    padding: var(--cst-space-md);
    margin-top: var(--cst-space-md);
    border-radius: var(--cst-border-radius);
    font-size: var(--cst-font-size-sm);
    font-weight: 600;
    border: 2px solid var(--cst-color-gray-300);
}

.cst-contact-form .wpcf7-mail-sent-ok,
.cst-contact-form .wpcf7 form.sent .wpcf7-response-output {
    border-color: var(--cst-color-primary);
    background-color: var(--cst-alpha-green-5);
    color: var(--cst-color-green-dark);
}

.cst-contact-form .wpcf7-validation-errors,
.cst-contact-form .wpcf7 form.invalid .wpcf7-response-output,
.cst-contact-form .wpcf7 form.failed .wpcf7-response-output {
    border-color: var(--cst-color-danger);
    background-color: var(--cst-alpha-red-5);
    color: var(--cst-color-danger);
}

/* Spinner */
.cst-contact-form .wpcf7-spinner {
    margin-left: var(--cst-space-sm);
}

/* Acceptance checkbox & consent */
.cst-contact-form .wpcf7-acceptance label {
    display: inline-flex;
    align-items: flex-start;
    gap: var(--cst-space-sm);
    font-weight: 400;
    cursor: pointer;
}

.cst-contact-form .wpcf7-acceptance input[type="checkbox"] {
    width: 20px;
    height: 20px;
    min-width: 20px;
    margin-top: 2px;
    accent-color: var(--cst-color-primary);
}

/* ==========================================================================
   Course Page
   ========================================================================== */

.cst-course-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--cst-space-2xl);
    align-items: start;
}

.cst-course-info p {
    font-size: var(--cst-font-size-lg);
    color: var(--cst-color-text-muted);
    line-height: 1.7;
    margin-bottom: var(--cst-space-xl);
}

.cst-course-info h2 {
    font-size: var(--cst-font-size-2xl);
    color: var(--cst-color-primary);
    margin-bottom: var(--cst-space-md);
}

.cst-course-list {
    list-style: none;
    padding: 0;
    margin: 0 0 var(--cst-space-xl) 0;
}

.cst-course-list li {
    position: relative;
    padding-left: var(--cst-space-xl);
    margin-bottom: var(--cst-space-sm);
    line-height: 1.6;
}

.cst-course-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.35em;
    width: 18px;
    height: 18px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%237FA35B'%3E%3Cpath d='M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
}

.cst-course-features {
    display: flex;
    flex-direction: column;
    gap: var(--cst-space-md);
}

.cst-course-feature {
    display: flex;
    gap: var(--cst-space-md);
    padding: var(--cst-space-lg);
    background: var(--cst-color-white);
    border-radius: var(--cst-border-radius-lg);
    box-shadow: var(--cst-shadow-sm);
    transition: box-shadow var(--cst-transition-slow), transform var(--cst-transition);
}

.cst-course-feature:hover {
    box-shadow: var(--cst-shadow-lg);
    transform: translateY(-3px);
}

.cst-course-feature__icon {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--cst-alpha-green-8);
    border-radius: 50%;
    color: var(--cst-color-primary);
    transition: background var(--cst-transition);
}

.cst-course-feature:hover .cst-course-feature__icon {
    background: var(--cst-alpha-green-15);
}

.cst-course-feature__body h3 {
    font-size: var(--cst-font-size-base);
    font-weight: 600;
    margin-bottom: var(--cst-space-xs);
}

.cst-course-feature__body p {
    color: var(--cst-color-text-muted);
    font-size: var(--cst-font-size-sm);
    margin: 0;
}

.cst-course-form h2 {
    margin-bottom: var(--cst-space-lg);
}

/* ==========================================================================
   Filter Tabs (Resources)
   ========================================================================== */

.cst-filter-tabs {
    margin-bottom: var(--cst-space-xl);
}

.cst-filter-tabs__list {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: var(--cst-space-sm);
    padding: 0;
    margin: 0;
}

.cst-filter-tabs__btn {
    background: var(--cst-color-gray-100);
    border: 2px solid transparent;
    padding: var(--cst-space-sm) var(--cst-space-lg);
    border-radius: 999px;
    cursor: pointer;
    font-weight: 600;
    font-size: var(--cst-font-size-sm);
    color: var(--cst-color-gray-700);
    transition: background var(--cst-transition), color var(--cst-transition), border-color var(--cst-transition), box-shadow var(--cst-transition), transform var(--cst-transition);
}

.cst-filter-tabs__btn:hover {
    border-color: var(--cst-color-primary);
    color: var(--cst-color-primary);
    background: var(--cst-alpha-green-5);
    transform: translateY(-1px);
}

.cst-filter-tabs__btn.is-active {
    background: var(--cst-gradient-primary);
    color: var(--cst-color-white);
    border-color: var(--cst-color-primary);
    box-shadow: var(--cst-shadow-glow-primary);
}

/* ==========================================================================
   Certificate Mockup & Course Footer CTA Redesign
   ========================================================================== */

.cst-course-footer-cta__info {
    display: flex;
    flex-direction: column;
    gap: var(--cst-space-lg);
}

/* "Vista previa" diagonal flag — keeps users from mistaking the
   placeholder card for a real, broken certificate. */
.cst-certificate-mockup { position: relative; }
.cst-certificate-mockup__preview-flag {
    position: absolute;
    top: 14px;
    right: -34px;
    z-index: 3;
    background: var(--cst-color-secondary, #1C2854);
    color: #fff;
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    padding: 4px 40px;
    transform: rotate(35deg);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
    pointer-events: none;
}

/* Certificate badge label */
.cst-certificate-mockup__badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--cst-alpha-green-5, rgba(127, 163, 91, 0.1));
    color: var(--cst-color-green-dark);
    font-size: 0.75rem;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 20px;
    margin-bottom: var(--cst-space-sm);
}

.cst-certificate-mockup__badge svg {
    color: var(--cst-color-green);
}

/* Certificate card */
.cst-certificate-mockup__card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.cst-certificate-mockup__card:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
}

.cst-certificate-mockup__border {
    border: 2px solid var(--cst-color-green-light);
    border-radius: 8px;
    margin: 8px;
    padding: var(--cst-space-lg) var(--cst-space-md) var(--cst-space-md);
    text-align: center;
    position: relative;
    background: linear-gradient(180deg, rgba(127, 163, 91, 0.03) 0%, #fff 40%);
}

/* Gold ribbon accent */
.cst-certificate-mockup__ribbon {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, var(--cst-color-green-light), var(--cst-color-green), var(--cst-color-green-light));
    border-radius: 0 0 4px 4px;
}

.cst-certificate-mockup__seal {
    margin-bottom: var(--cst-space-sm);
}

.cst-certificate-mockup__seal img {
    height: 24px;
    width: auto;
    opacity: 0.85;
}

.cst-certificate-mockup__label {
    font-family: var(--cst-font-heading);
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: var(--cst-color-green-dark);
    margin-bottom: 4px;
}

.cst-certificate-mockup__divider {
    width: 40px;
    height: 2px;
    background: var(--cst-color-green);
    margin: var(--cst-space-xs) auto;
}

.cst-certificate-mockup__course {
    font-family: var(--cst-font-heading);
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--cst-color-navy);
    margin-bottom: var(--cst-space-sm);
    line-height: 1.3;
}

.cst-certificate-mockup__awarded {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--cst-color-text-muted, #9ca3af);
    margin-bottom: 2px;
}

.cst-certificate-mockup__name {
    font-family: 'Georgia', serif;
    font-size: 1.1rem;
    font-style: italic;
    color: var(--cst-color-navy);
    margin-bottom: var(--cst-space-sm);
}

.cst-certificate-mockup__footer {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    padding-top: var(--cst-space-sm);
    border-top: 1px dashed var(--cst-color-green-light);
}

.cst-certificate-mockup__meta {
    display: flex;
    flex-direction: column;
    gap: 2px;
    text-align: left;
    font-size: 0.65rem;
    color: var(--cst-color-text-muted, #9ca3af);
}

.cst-certificate-mockup__qr {
    flex-shrink: 0;
    opacity: 0.6;
}

/* Quick Info Cards */
.cst-course-footer-cta__quick-info {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--cst-space-sm);
}

.cst-quick-info-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 8px;
    padding: var(--cst-space-md) var(--cst-space-sm);
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.04);
}

.cst-quick-info-card__icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--cst-alpha-green-5, rgba(127, 163, 91, 0.1));
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--cst-color-green-dark);
}

.cst-quick-info-card strong {
    display: block;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--cst-color-navy);
    line-height: 1.2;
}

.cst-quick-info-card span {
    font-size: 0.7rem;
    color: var(--cst-color-text-muted, #9ca3af);
}

/* Contact section in CTA */
.cst-course-footer-cta__contact-title {
    font-family: var(--cst-font-heading);
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--cst-color-navy);
    margin-bottom: var(--cst-space-sm);
}

.cst-course-footer-cta__contact {
    background: #fff;
    border-radius: 10px;
    padding: var(--cst-space-md);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.04);
}

.cst-course-footer-cta__contact-item {
    display: flex;
    align-items: center;
    gap: var(--cst-space-xs);
    margin-bottom: var(--cst-space-xs);
    font-size: 0.85rem;
}

.cst-course-footer-cta__contact-item:last-child {
    margin-bottom: 0;
}

.cst-course-footer-cta__contact-item svg {
    color: var(--cst-color-green);
    flex-shrink: 0;
}

.cst-course-footer-cta__contact-item a {
    color: var(--cst-color-green-dark);
    text-decoration: none;
    font-weight: 500;
}

.cst-course-footer-cta__contact-item a:hover {
    text-decoration: underline;
}

/* Disclaimer */
.cst-course-footer-cta__disclaimer {
    font-size: 0.75rem;
    color: var(--cst-color-text-muted, #9ca3af);
    line-height: 1.5;
    padding: var(--cst-space-sm) var(--cst-space-md);
    border-left: 3px solid var(--cst-color-green-light);
    background: rgba(127, 163, 91, 0.03);
    border-radius: 0 6px 6px 0;
}

.cst-course-footer-cta__disclaimer p {
    margin: 0;
}

@media (max-width: 768px) {
    .cst-course-footer-cta__quick-info {
        grid-template-columns: 1fr;
    }

    .cst-quick-info-card {
        flex-direction: row;
        text-align: left;
    }
}

/* ==========================================================================
   Single Post — Newspaper Sidebar
   ========================================================================== */

.single .site-content {
    max-width: var(--cst-container-width, 1200px);
    margin: 0 auto;
}

.single .inside-article {
    padding: var(--cst-space-xl) 0;
}

.single .entry-title {
    font-family: var(--cst-font-heading);
    font-size: 2rem;
    font-weight: 800;
    color: var(--cst-color-navy);
    line-height: 1.2;
    margin-bottom: var(--cst-space-sm);
}

.single .entry-meta {
    font-size: 0.85rem;
    color: var(--cst-color-text-muted, #6b7280);
    padding-bottom: var(--cst-space-md);
    border-bottom: 2px solid var(--cst-color-green);
    margin-bottom: var(--cst-space-lg);
}

.single .entry-content {
    font-size: 1.05rem;
    line-height: 1.8;
}

.single .entry-content p {
    margin-bottom: var(--cst-space-md);
}

.single .post-image {
    margin-bottom: var(--cst-space-lg);
    border-radius: var(--cst-border-radius);
    overflow: hidden;
}

/* Sidebar widgets */
.cst-sidebar {
    padding-top: var(--cst-space-xl);
}

.cst-sidebar__widget {
    margin-bottom: var(--cst-space-lg);
    padding-bottom: var(--cst-space-lg);
    border-bottom: 1px solid var(--cst-color-gray-200, #e5e7eb);
}

.cst-sidebar__widget:last-child {
    border-bottom: none;
}

.cst-sidebar__title {
    font-family: var(--cst-font-heading);
    font-size: 0.9rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--cst-color-navy);
    margin-bottom: var(--cst-space-md);
    padding-bottom: var(--cst-space-xs);
    border-bottom: 3px solid var(--cst-color-green);
    display: inline-block;
}

/* Sabías que — interactive carousel */
.cst-sidebar__sabias-que {
    background: linear-gradient(135deg, var(--cst-alpha-green-5) 0%, var(--cst-alpha-green-10) 100%);
    border-radius: var(--cst-border-radius-lg);
    padding: var(--cst-space-lg);
    border-bottom: none;
}

.cst-sabias-que__bulb {
    vertical-align: -3px;
    margin-right: 4px;
    color: var(--cst-color-green);
}

.cst-sabias-que__track {
    position: relative;
    overflow: hidden;
}

.cst-sabias-que__slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s ease;
}

.cst-sabias-que__slide--active {
    opacity: 1;
    visibility: visible;
}

.cst-sabias-que__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--cst-color-green);
    color: var(--cst-color-white);
    flex-shrink: 0;
}

.cst-sabias-que__icon svg {
    width: 22px;
    height: 22px;
}

/* Modern row layout: icon on left, counter + text on right. */
.cst-sabias-que__row {
    display: flex;
    align-items: flex-start;
    gap: var(--cst-space-md, 1rem);
}

.cst-sabias-que__body {
    flex: 1;
    min-width: 0;
}

.cst-sabias-que__counter {
    display: inline-block;
    font-family: var(--cst-font-heading, 'Montserrat', sans-serif);
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--cst-color-green);
    margin-bottom: 0.375rem;
}

.cst-sabias-que__text {
    font-size: var(--cst-font-size-sm);
    line-height: 1.6;
    color: var(--cst-color-gray-700);
    margin: 0;
}

.cst-sabias-que__controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: var(--cst-space-md);
    padding-top: var(--cst-space-md);
    border-top: 1px solid var(--cst-alpha-green-15);
}

.cst-sabias-que__dots {
    display: flex;
    gap: 6px;
    align-items: center;
}

/* Sleek pill indicators — small inactive bars, active expands and fills. */
.cst-sabias-que__dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 999px;
    border: none;
    background: var(--cst-alpha-green-15, rgba(127, 163, 91, 0.25));
    cursor: pointer;
    padding: 0;
    transition: width 0.25s ease, background 0.2s ease;
}

.cst-sabias-que__dot:hover {
    background: rgba(127, 163, 91, 0.55);
}

.cst-sabias-que__dot--active {
    width: 22px;
    background: var(--cst-color-green, #7FA35B);
}

.cst-sabias-que__dot:focus-visible {
    outline: 2px solid var(--cst-color-focus, #3B82C4);
    outline-offset: 2px;
}

.cst-sabias-que__next {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--cst-color-green, #7FA35B);
    border: 1px solid var(--cst-color-green, #7FA35B);
    color: #ffffff;
    font-family: var(--cst-font-body, 'Open Sans', sans-serif);
    font-size: 0.8125rem;
    font-weight: 600;
    padding: 7px 14px;
    border-radius: 999px;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.2s ease, transform 0.05s ease, box-shadow 0.2s ease;
    box-shadow: 0 2px 6px rgba(127, 163, 91, 0.25);
}

.cst-sabias-que__next:hover {
    background: var(--cst-color-green-dark, #5e8043);
    border-color: var(--cst-color-green-dark, #5e8043);
}

.cst-sabias-que__next:active {
    transform: translateY(1px);
}

.cst-sabias-que__next svg {
    width: 12px;
    height: 12px;
    transition: transform 0.2s ease;
}

.cst-sabias-que__next:hover svg {
    transform: translateX(2px);
}

@media (prefers-reduced-motion: reduce) {
    .cst-sabias-que__slide {
        transition: none;
    }
}

/* Legacy category styles (unused) */
.cst-sidebar__cat-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: none;
}

.cst-sidebar__cat-list li {
    margin-bottom: var(--cst-space-xs);
}

.cst-sidebar__cat-list li a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--cst-color-text);
    text-decoration: none;
    border-radius: var(--cst-border-radius);
    transition: background-color 0.2s ease, color 0.2s ease;
}

.cst-sidebar__cat-list li a:hover {
    background: var(--cst-alpha-green-5, rgba(127, 163, 91, 0.08));
    color: var(--cst-color-green-dark);
}

.cst-sidebar__cat-list .cat-item-count {
    font-size: 0.75rem;
    background: var(--cst-color-gray-100, #f3f4f6);
    padding: 2px 8px;
    border-radius: 12px;
    color: var(--cst-color-text-muted, #6b7280);
}

/* CTA Banner */
.cst-sidebar__banner {
    border-bottom: none;
    padding-bottom: 0;
}

.cst-sidebar__banner-inner {
    background: linear-gradient(135deg, var(--cst-color-navy) 0%, #2a3f6f 100%);
    color: #fff;
    padding: var(--cst-space-lg);
    border-radius: var(--cst-border-radius-lg, 12px);
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.cst-sidebar__banner-title {
    font-family: var(--cst-font-heading);
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: var(--cst-space-sm);
    color: #fff;
    border: none;
    text-transform: none;
    letter-spacing: 0;
    display: block;
    padding: 0;
}

.cst-sidebar__banner-text {
    font-size: 0.85rem;
    opacity: 0.9;
    margin-bottom: var(--cst-space-md);
    line-height: 1.5;
}

.cst-sidebar__banner .cst-btn--sm {
    display: inline-block;
    font-size: 0.85rem;
    padding: 8px 24px;
}

/* Related Posts */
.cst-sidebar__post-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.cst-sidebar__post-item {
    display: flex;
    gap: var(--cst-space-sm);
    margin-bottom: var(--cst-space-md);
    padding-bottom: var(--cst-space-md);
    border-bottom: 1px solid var(--cst-color-gray-100, #f3f4f6);
}

.cst-sidebar__post-item:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.cst-sidebar__post-thumb {
    flex-shrink: 0;
    width: 72px;
    height: 72px;
    border-radius: 6px;
    overflow: hidden;
}

.cst-sidebar__post-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cst-sidebar__post-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.cst-sidebar__post-link {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--cst-color-navy);
    text-decoration: none;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.cst-sidebar__post-link:hover {
    color: var(--cst-color-green-dark);
}

.cst-sidebar__post-date {
    font-size: 0.75rem;
    color: var(--cst-color-text-muted, #6b7280);
}

/* Events */
.cst-sidebar__event-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.cst-sidebar__event-item {
    display: flex;
    gap: var(--cst-space-sm);
    align-items: flex-start;
    margin-bottom: var(--cst-space-md);
}

.cst-sidebar__event-item:last-child {
    margin-bottom: 0;
}

.cst-sidebar__event-date-badge {
    flex-shrink: 0;
    width: 48px;
    height: 52px;
    background: var(--cst-color-green);
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #fff;
    line-height: 1;
}

.cst-sidebar__event-month {
    font-size: 0.6rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    opacity: 0.9;
}

.cst-sidebar__event-day {
    font-size: 1.2rem;
    font-weight: 800;
}

.cst-sidebar__event-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.cst-sidebar__event-info strong {
    font-size: 0.85rem;
    color: var(--cst-color-navy);
    line-height: 1.3;
}

.cst-sidebar__event-info span {
    font-size: 0.75rem;
    color: var(--cst-color-text-muted, #6b7280);
}

/* Contact */
.cst-sidebar__contact p {
    display: flex;
    align-items: center;
    gap: var(--cst-space-xs);
    margin-bottom: var(--cst-space-sm);
    font-size: 0.85rem;
}

.cst-sidebar__contact a {
    color: var(--cst-color-green-dark);
    text-decoration: none;
}

.cst-sidebar__contact a:hover {
    text-decoration: underline;
}

.cst-sidebar__contact svg {
    color: var(--cst-color-green);
    flex-shrink: 0;
}

/* ==========================================================================
   Legal Page
   ========================================================================== */

.cst-legal-layout {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: var(--cst-space-2xl);
    align-items: start;
}

.cst-legal-toc {
    position: sticky;
    top: 120px; /* account for sticky header height */
}

.cst-legal-toc__title {
    font-size: var(--cst-font-size-lg);
    margin-bottom: var(--cst-space-md);
    color: var(--cst-color-primary);
}

.cst-legal-toc__list {
    padding-left: var(--cst-space-lg);
    margin: 0;
}

.cst-legal-toc__list li {
    margin-bottom: var(--cst-space-sm);
}

.cst-legal-toc__list a {
    color: var(--cst-color-gray-700);
    text-decoration: none;
    font-size: var(--cst-font-size-sm);
}

.cst-legal-toc__list a:hover {
    color: var(--cst-color-primary);
}

.cst-legal-meta {
    margin-top: var(--cst-space-2xl);
    padding-top: var(--cst-space-lg);
    border-top: 1px solid var(--cst-color-gray-300);
}

.cst-legal-meta__updated {
    color: var(--cst-color-text-muted);
    font-size: var(--cst-font-size-sm);
}

/* ==========================================================================
   Content Area (prose styling)
   ========================================================================== */

.cst-content-area h2 {
    font-size: var(--cst-font-size-2xl);
    margin-top: var(--cst-space-2xl);
    margin-bottom: var(--cst-space-md);
    color: var(--cst-color-primary);
}

.cst-content-area h3 {
    font-size: var(--cst-font-size-xl);
    margin-top: var(--cst-space-xl);
    margin-bottom: var(--cst-space-md);
}

.cst-content-area p {
    margin-bottom: var(--cst-space-md);
}

.cst-content-area ul,
.cst-content-area ol {
    margin-bottom: var(--cst-space-md);
    padding-left: var(--cst-space-xl);
}

.cst-content-area a {
    color: var(--cst-color-green-dark);
}

/* ==========================================================================
   Institutional Footer
   ========================================================================== */

.cst-institutional-footer {
    background: linear-gradient(180deg, var(--cst-color-navy-darker) 0%, var(--cst-color-gray-900) 100%);
    color: var(--cst-color-gray-300);
    padding-top: var(--cst-space-3xl);
    position: relative;
}

/* Decorative gradient top border — animated */
.cst-institutional-footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--cst-gradient-accent);
    background-size: 200% 100%;
    animation: cst-gradient-shift 6s ease infinite;
}

/* Subtle dot pattern overlay */
.cst-institutional-footer::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(var(--cst-alpha-white-3) 1px, transparent 1px);
    background-size: 24px 24px;
    pointer-events: none;
    z-index: 0;
}

.cst-institutional-footer__grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: var(--cst-space-3xl);
    padding-bottom: var(--cst-space-3xl);
    position: relative;
    z-index: 1;
}

.cst-institutional-footer__branding {
    display: flex;
    align-items: center;
    gap: var(--cst-space-md);
    margin-bottom: var(--cst-space-lg);
}

.cst-institutional-footer__seal {
    height: 48px;
    width: auto;
}

.cst-institutional-footer__agency {
    font-weight: 600;
    color: var(--cst-color-white);
}

.cst-footer-widget__title {
    color: var(--cst-color-white);
    font-size: var(--cst-font-size-base);
    font-weight: 600;
    margin-bottom: var(--cst-space-md);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding-bottom: var(--cst-space-sm);
    border-bottom: none;
    position: relative;
}

.cst-footer-widget__title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 32px;
    height: 2px;
    background: var(--cst-gradient-accent);
    border-radius: 1px;
}

.cst-footer-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.cst-footer-menu li {
    margin-bottom: var(--cst-space-sm);
}

.cst-footer-menu a {
    color: var(--cst-color-gray-300);
    text-decoration: none;
    transition: color var(--cst-transition), padding-left var(--cst-transition);
}

.cst-footer-menu a:hover {
    color: var(--cst-color-white);
    padding-left: var(--cst-space-xs);
}

.cst-footer-contact {
    list-style: none;
    padding: 0;
    margin: 0;
}

.cst-footer-contact li {
    display: flex;
    align-items: flex-start;
    gap: var(--cst-space-sm);
    margin-bottom: var(--cst-space-md);
    line-height: 1.5;
}

.cst-footer-contact__icon {
    flex-shrink: 0;
    margin-top: 2px;
    color: var(--cst-color-green-light);
}

.cst-footer-contact a,
.cst-footer-contact span {
    color: var(--cst-color-gray-300);
    text-decoration: none;
    transition: color var(--cst-transition);
}

.cst-footer-contact a:hover {
    color: var(--cst-color-white);
}

.cst-footer-widget__title--social {
    margin-top: var(--cst-space-xl);
}

/* Social Links */

.cst-social-links {
    list-style: none;
    display: flex;
    gap: var(--cst-space-md);
    padding: 0;
    margin: 0;
}

.cst-social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: var(--cst-alpha-white-10);
    border-radius: 50%;
    color: var(--cst-color-gray-300);
    transition: all var(--cst-transition);
}

.cst-social-links a:hover {
    background: rgba(255, 255, 255, 0.18);
    color: var(--cst-color-white);
    transform: translateY(-2px);
}

@media (prefers-reduced-motion: reduce) {
    .cst-social-links a { transition: none; }
    .cst-social-links a:hover { transform: none; }
}

.cst-social-links--contact {
    flex-direction: column;
    gap: 0.25rem;
}

.cst-social-links--contact a {
    width: auto;
    height: auto;
    background: transparent;
    border-radius: 6px;
    color: var(--cst-color-secondary, #1C2854);
    justify-content: flex-start;
    display: inline-flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0.5rem 0.625rem;
    margin-left: -0.625rem; /* keep flush-left visual alignment with the section text */
    font-weight: 600;
    text-decoration: none;
    transition: background-color 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

/* Override the global cst-social-links hover (gradient pill) for the contact
   variant: a clean tinted background + green icon + slight slide. */
.cst-social-links--contact a:hover,
.cst-social-links--contact a:focus-visible {
    background: rgba(127, 163, 91, 0.10);
    color: var(--cst-color-secondary, #1C2854);
    transform: translateX(2px);
    text-decoration: none;
}

.cst-social-links--contact a:focus-visible {
    outline: 2px solid var(--cst-color-focus, #3B82C4);
    outline-offset: 2px;
}

.cst-social-links--contact .cst-social-icon {
    flex-shrink: 0;
    color: var(--cst-color-primary, #7FA35B);
    transition: color 0.18s ease, transform 0.18s ease;
}

.cst-social-links--contact a:hover .cst-social-icon {
    color: var(--cst-color-green-dark, #5e8043);
}

@media (prefers-reduced-motion: reduce) {
    .cst-social-links--contact a,
    .cst-social-links--contact .cst-social-icon { transition: none; }
    .cst-social-links--contact a:hover { transform: none; }
}

/* Legal & Copyright */

.cst-institutional-footer__legal {
    padding-block: var(--cst-space-sm);
}

.cst-legal-menu {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: var(--cst-space-md);
    padding: 0;
    margin: 0;
    justify-content: center;
}

.cst-legal-menu a {
    color: var(--cst-color-gray-300);
    text-decoration: none;
    font-size: var(--cst-font-size-sm);
}

.cst-legal-menu a:hover {
    color: var(--cst-color-white);
}

/* OIG Logo */

.cst-institutional-footer__oig {
    margin-top: var(--cst-space-lg);
    padding-top: var(--cst-space-lg);
    border-top: 1px solid var(--cst-alpha-white-10);
}

.cst-institutional-footer__oig-header {
    display: flex;
    align-items: center;
    gap: var(--cst-space-sm);
    margin-bottom: var(--cst-space-sm);
}

.cst-institutional-footer__oig-seal {
    height: 40px;
    width: auto;
    opacity: 0.85;
    transition: opacity var(--cst-transition);
}

.cst-institutional-footer__oig a:hover .cst-institutional-footer__oig-seal {
    opacity: 1;
}

/* Bottom bar */

.cst-institutional-footer__bottom {
    border-top: 1px solid var(--cst-alpha-white-10);
    padding-top: var(--cst-space-xl);
    text-align: center;
    position: relative;
    z-index: 1;
}

.cst-institutional-footer__compliance {
    margin-bottom: var(--cst-space-md);
}

.cst-institutional-footer__compliance p {
    font-size: var(--cst-font-size-sm);
    color: var(--cst-color-gray-300);
    opacity: 0.65;
    max-width: 800px;
    margin-inline: auto;
    line-height: 1.6;
}

.cst-institutional-footer__statements {
    margin-bottom: var(--cst-space-md);
}

.cst-institutional-footer__statements p {
    font-size: var(--cst-font-size-xs);
    color: var(--cst-color-gray-300);
    opacity: 0.65;
    margin: 0;
}

.cst-institutional-footer__statements a {
    color: var(--cst-color-gray-300);
    text-decoration: underline;
}

.cst-institutional-footer__statements a:hover {
    color: var(--cst-color-white);
}

/* OIG Reporting Block */

.cst-institutional-footer__oig-heading {
    font-family: var(--cst-font-heading);
    font-size: var(--cst-font-size-sm);
    font-weight: 600;
    color: var(--cst-color-white);
    margin-top: var(--cst-space-sm);
    margin-bottom: var(--cst-space-xs);
}

.cst-institutional-footer__oig-contact {
    list-style: none;
    padding: 0;
    margin: 0 0 var(--cst-space-sm) 0;
    font-size: var(--cst-font-size-sm);
}

.cst-institutional-footer__oig-contact li {
    margin-bottom: var(--cst-space-xs);
}

.cst-institutional-footer__oig-contact a {
    color: var(--cst-color-gray-300);
    text-decoration: none;
}

.cst-institutional-footer__oig-contact a:hover,
.cst-institutional-footer__oig-contact a:focus {
    color: var(--cst-color-white);
    text-decoration: underline;
}

.cst-institutional-footer__oig-note {
    font-size: var(--cst-font-size-xs);
    color: var(--cst-color-gray-500);
}

.cst-institutional-footer__oig-whistleblower {
    font-size: var(--cst-font-size-xs);
    color: var(--cst-color-gray-300);
    opacity: 0.75;
    font-style: italic;
    margin-top: var(--cst-space-xs);
}

/* Privacy Fallback */

.cst-legal-nav--fallback {
    text-align: center;
    padding-top: var(--cst-space-sm);
}

.cst-institutional-footer__copyright {
    text-align: center;
    padding-top: var(--cst-space-md);
    padding-bottom: var(--cst-space-lg);
    border-top: 1px solid var(--cst-alpha-white-6);
    font-size: var(--cst-font-size-xs);
    opacity: 0.6;
}

/* --- Back to Top Button --- */

.cst-back-to-top {
    position: fixed;
    bottom: calc(var(--cst-space-xl) + 68px); /* Above WhatsApp button (56px + 12px gap) */
    right: var(--cst-space-xl);
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--cst-gradient-primary);
    color: var(--cst-color-white);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--cst-shadow-md);
    opacity: 0;
    visibility: hidden;
    transform: translateY(16px);
    transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease, box-shadow var(--cst-transition);
    z-index: 999;
}

.cst-back-to-top.is-visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.cst-back-to-top:hover {
    box-shadow: var(--cst-shadow-glow-primary);
    transform: translateY(-2px);
}

.cst-back-to-top:active {
    transform: translateY(0);
}

/* ==========================================================================
   Callout / Highlight Box
   ========================================================================== */

.cst-callout {
    padding: var(--cst-space-lg) var(--cst-space-xl);
    margin-block: var(--cst-space-lg);
    border-left: 4px solid var(--cst-color-green);
    border-radius: 0 var(--cst-border-radius) var(--cst-border-radius) 0;
    background: var(--cst-callout-bg-default);
}

.cst-callout__title {
    font-size: var(--cst-font-size-lg);
    font-weight: 700;
    color: var(--cst-color-green-dark);
    margin-bottom: var(--cst-space-xs);
}

.cst-callout__content {
    color: var(--cst-color-text);
}

.cst-callout__content p:last-child {
    margin-bottom: 0;
}

/* Warning variant */
.cst-callout--warning {
    border-left-color: var(--cst-color-navy);
    background: var(--cst-callout-bg-warning);
}

.cst-callout--warning .cst-callout__title {
    color: var(--cst-color-navy);
}

/* Info variant */
.cst-callout--info {
    border-left-color: var(--cst-color-accent);
    background: var(--cst-callout-bg-info);
}

.cst-callout--info .cst-callout__title {
    color: var(--cst-color-accent);
}

/* ==========================================================================
   Icon Hover Animations
   ========================================================================== */

/* Objective card icon — subtle rotate on hover */
.cst-objective-card:hover .cst-objective-card__icon {
    transform: translateY(-4px) scale(1.1) rotate(-8deg);
}

/* Stat card icon hover is handled in the Statistics Grid block above */

/* ==========================================================================
   Empty State
   ========================================================================== */

.cst-empty-state {
    text-align: center;
    padding: var(--cst-space-3xl);
    color: var(--cst-color-text-muted);
    font-size: var(--cst-font-size-lg);
}

/* ==========================================================================
   Utilities
   ========================================================================== */

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

/* ==========================================================================
   GP Overrides
   ========================================================================== */

/* Hide GP default footer — branding lives in institutional footer */
.site-footer .site-info {
    display: none;
}

/* --- Site Header / Nav Bar --- */

.site-header {
    border: none;
    background-color: var(--cst-color-white);
    box-shadow: var(--cst-shadow-sm);
    z-index: 999;
    position: relative;
}

.site-header .inside-header {
    max-width: var(--cst-container-max);
    margin-inline: auto;
    padding: 0 var(--cst-space-md);
    display: flex;
    justify-content: center;
}

/* Hide GP branding — branding lives in institutional header */
.site-header .site-branding,
.site-header .site-logo,
.site-header .site-title,
.site-header .site-description {
    display: none;
}

/* Hide mobile toggle wrapper on desktop — only needed at 768px */
#mobile-menu-control-wrapper {
    display: none;
}

.site-header #site-navigation {
    float: none;
    flex: 1;
    display: flex;
    justify-content: center;
    background: transparent;
}

.site-header #site-navigation .inside-navigation {
    display: flex;
    justify-content: center;
}

.site-header #site-navigation .main-nav {
    float: none;
    width: auto;
}

/* --- Top-Level Links --- */

.main-navigation .main-nav > ul {
    display: flex;
    align-items: stretch;
    justify-content: center;
    gap: 4px;
}

.main-navigation .main-nav > ul > li > a {
    font-family: var(--cst-font-body);
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: var(--cst-color-gray-700);
    padding: 12px 20px;
    min-height: auto;
    display: flex;
    align-items: center;
    position: relative;
    border-radius: 6px;
    transition: color 0.2s ease, background-color 0.2s ease;
}

/* Hover */
.main-navigation .main-nav > ul > li > a:hover {
    color: var(--cst-color-primary);
}

.main-navigation .main-nav > ul > li > a::after {
    display: none;
}

/* --- Active / Current Page --- */

.main-navigation .main-nav > ul > li.current-menu-item > a {
    color: var(--cst-color-primary);
    font-weight: 600;
}

.main-navigation .main-nav > ul > li.current-menu-ancestor > a {
    color: var(--cst-color-primary);
}

/* --- Dropdown Parent (chevron) --- */

.main-navigation .main-nav > ul > li.menu-item-has-children > a {
    padding-right: 32px;
}

.main-navigation .main-nav > ul > li.menu-item-has-children > a::before {
    content: "";
    position: absolute;
    right: 12px;
    top: 50%;
    width: 5px;
    height: 5px;
    border-right: 1.5px solid currentColor;
    border-bottom: 1.5px solid currentColor;
    transform: translateY(-65%) rotate(45deg);
    opacity: 0.6;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.main-navigation .main-nav > ul > li.menu-item-has-children.sfHover > a::before,
.main-navigation .main-nav > ul > li.menu-item-has-children:hover > a::before {
    transform: translateY(-35%) rotate(-135deg);
    opacity: 1;
}

/* --- Dropdown Panel --- */

.main-navigation .main-nav ul ul {
    background: var(--cst-color-white);
    border: 1px solid var(--cst-alpha-black-8);
    border-radius: 8px;
    box-shadow: 0 8px 30px var(--cst-alpha-black-12), 0 2px 8px var(--cst-alpha-black-6);
    min-width: 220px;
    padding: 6px;
    margin-top: 4px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    transition: opacity 0.2s ease, visibility 0.2s ease, transform 0.2s ease;
}

/* --- Dropdown Show --- */

.main-navigation .main-nav ul li:hover > ul,
.main-navigation .main-nav ul li.sfHover > ul,
.main-navigation .main-nav ul li:focus-within > ul {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* --- Submenu Links --- */

.main-navigation .main-nav ul ul li a {
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--cst-color-gray-700);
    padding: 8px 14px;
    min-height: 40px;
    display: flex;
    align-items: center;
    border-radius: 6px;
    transition: color 0.15s ease, background-color 0.15s ease;
}

.main-navigation .main-nav ul ul li a:hover {
    color: var(--cst-color-secondary);
    background-color: var(--cst-color-gray-100);
}

.main-navigation .main-nav ul ul li.current-menu-item > a {
    color: var(--cst-color-primary);
    font-weight: 600;
    background-color: var(--cst-alpha-green-8);
}

/* Disable bottom-border pseudo on submenu links */
.main-navigation .main-nav ul ul li a::after {
    display: none;
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 1024px) {
    .cst-institutional-footer__grid {
        grid-template-columns: 1fr 1fr;
        gap: var(--cst-space-xl);
    }

    .cst-institutional-footer__col--brand {
        grid-column: 1 / -1;
    }

    .cst-legal-layout {
        grid-template-columns: 200px 1fr;
    }
}

@media (max-width: 768px) {
    :root {
        --cst-font-size-xl:  1.25rem;  /* 20px down from 24px */
        --cst-font-size-2xl: 1.625rem; /* 26px down from 32px */
        --cst-font-size-3xl: 1.875rem; /* 30px down from 40px */
        --cst-font-size-4xl: 2.25rem;  /* 36px down from 48px */
    }

    /* Show mobile toggle wrapper at mobile */
    #mobile-menu-control-wrapper {
        display: flex;
    }

    /* --- Mobile Hamburger Toggle --- */

    .menu-toggle {
        background-color: transparent;
        color: var(--cst-color-gray-700);
        border: 1.5px solid var(--cst-color-gray-300);
        border-radius: 8px;
        font-family: var(--cst-font-body);
        font-size: 0;
        font-weight: 600;
        width: 48px;
        height: 48px;
        min-width: 48px;
        min-height: 48px;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        transition: background-color var(--cst-transition);
        position: relative;
        padding: 0;
    }

    .menu-toggle:hover,
    .menu-toggle:active {
        background-color: var(--cst-color-gray-100);
        border-color: var(--cst-color-gray-400);
    }

    .toggled .menu-toggle {
        background-color: var(--cst-color-gray-100);
    }

    /* Animated hamburger icon */
    .cst-hamburger {
        display: block;
        width: 22px;
        height: 2px;
        background: var(--cst-color-gray-700);
        position: relative;
        transition: background var(--cst-transition);
    }

    .cst-hamburger::before,
    .cst-hamburger::after {
        content: '';
        position: absolute;
        left: 0;
        width: 100%;
        height: 2px;
        background: var(--cst-color-gray-700);
        transition: transform var(--cst-transition);
    }

    .cst-hamburger::before {
        top: -7px;
    }

    .cst-hamburger::after {
        top: 7px;
    }

    /* X state when menu is toggled */
    .main-navigation.toggled .cst-hamburger {
        background: transparent;
    }

    .main-navigation.toggled .cst-hamburger::before {
        transform: translateY(7px) rotate(45deg);
    }

    .main-navigation.toggled .cst-hamburger::after {
        transform: translateY(-7px) rotate(-45deg);
    }

    /* --- Mobile Drawer Panel --- */

    .main-navigation .main-nav {
        background-color: var(--cst-color-white);
        border-radius: 0 0 12px 12px;
        box-shadow: 0 12px 40px var(--cst-alpha-black-15);
        max-height: calc(100vh - 200px);
        overflow-y: auto;
        animation: cst-slide-down 0.25s ease;
        padding: 6px;
    }

    .main-navigation .main-nav > ul {
        flex-direction: column;
        gap: 2px;
    }

    .main-navigation .main-nav > ul > li {
        border-bottom: none;
    }

    .main-navigation .main-nav > ul > li > a {
        font-size: 0.9375rem;
        padding: 12px 16px;
        min-height: 48px;
        color: var(--cst-color-gray-700);
        border-radius: 8px;
    }

    .main-navigation .main-nav > ul > li > a:hover {
        color: var(--cst-color-secondary);
        background-color: var(--cst-color-gray-100);
    }

    .main-navigation .main-nav > ul > li.current-menu-item > a {
        color: var(--cst-color-primary);
        background-color: var(--cst-alpha-green-8);
        font-weight: 600;
    }

    /* Remove desktop pseudo-elements on mobile */
    .main-navigation .main-nav > ul > li > a::after,
    .main-navigation .main-nav > ul > li.menu-item-has-children > a::before {
        display: none;
    }

    /* --- Mobile Submenus --- */

    .main-navigation .main-nav ul ul {
        position: static;
        opacity: 1;
        visibility: visible;
        border: none;
        box-shadow: none;
        border-radius: 0;
        background: transparent;
        transform: none;
        transition: none;
        padding: 0 0 4px 0;
        margin: 0;
        min-width: 0;
    }

    .main-navigation .main-nav ul ul li a {
        padding-left: 44px;
        font-size: var(--cst-font-size-sm);
        border-radius: 6px;
        color: var(--cst-color-gray-500);
    }

    .main-navigation .main-nav ul ul li a:hover {
        color: var(--cst-color-secondary);
        background-color: var(--cst-color-gray-100);
    }

    .main-navigation .main-nav ul ul li {
        border-bottom: none;
    }

    .cst-card-grid--3 {
        grid-template-columns: 1fr;
    }

    .cst-objectives-grid {
        grid-template-columns: 1fr;
    }

    .cst-contact-grid {
        grid-template-columns: 1fr;
    }

    .cst-course-grid {
        grid-template-columns: 1fr;
    }

    .cst-hero__actions {
        flex-direction: column;
        align-items: stretch;
    }

    .cst-hero__actions .cst-btn {
        text-align: center;
        justify-content: center;
    }

    .cst-institutional-footer__grid {
        grid-template-columns: 1fr;
    }

    .cst-legal-layout {
        grid-template-columns: 1fr;
    }

    .cst-legal-toc {
        position: static;
    }

    .cst-institutional-header__inner {
        flex-direction: column;
        text-align: center;
    }

    .cst-institutional-header__branding {
        flex-direction: column;
    }

    .cst-institutional-header__actions {
        flex-direction: column;
        align-items: center;
        gap: var(--cst-space-sm);
        width: 100%;
    }

    .cst-search.is-open .cst-search__form {
        width: 200px;
    }

    .cst-gov-banner__columns {
        grid-template-columns: 1fr;
    }

    .cst-card--event {
        flex-direction: column;
    }

    .cst-card__date-badge {
        flex-direction: row;
        gap: var(--cst-space-sm);
        min-width: auto;
    }

    .cst-hero {
        padding-block: var(--cst-space-2xl);
    }

    .cst-hero__illustration {
        display: none;
    }

    .cst-hero__float {
        display: none;
    }

    .cst-section {
        padding-block: var(--cst-space-2xl);
    }
}

@media (max-width: 480px) {
    :root {
        --cst-font-size-xl:  1.125rem; /* 18px */
        --cst-font-size-2xl: 1.375rem; /* 22px */
        --cst-font-size-3xl: 1.625rem; /* 26px */
        --cst-font-size-4xl: 1.875rem; /* 30px */
    }

    .cst-container {
        padding-inline: var(--cst-space-md);
    }

    .cst-filter-tabs__list {
        flex-direction: column;
    }

    .cst-filter-tabs__btn {
        width: 100%;
        text-align: center;
    }
}

/* ==========================================================================
   Print
   ========================================================================== */

@media print {
    .cst-gov-banner,
    .cst-institutional-header__actions,
    .cst-hero__overlay,
    .cst-btn,
    .cst-filter-tabs,
    .cst-social-links,
    .cst-legal-toc,
    nav {
        display: none !important;
    }

    .cst-hero {
        background: none !important;
        color: var(--cst-color-black) !important;
        padding: var(--cst-space-md) 0;
    }

    .cst-hero__title {
        color: var(--cst-color-black) !important;
    }

    .cst-card {
        box-shadow: none;
        border: 1px solid #ccc;
        break-inside: avoid;
    }

    .cst-institutional-footer {
        background: none;
        color: var(--cst-color-black);
        border-top: 2px solid #000;
    }

    .cst-stat-card {
        box-shadow: none;
        border: 1px solid #ccc;
        break-inside: avoid;
    }

    .cst-stat-card::before {
        display: none;
    }

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

    body {
        font-size: 12pt;
    }
}

/* ==========================================================================
   About Page — Government-style layout
   ========================================================================== */

/* --- Mission & Purpose blocks --- */

.cst-section--about-mission,
.cst-section--about-purpose {
    padding-block: var(--cst-space-3xl);
}

.cst-section--about-purpose {
    background: var(--cst-gradient-section);
}

.cst-about-block {
    max-width: var(--cst-container-narrow);
    margin: 0 auto;
    text-align: center;
}

.cst-about-block .cst-section-heading {
    margin-bottom: var(--cst-space-lg);
}

.cst-about-block .cst-section-heading__title {
    font-size: var(--cst-font-size-2xl);
    color: var(--cst-color-navy);
}

.cst-about-block__text {
    font-size: var(--cst-font-size-lg);
    line-height: 1.8;
    color: var(--cst-color-gray-700);
    max-width: 680px;
    margin: 0 auto;
}

/* Navy left border accent for purpose section */
.cst-section--about-purpose .cst-about-block {
    position: relative;
    padding-left: var(--cst-space-xl);
    text-align: left;
}

.cst-section--about-purpose .cst-about-block::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--cst-gradient-accent);
    border-radius: 2px;
}

/* --- Pillars grid --- */

.cst-section--about-pillars {
    padding-block: var(--cst-space-4xl);
    background: var(--cst-gradient-section);
}

.cst-section--about-pillars > .cst-container > .cst-section-heading {
    text-align: center;
    margin-bottom: var(--cst-space-3xl);
}

.cst-pillars-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--cst-space-xl);
}

.cst-pillar-card {
    position: relative;
    padding: var(--cst-space-xl);
    background: var(--cst-color-white);
    border: 1px solid var(--cst-color-gray-300);
    border-radius: var(--cst-border-radius-lg);
    box-shadow: var(--cst-shadow-sm);
    transition: box-shadow var(--cst-transition), border-color var(--cst-transition);
}

.cst-pillar-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--cst-gradient-accent);
    border-radius: var(--cst-border-radius-lg) var(--cst-border-radius-lg) 0 0;
}

.cst-pillar-card:hover {
    box-shadow: var(--cst-shadow-md);
    border-color: var(--cst-color-green);
}

.cst-pillar-card__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    margin-bottom: var(--cst-space-md);
    border-radius: var(--cst-border-radius);
    background: var(--cst-alpha-green-10);
    color: var(--cst-color-green-dark);
}

.cst-pillar-card__title {
    font-family: var(--cst-font-heading);
    font-size: var(--cst-font-size-lg);
    font-weight: 700;
    color: var(--cst-color-navy);
    margin: 0 0 var(--cst-space-sm) 0;
}

.cst-pillar-card__desc {
    font-size: var(--cst-font-size-base);
    line-height: 1.7;
    color: var(--cst-color-gray-700);
    margin: 0;
}

/* --- Contact CTA box --- */

.cst-section--about-cta {
    padding-block: var(--cst-space-3xl) var(--cst-space-4xl);
}

.cst-about-cta-box {
    max-width: var(--cst-container-narrow);
    margin: 0 auto;
    padding: var(--cst-space-3xl) var(--cst-space-xl);
    text-align: center;
    background: var(--cst-color-navy);
    border-radius: var(--cst-border-radius-lg);
    box-shadow: var(--cst-shadow-xl);
}

.cst-about-cta-box .cst-section-heading__title {
    color: var(--cst-color-white);
    font-size: var(--cst-font-size-2xl);
}

.cst-about-cta-box__text {
    font-size: var(--cst-font-size-lg);
    color: var(--cst-alpha-white-85);
    margin: 0 0 var(--cst-space-xl) 0;
}

.cst-about-cta-box .cst-btn--primary {
    background: var(--cst-color-white);
    color: var(--cst-color-navy);
    font-weight: 700;
}

.cst-about-cta-box .cst-btn--primary:hover {
    background: var(--cst-color-gray-100);
}

/* --- Responsive --- */

@media (max-width: 768px) {
    .cst-pillars-grid {
        grid-template-columns: 1fr;
    }

    .cst-about-cta-box {
        padding: var(--cst-space-2xl) var(--cst-space-lg);
    }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .cst-pillar-card:hover {
        box-shadow: none;
    }

}

/* ==========================================================================
   Course Landing Page — Impact, Cards, FAQ, Footer CTA
   ========================================================================== */

/* --- Course Impact Section (dark navy) --- */

.cst-section.cst-section--course-impact {
    background: var(--cst-color-navy);
    color: var(--cst-color-white);
    padding-block: var(--cst-space-4xl);
}

.cst-course-impact__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--cst-space-3xl);
    align-items: center;
    margin-bottom: var(--cst-space-3xl);
}

.cst-course-impact__title {
    font-family: var(--cst-font-heading);
    font-size: var(--cst-font-size-2xl);
    font-weight: 700;
    line-height: var(--cst-line-height-tight);
    color: var(--cst-color-white);
    margin: 0 0 var(--cst-space-md) 0;
}

.cst-course-impact__desc {
    font-size: var(--cst-font-size-base);
    line-height: 1.7;
    color: var(--cst-alpha-white-85);
    margin: 0;
}

.cst-course-impact__stat-box {
    text-align: center;
    padding: var(--cst-space-2xl);
    background: var(--cst-alpha-white-8);
    border: 1px solid var(--cst-alpha-white-15);
    border-radius: var(--cst-border-radius-lg);
    backdrop-filter: blur(8px);
}

.cst-course-impact__stat-number {
    display: block;
    font-family: var(--cst-font-heading);
    font-size: var(--cst-font-size-4xl);
    font-weight: 800;
    color: var(--cst-color-green-light);
    line-height: 1;
    margin-bottom: var(--cst-space-sm);
}

.cst-course-impact__stat-label {
    font-size: var(--cst-font-size-sm);
    color: var(--cst-alpha-white-80);
    line-height: 1.5;
    margin: 0;
}

.cst-course-impact__callouts {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--cst-space-xl);
}

.cst-course-impact__callout {
    text-align: center;
    padding: var(--cst-space-lg);
    background: var(--cst-alpha-white-6);
    border: 1px solid var(--cst-alpha-white-10);
    border-radius: var(--cst-border-radius-lg);
    transition: background var(--cst-transition), border-color var(--cst-transition);
}

.cst-course-impact__callout:hover {
    background: var(--cst-alpha-white-10);
    border-color: var(--cst-alpha-white-20);
}

.cst-course-impact__callout-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    margin-bottom: var(--cst-space-md);
    border-radius: 50%;
    background: var(--cst-color-green);
    color: var(--cst-color-white);
}

.cst-course-impact__callout-title {
    font-family: var(--cst-font-heading);
    font-size: var(--cst-font-size-lg);
    font-weight: 700;
    color: var(--cst-color-white);
    margin: 0 0 var(--cst-space-xs) 0;
}

.cst-course-impact__callout-desc {
    font-size: var(--cst-font-size-sm);
    color: var(--cst-alpha-white-75);
    line-height: 1.6;
    margin: 0;
}

/* --- Course Feature Cards --- */

.cst-section--course-cards {
    background: var(--cst-gradient-section);
    padding-block: var(--cst-space-4xl);
}

.cst-course-cards__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--cst-space-xl);
    margin-top: var(--cst-space-2xl);
}

.cst-course-card {
    background: var(--cst-color-white);
    border: 1px solid var(--cst-color-gray-200);
    border-radius: var(--cst-border-radius-lg);
    padding: var(--cst-space-2xl) var(--cst-space-xl);
    text-align: center;
    box-shadow: var(--cst-shadow-sm);
    transition: box-shadow var(--cst-transition), transform var(--cst-transition);
}

.cst-course-card:hover {
    box-shadow: var(--cst-shadow-md);
    transform: translateY(-4px);
}

.cst-course-card__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 72px;
    height: 72px;
    margin-bottom: var(--cst-space-lg);
    border-radius: 50%;
    background: var(--cst-alpha-green-10);
    color: var(--cst-color-green-dark);
}

.cst-course-card__title {
    font-family: var(--cst-font-heading);
    font-size: var(--cst-font-size-lg);
    font-weight: 700;
    color: var(--cst-color-navy);
    margin: 0 0 var(--cst-space-md) 0;
}

.cst-course-card__list {
    list-style: none;
    padding: 0;
    margin: 0;
    text-align: left;
}

.cst-course-card__list li {
    position: relative;
    padding-left: var(--cst-space-xl);
    margin-bottom: var(--cst-space-sm);
    font-size: var(--cst-font-size-sm);
    color: var(--cst-color-gray-700);
    line-height: 1.6;
}

.cst-course-card__list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.35em;
    width: 18px;
    height: 18px;
    background: var(--cst-color-green);
    border-radius: 50%;
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z'/%3E%3C/svg%3E");
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z'/%3E%3C/svg%3E");
    mask-size: contain;
    -webkit-mask-size: contain;
}

/* --- FAQ Accordion --- */

.cst-section--course-faq {
    padding-block: var(--cst-space-4xl);
}

.cst-faq {
    max-width: var(--cst-container-narrow);
    margin: var(--cst-space-2xl) auto 0;
}

.cst-faq__item {
    border-bottom: 1px solid var(--cst-color-gray-200);
}

.cst-faq__item:first-child {
    border-top: 1px solid var(--cst-color-gray-200);
}

.cst-faq__question {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--cst-space-md);
    min-height: 44px;
    padding: var(--cst-space-lg) var(--cst-space-sm);
    font-family: var(--cst-font-heading);
    font-size: var(--cst-font-size-base);
    font-weight: 600;
    color: var(--cst-color-navy);
    cursor: pointer;
    list-style: none;
}

.cst-faq__question::-webkit-details-marker {
    display: none;
}

.cst-faq__question::marker {
    display: none;
    content: '';
}

.cst-faq__question::after {
    content: '';
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    background: var(--cst-color-navy);
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M7.41 8.59L12 13.17l4.59-4.58L18 10l-6 6-6-6z'/%3E%3C/svg%3E");
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M7.41 8.59L12 13.17l4.59-4.58L18 10l-6 6-6-6z'/%3E%3C/svg%3E");
    mask-size: contain;
    -webkit-mask-size: contain;
    transition: transform var(--cst-transition);
}

.cst-faq__item[open] .cst-faq__question::after {
    transform: rotate(180deg);
}

.cst-faq__question:hover {
    color: var(--cst-color-green-dark);
}

.cst-faq__question:hover::after {
    background: var(--cst-color-green-dark);
}

.cst-faq__answer {
    padding: 0 var(--cst-space-sm) var(--cst-space-lg);
}

.cst-faq__answer p {
    font-size: var(--cst-font-size-sm);
    line-height: 1.7;
    color: var(--cst-color-gray-700);
    margin: 0;
}

/* --- Course Footer CTA --- */

.cst-section--course-footer-cta {
    background: var(--cst-color-gray-100);
    padding-block: var(--cst-space-4xl);
    border-top: 1px solid var(--cst-color-gray-200);
}

.cst-course-footer-cta__header {
    text-align: center;
    margin-bottom: var(--cst-space-3xl);
}

.cst-course-footer-cta__title {
    font-family: var(--cst-font-heading);
    font-size: var(--cst-font-size-2xl);
    font-weight: 700;
    color: var(--cst-color-secondary);
    margin: 0 0 var(--cst-space-xs) 0;
}

.cst-course-footer-cta__subtitle {
    font-size: var(--cst-font-size-lg);
    color: var(--cst-color-gray-500);
    margin: 0;
}

.cst-course-footer-cta__grid {
    display: grid;
    grid-template-columns: 3fr 2fr;
    gap: var(--cst-space-2xl);
    align-items: start;
    max-width: 1000px;
    margin-inline: auto;
}

/* Form card */
.cst-course-footer-cta__form {
    background: var(--cst-color-white);
    padding: var(--cst-space-2xl);
    border-radius: var(--cst-border-radius-lg);
    border: 1px solid var(--cst-color-gray-200);
    box-shadow: var(--cst-shadow-md);
}

.cst-course-footer-cta__form h3 {
    font-family: var(--cst-font-heading);
    font-size: var(--cst-font-size-xl);
    font-weight: 700;
    color: var(--cst-color-secondary);
    margin: 0 0 var(--cst-space-lg) 0;
}

/* Info panel */
.cst-course-footer-cta__info {
    padding: var(--cst-space-xl);
    background: var(--cst-color-white);
    border: 1px solid var(--cst-color-gray-200);
    border-radius: var(--cst-border-radius-lg);
    box-shadow: var(--cst-shadow-md);
    position: sticky;
    top: var(--cst-space-xl);
}

.cst-course-footer-cta__contact {
    margin-bottom: var(--cst-space-lg);
}

.cst-course-footer-cta__contact-item {
    display: flex;
    align-items: center;
    gap: var(--cst-space-sm);
    margin-bottom: var(--cst-space-sm);
    color: var(--cst-color-gray-700);
}

.cst-course-footer-cta__contact-item svg {
    flex-shrink: 0;
    color: var(--cst-color-green-dark);
}

.cst-course-footer-cta__contact-item a {
    color: var(--cst-color-green-dark);
    text-decoration: none;
    font-weight: 500;
}

.cst-course-footer-cta__contact-item a:hover,
.cst-course-footer-cta__contact-item a:focus {
    text-decoration: underline;
}

.cst-course-footer-cta__disclaimer {
    padding: var(--cst-space-md);
    margin-bottom: var(--cst-space-lg);
    background: var(--cst-color-gray-100);
    border-radius: var(--cst-border-radius);
    border-left: 3px solid var(--cst-color-gray-400);
}

.cst-course-footer-cta__disclaimer p {
    font-size: var(--cst-font-size-xs);
    line-height: 1.6;
    color: var(--cst-color-gray-500);
    margin: 0;
}

.cst-course-footer-cta__info .cst-btn {
    width: 100%;
    text-align: center;
    justify-content: center;
}

/* --- Course Landing Responsive --- */

@media (max-width: 768px) {
    .cst-course-impact__grid {
        grid-template-columns: 1fr;
        gap: var(--cst-space-xl);
    }

    .cst-course-impact__callouts {
        grid-template-columns: 1fr;
    }

    .cst-course-cards__grid {
        grid-template-columns: 1fr;
    }

    .cst-course-card:hover {
        transform: none;
    }

    .cst-course-footer-cta__grid {
        grid-template-columns: 1fr;
        gap: var(--cst-space-xl);
    }

    .cst-course-footer-cta__form {
        padding: var(--cst-space-xl);
    }

    .cst-course-footer-cta__info {
        position: static;
    }
}

/* ==========================================================================
   Tutor LMS — Portal Design Integration
   ========================================================================== */

/* --- Course listing & single course pages --- */

.tutor-wrap {
    font-family: var(--cst-font-body);
    padding-bottom: var(--cst-space-4xl);
}

/* Hide wishlist, share, and "Sin categoría" on single course */
.tutor-course-details-actions,
.tutor-course-wishlist-btn,
.tutor-course-share-btn,
.tutor-course-details-info {
    display: none;
}

.tutor-wrap h1,
.tutor-wrap h2,
.tutor-wrap h3,
.tutor-wrap h4 {
    font-family: var(--cst-font-heading);
    color: var(--cst-color-navy);
}

/* Primary button overrides */
.tutor-btn-primary,
.tutor-button.tutor-success,
.tutor-btn.tutor-btn-primary {
    background-color: var(--cst-color-green-dark);
    border-color: var(--cst-color-green-dark);
    font-family: var(--cst-font-heading);
    font-weight: 600;
    border-radius: var(--cst-border-radius);
    transition: background-color var(--cst-transition), box-shadow var(--cst-transition);
}

.tutor-btn-primary:hover,
.tutor-button.tutor-success:hover,
.tutor-btn.tutor-btn-primary:hover {
    background-color: var(--cst-color-navy);
    border-color: var(--cst-color-navy);
}

.tutor-btn-primary:focus-visible,
.tutor-btn.tutor-btn-primary:focus-visible {
    outline: 3px solid var(--cst-color-focus);
    outline-offset: 2px;
}

/* Course card styling */
.tutor-course-card,
.tutor-card {
    border-radius: var(--cst-border-radius-lg);
    border: 1px solid var(--cst-color-gray-200);
    box-shadow: var(--cst-shadow-sm);
    transition: box-shadow var(--cst-transition), transform var(--cst-transition);
}

.tutor-course-card:hover,
.tutor-card:hover {
    box-shadow: var(--cst-shadow-md);
    transform: translateY(-2px);
}

/* Enrollment box */
.tutor-single-course-sidebar .tutor-card {
    border-radius: var(--cst-border-radius-lg);
    overflow: hidden;
}

/* Course progress bar */
.tutor-progress-bar .tutor-progress-value {
    background-color: var(--cst-color-green);
}

/* Course curriculum / lesson list */
.tutor-accordion-item {
    border-color: var(--cst-color-gray-200);
}

.tutor-accordion-item-header {
    font-family: var(--cst-font-heading);
    font-weight: 600;
    color: var(--cst-color-navy);
}

/* Star rating */
.tutor-ratings .tutor-ratings-stars {
    color: var(--cst-color-green-dark);
}

/* Login/registration forms within Tutor */
.tutor-form-wrap input[type="text"],
.tutor-form-wrap input[type="email"],
.tutor-form-wrap input[type="password"],
.tutor-form-wrap select,
.tutor-form-wrap textarea {
    border: 1px solid var(--cst-color-gray-300);
    border-radius: var(--cst-border-radius);
    padding: var(--cst-space-sm) var(--cst-space-md);
    font-family: var(--cst-font-body);
    font-size: var(--cst-font-size-base);
    transition: border-color var(--cst-transition), box-shadow var(--cst-transition);
}

.tutor-form-wrap input:focus,
.tutor-form-wrap select:focus,
.tutor-form-wrap textarea:focus {
    border-color: var(--cst-color-blue);
    box-shadow: 0 0 0 3px var(--cst-alpha-blue-15);
    outline: none;
}

/* Certificate page */
.tutor-certificate-template {
    font-family: var(--cst-font-heading);
}

/* Responsive — Tutor LMS grids */
@media (max-width: 768px) {
    .tutor-course-card:hover {
        transform: none;
    }
}

/* ==========================================================================
   Course Disclaimer (centered, full-width, just above site footer)
   ========================================================================== */
.cst-course-disclaimer {
    background: var(--cst-color-gray-100, #F8F9FA);
    padding: var(--cst-space-xl, 2rem) var(--cst-space-md, 1rem);
    border-top: 1px solid var(--cst-color-gray-300, #DEE2E6);
}

.cst-course-disclaimer__card {
    max-width: 820px;
    margin: 0 auto;
    background: #ffffff;
    border: 1px solid var(--cst-color-gray-300, #DEE2E6);
    border-left: 4px solid var(--cst-color-primary, #7FA35B);
    border-radius: 6px;
    padding: var(--cst-space-lg, 1.5rem) var(--cst-space-xl, 2rem);
    box-shadow: 0 2px 8px rgba(28, 40, 84, 0.04);
}

.cst-course-disclaimer__text {
    margin: 0;
    text-align: center;
    font-family: var(--cst-font-body, 'Open Sans', system-ui, sans-serif);
    font-size: 0.875rem;
    line-height: 1.6;
    color: var(--cst-color-text-muted, #6C757D);
}

@media (max-width: 768px) {
    .cst-course-disclaimer__card {
        padding: var(--cst-space-md, 1rem) var(--cst-space-lg, 1.5rem);
    }
    .cst-course-disclaimer__text {
        font-size: 0.8125rem;
        text-align: left;
    }
}

/* --- Línea PAS safety notice --- */

.cst-course-safety {
    padding: var(--cst-space-xl, 2rem) var(--cst-space-md, 1rem);
}

.cst-course-safety__card {
    max-width: 820px;
    margin: 0 auto;
    display: flex;
    align-items: flex-start;
    gap: var(--cst-space-md, 1rem);
    background: var(--cst-color-navy, #1C2854);
    color: #ffffff;
    border-radius: 10px;
    padding: var(--cst-space-lg, 1.5rem) var(--cst-space-xl, 2rem);
    box-shadow: 0 4px 16px rgba(28, 40, 84, 0.12);
}

.cst-course-safety__icon {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;
}

.cst-course-safety__body {
    flex: 1;
}

.cst-course-safety__title {
    margin: 0 0 0.25rem;
    font-family: var(--cst-font-heading, 'Montserrat', system-ui, sans-serif);
    font-weight: 700;
    font-size: 1.0625rem;
    color: #ffffff;
}

.cst-course-safety__text {
    margin: 0;
    font-family: var(--cst-font-body, 'Open Sans', system-ui, sans-serif);
    font-size: 0.9375rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.9);
}

.cst-course-safety__phone {
    color: #ffffff;
    font-weight: 700;
    text-decoration: underline;
    white-space: nowrap;
}

.cst-course-safety__phone:hover,
.cst-course-safety__phone:focus-visible {
    color: var(--cst-color-green-light, #C5DEB0);
}

@media (max-width: 768px) {
    .cst-course-safety__card {
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: var(--cst-space-md, 1rem) var(--cst-space-lg, 1.5rem);
    }
}

/* ==========================================================================
   Course Hero — Ken Burns motion (subtle slow zoom + drift)
   Applies only to the course landing page hero. Honors reduced-motion.
   ========================================================================== */
.cst-hero--course {
    /* Hide the inline background-image set in PHP; the animated ::before
       (which mirrors the same asset) is what the user sees. */
    background-image: none !important;
}

/* When a hero video is rendered, suppress the Ken Burns ::before since the
   video provides its own motion. */
.cst-hero--has-video::before {
    content: none !important;
}

.cst-hero__video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    z-index: 0;
    pointer-events: none;
    /* Hint to the browser this layer is composited. */
    will-change: transform;
}

/* For users who prefer reduced motion, hide the video and let the poster
   image (set via the <section> background or <video poster>) carry the visual. */
@media (prefers-reduced-motion: reduce) {
    .cst-hero__video {
        display: none;
    }
    .cst-hero--has-video {
        background-size: cover;
        background-position: center;
    }
}

.cst-hero--course::before {
    content: '';
    position: absolute;
    inset: -4%; /* slight overscan so scaling never reveals edges */
    background-image: url('../images/hero-bg.jpg');
    background-size: cover;
    background-position: center;
    transform-origin: center center;
    z-index: 0;
    animation: cst-hero-kenburns 28s ease-in-out infinite alternate;
    will-change: transform;
}

/* Keep overlay, decorative shapes, illustration, and wave above the animated
   ::before background layer. These elements already have their own positioning
   (absolute), so only the z-index is set here so we don't disrupt their layout. */
.cst-hero--course .cst-hero__overlay,
.cst-hero--course .cst-hero__float,
.cst-hero--course .cst-hero__illustration,
.cst-hero--course .cst-hero__wave {
    z-index: 1;
}

.cst-hero--course .cst-container,
.cst-hero--course .cst-hero__content {
    position: relative;
    z-index: 2;
}

@keyframes cst-hero-kenburns {
    0% {
        transform: scale(1.0) translate3d(0, 0, 0);
    }
    50% {
        transform: scale(1.06) translate3d(-1.5%, -1%, 0);
    }
    100% {
        transform: scale(1.04) translate3d(1.5%, 1%, 0);
    }
}

@media (prefers-reduced-motion: reduce) {
    .cst-hero--course::before {
        animation: none;
        transform: none;
        inset: 0;
    }
}

/* ==========================================================================
   Login page (Tutor Login / page-id-614): hide duplicate page title.
   The shortcode renders its own H1 ("Acceso al Curso") inside the card.
   ========================================================================== */
.page-id-614 .entry-header,
.page-id-614 .entry-title {
    display: none;
}

/* ==========================================================================
   Course Footer CTA — enrollment block (willai pattern)
   ========================================================================== */
.cst-course-footer-cta__enroll {
    background: #ffffff;
    border: 1px solid var(--cst-color-gray-300, #DEE2E6);
    border-top: 4px solid var(--cst-color-primary, #7FA35B);
    border-radius: 8px;
    padding: var(--cst-space-xl, 2rem);
    box-shadow: 0 4px 16px rgba(28, 40, 84, 0.06);
}

.cst-course-footer-cta__enroll-heading {
    font-family: var(--cst-font-heading, 'Montserrat', sans-serif);
    font-size: var(--cst-font-size-xl, 1.5rem);
    font-weight: 700;
    color: var(--cst-color-secondary, #1C2854);
    margin: 0 0 var(--cst-space-sm, 0.5rem);
    line-height: 1.25;
}

.cst-course-footer-cta__enroll-lead {
    color: var(--cst-color-text, #212529);
    line-height: 1.6;
    margin: 0 0 var(--cst-space-lg, 1.5rem);
}

.cst-course-footer-cta__bullets {
    list-style: none;
    margin: 0 0 var(--cst-space-lg, 1.5rem);
    padding: 0;
    display: grid;
    gap: var(--cst-space-sm, 0.5rem);
}

.cst-course-footer-cta__bullets li {
    display: flex;
    align-items: flex-start;
    gap: var(--cst-space-sm, 0.5rem);
    color: var(--cst-color-gray-700, #495057);
    font-size: var(--cst-font-size-base, 1rem);
}

.cst-course-footer-cta__bullets svg {
    flex-shrink: 0;
    color: var(--cst-color-primary, #7FA35B);
    margin-top: 3px;
}

.cst-course-footer-cta__actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--cst-space-sm, 0.5rem);
    margin-bottom: var(--cst-space-md, 1rem);
}

.cst-course-footer-cta__actions .cst-btn--lg {
    padding: 0.875rem 1.75rem;
    font-size: 1.0625rem;
    font-weight: 600;
}

@media (max-width: 480px) {
    .cst-course-footer-cta__actions .cst-btn {
        width: 100%;
        justify-content: center;
    }
}

/* ==========================================================================
   Course Pillars — "¿En qué consiste este curso?"
   Centered intro on top, three full-width benefit cards in a row below.
   ========================================================================== */
.cst-section--pillars {
    background: var(--cst-color-gray-100, #F8F9FA);
    padding-block: clamp(3.5rem, 8vw, 6rem);
}

.cst-section--pillars > .cst-container {
    max-width: 1180px;
}

.cst-pillars__intro {
    max-width: 760px;
    margin: 0 auto var(--cst-space-2xl, 3rem);
    text-align: center;
}

.cst-pillars__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--cst-font-body, 'Open Sans', sans-serif);
    font-size: 0.8125rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    color: var(--cst-color-primary, #7FA35B);
    margin-bottom: var(--cst-space-md, 1rem);
}

.cst-pillars__eyebrow-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: currentColor;
}

.cst-pillars__title {
    font-family: var(--cst-font-heading, 'Montserrat', sans-serif);
    font-size: clamp(1.75rem, 3.6vw, 2.5rem);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.01em;
    color: var(--cst-color-secondary, #1C2854);
    margin: 0 0 var(--cst-space-md, 1rem);
}

.cst-pillars__lead {
    font-size: 1.0625rem;
    line-height: 1.65;
    color: var(--cst-color-gray-700, #495057);
    margin: 0;
}

.cst-pillars__lead strong {
    color: var(--cst-color-secondary, #1C2854);
    font-weight: 700;
}

.cst-pillars__grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 1.5rem;
}

@media (min-width: 760px) {
    .cst-pillars__grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

.cst-pillar-card {
    position: relative;
    background: #ffffff;
    border: 1px solid var(--cst-color-gray-300, #DEE2E6);
    border-radius: 10px;
    padding: clamp(1.5rem, 2.4vw, 2rem) clamp(1.25rem, 2vw, 1.75rem);
    box-shadow: 0 2px 10px rgba(28, 40, 84, 0.05);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    overflow: hidden;
}

.cst-pillar-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--cst-color-primary, #7FA35B), #A8C580);
}

.cst-pillar-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 28px rgba(28, 40, 84, 0.10);
    border-color: rgba(127, 163, 91, 0.4);
}

.cst-pillar-card__step {
    position: absolute;
    top: 1rem;
    right: 1.25rem;
    font-family: var(--cst-font-heading, 'Montserrat', sans-serif);
    font-size: 0.875rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    color: var(--cst-color-gray-300, #DEE2E6);
}

.cst-pillar-card__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    margin-bottom: 1.25rem;
    color: #ffffff;
    background: var(--cst-color-primary, #7FA35B);
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(127, 163, 91, 0.3);
}

.cst-pillar-card__icon svg {
    width: 28px;
    height: 28px;
}

.cst-pillar-card__title {
    font-family: var(--cst-font-heading, 'Montserrat', sans-serif);
    font-size: 1.1875rem;
    font-weight: 700;
    line-height: 1.3;
    color: var(--cst-color-secondary, #1C2854);
    margin: 0 0 0.625rem;
}

.cst-pillar-card__desc {
    font-size: 0.9375rem;
    line-height: 1.6;
    color: var(--cst-color-gray-700, #495057);
    margin: 0;
}

.cst-pillars__footer {
    display: flex;
    justify-content: center;
    margin-top: var(--cst-space-xl, 2rem);
}

.cst-pillars__cta {
    display: inline-flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0.875rem 1.75rem;
    background: var(--cst-color-secondary, #1C2854);
    color: #ffffff;
    font-family: var(--cst-font-heading, 'Montserrat', sans-serif);
    font-size: 0.9375rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-decoration: none;
    border: 2px solid var(--cst-color-secondary, #1C2854);
    border-radius: 6px;
    transition: background 0.2s ease, transform 0.05s ease;
}

.cst-pillars__cta:hover,
.cst-pillars__cta:focus-visible {
    background: #15204a;
    border-color: #15204a;
    color: #ffffff;
}

.cst-pillars__cta svg { transition: transform 0.2s ease; }
.cst-pillars__cta:hover svg { transform: translateX(3px); }

@media (prefers-reduced-motion: reduce) {
    .cst-pillar-card,
    .cst-pillars__cta,
    .cst-pillars__cta svg { transition: none; }
    .cst-pillar-card:hover { transform: none; }
}

/* Hero eyebrow / kicker — light-navy pill that matches the institutional
   header banner color. */
.cst-hero__eyebrow {
    display: inline-block;
    font-family: var(--cst-font-heading, 'Montserrat', system-ui, sans-serif);
    font-size: clamp(0.8125rem, 1.3vw, 0.9375rem);
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: #ffffff;
    margin: 0 0 var(--cst-space-md, 1rem);
    padding: 0.5rem 1.25rem;
    background: rgba(28, 40, 84, 0.78);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 999px;
    box-shadow: 0 4px 14px rgba(28, 40, 84, 0.35);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

/* ==========================================================================
   Lesson content — 1:1 image variant
   Adding class "cst-img-square" to a lesson <img> renders it inside a 1:1
   box. The image is contained (no distortion), centered, and the source
   file's intrinsic width/height attributes don't override the box.
   ========================================================================== */
img.cst-img-square {
    display: block;
    width: 100%;
    max-width: 560px;
    aspect-ratio: 1 / 1;
    height: auto;
    margin: 1.5rem auto;
    object-fit: contain;
    background: #ffffff;
    border-radius: 8px;
}

/* ==========================================================================
   Mobile institutional header polish (2026-05-13)
   Tightens spacing, scales down seal/title, and drops sticky on small screens.
   ========================================================================== */

@media (max-width: 768px) {
    /* Drop sticky to reclaim vertical space on small screens */
    .cst-institutional-header {
        position: static;
        padding-block: var(--cst-space-sm);
        border-bottom-width: 2px;
    }

    .cst-institutional-header__inner {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        text-align: left;
        gap: var(--cst-space-sm);
    }

    .cst-institutional-header__branding {
        flex-direction: row;
        align-items: center;
        gap: var(--cst-space-sm);
        flex: 1;
        min-width: 0; /* allow title to truncate/wrap inside flex */
    }

    .cst-institutional-header__seal {
        height: 44px;
    }

    .cst-institutional-header__titles {
        text-align: left;
        flex: 1;
        min-width: 0;
    }

    .cst-institutional-header__portal-name {
        font-size: 0.9375rem;      /* 15px */
        line-height: 1.2;
        letter-spacing: 0;
        display: block;
        /* Soft-wrap long titles instead of overflowing */
        overflow-wrap: anywhere;
    }

    .cst-institutional-header__actions {
        flex-direction: row;
        align-items: center;
        gap: var(--cst-space-xs);
        width: auto;
        flex-shrink: 0;
    }

    .cst-lang-switcher__list {
        gap: var(--cst-space-xs);
    }
}

@media (max-width: 480px) {
    .cst-institutional-header {
        padding-block: 0.5rem;
    }

    .cst-institutional-header__inner {
        gap: 0.5rem;
    }

    .cst-institutional-header__branding {
        gap: 0.5rem;
    }

    .cst-institutional-header__seal {
        height: 38px;
    }

    .cst-institutional-header__portal-name {
        font-size: 0.8125rem;     /* 13px */
    }

    /* Tighten the gov banner on very small screens too */
    .cst-gov-banner {
        padding-block: 0.25rem;
        font-size: 0.75rem;
    }

    .cst-gov-banner__text {
        gap: 0.25rem;
        line-height: 1.3;
    }
}

/* ==========================================================================
   Mobile Slide-in Drawer (2026-05-13)
   Converts the GP dropdown nav into a right-side drawer with backdrop.
   Mobile-only; desktop nav is untouched.
   ========================================================================== */

@media (max-width: 768px) {
    /* Make the GP main-navigation a sticky thin bar on mobile so the
       hamburger is always reachable. The institutional header above scrolls away. */
    .main-navigation {
        position: sticky;
        top: 0;
        z-index: 1500;
        background: var(--cst-color-white);
        border-bottom: 1px solid var(--cst-color-gray-200);
        box-shadow: 0 1px 6px var(--cst-alpha-black-10, rgba(0,0,0,0.08));
    }

    .main-navigation .inside-navigation {
        padding-block: 0;
        min-height: 56px;
        display: flex;
        align-items: center;
    }

    /* Backdrop dimmer behind drawer */
    .cst-drawer-backdrop {
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.5);
        opacity: 0;
        pointer-events: none;
        transition: opacity 220ms ease;
        z-index: 9998;
    }

    body.cst-drawer-open .cst-drawer-backdrop {
        opacity: 1;
        pointer-events: auto;
    }

    body.cst-drawer-open {
        overflow: hidden;
    }
    html.cst-drawer-open {
        overflow: hidden;
        /* preserve scrollbar gutter so right edge stays in place during slide-in */
        scrollbar-gutter: stable;
    }

    /* Drawer panel — slide in from right */
    .main-navigation .main-nav {
        position: fixed;
        top: 0;
        right: 0;
        bottom: 0;
        width: min(82vw, 360px);
        max-width: 100vw;
        background: var(--cst-color-white);
        box-shadow: -8px 0 24px var(--cst-alpha-black-20, rgba(0,0,0,0.2));
        border-radius: 0;
        transform: translateX(100%);
        transition: transform 260ms cubic-bezier(0.32, 0.72, 0, 1);
        z-index: 9999;
        overflow-y: auto;
        overscroll-behavior: contain;
        padding: 64px var(--cst-space-lg, 1.25rem) var(--cst-space-xl, 2rem);
    }

    .main-navigation.toggled .main-nav {
        transform: translateX(0);
    }

    /* Reset GP defaults that conflict with drawer layout */
    .main-navigation .main-nav ul {
        flex-direction: column;
        background: transparent;
        margin: 0;
        padding: 0;
        list-style: none;
    }

    .main-navigation .main-nav ul li {
        width: 100%;
        border-bottom: 1px solid var(--cst-color-gray-100);
    }

    .main-navigation .main-nav ul li:last-child {
        border-bottom: none;
    }

    .main-navigation .main-nav ul li a {
        display: block;
        padding: var(--cst-space-md) 0;
        font-size: 1rem;
        font-weight: 600;
        color: var(--cst-color-gray-800);
        text-decoration: none;
        min-height: 48px; /* WCAG 2.5.5 touch target */
    }

    .main-navigation .main-nav ul li a:hover,
    .main-navigation .main-nav ul li a:focus,
    .main-navigation .main-nav ul li.current-menu-item a {
        color: var(--cst-color-primary);
        background: transparent;
    }

    /* Position the menu-toggle (hamburger) at right of the sticky bar */
    #mobile-menu-control-wrapper {
        margin-left: auto;
        padding-inline: var(--cst-space-md);
    }

    /* When drawer is open, raise the hamburger above the backdrop so
       users can find it to close (and X icon is visible). */
    .main-navigation.toggled .menu-toggle {
        position: fixed;
        top: 8px;
        right: 8px;
        z-index: 10000;
        background: var(--cst-color-white);
        box-shadow: 0 2px 8px var(--cst-alpha-black-15, rgba(0,0,0,0.15));
    }

    /* Reduced motion — instant open/close, no slide */
    @media (prefers-reduced-motion: reduce) {
        .main-navigation .main-nav,
        .cst-drawer-backdrop {
            transition: none;
        }
    }
}

/* Defensive — keep desktop behavior unchanged.
   These rules belong to the drawer's mobile context only. */
@media (min-width: 769px) {
    .cst-drawer-backdrop { display: none; }
}

/* ==========================================================================
   Mobile header consolidation (2026-05-13 v2)
   Merges the GP nav bar into the institutional header so there's only ONE
   top bar on mobile: seal + title + lang + hamburger.
   ========================================================================== */

@media (max-width: 768px) {
    /* Hide the standalone GP nav bar; drawer panel still works (fixed position) */
    .main-navigation > .inside-navigation {
        display: none !important;
    }
    .main-navigation {
        position: static;
        border-bottom: none;
        box-shadow: none;
        background: transparent;
    }

    /* Bring back the institutional header as the single sticky top bar */
    .cst-institutional-header {
        position: sticky;
        top: 0;
        z-index: 1500;
        padding-block: 0.5rem;
        box-shadow: 0 1px 6px rgba(0,0,0,0.15);
    }

    /* Lighter language switcher pill — was visually heavy */
    .cst-lang-switcher__list {
        display: flex;
        align-items: center;
        gap: 0;
        background: transparent;
        border: none;
        padding: 0;
        list-style: none;
        margin: 0;
    }

    .cst-lang-switcher__list li {
        display: inline-flex;
        align-items: center;
    }

    .cst-lang-switcher__list li + li::before {
        content: '|';
        margin: 0 0.4rem;
        color: var(--cst-alpha-white-40, rgba(255,255,255,0.4));
    }

    .cst-lang-switcher__list a {
        padding: 0.25rem 0.25rem;
        font-size: 0.8125rem;
        font-weight: 600;
        text-transform: uppercase;
        color: var(--cst-alpha-white-70, rgba(255,255,255,0.7));
        text-decoration: none;
        min-width: 24px;
        text-align: center;
    }

    .cst-lang-switcher__list .current-lang a,
    .cst-lang-switcher__list a[aria-current="true"] {
        color: var(--cst-color-white);
    }

    /* Style the hamburger so it sits in the navy bar */
    .cst-institutional-header .menu-toggle,
    body .main-navigation .menu-toggle {
        background: transparent;
        border: 1.5px solid var(--cst-alpha-white-40, rgba(255,255,255,0.4));
        color: var(--cst-color-white);
    }

    .cst-institutional-header .menu-toggle .cst-hamburger,
    .cst-institutional-header .menu-toggle .cst-hamburger::before,
    .cst-institutional-header .menu-toggle .cst-hamburger::after {
        background: var(--cst-color-white);
    }

    /* When drawer is open, the floating hamburger goes white-bg / dark-icon */
    .main-navigation.toggled .menu-toggle {
        background: var(--cst-color-white);
        border-color: var(--cst-color-gray-300);
    }

    .main-navigation.toggled .menu-toggle .cst-hamburger,
    .main-navigation.toggled .menu-toggle .cst-hamburger::before,
    .main-navigation.toggled .menu-toggle .cst-hamburger::after {
        background: var(--cst-color-gray-700);
    }

    /* Better seal/title balance — make seal slightly bigger; title slightly larger but tight */
    .cst-institutional-header__seal {
        height: 48px;
    }

    .cst-institutional-header__portal-name {
        font-size: 0.9375rem;
        line-height: 1.15;
        max-width: 100%;
    }

    /* Tighten the actions cluster (lang + hamburger) on the right */
    .cst-institutional-header__actions {
        gap: 0.5rem;
        flex-shrink: 0;
    }
}

@media (max-width: 480px) {
    .cst-institutional-header__seal {
        height: 40px;
    }
    .cst-institutional-header__portal-name {
        font-size: 0.8125rem;
    }
    /* Even tighter on phone */
    .cst-institutional-header {
        padding-block: 0.4rem;
    }
}

/* ==========================================================================
   Mobile header v3 — hide redundant title on mobile
   ========================================================================== */
@media (max-width: 768px) {
    /* Seal + hero already identify the portal; hide verbose title to free space */
    .cst-institutional-header__titles {
        display: none;
    }

    .cst-institutional-header__branding {
        flex: 0 0 auto;
    }

    .cst-institutional-header__inner {
        justify-content: space-between;
    }
}

/* ==========================================================================
   Mobile drawer — language switcher styling (2026-05-13 v3)
   ========================================================================== */
@media (max-width: 768px) {
    /* Inside the drawer at the top: pill-style toggle, full-width */
    .cst-lang-switcher--in-drawer {
        display: block;
        margin: 0 0 var(--cst-space-lg, 1.5rem);
        padding: 0;
    }

    .cst-lang-switcher--in-drawer .cst-lang-switcher__list {
        display: inline-flex;
        gap: 0;
        background: var(--cst-color-gray-100);
        border-radius: 999px;
        padding: 0.25rem;
        list-style: none;
        margin: 0;
    }

    .cst-lang-switcher--in-drawer .cst-lang-switcher__list li::before {
        content: none;
    }

    .cst-lang-switcher--in-drawer .cst-lang-switcher__list a {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        padding: 0.5rem 1rem;
        font-size: 0.875rem;
        font-weight: 600;
        text-transform: uppercase;
        color: var(--cst-color-gray-600);
        text-decoration: none;
        border-radius: 999px;
        min-width: 48px;
        min-height: 36px;
    }

    .cst-lang-switcher--in-drawer .cst-lang-switcher__list .current-lang a,
    .cst-lang-switcher--in-drawer .cst-lang-switcher__list a[aria-current="true"] {
        background: var(--cst-color-primary);
        color: var(--cst-color-white);
    }
}

/* ==========================================================================
   Cookie Consent Banner (2026-05-13 v2 — professional / always-on-top)
   Floating card at bottom-left. Sits above EVERYTHING (chatbot, drawer, modals).
   ========================================================================== */

.cst-consent {
    /* Always on top of every other UI layer (chatbot=9999, drawer=9999, menu-toggle=10000) */
    z-index: 2147483640;
    position: fixed;
    left: clamp(12px, 2.5vw, 24px);
    right: clamp(12px, 2.5vw, 24px);
    bottom: clamp(12px, 2.5vw, 24px);
    max-width: 540px;
    background: #ffffff;
    color: #1a2236;
    border-radius: 16px;
    box-shadow:
        0 24px 48px -12px rgba(15, 23, 42, 0.35),
        0 8px 20px -6px rgba(15, 23, 42, 0.18),
        0 0 0 1px rgba(15, 23, 42, 0.04);
    padding: 1.25rem 1.25rem 1.125rem;
    transform: translateY(0) scale(1);
    opacity: 1;
    transition: transform 280ms cubic-bezier(0.16, 1, 0.3, 1), opacity 220ms ease;
    font-family: var(--cst-font-body, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif);
    will-change: transform, opacity;
}

.cst-consent[data-state="hidden"] {
    transform: translateY(24px) scale(0.98);
    opacity: 0;
    pointer-events: none;
}

.cst-consent::before {
    content: "\01f36a";
    position: absolute;
    top: -14px;
    left: 18px;
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, var(--cst-color-primary, #3E64DE), var(--cst-color-blue-dark, #2A4BB0));
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    box-shadow: 0 4px 12px rgba(62, 100, 222, 0.35);
}

.cst-consent__inner {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.cst-consent__copy { margin-top: 0.25rem; }

.cst-consent__title {
    font-family: var(--cst-font-heading, var(--cst-font-body));
    font-size: 1.0625rem;
    font-weight: 700;
    margin: 0 0 0.375rem;
    color: #0f1729;
    letter-spacing: -0.01em;
}

.cst-consent__text {
    font-size: 0.875rem;
    line-height: 1.55;
    color: #475569;
    margin: 0;
}

.cst-consent__link {
    color: var(--cst-color-primary, #3E64DE);
    text-decoration: underline;
    text-underline-offset: 2px;
    margin-left: 0.25rem;
    font-weight: 500;
}

.cst-consent__link:hover { text-decoration-thickness: 2px; }

.cst-consent__actions {
    display: flex;
    gap: 0.5rem;
    flex-shrink: 0;
}

.cst-consent__btn {
    appearance: none;
    border: 0;
    border-radius: 10px;
    padding: 0.6875rem 1.125rem;
    font-family: inherit;
    font-size: 0.875rem;
    font-weight: 600;
    line-height: 1.2;
    cursor: pointer;
    min-height: 44px;
    flex: 1;
    transition: background-color 160ms ease, color 160ms ease, transform 80ms ease;
    letter-spacing: 0.01em;
}

.cst-consent__btn:active { transform: translateY(1px); }

.cst-consent__btn--accept {
    background: linear-gradient(180deg, var(--cst-color-primary, #3E64DE) 0%, var(--cst-color-blue-dark, #2A4BB0) 100%);
    color: #ffffff;
    box-shadow: 0 4px 10px -2px rgba(62, 100, 222, 0.5);
}

.cst-consent__btn--accept:hover,
.cst-consent__btn--accept:focus-visible {
    background: var(--cst-color-blue-dark, #2A4BB0);
}

.cst-consent__btn--reject {
    background: #f1f5f9;
    color: #334155;
    box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.06);
}

.cst-consent__btn--reject:hover,
.cst-consent__btn--reject:focus-visible {
    background: #e2e8f0;
    color: #0f172a;
}

.cst-consent__btn:focus-visible {
    outline: 2px solid var(--cst-color-blue, #3B82C4);
    outline-offset: 3px;
}

@media (min-width: 480px) {
    .cst-consent__inner {
        flex-direction: row;
        align-items: center;
        gap: 1.25rem;
    }
    .cst-consent__copy { flex: 1; }
    .cst-consent__actions { flex-shrink: 0; }
    .cst-consent__btn { flex: 0 0 auto; min-width: 108px; }
}

@media (prefers-reduced-motion: reduce) {
    .cst-consent { transition: opacity 0.15s linear; }
    .cst-consent[data-state="hidden"] { transform: none; }
}

/* ==========================================================================
   Mobile drawer fix (2026-05-13 v4) — preserve drawer panel rendering.
   The .main-nav drawer lives INSIDE .inside-navigation. Using display:none
   on the parent kills the fixed-position drawer too. Instead, collapse the
   wrapper to zero visual size while keeping it in the render tree.
   ========================================================================== */
@media (max-width: 768px) {
    .main-navigation > .inside-navigation {
        display: block !important;
        padding: 0 !important;
        margin: 0 !important;
        min-height: 0 !important;
        height: 0;
        overflow: visible;
    }
    /* Hide stray empty items left in inside-navigation (after toggle was moved out) */
    .main-navigation > .inside-navigation > *:not(.main-nav) {
        display: none !important;
    }
    .main-navigation {
        background: transparent !important;
        border: none !important;
        box-shadow: none !important;
        min-height: 0;
        padding: 0;
    }
}

/* ==========================================================================
   Hamburger toggle centering fix (2026-05-14)
   GeneratePress sets .menu-toggle display:block which kills our flex-center.
   Force flex layout regardless of context.
   ========================================================================== */
.cst-institutional-header .menu-toggle,
.main-navigation .menu-toggle,
button.menu-toggle {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    line-height: 1 !important;
    padding: 0 !important;
}

/* Anchor the hamburger icon dead-center using absolute centering so it can't
   drift even if the sr-only sibling or font-size weirdness creeps in. */
.menu-toggle {
    position: relative;
}
.menu-toggle .cst-hamburger {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    margin: 0;
}
.menu-toggle .cst-hamburger::before {
    transform: translateY(-7px);
    top: 0;
}
.menu-toggle .cst-hamburger::after {
    transform: translateY(7px);
    top: 0;
}

/* X state — keep the rotation symmetric around the icon center */
.main-navigation.toggled .menu-toggle .cst-hamburger::before {
    transform: translateY(0) rotate(45deg);
}
.main-navigation.toggled .menu-toggle .cst-hamburger::after {
    transform: translateY(0) rotate(-45deg);
}

/* ==========================================================================
   Drawer lang switcher fix (2026-05-14) — force horizontal pill toggle.
   Polylang's own CSS adds .lang-item rules that override our display:flex.
   ========================================================================== */

.cst-lang-switcher--in-drawer {
    display: inline-block !important;
    margin: 0 0 1.25rem !important;
    padding: 0 !important;
    background: transparent !important;
    border: none !important;
}

.cst-lang-switcher--in-drawer ul.cst-lang-switcher__list,
.cst-lang-switcher--in-drawer .cst-lang-switcher__list {
    display: inline-flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 0 !important;
    background: #f1f5f9 !important;
    border-radius: 999px !important;
    padding: 0.25rem !important;
    margin: 0 !important;
    list-style: none !important;
    width: auto !important;
}

.cst-lang-switcher--in-drawer .cst-lang-switcher__list > li,
.cst-lang-switcher--in-drawer .cst-lang-switcher__list .lang-item {
    display: inline-flex !important;
    align-items: stretch !important;
    margin: 0 !important;
    padding: 0 !important;
    background: transparent !important;
    border: none !important;
    list-style: none !important;
    width: auto !important;
    flex: 0 0 auto !important;
}

.cst-lang-switcher--in-drawer .cst-lang-switcher__list > li::before,
.cst-lang-switcher--in-drawer .cst-lang-switcher__list .lang-item::before {
    content: none !important;
}

/* Hide Polylang flag images so we only see text */
.cst-lang-switcher--in-drawer .cst-lang-switcher__list img {
    display: none !important;
}

.cst-lang-switcher--in-drawer .cst-lang-switcher__list a {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0.4rem 0.85rem !important;
    min-width: 44px !important;
    min-height: 32px !important;
    font-size: 0.8125rem !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.04em !important;
    color: #475569 !important;
    background: transparent !important;
    text-decoration: none !important;
    border-radius: 999px !important;
    line-height: 1 !important;
    transition: background-color 160ms ease, color 160ms ease;
}

.cst-lang-switcher--in-drawer .cst-lang-switcher__list .current-lang > a,
.cst-lang-switcher--in-drawer .cst-lang-switcher__list a[aria-current="true"] {
    background: var(--cst-color-primary, #3E64DE) !important;
    color: #ffffff !important;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.15);
}

.cst-lang-switcher--in-drawer .cst-lang-switcher__list a:hover,
.cst-lang-switcher--in-drawer .cst-lang-switcher__list a:focus-visible {
    color: #0f172a !important;
}

/* ==========================================================================
   Modern drawer menu (2026-05-14) — non-scrolling, modern visual style.
   Replaces the old "list with separator lines" look with a tighter, card-feel.
   ========================================================================== */

@media (max-width: 768px) {
    /* Drawer panel — no scroll; collapse padding to fit all items */
    .main-navigation .main-nav {
        overflow: hidden !important; /* No scrolling — items must fit */
        padding: 72px 1rem 1.25rem !important;
        display: flex !important;
        flex-direction: column !important;
        gap: 0.25rem;
    }

    /* Nav list — flex column, no separator dividers */
    .main-navigation .main-nav ul.menu,
    .main-navigation .main-nav > ul,
    .main-navigation .main-nav ul {
        display: flex !important;
        flex-direction: column !important;
        gap: 0.25rem !important;
        margin: 0 !important;
        padding: 0 !important;
        list-style: none !important;
        background: transparent !important;
    }

    .main-navigation .main-nav ul li,
    .main-navigation .main-nav ul .menu-item {
        border: none !important;         /* kill separator lines */
        border-bottom: none !important;
        margin: 0 !important;
        padding: 0 !important;
        background: transparent !important;
        width: 100%;
    }

    .main-navigation .main-nav ul li a {
        display: flex !important;
        align-items: center !important;
        gap: 0.75rem;
        padding: 0.75rem 0.875rem !important;
        font-size: 1rem !important;
        font-weight: 600 !important;
        line-height: 1.2 !important;
        color: #1e293b !important;
        background: transparent !important;
        border-radius: 12px !important;
        text-decoration: none !important;
        transition: background-color 140ms ease, color 140ms ease;
        min-height: 44px;
    }

    .main-navigation .main-nav ul li a:hover,
    .main-navigation .main-nav ul li a:focus-visible {
        background: #f1f5f9 !important;
        color: #0f172a !important;
    }

    /* Current page — filled pill with brand accent */
    .main-navigation .main-nav ul li.current-menu-item > a,
    .main-navigation .main-nav ul li.current_page_item > a {
        background: linear-gradient(135deg,
            color-mix(in oklab, var(--cst-color-primary, #3E64DE) 14%, white),
            color-mix(in oklab, var(--cst-color-primary, #3E64DE) 6%, white)) !important;
        color: var(--cst-color-primary, #3E64DE) !important;
    }

    /* Arrow indicator on the right of each link — modern affordance */
    .main-navigation .main-nav ul li a::after {
        content: "›";
        margin-left: auto;
        font-size: 1.25rem;
        color: #94a3b8;
        font-weight: 400;
        line-height: 1;
        transition: transform 180ms ease, color 180ms ease;
    }

    .main-navigation .main-nav ul li a:hover::after,
    .main-navigation .main-nav ul li.current-menu-item > a::after {
        color: var(--cst-color-primary, #3E64DE);
        transform: translateX(3px);
    }
}

@media (max-width: 480px) {
    .main-navigation .main-nav ul li a {
        padding: 0.625rem 0.75rem !important;
        font-size: 0.9375rem !important;
    }
    .main-navigation .main-nav {
        padding: 64px 0.875rem 1rem !important;
    }
}

/* On very short viewports (≤640px tall), tighten further so nothing scrolls */
@media (max-width: 768px) and (max-height: 640px) {
    .main-navigation .main-nav ul li a {
        padding: 0.5rem 0.75rem !important;
        font-size: 0.875rem !important;
        min-height: 38px;
    }
    .cst-lang-switcher--in-drawer {
        margin-bottom: 0.75rem !important;
    }
}

/* ==========================================================================
   Hamburger ↔ X state fix (2026-05-14)
   The toggle button lives in the institutional header (moved by JS), so the
   old `.main-navigation.toggled .cst-hamburger` selector no longer reaches it.
   Use body.cst-drawer-open instead — that class is set by initMobileDrawer.
   ========================================================================== */

/* Default: middle bar visible (set elsewhere) */
body.cst-drawer-open .cst-hamburger {
    background: transparent !important; /* hide middle bar to form a clean X */
}

body.cst-drawer-open .cst-hamburger::before {
    transform: translateY(0) rotate(45deg) !important;
    top: 0 !important;
    background: var(--cst-color-gray-700) !important;
}

body.cst-drawer-open .cst-hamburger::after {
    transform: translateY(0) rotate(-45deg) !important;
    top: 0 !important;
    background: var(--cst-color-gray-700) !important;
}

/* The toggle button itself when drawer is open — slight visual cue (rounded white) */
body.cst-drawer-open .menu-toggle {
    background: #ffffff !important;
    border-color: var(--cst-color-gray-300, #c8ced8) !important;
}

/* Dedicated close button inserted by JS — positioned at top-right of the drawer */
.cst-drawer-close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 40px;
    height: 40px;
    border: none;
    background: #f1f5f9;
    color: #334155;
    border-radius: 999px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 5;
    transition: background-color 140ms ease, color 140ms ease, transform 140ms ease;
}

.cst-drawer-close:hover,
.cst-drawer-close:focus-visible {
    background: #e2e8f0;
    color: #0f172a;
    transform: scale(1.05);
}

.cst-drawer-close::before,
.cst-drawer-close::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 2px;
    background: currentColor;
    border-radius: 2px;
}

.cst-drawer-close::before { transform: rotate(45deg); }
.cst-drawer-close::after { transform: rotate(-45deg); }

/* ==========================================================================
   Drawer fixes — patch 2 (2026-05-14)
   1. Re-elevate lang-switcher pill above modern-menu's flex-column rule
   2. Strip the › arrow from lang-switcher links
   3. Hamburger → X based on aria-expanded (no body class dependency)
   ========================================================================== */

@media (max-width: 768px) {
    /* Restore lang switcher horizontal layout — beat the modern-menu rule */
    .main-nav .cst-lang-switcher--in-drawer ul.cst-lang-switcher__list,
    .main-nav .cst-lang-switcher--in-drawer .cst-lang-switcher__list {
        flex-direction: row !important;
        display: inline-flex !important;
        background: #f1f5f9 !important;
        gap: 0 !important;
        padding: 0.25rem !important;
        border-radius: 999px !important;
    }

    /* No arrow on lang-switcher anchors */
    .cst-lang-switcher--in-drawer .cst-lang-switcher__list a::after,
    .cst-lang-switcher--in-drawer a::after,
    .main-nav .cst-lang-switcher__list a::after {
        content: none !important;
        display: none !important;
    }

    /* Lang switcher li shouldn't have block layout from modern-menu rule */
    .cst-lang-switcher--in-drawer .cst-lang-switcher__list > li,
    .cst-lang-switcher--in-drawer .cst-lang-switcher__list .lang-item {
        display: inline-flex !important;
        width: auto !important;
        flex: 0 0 auto !important;
        gap: 0 !important;
    }

    .cst-lang-switcher--in-drawer .cst-lang-switcher__list a {
        padding: 0.4rem 0.85rem !important;
        gap: 0 !important;
    }
}

/* Hamburger → X using aria-expanded (set by toggle click handler).
   Works regardless of DOM location (institutional header, drawer panel, etc.) */
.menu-toggle[aria-expanded="true"] .cst-hamburger {
    background: transparent !important;
}

.menu-toggle[aria-expanded="true"] .cst-hamburger::before {
    transform: translateY(0) rotate(45deg) !important;
    top: 0 !important;
    background: var(--cst-color-gray-700, #495057) !important;
}

.menu-toggle[aria-expanded="true"] .cst-hamburger::after {
    transform: translateY(0) rotate(-45deg) !important;
    top: 0 !important;
    background: var(--cst-color-gray-700, #495057) !important;
}

/* ==========================================================================
   Stats page tab strip — horizontal scroll on mobile (2026-05-14)
   ========================================================================== */
@media (max-width: 768px) {
    .cst-filter-tabs {
        margin-inline: 0;
        padding-inline: 0;
    }
    .cst-filter-tabs__list {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: wrap !important;
        justify-content: center !important;
        gap: 0.375rem;
        padding-bottom: 0;
    }
    .cst-filter-tabs__btn {
        flex: 0 0 auto !important;
        white-space: nowrap;
        width: auto !important;
        text-align: center;
        padding: 0.5rem 0.875rem !important;
        font-size: 0.875rem !important;
    }
}

/* Override the <480px column rule from earlier mobile block */
@media (max-width: 480px) {
    .cst-filter-tabs__list {
        flex-direction: row !important;
    }
    .cst-filter-tabs__btn {
        width: auto !important;
    }
}

/* Remove the floating drawer-close button — X-from-hamburger handles it */
.cst-drawer-close {
    display: none !important;
}

/* ==========================================================================
   Prevent scrollbar-driven layout shift (2026-05-14)
   Always reserve the vertical scrollbar gutter so opening the drawer
   (which sets overflow:hidden) doesn't shift content rightward.
   ========================================================================== */
html,
body {
    scrollbar-gutter: stable;
}

/* ==========================================================================
   Pin hamburger toggle so it cannot move when clicked (2026-05-14)
   GeneratePress collapses .mobile-menu-control-wrapper.toggled (width 80→32,
   height 48→0), which yanks the button rightward and downward. Lock the
   wrapper to a fixed 48x48 box regardless of the .toggled state, and pin
   the button to fill it. Also force the button to keep the SAME look open
   vs closed — earlier rules switched it to a white box with a drop shadow,
   which the user does not want.
   ========================================================================== */
@media (max-width: 768px) {
    .cst-institutional-header__actions #mobile-menu-control-wrapper,
    .cst-institutional-header__actions #mobile-menu-control-wrapper.toggled {
        width: 48px !important;
        height: 48px !important;
        min-width: 48px !important;
        min-height: 48px !important;
        max-width: 48px !important;
        max-height: 48px !important;
        flex: 0 0 48px !important;
        padding: 0 !important;
        margin: 0 !important;
        overflow: visible !important;
        position: relative !important;
        background: transparent !important;
        border: none !important;
        box-shadow: none !important;
    }

    /* Toggle button fills the wrapper box and stays put, in both states. */
    .cst-institutional-header__actions #mobile-menu-control-wrapper .menu-toggle,
    .cst-institutional-header__actions #mobile-menu-control-wrapper.toggled .menu-toggle,
    body .main-navigation.toggled .menu-toggle {
        position: absolute !important;
        inset: 0 !important;
        top: 0 !important;
        right: 0 !important;
        left: auto !important;
        bottom: auto !important;
        width: 48px !important;
        height: 48px !important;
        margin: 0 !important;
        padding: 0 !important;
        /* Match closed-state look: transparent over navy, white outline, no shadow */
        background: transparent !important;
        background-color: transparent !important;
        border: 1.5px solid var(--cst-alpha-white-40, rgba(255,255,255,0.4)) !important;
        border-color: var(--cst-alpha-white-40, rgba(255,255,255,0.4)) !important;
        box-shadow: none !important;
        z-index: auto !important;
    }

}

/* ==========================================================================
   Hide hamburger "Menu" button on desktop (2026-05-14)
   The drawer toggle is for responsive small screens only (≤768px). On desktop
   the full horizontal nav is visible, so "☰ Menu" is redundant.
   ========================================================================== */
@media (min-width: 769px) {
    body .cst-institutional-header .menu-toggle,
    body .main-navigation .menu-toggle,
    body button.menu-toggle,
    body .menu-toggle,
    body #mobile-menu-control-wrapper {
        display: none !important;
    }
}

/* ==========================================================================
   Hide CookieYes "Revisit Consent" floating button (2026-05-14)
   The small circular widget anchored bottom-left that lets users re-open
   the cookie preferences. The visitor already accepted/rejected during the
   banner flow; we don't want a persistent floating pill cluttering the UI.
   ========================================================================== */
.cky-revisit-bottom-left,
.cky-revisit-bottom-right,
.cky-btn-revisit-wrapper,
#cookie-law-info-bar-revisit,
.cli-modal-backdrop ~ .cky-consent-bar,
.cky-consent-bar.cky-revisit-anchor {
    display: none !important;
    visibility: hidden !important;
}
