/* ═══════════════════════════════════════════
   Haruby Band Event Kalender v3.0
   Design: Editorial Concert Magazine
═══════════════════════════════════════════ */
@import url('https://fonts.googleapis.com/css2?family=Barlow+Condensed:wght@700;800;900&family=Outfit:wght@400;500;600&display=swap');

:root {
    --c-bg:       #f7f6f3;
    --c-white:    #ffffff;
    --c-black:    #111111;
    --c-red:      #e63030;
    --c-red-d:    #c02020;
    --c-muted:    #888888;
    --c-border:   #e2e2e2;
    --c-surface:  #ffffff;
    --c-surface2: #f2f1ee;
    --c-text:     #1a1a1a;
    --c-green:    #16a34a;
    --fh:         'Barlow Condensed', sans-serif;
    --fb:         'Outfit', sans-serif;
    --radius:     12px;
    --shadow:     0 2px 16px rgba(0,0,0,.08);
    --shadow-lg:  0 8px 40px rgba(0,0,0,.14);
}

.hbek { font-family: var(--fb); color: var(--c-text); }
.hbek *, .hbek *::before, .hbek *::after { box-sizing: border-box; }
.hbek-empty { color: var(--c-muted); padding: 24px; text-align: center; font-size: 15px; }
.hbek-migrate { font-family: var(--fb); font-size:13px; background:#f0fdf4; border:1px solid #bbf7d0; border-radius:8px; padding:20px; line-height:1.7; }

/* ═══════════════════════════════
   NEXT EVENT
═══════════════════════════════ */
.hbek-next-wrap {
    max-width: 800px; margin: 0 auto;
    background: var(--c-white);
    border: 1px solid var(--c-border);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

/* Hero */
.hbek-hero {
    position: relative; height: 340px;
    background-size: cover; background-position: center;
    display: flex; align-items: flex-end;
}
.hbek-hero-no-img {
    background: linear-gradient(135deg, #111 0%, #2a2a2a 100%);
}
.hbek-hero-overlay {
    position: absolute; inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,.85) 0%, rgba(0,0,0,.2) 60%, transparent 100%);
}
.hbek-hero-content {
    position: relative; z-index: 1; padding: 28px 32px; width: 100%;
}
.hbek-pill {
    display: inline-block;
    background: var(--c-red); color: #fff;
    font-family: var(--fh); font-size: 13px; letter-spacing: 2px; text-transform: uppercase;
    padding: 4px 14px; border-radius: 4px; margin-bottom: 10px;
}
.hbek-hero-title {
    font-family: var(--fh); font-size: clamp(32px, 6vw, 56px); font-weight: 900;
    letter-spacing: 1px; line-height: 1.05; color: #fff; margin: 0 0 12px;
    text-shadow: 0 2px 12px rgba(0,0,0,.4);
}
.hbek-hero-sub {
    display: flex; flex-wrap: wrap; gap: 16px; color: rgba(255,255,255,.85); font-size: 14px;
}

/* Body */
.hbek-next-body { padding: 32px; }

/* Countdown */
.hbek-cd-outer {
    background: var(--c-black); border-radius: var(--radius);
    padding: 24px 28px; margin-bottom: 28px;
}
.hbek-cd-title {
    font-family: var(--fh); font-size: 13px; letter-spacing: 2px; text-transform: uppercase;
    color: var(--c-muted); margin: 0 0 14px;
    /* Override WordPress p margin */
    padding: 0;
}
.hbek-cd {
    display: flex; align-items: center; gap: 8px;
}
.hbek-cd-u { text-align: center; flex: 1; }
.hbek-n {
    display: block;
    font-family: var(--fh); font-size: clamp(36px, 7vw, 60px); font-weight: 900;
    color: var(--c-red); line-height: 1;
}
.hbek-cd-u label {
    display: block; font-size: 10px; text-transform: uppercase; letter-spacing: 1.5px;
    color: #666; margin-top: 4px;
    /* Override WP label */
    font-weight: 400; cursor: default;
}
.hbek-cd-dot {
    font-family: var(--fh); font-size: 40px; color: #333;
    padding-bottom: 18px; flex-shrink: 0;
}

/* Info tiles – Flexbox: alle Tiles gleich groß, kein Waisenkind */
.hbek-info-row {
    display: flex;
    flex-wrap: nowrap;   /* eine Reihe, niemals umbrechen */
    gap: 12px;
    margin-bottom: 24px;
}
.hbek-info-tile {
    flex: 1 1 0;         /* alle gleich breit, egal wie viele */
    display: flex; align-items: center; gap: 12px;
    background: var(--c-surface2); border: 1px solid var(--c-border);
    border-radius: 10px; padding: 14px 16px;
    min-width: 0;
}
.hbek-tile-icon { font-size: 20px; flex-shrink: 0; }
.hbek-tile-label {
    font-size: 10px; text-transform: uppercase; letter-spacing: 1px;
    color: var(--c-muted); margin-bottom: 3px; white-space: nowrap;
}
.hbek-tile-val {
    font-size: 14px; font-weight: 600; color: var(--c-text);
    overflow: hidden; text-overflow: ellipsis;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
}
.hbek-free { color: var(--c-green); }

/* Ticket button */
.hbek-ticket-row { margin-bottom: 28px; }
.hbek-btn-ticket {
    display: inline-flex; align-items: center; gap: 8px;
    background: var(--c-red); color: #fff !important;
    font-family: var(--fh); font-size: 18px; font-weight: 700; letter-spacing: 1.5px;
    padding: 14px 34px; border-radius: 8px; text-decoration: none !important;
    transition: background .18s, transform .15s, box-shadow .18s;
    box-shadow: 0 4px 18px rgba(230,48,48,.35);
}
.hbek-btn-ticket:hover {
    background: var(--c-red-d); transform: translateY(-2px);
    box-shadow: 0 8px 28px rgba(230,48,48,.45);
}

/* Map */
.hbek-map-wrap { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--c-border); }
.hbek-map { width: 100%; height: 300px; border: none; display: block; }

