[x-cloak] { display: none !important; }

.ef-w-70 { width: 70px; }
.ef-w-80 { width: 80px; }
.ef-w-120 { width: 120px; }
.ef-narrow { max-width: 640px; }
.ef-scan-frame {
    position: relative;
    overflow: hidden;
    max-height: 380px;
    aspect-ratio: 4 / 3;
    background-color: #000;
}

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

@media (min-width: 768px) {
    .ef-scan-frame { aspect-ratio: 16 / 9; }
}

.ef-event-banner {
    width: 100%;
    overflow: hidden;
    border-radius: var(--bs-border-radius-lg, 0.5rem);
    background: linear-gradient(135deg, var(--bs-secondary-bg), var(--bs-tertiary-bg));
}

.ef-event-banner--hero { aspect-ratio: 21 / 9; }
.ef-event-banner--card { aspect-ratio: 16 / 6; }

@media (max-width: 767.98px) {
    .ef-event-banner--hero { aspect-ratio: 16 / 9; }
    .ef-event-banner--card { aspect-ratio: 16 / 9; }
}

.ef-event-banner img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ef-event-banner__placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    padding: 1rem;
    color: var(--bs-secondary-color);
    text-align: center;
}

.ef-event-thumb {
    width: 100%;
    max-width: 280px;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    border-radius: var(--bs-border-radius);
}

.ef-event-thumb-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 280px;
    aspect-ratio: 16 / 9;
    border: 1px dashed var(--bs-border-color);
    border-radius: var(--bs-border-radius);
    color: var(--bs-secondary-color);
    font-size: 0.8rem;
    text-align: center;
}
.ef-uppercase { text-transform: uppercase; }
.ef-navbar-logout { --bs-btn-padding-y: 0; }

/* Theme: Bootstrap 5.3 data-bs-theme tokens plus a few component overrides. */
:root { color-scheme: light; }
[data-bs-theme="dark"] { color-scheme: dark; }

.ef-body {
    min-height: 100vh;
    background-color: var(--bs-body-bg);
    color: var(--bs-body-color);
}

.ef-navbar {
    background-color: var(--bs-tertiary-bg);
    border-bottom: 1px solid var(--bs-border-color);
    --bs-navbar-color: var(--bs-secondary-color);
    --bs-navbar-hover-color: var(--bs-emphasis-color);
    --bs-navbar-active-color: var(--bs-emphasis-color);
    --bs-navbar-brand-color: var(--bs-emphasis-color);
    --bs-navbar-brand-hover-color: var(--bs-emphasis-color);
    --bs-navbar-toggler-border-color: var(--bs-border-color);
}

.ef-navbar .navbar-brand {
    padding-top: 0;
    padding-bottom: 0;
    font-weight: 600;
    letter-spacing: 0.01em;
}

.ef-navbar .nav-link {
    border-radius: var(--bs-border-radius-sm);
}

.ef-navbar .nav-link:hover,
.ef-navbar .nav-link:focus {
    background-color: var(--bs-secondary-bg);
}

.ef-navbar .navbar-toggler-icon {
    filter: invert(0);
}

[data-bs-theme="dark"] .ef-navbar .navbar-toggler-icon {
    filter: invert(1) grayscale(100%);
}

.text-bg-light {
    background-color: var(--bs-secondary-bg) !important;
    color: var(--bs-body-color) !important;
}

.card,
.modal-content,
.dropdown-menu,
.list-group-item,
.table,
.form-control,
.form-select,
.input-group-text {
    border-color: var(--bs-border-color);
}

.table {
    --bs-table-bg: transparent;
}

.table > :not(caption) > * > * {
    border-bottom-color: var(--bs-border-color);
}

.alert {
    border-color: var(--bs-border-color);
}

.ef-theme-toggle {
    --bs-btn-padding-y: 0.25rem;
    --bs-btn-padding-x: 0.5rem;
    text-decoration: none;
    line-height: 1;
    font-size: 1.15rem;
}

.ef-theme-toggle:hover,
.ef-theme-toggle:focus-visible {
    text-decoration: none;
}

