/*
Theme Name: Happy Hippo Turnierservice (v6.1.2)
Theme URI: https://happy-hippo-turnierservice.de/
Author: Nova (ChatGPT) – für Thomas
Description: v6.1.2: Live-Turnierseite mobil verfeinert, kompaktere Handy-Buttons, Footer mit Icons wie auf allen Seiten.
Version: 6.1.2.1
Requires at least: 6.0
Tested up to: 6.5
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: happy-hippo-turnierservice
*/

/* =========
   Basis
   ========= */
:root{
  --hh-blue:#000066;
  --hh-white:#ffffff;
  --hh-text-soft: rgba(255,255,255,.85);

  --hh-card: rgba(255,255,255,.12);
  --hh-card-strong: rgba(255,255,255,.18);
  --hh-border: rgba(255,255,255,.18);

  --hh-radius: 18px;
  --hh-shadow: 0 10px 30px rgba(0,0,0,.18);

  --hh-max: 1200px;
  --hh-gap: 18px;

  --hh-logo-desktop: 560px;
  --hh-logo-mobile: 360px;
}

html{ box-sizing:border-box; }
*, *::before, *::after{ box-sizing:inherit; }

body{
  margin:0;
  background: var(--hh-blue);
  color: var(--hh-white);
  font-family: Arial, sans-serif;

  /* B) komfortabel wie News-Seiten – aber mit sicheren Grenzen */
  font-size: clamp(17px, 0.6vw + 14px, 24px);
  line-height: 1.7;
}

a{ color: var(--hh-white); }
a:focus-visible{ outline: 2px solid var(--hh-white); outline-offset: 2px; }

.hh-wrap{
  width: min(var(--hh-max), 100%);
  margin: 0 auto;
  padding: 18px 14px 30px;
}

/* Für lange Texte: Zeilen nicht zu lang */
.hh-content p,
.hh-content li{
  max-width: 75ch;
}

/* =========
   Typografie
   ========= */
h1,h2,h3,h4,h5,h6{
  margin: 0 0 0.6em 0;
  line-height: 1.15;
}

h1{ font-size: clamp(32px, 1.6vw + 18px, 54px); }
h2{ font-size: clamp(26px, 1.2vw + 16px, 40px); }
h3{ font-size: clamp(20px, 0.9vw + 14px, 30px); }

p{ margin: 0 0 1em 0; }

/* =========
   Header / Navigation
   ========= */
.hh-header{
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--hh-blue);
  border-bottom: 1px solid rgba(255,255,255,.15);
}

.hh-nav{
  width: min(var(--hh-max), 100%);
  margin: 0 auto;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
}

.hh-skip-link{
  position: absolute;
  left: -9999px;
  top: auto;
  width: 1px; height: 1px;
  overflow: hidden;
}
.hh-skip-link:focus{
  left: 14px;
  top: 14px;
  width: auto; height: auto;
  padding: 10px 12px;
  background: rgba(255,255,255,.15);
  border-radius: 12px;
}

.hh-burger{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width: 46px;
  height: 46px;
  border: 1px solid rgba(255,255,255,.35);
  background: transparent;
  color: var(--hh-white);
  border-radius: 12px;
  cursor: pointer;
}

.hh-burger span[aria-hidden="true"]{
  display:block;
  width: 18px;
  height: 2px;
  background: var(--hh-white);
  position: relative;
}
.hh-burger span[aria-hidden="true"]::before,
.hh-burger span[aria-hidden="true"]::after{
  content:"";
  position:absolute;
  left:0;
  width: 18px;
  height: 2px;
  background: var(--hh-white);
}
.hh-burger span[aria-hidden="true"]::before{ top:-6px; }
.hh-burger span[aria-hidden="true"]::after{ top:6px; }

.hh-menu-wrap{
  display: flex;
  align-items: center;
  gap: 12px;
}

.hh-menu{
  margin:0;
  padding:0;
  list-style:none;
  display:flex;
  gap: 12px;
  align-items:center;
  flex-wrap: wrap;
}
.hh-menu a{
  text-decoration:none;
  padding: 10px 8px;
  display:inline-block;
  border-radius: 10px;
}
.hh-menu a:hover{
  background: rgba(255,255,255,.10);
}


/* When the mobile menu is open, add a subtle dim / blur layer behind it */
body.hh-menu-open{
  overflow: hidden;
}
body.hh-menu-open::before{
  content:"";
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.18);
  z-index: 48;
}

