/*
 Theme Name:   Hamburgkonzerte
 Theme URI:    https://maikharing.com
 Description:  GeneratePress Child Theme für Hamburgkonzerte.de
 Author:       Maik Haring
 Author URI:   https://maikharing.com
 Template:     generatepress
 Version:      1.0.0
 Requires at least: 6.4
 Requires PHP: 8.1
 License:      GNU General Public License v2 or later
 Text Domain:  hk
*/

/* ============================================================
   DESIGN TOKENS
   ============================================================ */
:root {
    --hk-black:       #000000;
    --hk-bg:          #e6e6e6;
    --hk-white:       #ffffff;
    --hk-text:        #000000;
    --hk-yellow:      #ffd930;
    --hk-grey-line:   #333333;
    --hk-font:        Arial, Helvetica, sans-serif;
    --hk-nav-h:       75px;
    --hk-max-w:       1280px;
    --hk-grid-gap:    20px;
}

/* ============================================================
   BASE RESET
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; }

body {
    background-color: var(--hk-bg);
    color: var(--hk-text);
    font-family: var(--hk-font);
    font-size: 14px;
    line-height: 1.5;
    margin: 0;
    padding: 0;
}

a             { color: var(--hk-black); text-decoration: none; }
a:hover       { text-decoration: none; }
img           { max-width: 100%; height: auto; display: block; }
h1, h2, h3, h4, h5, h6 { font-family: var(--hk-font); font-weight: 700; color: #333; margin: 0 0 .5em; }
h1            { font-size: 24px; color: var(--hk-black); }
h2            { font-size: 18px; }
hr            { border: none; border-bottom: 1px solid var(--hk-grey-line); margin: 17px 0 6px; }
p             { margin: 0 0 1em; }

/* ============================================================
   GENERATEPRESS OVERRIDES
   Alles deaktivieren was GP mitbringt und wir selbst bauen
   ============================================================ */
.site-header,
.site-header .inside-header { display: none !important; }

.footer-widgets,
.site-footer { display: none !important; }

.page-header,
.generate-breadcrumbs,
.entry-header { display: none; }

.site-content,
.content-area,
.inside-article { max-width: 100%; padding: 0; margin: 0; }

.entry-content { margin: 0; }

/* GP fügt padding-top für admin-bar hinzu – übernehmen wir */
.admin-bar #hk-ticker { top: 32px; }
@media (max-width: 782px) { .admin-bar #hk-ticker { top: 46px; } }

/* ============================================================
   TICKER TOPBAR
   Volle Viewport-Breite – Farbe + Geschwindigkeit über Customizer
   ============================================================ */

/* CSS-Vars – werden via wp_head aus Customizer-Optionen befüllt */
:root {
    --hk-ticker-bg:       #000000;
    --hk-ticker-color:    #ffd930;
    --hk-ticker-duration: 40s;
}

/* overflow:hidden am body verhindert horizontalen Scrollbar
   der durch den 100vw-Breakout entstehen kann             */
html, body { overflow-x: hidden; }

#hk-ticker {
    /* Volle Viewport-Breite: aus jedem GP-Container ausbrechen */
    width:        100vw;
    margin-left:  calc(50% - 50vw);
    margin-right: calc(50% - 50vw);

    position: sticky;
    top: 0;
    z-index: 3100;

    background: var(--hk-ticker-bg);
    height: 36px;
    overflow: hidden;
    display: flex;
    align-items: center;
}

.hk-ticker__track {
    display: flex;
    white-space: nowrap;
    min-width: max-content;
    will-change: transform;
}

.hk-ticker__track--animate {
    animation: hk-scroll var(--hk-ticker-duration) linear infinite;
}

.hk-ticker__track:hover,
.hk-ticker__track:focus-within {
    animation-play-state: paused;
}

@keyframes hk-scroll {
    from { transform: translateX(0); }
    to   { transform: translateX(-50%); }
}

.hk-ticker__item {
    display: inline-flex;
    align-items: center;
    padding-inline-end: 48px;
    font-size: 13px;
    font-weight: 700;
    color: var(--hk-ticker-color);
    white-space: nowrap;
}

.hk-ticker__item a {
    color: var(--hk-ticker-color);
    text-decoration: none;
}
.hk-ticker__item a:hover { text-decoration: underline; }

.hk-ticker__sep {
    color: var(--hk-ticker-color);
    opacity: .4;
    padding-inline-end: 48px;
    pointer-events: none;
}

/* ============================================================
   NAVIGATION
   ============================================================ */
#hk-nav {
    position: sticky;
    top: 36px; /* direkt unter dem Ticker */
    z-index: 3000;
    background: var(--hk-white);
    border-bottom: 1px solid #c8c8c8;
    min-height: var(--hk-nav-h);
}