.ef-theme-icon-sun { display: none; }
[data-bs-theme="dark"] .ef-theme-icon-sun { display: inline; }
[data-bs-theme="dark"] .ef-theme-icon-moon { display: none; }

a:focus-visible,
button:focus-visible,
.btn:focus-visible,
.nav-link:focus-visible,
.form-control:focus-visible,
.form-select:focus-visible,
.form-check-input:focus-visible {
    outline: 2px solid var(--bs-primary);
    outline-offset: 2px;
    box-shadow: none;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--bs-primary);
    box-shadow: 0 0 0 0.2rem rgba(var(--bs-primary-rgb), 0.2);
}

code,
pre {
    color: var(--bs-emphasis-color);
}

details > summary {
    cursor: pointer;
}

@media (prefers-reduced-motion: no-preference) {
    .btn,
    .nav-link,
    .form-control,
    .form-select,
    .alert,
    .card {
        transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
    }
}

@media print {
    .ef-navbar,
    .ef-theme-toggle {
        display: none !important;
    }
}

/* Phase 36: platform and organization logos. */
.ef-logo {
    display: inline-block;
    max-width: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    object-position: center;
    background-color: #ffffff;
    padding: 0;
    border-radius: 0.375rem;
}

.ef-logo-navbar {
    max-height: 40px;
    max-width: 180px;
}

.ef-logo-navbar-text {
    font-size: 1.25rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    background: none;
    padding: 0;
}

.ef-logo-auth {
    max-height: 100px;
    max-width: 240px;
    margin: 0 auto;
}

.ef-logo-auth-text {
    font-size: 1.5rem;
    font-weight: 600;
    background: none;
}

.ef-logo-admin-preview {
    max-height: 48px;
    max-width: 180px;
}

.ef-logo-org {
    max-height: 80px;
    max-width: 200px;
    border: 1px solid var(--bs-border-color);
}

.ef-org-identity {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.6rem;
}

.ef-org-identity__name {
    font-weight: 600;
}

.ef-logo-preview {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 140px;
    padding: 1rem;
    border: 1px dashed var(--bs-border-color);
    border-radius: 0.5rem;
    background-color: var(--bs-tertiary-bg);
}

.ef-logo-preview__image {
    max-width: 100%;
    max-height: 120px;
    width: auto;
    height: auto;
    object-fit: contain;
    object-position: center;
}

.ef-logo-preview__empty {
    color: var(--bs-secondary-color);
    text-align: center;
}

.ef-logo-preview__small {
    max-height: 60px;
    max-width: 180px;
    border: 1px solid var(--bs-border-color);
}

/* Phase 36: mobile-first scanner controls (44px minimum touch target). */
.ef-scan-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    gap: 0.5rem;
}

.ef-scan-actions .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    min-width: 44px;
    padding: 0.5rem 1rem;
    font-size: 1rem;
}

@media (max-width: 575.98px) {
    .ef-scan-actions .btn {
        flex: 1 1 100%;
    }

    .ef-scan-frame {
        max-height: 45vh;
    }
}

/* Phase 36: compact event thumbnails for listings. */
.ef-event-thumb-sm {
    display: block;
    width: 64px;
    height: 44px;
    flex: 0 0 64px;
    object-fit: cover;
    border-radius: 0.375rem;
    background-color: var(--bs-secondary-bg);
}

.ef-event-thumb-sm-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 44px;
    flex: 0 0 64px;
    border: 1px dashed var(--bs-border-color);
    border-radius: 0.375rem;
    color: var(--bs-secondary-color);
    font-size: 0.65rem;
    text-align: center;
}

.ef-min-w-0 {
    min-width: 0;
}






/* Phase 38: organizer venue picker. */
.ef-venue-picker-map {
    width: 100%;
    height: 320px;
    min-height: 240px;
    background-color: var(--bs-tertiary-bg);
}

#venue-place-search,
#venue-place-search gmp-place-autocomplete {
    display: block;
    width: 100%;
    max-width: 100%;
}

#venue-place-search gmp-place-autocomplete {
    color-scheme: light dark;
}

