/* Zimmerei Thomas – statisches Stylesheet */

:root {
  --color-primary: #1e4c59;
  --color-accent: #ec7247;
  --color-accent-hover: #bf461b;
  --color-header: #d7bf92;
  --color-text: #1e4c59;
  --color-body: #a4a4a4;
  --color-white: #ffffff;
  --color-footer-border: rgba(0, 0, 0, 0.1);
  --color-contact-line: rgba(0, 0, 0, 0.12);
  --font-family: "Poppins", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --container-max: 1102px;
  --header-height: 100px;
  --header-height-plus-padding: calc(var(--header-height) + 20px);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

@font-face {
  font-family: 'Poppins';
  src: url('../fonts/poppins-regular-webfont.woff2') format('woff2'),
       url('../fonts/poppins-regular-webfont.woff') format('woff');
  font-weight: 400;
  font-style: normal;
}

@font-face {
  font-family: 'Poppins';
  src: url('../fonts/poppins-medium-webfont.woff2') format('woff2'),
       url('../fonts/poppins-medium-webfont.woff') format('woff');
  font-weight: 600;
  font-style: normal;
}

@font-face {
  font-family: 'Poppins';
  src: url('../fonts/poppins-bold-webfont.woff2') format('woff2'),
       url('../fonts/poppins-bold-webfont.woff') format('woff');
  font-weight: 700;
  font-style: normal;
}

html {
  background-color: var(--color-white);
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-height-plus-padding); /* Verhindert, dass die Überschriften beim Scroll-to-Anchor unter dem Header kleben */
}

body {
  margin: 0;
  font-family: var(--font-family);
  font-size: 17px;
  line-height: 29px;
  font-weight: 400;
  color: var(--color-body);
  background-color: var(--color-white);
}

main {
  padding-top: var(--header-height-plus-padding);
}

img {
  max-width: 100%;
  height: auto;
  vertical-align: middle;
}

a {
  color: var(--color-accent);
  text-decoration: underline;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--color-accent-hover);
}

strong {
  font-weight: 600;
}

.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding-left: 20px;
  padding-right: 20px;
}

/* Header */

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background-color: var(--color-header);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.site-header__inner {
  display: flex;
  align-items: center;
  min-height: var(--header-height);
}

.site-logo {
  display: block;
  padding: 20px 0;
  line-height: 0;
}

.site-logo img {
  max-height: 60px;
  width: auto;
}

/* Hero (Platzhalter für ehemaligen Slider-Bereich) */

.hero {
  min-height: 140px;
  margin-top: var(--header-height);
  background-color: var(--color-white);
}

/* Sections */

.section {
  padding: 20px 0 40px;
}

.section-title {
  margin: 0 0 20px;
  padding-bottom: 15px;
  font-size: 31px;
  line-height: 1.2;
  font-weight: 700;
  color: var(--color-text);
  text-align: center;
  background: linear-gradient(to right, transparent, rgba(30, 76, 89, 0.25), transparent) bottom center / 80% 1px no-repeat;
}

.section-text {
  color: var(--color-text);
}

.section-text p {
  margin: 0 0 1em;
}

.section-text p:last-child {
  margin-bottom: 0;
}

#leistungen .section-title,
#kontakt .section-title {
  margin-top: 10px;
}

/* Feature list */

.feature-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.feature-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  color: var(--color-text);
}

