/*
Theme Name: Haarzeit Loxstedt
Template: astra
Description: Marken-Child-Theme für den Friseur- und Barbersalon Haarzeit Loxstedt (Astra-Basis, eigene Farben/Fonts, Apple-inspiriertes Design-System).
Author: Haarzeit Loxstedt
Version: 1.1.0
*/

/* ---------------------------------------------------------------------
   Selbst gehostete Schriften (kein Google-Fonts-CDN, DSGVO-konform)
--------------------------------------------------------------------- */
@font-face {
  font-family: "Cormorant Garamond";
  src: url("assets/fonts/cormorant-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Cormorant Garamond";
  src: url("assets/fonts/cormorant-600.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("assets/fonts/inter-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("assets/fonts/inter-500.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("assets/fonts/inter-600.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("assets/fonts/inter-700.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* ---------------------------------------------------------------------
   Design-Tokens
--------------------------------------------------------------------- */
:root {
  --hz-gold: #c8a24a;
  --hz-gold-dark: #b0934d;
  --hz-gold-text: #7a5f1c;
  --hz-base: #111111;
  --hz-base-footer: #0a0a0a;
  --hz-surface: #f5f2ec;
  --hz-surface-alt: #fafafa;
  --hz-text-on-dark: #edeae3;
  --hz-text-on-light: #1a1a1a;
  --hz-text-on-light-muted: rgba(26, 26, 26, 0.62);
  --hz-font-display: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --hz-font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

  /* Apple-typische, sehr sanfte Easing-Kurve für alle Übergänge */
  --hz-ease: cubic-bezier(0.4, 0, 0.2, 1);
  --hz-speed: 220ms;

  --hz-radius-sm: 8px;
  --hz-radius-md: 14px;
  --hz-radius-lg: 20px;
  --hz-radius-pill: 980px;

  --hz-shadow-sm: 0 1px 2px rgba(17, 17, 17, 0.06), 0 1px 1px rgba(17, 17, 17, 0.04);
  --hz-shadow-md: 0 8px 24px rgba(17, 17, 17, 0.08), 0 2px 6px rgba(17, 17, 17, 0.05);
  --hz-shadow-lg: 0 20px 48px rgba(17, 17, 17, 0.14), 0 4px 12px rgba(17, 17, 17, 0.06);

  /* Astra liest diese Variablen selbst für Layoutbreiten */
  --ast-content-width-size: 1200px;
  --ast-wide-width-size: 1400px;
}

/* Harte Sicherheitsbremse gegen horizontales Scrollen auf kleinen Screens,
   unabhängig davon, welches Element theoretisch überläuft. */
html, body { max-width: 100%; overflow-x: hidden; }

/* ---------------------------------------------------------------------
   Echtes Fullscreen/Edge-to-Edge – kein weißer Rand mehr.
   Astras "Separate Containers"-Wrapper wurde global auf Full-Width +
   Unboxed umgestellt (astra-settings: ast-site-content-layout,
   site-content-style), das entfernt die 3em-Innenpolsterung und den
   weißen Kartenhintergrund um den Content. Diese Regeln sind die
   zusätzliche Absicherung, damit niemals wieder Weiß durchscheint –
   auch nicht kurz beim Laden, im Overscroll auf iOS oder falls die
   Astra-Optionen künftig im Customizer zurückgesetzt werden. */
html,
body,
#page,
.site,
.ast-separate-container,
.ast-plain-container,
.ast-page-builder-template {
  background-color: var(--hz-base) !important;
}

/* Content-Wrapper komplett randlos – Hero & Sektionen laufen bis an den
   Bildschirmrand. Nur der Content-Container (#content), NICHT der
   Header (der behält seine eigene, bewusste Innenpolsterung). */
#content .ast-container {
  max-width: none !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
}
#content,
#primary,
.site-main,
.ast-article-single,
.entry-content {
  background-color: transparent !important;
  padding: 0 !important;
  margin: 0 !important;
  max-width: none !important;
}

/* ---------------------------------------------------------------------
   Basis-Typografie – Apple-typisch: klare Skala, ruhige Zeilenhöhen,
   großzügiger Weißraum, dezent negatives Letter-Spacing bei großen
   Überschriften.
--------------------------------------------------------------------- */
body,
button,
input,
select,
textarea {
  font-family: var(--hz-font-sans) !important;
  color: var(--hz-text-on-light);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, h5, h6,
.entry-title, .site-title, .page-title,
.wp-block-heading,
.elementor-heading-title {
  font-family: var(--hz-font-display) !important;
  font-weight: 600 !important;
  line-height: 1.1;
  letter-spacing: -0.01em;
}

h1 { font-size: clamp(2.25rem, 5.2vw, 3.75rem); letter-spacing: -0.02em; }
h2 { font-size: clamp(1.6rem, 3.2vw, 2.5rem); }
h3 { font-size: clamp(1.2rem, 2vw, 1.5rem); }

p { color: var(--hz-text-on-light-muted); }

a {
  color: var(--hz-gold-text);
  transition: color var(--hz-speed) var(--hz-ease);
}
a:hover { color: var(--hz-gold-dark); }

::selection {
  background-color: var(--hz-gold);
  color: var(--hz-base);
}

:focus-visible {
  outline: 2px solid var(--hz-gold);
  outline-offset: 3px;
  border-radius: 2px;
}

/* ---------------------------------------------------------------------
   Header
--------------------------------------------------------------------- */
.site-header,
.ast-above-header,
.main-header-bar {
  background-color: var(--hz-base) !important;
  border-color: rgba(200, 162, 74, 0.35) !important;
}

.main-header-bar .main-navigation ul li a,
.ast-header-navigation-arrow,
.site-title a,
.ast-site-identity .site-title a {
  color: var(--hz-text-on-dark) !important;
  font-family: var(--hz-font-sans);
  font-size: 14px;
  letter-spacing: 0.06em;
  transition: color var(--hz-speed) var(--hz-ease);
}

.main-header-bar .main-navigation ul li a:hover,
.main-header-bar .main-navigation ul li.current-menu-item > a {
  color: var(--hz-gold) !important;
}

.ast-mobile-menu-buttons-minimal svg,
.astra-mobile-menu-buttons svg { color: var(--hz-text-on-dark) !important; }

/* Logo: feste, vernünftige Höhe statt Original-Pixelmaßen (1904x316).
   Logo + Markenname sitzen als Flex-Zeile sauber nebeneinander und
   brechen auf keiner Breite mehr um – der Site-Title-Text wird
   ausgeblendet, da der Name bereits im Logo steht. */
.site-branding.ast-site-identity {
  display: flex !important;
  align-items: center;
  flex-wrap: nowrap;
  min-width: 0;
}
.site-logo-img,
.site-logo-img a {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}
.custom-logo {
  height: 30px !important;
  width: auto !important;
  max-width: 200px;
}
@media (min-width: 921px) {
  .custom-logo { height: 38px !important; max-width: 240px; }
}
.ast-site-title-wrap {
  display: none !important;
}

/* ---------------------------------------------------------------------
   Buttons – Apple-Style: Pill-Form, weiches Hover mit Lift + Schatten
--------------------------------------------------------------------- */
.wp-block-button__link,
.ast-button,
button[type="submit"],
input[type="submit"],
.wpcf7-submit {
  background-color: var(--hz-gold) !important;
  color: var(--hz-base) !important;
  border: 1px solid var(--hz-gold) !important;
  border-radius: var(--hz-radius-pill) !important;
  font-family: var(--hz-font-sans) !important;
  font-weight: 500 !important;
  font-size: 0.95rem;
  letter-spacing: 0.01em;
  padding: 0.85em 1.75em !important;
  transition: transform var(--hz-speed) var(--hz-ease),
    box-shadow var(--hz-speed) var(--hz-ease),
    filter var(--hz-speed) var(--hz-ease),
    background-color var(--hz-speed) var(--hz-ease);
  box-shadow: var(--hz-shadow-sm);
}
.wp-block-button__link:hover,
.ast-button:hover,
.wpcf7-submit:hover {
  filter: brightness(0.94);
  transform: translateY(-1px);
  box-shadow: var(--hz-shadow-md);
}
.wp-block-button__link:active,
.ast-button:active,
.wpcf7-submit:active {
  transform: translateY(0);
  filter: brightness(0.88);
}

.is-style-outline .wp-block-button__link,
.wp-block-button.is-style-outline .wp-block-button__link {
  background-color: transparent !important;
  color: var(--hz-text-on-dark) !important;
  border: 1px solid var(--hz-gold) !important;
  box-shadow: none;
}
.is-style-outline .wp-block-button__link:hover {
  background-color: rgba(200, 162, 74, 0.1) !important;
}

/* ---------------------------------------------------------------------
   Sections – helle/dunkle Blöcke im 60/30/10-Look, großzügiger Weißraum
--------------------------------------------------------------------- */
.hz-section-dark {
  background-color: var(--hz-base) !important;
  color: var(--hz-text-on-dark);
  padding-block: clamp(4rem, 11vw, 8rem);
}
.hz-section-dark h1, .hz-section-dark h2, .hz-section-dark h3,
.hz-section-dark .wp-block-heading { color: var(--hz-text-on-dark) !important; }
.hz-section-dark p { color: rgba(237, 234, 227, 0.75); }

.hz-section-light {
  background-color: var(--hz-surface) !important;
  color: var(--hz-text-on-light);
  padding-block: clamp(4rem, 11vw, 8rem);
}
.hz-section-light h1, .hz-section-light h2, .hz-section-light h3,
.hz-section-light .wp-block-heading { color: var(--hz-text-on-light) !important; }

.hz-eyebrow {
  display: inline-block;
  font-family: var(--hz-font-sans);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--hz-gold-text);
  margin-bottom: 0.75rem;
}
.hz-section-dark .hz-eyebrow { color: var(--hz-gold); }

.hz-rule {
  width: 44px;
  height: 2px;
  background: var(--hz-gold);
  border: none;
  margin: 1.1rem 0 0;
}
.hz-rule.is-center { margin-inline: auto; }

/* ---------------------------------------------------------------------
   Kacheln / Cards – dezenter Schatten statt harter Kontur, sanftes
   Hover-Lift (Apple-typisches "Karten schweben leicht")
--------------------------------------------------------------------- */
.hz-card {
  background: var(--hz-surface-alt);
  border: 1px solid rgba(26, 26, 26, 0.06);
  border-radius: var(--hz-radius-md);
  padding: 1.75rem;
  box-shadow: var(--hz-shadow-sm);
  transition: transform var(--hz-speed) var(--hz-ease),
    box-shadow var(--hz-speed) var(--hz-ease);
}
@media (hover: hover) {
  .hz-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--hz-shadow-md);
  }
}
.hz-section-dark .hz-card {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(200, 162, 74, 0.22);
  box-shadow: none;
}

.hz-rating-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  background: rgba(200, 162, 74, 0.12);
  border: 1px solid rgba(200, 162, 74, 0.4);
  border-radius: var(--hz-radius-pill);
  padding: 0.5rem 1.15rem;
  font-family: var(--hz-font-sans);
  font-weight: 600;
  font-size: 0.95rem;
}
.hz-rating-badge .stars { color: var(--hz-gold); letter-spacing: 0.05em; }

/* ---------------------------------------------------------------------
   Kontakt- & Bild-Grids: fixe 2-Spalten-Layouts, die unterhalb von
   860px sauber auf 1 Spalte stapeln statt horizontal zu scrollen.
--------------------------------------------------------------------- */
.hz-contact-grid {
  grid-template-columns: minmax(260px, 1fr) minmax(300px, 1.3fr);
}
.hz-salon-grid {
  grid-template-columns: 1fr 1fr;
}
@media (max-width: 860px) {
  .hz-contact-grid,
  .hz-salon-grid {
    grid-template-columns: 1fr !important;
  }
}

/* ---------------------------------------------------------------------
   Galerie – 3 Spalten Desktop, exakt 2 Spalten auf Smartphones (≤768px),
   fluide Gaps, weiche Zoom-Vorschau nur auf Geräten mit echtem Hover
--------------------------------------------------------------------- */
.hz-gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(0.6rem, 2vw, 1.25rem);
}
.hz-gallery a {
  display: block;
  position: relative;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border-radius: var(--hz-radius-sm);
}
.hz-gallery img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 400ms var(--hz-ease);
}
@media (hover: hover) {
  .hz-gallery a:hover img { transform: scale(1.05); }
}
@media (max-width: 768px) {
  .hz-gallery { grid-template-columns: repeat(2, 1fr); gap: 0.75rem; }
}