@media (max-width: 575.98px) {
    .ef-venue-picker-map {
        height: 240px;
        min-height: 200px;
    }
}

/* Phase 46: multi-day daily schedule editor and display. */
.ef-day-row {
    border-color: var(--bs-border-color);
    background-color: var(--bs-tertiary-bg);
}

.ef-day-row legend.ef-day-row__date {
    float: none;
    width: auto;
    padding: 0 0.35rem;
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
    color: var(--bs-emphasis-color);
}

.ef-schedule-list > li:last-child {
    border-bottom: 0 !important;
}

.ef-schedule-list__date {
    min-width: 10.5rem;
}

@media (max-width: 575.98px) {
    .ef-day-row {
        padding: 0.75rem !important;
    }

    .ef-schedule-list__date {
        min-width: 0;
    }
}

/* ==========================================================================
   Phase 56: Event design studio, public event page and events directory.
   The public event page is themed with CSS custom properties emitted by
   App\Support\Design\EventDesign::css(); every rule below falls back to the
   platform palette so the page still renders correctly before the style
   block is applied.
   ========================================================================== */

.ef-public-body {
    background-color: var(--bs-body-bg);
}

/* ---------- Public event page ---------- */
.ef-event-page {
    --ef-ev-bg: #f6f7fb;
    --ef-ev-surface: #ffffff;
    --ef-ev-text: #1f2937;
    --ef-ev-muted: #5b6472;
    --ef-ev-primary: #4f46e5;
    --ef-ev-accent: #0ea5e9;
    --ef-ev-button: #4f46e5;
    --ef-ev-button-text: #ffffff;
    --ef-ev-link: #4338ca;
    --ef-ev-border: #e2e8f0;
    background: var(--ef-ev-bg);
    color: var(--ef-ev-text);
    padding-bottom: 4rem;
}

.ef-event-page .ef-container {
    width: min(1120px, 100% - 2.5rem);
    margin-inline: auto;
}

.ef-ev-hero {
    padding: 2.5rem 0 2rem;
}

.ef-ev-hero .ef-container {
    display: grid;
    gap: 1.5rem;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
    align-items: stretch;
}

.ef-ev-hero__media {
    position: relative;
    overflow: hidden;
    border-radius: 1.25rem;
    border: 1px solid var(--ef-ev-border);
    background: var(--ef-ev-surface);
    min-height: 320px;
}

.ef-ev-hero__media img {
    width: 100%;
    height: 100%;
    min-height: 320px;
    object-fit: cover;
    display: block;
}

.ef-ev-hero__placeholder {
    display: grid;
    place-items: center;
    height: 100%;
    min-height: 320px;
    background:
        radial-gradient(circle at 30% 20%, color-mix(in srgb, var(--ef-ev-accent) 35%, transparent), transparent 55%),
        linear-gradient(135deg, var(--ef-ev-primary), var(--ef-ev-accent));
    color: #fff;
    font-size: 6rem;
    font-weight: 800;
    letter-spacing: -0.04em;
}

.ef-ev-hero__content {
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
    justify-content: center;
}

.ef-ev-org {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    color: var(--ef-ev-muted);
    font-size: 0.95rem;
    font-weight: 600;
}

.ef-ev-org img {
    max-height: 40px;
    width: auto;
    object-fit: contain;
}

.ef-ev-badge {
    align-self: flex-start;
    background: color-mix(in srgb, var(--ef-ev-primary) 12%, var(--ef-ev-surface));
    color: var(--ef-ev-primary);
    border: 1px solid color-mix(in srgb, var(--ef-ev-primary) 30%, var(--ef-ev-border));
    font-weight: 600;
    padding: 0.35rem 0.7rem;
    border-radius: 999px;
}

.ef-event-page .ef-ev-title {
    margin: 0;
    font-size: clamp(2rem, 4vw, 2.75rem);
    line-height: 1.12;
    letter-spacing: -0.02em;
    color: var(--ef-ev-text);
    overflow-wrap: anywhere;
}