.feature-list__icon {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  background-color: var(--color-primary);
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none'%3E%3Cpath d='M5 13l4 4L19 7' stroke='black' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none'%3E%3Cpath d='M5 13l4 4L19 7' stroke='black' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* Contact box */

.contact-box {
  font-style: normal;
  background-color: var(--color-header);
  padding: 25px 30px;
}

.contact-box__list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.contact-box__item {
  display: flex;
  align-items: flex-start;
  gap: 15px;
  padding: 13px 0;
  border-bottom: 1px solid var(--color-contact-line);
  color: var(--color-white);
  word-wrap: break-word;
}

.contact-box__item:last-child {
  border-bottom: none;
}

.contact-box__item a {
  color: var(--color-white);
}

.contact-box__item a:hover {
  color: var(--color-accent);
}

.contact-box__icon {
  flex-shrink: 0;
  width: 23px;
  height: 23px;
  margin-top: 3px;
  background-color: rgba(0, 0, 0, 0.55);
  mask-size: contain;
  mask-repeat: no-repeat;
  mask-position: center;
  -webkit-mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-position: center;
}

.contact-box__icon--location {
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none'%3E%3Cpath d='M12 21s7-4.5 7-11a7 7 0 1 0-14 0c0 6.5 7 11 7 11z' stroke='black' stroke-width='2'/%3E%3Ccircle cx='12' cy='10' r='2.5' stroke='black' stroke-width='2'/%3E%3C/svg%3E");
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none'%3E%3Cpath d='M12 21s7-4.5 7-11a7 7 0 1 0-14 0c0 6.5 7 11 7 11z' stroke='black' stroke-width='2'/%3E%3Ccircle cx='12' cy='10' r='2.5' stroke='black' stroke-width='2'/%3E%3C/svg%3E");
}

.contact-box__icon--phone {
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none'%3E%3Cpath d='M6.6 10.8a15 15 0 0 0 6.6 6.6l2.2-2.2a1 1 0 0 1 1-.24 11.4 11.4 0 0 0 3.6.58 1 1 0 0 1 1 1V20a1 1 0 0 1-1 1A16 16 0 0 1 3 4a1 1 0 0 1 1-1h3.5a1 1 0 0 1 1 1 11.4 11.4 0 0 0 .58 3.6 1 1 0 0 1-.24 1z' stroke='black' stroke-width='2'/%3E%3C/svg%3E");
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none'%3E%3Cpath d='M6.6 10.8a15 15 0 0 0 6.6 6.6l2.2-2.2a1 1 0 0 1 1-.24 11.4 11.4 0 0 0 3.6.58 1 1 0 0 1 1 1V20a1 1 0 0 1-1 1A16 16 0 0 1 3 4a1 1 0 0 1 1-1h3.5a1 1 0 0 1 1 1 11.4 11.4 0 0 0 .58 3.6 1 1 0 0 1-.24 1z' stroke='black' stroke-width='2'/%3E%3C/svg%3E");
}

.contact-box__icon--mail {
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none'%3E%3Crect x='3' y='5' width='18' height='14' rx='2' stroke='black' stroke-width='2'/%3E%3Cpath d='M3 7l9 6 9-6' stroke='black' stroke-width='2'/%3E%3C/svg%3E");
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none'%3E%3Crect x='3' y='5' width='18' height='14' rx='2' stroke='black' stroke-width='2'/%3E%3Cpath d='M3 7l9 6 9-6' stroke='black' stroke-width='2'/%3E%3C/svg%3E");
}

.contact-box__icon--link {
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none'%3E%3Cpath d='M10 14a5 5 0 0 1 0-7l1-1a5 5 0 0 1 7 7l-1 1M14 10a5 5 0 0 1 0 7l-1 1a5 5 0 0 1-7-7l1-1' stroke='black' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none'%3E%3Cpath d='M10 14a5 5 0 0 1 0-7l1-1a5 5 0 0 1 7 7l-1 1M14 10a5 5 0 0 1 0 7l-1 1a5 5 0 0 1-7-7l1-1' stroke='black' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
}

/* Footer */

.site-footer {
  background-color: var(--color-white);
}

.site-footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 30px 20px;
  border-top: 1px solid var(--color-footer-border);
  min-height: 33px;
}

.site-footer__meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px; 
}

.site-footer__copyright {
  margin: 0;
  color: var(--color-body);
  font-size: 17px;
}

.site-footer__links {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 17px;
}

.site-footer__links a {
  color: var(--color-body);
}

.site-footer__links a:hover {
  color: var(--color-accent);
}

.site-footer__separator {
  color: var(--color-footer-border);
  user-select: none;
}

.back-to-top {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 42px;
  height: 42px;
  border-radius: 5px;
  background-color: var(--color-primary);
  color: var(--color-white);
  transition: background-color 0.2s ease, opacity 0.3s ease;
}

.back-to-top:hover {
  background-color: rgba(30, 76, 89, 0.9);
  color: var(--color-white);
}

.back-to-top.is-fixed {
  position: fixed;
  right: 75px;
  bottom: 20px;
  z-index: 9001;
}

.back-to-top.is-fixed:not(.is-visible) {
  opacity: 0;
  pointer-events: none;
}

.back-to-top.is-fixed.is-visible {
  opacity: 1;
  pointer-events: auto;
}

/* Kleiner CSS-Zusatz speziell für rechtliche Seiten */
.legal-text h3 {
  color: var(--color-text);
  font-size: 20px;
  margin: 30px 0 10px;
}
.legal-text h4 {
  color: var(--color-text);
  font-size: 17px;
  margin: 20px 0 10px;
  font-weight: 600;
}
.legal-text address {
  font-style: normal;
  margin-bottom: 15px;
  color: var(--color-text);
}
.legal-text ul {
  margin: 0 0 15px;
  padding-left: 20px;
}
.legal-text li {
  margin-bottom: 8px;
}
.legal-text .alert-box {
  background-color: #f9f9f9;
  border-left: 4px solid #dddddd;
  padding: 15px;
  margin: 20px 0;
}

