/* =========================
   Reset / Base
   ========================= */
*,
*::before,
*::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: #1f2933;
  background: #fff;
  line-height: 1.6;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

:root{
  --brand: #145da0;
  --border: #e5e7eb;
  --muted: #4b5563;
}

/* Layout wrapper */
.site-wrapper {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* =========================
   Header
   ========================= */
.header {
  background: #fff;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
}

/* Logo block (klickbar) */
.logo-area {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 0 0 auto;
}

.logo-area img {
  height: 120px;
  width: auto;
  object-fit: contain;
}

.logo-text { font-weight: 700; font-size: 14px; letter-spacing: 0.05em; }

/* Telefon direkt neben Logo (nicht klickbar Desktop, klickbar Mobile) */
.header-contact {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}

.phone {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;      /* verhindert Umbruch */
  font-weight: 600;
  font-size: 14px;
}

.phone svg { flex: 0 0 auto; }
.phone-desktop { display: inline-flex; }
.phone-mobile { display: none; }  /* nur Mobile sichtbar */

/* Navigation rechts */
.nav {
  margin-left: auto;         /* schiebt Nav nach rechts */
  display: flex;
  gap: 24px;
  flex: 0 0 auto;
}

.nav a {
  font-size: 15px;
  font-weight: 500;
  position: relative;
  padding-bottom: 4px;
}

.nav a:hover::after,
.nav a.active::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  height: 2px; width: 100%;
  background: var(--brand);
}

/* =========================
   Hero
   ========================= */
.hero { position: relative; height: 420px; overflow: hidden; }
.hero img { width: 100%; height: 100%; object-fit: cover; }

.hero-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(0,0,0,0.55) 0%, rgba(0,0,0,0.05) 55%);
}

.hero-content {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  max-width: 1200px;
  width: 100%;
  padding: 0 20px;
  color: #fff;
}

.hero-eyebrow {
  text-transform: uppercase;
  font-size: 14px;
  letter-spacing: 0.18em;
  margin-bottom: 10px;
  color: #d1e3ff;
}

.hero-title {
  font-size: 36px;
  font-weight: 700;
  margin-bottom: 12px;
}

.hero-subtitle {
  font-size: 17px;
  max-width: 520px;
  margin-bottom: 22px;
}

/* Buttons */
.btn-primary {
  display: inline-block;
  background: var(--brand);
  color: #fff;
  padding: 10px 22px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 15px;
  border: none;
  cursor: pointer;
  transition: background-color .2s ease, transform .1s ease;
}
.btn-primary:hover { background: #0f477a; transform: translateY(-1px); }

/* =========================
   Main / Sections
   ========================= */
main { flex: 1; }

main h1, main h2, main h3, main h4 { color: var(--brand); }

.section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 36px 20px;
}

.section-heading {
  font-size: 26px;
  margin-bottom: 24px;
  text-align: center;
  font-weight: 700;
  letter-spacing: .03em;
}

/* Angebot cards (home) */
.offer-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0,1fr));
  gap: 24px;
  margin-top: 12px;
}

.offer-card {
  background: #fff;
  border-radius: 12px;
  padding: 20px 20px 24px;
  box-shadow: 0 12px 30px rgba(15,23,42,.08);
  border: 1px solid var(--border);
}

.offer-icon { margin-bottom: 14px; }
.offer-icon img {
  width: 72px;
  height: 72px;
  display: block;
  margin: 0 auto;
}

.offer-title { font-size: 18px; font-weight: 600; margin-bottom: 8px; }
.offer-text  { font-size: 14px; color: var(--muted); }

/* Two column */
.two-column {
  display: grid;
  grid-template-columns: 3fr 2fr;
  gap: 32px;
  align-items: start;
}
.two-column p { margin-bottom: 14px; font-size: 15px; }

/* Contact form */
.contact-grid { display: grid; grid-template-columns: 3fr 2fr; gap: 32px; }
.form-group { margin-bottom: 16px; }

label { display: block; font-size: 14px; margin-bottom: 6px; font-weight: 500; }

input[type="text"],
input[type="email"],
textarea {
  width: 100%;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid #cbd5e1;
  font-size: 14px;
  font-family: inherit;
}

