/* S4B — Design tokens */
:root {
    --s4b-red: #D93025;
    --s4b-red-hover: #B71C1C;
    --s4b-dark: #1a1a1a;
    --s4b-dark-bg: #0f1923;
    --s4b-dark-border: #1e2a36;
    --s4b-grey: #666;
    --s4b-grey-light: #999;
    --s4b-grey-lighter: #e0e0e0;
    --s4b-blue: #0066cc;
    --s4b-blue-hover: #004499;
    --s4b-blue-light: #6ea8fe;
    --s4b-font: system-ui, -apple-system, sans-serif;
    --s4b-font-brand: 'Montserrat', system-ui, sans-serif;
}

/* Code blocks */
pre {
    background: var(--s4b-slate-100); color: var(--s4b-slate-950);
    padding: 1rem 1.25rem;
    border-radius: 0.5rem; overflow-x: auto; font-size: 0.875rem;
    line-height: 1.6; margin: 1rem 0;
    border: 1px solid var(--s4b-slate-200);
}
code {
    font-family: 'JetBrains Mono', 'Fira Code', 'Cascadia Code', monospace;
    font-size: 0.9em;
}
:not(pre) > code {
    background: #f1f5f9; color: #0f172a; padding: 0.15em 0.4em;
    border-radius: 0.25rem; font-size: 0.85em;
}
pre a {
    color: var(--s4b-red); text-decoration: underline;
}

/* Utility classes */
.s4b-red { color: var(--s4b-red); }
.s4b-red-hover:hover { color: var(--s4b-red-hover); }
.s4b-blue { color: var(--s4b-blue); }
.s4b-dark { color: var(--s4b-dark); }
.s4b-brand { font-family: var(--s4b-font-brand); font-weight: 700; color: var(--s4b-red); }
.s4b-link { color: var(--s4b-red); text-decoration: none; transition: color .2s; }
.s4b-link:hover { color: var(--s4b-red-hover); }

/* Base styles */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: var(--s4b-font);
    line-height: 1.6;
    color: var(--s4b-dark);
}

/* Header */
header {
    border-bottom: 1px solid #e0e0e0;
    background: #fff;
    position: sticky;
    top: 0;
    z-index: 100;
    transition: padding .3s ease, box-shadow .3s ease;
}

header.scrolled {
    padding: 0;
    box-shadow: 0 2px 8px rgba(0,0,0,.08);
}

header.scrolled .header-inner { padding-top: .4rem; padding-bottom: .4rem; }
header.scrolled .logo { font-size: 1.1rem; }

.header-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: .75rem 1rem;
    display: flex;
    align-items: center;
    gap: 2rem;
}

.logo { font-size: 1.4rem; }
.logo a { color: var(--s4b-red); text-decoration: none; font-weight: 700; font-family: var(--s4b-font-brand); letter-spacing: .02em; display: flex; align-items: center; gap: .4rem; }
.logo-img { height: 1.6rem; width: auto; }

.main-nav {
    display: flex;
    gap: 1.5rem;
    flex: 1;
}
.main-nav a {
    text-decoration: none;
    color: #444;
    font-size: .95rem;
    padding: .25rem 0;
    border-bottom: 2px solid transparent;
    transition: border-color .2s;
}
.main-nav a:hover,
.main-nav a.active { border-bottom-color: var(--s4b-red); color: var(--s4b-red); }