@media (max-width: 920px){
  /* Floating / glass mobile menu (wie v5.4/v5.5 – ohne unscharfen Hintergrund) */
  .hh-menu-wrap{
    position: fixed;
    top: 76px;
    left: 16px;
    right: 16px;
    width: auto;
    max-width: 480px;
    margin: 0;
    background: rgba(24, 52, 150, .50);
    border: 1px solid rgba(255,255,255,.12);
    box-shadow: 0 10px 30px rgba(0,0,0,.35);
    border-radius: 20px;
    padding: 14px;
    max-height: calc(100vh - 110px);
    overflow: auto;
    backdrop-filter: blur(3.5px);
    -webkit-backdrop-filter: blur(3.5px);
    display: none;
  }
  body.hh-menu-open .hh-menu-wrap{ display: block; }

  /* In der mobilen Flyout-Ansicht soll das Menü als Liste (untereinander) erscheinen */
  .hh-menu{
    display: flex;
    flex-direction: column;
    flex-wrap: nowrap;
    gap: 0;
  }
  .hh-menu li{ width: 100%; }
  .hh-menu ul{ list-style: none; margin: 0; padding: 0; }

  /* Jeder Menüpunkt als “Card” wie bei den Termin-Kacheln */
  .hh-menu a{
    display: flex;
    align-items: center;
    width: 100%;
    padding: 16px 18px;
    margin: 10px 0;
    font-size: 1.12em;
    font-weight: 600;
    color: #fff;
    text-decoration: none;
    background: rgba(255,255,255,.08);
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 16px;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.06);
  }
  .hh-menu a:hover,
  .hh-menu a:focus-visible{
    background: rgba(255,255,255,.12);
  }
}


/* =========
   Logo
   ========= */
.hh-logo-wrap{
  background: var(--hh-blue);
  display:flex;
  justify-content:center;
  align-items:center;
  padding: 18px 0 8px;
}

.hh-logo-link{ display:inline-flex; align-items:center; line-height: 0; }
.hh-logo-img, .custom-logo{
  max-width: min(var(--hh-logo-desktop, 560px), 90vw);
  height: auto;
  display:block;
}

@media (max-width: 600px){
  .hh-logo-img, .custom-logo{ max-width: min(var(--hh-logo-mobile, 360px), 86vw); }
}

/* =========
   Content
   ========= */
.hh-content{
  width: min(var(--hh-max), 100%);
  margin: 0 auto;
  padding: 0 14px;
}

.hh-card{
  background: var(--hh-card);
  border: 1px solid var(--hh-border);
  border-radius: var(--hh-radius);
  box-shadow: var(--hh-shadow);
  padding: 16px 18px;
}

.hh-muted{ color: var(--hh-text-soft); }

/* =========
   Slider (Startseite)
   ========= */
.hh-slider{
  border-radius: var(--hh-radius);
  border: 1px solid rgba(255,255,255,.15);
  overflow: hidden;
  background: rgba(255,255,255,.06);
}

.hh-slider-frame{
  position: relative;
}

.hh-slide{
  margin:0;
  display:none;
}

.hh-slide.is-active{ display:block; }

.hh-slide img{
  width: 100%;
  height: auto;
  display: block;
}

/* =========
   Termine
   ========= */
/* Schriftgrößen für Termine (über Customizer) */
.hh-termine-free{ font-size: var(--hh-termine-font-open, 16px); }
.hh-termin-row{ font-size: var(--hh-termine-font-booked, 16px); }

.hh-termine-free.hh-card{
  background: var(--hh-card-strong);
  margin-bottom: 18px;
}

.hh-termine-list{
  display:flex;
  flex-direction:column;
  gap: 18px;
}

.hh-termin-row.hh-card{
  display:grid;
  grid-template-columns: 1.1fr 1fr 2fr;
  gap: 16px;
  align-items: center;
}

.hh-termin-date .hh-date{
  font-weight: 800;
  font-size: 1.05em;
}
.hh-termin-date .hh-ort{
  font-weight: 800;
  opacity: .95;
}

.hh-termin-desc{
  color: var(--hh-text-soft);
  font-weight: 700;
  line-height: 1.35;
  white-space: pre-line;
}

/* PNG Buttons */
.hh-termin-actions{
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px 12px;
  justify-items: stretch;
}

.hh-linkbtn{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #ffffff;
  border-radius: 10px;
  /* Höhe/Größe per Customizer steuerbar (v6) */
  min-height: var(--hh-termin-btn-height, 34px);
  padding: 0 10px;
  border: 1px solid rgba(0,0,0,0.08);
  box-shadow: 0 6px 14px rgba(0,0,0,0.12);
  transition: transform .12s ease, box-shadow .12s ease;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
}

