﻿@font-face {
    font-family: "Roboto";
    src: url("fonts/roboto.woff2") format("woff2-variations"),
         url("fonts/roboto.woff2") format("woff2");
    font-weight: 100 900;
    font-style: normal;
    font-display: swap;
}

:root {
    --brand: #7B1F5C;
    --brand-dark: #4E0941;
    --header-bg: #ffffff;
    --header-border: #e9e9ea;
    --text: #4E0941;
    --font-stack: "Roboto", "Helvetica Neue", Arial, sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    height: 100%;
}

html {
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    font-family: var(--font-stack);
    color: var(--text);
    background: var(--brand-dark);
}

.site-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    padding: 0.75rem 1.5rem;
    background: var(--header-bg);
    border-bottom: 1px solid var(--header-border);
}

.header-logo {
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
}

.header-logo img {
    display: block;
    height: 64px;
    width: auto;
}

.header-title {
    flex: 1;
    text-align: center;
    font-weight: 400;
    font-size: clamp(1rem, 2vw, 1.6rem);
    color: var(--text);
    margin: 0;
    line-height: 1.2;
}

.header-actions {
    display: flex;
    gap: 0.75rem;
    flex-shrink: 0;
}

.btn {
    display: inline-block;
    padding: 0.65rem 1.5rem;
    border: 2px solid var(--brand);
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    text-decoration: none;
    cursor: pointer;
    background: transparent;
    color: var(--brand);
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
    white-space: nowrap;
}

.btn-primary {
    background: var(--brand);
    color: #fff;
}

.btn-primary:hover,
.btn-primary:focus-visible {
    background: var(--brand-dark);
    border-color: var(--brand-dark);
}

.btn-outline {
    background: transparent;
    color: var(--brand);
}

.btn-outline:hover,
.btn-outline:focus-visible {
    background: var(--brand-dark);
    border-color: var(--brand-dark);
    color: #fff;
}

.hero {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    background: var(--brand-dark);
}

.hero-logo {
    display: block;
    width: 100%;
    max-width: 520px;
    height: auto;
}

@media (max-width: 900px) {
    .header-title {
        font-size: clamp(0.95rem, 2.4vw, 1.25rem);
    }
}

@media (max-width: 720px) {
    .site-header {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem;
    }

    .header-logo {
        order: 1;
    }

    .header-title {
        order: 2;
        font-size: 1.1rem;
    }

    .header-actions {
        order: 3;
        flex-wrap: wrap;
        justify-content: center;
        width: 100%;
    }

    .header-logo img {
        height: 52px;
    }

    .hero-logo {
        max-width: 320px;
    }
}

@media (max-width: 380px) {
    .btn {
        flex: 1 1 auto;
        text-align: center;
    }
}

/* =========================================================================
   Auth pages: card, fields, alerts, password meter
   ========================================================================= */

.hero--with-card {
    position: relative;
    padding: 2.5rem 1.5rem;
    align-items: flex-start;
    justify-content: center;
}

.hero-logo--bg {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    opacity: 0.18;
    pointer-events: none;
    z-index: 0;
    max-width: 520px;
    width: calc(100% - 4rem);
}

.auth-card {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 420px;
    background: rgba(35, 14, 26, 0.92);
    color: #fff;
    border-radius: 6px;
    padding: 2rem 2rem 1.75rem;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(2px);
    margin: 1.5rem auto;
}

.auth-card--wide { max-width: 640px; }

.auth-card__title {
    margin: 0 0 1.25rem 0;
    font-size: 1.5rem;
    font-weight: 500;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: #fff;
}

.auth-card__intro {
    margin: 0 0 1.25rem 0;
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.78);
    line-height: 1.5;
}

.auth-card__link,
.auth-card__signup {
    margin-top: 1rem;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.78);
}

.auth-card__link a,
.auth-card__signup a {
    color: #fff;
    text-decoration: underline;
}

.auth-card__signup a {
    font-weight: 700;
    margin-left: 0.25rem;
}

.field {
    display: block;
    position: relative;
    margin: 0 0 1rem 0;
}

.field__label {
    display: block;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 0.4rem;
}

.field__input {
    display: block;
    width: 100%;
    padding: 0.65rem 0.85rem;
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 4px;
    color: #fff;
    font: inherit;
    font-size: 0.95rem;
    transition: border-color 0.15s ease, background-color 0.15s ease;
}

.field__input:focus {
    outline: none;
    border-color: var(--brand);
    background: rgba(255, 255, 255, 0.12);
}

.field__input::placeholder { color: rgba(255, 255, 255, 0.45); }
select.field__input option { color: #2a1a25; }

.field__hint {
    margin: 0 0 1rem 0;
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.6);
}

.admin-form .field__hint {
    color: #6b5c64;
}  

.field__optional {
    font-style: normal;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: rgba(255, 255, 255, 0.5);
    margin-left: 0.4rem;
}
.field__required {
    color: #f87171;
    margin-left: 0.2rem;
    font-weight: 700;
}

.field__action {
    position: absolute;
    right: 0.4rem;
    bottom: 0.4rem;
    font: inherit;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: rgba(255, 255, 255, 0.85);
    padding: 0.3rem 0.6rem;
    border-radius: 999px;
    cursor: pointer;
}

.field__action:hover {
    background: var(--brand);
    border-color: var(--brand);
    color: #fff;
}

.field-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 1rem;
}

@media (max-width: 540px) {
    .field-row { grid-template-columns: 1fr; }
}

.check {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    margin: 0.5rem 0 0.75rem 0;
    font-size: 0.85rem;
    line-height: 1.45;
    color: rgba(255, 255, 255, 0.85);
}

.check input[type="checkbox"] {
    margin-top: 0.2rem;
    accent-color: var(--brand);
    flex-shrink: 0;
}

