/* ============================================================
   HWV Massivhaus – hwv.css für Joomla
   Alle Klassen mit hwv- Präfix um Konflikte zu vermeiden.
   Mobile First | Breakpoints: 600px, 900px
   ============================================================ */

:root {
  --hwv-primary:      #cc0000;
  --hwv-secondary:    #1a237e;
  --hwv-nav-active:   #2a3a8c;
  --hwv-claim-bg:     #2a3a8c;
  --hwv-text:         #222222;
  --hwv-link:         #2a3a8c;
  --hwv-font-main:    'Open Sans', Arial, Helvetica, sans-serif;
  --hwv-font-heading: 'Baumans', Arial, Helvetica, sans-serif;
  --hwv-max-width:    1200px;
}

/* ══════════════════════════════════════════════
   GRUND-TYPOGRAFIE
   – Fließtext in Open Sans (Fix: vorher fiel der
     Textkörper auf die Browser-Standard-Serife
     "Times" zurück, weil keine body-Schrift gesetzt war)
   ══════════════════════════════════════════════ */
body {
  font-family: var(--hwv-font-main);
  color: var(--hwv-text);
}

/* ══════════════════════════════════════════════
   HEADER
   – sitzt in einem Modul mit voller Seitenbreite
   ══════════════════════════════════════════════ */
.hwv-header-inner {
  display: flex;
  align-items: stretch;
  max-width: var(--hwv-max-width);
  margin: 0 auto;
  min-height: 80px;
}

.hwv-header-logo {
  flex: 0 0 60%;
  box-sizing: border-box;   /* Padding in die 60% einrechnen – sonst Überlauf */
  display: flex;
  align-items: center;
  padding: 8px 20px;
  background: #fff;
}

/* Logo-Bild: Höhe responsiv, nie breiter als der Bereich */
.hwv-header-logo img {
  height: auto;
  max-height: 75px;
  width: auto;
  max-width: 100%;
  display: block;
}

.hwv-header-claim {
  flex: 0 0 40%;
  box-sizing: border-box;   /* Padding in die 40% einrechnen – sonst Überlauf */
  background: var(--hwv-claim-bg);
  color: #fff;
  font-family: var(--hwv-font-heading);
  font-size: 1.05rem;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px 20px;
  text-align: center;
}

.hwv-header-claim p {
  margin: 0;
  line-height: 1.3;
}

/* ══════════════════════════════════════════════
   NAVIGATION
   – sitzt ebenfalls in einem Modul voller Breite
   ══════════════════════════════════════════════ */
.hwv-main-nav {
  background: #fff;
  border-top: 3px solid var(--hwv-secondary);
  border-bottom: 1px solid #e0e0e0;
  position: relative;
}

.hwv-nav-list {
  display: flex;
  flex-wrap: nowrap;
  max-width: var(--hwv-max-width);
  margin: 0 auto;
  list-style: none;
  padding: 0;
}

.hwv-nav-list a {
  display: block;
  padding: 14px 20px;
  font-family: var(--hwv-font-main);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #333;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.2s, color 0.2s;
}

/* Aktiver/Hover-Zustand. Hinweis: das frühere
   ".hwv-nav-list li:first-child a" wurde entfernt –
   es hat den ersten Menüpunkt ("Startseite") auf
   JEDER Seite dauerhaft als aktiv markiert. Der
   aktive Punkt wird per JS (.active) gesetzt. */
.hwv-nav-list a:hover,
.hwv-nav-list a.active {
  background: var(--hwv-nav-active);
  color: #fff;
}

/* Burger-Button (nur Mobile)
   Das Icon (3 Balken) wird komplett per CSS-Pseudoelementen
   gezeichnet und braucht KEINE <span>-Kinder. Grund: Joomla/
   TinyMCE entfernt beim Speichern attributlose, "leere"
   <span>-Elemente – dadurch war der Burger auf der Live-Seite
   unsichtbar. So bleibt das Icon unabhängig davon erhalten. */
.hwv-burger-btn {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  width: 46px;          /* ausreichend große Touch-Fläche */
  height: 46px;
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 100;
}

.hwv-burger-btn::before,
.hwv-burger-btn::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  width: 26px;
  height: 3px;
  margin-left: -13px;
  margin-top: -1.5px;
  background: var(--hwv-secondary);
  border-radius: 2px;
  transition: transform 0.3s, box-shadow 0.3s, opacity 0.3s;
}

/* Geschlossen: ::before ist der mittlere Balken,
   die beiden äußeren Balken kommen per box-shadow. */
.hwv-burger-btn::before {
  box-shadow: 0 -8px 0 var(--hwv-secondary), 0 8px 0 var(--hwv-secondary);
}
/* ::after liegt im Ruhezustand unsichtbar in der Mitte
   und wird im offenen Zustand zur zweiten Diagonale. */