/* ==========================================================================
   Referenzen & Bildergalerie Sektion
========================================================================== */

.gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  margin-top: 20px;
}

.gallery__item {
  background-color: var(--color-white);
  border-radius: 4px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.gallery__item:hover {
  transform: translateY(-4px);
  box-shadow: 0 5px 15px rgba(30, 76, 89, 0.15);
}

.gallery__link {
  text-decoration: none;
  color: inherit;
  display: block;
}

.gallery__link:hover {
  color: inherit; /* Verhindert das Ändern der globalen Linkfarbe beim Hover */
}

.gallery__image-wrapper {
  position: relative;
  overflow: hidden;
  background-color: #f5f5f5;
  aspect-ratio: 4 / 3; /* Erzwingt einheitliches Bildformat */
}

.gallery__image-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.gallery__item:hover .gallery__image-wrapper img {
  transform: scale(1.05);
}

.gallery__caption {
  padding: 15px;
  border-top: 3px solid var(--color-header);
}

.gallery__title {
  margin: 0 0 5px 0;
  font-size: 16px;
  font-weight: 600;
  color: var(--color-text);
  line-height: 1.3;
}

.gallery__description {
  margin: 0;
  font-size: 14px;
  line-height: 1.4;
  color: var(--color-body);
}

/* --- Lightbox Styles --- */
.custom-lightbox {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(30, 76, 89, 0.95); /* Nutzt primäres Blau als transparenten Hintergrund */
  z-index: 10000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  padding: 20px;
}

.custom-lightbox.is-active {
  opacity: 1;
  pointer-events: auto;
}

.custom-lightbox__content {
  position: relative;
  max-width: 90%;
  max-height: 75vh;
}

.custom-lightbox__img {
  max-width: 100%;
  max-height: 75vh;
  object-fit: contain;
  border: 4px solid var(--color-white);
  border-radius: 2px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

.custom-lightbox__meta {
  color: var(--color-white);
  text-align: center;
  margin-top: 15px;
  max-width: 600px;
}

.custom-lightbox__title {
  margin: 0 0 5px 0;
  font-size: 18px;
  font-weight: 600;
  color: var(--color-header);
}

.custom-lightbox__desc {
  margin: 0;
  font-size: 14px;
  opacity: 0.9;
}

.custom-lightbox__close {
  position: absolute;
  top: 20px;
  right: 20px;
  background: none;
  border: none;
  color: var(--color-white);
  font-size: 35px;
  cursor: pointer;
  line-height: 1;
  padding: 10px;
  transition: color 0.2s ease;
}

.custom-lightbox__close:hover {
  color: var(--color-accent);
}

/* Navigation Buttons für die Lightbox */
.custom-lightbox__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.3);
  border: none;
  color: var(--color-white);
  font-size: 30px;
  padding: 15px 20px;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
  border-radius: 4px;
}
.custom-lightbox__nav:hover {
  background: rgba(0, 0, 0, 0.6);
  color: var(--color-accent);
}
.custom-lightbox__nav--prev { left: 20px; }
.custom-lightbox__nav--next { right: 20px; }


/* Responsive Anpassungen für das Galerie Grid */
@media (max-width: 991px) {
  .gallery {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }
}

@media (max-width: 575px) {
  .gallery {
    grid-template-columns: 1fr;
    gap: 25px;
  }
  .custom-lightbox__nav {
    padding: 10px 15px;
    font-size: 20px;
  }
  .custom-lightbox__nav--prev { left: 5px; }
  .custom-lightbox__nav--next { right: 5px; }
}


/* Responsive */

@media (max-width: 1239px) {
  body {
    font-size: 14px;
    line-height: 25px;
  }

  .section-title {
    font-size: 28px;
  }
}

@media (max-width: 767px) {
  :root {
    --header-height: 70px;
  }

  .container {
    max-width: 550px;
    padding-left: 33px;
    padding-right: 33px;
  }

  body {
    font-size: 13px;
    line-height: 19px;
  }

  .site-logo {
    padding: 5px 0;
  }

  .site-logo img {
    max-height: 50px;
  }

  .hero {
    min-height: 30px;
  }

  .section-title {
    font-size: 26px;
    margin-top: 20px;
  }

  .feature-list {
    grid-template-columns: 1fr;
  }

  .feature-list li {
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  }

  .contact-box {
    padding: 25px 20px 25px 30px;
  }

  .site-footer__inner {
    flex-direction: column;
    text-align: center;
  }

  .site-footer__meta {
    flex-direction: column;
    gap: 10px;
  }  

  .back-to-top.is-fixed {
    right: 33px;
  }
}

@media (max-width: 479px) {
  .section-title {
    font-size: 24px;
  }
}