.check a { color: #fff; text-decoration: underline; }

.alert {
    border-radius: 4px;
    padding: 0.7rem 0.9rem;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    line-height: 1.4;
}

.alert--error {
    background: rgba(170, 40, 60, 0.25);
    border: 1px solid rgba(220, 80, 100, 0.5);
    color: #ffd7dd;
}

.alert--success {
    background: rgba(40, 110, 70, 0.25);
    border: 1px solid rgba(80, 170, 110, 0.5);
    color: #d6f5e0;
}

.password-meter {
    margin: -0.4rem 0 1rem 0;
}

.password-meter__bar {
    height: 4px;
    background: rgba(255, 255, 255, 0.12);
    border-radius: 999px;
    overflow: hidden;
}

.password-meter__bar span {
    display: block;
    height: 100%;
    width: 0;
    background: #c0392b;
    transition: width 0.2s ease, background-color 0.2s ease;
}

.password-meter__bar span[data-level="1"] { background: #c0392b; }
.password-meter__bar span[data-level="2"] { background: #d68910; }
.password-meter__bar span[data-level="3"] { background: #b7aa1d; }
.password-meter__bar span[data-level="4"] { background: #2ecc71; }

.password-meter__hint {
    margin-top: 0.4rem;
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.55);
    line-height: 1.4;
}

.btn--block {
    display: block;
    width: 100%;
    text-align: center;
    margin-top: 0.5rem;
}

.user-greeting {
    font-size: 0.9rem;
    color: var(--text);
    align-self: center;
    margin-right: 0.5rem;
}

.home-stub {
    color: #fff;
    text-align: center;
    max-width: 520px;
}

.home-stub h2 {
    font-size: 1.6rem;
    font-weight: 500;
    margin-bottom: 1rem;
}

.home-stub p {
    margin-bottom: 0.5rem;
    line-height: 1.5;
}

/* =========================================================================
   Admin backend
   ========================================================================= */

.admin-body {
    background: #f4f1f3;
    color: #2a1a25;
}

.admin-body .field__input {
    background: #fff;
    border: 1px solid #d0c4cd;
    color: #2a1a25;
}

.admin-body .field__input:focus {
    background: #fff;
    border-color: var(--brand);
}

.admin-body .field__input::placeholder { color: #9e8a96; }

.admin-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.6rem 1.5rem;
    background: var(--brand-dark);
    color: #fff;
    gap: 1.5rem;
}

.admin-header__brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    font-size: 0.85rem;
}

.admin-header__brand img {
    height: 36px;
    width: auto;
    background: #fff;
    border-radius: 4px;
    padding: 4px;
}

.admin-header__user {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.85rem;
}

.admin-header__email {
    opacity: 0.85;
    color: var(--header-bg);
    text-decoration: none;;
}

.admin-header .btn {
    color: #fff;
    border-color: rgba(255, 255, 255, 0.45);
}

.admin-header .btn:hover,
.admin-header .btn:focus-visible {
    background: rgba(255, 255, 255, 0.1);
    border-color: #fff;
    color: #fff;
}

.admin-layout {
    display: grid;
    grid-template-columns: 220px 1fr;
    min-height: calc(100vh - 60px);
}

.admin-sidebar {
    background: #2a1a25;
    color: #fff;
    padding: 1rem 0;
}

.admin-nav {
    display: flex;
    flex-direction: column;
}

.admin-nav__link {
    display: block;
    padding: 0.65rem 1.25rem;
    color: rgba(255, 255, 255, 0.78);
    text-decoration: none;
    font-size: 0.9rem;
    border-left: 3px solid transparent;
    transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.admin-nav__link:hover {
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
}

.admin-nav__link.is-active {
    background: rgba(123, 31, 92, 0.35);
    border-left-color: var(--brand);
    color: #fff;
    font-weight: 600;
}

.admin-main {
    padding: 1.75rem 2rem;
    background: #f4f1f3;
    overflow: auto;
}

.admin-h1 {
    font-size: 1.5rem;
    font-weight: 500;
    margin: 0 0 1.25rem 0;
    color: var(--brand-dark);
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.admin-h2 {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 1.75rem 0 0.75rem 0;
    color: var(--brand-dark);
}

.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.stat-card {
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid #ece5ea;
    border-radius: 6px;
    padding: 1rem 1.25rem;
    text-decoration: none;
    color: inherit;
    transition: border-color 0.15s ease, transform 0.15s ease;
}

.stat-card:hover {
    border-color: var(--brand);
    transform: translateY(-1px);
}

.stat-card__label {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: #6b5c64;
}

.stat-card__value {
    font-size: 2rem;
    font-weight: 600;
    color: var(--brand-dark);
    line-height: 1.1;
    margin-top: 0.25rem;
}

.stat-card__hint {
    font-size: 0.75rem;
    color: #c0392b;
    margin-top: 0.25rem;
}

.admin-filters {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    align-items: center;
    margin-bottom: 1rem;
    padding: 0.75rem;
    background: #fff;
    border: 1px solid #ece5ea;
    border-radius: 6px;
}

.admin-filters input,
.admin-filters select,
.admin-form input,
.admin-form select,
.admin-form textarea,
.admin-form__inline input {
    font: inherit;
    padding: 0.45rem 0.6rem;
    border: 1px solid #cbb9c2;
    border-radius: 4px;
    background: #fff;
    color: #2a1a25;
}

.admin-filters input[type="search"] {
    min-width: 240px;
}

.admin-filters input:focus,
.admin-filters select:focus,
.admin-form input:focus,
.admin-form select:focus,
.admin-form textarea:focus {
    outline: none;
    border-color: var(--brand);
    box-shadow: 0 0 0 3px rgba(123, 31, 92, 0.15);
}

.table-scroll-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: 6px;
    border: 1px solid #ece5ea;
    margin-bottom: 1.5rem;
}

.table-scroll-wrap .admin-table {
    border: none;
    border-radius: 0;
    margin-bottom: 0;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border: 1px solid #ece5ea;
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
}

.admin-table th,
.admin-table td {
    text-align: left;
    padding: 0.55rem 0.75rem;
    border-bottom: 1px solid #f0e7ec;
    vertical-align: middle;
}

.admin-table thead th {
    background: #f8f5f7;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #6b5c64;
    font-weight: 600;
}

.admin-table tr:last-child td {
    border-bottom: none;
}

.admin-table tr:hover td {
    background: #faf6f8;
}

.admin-table code {
    background: #f0e7ec;
    padding: 1px 6px;
    border-radius: 3px;
    font-size: 0.85em;
}

.admin-empty {
    text-align: center;
    color: #6b5c64;
    padding: 1.5rem !important;
}

.admin-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    align-items: center;
}

/* td that contains an .admin-actions div: shrink-wrap, center vertically */
.admin-table td:has(.admin-actions),
td.admin-actions {
    vertical-align: middle;
    white-space: nowrap;
}
/* Remove whitespace: nowrap inheritance so the flex container can wrap */
.admin-actions { white-space: normal; }
.admin-actions .btn { white-space: nowrap; } /* buttons themselves stay on one line */
.admin-actions form { display: inline; margin: 0; } /* form not a flex track */

.admin-actions form {
    margin: 0;
}

.admin-form {
    background: #fff;
    border: 1px solid #ece5ea;
    border-radius: 6px;
    padding: 1.25rem 1.5rem;
    max-width: 720px;
}

.admin-form--inline {
    display: flex;
    gap: 0.6rem;
    flex-wrap: wrap;
    align-items: flex-end;
    max-width: none;
}

.admin-form .field-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 1rem;
}

@media (max-width: 640px) {
    .admin-form .field-row {
        grid-template-columns: 1fr;
    }
}

.admin-field {
    display: block;
    margin-bottom: 0.85rem;
}

.admin-field span {
    display: block;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #6b5c64;
    margin-bottom: 0.3rem;
}

.admin-field input,
.admin-field select,
.admin-field textarea {
    width: 100%;
}

.admin-form .check {
    color: #2a1a25;
    margin: 0.25rem 0;
}

.admin-form .check input[type="checkbox"] {
    accent-color: var(--brand);
}

.admin-fieldset {
    border: 1px solid #ece5ea;
    border-radius: 5px;
    padding: 0.75rem 1rem;
    margin: 1rem 0;
    background: #faf6f8;
}

.admin-fieldset legend {
    padding: 0 0.4rem;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #6b5c64;
}

/* Accordion variant: <details class="admin-fieldset"> */
details.admin-fieldset { padding: 0; }
details.admin-fieldset > summary {
    padding: 0.55rem 1rem;
    cursor: pointer;
    user-select: none;
    list-style: none;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #6b5c64;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}
details.admin-fieldset > summary::-webkit-details-marker { display: none; }
details.admin-fieldset > summary::marker { display: none; }
details.admin-fieldset > summary::before {
    content: '▶';
    font-size: 0.6em;
    color: #9b8a96;
    transition: transform 0.15s;
    display: inline-block;
    flex-shrink: 0;
}
details.admin-fieldset[open] > summary::before { transform: rotate(90deg); }
details.admin-fieldset[open] > summary { border-bottom: 1px solid #ece5ea; }
.accordion-body { padding: 0.75rem 1rem; }

.admin-form__actions {
    margin-top: 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex-wrap: wrap;
}
.admin-form__actions-sep {
    width: 1px;
    height: 24px;
    background: #ddd;
    margin: 0 4px;
}

.btn--sm {
    padding: 0.4rem 0.9rem;
    font-size: 0.72rem;
}

.btn--danger {
    border-color: #c0392b;
    color: #c0392b;
}

.btn--danger:hover,
.btn--danger:focus-visible {
    background: #c0392b;
    border-color: #c0392b;
    color: #fff;
}

.pill {
    display: inline-block;
    padding: 0.15rem 0.55rem;
    border-radius: 999px;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 600;
    background: #ece5ea;
    color: #4E0941;
}

.pill--role-admin           { background: #4E0941; color: #fff; }
.pill--role-product_manager { background: #7B1F5C; color: #fff; }
.pill--role-viewer          { background: #2c7a55; color: #fff; }
.pill--role-rookie          { background: #b08a00; color: #fff; }

.pill--status-active   { background: #2c7a55; color: #fff; }
.pill--status-pending  { background: #b08a00; color: #fff; }
.pill--status-disabled { background: #6b5c64; color: #fff; }

.speaker-thumb {
    display: inline-block;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
    background: #ece5ea;
    vertical-align: middle;
}

.speaker-thumb--empty {
    background: #ece5ea;
}

.product-thumb {
    display: inline-block;
    width: 44px;
    height: 44px;
    object-fit: contain;
    background: #f5f5f5;
    border-radius: 4px;
    vertical-align: middle;
}

.product-thumb--empty {
    background: #ece5ea;
    border-radius: 4px;
}

.brand-swatch {
    display: inline-block;
    width: 18px;
    height: 18px;
    border-radius: 3px;
    border: 1px solid rgba(0,0,0,.12);
    vertical-align: middle;
    margin-right: 4px;
}

.speaker-photo-edit {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    margin-bottom: 0.85rem;
}

.speaker-photo-preview {
    width: 96px;
    height: 96px;
    border-radius: 6px;
    object-fit: cover;
    background: #ece5ea;
    border: 1px solid #ece5ea;
    flex-shrink: 0;
}

.speaker-photo-edit__fields {
    flex: 1;
    min-width: 0;
}

/* =========================================================================
   Portal (logged-in) â€” header, side menu, hero, rows, video detail, catalog
   ========================================================================= */

.portal-body {
    background: #1a1a1a;
    color: #fff;
    min-height: 100vh;
}

/* ---- Portal header ---- */

.portal-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 1.25rem 0.5rem 4.5rem;
    background: #fff;
    color: var(--text);
    border-bottom: 1px solid #ece5ea;
    overflow: visible;
}

.portal-header__logo img {
    display: block;
    height: 56px;
    width: auto;
}

.portal-header__nav {
    display: flex;
    gap: 1.25rem;
    align-items: center;
    flex-shrink: 0;
}
.portal-header__nav-link {
    font-size: .78rem;
    font-weight: 600;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: #2a1a25;
    text-decoration: none;
    white-space: nowrap;
    padding: .25rem 0;
}
.portal-header__nav-link:hover { color: var(--brand, #7B1F5C); }
@media (max-width: 960px) { .portal-header__nav-link { display: none; } }

.portal-header__icon {
    color: #2a1a25;
    display: inline-flex;
    transition: color 0.15s ease;
}

.portal-header__icon:hover { color: var(--brand); }

/* ── Product dropdown nav (inside header) ── */
.portal-header__product-nav {
    flex: 1;
    min-width: 0;
    overflow: visible;
    padding: 0 1rem;
}

.pnav__list {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 0;
}

.pnav__item {
    position: relative;
}

.pnav__link {
    display: flex;
    align-items: center;
    gap: .25rem;
    padding: .55rem .85rem;
    font-size: .78rem;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    text-decoration: none;
    color: #2a1a25;
    white-space: nowrap;
    border-bottom: 3px solid transparent;
    transition: color .15s, border-color .15s;
    box-sizing: border-box;
}

.pnav__link:hover,
.pnav__item.is-open .pnav__link {
    color: var(--pnav-color, var(--brand, #7B1F5C));
    border-bottom-color: var(--pnav-color, var(--brand, #7B1F5C));
}

.pnav__chevron {
    font-size: .65rem;
    opacity: .6;
    transition: transform .2s;
}

.pnav__item.is-open .pnav__chevron { transform: rotate(180deg); }

/* Dropdown */
.pnav__drop {
    display: none;
    position: absolute;
    top: 100%;           /* flush – no gap that breaks hover */
    left: 0;
    min-width: 180px;
    background: #fff;
    border: 1px solid #ece5ea;
    border-radius: 0 0 6px 6px;
    box-shadow: 0 6px 24px rgba(0,0,0,.15);
    list-style: none;
    margin: 0;
    padding: .35rem 0;
    z-index: 9999;
}

/* Bridge: transparent area above the dropdown keeps hover alive */
.pnav__drop::before {
    content: '';
    position: absolute;
    top: -8px;
    left: 0;
    right: 0;
    height: 8px;
}

.pnav__item--has-drop:focus-within .pnav__drop,
.pnav__item.is-open .pnav__drop {
    display: block;
}

.pnav__drop a {
    display: block;
    padding: .5rem 1rem;
    font-size: .82rem;
    color: #2a1a25;
    text-decoration: none;
    transition: background .12s, color .12s;
}

.pnav__drop a:hover {
    background: #f7f2f6;
    color: var(--brand, #7B1F5C);
}

/* Product nav: hide on mobile/tablet — side menu handles navigation there */
@media (max-width: 960px) {
    .portal-header__product-nav { display: none; }
}

/* ── User account dropdown ── */
.portal-header__user-wrap {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.portal-header__user-btn {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    line-height: 0;
}

.portal-header__user-drop {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    min-width: 160px;
    background: #fff;
    border: 1px solid #e9e9ea;
    border-radius: 8px;
    box-shadow: 0 6px 20px rgba(0,0,0,.12);
    list-style: none;
    padding: .4rem 0;
    z-index: 10000;
}

.portal-header__user-drop li a {
    display: block;
    padding: .55rem 1.1rem;
    font-size: .88rem;
    color: var(--text, #4E0941);
    text-decoration: none;
    white-space: nowrap;
    transition: background .12s, color .12s;
}

.portal-header__user-drop li a:hover {
    background: #f7f2f6;
    color: var(--brand, #7B1F5C);
}

.portal-header__user-drop li:last-child a {
    border-top: 1px solid #e9e9ea;
    margin-top: .25rem;
    padding-top: .6rem;
    color: #c0392b;
}

.portal-header__user-drop li:last-child a:hover {
    background: #fdf2f2;
    color: #c0392b;
}

/* ---- Side menu toggle (hidden — hamburger + X button replace it) ---- */
.side-menu-toggle { display: none !important; }

/* ---- Side menu close button (X inside menu) ---- */
.side-menu__close {
    position: absolute;
    top: .85rem;
    right: .85rem;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,.12);
    border: none;
    border-radius: 50%;
    color: #fff;
    cursor: pointer;
    transition: background .15s;
    flex-shrink: 0;
}
.side-menu__close:hover { background: rgba(255,255,255,.25); }

/* ---- Side menu panel ---- */

.side-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 280px;
    height: 100vh;
    background: var(--brand);
    color: #fff;
    padding: 1rem 0 0;
    z-index: 999999;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.25);
}

body.side-menu-open .side-menu { transform: translateX(0); }

.side-menu__nav {
    flex: 1;
    overflow-y: auto;
    padding: 0 1.5rem;
}

.side-menu__products { list-style: none; margin: 0; padding: 0; }

.side-menu__product { margin-bottom: 0.25rem; }

.side-menu__product-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    background: transparent;
    border: none;
    color: #fff;
    padding: 0.55rem 0;
    font: inherit;
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-align: left;
    cursor: pointer;
}

.side-menu__product-chevron {
    display: inline-flex;
    transition: transform 0.2s ease;
    opacity: 0.85;
}

.side-menu__product.is-open .side-menu__product-chevron { transform: rotate(180deg); }

.side-menu__categories {
    list-style: none;
    margin: 0;
    padding: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.25s ease, padding 0.25s ease;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 4px;
}

.side-menu__product.is-open .side-menu__categories {
    max-height: 500px;
    padding: 0.4rem 0;
}

.side-menu__categories li a {
    display: block;
    padding: 0.4rem 0.85rem;
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    font-size: 0.85rem;
}

.side-menu__categories li a:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.08);
}

.side-menu__divider {
    border: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.25);
    margin: 1rem 0;
}

.side-menu__link {
    display: block;
    color: #fff;
    text-decoration: none;
    padding: 0.5rem 0;
    font-size: 0.9rem;
}

.side-menu__link:hover { opacity: 0.85; }

.side-menu__link--home {
    font-weight: 700;
    font-size: 1rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    margin-bottom: 0.25rem;
}

.side-menu__link--admin {
    margin-top: 0.5rem;
    padding-top: 0.6rem;
    border-top: 1px dashed rgba(255, 255, 255, 0.3);
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 700;
}

.side-menu__link--logout {
    margin-top: 0.4rem;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    opacity: 0.7;
}

.side-menu__social {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    padding: 1rem 1.5rem 1.25rem;
    color: #fff;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
}

.side-menu__social a { color: #fff; display: inline-flex; }

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

.portal-main {
    display: block;
    flex: 1 0 auto;
    background: #2a7889;
    padding-top: 72px; /* fixed header height */
}

.portal-footer { flex-shrink: 0; }

/* ── Scroll-to-top button ── */
.scroll-top-btn {
    position: fixed;
    bottom: 1.75rem;
    right: 1.5rem;
    z-index: 300;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--brand, #7B1F5C);
    color: #fff;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 14px rgba(0,0,0,.3);
    opacity: .85;
    transition: opacity .2s, transform .2s;
}
.scroll-top-btn:hover { opacity: 1; transform: translateY(-2px); }
.scroll-top-btn[hidden] { display: none; }

.portal-hero {
    position: relative;
    min-height: 0; /* each hero variant sets its own min-height */
    background-color: #111;
    background-size: cover;
    background-position: right center;
    background-repeat: no-repeat;
    color: #fff;
    overflow: hidden;
}

.portal-hero__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to right, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.55) 35%, rgba(0,0,0,0) 70%);
    display: flex;
    align-items: center;
}

.portal-hero__content {
    max-width: 480px;
    padding: 3rem 2.5rem;
}

.portal-hero__title {
    font-size: clamp(1.5rem, 3vw, 2.4rem);
    font-weight: 700;
    margin: 0 0 0.5rem 0;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.portal-hero__meta {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.78);
    margin: 0 0 1rem 0;
}

.portal-hero__description {
    font-size: 0.95rem;
    line-height: 1.55;
    margin: 0 0 1.5rem 0;
    color: rgba(255, 255, 255, 0.92);
}

.portal-hero__readmore {
    display: inline;
    margin-left: 0.35em;
    white-space: nowrap;
    font-size: 0.85rem;
    font-weight: 700;
    color: #fff;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.portal-desc-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.72);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
}

.portal-desc-modal[hidden] { display: none; }

.portal-desc-modal__inner {
    background: #4e0941;
    color: #fff;
    border-radius: 14px;
    padding: 2rem;
    max-width: 640px;
    width: 100%;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.35);
}

.portal-desc-modal__title {
    margin: 0 0 1rem 0;
    font-size: 1.15rem;
    font-weight: 700;
}

.portal-desc-modal__body {
    overflow-y: auto;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.portal-desc-modal__body p { margin: 0 0 1em 0; }
.portal-desc-modal__body p:last-child { margin-bottom: 0; }
.portal-desc-modal__body ul { margin: 0 0 1em 0; padding-left: 1.25em; }
.portal-desc-modal__body ul:last-child { margin-bottom: 0; }

#portalDescModalClose {
    align-self: flex-start;
    background: #fff;
    color: #4e0941;
    border-color: #fff;
}

#portalDescModalClose:hover,
#portalDescModalClose:focus-visible {
    background: rgba(255, 255, 255, 0.85);
    border-color: #fff;
    color: #4e0941;
}

.portal-hero__actions {
    margin-top: 1rem;
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

/* Featured-video hero (no modifier class) needs min-height for the absolute overlay */
.portal-hero:not(.portal-hero--livestream):not(.portal-hero--webinar) {
    min-height: 55vh;
}

.portal-hero--livestream {
    min-height: 0;
    background: linear-gradient(135deg, #4E0941, #7B1F5C);
}

.portal-hero__pill {
    display: inline-block;
    padding: 0.25rem 0.7rem;
    background: #c0392b;
    color: #fff;
    border-radius: 999px;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

/* ── Homepage scroll-nav ── */
.home-scrollnav {
    background: rgba(0,0,0,.55);
    backdrop-filter: blur(6px);
    position: sticky;
    top: 0;
    z-index: 40;
    overflow-x: auto;
    scrollbar-width: none;
}
.home-scrollnav::-webkit-scrollbar { display: none; }
.home-scrollnav__list {
    display: flex;
    align-items: center;
    gap: 0;
    list-style: none;
    margin: 0;
    padding: 0;
    white-space: nowrap;
}
.home-scrollnav__item {
    display: contents; /* flatten item so links sit inline */
}
.home-scrollnav__link {
    display: inline-block;
    padding: .55rem 1rem;
    font-size: .78rem;
    font-weight: 600;
    letter-spacing: .05em;
    text-transform: uppercase;
    text-decoration: none;
    color: rgba(255,255,255,.75);
    transition: color .15s, background .15s;
    border-bottom: 2px solid transparent;
}
.home-scrollnav__link:hover { color: #fff; }
.home-scrollnav__link--product {
    color: rgba(255,255,255,.9);
    border-bottom-color: var(--sn-color, rgba(255,255,255,.4));
}
.home-scrollnav__link--cat {
    font-size: .72rem;
    font-weight: 400;
    letter-spacing: .04em;
    color: rgba(255,255,255,.5);
    padding-left: .6rem;
    padding-right: .6rem;
}
.home-scrollnav__link--cat:hover { color: rgba(255,255,255,.85); }

/* ---- Product rows (Netflix style) ---- */

.portal-rows {
    background: #2a7889;
    /*background: #160520;*/
    padding: 2rem 0 3rem;
}

/* ── Product block on homepage (groups category rows) ── */
.product-block {
    padding: .5rem 0 1.5rem;
    border-radius: 0;
    scroll-margin-top: 80px;
}

/* Category anchor divs inside product blocks */
.product-block > [id^="cat-"] {
    scroll-margin-top: 80px;
}
.product-block__name {
    font-size: 1.5rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase;
    color: rgba(255,255,255,.95); padding: 1.25rem 2rem .1rem; margin: 0;
}
.product-block__name a {
    color: inherit;
    text-decoration: none;
}
.product-block__name a:hover {
    text-decoration: underline;
    text-underline-offset: 3px;
}

.product-row {
    margin: 0 0 2rem 0;
    color: #fff;
}

.product-row__title {
    font-size: .72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .1em;
    color: rgba(255,255,255,.5);
    margin: .6rem 0 .6rem 0;
    padding: 0 2rem;
}
.product-row__title a {
    color: inherit;
    text-decoration: none;
}
.product-row__title a:hover {
    color: #fff;
    text-decoration: underline;
}

.product-row__container {
    position: relative;
    padding: 0 2rem;
}

.product-row__scroll {
    display: flex;
    gap: 0.6rem;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-behavior: smooth;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
}

.product-row__scroll::-webkit-scrollbar { display: none; }

.product-row__btn {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 50px;
    background: rgba(0, 0, 0, 0.6);
    border: none;
    color: #fff;
    cursor: pointer;
    z-index: 5;
    opacity: 1;
    transition: opacity 0.2s ease, background-color 0.15s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-row__container:hover .product-row__btn,
.product-row__btn:focus-visible { opacity: 1; }

.product-row__btn:hover { background: rgba(0, 0, 0, 0.75); }

.product-row__btn.is-disabled {
    opacity: 0 !important;
    pointer-events: none;
}

.product-row__btn--left  { left: 0; }
.product-row__btn--right { right: 0; }
.product-row__btn-icon   { display: inline-flex; }

@media (max-width: 768px) {
    .product-row__btn { display: none; }
    .portal-hero__content { padding: 2rem 1.25rem; }
    /* On small mobile also cap the featured hero */
    .portal-hero:not(.portal-hero--livestream):not(.portal-hero--webinar) { min-height: 40vh; }
}

/* ---- Video card ---- */

.video-card {
    flex: 0 0 240px;
    text-decoration: none;
    color: inherit;
    scroll-snap-align: start;
}

.video-card__thumb-wrap {
    position: relative;
    overflow: hidden;
    border-radius: 4px;
    aspect-ratio: 16 / 9;
    background: linear-gradient(135deg, #4E0941 0%, #7B1F5C 100%);
    transition: transform 0.2s ease;
}

.video-card:hover .video-card__thumb-wrap { transform: scale(1.03); }

.video-card__thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.video-card__link {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
}

.video-card__title {
    margin-top: 0.5rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: #fff;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    white-space: normal;
    min-height: calc(0.85rem * 1.4 * 2);
    line-height: 1.4;
}

.video-card__meta {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.65);
    margin-top: 0.15rem;
}

/* ---- Video detail ---- */

.product-theme--thermage-flx     { --product-color: #4E0941; }
.product-theme--clear-brilliant  { --product-color: #2c5b7a; }
.product-theme--fraxel           { --product-color: #1f7a5c; }
.product-theme--vaser            { --product-color: #7a4f1f; }

.video-detail-body { background: var(--product-color, var(--brand-dark)); }

.video-detail {
    padding: 2.5rem 2rem 2rem;
    color: #fff;
    max-width: 1200px;
    margin: 0 auto;
}

.video-detail__title {
    font-size: clamp(1.6rem, 2.6vw, 2.2rem);
    font-weight: 700;
    text-transform: uppercase;
    margin: 0 0 1.5rem 0;
    letter-spacing: 0.04em;
}

.video-detail__info-title {
    font-size: clamp(1.1rem, 1.8vw, 1.4rem);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin: 0 0 1rem 0;
    color: #fff;
}

.video-detail__main {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 2rem;
}

@media (max-width: 880px) {
    .video-detail__main { grid-template-columns: 1fr; }
}

.video-detail__embed,
.video-detail__poster {
    position: relative;
    aspect-ratio: 16 / 9;
    background: #000;
    border-radius: 6px;
    overflow: hidden;
}

.video-detail__embed iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.video-detail__frame-overlay {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    pointer-events: none;
    z-index: 1;
    transition: opacity .3s;
}

.video-detail__poster {
    background-size: cover;
    background-position: center;
    cursor: pointer;
}

.video-detail__poster::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.25);
}

.video-detail__poster-play {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.92);
    color: var(--brand-dark);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
}

.video-detail__poster-play svg { width: 32px; height: 32px; margin-left: 4px; }

.video-detail__info { color: rgba(255, 255, 255, 0.95); }

.video-detail__lead {
    line-height: 1.55;
    margin: 0 0 1.25rem 0;
}

.video-detail__facts {
    list-style: none;
    margin: 0 0 1.25rem 0;
    padding: 0;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.85);
}

.video-detail__facts li { margin-bottom: 0.25rem; }

/* Below section: speaker | product logo | tags in three columns */

.video-detail__below {
    display: flex;
    align-items: flex-start;
    gap: 2rem;
    flex-wrap: wrap;
    margin-top: 2.5rem;
}

.video-detail__speaker-col {
    flex: 0 0 300px;
    max-width: 320px;
}

.video-detail__speaker-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.75rem;
}

.video-detail__speaker-photo {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    background: rgba(255, 255, 255, 0.15);
    flex-shrink: 0;
}

.video-detail__speaker-name {
    font-weight: 400;
    font-size: 0.95rem;
    margin: 0;
    line-height: 1.4;
}

.video-detail__speaker-cv {
    font-size: 0.82rem;
    color: rgba(255, 255, 255, 0.78);
    line-height: 1.5;
    margin: 0;
}

.video-detail__speaker-col.speaker-transition {
    animation: speaker-fade .5s ease;
}

@keyframes speaker-fade {
    0%   { opacity: 0; transform: translateY(4px); }
    100% { opacity: 1; transform: translateY(0); }
}

/* Speaker cycler (VOD sidebar + hero) */
.speaker-cycler {
    margin: 1rem 0 0.25rem;
}

.speaker-cycler__slide {
    display: none;
    align-items: center;
    gap: 0.75rem;
}

.speaker-cycler__slide.is-active {
    display: flex;
    animation: spFade 0.5s ease;
}

@keyframes spFade {
    from { opacity: 0; transform: translateX(-6px); }
    to   { opacity: 1; transform: translateX(0); }
}

.speaker-cycler__photo {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    border: 2px solid rgba(255,255,255,0.25);
}

.speaker-cycler__name {
    font-weight: 600;
    font-size: 0.95rem;
    color: #fff;
    line-height: 1.3;
}

.speaker-cycler__info { display: flex; flex-direction: column; gap: 0.15rem; }

.speaker-cycler__country {
    font-size: 0.78rem;
    color: rgba(255,255,255,0.65);
}

.speaker-cycler__dots {
    display: flex;
    gap: 6px;
    margin-top: 0.5rem;
    padding-left: 2px;
}

.speaker-cycler__dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    border: none;
    background: rgba(255,255,255,0.3);
    cursor: pointer;
    padding: 0;
    transition: background 0.2s;
}

.speaker-cycler__dot.is-active {
    background: #fff;
}

/* Hero-specific cycler overrides */
.speaker-cycler--hero {
    margin: 0.5rem 0 0;
}

.speaker-cycler--hero .speaker-cycler__photo {
    width: 48px;
    height: 48px;
}

/* Chapters: body layout + multi-speaker + active state */
.video-chapters__body {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    flex: 1;
}

.video-chapters__speakers {
    font-size: 0.75rem;
    color: #7a6770;
    font-style: italic;
}

.video-chapters__item.is-active .video-chapters__btn {
    background: var(--brand, #7B1F5C);
}

.video-chapters__item.is-active .video-chapters__time,
.video-chapters__item.is-active .video-chapters__label,
.video-chapters__item.is-active .video-chapters__speakers {
    color: #fff;
}

.video-chapters__item.is-active .video-chapters__time {
    font-weight: 700;
}

/* Speaker dots variant for light backgrounds */
.speaker-cycler__dots--dark .speaker-cycler__dot {
    background: rgba(78, 9, 65, 0.25);
}

.speaker-cycler__dots--dark .speaker-cycler__dot.is-active {
    background: var(--brand, #7B1F5C);
}

.video-detail__logo-wrap {
    flex: 0 0 auto;
    align-self: center;
    padding: 0;
}

@media (max-width: 720px) {
    .video-detail__below { gap: 1.25rem; }
    .video-detail__speaker-col { flex-basis: 100%; }
    .video-detail__logo-wrap   { align-self: flex-start; }
}

.video-detail__product-logo {
    margin-left: auto;
    max-height: 56px;
    max-width: 180px;
    width: auto;
    height: auto;
    object-fit: contain;
    flex-shrink: 0;
    align-self: center;
    filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.25));
}

@media (max-width: 640px) {
    .video-detail__product-logo {
        margin-left: 0;
        max-height: 40px;
    }
}

.tag-chip--tag {
    color: rgba(255, 255, 255, 0.85);
    font-style: italic;
}

/* =========================================================================
   Admin: settings hub, sub-page back-link, sectioned forms
   ========================================================================= */

.admin-subtitle {
    color: #6b5c64;
    margin: -0.5rem 0 1.5rem;
    font-size: 0.9rem;
}

.admin-back {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #ece5ea;
    color: var(--brand-dark);
    text-decoration: none;
    font-size: 1.1rem;
    margin-right: 0.5rem;
}

.admin-back:hover { background: var(--brand); color: #fff; }

.settings-hub {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
}

.settings-card {
    display: block;
    background: #fff;
    border: 1px solid #ece5ea;
    border-radius: 6px;
    padding: 1.25rem 1.5rem;
    text-decoration: none;
    color: inherit;
    transition: border-color 0.15s ease, transform 0.15s ease;
}

.settings-card:hover {
    border-color: var(--brand);
    transform: translateY(-1px);
}

.settings-card h2 {
    margin: 0 0 0.4rem 0;
    font-size: 1rem;
    color: var(--brand-dark);
    font-weight: 600;
}

.settings-card p {
    margin: 0;
    font-size: 0.85rem;
    color: #6b5c64;
    line-height: 1.5;
}

.admin-form--wide { max-width: 880px; }

.settings-section {
    border: 1px solid #ece5ea;
    border-radius: 6px;
    padding: 1rem 1.25rem 1.25rem;
    margin: 0 0 1.5rem;
    background: #faf6f8;
}

.settings-section legend {
    padding: 0 0.5rem;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--brand-dark);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.mode-switch {
    display: flex;
    gap: 1rem;
    margin: 0.4rem 0 0.85rem;
}

.mode-switch .check { color: var(--text); margin: 0; }

/* Trumbowyg integration with admin forms */
.trumbowyg-box,
.trumbowyg-editor {
    background: #fff;
    border-radius: 4px;
}

.trumbowyg-box {
    border: 1px solid #cbb9c2;
    margin: 0;
}

.trumbowyg-box.trumbowyg-fullscreen {
    z-index: 9999;
}

.trumbowyg-button-pane {
    background: #faf6f8 !important;
    border-bottom: 1px solid #ece5ea !important;
}

.trumbowyg-editor {
    min-height: 240px;
    padding: 0.85rem 1rem;
    font-family: inherit;
    color: #2a1a25;
}

/* =========================================================================
   Public CMS pages (privacy / imprint / contact)
   ========================================================================= */

.cms-page {
    max-width: 760px;
    margin: 1rem auto;
    padding: 1.5rem 2rem 3rem;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 6px;
    color: rgba(255, 255, 255, 0.92);
    line-height: 1.65;
}

.cms-page h1 {
    margin: 0 0 1.25rem 0;
    color: #fff;
    font-size: 1.6rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.cms-page h2 { color: #fff; margin: 1.5rem 0 0.5rem; font-size: 1.2rem; }
.cms-page h3 { color: rgba(255, 255, 255, 0.9); margin: 1.25rem 0 0.4rem; font-size: 1rem; }
.cms-page p  { margin: 0 0 0.85rem; }
.cms-page ul, .cms-page ol { padding-left: 1.5rem; margin: 0 0 0.85rem; }
.cms-page a  { color: #fff; text-decoration: underline; }
.cms-page a:hover { opacity: 0.85; }

.cms-intro {
    margin: 0 0 1.5rem;
    padding: 0 0 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    color: rgba(255, 255, 255, 0.85);
}

.contact-form .admin-field span { color: rgba(255, 255, 255, 0.7); }

.contact-form .admin-field input,
.contact-form .admin-field textarea {
    width: 100%;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: #fff;
    border-radius: 4px;
    padding: 0.55rem 0.7rem;
    font: inherit;
}

.contact-form .admin-field input:focus,
.contact-form .admin-field textarea:focus {
    outline: none;
    border-color: #fff;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.1);
}

/* =========================================================================
   Account: welcome banner + notification subscriptions
   ========================================================================= */

.account-welcome {
    background: linear-gradient(135deg, var(--brand), var(--brand-dark));
    color: #fff;
    border-radius: 6px;
    padding: 1.5rem 2rem;
    margin: 0 2rem 1.5rem;
}

.account-welcome h2 {
    margin: 0 0 0.5rem;
    font-size: 1.3rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.account-welcome p { margin: 0; line-height: 1.55; opacity: 0.95; }

.notif-products {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 0.5rem;
    margin: 0.5rem 0 1rem;
}

.notif-product {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.6rem 0.85rem;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 4px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: background-color 0.15s ease;
}

.notif-product:hover { background: rgba(255, 255, 255, 0.12); }

.notif-product input[type="checkbox"] {
    accent-color: #f5b400;
    flex-shrink: 0;
}

/* =========================================================================
   Video detail: play / resume / restart button row
   ========================================================================= */

.video-detail__playctrl {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.video-detail__playctrl [data-show-state] { display: none; }

.video-detail__playctrl[data-state="paused"]  [data-show-state="paused"],
.video-detail__playctrl[data-state="playing"] [data-show-state="playing"],
.video-detail__playctrl[data-state="fresh"]   [data-show-state="fresh"] {
    display: inline-flex;
}

.video-resume-banner__time {
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    margin-left: 0.4rem;
}

/* Resume banner above the embedded player */
.video-resume-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.75rem;
    padding: 0.65rem 1rem;
    margin-bottom: 0.5rem;
    background: rgba(245, 180, 0, 0.15);
    border: 1px solid rgba(245, 180, 0, 0.5);
    border-radius: 4px;
    color: #fff;
    font-size: 0.88rem;
}

.video-resume-banner__text { flex: 1 1 auto; }

.video-resume-banner__btn {
    flex: 0 0 auto;
    padding: 0.4rem 0.85rem;
    font: inherit;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    background: rgba(255, 255, 255, 0.95);
    color: var(--brand-dark);
    border: 0;
    border-radius: 999px;
    cursor: pointer;
    transition: background-color 0.15s ease;
}

.video-resume-banner__btn:hover { background: #fff; }

.video-resume-banner__btn--primary {
    background: #fff;
    color: var(--brand-dark);
}

.video-resume-banner__actions {
    display: flex;
    gap: 0.4rem;
    flex-wrap: wrap;
}

/* State-machine: show/hide elements based on banner data-state */
.video-resume-banner [data-show-state] { display: none; }

.video-resume-banner[data-state="paused"]  span[data-show-state="paused"],
.video-resume-banner[data-state="playing"] span[data-show-state="playing"],
.video-resume-banner[data-state="fresh"]   span[data-show-state="fresh"] {
    display: inline;
}

.video-resume-banner[data-state="paused"]  button[data-show-state="paused"],
.video-resume-banner[data-state="playing"] button[data-show-state="playing"],
.video-resume-banner[data-state="fresh"]   button[data-show-state="fresh"] {
    display: inline-flex;
}

.video-resume-banner__time {
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.video-detail__tags {
    flex: 1 1 auto;
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    align-self: center;
}

.tag-chip {
    display: inline-block;
    padding: 0.35rem 0.85rem;
    color: rgba(255, 255, 255, 0.95);
    text-decoration: none;
    font-size: 0.78rem;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.25);
    transition: background-color 0.15s ease;
}

.tag-chip:hover { background: rgba(255, 255, 255, 0.18); }

.video-detail__related {
    background: #2a2a2a;
    padding: 2rem 0;
    margin-top: 2rem;
}

/* ---- Buttons specific to portal ---- */

.btn-light {
    background: #fff;
    color: var(--brand-dark);
    border-color: #fff;
}

.btn-light:hover, .btn-light:focus-visible {
    background: rgba(255, 255, 255, 0.85);
    color: var(--brand-dark);
}

.btn-outline-light {
    background: transparent;
    color: #fff;
    border-color: rgba(255, 255, 255, 0.7);
}

.btn-outline-light:hover, .btn-outline-light:focus-visible {
    background: rgba(255, 255, 255, 0.15);
    border-color: #fff;
    color: #fff;
}

/* ---- Catalog ---- */

.portal-main--catalog { padding-right: 0; padding-left: 0; padding-bottom: 2rem; }

/* Teal background for all catalog/subpages */
body.portal-body--teal { background: #2a7889; }
/*body.portal-body--teal { background: #160520; }*/

.catalog-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
    padding: 2rem 2rem 1rem;
}

.catalog-title {
    color: #fff;
    margin: 0;
    font-size: 1.5rem;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.04em;
}

.catalog-search {
    display: flex;
    gap: 0.5rem;
}

.catalog-search input[type="search"] {
    padding: 0.45rem 0.7rem;
    border: 1px solid rgba(255, 255, 255, 0.35);
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    border-radius: 4px;
    font: inherit;
    min-width: 220px;
}

.catalog-search input[type="search"]::placeholder { color: rgba(255, 255, 255, 0.55); }

.catalog-section { margin-bottom: 2.5rem; }
.catalog-section__title {
    font-size: 1.5rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase;
    color: rgba(255,255,255,.95); padding: 0 2rem .75rem; margin: 0 0 .25rem;
}
.catalog-section__subtitle {
    font-size: 1rem; font-weight: 700; letter-spacing: .03em; text-transform: uppercase;
    color: rgba(255,255,255,.65); padding: 0 2rem .6rem; margin: 0;
}

.catalog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1rem 0.75rem;
    padding: 0 2rem;
}

.catalog-grid .video-card { flex: none; width: auto; }

/* ---- Speaker Profile (catalog/speaker/slug) ---- */

.speaker-profile {
    display: flex;
    align-items: flex-start;
    gap: 2rem;
    margin: 0 2rem 2rem;
    padding: 1.5rem 2rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
}

.speaker-profile__photo-wrap {
    flex-shrink: 0;
}

.speaker-profile__photo {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    object-fit: cover;
    display: block;
}

.speaker-profile__photo--empty {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    background: linear-gradient(135deg, #4E0941, #7B1F5C);
    display: block;
}

.speaker-profile__info {
    flex: 1;
    min-width: 0;
}

.speaker-profile__title {
    margin: 0 0 0.2rem;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.55);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.speaker-profile__name {
    margin: 0 0 0.75rem;
    font-size: 1.4rem;
    font-weight: 700;
    color: #fff;
}

.speaker-profile__cv {
    margin: 0;
    font-size: 0.88rem;
    color: rgba(255, 255, 255, 0.75);
    line-height: 1.6;
}

@media (max-width: 600px) {
    .speaker-profile {
        flex-direction: column;
        align-items: center;
        text-align: center;
        margin: 0 1rem 1.5rem;
        padding: 1.25rem;
    }
}

/* ---- Footer ---- */

.portal-footer {
    background: #1a1a1a;
    color: rgba(255, 255, 255, 0.7);
    padding: 1.5rem 2rem;
    font-size: 0.75rem;
    text-align: center;
}

.portal-footer__social {
    display: flex;
    justify-content: center;
    gap: 1.1rem;
    margin-bottom: 1.25rem;
}
.portal-footer__social a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    color: rgba(255,255,255,.7);
    background: rgba(255,255,255,.08);
    transition: background .15s, color .15s;
    text-decoration: none;
}
.portal-footer__social a:hover {
    background: rgba(255,255,255,.18);
    color: #fff;
}
.portal-footer__social svg { width: 18px; height: 18px; }

.portal-footer__links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: .5rem 1.25rem;
    margin-bottom: 1rem;
}

.portal-footer__links a {
    color: #fff;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-size: 0.78rem;
    word-break: keep-all;
    white-space: nowrap;
}

.portal-footer__links a:hover { text-decoration: underline; }

.portal-footer__cookie-btn {
    background: none;
    border: none;
    padding: 0;
    margin: 0;
    cursor: pointer;
    color: #fff;
    font: inherit;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-size: 0.72rem;
    white-space: nowrap;
}
.portal-footer__cookie-btn:hover { text-decoration: underline; }

.portal-footer__legal {
    margin: 0 auto;
    line-height: 1.5;
    max-width: 1100px;
}

.portal-empty {
    color: rgba(255, 255, 255, 0.7);
    text-align: center;
    padding: 3rem 2rem;
}

/* ---- Premium teaser row (visible to General-group users) ---- */
.premium-teaser {
    padding: 2rem 2rem 2.5rem;
}
.premium-teaser__label {
    font-size: .72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: rgba(255,255,255,.45);
    margin-bottom: .75rem;
}
.premium-teaser__row {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    scrollbar-width: none;
}
.premium-teaser__row::-webkit-scrollbar { display: none; }
.premium-teaser__card {
    flex: 0 0 240px;
    cursor: default;
    user-select: none;
}
.premium-teaser__thumb-wrap {
    position: relative;
    aspect-ratio: 16/9;
    border-radius: 6px;
    overflow: hidden;
    background: #1a0d16;
}
.premium-teaser__thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.premium-teaser__thumb--empty {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #2a1a25 0%, #1a0d16 100%);
}
.premium-teaser__lock {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255,255,255,.6);
}
.premium-teaser__title {
    margin: .4rem 0 0;
    font-size: .78rem;
    color: rgba(255,255,255,.45);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ---- Video card refactor: anchor inside wrapper, favorite button on top ---- */

.video-card {
    flex: 0 0 240px;
    scroll-snap-align: start;
    position: relative;
}

.catalog-grid .video-card { flex: none; width: auto; }

.video-card__link {
    display: block;
    text-decoration: none;
    color: inherit;
}

.video-card__link:hover .video-card__thumb-wrap { transform: scale(1.03); }

/* ---- Favorite toggle ---- */

.favorite-toggle {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.6);
    color: rgba(255, 255, 255, 0.85);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.15s ease, color 0.15s ease, transform 0.15s ease;
    z-index: 3;
}

.favorite-toggle svg {
    width: 18px;
    height: 18px;
    transition: fill 0.15s ease;
    fill: none;
}

.favorite-toggle:hover {
    background: rgba(0, 0, 0, 0.85);
    color: #fff;
    transform: scale(1.05);
}

.favorite-toggle.is-active {
    color: #f5b400;
}

.favorite-toggle.is-active svg {
    fill: currentColor;
    stroke: currentColor;
}

.favorite-toggle--inline {
    position: static;
    width: auto;
    height: auto;
    padding: 0.35rem 0.85rem;
    border-radius: 4px;
    background: transparent;
    border: 0;
    color: #fff;
    font: inherit;
    font-size: 0.78rem;
    gap: 0.4rem;
}

.favorite-toggle--inline:hover { background: rgba(255, 255, 255, 0.18); transform: none; }
.favorite-toggle--inline.is-active { color: #f5b400; background: transparent; }
.favorite-toggle--inline.is-active svg { fill: currentColor; stroke: currentColor; }
.favorite-toggle__label { letter-spacing: 0.04em; text-transform: uppercase; }

/* ---- Trainers grid ---- */

.trainers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 1.25rem 1rem;
    padding: 0 2rem 2rem;
}

.trainer-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    text-decoration: none;
    color: #fff;
    padding: 1rem 0.75rem;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: transform 0.15s ease, background-color 0.15s ease;
}

.trainer-card:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

.trainer-card__photo {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    object-fit: cover;
    background: rgba(255, 255, 255, 0.15);
    margin-bottom: 0.75rem;
    display: block;
}

.trainer-card__photo--empty {
    background: linear-gradient(135deg, #4E0941, #7B1F5C);
}

.trainer-card__name {
    font-weight: 600;
    font-size: 0.95rem;
}

.trainer-card__count {
    margin-top: 0.2rem;
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.6);
}

.trainer-card__cv {
    margin: 0.6rem 0 0 0;
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.45;
}

/* ---- Account ---- */

.account-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1.25rem;
    padding: 0 2rem 2rem;
}

.account-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    padding: 1.25rem 1.5rem;
    color: #fff;
}

.account-card--danger {
    border-color: rgba(248, 113, 113, 0.45);
}

.btn-danger {
    background: #b91c1c;
    color: #fff;
    border: 1px solid #b91c1c;
}
.btn-danger:hover {
    background: #991b1b;
    border-color: #991b1b;
}

.account-card__title {
    font-size: 1.05rem;
    margin: 0 0 0.5rem 0;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-weight: 600;
}

.account-card__hint {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.65);
    margin: 0 0 1rem 0;
    line-height: 1.5;
}

.account-card .admin-field span {
    color: rgba(255, 255, 255, 0.7);
}

.account-card .admin-field input {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.25);
    color: #fff;
}

.account-card .admin-field input:focus {
    border-color: #fff;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.1);
}

@media (max-width: 720px) {
    .admin-layout {
        grid-template-columns: 1fr;
    }
    .admin-sidebar {
        padding: 0.5rem 0;
    }
    .admin-nav {
        flex-direction: row;
        flex-wrap: wrap;
        padding: 0 0.5rem;
    }
    .admin-nav__link {
        border-left: none;
        border-bottom: 3px solid transparent;
        padding: 0.5rem 0.85rem;
    }
    .admin-nav__link.is-active {
        border-bottom-color: var(--brand);
        border-left: none;
    }
    .admin-main {
        padding: 1rem;
    }
}

/* ============================================================
   New features â€” Phase 6
   ============================================================ */

/* ---- Side menu backdrop ---- */
.side-menu-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 140;
    cursor: pointer;
}
body.side-menu-open .side-menu-backdrop { display: block; }

/* ---- Video card progress bar ---- */
.video-card__progress {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: rgba(255, 255, 255, 0.2);
}
.video-card__progress-fill {
    height: 100%;
    background: var(--progress, #1AB7EA);
    border-radius: 0 2px 2px 0;
    transition: width 0.3s ease;
}

/* ---- Livestream hero with embedded player ---- */
.portal-hero--livestream {
    min-height: 0;
}
.portal-hero__overlay--live {
    position: relative;
    background: linear-gradient(135deg, rgba(78,9,65,0.97) 0%, rgba(123,31,92,0.95) 100%);
    display: grid;
    grid-template-columns: 1fr 1.65fr;
    align-items: center;
    gap: 2.5rem;
    padding: 2.5rem 3rem;
    min-height: 45vh;
}
.portal-hero__embed {
    aspect-ratio: 16 / 9;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}
.portal-hero__embed iframe {
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
}
@media (max-width: 900px) {
    .portal-hero__overlay--live {
        grid-template-columns: 1fr;
        padding: 1.5rem;
        gap: 1.5rem;
    }
    .portal-hero__embed { order: -1; }
}

/* ── Mobile hamburger in header ── */
.portal-header__hamburger {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: .4rem;
    color: #2a1a25;
    flex-shrink: 0;
}
.portal-header__hamburger:hover { color: var(--brand, #7B1F5C); }

/* ---- Responsive portal header ---- */
@media (max-width: 960px) {
    .portal-header {
        padding: 0.4rem 0.85rem;
    }
    .portal-header__hamburger { display: inline-flex; }
    .portal-main { padding-top: 54px; }
}
@media (max-width: 600px) {
    .portal-header__logo img { height: 38px; }
    .portal-header__nav { gap: 0.75rem; }
    .portal-main { padding-top: 50px; }
}
@media (max-width: 360px) {
    .portal-header__icon--dl { display: none; }
}

/* ---- Keyboard focus outline for video cards ---- */
.video-card a:focus-visible,
.video-card__link:focus-visible {
    outline: 2px solid var(--brand, #7B1F5C);
    outline-offset: 2px;
    border-radius: 4px;
}
.video-card:focus-within .video-card__thumb-wrap {
    box-shadow: 0 0 0 2px var(--brand, #7B1F5C);
}

/* ---- Livestream hero: countdown, preview image, speaker card ---- */
.portal-hero__pill--upcoming {
    background: rgba(255,255,255,0.15);
    color: #fff;
    border: 1px solid rgba(255,255,255,0.3);
}
.portal-hero__pill--ended {
    background: rgba(255,255,255,0.1);
    color: rgba(255,255,255,0.7);
    border: 1px solid rgba(255,255,255,0.2);
}
.portal-hero__pill--cancelled {
    background: rgba(192,57,43,0.35);
    color: #fff;
    border: 1px solid rgba(192,57,43,0.6);
}
.portal-hero__countdown {
    font-size: 2.2rem;
    font-weight: 700;
    letter-spacing: .04em;
    color: #fff;
    margin: .25rem 0 .75rem;
    font-variant-numeric: tabular-nums;
}
.portal-hero__preview {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    box-shadow: 0 10px 40px rgba(0,0,0,.5);
}
.portal-hero__preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .3s ease;
}
.portal-hero__preview:hover img { transform: scale(1.03); }
.portal-hero__preview-btn {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    background: rgba(0,0,0,.22);
    color: #fff;
    font-size: .95rem;
    font-weight: 700;
    letter-spacing: .05em;
    text-transform: uppercase;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: background .2s;
}
.portal-hero__preview-btn:hover { background: rgba(0,0,0,.42); }
.portal-hero__preview-icon { width: 56px; height: 56px; background: rgba(255,255,255,.15); border-radius: 50%; display: flex; align-items: center; justify-content: center; }
.portal-hero__preview-icon svg { width: 28px; height: 28px; }
.portal-hero__preview-static {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    display: block;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0,0,0,.5);
}
.portal-hero__embed-placeholder {
    aspect-ratio: 16 / 9;
    border-radius: 8px;
    background: rgba(255,255,255,.05);
    border: 1px solid rgba(255,255,255,.1);
}
.portal-hero__speaker {
    display: flex;
    align-items: center;
    gap: .75rem;
    margin-top: .9rem;
    padding-top: .9rem;
    border-top: 1px solid rgba(255,255,255,.15);
}
.portal-hero__speaker-photo {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    border: 2px solid rgba(255,255,255,.3);
}
.portal-hero__speaker-info {
    display: flex;
    flex-direction: column;
    gap: .15rem;
}
.portal-hero__speaker-name {
    color: #fff;
    font-size: .9rem;
    font-weight: 600;
}
.portal-hero__speaker-country {
    color: rgba(255,255,255,.65);
    font-size: .78rem;
}

.portal-header__user-drop-back {
    display: block;
    width: 100%;
    padding: .55rem 1.1rem;
    font-size: .88rem;
    font-weight: 700;
    color: var(--brand, #7B1F5C);
    text-align: left;
    background: none;
    border: none;
    cursor: pointer;
    white-space: nowrap;
    font-family: inherit;
}
.portal-header__user-drop-back:hover {
    background: #f7f2f6;
    color: var(--brand, #7B1F5C);
}
.side-menu__link--back-admin {
    width: 100%;
    background: none;
    border: none;
    cursor: pointer;
    font-family: inherit;
    text-align: left;
    color: #f59e0b;
    font-weight: 700;
    margin-top: 0.5rem;
    padding-top: 0.6rem;
    border-top: 1px dashed rgba(255,255,255,0.3);
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

/* ================================================================
   Video chapters / timeline
   ================================================================ */
.video-chapters {
    max-width: 720px;
    margin: 1.5rem auto;
    background: #fff;
    border: 1px solid #e5dde9;
    border-radius: 8px;
    overflow: hidden;
}
.video-chapters__title {
    font-size: .8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: #6b5c64;
    padding: .65rem 1rem;
    margin: 0;
    border-bottom: 1px solid #e5dde9;
    background: #faf8fa;
}
.video-chapters__list {
    list-style: none;
    margin: 0;
    padding: 0;
}
.video-chapters__item {
    border-bottom: 1px solid #f0e8ee;
}
.video-chapters__item:last-child { border-bottom: none; }
.video-chapters__btn {
    display: flex;
    align-items: center;
    gap: .75rem;
    width: 100%;
    padding: .6rem 1rem;
    background: none;
    border: none;
    cursor: pointer;
    text-align: left;
    transition: background .15s;
}
.video-chapters__btn:hover { background: #f5eff4; }
.video-chapters__time {
    flex-shrink: 0;
    font-size: .75rem;
    font-weight: 700;
    color: var(--brand-color, #4E0941);
    font-variant-numeric: tabular-nums;
    min-width: 3rem;
}
.video-chapters__label {
    font-size: .88rem;
    color: #2a1a25;
    flex: 1;
}
.video-chapters__speaker {
    font-size: .75rem;
    color: #9b8c94;
    flex-shrink: 0;
}

/* ================================================================
   Video Q&A (on-demand video page + hero livestream)
   ================================================================ */
.video-qa {
    margin: 1.5rem auto;
    max-width: 720px;
    background: #fff;
    border: 1px solid #e5dde9;
    border-radius: 8px;
    padding: 1.25rem 1.5rem;
}
.video-qa__title {
    font-size: 1rem;
    font-weight: 700;
    color: #2a1a25;
    margin: 0 0 1rem;
}
.video-qa__form {
    display: flex;
    flex-direction: column;
    gap: .75rem;
}
.video-qa__form label {
    display: flex;
    flex-direction: column;
    gap: .3rem;
    font-size: .85rem;
    font-weight: 600;
    color: #4a3042;
}
.video-qa__form select,
.video-qa__form textarea {
    padding: .45rem .75rem;
    border: 1px solid #ccc4c8;
    border-radius: 6px;
    font-size: .9rem;
    background: #faf8fa;
    font-family: inherit;
    resize: vertical;
    transition: border-color .15s;
}
.video-qa__form select:focus,
.video-qa__form textarea:focus {
    outline: none;
    border-color: var(--brand-color, #4E0941);
    background: #fff;
}

/* Hero-specific Q&A wrapper — sits between hero and video rows */
.hero-qa {
    background: #f6f1f5;
    border-top: 2px solid #e5dde9;
    border-bottom: 2px solid #e5dde9;
}
.hero-qa__inner {
    
    margin: 0 auto;
    padding: 1.75rem 1rem;
}
.hero-qa .video-qa__title {
    font-size: 1.1rem;
}

/* ================================================================
   Legal popup / modal (registration terms & privacy)
   ================================================================ */
.legal-popup-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.72);
    z-index: 900;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}
.legal-popup-overlay.is-open {
    display: flex;
}
.legal-popup {
    background: #fff;
    color: #2a1a25;
    border-radius: 8px;
    max-width: 700px;
    width: 100%;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.45);
}
.legal-popup__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid #e5dde9;
    flex-shrink: 0;
}
.legal-popup__title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--brand-dark);
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.legal-popup__close-x {
    background: none;
    border: none;
    cursor: pointer;
    color: #6b5c64;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    line-height: 1;
    border-radius: 4px;
    transition: background 0.15s ease, color 0.15s ease;
    flex-shrink: 0;
}
.legal-popup__close-x:hover { background: #f0e8ee; color: #2a1a25; }
.legal-popup__body {
    overflow-y: auto;
    padding: 1.5rem 1.25rem;
    flex: 1;
    font-size: 0.9rem;
    line-height: 1.7;
    color: #2a1a25;
}
.legal-popup__body h1,
.legal-popup__body h2,
.legal-popup__body h3 {
    color: var(--brand-dark);
    margin: 1.25rem 0 0.5rem;
}
.legal-popup__body h1:first-child,
.legal-popup__body h2:first-child,
.legal-popup__body h3:first-child { margin-top: 0; }
.legal-popup__body p { margin-bottom: 0.75rem; }
.legal-popup__body ul,
.legal-popup__body ol { padding-left: 1.5rem; margin-bottom: 0.75rem; }
.legal-popup__footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    border-top: 1px solid #e5dde9;
    flex-shrink: 0;
}
.legal-popup__footer .btn-outline {
    color: var(--brand);
    border-color: var(--brand);
}
.legal-popup__footer .btn-outline:hover,
.legal-popup__footer .btn-outline:focus-visible {
    background: var(--brand);
    color: #fff;
    border-color: var(--brand);
}
.check__popup-link {
    background: none;
    border: none;
    cursor: pointer;
    font: inherit;
    font-size: inherit;
    color: #fff;
    text-decoration: underline;
    padding: 0;
    vertical-align: baseline;
}
.check__popup-link:hover { opacity: 0.8; }

/* ================================================================
   404 / error page
   ================================================================ */
.error-page {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem 2rem;
    background: var(--brand-dark);
}
.error-page__card {
    text-align: center;
    color: #fff;
    max-width: 480px;
}
.error-page__code {
    display: block;
    font-size: clamp(5rem, 16vw, 9rem);
    font-weight: 700;
    line-height: 1;
    color: rgba(255, 255, 255, 0.15);
    letter-spacing: -0.02em;
    margin: 0 0 0.25rem;
}
.error-page__title {
    font-size: 1.6rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin: 0 0 0.75rem;
}
.error-page__body {
    color: rgba(255, 255, 255, 0.65);
    margin: 0 0 2rem;
    line-height: 1.55;
    font-size: 1rem;
}

/* ---- Draft badge (admin-only, unpublished videos) ---- */
.video-card--draft { position: relative; }
.video-card__draft-badge {
    position: absolute;
    top: 6px;
    left: 6px;
    z-index: 2;
    background: #f59e0b;
    color: #000;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 2px 7px;
    border-radius: 3px;
    pointer-events: none;
}

/* ==========================================================================
   Webinar hero
   ========================================================================= */

.portal-hero--webinar {
    background: var(--brand-dark);
    overflow: hidden;
    min-height: 0; /* content determines height — no 60vh gap */
}

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

.portal-hero__date {
    font-size: 0.95rem;
    color: rgba(255,255,255,.85);
    margin: 0.5rem 0 0.9rem;
    font-weight: 500;
}

/* Add-to-Calendar dropdown */
.webinar-cal {
    position: relative;
    display: inline-block;
    margin-top: 1.25rem;
}

.webinar-cal__trigger {
    display: inline-flex;
    align-items: center;
    gap: 0.15rem;
}

.webinar-cal__menu {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 9999;
    background: #fff;
    border-radius: 6px;
    box-shadow: 0 8px 24px rgba(0,0,0,.22);
    min-width: 220px;
    overflow: hidden;
    border: 1px solid rgba(0,0,0,.08);
}

.webinar-cal__item {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.7rem 1rem;
    font-size: 0.9rem;
    color: #2a1a25;
    text-decoration: none;
    transition: background 0.12s;
}

.webinar-cal__item:hover {
    background: #f8f5f7;
    color: var(--brand);
}

.webinar-cal__icon {
    flex-shrink: 0;
    display: block;
    opacity: 0.85;
}

/* Webinar hero inline Q&A form */
.wb-inline-qa {
    margin-top: 1.25rem;
    padding: 1rem 1.1rem 1.1rem;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.22);
    border-radius: 10px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}
.wb-inline-qa__title {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.6);
    margin: 0 0 0.65rem;
}
.wb-inline-qa__thanks {
    font-size: 0.85rem;
    color: #a8f0c0;
    margin-bottom: 0.6rem;
}
.wb-inline-qa__torow {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.55rem;
}
.wb-inline-qa__tolabel {
    font-size: 0.82rem;
    font-weight: 600;
    color: rgba(255,255,255,0.85);
    white-space: nowrap;
}
.wb-inline-qa__toselect {
    font-size: 0.82rem;
    padding: 4px 8px;
    border-radius: 5px;
    border: 1px solid rgba(255,255,255,0.35);
    background: rgba(255,255,255,0.12);
    color: #fff;
    max-width: 200px;
}
.wb-inline-qa__toselect option { background: #3a0535; color: #fff; }
.wb-inline-qa__row {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}
.wb-inline-qa__textarea {
    width: 100%;
    box-sizing: border-box;
    font-size: 0.88rem;
    padding: 0.6rem 0.75rem;
    border-radius: 7px;
    border: 1.5px solid rgba(255,255,255,0.4);
    background: rgba(255,255,255,0.13);
    color: #fff;
    resize: vertical;
    min-height: 68px;
    line-height: 1.5;
}
.wb-inline-qa__textarea::placeholder { color: rgba(255,255,255,0.5); }
.wb-inline-qa__textarea:focus {
    outline: none;
    border-color: rgba(255,255,255,0.75);
    background: rgba(255,255,255,0.18);
}
.wb-inline-qa__btn {
    width: 100%;
    padding: 0.55rem 1rem;
    font-size: 0.88rem;
    font-weight: 700;
    letter-spacing: .03em;
    border-radius: 7px;
    text-align: center;
}

/* Admin status/hero badges */
.admin-badge {
    display: inline-block;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: .05em;
    text-transform: uppercase;
    padding: 2px 7px;
    border-radius: 3px;
    margin-left: 6px;
    vertical-align: middle;
}

.admin-badge--active    { background: #16a34a; color: #fff; }
.admin-badge--upcoming  { background: #7B1F5C; color: #fff; }
.admin-badge--live      { background: #dc2626; color: #fff; }
.admin-badge--ended     { background: #6b5c64; color: #fff; }
.admin-badge--cancelled { background: #9e8a96; color: #fff; }

/* ==========================================================================
   Minimal auth layout (set-password, invite-only pages without hero)
   ========================================================================= */

.auth-body {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
    background: var(--brand-dark);
}

.auth-box {
    width: 100%;
    max-width: 420px;
    background: rgba(35, 14, 26, 0.92);
    color: #fff;
    border-radius: 6px;
    padding: 2rem 2rem 1.75rem;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
}

.auth-logo {
    display: block;
    margin-bottom: 1.75rem;
}

.auth-logo img {
    display: block;
    height: 52px;
    width: auto;
}

.auth-title {
    margin: 0 0 0.75rem 0;
    font-size: 1.5rem;
    font-weight: 500;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: #fff;
}

.auth-hint {
    margin: 0 0 1.5rem 0;
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.78);
    line-height: 1.5;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.auth-field {
    display: block;
    position: relative;
    margin: 0 0 1rem 0;
}

.auth-field span {
    display: block;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: rgba(255, 255, 255, 0.65);
    margin-bottom: 0.4rem;
}

.auth-field input {
    display: block;
    width: 100%;
    padding: 0.65rem 0.85rem;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 4px;
    color: #fff;
    font-family: var(--font-stack);
    font-size: 1rem;
    transition: border-color 0.15s ease, background-color 0.15s ease;
}

.auth-field input:focus {
    outline: none;
    border-color: var(--brand);
    background: rgba(255, 255, 255, 0.12);
}

.auth-field input::placeholder { color: rgba(255, 255, 255, 0.45); }

.btn--full {
    display: block;
    width: 100%;
    text-align: center;
    margin-top: 0.5rem;
}

/* ── RTL (Arabic, Hebrew, Farsi, Urdu) ───────────────────────────────────── */
[dir="rtl"] {
    text-align: right;
}
[dir="rtl"] .portal-nav,
[dir="rtl"] .catalog-header,
[dir="rtl"] .admin-form__actions,
[dir="rtl"] .field-row,
[dir="rtl"] .video-detail__facts,
[dir="rtl"] .trainer-card {
    direction: rtl;
}
[dir="rtl"] .video-detail__info { text-align: right; }
[dir="rtl"] .speaker-profile__cv { text-align: right; }
[dir="rtl"] .catalog-search { flex-direction: row-reverse; }
[dir="rtl"] .admin-table th,
[dir="rtl"] .admin-table td { text-align: right; }