.ef-event-page .ef-ev-lead {
    margin: 0;
    color: var(--ef-ev-muted);
    font-size: 1.075rem;
    max-width: 60ch;
}

.ef-ev-meta-list {
    list-style: none;
    margin: 0.25rem 0 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.ef-ev-chip {
    display: inline-flex;
    align-items: baseline;
    gap: 0.4rem;
    padding: 0.45rem 0.75rem;
    border-radius: 999px;
    border: 1px solid var(--ef-ev-border);
    background: color-mix(in srgb, var(--ef-ev-surface) 92%, var(--ef-ev-bg));
    color: var(--ef-ev-text);
    font-size: 0.9rem;
    max-width: 100%;
}

.ef-ev-chip__label {
    color: var(--ef-ev-muted);
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.ef-ev-chip strong {
    font-weight: 600;
    overflow-wrap: anywhere;
}

.ef-ev-hero__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.9rem;
    margin-top: 0.5rem;
}

.ef-event-page .ef-ev-button {
    display: inline-block;
    background: var(--ef-ev-button);
    color: var(--ef-ev-button-text);
    border: 1px solid var(--ef-ev-button);
    border-radius: 0.7rem;
    padding: 0.8rem 1.4rem;
    font-weight: 600;
    text-decoration: none;
    transition: transform 0.15s ease, filter 0.15s ease;
}

.ef-event-page .ef-ev-button:hover,
.ef-event-page .ef-ev-button:focus-visible {
    color: var(--ef-ev-button-text);
    filter: brightness(1.08);
    transform: translateY(-1px);
}

.ef-event-page .ef-ev-button--block {
    display: block;
    width: 100%;
    text-align: center;
    margin-top: 1rem;
}

.ef-ev-secondary-link {
    color: var(--ef-ev-link);
    font-weight: 600;
    text-decoration: none;
    border-bottom: 1px solid transparent;
}

.ef-ev-secondary-link:hover {
    border-bottom-color: currentColor;
}

.ef-ev-note {
    color: var(--ef-ev-muted);
    font-size: 0.9rem;
}

.ef-ev-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.6fr) minmax(280px, 0.8fr);
    gap: 1.5rem;
    align-items: start;
    padding-top: 1rem;
}

.ef-ev-main,
.ef-ev-aside {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    min-width: 0;
}

.ef-event-page .ef-ev-surface {
    background: var(--ef-ev-surface);
    border: 1px solid var(--ef-ev-border);
    border-radius: 1rem;
}

.ef-event-page .ef-ev-card {
    padding: 1.5rem;
}

.ef-event-page .ef-ev-section-title {
    margin: 0 0 0.9rem;
    font-size: 1.5rem;
    line-height: 1.25;
    letter-spacing: -0.01em;
    color: var(--ef-ev-text);
}

.ef-event-page .ef-ev-section-title--sm {
    font-size: 1.15rem;
}

.ef-event-page .ef-ev-body {
    color: var(--ef-ev-text);
    line-height: 1.65;
    overflow-wrap: anywhere;
}

.ef-ev-description > :last-child {
    margin-bottom: 0;
}

.ef-ev-ticket-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.ef-ev-ticket {
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--ef-ev-border);
}

.ef-ev-ticket:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.ef-ev-ticket__name {
    display: block;
    color: var(--ef-ev-text);
    font-weight: 600;
}

