/* =============================================================
   ÖSBV Events Plugin – Frontend Styles
   Matches ÖSBV Calendar CD: Red #C0392B, Dark #1a1a2e
   Editorial / image-forward aesthetic
   ============================================================= */

@import url('https://fonts.googleapis.com/css2?family=Barlow+Condensed:wght@600;700&family=Barlow:wght@400;500;600&display=swap');

:root {
    --oesbv-red:       #C0392B;
    --oesbv-red-dark:  #a03020;
    --oesbv-red-light: #f9e8e6;
    --oesbv-dark:      #0B0B0B;
    --oesbv-border:    #e2e2e2;
    --oesbv-bg:        #f7f7f7;
    --oesbv-white:     #ffffff;
    --oesbv-text:      #1e1e1e;
    --oesbv-muted:     #666666;
    --oesbv-radius:    6px;
    --oesbv-shadow:    0 2px 14px rgba(0,0,0,0.08);
    --oesbv-shadow-lg: 0 6px 32px rgba(0,0,0,0.13);
    --oesbv-trans:     0.22s ease;
    --oesbv-font-head: 'Barlow Condensed', sans-serif;
    --oesbv-font-body: 'Barlow', sans-serif;
}

/* ── Base reset ──────────────────────────────────────────── */
.oesbv-ev-grid *,
.oesbv-ev-single *,
.oesbv-ev-card * {
    box-sizing: border-box;
}
.oesbv-ev-grid,
.oesbv-ev-single,
.oesbv-ev-card {
    font-family: var(--oesbv-font-body);
    font-size: 16px;
    line-height: 1.55;
    color: var(--oesbv-text);
}

/* ── Empty state ─────────────────────────────────────────── */
.oesbv-ev-empty,
.oesbv-ev-no-results {
    padding: 32px;
    text-align: center;
    color: var(--oesbv-muted);
    font-style: italic;
}

/* =============================================================
   FILTER BAR
============================================================= */
.oesbv-ev-filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 24px;
    padding: 4px 0;
}
.oesbv-ev-filter-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 20px;
    border: 2px solid var(--oesbv-border);
    border-radius: 30px;
    background: var(--oesbv-white);
    color: var(--oesbv-muted);
    font-family: var(--oesbv-font-body);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--oesbv-trans);
    line-height: 1;
}
.oesbv-ev-filter-btn:hover {
    border-color: var(--oesbv-red);
    color: var(--oesbv-red);
    background: var(--oesbv-white);
}
.oesbv-ev-filter-btn.is-active {
    background: var(--oesbv-red);
    border-color: var(--oesbv-red);
    color: #fff;
}
.oesbv-ev-filter-btn.is-active:hover {
    background: var(--oesbv-red-dark);
    border-color: var(--oesbv-red-dark);
}

/* hidden cards during filter */
.oesbv-ev-card.is-hidden {
    display: none;
}

/* =============================================================
   GRID
============================================================= */
.oesbv-ev-grid {
    display: grid;
    gap: 28px;
}
.oesbv-ev-grid--cols-1 { grid-template-columns: 1fr; }
.oesbv-ev-grid--cols-2 { grid-template-columns: repeat(2, 1fr); }
.oesbv-ev-grid--cols-3 { grid-template-columns: repeat(3, 1fr); }
.oesbv-ev-grid--cols-4 { grid-template-columns: repeat(4, 1fr); }

/* =============================================================
   EVENT CARD
============================================================= */
.oesbv-ev-card {
    background: var(--oesbv-white);
    border-radius: 8px;
    border: 1px solid var(--oesbv-border);
    box-shadow: var(--oesbv-shadow);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: box-shadow var(--oesbv-trans), transform var(--oesbv-trans);
}
.oesbv-ev-card:hover {
    box-shadow: var(--oesbv-shadow-lg);
    transform: translateY(-3px);
}