/* ---------------------------------------------------------------------
   Lightbox (natives <dialog>) – große Touch-Ziele, weicher Fade-/Scale-In
--------------------------------------------------------------------- */
.hz-lightbox {
  position: fixed;
  inset: 0;
  max-width: none;
  max-height: none;
  width: 100%;
  height: 100%;
  margin: 0;
  border: none;
  padding: 0;
  background: rgba(10, 10, 10, 0.97);
}
.hz-lightbox:not([open]) { display: none; }
.hz-lightbox[open] {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: max(1.25rem, env(safe-area-inset-top)) 1.25rem max(1.25rem, env(safe-area-inset-bottom));
  animation: hz-lightbox-in 220ms var(--hz-ease);
}
@keyframes hz-lightbox-in {
  from { opacity: 0; }
  to { opacity: 1; }
}
.hz-lightbox::backdrop { background: transparent; }
.hz-lightbox img {
  max-width: min(92vw, 1100px);
  max-height: 76vh;
  object-fit: contain;
  border-radius: var(--hz-radius-sm);
  animation: hz-lightbox-img-in 260ms var(--hz-ease);
}
@keyframes hz-lightbox-img-in {
  from { opacity: 0; transform: scale(0.97); }
  to { opacity: 1; transform: scale(1); }
}
.hz-lightbox__caption {
  color: var(--hz-text-on-dark);
  font-family: var(--hz-font-sans);
  font-size: 0.9rem;
  text-align: center;
}
.hz-lightbox__close {
  position: absolute;
  top: max(1rem, env(safe-area-inset-top));
  right: max(1rem, env(safe-area-inset-right));
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--hz-gold);
  color: var(--hz-text-on-dark);
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  border-radius: 999px;
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
  transition: background-color var(--hz-speed) var(--hz-ease);
  touch-action: manipulation;
}
.hz-lightbox__close:hover,
.hz-lightbox__close:focus-visible {
  background: rgba(255, 255, 255, 0.14);
}

