/**
 * MEDICA GmbH – Ergänzungen zu Tailwind (lokal: css/tailwind.min.css)
 * Schriften: Systemstack – keine Google Fonts
 */

:root {
  --medica-blue: #0c4a6e;
  --medica-blue-light: #155e8a;
  --medica-turquoise: #2dd4bf;
  --medica-turquoise-soft: #99f6e4;
  --medica-red: #dc2626;
  --medica-bg: #f0f9ff;
  --medica-surface: #ffffff;
}

/* Gleichmäßige Desktop-Skalierung: bei 100 % Browser-Zoom wirkt die Seite etwa wie zuvor bei 110–115 %.
   Alle rem-basierten Schriften, Abstände, Buttons, Karten und Container wachsen proportional. */
@media (min-width: 1024px) {
  html {
    font-size: 112.5%;
  }
}

html {
  scroll-behavior: smooth;
  /* Sticky Header + Cookie-Leiste: Zielanker nicht unter der Kopfzeile verdecken */
  scroll-padding-top: 5.5rem;
}

@media (min-width: 1024px) {
  html {
    scroll-padding-top: 4.5rem;
  }
}

body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background-color: var(--medica-bg);
  color: #0f172a;
}

/* Honeypot – für Screenreader versteckt, nicht display:none (Spam-Bots) */
.hp-field {
  position: absolute !important;
  left: -9999px !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
}

/* Sticky mobile CTA bar – innerhalb der Inhaltsbreite, nicht über die komplette Bildschirmbreite */
.mobile-cta-bar {
  left: 50% !important;
  right: auto !important;
  width: min(calc(100% - 2rem), 72rem);
  transform: translateX(-50%);
  border-radius: 0.875rem 0.875rem 0 0;
  box-shadow: 0 -4px 24px rgba(12, 74, 110, 0.12);
  z-index: 50;
}

/* Skip link */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  padding: 0.75rem 1rem;
  background: var(--medica-blue);
  color: #fff;
  font-weight: 600;
}
.skip-link:focus {
  left: 0.5rem;
  top: 0.5rem;
}

/* Standard-CTA (Conversion) – ergänzt Tailwind-Klassen im HTML */
.cta-box {
  border: 1px solid rgb(191 219 254);
  background-color: rgb(239 246 255);
  border-radius: 0.75rem;
  padding: 1.5rem;
  box-shadow: 0 1px 2px rgba(12, 74, 110, 0.06);
}

.cta-box .cta-btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.5rem;
  background-color: var(--medica-red);
  padding: 0.75rem 1.5rem;
  font-weight: 700;
  color: #fff;
  text-decoration: none;
}

.cta-box .cta-btn-primary:hover {
  background-color: #b91c1c;
}

.cta-box .cta-btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.5rem;
  border: 1px solid var(--medica-blue);
  padding: 0.75rem 1.5rem;
  font-weight: 600;
  color: var(--medica-blue);
  text-decoration: none;
  background: #fff;
}

.cta-box .cta-btn-secondary:hover {
  background: var(--medica-bg);
}