/* ── Card media ──────────────────────────────────────────── */
.oesbv-ev-card__media {
    position: relative;
    aspect-ratio: 16 / 10;
    background: var(--oesbv-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.oesbv-ev-card__media img {
    display: block;
    max-width: 100% !important;
    max-height: 100% !important;
    width: auto !important;
    height: auto !important;
    object-fit: contain;
    object-position: center;
    transition: transform 0.45s ease;
}
.oesbv-ev-card:hover .oesbv-ev-card__media img {
    transform: scale(1.05);
}
.oesbv-ev-card__no-img {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--oesbv-dark) 0%, #2d2d44 100%);
}
.oesbv-ev-card__no-img svg {
    width: 40px;
    height: 40px;
    color: rgba(255,255,255,0.15);
}

/* image count badge */
.oesbv-ev-card__img-count {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: rgba(0,0,0,0.65);
    color: #fff;
    border-radius: 20px;
    padding: 3px 10px;
    font-size: 12px;
    font-weight: 700;
    font-family: var(--oesbv-font-head);
    display: flex;
    align-items: center;
    gap: 5px;
    letter-spacing: 0.03em;
    backdrop-filter: blur(4px);
}
.oesbv-ev-card__img-count svg { width: 13px; height: 13px; }

/* Austria / International badges */
.oesbv-ev-card__austria-badge,
.oesbv-ev-card__intl-badge {
    /*
    position: absolute;
    top: 10px;
    left: 10px;
    */
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    backdrop-filter: blur(6px);
    line-height: 1.4;
    width: fit-content;
}
.oesbv-ev-card__austria-badge {
    background: rgba(192,57,43,0.88);
    color: #fff;
}
.oesbv-ev-card__intl-badge {
    background: rgba(26,26,46,0.75);
    color: #fff;
}

/* ── Card body ───────────────────────────────────────────── */
.oesbv-ev-card__body {
    padding: 18px 20px 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex: 1;
}
.oesbv-ev-card__title {
    font-family: var(--oesbv-font-head);
    font-size: 22px;
    font-weight: 700;
    line-height: 1.15;
    margin: 0;
    letter-spacing: 0.01em;
}
.oesbv-ev-card__title a {
    color: var(--oesbv-dark);
    text-decoration: none;
    transition: color var(--oesbv-trans);
}
.oesbv-ev-card__title a:hover { color: var(--oesbv-red); }
.oesbv-ev-card__excerpt {
    font-size: 14px;
    color: var(--oesbv-muted);
    margin: 0;
    line-height: 1.5;
}
.oesbv-ev-card__links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: auto;
    padding-top: 4px;
}

/* =============================================================
   LINK BUTTONS  (shared card + single)
============================================================= */
.oesbv-ev-link-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 9px 18px;
    border-radius: var(--oesbv-radius);
    font-family: var(--oesbv-font-body);
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all var(--oesbv-trans);
    white-space: nowrap;
}
.oesbv-ev-link-btn svg { width: 14px; height: 14px; flex-shrink: 0; }
.oesbv-ev-link-btn--primary {
    background: var(--oesbv-red);
    color: #fff;
    border: 2px solid var(--oesbv-red);
}
.oesbv-ev-link-btn--primary:hover {
    background: var(--oesbv-red-dark);
    border-color: var(--oesbv-red-dark);
    color: #fff;
}
.oesbv-ev-link-btn--secondary {
    background: transparent;
    color: var(--oesbv-dark);
    border: 2px solid var(--oesbv-border);
}
.oesbv-ev-link-btn--secondary:hover {
    border-color: var(--oesbv-red);
    color: var(--oesbv-red);
}
.oesbv-ev-link-btn--more {
    background: var(--oesbv-bg);
    color: var(--oesbv-muted);
    border: 2px solid var(--oesbv-border);
    font-size: 13px;
    padding: 7px 12px;
}
.oesbv-ev-link-btn--more:hover {
    color: var(--oesbv-red);
    border-color: var(--oesbv-red);
}

/* =============================================================
   SINGLE EVENT VIEW
============================================================= */
.oesbv-ev-single {
    max-width: 860px;
}
.oesbv-ev-single__title {
    font-family: var(--oesbv-font-head);
    font-size: 36px;
    font-weight: 700;
    color: var(--oesbv-dark);
    line-height: 1.1;
    margin: 0 0 24px;
    letter-spacing: 0.01em;
}

/* ── Gallery ─────────────────────────────────────────────── */
.oesbv-ev-gallery {
    margin-bottom: 32px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--oesbv-shadow-lg);
}
.oesbv-ev-gallery__main {
    position: relative;
    background: var(--oesbv-dark);
    aspect-ratio: 16 / 9;
    overflow: hidden;
}
.oesbv-ev-gallery__slide {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
}
.oesbv-ev-gallery__slide.is-active {
    opacity: 1;
    pointer-events: auto;
    position: relative;
}
.oesbv-ev-gallery__slide img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}
.oesbv-ev-gallery__caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.65));
    color: #fff;
    font-size: 13px;
    padding: 24px 16px 12px;
    font-style: italic;
}