/* ---------------------------------------------------------------------
   Footer
--------------------------------------------------------------------- */
.ast-small-footer,
footer.site-footer {
  background-color: var(--hz-base-footer) !important;
  color: rgba(237, 234, 227, 0.7) !important;
  border-top: 1px solid rgba(200, 162, 74, 0.25);
}
.ast-small-footer a { color: var(--hz-text-on-dark) !important; }
.ast-small-footer a:hover { color: var(--hz-gold) !important; }

.hz-footer-bar {
  background: var(--hz-base-footer);
  color: rgba(237, 234, 227, 0.65);
  font-family: var(--hz-font-sans);
  font-size: 0.85rem;
  text-align: center;
  padding: 1.25rem 1rem;
  border-top: 1px solid rgba(200, 162, 74, 0.2);
}
.hz-footer-bar a { color: rgba(237, 234, 227, 0.85); text-decoration: underline; text-underline-offset: 3px; }
.hz-footer-bar a:hover { color: var(--hz-gold); }
.hz-footer-bar span { margin: 0 0.4em; }

/* ---------------------------------------------------------------------
   Responsive Feinschliff – Mobile (≤ 768px) & sehr kleine Screens
--------------------------------------------------------------------- */
@media (max-width: 768px) {
  .hz-section-dark, .hz-section-light { padding-block: 3.75rem; }
  .hz-card { padding: 1.35rem; }
}

@media (max-width: 480px) {
  .hz-rating-badge { font-size: 0.85rem; padding: 0.45rem 0.9rem; }
}

/* Bewegungsreduzierung respektieren */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