.hh-linkbtn:hover{
  transform: translateY(-1px);
  box-shadow: 0 10px 18px rgba(0,0,0,0.16);
}

.hh-linkbtn img{
  display:block;
  /* Icon-Höhe per Customizer steuerbar (v6) */
  height: var(--hh-termin-btn-icon, clamp(24px, 0.9vw + 18px, 34px));
  width: auto;
  max-width: 100%;
}

.hh-linkbtn.is-disabled{
  opacity: 0.45;
  filter: grayscale(1);
  cursor: not-allowed;
  pointer-events: none;
}

/* Responsive Termine */
@media (max-width: 980px){
  .hh-termin-row.hh-card{
    grid-template-columns: 1fr;
    align-items: start;
  }
  .hh-termin-actions{
    grid-template-columns: repeat(2, minmax(0, 1fr));
    justify-items: stretch;
  }
  .hh-linkbtn{
    justify-content: center;
    width: 100%;
  }
}

/* =========
   Kontaktformular
   ========= */
.hh-form{ max-width: 980px; margin: 24px auto 0; }
.hh-form-grid{ display:grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.hh-field-full{ grid-column: 1 / -1; }

.hh-field label{ display:block; margin-bottom: 6px; font-weight: 800; }
.hh-field input,
.hh-field textarea{
  width: 100%;
  padding: 12px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,.45);
  background: rgba(255,255,255,.08);
  color: #fff;
  font: inherit;
}

.hh-field input:focus-visible,
.hh-field textarea:focus-visible{
  outline: 2px solid rgba(255,255,255,.85);
  outline-offset: 2px;
}

.hh-form-actions{
  display:flex;
  align-items:center;
  gap: 16px;
  margin-top: 16px;
  flex-wrap: wrap;
}

.hh-btn{
  padding: 12px 18px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.75);
  background: rgba(255,255,255,.12);
  color: #fff;
  cursor: pointer;
  font-weight: 800;
}

.hh-btn:hover{ background: rgba(255,255,255,.18); }

.hh-alert{
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.4);
  margin: 16px 0;
}
.hh-alert-success{ background: rgba(255,255,255,.10); }
.hh-alert-error{ background: rgba(255,0,0,.15); border-color: rgba(255,255,255,.6); }

@media (max-width: 720px){
  .hh-form-grid{ grid-template-columns: 1fr; }
}

/* Honeypot (Spam-Schutz): unsichtbar */
.hh-hp{ position:absolute; left:-9999px; top:auto; width:1px; height:1px; overflow:hidden; }

/* =========
   Footer
   ========= */
.hh-footer{
  border-top: 1px solid rgba(255,255,255,.15);
  padding: 20px 14px 28px;
}

.hh-footer-inner{
  width: min(var(--hh-max), 100%);
  margin: 0 auto;
  display:flex;
  flex-direction:column;
  align-items:center;
  gap: 12px;
}

.hh-footer-links{
  display:flex;
  gap: 16px;
  flex-wrap:wrap;
  align-items:center;
  justify-content:center;
  text-align:center;
}

.hh-social{
  display:flex;
  gap: 10px;
  align-items:center;
  justify-content:center;
}

.hh-social a{
  width: 44px;
  height: 44px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border: 1px solid rgba(255,255,255,.4);
  border-radius: 999px;
  text-decoration:none;
}

.hh-social a:hover{ background: rgba(255,255,255,.10); }

.hh-icon{ width: 22px; height: 22px; fill: currentColor; }

/* Gutenberg helpers */
.wp-block-image img{ border-radius: 12px; }
.wp-block-columns{ gap: var(--hh-gap); }


/* =========
   Über Uns / Service – schöne 3-Spalten Optik (trotz dynamischem Editor)
   ========= */
.hh-cols3{
  gap: 16px;
  max-width: var(--hh-max);
  margin-left: auto;
  margin-right: auto;
}

.hh-cols3 .wp-block-column{
  text-align: center;
}

.hh-cols3 .wp-block-image img{
  width: 100%;
  max-width: 260px;
  aspect-ratio: 3/4;
  object-fit: cover;
  margin-left: auto;
  margin-right: auto;
}

.hh-cols3 h2{
  margin-top: 12px;
  margin-bottom: 10px;
}

.hh-service-cols .wp-block-column{
  text-align: center;
}

.hh-service-cols ul{
  text-align: left;
  display: inline-block;
  margin: 10px auto 0;
}