/* Platzhalter bis echte Kundenfotos liegen (optional zusätzlich zu echtem Bild) */
.image-placeholder {
  background: linear-gradient(135deg, #e8f8fd, #ffffff);
  border: 1px dashed #8bd3e6;
  color: #0b5f89;
  min-height: 260px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 1rem;
  font-size: 0.875rem;
  font-weight: 600;
}

.site-logo {
  display: block;
  width: auto;
  height: auto;
  max-width: 260px;
  max-height: 76px;
  object-fit: contain;
}

@media (min-width: 640px) {
  .site-logo {
    max-width: 340px;
    max-height: 92px;
  }
}

@media (max-width: 480px) {
  .site-logo {
    max-width: 180px;
    max-height: 58px;
  }
}

/* Header-Schutz: Logo, Navigation und Aktionsbuttons bleiben getrennt und überlappen nicht. */
header .site-logo {
  flex-shrink: 0;
}

@media (max-width: 1023px) {
  header .site-logo {
    max-width: min(180px, 48vw);
  }
}

/* Einheitliche Kontaktleiste: ca. 3 mm höher als die bisherige Ausführung */
.top-contact-bar > div { padding-top: 0.85rem; padding-bottom: 0.85rem; }

/* SVG-Logo ohne hellblauen Bildhintergrund */
.site-logo { background: transparent; }

@media (max-width: 639px) {
  .top-contact-bar > div { padding-top: 0.7rem; padding-bottom: 0.7rem; }
}

/* Kontaktleiste: klare Abstände, keine überlappenden Icons oder Texte */
.top-contact-bar > div {
  min-height: 50px;
  column-gap: 1.5rem;
  row-gap: 0.5rem;
}
.top-contact-bar p,
.top-contact-bar a,
.top-contact-bar span {
  white-space: nowrap;
}
.top-contact-bar > div > div {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}
.top-contact-bar a {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}
.top-contact-bar svg {
  flex: 0 0 auto;
}
@media (max-width: 639px) {
  .top-contact-bar > div {
    align-items: flex-start;
  }
  .top-contact-bar > div > div {
    width: 100%;
    flex-wrap: wrap;
    gap: 0.55rem 1rem;
  }
}

/* Über uns: bewusst kompaktes Portrait mit Text daneben */
.owner-profile-grid {
  display: grid;
  grid-template-columns: minmax(220px, 320px) minmax(0, 1fr);
  gap: 2rem;
  align-items: start;
}
.owner-profile-image {
  width: 100%;
  max-width: 320px;
  overflow: hidden;
  border-radius: 1rem;
  box-shadow: 0 8px 24px rgba(15, 78, 111, .12);
}
.owner-profile-photo {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: center top;
}
@media (max-width: 767px) {
  .owner-profile-grid {
    grid-template-columns: 1fr;
  }
  .owner-profile-image {
    max-width: 300px;
  }
}

/* Beratungseinsatz: kleines Bild seitlich, Inhalt daneben */
.beratung-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 360px);
  gap: 2.5rem;
  align-items: center;
  padding-top: 1rem;
}
.beratung-hero-image {
  width: 100%;
  max-width: 360px;
  justify-self: end;
  overflow: hidden;
  border-radius: 1rem;
  box-shadow: 0 8px 24px rgba(15, 78, 111, .12);
}
.beratung-hero-photo {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}
.pflicht-hinweis {
  margin-top: 1.25rem;
  padding: 1rem 1.1rem;
  border-left: 4px solid var(--medica-red);
  border-radius: .75rem;
  background: #fff7f7;
}
.pflicht-hinweis h3 {
  color: var(--medica-blue);
  font-weight: 700;
}
.pflicht-hinweis p {
  margin-top: .4rem;
  color: #475569;
}
@media (max-width: 767px) {
  .beratung-hero-grid {
    grid-template-columns: 1fr;
  }
  .beratung-hero-image {
    max-width: 320px;
    justify-self: start;
  }
}

/* Portraitaufnahmen werden vollständig und ohne Beschnitt dargestellt. */
.portrait-image-frame {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  border-radius: 1rem;
  background: #f8fafc;
  overflow: hidden;
}
.portrait-content-image {
  display: block;
  width: 100%;
  height: auto;
  max-height: none;
  aspect-ratio: auto !important;
  object-fit: contain;
  object-position: center top;
}

