/* Ergänzungen Malerbetrieb */

/* Impressum (ganz unten, ruhige Typo) */
.impressum.section-padding {
  background: var(--section-bg-color);
  border-top: 1px solid var(--border-color);
  scroll-margin-top: 6rem;
}

.impressum-heading {
  font-size: clamp(1.2rem, 2.5vw, 1.5rem);
  font-weight: var(--font-weight-bold);
  color: var(--dark-color);
  letter-spacing: normal;
  text-transform: none;
  margin-bottom: 1.25rem;
}

.impressum-body {
  font-size: 0.95rem;
  line-height: 1.65;
  color: var(--p-color);
}

.impressum-body p {
  margin-bottom: 1rem;
  font-size: inherit;
}

.impressum-address-block {
  white-space: pre-line;
  line-height: 1.55;
}

.impressum-body strong {
  color: var(--dark-color);
}

.impressum-body a {
  color: var(--primary-color);
}

.impressum-body a:hover {
  color: var(--secondary-color);
}

.impressum-footer-link {
  color: var(--primary-color);
  font-weight: 500;
  text-decoration: none;
}

.impressum-footer-link:hover {
  color: var(--secondary-color);
  text-decoration: underline;
}

/* Hauptnavigation: etwas engere Abstände zwischen den Links (Template: je 20px) */
@media screen and (min-width: 992px) {
  .navbar-expand-lg .navbar-nav .nav-link {
    margin-left: 9px;
    margin-right: 9px;
  }
}

/* Marken-Link: äussere Primary-Pill (.custom-link) — nur am <a>; Grösse/Rundung nur am <img.navbar-brand-logo> */
.navbar .navbar-brand.custom-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--border-radius-large);
  padding: 0.5rem 1.25rem;
  margin-top: 0.4rem;
  margin-bottom: 0.4rem;
  line-height: 0;
  transition: background-color 0.3s ease, color 0.3s ease;
}

.navbar .navbar-brand.custom-link .navbar-brand-logo {
  display: block;
  width: auto;
  max-width: min(300px, 58vw);
  height: auto;
  max-height: 3.45rem;
  object-fit: contain;
  border-radius: var(--border-radius-small);
  background: var(--white-color);
  padding: 0.35rem 0.65rem;
  box-shadow: 0 0.2rem 0.65rem rgba(0, 0, 0, 0.08);
}

@media screen and (min-width: 992px) {
  .navbar .navbar-brand.custom-link {
    margin-left: 0.15rem;
    margin-right: 1rem;
    padding: 0.55rem 1.35rem;
  }

  .navbar .navbar-brand.custom-link .navbar-brand-logo {
    max-width: 340px;
    max-height: 4rem;
    padding: 0.4rem 0.75rem;
  }
}

/* Auf heller Sticky-Leiste: weisse Schrift auf der Primary-Kachel (besser lesbar) */
.is-sticky .navbar .navbar-brand.custom-link,
.is-sticky .navbar .navbar-brand.custom-link:hover {
  color: var(--white-color);
}

/* Navigation: E-Mail gut lesbar (Logo-Blau), nicht Bootstrap text-muted */
.navbar .navbar-contact-email,
.navbar .navbar-contact-email a {
  color: black;
  font-weight: 600;
}

.navbar .navbar-contact-email a {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

.navbar .navbar-contact-email a:hover {
  color: var(--secondary-color);
}

.is-sticky .navbar .navbar-contact-email,
.is-sticky .navbar .navbar-contact-email a {
  color: black;
}

.is-sticky .navbar .navbar-contact-email a:hover {
  color: black;
}

/* Hero: Logo + h1 wieder in einer Zeile (frisch, nebeneinander) */
.hero-title-wrap {
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.75rem 1rem;
}

.hero-title-wrap .hero-logo {
  flex: 0 0 auto;
  display: block;
  width: auto;
  max-width: min(280px, 42vw);
  max-height: clamp(3rem, 9vw, 6rem);
  height: auto;
  object-fit: contain;
  object-position: left center;
  border-radius: var(--border-radius-small);
  background: var(--white-color);
  padding: 0.4rem 0.65rem;
  box-shadow: 0 0.35rem 1rem rgba(0, 0, 0, 0.1);
}

.hero-title-wrap .hero-title {
  flex: 0 1 auto;
  min-width: 0;
}

@media screen and (min-width: 992px) {
  .hero-title-wrap .hero-logo {
    max-width: min(300px, 34vw);
    max-height: clamp(4rem, 6.5vw, 6.5rem);
    padding: 0.45rem 0.85rem;
  }
}

@media screen and (max-width: 575px) {
  .hero-title-wrap {
    gap: 0.5rem 0.65rem;
  }

  .hero-title-wrap .hero-logo {
    max-width: min(130px, 36vw);
    max-height: 2.6rem;
    padding: 0.2rem 0.35rem;
  }
}

/* Hero: Bild rechts (nicht das Logo) — leicht abgerundete Ecken */
.hero .hero-image {
  border-radius: var(--border-radius-medium);
}

/* Hero: Fliesstext auf Secondary-Hintergrund lesbar (nicht Standard --p-color) */
.hero .hero-text > p {
  color: var(--white-color);
}

/* Referenzen: „Anfrage stellen“ — weiße Schrift; .custom-border-btn nutzt sonst graues --p-color */
.services .custom-btn.custom-border-btn.custom-link {
  color: var(--white-color);
  border-color: var(--white-color);
}

.services .custom-btn.custom-border-btn.custom-link:hover {
  color: var(--white-color);
}

#form-status {
  min-height: 0;
  margin-top: 1rem;
  margin-bottom: 0;
  font-size: 1rem;
  line-height: 1.45;
}