.ef-ev-ticket__price {
    text-align: right;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.ef-ev-ticket__amount {
    font-weight: 700;
    color: var(--ef-ev-text);
}

.ef-ev-status {
    display: inline-block;
    align-self: flex-end;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.15rem 0.45rem;
    border-radius: 999px;
}

.ef-ev-status--open {
    color: #0f5132;
    background: #d1e7dd;
}

.ef-ev-status--closed {
    color: #842029;
    background: #f8d7da;
}

[data-bs-theme="dark"] .ef-ev-status--open {
    color: #a7f3d0;
    background: #064e3b;
}

[data-bs-theme="dark"] .ef-ev-status--closed {
    color: #fecdd3;
    background: #7f1d1d;
}

.ef-event-page .ef-ev-meta {
    color: var(--ef-ev-muted);
    font-size: 0.85rem;
}

.ef-event-page .ef-ev-link,
.ef-event-page a {
    color: var(--ef-ev-link);
}

.ef-event-page .ef-venue-map .btn-primary {
    background: var(--ef-ev-button);
    border-color: var(--ef-ev-button);
    color: var(--ef-ev-button-text);
}

.ef-event-page .text-muted {
    color: var(--ef-ev-muted) !important;
}

@media (max-width: 991.98px) {
    .ef-ev-hero .ef-container {
        grid-template-columns: minmax(0, 1fr);
    }

    .ef-ev-hero__media,
    .ef-ev-hero__media img,
    .ef-ev-hero__placeholder {
        min-height: 240px;
    }

    .ef-ev-layout {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (max-width: 575.98px) {
    .ef-event-page .ef-container {
        width: min(1120px, 100% - 1.5rem);
    }

    .ef-ev-hero {
        padding-top: 1.5rem;
    }

    .ef-ev-hero__content,
    .ef-event-page .ef-ev-card {
        padding: 1.15rem;
    }

    .ef-ev-hero__media,
    .ef-ev-hero__media img,
    .ef-ev-hero__placeholder {
        min-height: 200px;
    }

    .ef-ev-hero__placeholder {
        font-size: 4rem;
    }

    .ef-ev-ticket {
        flex-direction: column;
    }

    .ef-ev-ticket__price {
        text-align: left;
    }

    .ef-ev-status {
        align-self: flex-start;
    }
}

/* ---------- Events directory ---------- */
.ef-directory {
    --ef-dir-bg: #f6f7fb;
    --ef-dir-surface: #ffffff;
    --ef-dir-text: #111827;
    --ef-dir-body: #4b5563;
    --ef-dir-muted: #6b7280;
    --ef-dir-border: #e2e8f0;
    --ef-dir-primary: #4f46e5;
    --ef-dir-primary-soft: #eef2ff;
    --ef-dir-primary-hover: #3730a3;
    --ef-dir-hover-border: #c7d2fe;
    --ef-dir-shadow: rgba(15, 23, 42, 0.04);
    --ef-dir-shadow-hover: rgba(15, 23, 42, 0.1);
    background: var(--ef-dir-bg);
    color: var(--ef-dir-text);
    padding-bottom: 4rem;
}

[data-bs-theme="dark"] .ef-directory {
    --ef-dir-bg: #0b1220;
    --ef-dir-surface: #111a2e;
    --ef-dir-text: #f1f5f9;
    --ef-dir-body: #c3cbdc;
    --ef-dir-muted: #a8b3c7;
    --ef-dir-border: #26324a;
    --ef-dir-primary: #a5b4fc;
    --ef-dir-primary-soft: #1e2a45;
    --ef-dir-primary-hover: #c7d2fe;
    --ef-dir-hover-border: #3b4a6b;
    --ef-dir-shadow: rgba(0, 0, 0, 0.35);
    --ef-dir-shadow-hover: rgba(0, 0, 0, 0.55);
}

.ef-directory .ef-container {
    width: min(1180px, 100% - 2.5rem);
    margin-inline: auto;
}

.ef-directory__hero {
    padding: 3.5rem 0 2.5rem;
    background:
        radial-gradient(circle at 12% 20%, rgba(79, 70, 229, 0.16), transparent 45%),
        radial-gradient(circle at 88% 0%, rgba(14, 165, 233, 0.16), transparent 45%),
        var(--ef-dir-bg);
    border-bottom: 1px solid var(--ef-dir-border);
}

.ef-directory__eyebrow {
    display: inline-block;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--ef-dir-primary);
    margin-bottom: 0.75rem;
}

.ef-directory__title {
    margin: 0 0 0.75rem;
    font-size: clamp(2.1rem, 4vw, 3rem);
    line-height: 1.1;
    letter-spacing: -0.025em;
    color: var(--ef-dir-text);
}

.ef-directory__intro {
    margin: 0;
    max-width: 62ch;
    color: var(--ef-dir-body);
    font-size: 1.075rem;
    line-height: 1.6;
}

.ef-directory__container {
    padding-top: 2.5rem;
}

.ef-directory__layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(300px, 340px);
    /* Place by name: the aside is first in the markup but belongs in the rail. */
    grid-template-areas: "main aside";
    gap: 2rem;
    align-items: start;
}

.ef-directory__main {
    grid-area: main;
    display: flex;
    flex-direction: column;
    gap: 2.75rem;
    min-width: 0;
}

.ef-directory__aside {
    grid-area: aside;
    position: sticky;
    top: 1.5rem;
    min-width: 0;
}

.ef-directory__section-head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 1.15rem;
}