.lang-nav {
    display: flex;
    gap: .25rem;
    margin-left: auto;
}
.lang-link {
    display: inline-flex;
    align-items: center;
    padding: .2rem;
    border-radius: 3px;
    text-decoration: none;
    transition: background .2s, transform .15s;
}
.lang-link:hover { background: #f0f0f0; transform: scale(1.1); }
.lang-link.active { background: #1a1a1a; }
/* .made-in-eu moved to footer section */
/* .heart and .flag-icon--footer replaced by .made-in-eu__heart and .made-in-eu__flag */
.flag-icon {
    width: 22px;
    height: 15px;
    object-fit: cover;
    border-radius: 2px;
    border: 1px solid rgba(0,0,0,.12);
    display: block;
}

/* === Landing page sections === */
:root {
    --s4b-font-display: 'Fraunces', Georgia, serif;
    --s4b-font-body: 'DM Sans', system-ui, sans-serif;
    --s4b-slate-950: #0f172a;
    --s4b-slate-600: #64748b;
    --s4b-slate-400: #94a3b8;
    --s4b-slate-200: #e2e8f0;
    --s4b-slate-100: #f1f5f9;
    --s4b-slate-50: #f8fafc;
    --s4b-red-glow: rgba(217, 48, 37, 0.07);
    --s4b-red-10: rgba(217, 48, 37, 0.10);
}

/* Agentic AI intro */
.s4b-agentic {
    text-align: center;
    padding: 4rem 0 2rem;
}
.s4b-agentic .s4b-section-title {
    font-family: var(--s4b-font-display);
    font-size: 1.4rem;
    font-weight: 400;
    color: var(--s4b-slate-600);
    letter-spacing: .02em;
    margin-bottom: 1.5rem;
}
.s4b-agentic-text {
    font-size: 1.1rem;
    color: var(--s4b-slate-600);
    line-height: 1.8;
    max-width: 680px;
    margin: 0 auto;
}
.s4b-agentic-text strong { color: var(--s4b-red); }

/* Hero */
.s4b-hero { padding: 2rem 0 3rem; text-align: center; }
.s4b-hero-badge {
    display: inline-flex; align-items: center; gap: .5rem;
    background: var(--s4b-red-glow); border: 1px solid var(--s4b-red-10);
    padding: .35rem 1rem; border-radius: 100px;
    font-size: .8rem; font-weight: 600; color: var(--s4b-red);
    margin-bottom: 2rem; letter-spacing: .02em;
}
.s4b-hero-badge::before {
    content: ''; width: 6px; height: 6px; background: var(--s4b-red);
    border-radius: 50%; animation: s4bPulse 2s ease-in-out infinite;
}
@keyframes s4bPulse { 0%, 100% { opacity: 1; } 50% { opacity: .3; } }

.s4b-hero h2 {
    font-family: var(--s4b-font-display); font-size: 3rem; font-weight: 500;
    line-height: 1.12; letter-spacing: -.03em; color: var(--s4b-slate-950); margin-bottom: 1.5rem;
}
.s4b-hero h2 em { font-style: italic; color: var(--s4b-red); font-weight: 300; }
.s4b-hero-sub {
    font-size: 1.15rem; color: var(--s4b-slate-600); line-height: 1.7;
    max-width: 620px; margin: 0 auto 2.5rem;
}
.s4b-hero-actions { display: flex; gap: 1rem; align-items: center; justify-content: center; flex-wrap: wrap; }
.s4b-btn-primary {
    background: var(--s4b-red); color: #fff; padding: .9rem 2.2rem; border-radius: 8px;
    font-size: .95rem; font-weight: 600; text-decoration: none;
    display: inline-flex; align-items: center; gap: .5rem; transition: all .2s;
}
.s4b-btn-primary:hover { background: var(--s4b-red-hover); transform: translateY(-1px); }
.s4b-btn-ghost {
    color: var(--s4b-slate-600); padding: .9rem 1.5rem; font-size: .95rem;
    font-weight: 500; text-decoration: none; transition: color .2s;
}
.s4b-btn-ghost:hover { color: var(--s4b-red); }
.s4b-btn-secondary {
    background: #fff; color: var(--s4b-red); padding: .9rem 2.2rem; border-radius: 8px;
    font-size: .95rem; font-weight: 600; text-decoration: none; border: 2px solid var(--s4b-red);
    display: inline-flex; align-items: center; gap: .5rem; transition: all .2s;
}
.s4b-btn-secondary:hover { background: var(--s4b-red); color: #fff; }

.training-actions { display: flex; gap: 1rem; flex-wrap: wrap; margin-top: .5rem; }

/* Section labels */
.s4b-section-label {
    font-size: .75rem; font-weight: 700; letter-spacing: .12em;
    text-transform: uppercase; color: var(--s4b-red); margin-bottom: .8rem;
}
.s4b-section-title {
    font-family: var(--s4b-font-display); font-size: 2.2rem; font-weight: 500;
    letter-spacing: -.02em; color: var(--s4b-slate-950); margin-bottom: 1rem; line-height: 1.2;
}
.s4b-section-sub {
    font-size: 1.05rem; color: var(--s4b-slate-600); max-width: 560px; line-height: 1.7; margin-bottom: 3rem;
}

/* Questions grid */
.s4b-questions { background: var(--s4b-slate-50); padding: 4rem 0; border-top: 1px solid var(--s4b-slate-200); border-bottom: 1px solid var(--s4b-slate-200); }
.s4b-questions-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.2rem; }
.s4b-qcard {
    background: #fff; border: 1px solid var(--s4b-slate-200); border-radius: 14px;
    padding: 1.8rem; transition: all .3s;
}
.s4b-qcard:hover { border-color: var(--s4b-red-10); box-shadow: 0 6px 24px rgba(217,48,37,.06); transform: translateY(-1px); }
.s4b-qcard-tag {
    display: inline-block; font-size: .7rem; font-weight: 600; padding: .2rem .5rem;
    background: var(--s4b-red-glow); color: var(--s4b-red); border-radius: 4px;
    margin-bottom: .6rem; letter-spacing: .03em;
}
.s4b-qcard-q {
    font-family: var(--s4b-font-display); font-size: 1.1rem; font-weight: 500;
    font-style: italic; color: var(--s4b-slate-950); margin-bottom: .8rem; line-height: 1.4;
}
.s4b-qcard-a { font-size: .9rem; color: var(--s4b-slate-600); line-height: 1.6; }
.s4b-qcard-a strong { color: var(--s4b-red); font-weight: 600; }

/* Facts */
.s4b-facts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 2rem; text-align: center; padding: 4rem 0; }
.s4b-fact-num {
    font-family: var(--s4b-font-display); font-size: 2.8rem; font-weight: 700;
    color: var(--s4b-slate-950); letter-spacing: -.03em; line-height: 1; margin-bottom: .4rem;
}
.s4b-fact-num span { color: var(--s4b-red); }
.s4b-fact-label { font-size: .85rem; color: var(--s4b-slate-600); font-weight: 500; }

/* Approach (dark) */
.s4b-approach { background: var(--s4b-slate-950); padding: 4rem 2rem; border-radius: 16px; margin: 2rem 0; }
.s4b-approach .s4b-section-label { color: #EF5350; }
.s4b-approach .s4b-section-title { color: #fff; }
.s4b-approach .s4b-section-sub { color: var(--s4b-slate-400); }
.s4b-approach-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.s4b-approach-card {
    background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.08);
    border-radius: 16px; padding: 2rem; transition: all .3s;
}
.s4b-approach-card:hover { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.15); }
.s4b-approach-step {
    font-family: var(--s4b-font-display); font-size: 2.5rem; font-weight: 700;
    color: var(--s4b-red); opacity: .6; margin-bottom: 1rem; line-height: 1;
}
.s4b-approach-card h3 { font-family: var(--s4b-font-display); font-size: 1.15rem; font-weight: 500; color: #fff; margin-bottom: .6rem; }
.s4b-approach-card p { font-size: .88rem; color: var(--s4b-slate-400); line-height: 1.65; }

/* CTA Call */
.s4b-cta-call {
    background: var(--s4b-red);
    border-radius: 16px;
    margin: 2rem 0;
    padding: 3rem 2rem;
    text-align: center;
}
.s4b-cta-call h2 {
    font-family: var(--s4b-font-display);
    font-size: 1.8rem; font-weight: 500; color: #fff;
    margin-bottom: .75rem;
}
.s4b-cta-call p {
    font-size: 1rem; color: rgba(255,255,255,.85);
    max-width: 500px; margin: 0 auto 1.5rem; line-height: 1.6;
}
.s4b-cta-call__actions {
    display: flex; gap: 1rem; align-items: center; justify-content: center; flex-wrap: wrap;
}
.s4b-cta-call .s4b-btn-primary {
    background: #fff; color: var(--s4b-red); font-size: 1.1rem; padding: 1rem 2rem;
}
.s4b-cta-call .s4b-btn-primary:hover { background: var(--s4b-slate-100); transform: translateY(-1px); }
.s4b-cta-call .s4b-btn-ghost { color: rgba(255,255,255,.9); }
.s4b-cta-call .s4b-btn-ghost:hover { color: #fff; }

/* Finance cards */
.s4b-finance-card {
    border-radius: 14px;
    padding: 2rem;
    transition: all .3s;
}
.s4b-finance-card--leasing {
    background: var(--s4b-red);
    color: #fff;
}
.s4b-finance-card--renting {
    background: #1E3A5F;
    color: #fff;
}
.s4b-finance-card:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0,0,0,.08); }
.s4b-finance-card__type {
    font-size: .75rem; font-weight: 700; text-transform: uppercase;
    letter-spacing: .1em; color: var(--s4b-red); margin-bottom: .75rem;
}
.s4b-finance-card__quote {
    font-family: var(--s4b-font-display);
    font-size: 1.15rem; font-style: italic; font-weight: 400;
    margin-bottom: 1rem; line-height: 1.4;
}
.s4b-finance-card__quote { color: #fff; }
.s4b-finance-card p {
    font-size: .9rem; line-height: 1.65; color: rgba(255,255,255,.8);
}
.s4b-finance-card__type { color: rgba(255,255,255,.7); }

/* Service blocks */
.s4b-service-block { padding: 3rem 0; border-top: 1px solid var(--s4b-slate-200); }
.s4b-service-block__header { margin-bottom: 2rem; }

.s4b-service-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.2rem;
}

.s4b-service-card {
    background: var(--s4b-slate-50);
    border: 1px solid var(--s4b-slate-200);
    border-radius: 12px;
    padding: 1.5rem;
    transition: all .2s;
}
.s4b-service-card:hover {
    border-color: var(--s4b-red);
    box-shadow: 0 4px 16px rgba(217,48,37,.06);
    transform: translateY(-2px);
}
.s4b-service-card h3 {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--s4b-dark);
    margin-bottom: .5rem;
}
.s4b-service-card:hover h3 { color: var(--s4b-red); }
.s4b-service-card p {
    font-size: .88rem;
    color: var(--s4b-slate-600);
    line-height: 1.6;
    margin-bottom: .75rem;
}