textarea { min-height: 140px; resize: vertical; }

input:focus, textarea:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 1px rgba(20,93,160,.2);
}

.form-row { display: flex; gap: 16px; }
.form-row .form-group { flex: 1; }

.form-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 8px;
  flex-wrap: wrap;
}

.form-note { font-size: 12px; color: #6b7280; }

/* =========================
   Footer
   ========================= */
.footer { background: var(--brand); color: #fff; margin-top: 40px; }

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.footer-left {
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.footer-links a { margin-left: 18px; font-size: 14px; opacity: .95; }
.footer-links a:hover { text-decoration: underline; }

/* =========================
   Responsive
   ========================= */

/* <=900px */
@media (max-width: 900px) {
  .hero { height: 360px; }
  .hero-title { font-size: 30px; }
  .two-column, .offer-grid, .contact-grid { grid-template-columns: 1fr; }
}

/* <=720px (Mobile Portrait & Landscape): Logo + Telefon 1 Zeile, Nav darunter */
@media (max-width: 720px) {
  .header-inner {
    flex-wrap: wrap;               /* wichtig: Nav kommt in nächste Zeile */
    align-items: center;
    padding: 10px 12px;
    gap: 10px;
  }

  .logo-area img { height: 46px; } /* kompakt, aber gut lesbar */
  .logo-text { display: none; }    /* verhindert Breite, hält 1 Zeile */

  /* Mobile: nur klickbares Tel zeigen */
  .phone-desktop { display: none; }
  .phone-mobile  { display: inline-flex; }

  .phone { font-size: 13px; }

  /* Nav immer volle Breite in Zeile 2 */
  .nav {
    flex: 1 0 100%;
    margin-left: 0;
    gap: 14px;
    flex-wrap: wrap;
  }

  .nav a { font-size: 14px; padding-bottom: 2px; }

  .hero { height: 320px; }
  .hero-overlay {
    background: linear-gradient(180deg, rgba(0,0,0,0.65) 0%, rgba(0,0,0,0.05) 70%);
  }
  .hero-title { font-size: 26px; }
  .hero-subtitle { font-size: 15px; }
  .section { padding: 36px 16px; }
}

/* Mobile Landscape: etwas mehr Luft zwischen Telefonzeile und Nav + Header kompakter */
@media (max-width: 900px) and (orientation: landscape) and (max-height: 520px) {
  .header-inner { padding: 8px 12px; }
  .nav { margin-top: 2px; }   /* winzig mehr Abstand */
  .hero { height: 260px; }
}


/* =========================
   Modal (Danke-/Fehlermeldung)
   ========================= */
.modal {
  position: fixed;
  inset: 0;
  display: none;            /* <- sorgt dafür, dass es NICHT im Footer sichtbar ist */
  z-index: 9999;
}

.modal.is-open {
  display: block;           /* wird nur per JS bei ?success=1 oder ?error=1 geöffnet */
}

.modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  animation: modalFadeIn 160ms ease-out;
}

.modal__dialog {
  position: relative;
  max-width: 520px;
  margin: 12vh auto 0;
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.25);
  padding: 22px 22px 18px;
  transform: translateY(10px) scale(0.98);
  animation: modalPopIn 180ms ease-out forwards;
}

.modal__close {
  position: absolute;
  top: 10px;
  right: 12px;
  border: none;
  background: transparent;
  font-size: 24px;
  cursor: pointer;
  color: #64748b;
}

.modal__close:hover { color: #0f172a; }

.modal__icon {
  width: 52px;
  height: 52px;
  border-radius: 999px;
  background: rgba(20, 93, 160, 0.10);
  color: #145da0;
  display: grid;
  place-items: center;
  margin: 6px 0 10px;
}

.modal--error .modal__icon {
  background: rgba(220, 38, 38, 0.10);
  color: #dc2626;
}

.modal__svg { width: 30px; height: 30px; }

.modal__title {
  font-size: 20px;
  margin-bottom: 6px;
}

.modal__text {
  font-size: 14px;
  color: #475569;
  margin-bottom: 14px;
}

.modal__actions {
  display: flex;
  justify-content: flex-end;
}

@keyframes modalFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes modalPopIn {
  to { transform: translateY(0) scale(1); }
}