.ef-directory__section-title {
    margin: 0;
    font-size: 1.4rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: var(--ef-dir-text);
}

.ef-directory__section-note {
    font-size: 0.82rem;
    color: var(--ef-dir-muted);
}

.ef-directory__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1.25rem;
}

.ef-directory-card {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: var(--ef-dir-surface);
    border: 1px solid var(--ef-dir-border);
    border-radius: 1rem;
    box-shadow: 0 1px 2px var(--ef-dir-shadow);
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
    min-width: 0;
}

.ef-directory-card:hover,
.ef-directory-card:focus-within {
    transform: translateY(-3px);
    box-shadow: 0 14px 30px var(--ef-dir-shadow-hover);
    border-color: var(--ef-dir-hover-border);
}

.ef-directory-card__media {
    display: block;
    position: relative;
    aspect-ratio: 16 / 9;
    background: linear-gradient(135deg, #4f46e5, #0ea5e9);
    overflow: hidden;
}

.ef-directory-card__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.ef-directory-card__placeholder {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    color: #ffffff;
    font-size: 3rem;
    font-weight: 800;
    letter-spacing: -0.04em;
}

.ef-directory-card__body {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    padding: 1.1rem 1.15rem 1.2rem;
    flex: 1;
}

.ef-directory-card__meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.8rem;
    color: var(--ef-dir-muted);
}

.ef-directory-card__date {
    font-weight: 600;
    color: var(--ef-dir-text);
}

.ef-directory-card__title {
    margin: 0;
    font-size: 1.08rem;
    line-height: 1.3;
    font-weight: 700;
}

.ef-directory-card__title a {
    color: var(--ef-dir-text);
    text-decoration: none;
    overflow-wrap: anywhere;
}

.ef-directory-card__title a:hover {
    color: var(--ef-dir-primary);
}

.ef-directory-card__teaser {
    margin: 0;
    color: var(--ef-dir-body);
    font-size: 0.9rem;
    line-height: 1.55;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.ef-directory-card__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-top: auto;
    padding-top: 0.35rem;
}

.ef-directory-card__tag {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--ef-dir-primary);
    background: var(--ef-dir-primary-soft);
    border-radius: 999px;
    padding: 0.2rem 0.55rem;
}

.ef-directory-card__link {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--ef-dir-primary);
    text-decoration: none;
    white-space: nowrap;
}

.ef-directory-card__link:hover {
    color: var(--ef-dir-primary-hover);
}

/* Compact cards used by the Trending column. */
.ef-directory-card--compact {
    flex-direction: row;
    align-items: stretch;
    border-radius: 0.85rem;
}

.ef-directory-card--compact .ef-directory-card__media {
    flex: 0 0 96px;
    aspect-ratio: auto;
    border-radius: 0;
}

.ef-directory-card--compact .ef-directory-card__placeholder {
    font-size: 1.75rem;
}

.ef-directory-card--compact .ef-directory-card__body {
    padding: 0.7rem 0.85rem;
    gap: 0.3rem;
}

.ef-directory-card--compact .ef-directory-card__title {
    font-size: 0.94rem;
}

.ef-directory-card--compact .ef-directory-card__teaser,
.ef-directory-card--compact .ef-directory-card__tag {
    display: none;
}

.ef-directory-card--compact .ef-directory-card__footer {
    padding-top: 0.1rem;
}