/* Wenn Admin Bar sichtbar */
.admin-bar #hk-nav { top: calc(36px + 32px); }
@media (max-width: 782px) { .admin-bar #hk-nav { top: calc(36px + 46px); } }

.hk-nav__inner {
    max-width: var(--hk-max-w);
    margin-inline: auto;
    padding-inline: 15px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: var(--hk-nav-h);
}

/* Logo */
.hk-nav__logo a      { display: block; }
.hk-nav__logo img    { max-height: 55px; width: auto; }
.hk-nav__logo-text   { font-size: 22px; font-weight: 700; }

/* Desktop Menu */
.hk-nav__menu {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 0;
}

.hk-nav__menu li a {
    display: block;
    padding: 6px 10px;
    font-size: 17px;
    font-weight: 700;
    color: var(--hk-black);
    line-height: var(--hk-nav-h);
    transition: text-decoration .15s;
}

.hk-nav__menu li a:hover,
.hk-nav__menu li.current-menu-item > a,
.hk-nav__menu li.current-page-ancestor > a { text-decoration: underline; }

/* Hamburger */
.hk-nav__toggle {
    display: none;
    background: none;
    border: 2px solid var(--hk-black);
    border-radius: 3px;
    padding: 5px 10px;
    font-size: 20px;
    cursor: pointer;
    line-height: 1;
    color: var(--hk-black);
}

/* Mobile Menu */
@media (max-width: 1023px) {
    .hk-nav__toggle { display: block; }

    .hk-nav__menu {
        display: none;
        flex-direction: column;
        position: absolute;
        inset-block-start: var(--hk-nav-h);
        inset-inline: 0;
        background: var(--hk-white);
        border-top: 1px solid #999;
        padding: 0 15px;
        z-index: 2999;
        box-shadow: 0 4px 8px rgba(0,0,0,.12);
    }

    .hk-nav__menu[data-open="true"] { display: flex; }

    .hk-nav__menu li        { border-top: 1px solid #ddd; }
    .hk-nav__menu li a      { line-height: 1; padding: 12px 5px; }
}

/* ============================================================
   MASONRY GRID  –  Vanilla Masonry v4 + Intersection Observer
   ============================================================ */
#primary { background: var(--hk-bg); padding-block-end: 60px; }
.content-area { padding-inline-start: 0; }

.hk-grid-wrap {
    max-width: var(--hk-max-w);
    margin-inline: auto;
}

/* Masonry sizer + items */
.grid-sizer,
.grid-item {
    width: calc(25% - var(--hk-grid-gap));
}

.grid-item {
    margin-block-end: var(--hk-grid-gap);
    background: var(--hk-white);
    position: relative;
    overflow: hidden;
}

/* 2× breit (Slider) */
.grid-item--width2 {
    width: calc(50% - var(--hk-grid-gap) / 2);
}

/* Responsive Breakpoints */
@media (max-width: 959px) {
    .grid-sizer, .grid-item             { width: calc(50% - var(--hk-grid-gap) / 2); }
    .grid-item--width2                  { width: 100%; }
}
@media (max-width: 599px) {
    .grid-sizer, .grid-item,
    .grid-item--width2                  { width: 100%; }
}

/* Grid Links */
.grid-item a   { color: var(--hk-black); display: block; }
.grid-item img { width: 100%; height: auto; }

/* Text-Box unter dem Bild */
.grid-item .text {
    padding: 7px 12px 10px;
    background: var(--hk-white);
}

.grid-item .band {
    font-weight: 700;
    text-transform: uppercase;
    font-size: 15px;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.grid-item .date  { font-size: 13px; }
.grid-item .ort   { font-size: 13px; }

/* Status-Badge (AUSVERKAUFT, RESTKARTEN …) */
.grid-item .status {
    position: absolute;
    inset-block-start: 0;
    inset-inline-end: 0;
    background: var(--hk-yellow);
    color: var(--hk-black);
    font-weight: 700;
    font-size: 11px;
    letter-spacing: .06em;
    text-transform: uppercase;
    padding: 4px 8px;
    z-index: 5;
}

/* "Mehr laden" Trigger (Infinite Scroll via Intersection Observer) */
.hk-load-more {
    display: block;
    width: 100%;
    padding: 18px;
    background: var(--hk-black);
    color: var(--hk-white);
    font-weight: 700;
    font-size: 13px;
    text-transform: uppercase;
    text-align: center;
    letter-spacing: .08em;
    border: none;
    cursor: pointer;
    margin-block-start: 4px;
    transition: background .2s;
}
.hk-load-more:hover  { background: #222; }
.hk-load-more:hidden { display: none; }

/* Lade-Indikator */
.hk-loading {
    text-align: center;
    padding: 20px;
    font-size: 13px;
    color: #666;
    display: none;
}
.hk-loading.is-visible { display: block; }

/* ============================================================
   SWIPER SLIDER  (CDN – kein lokales Asset)
   Das double-wide Grid-Item nutzt Swiper statt bxSlider
   ============================================================ */
.hk-swiper-wrap {
    width: 100%;
    overflow: hidden;
    position: relative;
}

.hk-swiper-wrap .swiper-slide { position: relative; }
.hk-swiper-wrap .swiper-slide img { width: 100%; height: auto; display: block; }

/* Text-Overlay auf dem Slider */
.hk-swiper-wrap .text {
    position: absolute;
    inset-block-end: 0;
    inset-inline: 0;
    background: linear-gradient(to top, rgba(0,0,0,.75) 0%, transparent 100%);
    padding: 32px 14px 12px;
    color: var(--hk-white);
    pointer-events: none;
}

.hk-swiper-wrap .band {
    font-weight: 700;
    text-transform: uppercase;
    font-size: 16px;
    color: var(--hk-white);
}

.hk-swiper-wrap .date,
.hk-swiper-wrap .ort { font-size: 13px; color: rgba(255,255,255,.9); }

/* Swiper Pagination dots */
.hk-swiper-wrap .swiper-pagination { bottom: 8px !important; }
.hk-swiper-wrap .swiper-pagination-bullet-active { background: var(--hk-yellow) !important; }

/* ============================================================
   SINGLE SHOW  –  70% Links / 29% Rechts
   ============================================================ */
.hk-show-wrap {
    max-width: var(--hk-max-w);
    margin-inline: auto;
    overflow: hidden; /* clearfix */
}

/* Linke Spalte */
.hk-show-main {
    float: left;
    width: 69%;
    background: var(--hk-white);
    padding: 0 0 20px;
}

.hk-show-main .image img { width: 100%; }

.hk-show-main .text { padding: 20px; }
.hk-show-main .band h1 { font-size: 24px; font-weight: 700; }
.hk-show-main .ticket-status {
    display: inline-block;
    background: var(--hk-yellow);
    font-weight: 700;
    padding: 4px 8px;
    text-transform: uppercase;
    font-size: 13px;
    margin-block: 8px 0;
}
.hk-show-main .date  { font-weight: 700; }
.hk-show-main .ort   { text-transform: uppercase; font-weight: 700; }
.hk-show-main hr     { margin: 20px 0; }
.hk-show-main .support h2 { font-size: 14px; font-weight: 700; }
.hk-show-main .content { margin-block-start: 12px; line-height: 1.7; }

/* Präsentatoren */
.hk-praes { margin-block-start: 20px; }
.hk-praes__headline { font-weight: 700; margin-block-end: 10px; }
.hk-praes__list { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.hk-praes__list img { max-height: 60px; width: auto; }

/* Rechte Infospalte */
.hk-show-sidebar {
    float: right;
    width: 29%;
    background: var(--hk-white);
    padding: 20px;
}

.hk-show-sidebar .venue-name {
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    margin-block-end: 8px;
}

.hk-show-sidebar .venue-name a { color: var(--hk-black); }

.hk-show-sidebar .showtime { font-size: 14px; margin-block-end: 4px; }

.hk-show-sidebar hr { margin: 16px 0; }

.hk-show-sidebar .ticket-price {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 4px;
    margin-block-end: 12px;
}
.hk-show-sidebar .ticketab   { font-weight: 700; font-size: 16px; }
.hk-show-sidebar .ticketpreis{ font-weight: 700; font-size: 16px; }
.hk-show-sidebar .tickettax  { font-size: 12px; color: #555; }

/* Ticket / Artist / Social Links */
.hk-link-btn {
    display: block;
    background: var(--hk-black);
    color: var(--hk-white);
    padding: 8px 12px;
    margin-block-end: 8px;
    font-weight: 600;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: .08em;
    text-decoration: none;
    transition: background .2s;
}
.hk-link-btn:hover { background: #333; color: var(--hk-white); }

/* "Weitere Konzerte" */
.hk-more-shows {
    float: right;
    width: 29%;
    margin-block-start: var(--hk-grid-gap);
    background: var(--hk-white);
}

.hk-more-shows__headline {
    font-size: 16px;
    font-weight: 700;
    text-transform: uppercase;
    padding: 16px 16px 8px;
    border-bottom: 1px solid #eee;
}

.hk-more-shows__item { padding: 0; }
.hk-more-shows__item a { display: block; color: var(--hk-black); }
.hk-more-shows__item img { width: 100%; }
.hk-more-shows__item .text { padding: 8px 14px 12px; }
.hk-more-shows__item .band { font-weight: 700; text-transform: uppercase; font-size: 14px; }
.hk-more-shows__item .date { font-size: 12px; }
.hk-more-shows__item .ort  { font-size: 12px; }

/* Mobile Show */
@media (max-width: 767px) {
    .hk-show-main, .hk-show-sidebar, .hk-more-shows {
        float: none;
        width: 100%;
    }
    .hk-show-sidebar { margin-block-start: 0; padding: 15px; }
    .hk-more-shows   { margin-block-start: 0; }
}

/* ============================================================
   SINGLE VENUE
   ============================================================ */
.hk-venue-wrap {
    max-width: var(--hk-max-w);
    margin-inline: auto;
    overflow: hidden;
}

.hk-venue-main {
    float: left;
    width: 69%;
    background: var(--hk-white);
    padding: 20px;
}

.hk-venue-main hr   { margin: 16px 0; }
.hk-venue-main h1   { font-size: 24px; }
.hk-venue-main .content { margin-block-start: 12px; line-height: 1.7; }

.hk-venue-sidebar {
    float: right;
    width: 29%;
    background: var(--hk-white);
    padding: 20px;
}

.hk-venue-logo {
    float: right;
    width: 29%;
    padding: 0;
    margin-block-end: 0;
}

.hk-venue-logo img { background: var(--hk-black); padding: 15px; }

.hk-venue-adresse { font-weight: 700; line-height: 1.6; margin-block-end: 12px; }

/* Shows an diesem Venue */
.hk-venue-shows { margin-block-start: 20px; }
.hk-venue-show-item {
    display: grid;
    grid-template-columns: 100px 1fr;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid #eee;
    align-items: center;
}
.hk-venue-show-item a        { color: var(--hk-black); display: contents; }
.hk-venue-show-item img      { width: 100%; aspect-ratio: 4/3; object-fit: cover; }
.hk-venue-show-item .band    { font-weight: 700; text-transform: uppercase; font-size: 14px; }
.hk-venue-show-item .date    { font-size: 12px; }

/* Mobile Venue */
@media (max-width: 767px) {
    .hk-venue-main, .hk-venue-sidebar, .hk-venue-logo { float: none; width: 100%; }
}

/* ============================================================
   FOOTER
   ============================================================ */
#hk-footer {
    background: var(--hk-black);
    color: var(--hk-white);
}

.hk-footer__top {
    max-width: var(--hk-max-w);
    margin-inline: auto;
    padding: 16px 15px;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 16px;
    min-height: 60px;
}

/* Col 1: Links */
.hk-footer__links {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 12px;
}
.hk-footer__links a {
    color: #f9f9f9;
    font-weight: 700;
    font-size: 13px;
    white-space: nowrap;
}
.hk-footer__links a:hover { color: var(--hk-white); text-decoration: underline; }

/* Col 2: Social */
.hk-footer__social {
    display: flex;
    align-items: center;
    gap: 6px;
}
.hk-footer__social a img {
    width: 32px;
    height: 32px;
    opacity: .85;
    transition: opacity .2s;
}
.hk-footer__social a:hover img { opacity: 1; }

/* Col 3: Newsletter */
.hk-footer__newsletter {
    text-align: right;
}
.hk-footer__newsletter a {
    color: #f9f9f9;
    font-weight: 700;
    font-size: 12px;
    letter-spacing: .08em;
    text-transform: uppercase;
    border: 1px solid rgba(255,255,255,.3);
    padding: 7px 14px;
    display: inline-block;
    transition: border-color .2s;
}
.hk-footer__newsletter a:hover { border-color: var(--hk-white); color: var(--hk-white); }

/* Bottom bar */
.hk-footer__bottom {
    background: rgba(0,0,0,.35);
    text-align: center;
    padding: 8px 15px;
    font-size: 11px;
    color: rgba(255,255,255,.35);
}

/* Back to top */
#hk-btt {
    position: fixed;
    inset-block-end: 20px;
    inset-inline-end: 16px;
    width: 40px;
    height: 40px;
    background: var(--hk-black);
    color: var(--hk-white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    z-index: 999;
    opacity: 0;
    pointer-events: none;
    transition: opacity .25s;
    text-decoration: none;
    border: none;
    cursor: pointer;
}
#hk-btt.is-visible { opacity: .8; pointer-events: auto; }
#hk-btt:hover      { opacity: 1; }

/* Footer Responsive */
@media (max-width: 767px) {
    .hk-footer__top {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .hk-footer__links      { justify-content: center; }
    .hk-footer__social     { justify-content: center; }
    .hk-footer__newsletter { text-align: center; }
}

/* ============================================================
   UTILS
   ============================================================ */
.clearfix::after { content: ""; display: table; clear: both; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