/* nav arrows */
.oesbv-ev-gallery__nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,0.45);
    border: none;
    border-radius: 50%;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #fff;
    z-index: 10;
    transition: background var(--oesbv-trans);
    backdrop-filter: blur(4px);
}
.oesbv-ev-gallery__nav:hover { background: var(--oesbv-red); }
.oesbv-ev-gallery__nav svg { width: 20px; height: 20px; }
.oesbv-ev-gallery__nav--prev { left: 12px; }
.oesbv-ev-gallery__nav--next { right: 12px; }

/* counter */
.oesbv-ev-gallery__counter {
    position: absolute;
    top: 12px;
    right: 14px;
    background: rgba(0,0,0,0.5);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    font-family: var(--oesbv-font-head);
    padding: 3px 10px;
    border-radius: 20px;
    backdrop-filter: blur(4px);
    letter-spacing: 0.05em;
    z-index: 10;
}
.oesbv-ev-gallery__current { color: var(--oesbv-red); }

/* thumbnails */
.oesbv-ev-gallery__thumbs {
    display: flex;
    gap: 4px;
    padding: 6px;
    background: var(--oesbv-dark);
    overflow-x: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--oesbv-red) var(--oesbv-dark);
}
.oesbv-ev-gallery__thumbs::-webkit-scrollbar { height: 4px; }
.oesbv-ev-gallery__thumbs::-webkit-scrollbar-thumb { background: var(--oesbv-red); border-radius: 2px; }
.oesbv-ev-gallery__thumb {
    flex-shrink: 0;
    width: 72px;
    height: 54px;
    border-radius: 4px;
    overflow: hidden;
    border: 2px solid transparent;
    background: rgba(255,255,255,0.1);
    cursor: pointer;
    padding: 0;
    transition: border-color var(--oesbv-trans);
}
.oesbv-ev-gallery__thumb.is-active,
.oesbv-ev-gallery__thumb:hover {
    border-color: var(--oesbv-red);
}
.oesbv-ev-gallery__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.oesbv-ev-gallery__thumb-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    color: rgba(255,255,255,0.4);
    font-size: 14px;
    font-weight: 700;
}

/* ── Content ─────────────────────────────────────────────── */
.oesbv-ev-single__content {
    margin-bottom: 32px;
    font-size: 16px;
    line-height: 1.7;
    color: var(--oesbv-text);
}
.oesbv-ev-single__content p { margin: 0 0 1em; }
.oesbv-ev-single__content h1,
.oesbv-ev-single__content h2,
.oesbv-ev-single__content h3 {
    font-family: var(--oesbv-font-head);
    color: var(--oesbv-dark);
}

/* ── Links section ───────────────────────────────────────── */
.oesbv-ev-single__links {
    border-top: 2px solid var(--oesbv-border);
    padding-top: 24px;
}
.oesbv-ev-single__links-title {
    font-family: var(--oesbv-font-head);
    font-size: 18px;
    font-weight: 700;
    color: var(--oesbv-dark);
    margin: 0 0 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}
.oesbv-ev-single__links-title svg { width: 18px; height: 18px; color: var(--oesbv-red); }
.oesbv-ev-single__links-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

/* =============================================================
   RESPONSIVE
============================================================= */
@media (max-width: 1024px) {
    .oesbv-ev-grid--cols-4 { grid-template-columns: repeat(2, 1fr); }
    .oesbv-ev-grid--cols-3 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 700px) {
    .oesbv-ev-grid--cols-4,
    .oesbv-ev-grid--cols-3,
    .oesbv-ev-grid--cols-2 { grid-template-columns: 1fr; }

    .oesbv-ev-single__title { font-size: 26px; }
    .oesbv-ev-gallery__nav { width: 36px; height: 36px; }
    .oesbv-ev-gallery__nav svg { width: 16px; height: 16px; }
    .oesbv-ev-gallery__thumbs { display: none; }
    .oesbv-ev-link-btn { font-size: 13px; padding: 8px 14px; }
    .oesbv-ev-single__links-grid { flex-direction: column; }
    .oesbv-ev-single__links-grid .oesbv-ev-link-btn { width: 100%; justify-content: center; }
}