.ef-directory-card--compact .ef-directory-card__link {
    font-size: 0.78rem;
}

.ef-directory__trending-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.ef-directory__section--trending {
    background: var(--ef-dir-surface);
    border: 1px solid var(--ef-dir-border);
    border-radius: 1rem;
    padding: 1.15rem;
}

.ef-directory__section--trending .ef-directory__section-head {
    margin-bottom: 0.9rem;
}

.ef-directory__empty {
    max-width: 540px;
    margin: 3rem auto;
    padding: 3rem 1.5rem;
    text-align: center;
    background: var(--ef-dir-surface);
    border: 1px solid var(--ef-dir-border);
    border-radius: 1.25rem;
}

.ef-directory__empty-icon {
    font-size: 2.75rem;
    color: var(--ef-dir-primary);
    margin-bottom: 0.75rem;
}

.ef-directory__empty h2 {
    font-size: 1.4rem;
    margin-bottom: 0.5rem;
}

.ef-directory__empty p {
    color: var(--ef-dir-body);
    margin-bottom: 1.25rem;
}

.ef-directory__pagination {
    margin-top: 1.75rem;
}

.ef-directory__pagination .pagination {
    margin-bottom: 0;
}

/* Trending can be ordered above the main sections on mobile. */
.ef-directory__layout--trending-first .ef-directory__aside {
    order: -1;
}

@media (max-width: 991.98px) {
    .ef-directory__layout {
        grid-template-columns: minmax(0, 1fr);
        grid-template-areas:
            "aside"
            "main";
    }

    .ef-directory__aside {
        position: static;
        order: -1;
    }

    .ef-directory__section--trending .ef-directory__trending-list {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
        gap: 0.75rem;
    }
}

@media (max-width: 575.98px) {
    .ef-directory .ef-container {
        width: min(1180px, 100% - 1.5rem);
    }

    .ef-directory__hero {
        padding: 2.25rem 0 1.75rem;
    }

    .ef-directory__grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .ef-directory__section--trending .ef-directory__trending-list {
        grid-template-columns: minmax(0, 1fr);
    }
}

/* ---------- Design editor ---------- */
.ef-design-panel {
    background: var(--bs-tertiary-bg);
    border: 1px solid var(--bs-border-color);
    border-radius: 0.75rem;
    padding: 1rem;
}

.ef-design-panel__title {
    margin: 0 0 0.6rem;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--bs-secondary-color);
}

.ef-design-group {
    border: 1px solid var(--bs-border-color);
    border-radius: 0.6rem;
    padding: 0.85rem;
    margin-top: 0.85rem;
    background: var(--bs-body-bg);
}

.ef-design-group legend {
    float: none;
    width: auto;
    padding: 0 0.35rem;
    margin-bottom: 0.35rem;
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--bs-emphasis-color);
}

.ef-design-preview-wrap {
    position: sticky;
    top: 1rem;
}

.ef-design-preview {
    border: 1px solid var(--bs-border-color);
    border-radius: 0.75rem;
    padding: 1.1rem;
    transition: max-width 0.2s ease;
    overflow: hidden;
}

.ef-design-preview--desktop {
    max-width: 100%;
}

.ef-design-preview--mobile {
    max-width: 340px;
    margin-inline: auto;
}

.ef-design-preview__surface {
    border: 1px solid var(--bs-border-color);
    border-radius: 0.6rem;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    overflow-wrap: anywhere;
}

.ef-design-preview__badge {
    align-self: flex-start;
    border-radius: 999px;
    padding: 0.15rem 0.55rem;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.ef-design-preview__surface h3,
.ef-design-preview__surface h4,
.ef-design-preview__surface p {
    margin: 0;
}

.ef-design-preview__button {
    align-self: flex-start;
    border-radius: 0.5rem;
    padding: 0.5rem 0.95rem;
    font-weight: 600;
}

/* ---------- Admin event picker ---------- */
.ef-picker .list-group-item {
    background: var(--bs-body-bg);
}

@media (max-width: 991.98px) {
    .ef-design-preview-wrap {
        position: static;
    }
}
