/* =========================================
   Dietrich Malermeister – Static One-Pager
   ========================================= */

:root {
  --red:      #aa012e;
  --red-dark: #880024;
  --dark:     #111111;
  --dark2:    #222222;
  --gray-bg:  #f8f9f9;
  --text:     #555555;
  --heading:  #333333;
  --white:    #ffffff;
  --border:   #e9e9e9;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: 'Open Sans', Helvetica, Arial, sans-serif;
  font-size: 14px;
  font-size: 0.875rem;
  line-height: 1.7;
  color: #777777;
  background: var(--white);
}

a { color: var(--red); text-decoration: none; }
a:hover { color: var(--red-dark); }
img { max-width: 100%; display: block; }

/* Headings – exakt wie OnePress-Theme */
h1, h2, h3, h4, h5, h6 {
  font-family: 'Raleway', Helvetica, Arial, sans-serif;
  font-weight: 600;
  color: var(--heading);
  margin-top: 0;
  margin-bottom: 15px;
  margin-bottom: 0.9375rem;
}

h1 {
  line-height: 1.3;
  font-size: 33px;
  font-size: 2.0625rem;
  color: var(--heading);
}
@media (min-width: 768px) {
  h1 { font-size: 40px; font-size: 2.5rem; }
}

h2 {
  line-height: 1.2;
  font-size: 25px;
  font-size: 1.5625rem;
  font-weight: 700;
  color: var(--red);
}
@media (min-width: 768px) {
  h2 { font-size: 32px; font-size: 2rem; }
}

h3 {
  font-size: 20px;
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--red);
}

h4 { font-size: 17px; font-size: 1.0625rem; color: var(--heading); }
h5 { font-size: 15px; font-size: 0.9375rem; font-weight: 700; text-transform: uppercase; color: var(--heading); }
h6 { font-size: 12px; font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; color: var(--heading); }

.container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ---- HEADER ---- */
#header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--white);
  border-bottom: 1px solid var(--border);
  transition: box-shadow 0.3s;
}
#header.scrolled { box-shadow: 0 2px 10px rgba(0,0,0,0.12); }

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1140px;
  margin: 0 auto;
  padding: 12px 20px;
  min-height: 80px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
}
.logo img { height: 52px; width: auto; flex-shrink: 0; }
.logo-text { line-height: 1.3; }
.logo-name {
  display: block;
  font-family: 'Raleway', Helvetica, Arial, sans-serif;
  font-size: 23px;
  font-weight: 600;
  color: #000000;
  letter-spacing: 1px;
  text-transform: uppercase;
  line-height: 1;
}
.logo-tagline {
  display: block;
  font-size: 0.7rem;
  color: #888;
}

.nav-links { display: flex; list-style: none; gap: 0; }
.nav-links a {
  display: block;
  padding: 6px 14px;
  font-family: 'Raleway', sans-serif;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 1px;
  color: var(--heading);
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--red); }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  width: 28px; height: 28px;
}
.nav-toggle span { display: block; height: 3px; background: var(--heading); border-radius: 2px; }

/* ---- PAGE TITLE (H1) ---- */
.page-title-section {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  padding: 28px 0;
  text-align: center;
}
.page-title-section h1 {
  font-size: clamp(1.3rem, 3vw, 1.75rem);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--heading);
}

/* ---- HERO + ÜBER UNS (Hintergrundbild, heller Overlay) ---- */
.hero-bg-section {
  position: relative;
  background: url('images/hero.jpg') center center / cover no-repeat;
}
.hero-bg-overlay {
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.82);
  pointer-events: none;
}
.hero-content-wrap {
  position: relative;
  z-index: 1;
  max-width: 760px;
  padding-top: 50px;
  padding-bottom: 60px;
}

.content-block {
  margin-bottom: 50px;
}
.content-block:last-child { margin-bottom: 0; }

.text-center { text-align: center; }

.content-block h2 {
  font-size: clamp(1.2rem, 2.5vw, 1.6rem);
  margin-bottom: 0.5rem;
}
.content-block h3 {
  font-size: clamp(0.95rem, 2vw, 1.1rem);
  margin-bottom: 1.4rem;
}
.content-block p {
  font-size: 0.875rem;
  color: var(--text);
  margin-bottom: 0.9rem;
  line-height: 1.8;
}
.content-block p:last-child { margin-bottom: 0; }

.divider {
  border: none;
  border-top: 2px solid var(--heading);
  width: 40px;
  margin: 1.2rem auto 1.4rem;
}