.hwv-burger-btn::after {
  opacity: 0;
}

/* Offen: X-Form */
.hwv-burger-btn.open::before { box-shadow: none; transform: rotate(45deg); }
.hwv-burger-btn.open::after  { opacity: 1; transform: rotate(-45deg); }

/* ══════════════════════════════════════════════
   CONTENT-LAYOUT
   – sitzt im Joomla-Artikel-Container (volle Breite)
   ══════════════════════════════════════════════ */
.hwv-welcome-inner {
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 28px 24px;
  max-width: var(--hwv-max-width);
  margin: 0 auto;
}

.hwv-welcome-text h1 {
  font-size: 1.05rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--hwv-primary);
  letter-spacing: 0.03em;
  margin-bottom: 10px;
}

.hwv-welcome-text h2 {
  font-size: 0.95rem;
  font-weight: 700;
  text-transform: uppercase;
  margin-top: 20px;
  margin-bottom: 10px;
  color: var(--hwv-text);
}

.hwv-welcome-text p {
  font-size: 0.93rem;
  line-height: 1.65;
  margin-bottom: 14px;
  color: var(--hwv-text);
}

.hwv-subheading       { font-weight: 700; font-size: 0.95rem; margin-bottom: 4px; }
.hwv-subheading-bold  { font-weight: 700; font-size: 0.95rem; margin-bottom: 14px; }

.hwv-welcome-image img {
  border: 1px solid #ccc;
  width: 100%;
  max-width: 100%;
  height: auto;
  display: block;
}

/* ══════════════════════════════════════════════
   LEISTUNGEN-LISTE
   ══════════════════════════════════════════════ */
.hwv-leistungen-liste { list-style: none; padding: 0; margin: 0 0 16px 0; }
.hwv-leistungen-liste li {
  position: relative;
  padding-left: 1.1em;
  margin-bottom: 4px;
  font-size: 0.93rem;
  line-height: 1.65;
}
.hwv-leistungen-liste li::before { content: '•'; position: absolute; left: 0; }

/* ══════════════════════════════════════════════
   REFERENZEN KATEGORIE-NAV
   ══════════════════════════════════════════════ */
.hwv-ref-kategorie-nav { margin-bottom: 24px; }
.hwv-ref-kategorie-nav ul { list-style: disc; padding-left: 1.2em; margin: 0; }
.hwv-ref-kategorie-nav li { margin-bottom: 4px; font-size: 0.93rem; }
.hwv-ref-kategorie-nav a { color: var(--hwv-primary); text-decoration: none; }
.hwv-ref-kategorie-nav a:hover,
.hwv-ref-kategorie-nav a.aktiv { text-decoration: underline; }

/* ══════════════════════════════════════════════
   BILDSLIDER
   ══════════════════════════════════════════════ */
.hwv-slider-container { width: 100%; }

.hwv-slider-wrapper {
  position: relative;
  width: 100%;
  max-width: 100%;
  overflow: hidden;
  border: 1px solid #ccc;
  background: #f0f0f0;   /* kein Schwarz wenn Bild fehlt */
  aspect-ratio: 4/3;
}

.hwv-slider-track { display: flex; transition: transform 0.4s ease; height: 100%; }
.hwv-slider-slide { min-width: 100%; height: 100%; }
.hwv-slider-slide img { width: 100%; height: 100%; object-fit: cover; display: block; }

.hwv-slider-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0,0,0,.45);
  color: #fff;
  border: none;
  width: 36px;
  height: 48px;
  font-size: 1.2rem;
  cursor: pointer;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}
.hwv-slider-btn:hover { background: rgba(0,0,0,.7); }
.hwv-slider-btn.prev { left: 0; }
.hwv-slider-btn.next { right: 0; }

.hwv-slider-thumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 8px;
  max-width: 100%;
}
.hwv-slider-thumb {
  width: 60px;
  height: 45px;
  object-fit: cover;
  cursor: pointer;
  border: 2px solid transparent;
  opacity: 0.7;
  transition: opacity 0.2s, border-color 0.2s;
}
.hwv-slider-thumb.active,
.hwv-slider-thumb:hover { opacity: 1; border-color: var(--hwv-primary); }

.hwv-slider-dots { display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap; }
.hwv-slider-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: #ccc;
  border: none;
  cursor: pointer;
  transition: background 0.2s;
}
.hwv-slider-dot.active { background: var(--hwv-secondary); }

/* ══════════════════════════════════════════════
   KONTAKT
   ══════════════════════════════════════════════ */