/* ═══════════════════════════════
   PAST EVENTS
═══════════════════════════════ */
.hbek-past-section { max-width: 800px; margin: 0 auto; }

.hbek-section-head {
    display: flex; align-items: baseline; justify-content: space-between;
    margin-bottom: 20px; padding-bottom: 14px;
    border-bottom: 2px solid var(--c-black);
}
.hbek-section-title {
    font-family: var(--fh); font-size: 32px; font-weight: 900;
    letter-spacing: 1px; color: var(--c-black); margin: 0;
}
.hbek-count {
    font-size: 13px; color: var(--c-muted); font-weight: 500;
}

.hbek-past-grid { display: flex; flex-direction: column; gap: 8px; }

.hbek-past-card {
    display: flex; align-items: center; gap: 0;
    background: var(--c-white); border: 1px solid var(--c-border);
    border-radius: 10px; overflow: hidden;
    transition: box-shadow .18s, transform .18s;
    position: relative;
}
.hbek-past-card:hover { box-shadow: var(--shadow); transform: translateX(3px); }

.hbek-past-card-img {
    width: 72px; height: 72px; flex-shrink: 0;
    background-size: cover; background-position: center;
    filter: grayscale(40%);
}
.hbek-past-card-noimg {
    background: var(--c-surface2); display: flex; align-items: center; justify-content: center;
    font-size: 24px;
}
.hbek-past-card-body { flex: 1; padding: 12px 16px; min-width: 0; }
.hbek-past-card-title { font-weight: 600; font-size: 15px; color: var(--c-text); margin-bottom: 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hbek-past-card-meta { display: flex; flex-wrap: wrap; gap: 10px; font-size: 13px; color: var(--c-muted); }

.hbek-past-tag {
    font-family: var(--fh); font-size: 11px; font-weight: 700; letter-spacing: 1.5px;
    color: var(--c-muted); border: 1.5px solid var(--c-border);
    border-radius: 4px; padding: 3px 10px; margin-right: 14px; flex-shrink: 0;
}

/* ═══════════════════════════════
   KALENDER
═══════════════════════════════ */
.hbek-cal-section {
    max-width: 860px; margin: 0 auto;
    background: var(--c-white); border: 1px solid var(--c-border);
    border-radius: var(--radius); overflow: hidden;
    box-shadow: var(--shadow);
}

/* Topbar */
.hbek-cal-topbar {
    display: flex; align-items: center; justify-content: space-between;
    padding: 20px 28px; background: var(--c-black);
}
.hbek-cal-month {
    font-family: var(--fh); font-size: 28px; font-weight: 900;
    letter-spacing: 3px; color: #fff; text-transform: uppercase; margin: 0;
}
.hbek-cal-nav-btn {
    width: 40px; height: 40px; border-radius: 8px;
    border: 1.5px solid #333; background: transparent; color: #fff;
    font-size: 18px; cursor: pointer; display: flex; align-items: center; justify-content: center;
    transition: background .15s, border-color .15s;
}
.hbek-cal-nav-btn:hover { background: var(--c-red); border-color: var(--c-red); }

/* Legend */
.hbek-cal-legend {
    display: flex; align-items: center;
    padding: 10px 28px; background: var(--c-surface2);
    border-bottom: 1px solid var(--c-border);
    font-size: 12px; color: var(--c-muted);
}
.hbek-legend-dot {
    display: inline-block; width: 10px; height: 10px;
    border-radius: 50%; margin-right: 6px;
}
.hbek-legend-upcoming { background: var(--c-red); }
.hbek-legend-past     { background: #aaa; }

/* Wochentage */
.hbek-cal-dow-row {
    display: grid; grid-template-columns: repeat(7,1fr);
    background: var(--c-surface2); border-bottom: 1px solid var(--c-border);
}
.hbek-cal-dow-row div {
    text-align: center; padding: 10px 4px;
    font-size: 11px; font-weight: 600; text-transform: uppercase;
    letter-spacing: 1px; color: var(--c-muted);
}

/* Kalender Grid */
.hbek-cal-body {
    display: grid; grid-template-columns: repeat(7,1fr);
    gap: 0;
    border-left: 1px solid var(--c-border);
    border-top: 1px solid var(--c-border);
}

.hbek-cell {
    border-right: 1px solid var(--c-border);
    border-bottom: 1px solid var(--c-border);
    min-height: 100px; padding: 8px;
    display: flex; flex-direction: column; gap: 4px;
    background: var(--c-white);
    transition: background .12s;
    cursor: default;
    position: relative;
}
.hbek-cell-empty { background: var(--c-surface2); }

.hbek-cell-num {
    font-family: var(--fh); font-size: 18px; font-weight: 700;
    color: #bbb; line-height: 1; display: block;
    width: 30px; height: 30px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 50%;
    flex-shrink: 0;
}

/* Heute */
.hbek-cell-today { background: #fff9f9; }
.hbek-cell-today .hbek-cell-num {
    background: var(--c-black); color: #fff;
}

/* Event-Tag */
.hbek-cell-event { cursor: pointer; }
.hbek-cell-event:hover { background: #fff0f0; }
.hbek-cell-event .hbek-cell-num {
    background: var(--c-red); color: #fff;
    box-shadow: 0 2px 8px rgba(230,48,48,.4);
}

/* Vergangenes Event */
.hbek-cell-past .hbek-cell-num {
    background: #aaa !important; box-shadow: none !important;
}
.hbek-cell-past:hover { background: #f9f9f9 !important; }

/* Event-Name im Tag */
.hbek-cell-ev-name {
    font-size: 11px; font-weight: 600; line-height: 1.25;
    background: var(--c-red); color: #fff;
    border-radius: 4px; padding: 2px 6px;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
    display: block;
}
.hbek-ev-past {
    background: #ddd; color: #777;
}
.hbek-cell-more { font-size: 10px; color: var(--c-muted); padding-left: 2px; }

/* ═══════════════════════════════
   MODAL / POPUP
═══════════════════════════════ */
.hbek-modal {
    position: fixed; inset: 0; z-index: 99999;
    background: rgba(0,0,0,.65);
    display: flex; align-items: center; justify-content: center;
    padding: 20px;
    backdrop-filter: blur(3px);
}
.hbek-modal-box {
    background: var(--c-white); border-radius: 16px;
    box-shadow: 0 24px 80px rgba(0,0,0,.25);
    max-width: 460px; width: 100%; max-height: 85vh;
    overflow-y: auto; position: relative;
    animation: hbek-pop .22s cubic-bezier(.34,1.5,.64,1);
}
.hbek-modal-close {
    position: absolute; top: 14px; right: 16px;
    background: var(--c-surface2); border: none; border-radius: 50%;
    width: 32px; height: 32px; font-size: 18px; line-height: 1;
    cursor: pointer; color: var(--c-muted); transition: background .15s, color .15s;
    display: flex; align-items: center; justify-content: center;
}
.hbek-modal-close:hover { background: var(--c-red); color: #fff; }

/* Modal innerer Inhalt */
.hbek-modal-date {
    font-family: var(--fh); font-size: 20px; font-weight: 900;
    letter-spacing: 1px; color: var(--c-black);
    padding: 22px 22px 12px; border-bottom: 1px solid var(--c-border);
    margin-bottom: 0;
}
.hbek-modal-event {
    display: flex; gap: 14px; align-items: flex-start;
    padding: 16px 22px; border-bottom: 1px solid var(--c-border);
}
.hbek-modal-event:last-child { border-bottom: none; }
.hbek-modal-past { opacity: .55; }
.hbek-modal-thumb {
    width: 72px; height: 72px; object-fit: cover;
    border-radius: 8px; flex-shrink: 0;
}
.hbek-modal-info { flex: 1; min-width: 0; }
.hbek-modal-title { font-weight: 700; font-size: 16px; color: var(--c-text); margin-bottom: 6px; }
.hbek-modal-meta { font-size: 13px; color: var(--c-muted); margin-bottom: 3px; }
.hbek-modal-btn {
    display: inline-block; margin-top: 10px;
    background: var(--c-red); color: #fff !important;
    font-weight: 600; font-size: 13px; letter-spacing: .5px;
    padding: 8px 18px; border-radius: 6px; text-decoration: none !important;
    transition: background .15s;
}
.hbek-modal-btn:hover { background: var(--c-red-d); }
.hbek-modal-tag {
    display: inline-block; margin-top: 8px;
    border: 1.5px solid var(--c-border); color: var(--c-muted);
    font-size: 11px; font-weight: 600; letter-spacing: 1px; text-transform: uppercase;
    padding: 3px 10px; border-radius: 4px;
}

/* ═══════════════════════════════
   ANIMATION
═══════════════════════════════ */
@keyframes hbek-pop {
    from { opacity:0; transform:scale(.93) translateY(10px); }
    to   { opacity:1; transform:scale(1)   translateY(0); }
}

/* ═══════════════════════════════
   RESPONSIVE
═══════════════════════════════ */
/* ── Tablet (max 768px) ── */
@media (max-width: 768px) {
    .hbek-info-row { flex-wrap: wrap; }
    .hbek-info-tile { flex: 1 1 calc(50% - 6px); max-width: calc(50% - 6px); }
    .hbek-past-grid { gap: 6px; }
}

/* ── Handy (max 640px) ── */
@media (max-width: 640px) {
    /* Hero */
    .hbek-hero { height: 220px; }
    .hbek-hero-content { padding: 18px; }
    .hbek-hero-title { font-size: 28px; }
    .hbek-hero-sub { font-size: 13px; gap: 10px; }
    .hbek-pill { font-size: 11px; padding: 3px 10px; }

    /* Next event body */
    .hbek-next-body { padding: 16px; }

    /* Info tiles: 2 Spalten auf Handy */
    .hbek-info-row { flex-wrap: wrap; }
    .hbek-info-tile { flex: 1 1 calc(50% - 6px); max-width: calc(50% - 6px); padding: 12px; gap: 8px; }
    .hbek-tile-icon { font-size: 18px; }
    .hbek-tile-label { font-size: 9px; }
    .hbek-tile-val { font-size: 13px; }

    /* Countdown */
    .hbek-cd-outer { padding: 14px 16px; margin-bottom: 20px; }
    .hbek-n { font-size: 30px; }
    .hbek-cd-dot { font-size: 28px; padding-bottom: 14px; }
    .hbek-cd-u label { font-size: 9px; }

    /* Ticket button */
    .hbek-btn-ticket { font-size: 16px; padding: 12px 24px; width: 100%; justify-content: center; }

    /* Map */
    .hbek-map { height: 220px; }

    /* Past events */
    .hbek-section-title { font-size: 24px; }
    .hbek-past-card-img { width: 56px; height: 56px; }
    .hbek-past-card-title { font-size: 14px; }
    .hbek-past-card-meta { font-size: 12px; gap: 6px; }

    /* Kalender */
    .hbek-cal-topbar { padding: 12px 14px; }
    .hbek-cal-month { font-size: 18px; letter-spacing: 1px; }
    .hbek-cal-nav-btn { width: 34px; height: 34px; font-size: 16px; }
    .hbek-cal-legend { padding: 7px 14px; font-size: 11px; }
    .hbek-cal-dow-row div { font-size: 9px; padding: 7px 2px; }
    .hbek-cell { min-height: 52px; padding: 4px 2px; gap: 2px; }
    .hbek-cell-num { font-size: 12px; width: 22px; height: 22px; }
    .hbek-cell-ev-name { font-size: 8px; padding: 1px 2px; border-radius: 2px; }

    /* Modal */
    .hbek-modal { padding: 12px; }
    .hbek-modal-box { max-height: 90vh; }
    .hbek-modal-event { gap: 10px; padding: 12px 16px; }
    .hbek-modal-thumb { width: 56px; height: 56px; }
    .hbek-modal-title { font-size: 14px; }
    .hbek-modal-meta { font-size: 12px; }
}

/* ── Sehr kleines Handy (max 400px) ── */
@media (max-width: 400px) {
    .hbek-cell-ev-name { display: none; } /* nur Kreis zeigen */
    .hbek-hero-title { font-size: 24px; }
    .hbek-n { font-size: 26px; }
}