/* ---- SECTIONS ---- */
.section { padding: 70px 0; }
.section-gray { background: var(--gray-bg); }
.section-dark { background: var(--dark); color: #bbbbbb; }

.section-title {
  font-size: 25px;
  font-size: 1.5625rem;
  text-align: center;
  color: var(--red);
  margin-bottom: 0;
}
@media (min-width: 768px) {
  .section-title { font-size: 32px; font-size: 2rem; }
}
/* Trennstrich nur wenn KEINE subtitle folgt (Kontakt) */
.section-title.light::after {
  content: '';
  display: block;
  width: 50px; height: 3px;
  background: var(--red);
  margin: 14px auto 40px;
  border-radius: 2px;
}
.section-title.light { color: var(--white) !important; }

/* H3 + Trennstrich: H3 ist über dem Strich */
.section-subtitle {
  text-align: center;
  font-size: 20px;
  font-size: 1.25rem;
  color: var(--red);
  margin-top: 8px;
  margin-bottom: 0;
}
.section-subtitle::after {
  content: '';
  display: block;
  width: 50px; height: 3px;
  background: var(--red);
  margin: 14px auto 40px;
  border-radius: 2px;
}

/* ---- SERVICES ---- */
.services-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}
.service-card {
  background: var(--white);
  padding: 30px 20px;
  text-align: center;
  border: 1px solid var(--border);
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
  transition: box-shadow 0.2s, transform 0.2s;
}
.service-card:hover {
  box-shadow: 0 4px 16px rgba(0,0,0,0.11);
  transform: translateY(-3px);
}
.service-card img {
  width: 90px; height: 90px;
  object-fit: cover;
  border-radius: 50%;
  margin: 0 auto 18px;
  border: 3px solid var(--red);
}
.service-card h3 { font-size: 0.9375rem; margin-bottom: 10px; text-transform: uppercase; letter-spacing: 0.5px; }
.service-card p  { font-size: 0.8125rem; color: var(--text); line-height: 1.6; }

/* ---- GALLERY CAROUSEL ---- */
.gallery-carousel { display: flex; align-items: center; gap: 12px; }
.gc-track-wrap { flex: 1; overflow: hidden; }
.gc-track {
  display: flex;
  gap: 8px;
  transition: transform 0.4s ease;
}
.gallery-item {
  flex: 0 0 calc((100% - 8px * 4) / 5);
  aspect-ratio: 1;
  overflow: hidden;
  cursor: pointer;
  display: block;
  border-radius: 2px;
}
.gallery-item img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.35s, opacity 0.35s;
  display: block;
}
.gallery-item:hover img { transform: scale(1.07); opacity: 0.8; }

.gc-btn {
  flex-shrink: 0;
  width: 44px; height: 44px;
  border-radius: 50%;
  border: 2px solid var(--red);
  background: var(--white);
  color: var(--red);
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, color 0.2s;
}
.gc-btn:hover:not(:disabled) { background: var(--red); color: var(--white); }
.gc-btn:disabled { opacity: 0.3; cursor: default; }

/* ---- LIGHTBOX ---- */
.lightbox {
  display: none;
  position: fixed; inset: 0;
  z-index: 9999;
  background: rgba(0,0,0,0.92);
  align-items: center;
  justify-content: center;
}
.lightbox.active { display: flex; }
.lb-img-wrap { max-width: 90vw; max-height: 90vh; display: flex; align-items: center; justify-content: center; }
.lb-img-wrap img { max-width: 90vw; max-height: 90vh; object-fit: contain; border-radius: 2px; box-shadow: 0 8px 40px rgba(0,0,0,0.6); }
.lb-close, .lb-prev, .lb-next {
  position: fixed;
  background: rgba(255,255,255,0.1);
  border: none; color: var(--white);
  cursor: pointer; font-size: 2rem; line-height: 1;
  transition: background 0.2s;
}
.lb-close:hover, .lb-prev:hover, .lb-next:hover { background: rgba(255,255,255,0.25); }
.lb-close { top: 16px; right: 20px; font-size: 2.5rem; padding: 4px 14px; border-radius: 2px; }
.lb-prev  { left: 0; top: 50%; transform: translateY(-50%); padding: 20px 16px; border-radius: 0 2px 2px 0; }
.lb-next  { right: 0; top: 50%; transform: translateY(-50%); padding: 20px 16px; border-radius: 2px 0 0 2px; }

/* ---- CONTACT ---- */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 50px; align-items: start; }
.contact-info { display: flex; flex-direction: column; gap: 24px; }
.contact-item { display: flex; gap: 16px; align-items: flex-start; }
.contact-icon { font-size: 1.5rem; flex-shrink: 0; margin-top: 2px; }
.contact-item strong {
  display: block;
  font-family: 'Raleway', sans-serif;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--red);
  margin-bottom: 4px;
}
.contact-item p, .contact-item a { color: #bbbbbb; font-size: 0.9rem; }
.contact-item a:hover { color: var(--white); }
.contact-map iframe { width: 100%; height: 320px; border: 0; border-radius: 4px; }

/* ---- FOOTER ---- */
.footer {
  background: var(--dark2);
  color: #888888;
  text-align: center;
  padding: 20px;
  font-size: 0.8125rem;
  border-top: 1px solid #333;
}
.footer p + p { margin-top: 6px; }
.footer a { color: #aaaaaa; }
.footer a:hover { color: var(--white); }

/* ---- RESPONSIVE ---- */
@media (max-width: 1024px) {
  .services-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 900px) {
  .nav-toggle { display: flex; }
  .nav-links {
    display: none; flex-direction: column;
    position: absolute; top: 100%; left: 0; right: 0;
    background: var(--white);
    border-top: 1px solid var(--border);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 14px 20px; border-bottom: 1px solid var(--border); }

  .services-grid   { grid-template-columns: repeat(2, 1fr); }
  .contact-grid    { grid-template-columns: 1fr; }
  .logo-tagline    { display: none; }

  .gallery-item { flex: 0 0 calc((100% - 8px * 2) / 3); }
}

@media (max-width: 576px) {
  .section { padding: 50px 0; }
  .services-grid { grid-template-columns: repeat(2, 1fr); gap: 14px; }
  .gallery-item  { flex: 0 0 calc((100% - 8px) / 2); }
  .logo-name     { font-size: 0.85rem; }
}