.hwv-kontakt-layout { max-width: var(--hwv-max-width); margin: 0 auto; padding: 28px 24px; display: flex; flex-direction: column; gap: 40px; }
.hwv-kontakt-inhalt h1 { font-size: 1.05rem; font-weight: 700; text-transform: uppercase; color: var(--hwv-primary); margin-bottom: 14px; }
.hwv-kontakt-adresse { font-style: normal; font-size: 0.93rem; line-height: 1.7; margin-bottom: 14px; }
.hwv-kontakt-adresse a { color: var(--hwv-primary); text-decoration: none; }
.hwv-kontakt-hinweis { font-size: 0.93rem; margin-bottom: 20px; }

.hwv-form-row { display: flex; align-items: flex-start; gap: 14px; margin-bottom: 10px; }
.hwv-form-row label { min-width: 110px; font-size: 0.92rem; font-weight: 600; padding-top: 8px; }
.hwv-form-field { flex: 1; }
.hwv-form-field input,
.hwv-form-field textarea {
  width: 100%;
  box-sizing: border-box;   /* verhindert Überlauf durch Padding/Border */
  padding: 6px 8px;
  border: 1px solid #ccc;
  font-family: var(--hwv-font-main);
  font-size: 0.9rem;
  color: var(--hwv-text);
}
.hwv-form-field input:focus,
.hwv-form-field textarea:focus { outline: none; border-color: var(--hwv-secondary); }
.hwv-form-field textarea { min-height: 100px; resize: vertical; }