/* =========
   Live-Turnier Seite v6.1.1
   ========= */
.hh-live-page .hh-footer .hh-social{ display:none; }
.hh-live-page .hh-footer-inner{ padding-top:18px; padding-bottom:24px; }
.hh-live-logo-wrap{ margin-bottom: 14px; }
.hh-live-logo{ max-width: 420px; width: 92%; }
.hh-live-content{
  max-width: 860px;
  margin: 0 auto 24px;
}
.hh-live-banner{
  background: linear-gradient(180deg,#c8d0ff 0%, #aab6f0 100%);
  color:#fff;
  text-align:center;
  font-weight:700;
  letter-spacing:.03em;
  border-radius: 0;
  padding: 22px 16px;
  font-size: clamp(28px, 3vw, 52px);
  margin: 0 auto 14px;
}
.hh-live-card{
  background: #f5f6fb;
  color:#121a4f;
  border:1px solid rgba(0,0,0,.06);
  border-radius: 22px;
  padding: 22px;
  box-shadow: 0 10px 24px rgba(0,0,0,.14);
}
.hh-live-date{
  font-weight:800;
  font-size: clamp(28px, 3vw, 46px);
  line-height:1.1;
  margin-bottom: 8px;
}
.hh-live-place{
  font-weight:700;
  font-size: clamp(24px, 2.6vw, 40px);
  line-height:1.15;
  margin-bottom: 14px;
}
.hh-live-desc{
  font-size: clamp(18px, 1.4vw, 28px);
  line-height:1.45;
  padding-top: 14px;
  border-top: 1px solid rgba(19,31,98,.12);
  margin-bottom: 18px;
}
.hh-live-mainbtn{
  display:flex;
  align-items:center;
  gap:14px;
  width:100%;
  border-radius: 18px;
  padding: 16px 18px;
  color:#fff;
  text-decoration:none;
  font-weight:700;
  font-size: clamp(18px, 1.25vw, 26px);
  line-height:1.25;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.16), 0 6px 18px rgba(0,0,0,.12);
}
.hh-live-mainbtn + .hh-live-mainbtn{ margin-top: 12px; }
.hh-live-mainbtn img{
  width:44px;
  height:44px;
  object-fit:contain;
  flex:0 0 44px;
  background:#fff;
  border-radius:10px;
  padding:4px;
}
.hh-live-mainbtn.is-equi{ background: linear-gradient(180deg,#2b8f8f 0%, #21706f 100%); }
.hh-live-mainbtn.is-fn{ background: linear-gradient(180deg,#2b8f8f 0%, #21706f 100%); }
.hh-live-mainbtn span{ display:block; flex:1; }
.hh-live-subhint{
  text-align:center;
  color:#415089;
  font-size:14px;
  margin:8px 4px 14px;
}
.hh-live-docs{
  display:grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap:14px;
  margin-top: 10px;
}
.hh-live-docs.is-single{ grid-template-columns: 1fr; }
.hh-live-docbtn{
  display:flex;
  align-items:center;
  justify-content:center;
  min-height:56px;
  padding: 14px 16px;
  border-radius:18px;
  background: linear-gradient(180deg,#4c56d9 0%, #3139b8 100%);
  color:#fff;
  text-decoration:none;
  font-weight:700;
  font-size: clamp(18px, 1.1vw, 24px);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.16), 0 6px 18px rgba(0,0,0,.12);
}
.hh-live-section{
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid rgba(19,31,98,.12);
}
.hh-live-section h2{
  margin:0 0 10px;
  color:#1a2261;
  font-size: clamp(22px, 1.6vw, 32px);
}
.hh-live-notes-list{
  margin:0;
  padding-left: 22px;
}
.hh-live-notes-list li{
  margin: 0 0 10px;
  line-height:1.45;
  font-size: clamp(18px, 1.25vw, 26px);
}
.hh-live-contact-card{
  background:#e8e7f8;
  border:1px solid rgba(49,57,184,.12);
  border-radius:18px;
  padding: 16px 18px;
}
.hh-live-contact-card p{
  margin: 0 0 10px;
  font-size: clamp(18px, 1.2vw, 24px);
  line-height:1.45;
}
.hh-live-contact-card p:last-child{ margin-bottom:0; }
.hh-live-contact-card a{ color:#1f2b78; text-decoration: underline; }
.hh-live-empty{
  text-align:center;
  padding: 12px 8px;
}
.hh-live-empty h2{
  color:#1a2261;
  margin:0 0 10px;
}
@media (max-width: 900px){
  .hh-live-content{ max-width: 760px; }
}
@media (max-width: 700px){
  .hh-live-logo{ max-width: 320px; }
  .hh-live-content{ max-width: 100%; padding-left:14px; padding-right:14px; }
  .hh-live-banner{
    padding: 16px 14px;
    font-size: 34px;
    margin-bottom: 12px;
  }
  .hh-live-card{
    padding: 16px;
    border-radius: 18px;
  }
  .hh-live-date{ font-size: 26px; margin-bottom:6px; }
  .hh-live-place{ font-size: 22px; margin-bottom: 10px; }
  .hh-live-desc{ font-size: 16px; margin-bottom: 14px; padding-top: 10px; }
  .hh-live-mainbtn{
    padding: 14px 16px;
    min-height: 54px;
    font-size: 16px;
    border-radius: 16px;
  }
  .hh-live-mainbtn img{
    width:38px; height:38px; flex-basis:38px;
  }
  .hh-live-docs{ grid-template-columns: 1fr; gap:10px; }
  .hh-live-docbtn{ min-height: 52px; font-size: 16px; padding: 12px 14px; }
  .hh-live-section{ margin-top: 16px; padding-top: 14px; }
  .hh-live-section h2{ font-size: 18px; }
  .hh-live-notes-list li{ font-size: 15px; margin-bottom: 8px; }
  .hh-live-contact-card{ padding: 14px; border-radius: 16px; }
  .hh-live-contact-card p{ font-size: 15px; margin-bottom: 8px; }
}


/* =========
   Live-Turnier v6.1.2 – sichere Mobil-Optimierung
   ========= */
.hh-live-page .hh-footer .hh-social{ display:flex !important; }
.hh-live-page .hh-footer-inner{ padding-top:0; padding-bottom:0; }

/* Hauptbuttons etwas kompakter, aber weiter gut klickbar */
.hh-live-mainbtn{
  min-height:56px;
  padding: 12px 16px;
  gap:12px;
}
.hh-live-mainbtn img{
  width:40px;
  height:40px;
  flex-basis:40px;
}
.hh-live-mainbtn span{
  line-height:1.2;
}

/* Dokument-Buttons etwas kompakter */
.hh-live-docbtn{
  min-height:52px;
  padding: 12px 14px;
}

/* Mobile Feinschliff – iPhone freundlich */
@media (max-width: 700px){
  .hh-live-logo{ max-width: 270px; }
  .hh-live-banner{
    padding: 14px 12px;
    font-size: 28px;
  }
  .hh-live-card{
    padding: 14px;
  }
  .hh-live-date{ font-size: 24px; }
  .hh-live-place{ font-size: 20px; }
  .hh-live-desc{
    font-size: 15px;
    margin-bottom: 12px;
  }
  .hh-live-mainbtn{
    min-height: 52px;
    padding: 10px 14px;
    border-radius: 16px;
    font-size: 14px;
    gap:10px;
  }
  .hh-live-mainbtn img{
    width:28px;
    height:28px;
    flex-basis:28px;
    border-radius:8px;
    padding:3px;
  }
  .hh-live-mainbtn span{
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .hh-live-subhint{
    font-size: 12px;
    margin:6px 4px 10px;
  }
  .hh-live-docs{
    grid-template-columns: repeat(2, minmax(0,1fr));
    gap:10px;
  }
  .hh-live-docbtn{
    min-height: 48px;
    font-size: 14px;
    padding: 10px 12px;
    border-radius: 16px;
    white-space: nowrap;
  }
  .hh-live-section{
    margin-top: 14px;
    padding-top: 12px;
  }
  .hh-live-section h2{ font-size: 17px; }
  .hh-live-notes-list li{
    font-size: 14px;
    margin-bottom: 6px;
  }
  .hh-live-contact-card{
    padding: 12px 14px;
    border-radius: 16px;
  }
  .hh-live-contact-card p{
    font-size: 14px;
    margin-bottom: 6px;
  }
}


/* v6.1.2.1 - Live button mobile one-line fix */
.hh-live-main-btn,
.live-button.eq-btn {
    display:flex;
    align-items:center;
    gap:12px;
    white-space:nowrap;
}
.hh-live-main-btn img,
.live-button.eq-btn img{
    width:20px;
    height:20px;
    flex:0 0 20px;
}
.hh-live-btn-text{
    white-space:nowrap;
    font-size:14px;
}
@media (max-width:480px){
    .hh-live-main-btn,
    .live-button.eq-btn{
        padding:0 14px;
        height:50px;
    }
}