/* Cookie-Hinweis: nur technisch erforderliche Cookies, ohne Tracking. */
.cookie-notice {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1000;
  padding: 1rem;
  transform: translateY(110%);
  opacity: 0;
  transition: transform .18s ease, opacity .18s ease;
  pointer-events: none;
}
.cookie-notice--visible {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}
.cookie-notice--closing {
  transform: translateY(110%);
  opacity: 0;
}
.cookie-notice__inner {
  width: min(1120px, 100%);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1rem 1.15rem;
  border: 1px solid rgba(15, 78, 111, .2);
  border-radius: 1rem;
  background: rgba(255, 255, 255, .98);
  box-shadow: 0 14px 40px rgba(15, 23, 42, .22);
  backdrop-filter: blur(10px);
}
.cookie-notice__text h2 {
  margin: 0;
  color: var(--medica-blue);
  font-size: 1rem;
  font-weight: 700;
}
.cookie-notice__text p {
  margin: .35rem 0 0;
  color: #475569;
  font-size: .9rem;
  line-height: 1.55;
}
.cookie-notice__text a {
  color: var(--medica-blue);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.cookie-notice__button {
  flex: 0 0 auto;
  min-width: 132px;
  border: 0;
  border-radius: .75rem;
  padding: .8rem 1rem;
  background: var(--medica-blue);
  color: #fff;
  font-weight: 700;
  cursor: pointer;
}
.cookie-notice__button:hover,
.cookie-notice__button:focus-visible {
  filter: brightness(1.08);
}
.cookie-notice__button:focus-visible {
  outline: 3px solid rgba(20, 184, 166, .35);
  outline-offset: 3px;
}
@media (max-width: 767px) {
  .cookie-notice { padding: .75rem; }
  .cookie-notice__inner {
    align-items: stretch;
    flex-direction: column;
    gap: .9rem;
  }
  .cookie-notice__button { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  .cookie-notice { transition: none; }
}

/* Über uns: Text links, Foto rechts */
.owner-profile-grid-reverse {
  grid-template-columns: minmax(0, 1fr) minmax(220px, 320px);
}
.owner-profile-grid-reverse .owner-profile-image {
  justify-self: end;
}
@media (max-width: 767px) {
  .owner-profile-grid-reverse { grid-template-columns: 1fr; }
  .owner-profile-grid-reverse .owner-profile-image { justify-self: start; }
}

@media (min-width: 768px) {
  .balanced-media-grid {
    grid-template-columns: minmax(0, 1.12fr) minmax(280px, 0.88fr) !important;
    align-items: start !important;
  }
  .balanced-media-grid .balanced-image-frame,
  .balanced-media-grid .portrait-image-frame {
    max-width: 400px;
    justify-self: end;
  }
}

.kontakt-photo-frame {
  background: #f8fafc;
}

.kontakt-photo-frame img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
}

.form-card-compact textarea {
  min-height: 8rem;
}

@media (min-width: 1024px) {
  .form-card-compact {
    align-self: start;
  }
}

header nav.main-nav-strong {
  font-size: 0.98rem !important;
  font-weight: 700 !important;
  gap: 0.35rem !important;
}

header nav.main-nav-strong > a,
header nav.main-nav-strong > div > a {
  padding: 0.45rem 0.6rem !important;
}

header nav.main-nav-strong div div a {
  font-size: 0.92rem;
  font-weight: 600;
}

@media (min-width: 1024px) {
  header > div.mx-auto {
    min-height: 5.2rem;
  }
}

.leistungen-top-cta a {
  text-decoration: none;
}

header nav.main-nav-strong {
  font-size: 1.03rem !important;
  gap: 0.45rem !important;
}
header nav.main-nav-strong > a,
header nav.main-nav-strong > div > a {
  padding: 0.5rem 0.7rem !important;
}
header nav.main-nav-strong div div a {
  font-size: 0.96rem;
}

.trust-grid {
  display: grid;
  gap: 1.25rem;
}
@media (min-width: 640px) {
  .trust-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1200px) {
  .trust-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
.trust-card {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  padding: 1.25rem;
  border: 1px solid #d9efe8;
  border-radius: 1rem;
  background: #f8fcfb;
}
.trust-card h3 {
  font-size: 1.18rem;
  line-height: 1.35;
}
.trust-card p {
  margin-top: 0.45rem;
  line-height: 1.55;
}
.trust-icon {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3.4rem;
  height: 3.4rem;
  border-radius: 9999px;
  background: #eef8f3;
  color: #50795f;
  border: 1px solid #d6eadb;
}
.trust-icon svg { width: 1.9rem; height: 1.9rem; }

.home-services-grid {
  align-items: stretch;
}
.home-service-card {
  height: 100%;
}
@media (min-width: 768px) {
  .home-service-card--single {
    grid-column: 1 / -1;
    width: min(100%, calc(50% - 0.75rem));
    justify-self: center;
  }
}

.contact-panel-grid {
  align-items: center;
}
@media (min-width: 768px) {
  .contact-panel-grid {
    grid-template-columns: minmax(0, 1fr) 220px !important;
  }
}
.contact-qr {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
}
.contact-qr-image {
  width: min(210px, 100%);
  height: auto;
}
.footer-compact {
  padding-top: 2rem !important;
  padding-bottom: 2rem !important;
}
.footer-qr {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}
.footer-qr-image {
  width: 180px;
  height: auto;
}
@media (max-width: 767px) {
  .contact-qr, .footer-qr { align-items: center; }
}

.why-medica-photo {
  object-position: center 42%;
}

.contact-panel-grid--single {
  grid-template-columns: 1fr !important;
}

.footer-contact-layout {
  display: grid;
  gap: 1.5rem 2rem;
}
.footer-cta {
  max-width: 620px;
}
.footer-cta p.text-lg {
  line-height: 1.35;
}
@media (min-width: 900px) {
  .footer-contact-layout {
    grid-template-columns: minmax(0, 1.2fr) minmax(160px, 0.7fr) 280px;
    align-items: start;
  }
  .footer-cta {
    grid-column: 1 / 3;
    grid-row: 1;
  }
  .footer-brand {
    grid-column: 1;
    grid-row: 2;
  }
  .footer-nav {
    grid-column: 2;
    grid-row: 2;
  }
  .footer-contact-layout .footer-qr {
    grid-column: 3;
    grid-row: 1 / span 2;
    align-items: flex-end;
  }
}

.glance-grid {
  align-items: stretch;
}
.glance-card {
  height: 100%;
  padding: 1rem 1.1rem;
  border: 1px solid #d9e8f1;
  border-radius: 1rem;
  background: #ffffff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03);
}

.contact-panel-grid--balanced {
  align-items: center !important;
}
.contact-info-stack {
  display: flex;
  align-items: stretch;
}
.contact-info-inner {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 260px;
}
.contact-qr--home {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
}
.contact-qr--home .contact-qr-image {
  width: min(220px, 100%);
  height: auto;
}
@media (max-width: 767px) {
  .contact-info-inner { min-height: 0; }
  .contact-qr--home { align-items: center; }
}

.cta-split-pair {
  width: 100%;
}
@media (min-width: 768px) {
  .cta-split-pair {
    display: flex !important;
    flex-wrap: nowrap !important;
    justify-content: space-between !important;
    align-items: center !important;
    gap: 1rem !important;
    width: 100%;
  }
  .cta-split-pair > a,
  .cta-split-pair > button {
    flex: 0 0 auto;
  }
  .cta-split-pair > a:last-child,
  .cta-split-pair > button:last-child {
    margin-left: auto;
  }
}
@media (max-width: 767px) {
  .cta-split-pair {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 0.75rem !important;
  }
}

.leistungen-top-cta {
  justify-content: flex-end;
}
@media (max-width: 767px) {
  .leistungen-top-cta { justify-content: flex-start; }
}

.contact-info-inner--compact {
  min-height: 220px;
}

.footer-compact--narrow {
  padding-top: 1.5rem !important;
  padding-bottom: 1.5rem !important;
}
.footer-slim-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 2rem;
  padding-top: 1rem;
}
.footer-contact-layout {
  gap: 1rem 2rem;
}
@media (min-width: 900px) {
  .footer-contact-layout {
    grid-template-columns: 1fr !important;
  }
  .footer-cta {
    grid-column: auto !important;
    grid-row: auto !important;
    max-width: 100%;
  }
  .footer-slim-row {
    grid-column: auto;
  }
}
@media (max-width: 767px) {
  .footer-slim-row {
    flex-direction: column;
    gap: 1rem;
  }
}