#form-status:empty {
  display: none;
}

#form-status.error,
#form-status.ok {
  display: block;
  padding: 1rem 1.15rem 1rem 1.25rem;
  border-radius: var(--border-radius-small);
  font-weight: var(--font-weight-bold);
  box-shadow: 0 0.35rem 1.25rem rgba(0, 0, 0, 0.08);
}

#form-status.error {
  color: #7a1f1f;
  background: #fdecec;
  border: 1px solid #e8b4b4;
  border-left: 4px solid #c62828;
}

#form-status.ok {
  color: #1e4d3a;
  background: #e8f4ef;
  border: 1px solid #b8d9c9;
  border-left: 4px solid var(--secondary-color);
}

.field-hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* Kontakt: Adresse aus denselben Base64-Werten wie in maler.js */
.contact-address-block {
  white-space: pre-line;
  line-height: 1.55;
}

/* Google Maps: ein Klick öffnet die Suche (auf dem Handy oft direkt in der Maps-App) */
.profile-map-wrap {
  border-top: 1px solid var(--border-color);
}

.contact-info .contact-map-wrap {
  margin-top: 0.35rem;
  margin-bottom: 0.5rem;
}

.profile-map-link {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 1rem 1.25rem;
  min-height: 3.25rem;
  text-decoration: none;
  color: var(--dark-color);
  background: var(--section-bg-color);
  transition: background 0.2s, color 0.2s;
  -webkit-tap-highlight-color: transparent;
}

.profile-map-link:hover,
.profile-map-link:focus-visible {
  background: #e9f1ee;
  color: var(--dark-color);
  outline: none;
}

.profile-map-icon {
  font-size: 1.75rem;
  color: var(--secondary-color);
  flex-shrink: 0;
}

.profile-map-text {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  flex: 1;
  min-width: 0;
}

.profile-map-cta {
  font-weight: var(--font-weight-bold);
  font-size: 1rem;
}

.profile-map-hint {
  font-size: 0.85rem;
  color: var(--p-color);
}

.profile-map-chevron {
  flex-shrink: 0;
  font-size: 1.25rem;
  color: var(--p-color);
}

/* Angebot: kompakter — globale h2/h3 im Template sind 48px/36px und fressen die Spalte */
.about-angebot.section-padding {
  padding-top: 72px;
  padding-bottom: 72px;
}

@media screen and (min-width: 992px) {
  .about-angebot.section-padding {
    padding-top: 96px;
    padding-bottom: 96px;
  }
}

.about-angebot .section-title-wrap {
  padding: 8px 18px;
}