.s4b-service-techs {
    display: flex;
    flex-wrap: wrap;
    gap: .35rem;
}
.s4b-service-techs span {
    font-size: .7rem;
    font-weight: 600;
    padding: .2rem .5rem;
    background: var(--s4b-red-glow);
    color: var(--s4b-red);
    border-radius: 4px;
    letter-spacing: .02em;
}

/* Nearshore */
.s4b-nearshore {
    text-align: center;
    padding: 4rem 0;
    border-top: 1px solid var(--s4b-slate-200);
}
.s4b-nearshore .s4b-section-title em {
    font-style: italic;
    color: var(--s4b-red);
}
.s4b-nearshore-text {
    font-size: 1.1rem;
    color: var(--s4b-slate-600);
    line-height: 1.8;
    max-width: 700px;
    margin: 0 auto;
}

/* Scope */
.s4b-scope { padding: 4rem 0; border-top: 1px solid var(--s4b-slate-200); }
.s4b-scope-items { display: flex; gap: 1.2rem; flex-wrap: wrap; margin-top: 2rem; }
.s4b-scope-item {
    display: flex; align-items: center; gap: .8rem;
    background: var(--s4b-slate-50); border: 1px solid var(--s4b-slate-200);
    border-radius: 10px; padding: 1rem 1.4rem; transition: all .2s;
}
.s4b-scope-item:hover { border-color: var(--s4b-slate-200); box-shadow: 0 2px 12px rgba(0,0,0,.04); }
.s4b-scope-dot { width: 10px; height: 10px; background: var(--s4b-red); border-radius: 50%; flex-shrink: 0; }
.s4b-scope-text { font-size: .85rem; font-weight: 600; color: var(--s4b-dark); }
.s4b-scope-sub { font-size: .75rem; color: var(--s4b-slate-600); }

/* CTA */
.s4b-cta { background: var(--s4b-slate-50); padding: 4rem 0; border-top: 1px solid var(--s4b-slate-200); text-align: center; }
.s4b-cta .s4b-section-title { max-width: 640px; margin: 0 auto 1rem; }
.s4b-cta .s4b-section-sub { max-width: 480px; margin: 0 auto 2rem; }

/* Animations */
@keyframes s4bFadeUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
.s4b-hero { animation: s4bFadeUp .6s ease-out; }

@media (max-width: 1024px) {
    .s4b-questions-grid { grid-template-columns: 1fr; }
    .s4b-approach-grid { grid-template-columns: 1fr; }
    .s4b-facts { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
    .s4b-hero h2 { font-size: 2rem; }
    .s4b-scope-items { flex-direction: column; }
    .s4b-facts { grid-template-columns: 1fr 1fr; gap: 1.5rem; }
}

/* Page H1 */
main h1:first-of-type { color: var(--s4b-red); }

/* Main */
main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem;
    min-height: 60vh;
}

/* Footer */
footer {
    background: #0f1923;
    color: #aab;
    font-size: .9rem;
}

.footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Logo row */
.footer-logo-row {
    padding: 2.5rem 0 2rem;
    border-bottom: 1px solid #1e2a36;
}

.footer-logo {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--s4b-red);
    text-decoration: none;
    letter-spacing: .02em;
    font-family: var(--s4b-font-brand);
    display: flex;
    align-items: center;
    gap: .4rem;
}

/* Content grid */
.footer-content {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2.5rem;
    padding: 2rem 0;
}

.footer-col h3 {
    color: var(--s4b-red);
    font-size: .85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .04em;
    margin-bottom: .5rem;
    margin-top: 1.25rem;
}

.footer-col h3:first-child { margin-top: 0; }

.footer-col ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: .35rem;
}

.footer-col a {
    color: #8899aa;
    text-decoration: none;
    font-size: .85rem;
    transition: color .2s;
}
.footer-col a:hover { color: var(--s4b-red); }

.footer-col address {
    font-style: normal;
    font-size: .85rem;
    color: #8899aa;
    line-height: 1.5;
}