.hwv-form-info-icon { display: inline-flex; align-items: center; justify-content: center; width: 16px; height: 16px; background: #2196f3; color: #fff; border-radius: 50%; font-size: 0.7rem; vertical-align: middle; margin-left: 3px; cursor: help; }
.hwv-field-error { color: var(--hwv-primary); font-size: 0.8rem; margin-top: 4px; display: none; }
.hwv-chronoforms-hint { font-size: 0.78rem; color: var(--hwv-primary); margin-bottom: 10px; }
.hwv-chronoforms-hint a { color: var(--hwv-primary); }
.hwv-form-buttons { display: flex; justify-content: flex-end; gap: 8px; }
.hwv-btn-reset,
.hwv-btn-senden { background: #f0f0f0; color: var(--hwv-text); border: 1px solid #ccc; padding: 6px 18px; font-size: 0.88rem; cursor: pointer; transition: background 0.2s; }
.hwv-btn-senden:hover { background: var(--hwv-secondary); color: #fff; border-color: var(--hwv-secondary); }
.hwv-form-success { display: none; background: #e8f5e9; border: 1px solid #a5d6a7; color: #2e7d32; padding: 14px; margin-top: 10px; font-weight: 600; }
.hwv-form-error   { display: none; background: #fdecea; border: 1px solid #f5c6c0; color: #b3261e; padding: 14px; margin-top: 10px; font-weight: 600; }
.hwv-btn-senden:disabled { opacity: 0.6; cursor: progress; }

/* Datenschutz-Zustimmung (Checkbox-Zeile) */
.hwv-form-consent { display: flex; align-items: flex-start; gap: 8px; margin: 6px 0 14px; font-size: 0.85rem; line-height: 1.4; }
.hwv-form-consent input { margin-top: 2px; flex: 0 0 auto; }
.hwv-form-consent a { color: var(--hwv-primary); }
/* Honeypot – für echte Nutzer unsichtbar, nicht fokussierbar.
   Clip-Technik statt left:-9999px, damit kein horizontales Scrollen entsteht. */
.hwv-hp-field { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

.hwv-gmap-container { width: 100%; height: 400px; background: #eee; }

/* ══════════════════════════════════════════════
   LEGAL (Impressum / Datenschutz)
   ══════════════════════════════════════════════ */
.hwv-legal-content { max-width: var(--hwv-max-width); margin: 0 auto; padding: 28px 24px; }
.hwv-legal-content h1 { font-size: 1.05rem; font-weight: 700; text-transform: uppercase; color: var(--hwv-primary); margin-bottom: 20px; }
.hwv-legal-content h2 { font-size: 0.93rem; font-weight: 700; margin-top: 20px; margin-bottom: 8px; }
.hwv-legal-content h3 { font-size: 0.9rem; font-weight: 700; margin-top: 14px; margin-bottom: 8px; }
.hwv-legal-content p { font-size: 0.93rem; line-height: 1.65; margin-bottom: 10px; }
.hwv-legal-content a { color: var(--hwv-primary); }
.hwv-legal-generator-hint { font-size: 0.82rem; color: #777; border-top: 1px solid #ddd; padding-top: 10px; margin-top: 28px; }

/* ══════════════════════════════════════════════
   COOKIE-BANNER
   ══════════════════════════════════════════════ */
.hwv-cookie-banner {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  background: #2a3a8c;
  color: #fff;
  padding: 16px 32px;
  display: flex;
  align-items: center;
  gap: 16px;
  z-index: 9999;
  flex-wrap: wrap;
  box-shadow: 0 -2px 8px rgba(0,0,0,.2);
}
.hwv-cookie-banner.hidden { display: none; }
.hwv-cookie-icon { width: 32px; height: auto; flex-shrink: 0; }
.hwv-cookie-banner p { flex: 1; font-size: 0.85rem; line-height: 1.5; margin: 0; }
.hwv-cookie-banner a { color: #aac4ff; text-decoration: underline; }
.hwv-btn-cookie-accept {
  background: #fff;
  color: #2a3a8c;
  border: none;
  padding: 8px 24px;
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
  border-radius: 3px;
  white-space: nowrap;
  transition: background 0.2s;
}
.hwv-btn-cookie-accept:hover { background: #e0e8ff; }

/* ══════════════════════════════════════════════
   FOOTER
   ══════════════════════════════════════════════ */
.hwv-site-footer { background: #f4f4f4; border-top: 1px solid #ddd; }
.hwv-agency-branding { text-align: center; padding: 18px; font-size: 0.82rem; color: #777; }
.hwv-agency-branding a { color: var(--hwv-link); }
.hwv-footer-year { font-variant-numeric: tabular-nums; }

/* ══════════════════════════════════════════════
   REVEAL-ANIMATION
   ══════════════════════════════════════════════ */
.hwv-reveal { opacity: 0; transform: translateY(20px); transition: opacity 0.5s ease, transform 0.5s ease; }
.hwv-reveal.visible { opacity: 1; transform: translateY(0); }

/* ══════════════════════════════════════════════
   RESPONSIVE – Tablet / zweispaltig
   Breakpoint 600px: ab hier Content nebeneinander
   (niedrig gewählt weil Joomla-Artikel-Container
    enger ist als der Viewport)
   ══════════════════════════════════════════════ */
@media (min-width: 600px) {
  .hwv-welcome-inner {
    flex-direction: row;
    align-items: flex-start;
    gap: 32px;
  }
  .hwv-welcome-text { flex: 1 1 0; min-width: 0; }
  /* Bild-Spalte – gilt für statisches Bild UND Slider */
  .hwv-welcome-image,
  .hwv-slider-container { flex: 0 0 48%; min-width: 0; }
  .hwv-welcome-image img { max-width: 100%; }

  .hwv-kontakt-layout { flex-direction: row; }
  .hwv-kontakt-inhalt { flex: 1; }
  /* Fix: HTML-Element heißt .hwv-kontakt-map – vorher zielte
     die Regel auf .hwv-kontakt-karte und die Karte bekam ihre
     Spaltenbreite nicht (rendert sonst viel zu schmal). */
  .hwv-kontakt-map    { flex: 0 0 48%; }
}

/* ══════════════════════════════════════════════
   RESPONSIVE – Desktop
   ══════════════════════════════════════════════ */
@media (min-width: 900px) {
  .hwv-header-logo img { max-height: 90px; }
  .hwv-welcome-image,
  .hwv-slider-container { flex: 0 0 52%; }
}

/* ══════════════════════════════════════════════
   RESPONSIVE – Mobile (max 599px)
   ══════════════════════════════════════════════ */
@media (max-width: 599px) {
  /* Header: Logo über Claim */
  .hwv-header-inner  { flex-direction: column; min-height: unset; }
  .hwv-header-logo   { flex: none; width: 100%; padding: 10px 14px; }
  .hwv-header-logo img { max-height: 55px; }
  .hwv-header-claim  { flex: none; width: 100%; padding: 8px 14px; font-size: 0.95rem; }

  /* Burger-Menü */
  .hwv-burger-btn    { display: flex; }
  /* Platzhalter damit Nav-Position stimmt */
  .hwv-main-nav::before { content: ''; display: block; height: 50px; }
  .hwv-nav-list {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    background: #fff;
    border-top: 2px solid var(--hwv-secondary);
    z-index: 200;
    box-shadow: 0 4px 12px rgba(0,0,0,.15);
  }
  .hwv-nav-list.open { display: flex; }
  .hwv-nav-list a    { padding: 14px 20px; border-bottom: 1px solid #eee; font-size: 0.9rem; }

  /* Kontaktformular */
  .hwv-form-row  { flex-direction: column; gap: 4px; }
  .hwv-form-row label { padding-top: 0; min-width: unset; }

  /* Cookie */
  .hwv-cookie-banner { flex-direction: column; text-align: center; padding: 14px; }
}