.about-angebot .section-title-wrap h2.text-white {
  font-size: clamp(1.15rem, 2.2vw, 1.65rem);
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.about-angebot .about-angebot__badge {
  width: 64px;
  height: 64px;
  object-fit: cover;
}

@media screen and (min-width: 992px) {
  .about-angebot .about-angebot__badge {
    width: 72px;
    height: 72px;
  }
}

.about-angebot .about-angebot__subtitle {
  font-size: clamp(1.05rem, 1.8vw, 1.3rem);
  line-height: 1.35;
  letter-spacing: -0.02em;
  color: var(--dark-color);
  font-weight: var(--font-weight-bold);
}

.about-angebot .about-angebot__text {
  font-size: 1rem;
  line-height: 1.65;
  color: var(--p-color);
}

.about-angebot .about-thumb > p:not([class*="mb-0"]) {
  font-size: 1rem;
  line-height: 1.65;
}

.about-angebot .about-thumb .custom-link.fw-bold {
  font-size: 1rem;
}

@media screen and (max-width: 991px) {
  .about-angebot .section-title-wrap h2.text-white {
    font-size: 1.25rem;
  }

  .about-angebot .about-angebot__subtitle {
    font-size: 1.08rem;
  }
}

/* Referenzen: Template-.services-thumb-up zieht Karten um 50px nach oben (bottom/-margin) und überlappt die Karte darüber — deaktivieren */
.services .services-thumb-up {
  bottom: 0;
  margin-bottom: 24px;
}

/* Referenzen: Projektfoto per <img> — lokale Pfade relativ zur HTML (url in --var würde gegen css/ aufgelöst) */
.services-thumb .services-photo-reveal {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 50%;
  height: 55%;
  border-radius: var(--border-radius-small) 0 var(--border-radius-medium) 0;
  overflow: hidden;
  background-color: var(--border-color);
  pointer-events: none;
}

.services-thumb .services-photo-reveal img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

@media screen and (max-width: 991px) {
  .services .services-thumb-up {
    margin-bottom: 32px;
  }

  .services-thumb .services-photo-reveal {
    width: 45%;
    height: 60%;
  }
}

/* -------------------------------------------------------------------------
   Schmale Viewports (Hochformat, z. B. iPhone 14 ~390px): weniger Leerraum,
   keine Überbreite, Section-Header und Kennzahlen lesbar.
   ------------------------------------------------------------------------- */

@media screen and (max-width: 991px) {
  .contact-form {
    margin-left: 0;
  }
}

@media screen and (max-width: 576px) {
  html {
    overflow-x: hidden;
  }

  .hero {
    padding-top: 140px;
    padding-bottom: 260px;
  }

  .hero-text {
    margin-bottom: 72px;
  }

  .hero .col-lg-5.position-relative {
    min-height: 200px;
    margin-top: 0.25rem;
  }

  .hero-title {
    font-size: clamp(1.15rem, 4.2vw + 0.65rem, 1.85rem);
    line-height: 1.2;
    letter-spacing: -0.03em;
    padding: 6px 16px;
    max-width: 100%;
  }

  .hero h2 {
    font-size: clamp(1rem, 3.2vw + 0.55rem, 1.35rem);
    letter-spacing: -0.02em;
    padding: 6px 14px;
    line-height: 1.25;
    max-width: 100%;
  }

  .hero .hero-text p {
    font-size: 1rem;
    line-height: 1.6;
  }

  .navbar .navbar-brand.custom-link {
    padding: 0.32rem 0.55rem;
    margin-top: 0.2rem;
    margin-bottom: 0.2rem;
  }

  .navbar .navbar-brand.custom-link .navbar-brand-logo {
    max-width: min(168px, 40vw);
    max-height: 2.65rem;
    padding: 0.22rem 0.4rem;
  }

  .navbar .d-flex.d-lg-none.align-items-center {
    flex-shrink: 1;
    min-width: 0;
    max-width: 46%;
  }

  .navbar .d-flex.d-lg-none .nav-phone-link {
    font-size: 0.78rem;
    padding: 6px 10px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
  }

  .featured .ps-5 {
    padding-left: 1rem !important;
  }

  .featured-numbers {
    font-size: clamp(1.85rem, 9vw, 2.5rem);
    letter-spacing: -0.04em;
  }

  .featured-text {
    font-size: 0.9rem;
    line-height: 1.35;
  }

  .section-title-wrap {
    padding: 8px 14px;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center !important;
  }

  .section-title-wrap .avatar-image {
    width: 72px;
    height: 72px;
  }

  .section-title-wrap h2.ms-4,
  .section-title-wrap h2.me-3 {
    margin-left: 0 !important;
    margin-right: 0 !important;
    font-size: 1.2rem;
    text-align: center;
    line-height: 1.2;
  }

  .about-angebot .section-title-wrap {
    justify-content: center !important;
  }

  .about-angebot .section-title-wrap h2.text-white {
    font-size: 1.12rem;
  }

  .about-thumb h4.text-black {
    font-size: clamp(1rem, 3.8vw + 0.35rem, 1.2rem);
    line-height: 1.35;
  }

  .services-thumb {
    padding: 26px 18px 230px 18px;
  }

  .services-thumb h3 {
    font-size: 1.2rem;
    line-height: 1.25;
  }

  .services-thumb .services-price-text {
    font-size: 0.8rem;
  }

  .projects-thumb .projects-title {
    font-size: clamp(1.05rem, 3.5vw, 1.35rem);
    line-height: 1.3;
  }

  .clients .custom-link {
    display: inline-block;
    margin-top: 0.35rem;
    margin-left: 0 !important;
  }

  .profile-map-link {
    padding: 0.8rem 0.95rem;
    gap: 0.6rem;
  }

  .profile-map-cta {
    font-size: 0.95rem;
  }
}

@media screen and (max-width: 380px) {
  .hero-title {
    font-size: 1.1rem;
    padding: 5px 12px;
  }

  .hero h2 {
    font-size: 0.95rem;
    padding: 5px 11px;
  }

  .navbar .navbar-brand.custom-link .navbar-brand-logo {
    max-width: min(148px, 38vw);
    max-height: 2.35rem;
  }

  .section-title-wrap h2.ms-4,
  .section-title-wrap h2.me-3 {
    font-size: 1.05rem;
  }
}