/* Bottom */
.footer-bottom {
    border-top: 1px solid #1e2a36;
    padding: 1.25rem 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-bottom p {
    font-size: .8rem;
    color: #556;
}

.footer-bottom a {
    color: #556;
    text-decoration: none;
    transition: color .2s;
}
.footer-bottom a:hover { color: #aab; }

/* .footer-made-in-eu removed — merged into .footer-bottom */
.made-in-eu {
    display: inline-flex; align-items: center; gap: 0.35em;
    white-space: nowrap; font-size: .95rem; color: #aab; letter-spacing: .02em;
}
.made-in-eu__heart { color: var(--s4b-red); font-size: 1.5em; line-height: 1; }
.made-in-eu__flag { width: 28px; height: 19px; border-radius: 2.5px; border: 1px solid rgba(255,255,255,.3); flex-shrink: 0; }

.footer-mcp {
    border-top: 1px solid #1e2a36;
    padding: .75rem 0;
}
.footer-mcp p { font-size: .8rem; color: #889; }
.footer-mcp a { color: var(--s4b-red); text-decoration: none; font-weight: 600; }
.footer-mcp a:hover { color: var(--s4b-red-hover); }

/* Training Cards */
.training-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.training-card {
    display: flex;
    flex-direction: column;
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
    border: 1px solid #e0e0e0;
    text-decoration: none;
    color: inherit;
    transition: box-shadow .2s, transform .2s, border-color .2s;
}
.training-card:hover {
    box-shadow: 0 6px 20px rgba(0,0,0,.1);
    transform: translateY(-3px);
    border-color: #1a1a1a;
}

.training-card__body {
    padding: 1.5rem;
    flex: 1;
}

.training-card__title {
    font-size: 1.15rem;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: .5rem;
}

.training-card__desc {
    font-size: .9rem;
    color: #666;
    line-height: 1.5;
}

.training-card__footer {
    padding: .75rem 1.5rem;
    border-top: 1px solid #f0f0f0;
    background: #fafafa;
}

.training-card__cta {
    font-size: .85rem;
    font-weight: 600;
    color: #0066cc;
}
.training-card:hover .training-card__cta { color: #004499; }

/* Training detail — two column layout via wrapper */
.frame-type-text:has(.training-sidebar) {
    display: grid;
    grid-template-columns: 1fr 280px;
    grid-template-rows: auto 1fr;
    gap: 0 2rem;
}

.frame-type-text:has(.training-sidebar) > header {
    grid-column: 1 / -1;
}

.training-sidebar {
    grid-column: 2;
    grid-row: 2;
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 1.25rem;
    align-self: start;
    position: sticky;
    top: 5rem;
}

.training-sidebar dl { margin: 0; }
.training-sidebar dl > p { display: none; }
.training-sidebar dt {
    font-size: .8rem;
    color: #888;
    text-transform: uppercase;
    letter-spacing: .03em;
    margin-top: .6rem;
}
.training-sidebar dt:first-of-type { margin-top: 0; }
.training-sidebar dd { font-size: .9rem; color: #1a1a1a; margin: .1rem 0 0 0; }
.training-sidebar dd p { margin: 0; }
.training-sidebar a { color: #0066cc; }

.training-section {
    grid-column: 1;
    margin-bottom: 1.5rem;
    overflow: hidden;
}
.training-section h2 {
    font-size: 1.15rem;
    font-weight: 700;
    color: #1a1a1a;
    padding-bottom: .4rem;
    border-bottom: 2px solid #e0e0e0;
    margin-bottom: .75rem;
}
.training-section h3 {
    font-size: .95rem;
    font-weight: 600;
    color: #444;
    margin: 1rem 0 .5rem;
}
.training-section ul { padding-left: 1.25rem; margin-bottom: .75rem; }
.training-section li { margin-bottom: .3rem; font-size: .9rem; color: #333; }

/* Hide empty/nbsp paragraphs injected by TYPO3 RTE */
.training-section > p:first-child,
.training-sidebar + p,
.training-sidebar > dl > p:first-child {
    display: none;
}

/* Compare table (Inter vs Intra) */
.compare-table { width: 100%; border-collapse: collapse; margin: 1rem 0; }
.compare-table td { padding: .6rem .75rem; border-bottom: 1px solid #eee; font-size: .9rem; }
.compare-table td:first-child { font-weight: 600; color: #444; width: 30%; }

/* CTA button intra */
.btn-intra {
    display: inline-block;
    padding: .75rem 1.5rem;
    background: #0066cc;
    color: #fff;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 600;
    font-size: .95rem;
    margin-top: 1rem;
    transition: background .2s;
}
.btn-intra:hover { background: #004499; color: #fff; }

@media (max-width: 768px) {
    .frame-type-text:has(.training-sidebar) {
        grid-template-columns: 1fr;
    }
    .training-sidebar { grid-column: 1; grid-row: auto; position: static; }
    .training-section { grid-column: 1; }
}

/* === s4b_training module === */

/* Catalog filters */
.s4b-catalog-filters {
    display: flex; gap: .5rem; margin-bottom: 2rem;
}
.s4b-filter-btn {
    padding: .5rem 1.2rem; border: 1px solid var(--s4b-grey-lighter);
    border-radius: 6px; background: #fff; font-size: .85rem; font-weight: 600;
    color: var(--s4b-dark); text-decoration: none; transition: all .2s;
}
.s4b-filter-btn:hover { border-color: var(--s4b-red); color: var(--s4b-red); }
.s4b-filter-btn--active { background: var(--s4b-red); color: #fff; border-color: var(--s4b-red); }

/* Catalog grid */
.s4b-catalog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
}

/* Training card */
.s4b-training-card {
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid var(--s4b-grey-lighter);
    transition: all .2s;
    display: flex;
    flex-direction: column;
}
.s4b-training-card:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,.08);
    transform: translateY(-2px);
}

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

/* Banner with type color */
.s4b-training-card[data-type="hands_on"] .s4b-card-banner { background: var(--s4b-red); }
.s4b-training-card[data-type="workshop"] .s4b-card-banner { background: #64748b; }
.s4b-training-card[data-type="event"] .s4b-card-banner { background: #1E3A5F; }

.s4b-card-banner {
    padding: 1.2rem 1.25rem;
    color: #fff;
    height: 160px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    position: relative;
}

.s4b-card-type-badge {
    position: absolute;
    top: .75rem; right: .75rem;
    font-size: .65rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: .08em;
    padding: .25rem .6rem; border-radius: 4px;
    background: rgba(255,255,255,.2); color: #fff;
}

.s4b-card-title {
    font-size: 1.05rem; font-weight: 700; color: #fff;
    margin-bottom: .3rem; line-height: 1.3;
}

.s4b-card-meta {
    display: flex; gap: .5rem; font-size: .8rem; opacity: .9;
}
.s4b-card-price { font-weight: 600; }
.s4b-card-duration { opacity: .8; }

/* Card body */
.s4b-card-body {
    padding: 1.25rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.s4b-card-teaser {
    font-size: .88rem;
    color: var(--s4b-slate-600);
    line-height: 1.5;
    flex: 1;
}

@media (max-width: 640px) {
    .s4b-catalog-grid { grid-template-columns: 1fr; }
    .s4b-catalog-filters { flex-wrap: wrap; }
}

/* === Search bar === */
.s4b-search-bar { display: flex; gap: 0.5rem; margin-bottom: 1rem; }
.s4b-search-input {
    flex: 1; padding: 0.75rem; border: 1px solid #d1d5db;
    border-radius: 0.375rem; font-size: 1rem;
}
.s4b-search-input:focus { outline: none; border-color: var(--s4b-red); box-shadow: 0 0 0 2px rgba(217,48,37,.15); }
.s4b-search-btn {
    padding: 0.75rem 1.5rem; background: #1E3A5F; color: #fff;
    border: none; border-radius: 0.375rem; cursor: pointer; font-weight: 600;
}
.s4b-search-btn:hover { background: #162d4a; }

/* === Filter bar === */
.s4b-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem; margin-bottom: 1.5rem; }
.s4b-filter-pills { display: flex; flex-wrap: wrap; gap: 0.5rem; }

/* Pill base — shared by training type pills and event category pills (feat-017) */
.s4b-pill {
    padding: 0.5rem 1rem; border-radius: 9999px; border: 1px solid #d1d5db;
    text-decoration: none; color: #374151; font-size: 0.875rem;
    transition: border-color .15s ease, box-shadow .15s ease, background-color .15s ease, color .15s ease;
    background: #fff;
}

/* Taptap hover halo — unified for both pill bars (T5) */
.s4b-filter-pills .s4b-pill:hover:not(.s4b-pill--active) {
    border-color: var(--s4b-red);
    box-shadow: 0 0 0 2px rgba(217, 48, 37, 0.28);
    color: var(--s4b-dark, #1a1a1a);
}

/* Active state — unified red for all pill types within .s4b-filter-pills (T6) */
.s4b-filter-pills .s4b-pill--active {
    background: var(--s4b-red);
    color: #fff;
    border-color: var(--s4b-red);
    box-shadow: none;
}
.s4b-filter-pills .s4b-pill--active:hover {
    background: var(--s4b-red-hover, #B71C1C);
    border-color: var(--s4b-red-hover, #B71C1C);
}

/* Legacy non-scoped active states (kept for non-filter-pills contexts) */
.s4b-pill--active { border-color: transparent; color: #fff; }
.s4b-pill--hands_on.s4b-pill--active { background: var(--s4b-red); }
.s4b-pill--event.s4b-pill--active { background: #1E3A5F; }

.s4b-filter-dropdowns { display: flex; gap: 0.5rem; }
.s4b-filter-select { padding: 0.5rem 0.75rem; border: 1px solid #d1d5db; border-radius: 0.375rem; font-size: 0.875rem; }
.s4b-filter-reset { color: var(--s4b-red); text-decoration: underline; font-size: 0.875rem; }

/* === View switcher === */
.s4b-view-switcher { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 1rem; }
.s4b-view-icon {
    padding: 0.5rem; border-radius: 0.25rem; text-decoration: none;
    color: #6b7280; font-size: 1.2rem; line-height: 1;
}
.s4b-view-icon:hover { color: #374151; }
.s4b-view-icon--active { background: #e5e7eb; color: #111827; }
.s4b-result-count { margin-left: auto; color: #6b7280; font-size: 0.875rem; }

/* === Training table view === */
.s4b-training-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.s4b-training-table th { text-align: left; padding: 0.75rem; border-bottom: 2px solid #e5e7eb; color: #6b7280; font-weight: 600; font-size: 0.8rem; text-transform: uppercase; }
.s4b-training-table td { padding: 0.75rem; border-bottom: 1px solid #f3f4f6; }
.s4b-training-table tr:hover { background: #f9fafb; }
.s4b-training-table a { color: var(--s4b-dark); font-weight: 500; }

/* === FullCalendar event colors === */
.s4b-cal-event--hands_on { background-color: var(--s4b-red) !important; border-color: var(--s4b-red) !important; }
.s4b-cal-event--workshop { background-color: #64748b !important; border-color: #64748b !important; }
.s4b-cal-event--event { background-color: #1E3A5F !important; border-color: #1E3A5F !important; }
.s4b-training-calendar { min-height: 500px; }
#s4b-fullcalendar .fc-event { cursor: pointer; color: #fff; font-size: 0.8rem; padding: 2px 4px; }
.s4b-cal-link { color: #fff; text-decoration: underline; font-size: 0.75rem; margin-left: 0.5em; opacity: 0.85; }
.s4b-cal-link:hover { opacity: 1; }
.fc-list-event .s4b-cal-link { color: var(--s4b-red); }

/* === Pagination === */
.s4b-pagination { display: flex; justify-content: center; gap: 0.25rem; margin-top: 2rem; }
.s4b-pagination a, .s4b-pagination span {
    padding: 0.5rem 0.85rem; border: 1px solid #d1d5db; border-radius: 0.375rem;
    text-decoration: none; color: #374151; font-size: 0.875rem;
}
.s4b-pagination a:hover { background: #f3f4f6; }
.s4b-pagination .s4b-page--active { background: var(--s4b-red); color: #fff; border-color: var(--s4b-red); }
.s4b-pagination .s4b-page--disabled { color: #d1d5db; pointer-events: none; }

/* === Empty state === */
.s4b-catalog-empty { text-align: center; padding: 3rem 1rem; color: #6b7280; }

/* === s4b_training detail === */

.s4b-detail-header {
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}
.s4b-detail-title {
    font-family: var(--s4b-font-display, inherit);
    font-size: 2rem;
    font-weight: 500;
    color: var(--s4b-red);
    margin: 0;
}
.s4b-badge {
    font-size: .7rem; font-weight: 700; text-transform: uppercase;
    letter-spacing: .06em; padding: .3rem .7rem; border-radius: 4px; color: #fff;
}
.s4b-badge--hands-on, .s4b-badge--hands_on { background: var(--s4b-red); }
.s4b-badge--workshop { background: #64748b; }
.s4b-badge--event { background: #1E3A5F; }
.s4b-badge--online { background: #0891b2; }
.s4b-badge--lang { background: #374151; font-size: .65rem; }

/* Two-column layout */
.s4b-detail-layout {
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 2.5rem;
    align-items: start;
}

/* Content sections */
.s4b-detail-content { grid-column: 1; }

.s4b-detail-section {
    margin-bottom: 2rem;
}
.s4b-detail-section h2 {
    font-size: 1.1rem; font-weight: 700; color: var(--s4b-dark);
    padding-bottom: .4rem; border-bottom: 2px solid var(--s4b-grey-lighter);
    margin-bottom: .75rem;
}
.s4b-detail-section h3 {
    font-size: .95rem; font-weight: 600; color: var(--s4b-red);
    margin: 1rem 0 .5rem;
}
.s4b-detail-section p {
    font-size: .92rem; color: var(--s4b-slate-600, #64748b); line-height: 1.7;
}
.s4b-detail-section ul {
    padding-left: 1.25rem; margin: .5rem 0;
}
.s4b-detail-section li {
    font-size: .9rem; color: #333; line-height: 1.6; margin-bottom: .25rem;
}

.s4b-objectives-list li::marker { color: var(--s4b-red); }

/* Program days */
.s4b-program-day {
    margin-bottom: 1.25rem;
    padding-left: .75rem;
    border-left: 3px solid var(--s4b-red);
}
.s4b-program-day h3 { margin-top: 0; }

/* Section nav (anchors) */
.s4b-detail-nav {
    display: flex; flex-wrap: wrap; gap: .5rem;
    padding: 1rem 0;
    margin: 1rem 0 2rem;
    border-top: 1px solid var(--s4b-grey-lighter);
    border-bottom: 1px solid var(--s4b-grey-lighter);
}
.s4b-detail-nav a {
    font-size: .8rem; font-weight: 500; color: var(--s4b-slate-600, #64748b);
    text-decoration: none; padding: .25rem .5rem; border-radius: 4px; transition: all .2s;
}
.s4b-detail-nav a:hover { color: var(--s4b-red); background: rgba(217,48,37,.05); }

.s4b-no-sessions { color: #888; font-style: italic; }

/* Sidebar */
.s4b-detail-sidebar {
    grid-column: 2;
    background: #f8f9fa;
    border: 1px solid var(--s4b-grey-lighter);
    border-radius: 8px;
    padding: 1.25rem;
    position: sticky;
    top: 5rem;
}
.s4b-detail-sidebar dl { margin: 0; }
.s4b-detail-sidebar dt {
    font-size: .75rem; color: #888; text-transform: uppercase;
    letter-spacing: .03em; margin-top: .6rem;
}
.s4b-detail-sidebar dt:first-of-type { margin-top: 0; }
.s4b-detail-sidebar dd {
    font-size: .9rem; color: var(--s4b-dark); margin: .1rem 0 0 0;
}
.s4b-detail-sidebar dd p { margin: 0; }

/* Technologies tags */
.s4b-tech-tags {
    display: flex; flex-wrap: wrap; gap: .35rem; margin-top: .5rem;
}
.s4b-tech-tag {
    font-size: .7rem; font-weight: 600; padding: .2rem .5rem;
    background: rgba(217,48,37,.07); color: var(--s4b-red);
    border-radius: 4px; letter-spacing: .02em;
}

/* Sessions list */
.s4b-sessions-list {
    margin-top: 1rem;
}
.s4b-session-row {
    display: flex; align-items: center; gap: 1rem;
    padding: .75rem 0;
    border-bottom: 1px solid var(--s4b-grey-lighter);
    font-size: .88rem;
}
.s4b-session-row:last-child { border-bottom: none; }
.s4b-session-date { font-weight: 600; color: var(--s4b-dark); min-width: 100px; }
.s4b-session-time { color: var(--s4b-slate-600, #64748b); }
.s4b-session-venue { color: var(--s4b-slate-600, #64748b); min-width: 120px; }
.s4b-session-city { color: var(--s4b-slate-500, #64748b); font-size: 0.84rem; min-width: 90px; }
.s4b-session-seats { margin-left: auto; font-size: .8rem; color: #888; }
.s4b-session-status {
    font-size: .7rem; font-weight: 600; padding: .2rem .4rem;
    border-radius: 3px; text-transform: uppercase;
}
.s4b-session-status--open { background: #e6f9e6; color: #2a7a2a; }
.s4b-session-status--full { background: #fee; color: #c00; }
.s4b-session-register {
    font-size: .8rem; font-weight: 600; color: var(--s4b-red);
    text-decoration: none;
}
.s4b-session-register:hover { text-decoration: underline; }

/* Related trainings */
.s4b-related-list {
    display: flex; gap: .75rem; flex-wrap: wrap; margin-top: .5rem;
}
.s4b-related-link {
    font-size: .85rem; padding: .4rem .8rem;
    border: 1px solid var(--s4b-grey-lighter); border-radius: 6px;
    text-decoration: none; color: var(--s4b-dark); transition: all .2s;
}
.s4b-related-link:hover { border-color: var(--s4b-red); color: var(--s4b-red); }

/* Detail CTA */
.s4b-detail-cta {
    display: flex; gap: 1rem; margin-top: 2rem; flex-wrap: wrap;
}

/* Back to catalog */
.s4b-back-link {
    display: inline-block; margin-bottom: 1.5rem;
    font-size: .85rem; color: var(--s4b-red); text-decoration: none;
}
.s4b-back-link:hover { text-decoration: underline; }

@media (max-width: 768px) {
    .s4b-detail-layout { grid-template-columns: 1fr; }
    .s4b-detail-sidebar { grid-column: 1; position: static; }
    .s4b-session-row { flex-wrap: wrap; }
}

/* Tools */
.tools-search { margin-bottom: 2rem; }

.tools-category { margin-bottom: 2.5rem; }
.tools-category__title {
    font-size: 1.2rem; font-weight: 700; color: var(--s4b-red);
    padding-bottom: .4rem; border-bottom: 2px solid var(--s4b-red);
    margin-bottom: 1rem; display: inline-block;
}

.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: .75rem;
}

.tools-card {
    display: block; padding: 1rem 1.2rem;
    background: var(--s4b-slate-50); border: 1px solid var(--s4b-grey-lighter);
    border-radius: 8px; text-decoration: none; transition: all .2s;
}
.tools-card:hover {
    border-color: var(--s4b-red); background: #fff;
    box-shadow: 0 2px 12px rgba(217,48,37,.08); transform: translateY(-1px);
}
.tools-card__name {
    font-size: .9rem; font-weight: 600; color: var(--s4b-dark);
}
.tools-card:hover .tools-card__name { color: var(--s4b-red); }

/* Blog list */
.blog-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.blog-card {
    border: 1px solid var(--s4b-grey-lighter);
    border-radius: 10px;
    overflow: hidden;
    transition: all .2s;
}
.blog-card:hover {
    border-color: var(--s4b-red);
    box-shadow: 0 4px 16px rgba(217,48,37,.06);
    transform: translateY(-2px);
}
.blog-card__link {
    display: block;
    padding: 1.5rem;
    text-decoration: none;
    color: inherit;
}
.blog-card__meta {
    font-size: .75rem;
    color: var(--s4b-grey-light);
    text-transform: uppercase;
    letter-spacing: .04em;
    margin-bottom: .5rem;
}
.blog-card__title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--s4b-dark);
    line-height: 1.3;
    margin-bottom: .5rem;
}
.blog-card:hover .blog-card__title { color: var(--s4b-red); }
.blog-card__excerpt {
    font-size: .88rem;
    color: var(--s4b-slate-600);
    line-height: 1.5;
    margin-bottom: .75rem;
}
.blog-card__read {
    font-size: .85rem;
    font-weight: 600;
    color: var(--s4b-red);
}

/* News list */
.news-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 2rem;
}

.news-card {
    border-bottom: 1px solid var(--s4b-grey-lighter);
    transition: all .2s;
}
.news-card:last-child { border-bottom: none; }
.news-card:hover { background: var(--s4b-slate-50); }
.news-card__link {
    display: flex;
    align-items: baseline;
    gap: 1.5rem;
    padding: 1rem 0;
    text-decoration: none;
    color: inherit;
}
.news-card__date {
    font-size: .8rem;
    color: var(--s4b-grey-light);
    white-space: nowrap;
    min-width: 90px;
}
.news-card__title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--s4b-dark);
    flex: 1;
}
.news-card:hover .news-card__title { color: var(--s4b-red); }
.news-card__excerpt {
    font-size: .85rem;
    color: var(--s4b-slate-600);
    display: none;
}

@media (max-width: 640px) {
    .blog-list { grid-template-columns: 1fr; }
    .news-card__link { flex-direction: column; gap: .25rem; }
}

/* Blog detail */
.blog-meta {
    font-size: .9rem;
    color: var(--s4b-grey);
    padding: .75rem 1rem;
    background: #f8f9fa;
    border-left: 3px solid var(--s4b-red);
    border-radius: 0 6px 6px 0;
    margin-bottom: 1.5rem;
}
.blog-meta strong { color: var(--s4b-dark); }
.blog-meta a { color: var(--s4b-red); }

/* Training prev/next navigation */
.training-nav {
    display: flex;
    justify-content: space-between;
    align-items: stretch;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--s4b-grey-lighter);
}

.training-nav__prev,
.training-nav__next {
    display: flex;
    align-items: center;
    gap: .5rem;
    padding: .75rem 1rem;
    text-decoration: none;
    color: var(--s4b-dark);
    border: 1px solid var(--s4b-grey-lighter);
    border-radius: 6px;
    transition: border-color .2s, background .2s;
    max-width: 45%;
}
.training-nav__prev:hover,
.training-nav__next:hover {
    border-color: var(--s4b-red);
    background: #fef2f2;
}

.training-nav__next { margin-left: auto; text-align: right; }

.training-nav__arrow {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--s4b-red);
    flex-shrink: 0;
}

.training-nav__label {
    font-size: .9rem;
    line-height: 1.3;
}

@media (max-width: 480px) {
    .training-nav { flex-direction: column; }
    .training-nav__prev,
    .training-nav__next { max-width: 100%; }
}

/* Event Cards */
.events-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
}

.event-card {
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
    border: 1px solid #e8e8e8;
    transition: box-shadow .2s, transform .2s;
}
.event-card:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,.08);
    transform: translateY(-2px);
}

/* Event filter */
.events-filter {
    display: flex; gap: .5rem; margin-bottom: 1.5rem;
}
.events-filter__btn {
    padding: .5rem 1.2rem; border: 1px solid var(--s4b-grey-lighter);
    border-radius: 6px; background: #fff; font-size: .85rem; font-weight: 600;
    color: var(--s4b-dark); cursor: pointer; transition: all .2s;
}
.events-filter__btn:hover { border-color: var(--s4b-red); color: var(--s4b-red); }
.events-filter__btn--active {
    background: var(--s4b-red); color: #fff; border-color: var(--s4b-red);
}
.events-filter__btn--active:hover { background: var(--s4b-red-hover); }

/* Card banner (replaces image placeholder) */
.event-card__banner {
    padding: 1.2rem 1.25rem;
    color: #fff;
    height: 200px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    position: relative;
}
.event-card__badge {
    position: absolute;
    top: .75rem;
    right: .75rem;
    font-size: .65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
    padding: .25rem .6rem;
    border-radius: 4px;
    background: rgba(255,255,255,.2);
    color: #fff;
}
.event-card__banner--training { background: var(--s4b-red); }
.event-card__banner--event { background: #1E3A5F; }

.event-card__banner-title {
    font-size: 1.05rem; font-weight: 700; margin-bottom: .4rem; line-height: 1.3;
}
.event-card__banner-title a { color: #fff; text-decoration: none; }
.event-card__banner-title a:hover { text-decoration: underline; }

.event-card__banner-info {
    display: flex; gap: .4rem; align-items: center;
    font-size: .8rem; font-weight: 500; opacity: .9;
}

/* Card details bar (date + location) */
.event-card__details {
    display: flex;
    flex-direction: column;
    gap: .2rem;
    padding: .75rem 1.25rem;
    background: var(--s4b-slate-100);
    border-bottom: 1px solid var(--s4b-grey-lighter);
    font-size: .8rem;
    color: var(--s4b-slate-600);
}
.event-card__details .event-card__date { font-weight: 600; color: var(--s4b-dark); }
.event-card__details .event-card__location { font-size: .78rem; }

.event-card__body { padding: 1.25rem; }

.event-card__date {
    font-size: .8rem;
    color: #888;
    text-transform: uppercase;
    letter-spacing: .04em;
    margin-bottom: .5rem;
}

.event-card__title { font-size: 1.1rem; margin-bottom: .5rem; line-height: 1.3; }
.event-card__title a { color: #1a1a1a; text-decoration: none; }
.event-card__title a:hover { color: #0066cc; }

.event-card__teaser {
    font-size: .9rem;
    color: #555;
    line-height: 1.5;
    margin-bottom: .75rem;
}

.event-card__meta {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    font-size: .8rem;
    color: #888;
}
.event-card__meta span { display: inline-flex; align-items: center; gap: .25rem; }
.event-card__free {
    background: #e6f9e6;
    color: #2a7a2a;
    padding: .15rem .4rem;
    border-radius: 4px;
    font-weight: 600;
}

/* Glossary detail page */
.glossary-detail {
    display: grid;
    grid-template-columns: 1fr 240px;
    gap: 2rem;
    margin-top: 1.25rem;
    margin-bottom: 2rem;
}

.glossary-detail__content { grid-column: 1; grid-row: 1; }
.glossary-detail__content h2 {
    font-size: 1.1rem;
    font-weight: 700;
    color: #1a1a1a;
    margin: 1.5rem 0 .5rem;
    padding-bottom: .3rem;
    border-bottom: 2px solid #e0e0e0;
}
.glossary-detail__content h2:first-child { margin-top: 0; }
.glossary-detail__content p { font-size: .95rem; line-height: 1.7; color: #333; margin-bottom: .75rem; }

.glossary-detail__sidebar {
    grid-column: 2;
    grid-row: 1;
    align-self: start;
    position: sticky;
    top: 5rem;
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 1.25rem;
}
/* Sidebar dl: force two-column even with RTE <p> wrappers */
.glossary-detail__sidebar dl { margin: 0; }
.glossary-detail__sidebar dl > p { display: none; }
.glossary-detail__sidebar dt {
    font-size: .75rem;
    color: #888;
    text-transform: uppercase;
    letter-spacing: .03em;
    margin-top: .6rem;
}
.glossary-detail__sidebar dt:first-of-type { margin-top: 0; }
.glossary-detail__sidebar dd {
    font-size: .85rem;
    color: #1a1a1a;
    margin: .1rem 0 0 0;
}
.glossary-detail__sidebar dd p { margin: 0; }
.glossary-detail__sidebar a { color: #0066cc; font-size: .85rem; }
/* Hide RTE parasitic empty/nbsp paragraphs */
.glossary-detail__content > p:first-child { display: none; }
.glossary-detail__content > h2:first-of-type { margin-top: 0; }
.glossary-detail__sidebar > dl > p { display: none; }
.training-section > p:first-child { display: none; }

@media (max-width: 768px) {
    .glossary-detail { grid-template-columns: 1fr; }
    .glossary-detail__sidebar { grid-column: 1; position: static; }
}

/* Video embeds */
.video-embed {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    border-radius: 8px;
    margin-bottom: 1.5rem;
}
.video-embed iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* Glossary */
.glossary__intro { margin-bottom: 2rem; }

/* Glossary search */
.glossary__search { margin-bottom: 1.5rem; position: relative; }

.glossary__search-input {
    width: 100%;
    max-width: 400px;
    padding: .6rem 1rem .6rem 2.5rem;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: .95rem;
    outline: none;
    transition: border-color .2s, box-shadow .2s;
    background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%23999' viewBox='0 0 16 16'%3E%3Cpath d='M11.742 10.344a6.5 6.5 0 1 0-1.397 1.398h-.001l3.85 3.85a1 1 0 0 0 1.415-1.414l-3.85-3.85zm-5.242.656a5 5 0 1 1 0-10 5 5 0 0 1 0 10z'/%3E%3C/svg%3E") .75rem center no-repeat;
}
.glossary__search-input:focus {
    border-color: #1a1a1a;
    box-shadow: 0 0 0 3px rgba(26,26,26,.08);
}
.glossary__search-input::placeholder { color: #aaa; }

.glossary__search-results { display: none; }
.glossary__terms--search { columns: 3; column-gap: 1rem; }
.glossary__no-results { color: #888; font-style: italic; }
.glossary__result-count { font-size: .8rem; color: #999; margin-top: .5rem; }
.glossary__term mark { background: #fff3cd; padding: .05rem .15rem; border-radius: 2px; }

@media (max-width: 768px) {
    .glossary__terms--search { columns: 1; }
    .glossary__search-input { max-width: 100%; }
}

.glossary__alphabet {
    display: flex;
    flex-wrap: wrap;
    gap: .35rem;
    margin-bottom: 2.5rem;
    padding: 1rem 0;
    border-top: 1px solid #e0e0e0;
    border-bottom: 1px solid #e0e0e0;
}

.glossary__alpha-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.2rem;
    height: 2.2rem;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    font-size: .95rem;
    color: #1a1a1a;
    background: #f5f5f5;
    transition: background .2s, color .2s;
}
.glossary__alpha-link:hover { background: #1a1a1a; color: #fff; }

.glossary__letter-group { margin-bottom: 2rem; }

.glossary__letter {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1a1a1a;
    padding-bottom: .5rem;
    border-bottom: 2px solid #1a1a1a;
    margin-bottom: .75rem;
    display: inline-block;
}

.glossary__terms {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: .25rem .5rem;
}

.glossary__term a {
    display: block;
    padding: .4rem 0;
    text-decoration: none;
    color: #444;
    font-size: .95rem;
    border-bottom: 1px solid transparent;
    transition: color .2s, border-color .2s;
}
.glossary__term a:hover {
    color: #1a1a1a;
    border-bottom-color: #ccc;
}

/* ========================================================================
   TYPO3 Form Framework (contact, generic forms)
   ======================================================================== */
.form-element {
    margin-bottom: 1.2rem;
}
.form-label {
    display: block;
    font-size: .85rem;
    font-weight: 600;
    color: var(--s4b-dark);
    margin-bottom: .35rem;
}
.form-label .required {
    color: var(--s4b-red);
    margin-left: .15rem;
}
.form-control {
    width: 100%;
    padding: .6rem .85rem;
    border: 1px solid #cdd1d8;
    border-radius: 6px;
    font-size: .9rem;
    font-family: var(--s4b-font);
    color: var(--s4b-dark);
    background: #fff;
    transition: border-color .2s, box-shadow .2s;
}
.form-control:focus {
    outline: none;
    border-color: var(--s4b-red);
    box-shadow: 0 0 0 3px rgba(217,48,37,.1);
}
select.form-control {
    appearance: auto;
    cursor: pointer;
}
textarea.form-control {
    min-height: 120px;
    resize: vertical;
}
.form-element-fieldset {
    border: 1px solid var(--s4b-grey-lighter);
    border-radius: 8px;
    padding: 1.2rem 1.4rem;
    margin-bottom: 1.4rem;
}
.form-element-fieldset legend {
    font-size: .8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: var(--s4b-grey);
    padding: 0 .5rem;
}
.form-element-submit button,
.form-element-submit input[type="submit"] {
    background: var(--s4b-red);
    color: #fff;
    padding: .75rem 2rem;
    border: none;
    border-radius: 6px;
    font-size: .95rem;
    font-weight: 600;
    font-family: var(--s4b-font);
    cursor: pointer;
    transition: background .2s, transform .1s;
}
.form-element-submit button:hover,
.form-element-submit input[type="submit"]:hover {
    background: var(--s4b-red-hover);
    transform: translateY(-1px);
}

/* ========================================================================
   Registration form
   ======================================================================== */
.s4b-registration {
    max-width: 820px;
    margin: 2rem auto;
}
.s4b-registration-title {
    font-family: var(--s4b-font-brand);
    font-size: 2rem;
    color: var(--s4b-red);
    margin-bottom: 1rem;
}
.s4b-registration-session {
    background: #f8f9fa;
    border-left: 4px solid var(--s4b-red);
    padding: .9rem 1.2rem;
    border-radius: 0 6px 6px 0;
    margin-bottom: 1.8rem;
}
.s4b-registration-session h2 {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--s4b-dark);
    margin-bottom: .3rem;
}
.s4b-registration-meta {
    font-size: .9rem;
    color: var(--s4b-grey);
}
.s4b-registration-meta span + span::before { content: ' '; }

.s4b-fieldset {
    border: 1px solid var(--s4b-grey-lighter);
    border-radius: 8px;
    padding: 1.2rem 1.4rem;
    margin-bottom: 1.4rem;
}
.s4b-fieldset legend {
    font-size: .8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .5px;
    color: var(--s4b-grey);
    padding: 0 .5rem;
}
.s4b-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-top: .9rem;
}
.s4b-form-group {
    display: flex;
    flex-direction: column;
    gap: .35rem;
}
.s4b-form-group--full { grid-column: 1 / -1; }
.s4b-form-group label {
    font-size: .85rem;
    font-weight: 600;
    color: var(--s4b-dark);
}
.s4b-input,
.s4b-input select,
.s4b-registration-form input[type="text"],
.s4b-registration-form input[type="email"],
.s4b-registration-form input[type="tel"],
.s4b-registration-form input[type="number"],
.s4b-registration-form select,
.s4b-registration-form textarea {
    width: 100%;
    padding: .55rem .8rem;
    border: 1px solid #cdd1d8;
    border-radius: 6px;
    font-size: .9rem;
    font-family: var(--s4b-font);
    color: var(--s4b-dark);
    background: #fff;
    transition: border-color .2s, box-shadow .2s;
}
.s4b-input:focus,
.s4b-registration-form input:focus,
.s4b-registration-form select:focus,
.s4b-registration-form textarea:focus {
    outline: none;
    border-color: var(--s4b-red);
    box-shadow: 0 0 0 3px rgba(217,48,37,.1);
}
.s4b-radio-group {
    display: flex;
    gap: 1.5rem;
    margin-top: .5rem;
}
.s4b-radio {
    display: flex;
    align-items: center;
    gap: .4rem;
    font-size: .9rem;
    cursor: pointer;
}
.s4b-radio input[type="radio"] { accent-color: var(--s4b-red); }
.s4b-form-actions { margin-top: 1.5rem; }

/* TYPO3 flash messages */
.typo3-messages {
    list-style: none;
    padding: 0;
    margin: 0 0 1.2rem;
}
.typo3-messages li {
    padding: .75rem 1rem;
    border-radius: 6px;
    margin-bottom: .5rem;
    font-size: .9rem;
}
.typo3-messages .alert-danger {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #b91c1c;
}
.typo3-messages .alert-success {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #15803d;
}
.typo3-messages .alert-warning {
    background: #fffbeb;
    border: 1px solid #fde68a;
    color: #92400e;
}
.typo3-messages .alert-info {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    color: #1d4ed8;
}

@media (max-width: 640px) {
    .s4b-form-row { grid-template-columns: 1fr; }
    .s4b-registration { margin: 1rem; }
}

/* ========================================================================
   feat-018: Keyword Slideshow
   ======================================================================== */
.slideshow-trainings {
    margin: 2.5rem 0;
    position: relative;
    overflow: hidden;
}
.slideshow-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}
.slideshow-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--s4b-dark);
    margin: 0;
}
.slideshow-nav {
    display: flex;
    gap: .4rem;
}
.slideshow-prev,
.slideshow-next {
    width: 2.2rem;
    height: 2.2rem;
    border: 1px solid var(--s4b-grey-lighter);
    border-radius: 50%;
    background: #fff;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--s4b-dark);
    cursor: pointer;
    transition: all .2s;
    display: flex;
    align-items: center;
    justify-content: center;
}
.slideshow-prev:hover,
.slideshow-next:hover {
    border-color: var(--s4b-red);
    color: var(--s4b-red);
}
.slideshow-prev:disabled,
.slideshow-next:disabled {
    opacity: .3;
    cursor: default;
    pointer-events: none;
}
.slideshow-track {
    display: flex;
    gap: 1.25rem;
    width: 100%;
}
/* Largeur d’une « fenêtre » = parent ; N cartes défilent hors champ (flex-basis sur largeur du track = 100% du wrapper) */
.slideshow-card {
    flex: 0 0 calc((100% - 2 * 1.25rem) / 3);
    min-width: 0;
}

@media (max-width: 1024px) {
    .slideshow-card { flex: 0 0 calc((100% - 1.25rem) / 2); }
}
@media (max-width: 640px) {
    .slideshow-card { flex: 0 0 100%; }
}

/* Responsive */
@media (max-width: 768px) {
    .header-inner { flex-wrap: wrap; gap: 1rem; }
    .main-nav { order: 3; width: 100%; }
    .footer-content { grid-template-columns: 1fr 1fr; gap: 2rem; }
}

@media (max-width: 480px) {
    .footer-content { grid-template-columns: 1fr; }
    .footer-bottom { flex-direction: column; gap: .5rem; text-align: center; }
}
