/* ==========================================================================
   Optik Schweitzer – Nachbau brillenhaus-schweitzer.de
   Werbeagentur Hoffmann
   ========================================================================== */

/* --- Design Tokens ------------------------------------------------------ */
:root {
  --red:          #a90202;   /* Primärrot: Überschriften, Standort-Karten, Marken-Band, aktive Nav */
  --red-bright:   #c42323;   /* helleres Rot: unterer Footer-Balken */
  --red-overlay:  rgba(169, 2, 2, 0.8); /* Öffnungszeiten-Box über dem Slider */
  --text:         #0a0a0a;
  --text-muted:   #6f6f6f;
  --white:        #ffffff;
  --bg:           #ffffff;
  --bg-grey:      #e2e3e0;   /* grauer Bereich ganz unten */
  --border:       #ececec;

  --font-head: "Montserrat", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-body: "Helvetica Neue", Helvetica, Roboto, Arial, sans-serif;

  --container: 1170px;
  --header-h: 150px;
  --header-h-mobile: 84px;
}

/* --- Reset -------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--red); text-decoration: none; transition: color .2s ease, background-color .2s ease, opacity .2s ease; }
a:hover { color: var(--red-bright); }
ul { margin: 0; padding: 0; }
h1, h2, h3, h4 { font-family: var(--font-head); font-weight: 300; margin: 0 0 .5em; line-height: 1.2; }
button { font-family: inherit; cursor: pointer; }
.no-scroll { overflow: hidden; }

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

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 1000;
  background: var(--red); color: #fff; padding: 10px 16px;
}
.skip-link:focus { left: 8px; top: 8px; color: #fff; }

/* --- Header ------------------------------------------------------------- */
.site-header {
  position: relative; z-index: 100;
  background: var(--white);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: var(--header-h);
  max-width: var(--container); margin: 0 auto; padding: 0 20px;
}
.logo { display: flex; align-items: center; }
.logo img { height: 66px; width: auto; }
/* Text-Fallback, falls logo.png fehlt */
.logo-text { display: flex; flex-direction: column; line-height: 1; }
.logo-text .brand { font-family: var(--font-head); font-weight: 300; font-size: 40px; color: var(--text); letter-spacing: .5px; }
.logo-text .sub  { font-family: var(--font-head); font-weight: 300; font-size: 17px; color: var(--text); margin-top: 6px; }

.main-nav { height: 100%; }
.main-nav > ul { display: flex; height: 100%; align-items: stretch; }
.main-nav li { list-style: none; display: flex; }
.main-nav a {
  display: flex; align-items: center;
  height: 100%;
  padding: 0 26px;
  font-family: var(--font-head); font-weight: 400; font-size: 17px;
  color: var(--text);
}
.main-nav a:hover { color: var(--red); }
.main-nav a.is-active,
.main-nav li.is-active > a {
  background: var(--red); color: #fff;
}
.main-nav a.is-active:hover { color: #fff; }

/* Burger */
.burger {
  display: none;
  width: 44px; height: 44px; border: none; background: transparent;
  padding: 0; position: relative;
}
.burger span,
.burger span::before,
.burger span::after {
  content: ""; position: absolute; left: 8px; right: 8px; height: 2px;
  background: var(--text); transition: transform .3s ease, opacity .3s ease;
}
.burger span { top: 50%; transform: translateY(-50%); }
.burger span::before { top: -8px; }
.burger span::after  { top: 8px; }
.burger.is-active span { background: transparent; }
.burger.is-active span::before { top: 0; transform: rotate(45deg); }
.burger.is-active span::after  { top: 0; transform: rotate(-45deg); }

/* --- Slider ------------------------------------------------------------- */
.slider { position: relative; overflow: hidden; width: 100%; background: #111; }
.slider-track { display: flex; transition: transform .6s ease; }
.slide {
  position: relative; flex: 0 0 100%; min-width: 100%;
  height: 500px;
  background-size: cover; background-position: center;
}
.slide__caption {
  position: absolute; left: 8%; top: 42%;
  color: #fff; text-shadow: 0 2px 10px rgba(0,0,0,.4);
  max-width: 46%;
}
.slide__caption h2 { font-family: var(--font-head); font-weight: 300; font-size: 34px; color: #fff; margin: 0 0 6px; }
.slide__caption p  { font-size: 20px; margin: 0; }

/* Öffnungszeiten-Overlay */
.slide__hours {
  position: absolute; right: 0; top: 0;
  background: var(--red-overlay); color: #fff;
  padding: 22px 32px; max-width: 340px;
}
.slide__hours h3 { font-family: var(--font-head); font-weight: 300; font-size: 24px; color: #fff; margin: 0 0 12px; }
.slide__hours .row { margin-bottom: 10px; }
.slide__hours strong { font-weight: 600; display: block; }
.slide__hours .note { margin-top: 14px; font-size: 15px; }
.slide__hours--sb { max-width: 460px; }
.slide__hours .hours-cols { display: flex; gap: 30px; }
.slide__hours .hours-cols strong { display: block; }

.slider-btn {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 46px; height: 46px; border: none; border-radius: 50%;
  background: rgba(0,0,0,.25); color: #fff; font-size: 26px; line-height: 1;
  display: grid; place-items: center; z-index: 5;
}
.slider-btn:hover { background: rgba(0,0,0,.45); }
.slider-prev { left: 14px; }
.slider-next { right: 14px; }
.slider-dots {
  position: absolute; left: 0; right: 0; bottom: 16px;
  display: flex; justify-content: center; gap: 10px; z-index: 5;
}
.slider-dots button {
  width: 12px; height: 12px; border-radius: 50%; border: 2px solid #fff;
  background: transparent; padding: 0;
}
.slider-dots button.is-active { background: #fff; }

/* --- Sections ----------------------------------------------------------- */
.section { padding: 64px 0; }
.section--tight { padding: 48px 0; }

.red-heading { color: var(--red); font-weight: 200; font-size: 35px; line-height: 1.15; }
.sub-heading { color: var(--text); font-weight: 300; font-size: 30px; margin: 0 0 24px; }
.section-title { color: var(--red); font-weight: 200; font-size: 35px; margin: 0 0 28px; }

/* Intro (Startseite) */
.intro-grid { display: grid; grid-template-columns: 1.5fr 1fr; gap: 56px; align-items: start; }
.intro-grid p { margin: 0 0 18px; }
.intro-grid em { font-style: italic; }
.leistungen-title { font-weight: 700; font-family: var(--font-body); font-size: 17px; margin: 0 0 14px; }
.leistungen-list li { list-style: none; position: relative; padding: 4px 0 4px 18px; }
.leistungen-list li::before { content: "•"; position: absolute; left: 0; color: var(--text); }

/* Marken-Band */
.marken-band { background: var(--red); color: #fff; text-align: center; padding: 26px 0; }
.marken-band h2 {
  font-family: var(--font-head); font-weight: 400; font-size: 22px; letter-spacing: 3px;
  color: #fff; margin: 0;
}
.marken-band .rule { width: 180px; height: 1px; background: rgba(255,255,255,.5); margin: 14px auto 0; }

/* Brands grid */
.brands { padding: 70px 0; }
.brands-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px 30px; align-items: center; justify-items: center; }
.brands-grid img { max-height: 74px; width: auto; object-fit: contain; filter: grayscale(0); }
.brands-note {
  background: var(--red); color: #fff; font-weight: 700; text-align: center;
  padding: 28px 26px; display: flex; align-items: center; justify-content: center; min-height: 120px;
}

/* Map */
.map-wrap { position: relative; width: 100%; height: 460px; }
.map-wrap iframe { width: 100%; height: 100%; border: 0; display: block; filter: grayscale(.15); }
.map-card {
  position: absolute; left: 20px; top: 20px; background: #fff; padding: 14px 16px;
  box-shadow: 0 2px 8px rgba(0,0,0,.2); max-width: 260px; font-size: 13px; line-height: 1.5;
}
.map-card strong { display: block; font-size: 14px; margin-bottom: 4px; }
.map-card .stars { color: #e7711b; margin-top: 6px; }

/* Über Uns */
.about-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 48px; align-items: start; }
.about-grid p { margin: 0 0 18px; }
.about-photo figcaption { text-align: center; font-style: italic; color: var(--text); margin-top: 10px; }
.gallery-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 48px; }
.gallery-grid--4 { grid-template-columns: repeat(4, 1fr); }
.gallery-grid a { display: block; overflow: hidden; }
.gallery-grid img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 3 / 2; transition: transform .4s ease; }
.gallery-grid a:hover img { transform: scale(1.05); }

/* Sehen – Leistungs-Grid */
.leist-intro { font-size: 17px; margin: 0 0 40px; }
.services-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 34px 30px; }
.service-card img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; margin-bottom: 16px; }
.service-card h3 { font-family: var(--font-body); font-weight: 700; font-size: 17px; color: var(--text); margin: 0 0 10px; }
.service-card p { margin: 0; font-size: 15px; }
.service-card ul li { list-style: none; position: relative; padding: 3px 0 3px 16px; font-size: 15px; }
.service-card ul li::before { content: "•"; position: absolute; left: 0; }
.finance { margin-top: 64px; }
.finance h2 { font-family: var(--font-head); font-weight: 300; font-size: 34px; color: var(--text); margin: 0 0 22px; }
.finance p { margin: 0 0 16px; }
.finance strong { font-weight: 700; }

/* --- Footer ------------------------------------------------------------- */
.footer-contact { padding: 60px 0 50px; }
.footer-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
.footer-contact .col-right { text-align: right; }
.footer-contact h2 { color: var(--red); font-weight: 200; font-size: 35px; margin: 0 0 26px; }
.footer-contact p { margin: 0 0 14px; color: var(--text); }
.footer-contact .company { margin-bottom: 20px; }
.footer-hours .block { margin-bottom: 18px; }

.footer-bar { background: var(--red-bright); color: #fff; }
.footer-bar .container { display: flex; align-items: center; gap: 40px; min-height: 66px; padding-top: 12px; padding-bottom: 12px; }
.footer-bar a { color: #fff; }
.footer-bar a:hover { color: #fff; text-decoration: underline; }
.footer-bar .legal { display: flex; gap: 22px; }
.footer-bar .copy { flex: 1; text-align: center; }

.grey-strip { background: var(--bg-grey); height: 90px; }

/* Agentur-Branding (Pflicht) */
.agency-branding { background: #fff; }
.agency-branding p { margin: 0; font-size: 13px; color: var(--text-muted); }
.agency-branding a { color: var(--red); }

/* --- Standortwahl (index) ---------------------------------------------- */
.standort-page {
  min-height: 100vh; display: flex; flex-direction: column;
  background: #f3f4f2 url("images/slider4/brillen-display-regal.jpg") center/cover no-repeat;
  position: relative;
}
.standort-page::before { content: ""; position: absolute; inset: 0; background: rgba(255,255,255,.35); }
.standort-inner { position: relative; z-index: 2; flex: 1; display: flex; flex-direction: column; }
.standort-logo { text-align: right; padding: 34px 60px 0; }
.standort-logo img { height: 78px; display: inline-block; }
.standort-logo .logo-text { align-items: flex-end; }
.standort-logo .logo-text .brand { font-size: 46px; }
.standort-logo .logo-text .sub { font-size: 19px; }
.standort-title { text-align: center; font-family: var(--font-head); font-weight: 300; font-size: 42px; color: var(--text); margin: 30px 0 54px; }
.standort-cards { display: flex; gap: 60px; justify-content: center; flex-wrap: wrap; padding: 0 24px 80px; }
.standort-card {
  background: var(--red); color: #fff; width: 560px; max-width: 100%;
  padding: 36px 40px 44px; display: block;
}
.standort-card { position: relative; }
.standort-card:hover { background: #8f0202; color: #fff; }
/* Stretched-Link: Overlay über den gesamten Karteninhalt -> ganze Karte klickbar */
.standort-card .card-link { position: absolute; inset: 0; z-index: 2; }
.standort-card h2 { font-family: var(--font-head); font-weight: 200; font-size: 30px; color: #fff; margin: 0 0 22px; }
.standort-card address { font-style: normal; line-height: 1.9; font-size: 18px; }
/* Mail-Link bleibt über dem Overlay klickbar */
.standort-card address a.mail { position: relative; z-index: 3; color: #fff; }
.standort-card address a.mail:hover { text-decoration: underline; }

/* --- Reveal Animation --------------------------------------------------- */
/* Reveal nur aktiv, wenn JS läuft (.js an <html>). Ohne JS bleibt alles sichtbar. */
.js [data-reveal] { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s ease; }
.js [data-reveal].is-visible { opacity: 1; transform: translateY(0); }
@media (prefers-reduced-motion: reduce) {
  .js [data-reveal] { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* --- Cookie-Banner ------------------------------------------------------ */
.cookie-banner {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 500;
  background: #1c1c1c; color: #eee; padding: 18px 20px;
  display: none; align-items: center; gap: 20px; flex-wrap: wrap; justify-content: center;
}
.cookie-banner.is-visible { display: flex; }
.cookie-banner p { margin: 0; font-size: 14px; max-width: 720px; }
.cookie-banner a { color: #ff9c9c; }
.cookie-actions { display: flex; gap: 12px; }
.cookie-banner button {
  border: none; padding: 10px 20px; font-size: 14px; font-family: var(--font-head);
}
.cookie-accept { background: var(--red); color: #fff; }
.cookie-accept:hover { background: var(--red-bright); }
.cookie-decline { background: transparent; color: #ccc; border: 1px solid #555 !important; }

/* --- 404 / einfache Inhaltsseiten -------------------------------------- */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.news-main { min-height: 40vh; }
.simple-main { padding: 80px 0; min-height: 50vh; }
.simple-main .lead { font-size: 18px; }
.simple-main .measure { max-width: 640px; }
.simple-main h1 { font-family: var(--font-head); font-weight: 300; font-size: 42px; color: var(--red); }
.error-code { font-size: 120px; font-weight: 200; color: var(--red); line-height: 1; margin: 0; font-family: var(--font-head); }
.btn-home {
  display: inline-block; margin-top: 20px; background: var(--red); color: #fff;
  padding: 12px 26px; font-family: var(--font-head);
}
.btn-home:hover { background: var(--red-bright); color: #fff; }
.legal-content p { margin: 0 0 16px; }
.legal-content h2 { font-family: var(--font-head); font-weight: 400; font-size: 24px; color: var(--text); margin: 32px 0 12px; }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1024px) {
  .intro-grid { grid-template-columns: 1fr; gap: 36px; }
  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .about-grid { grid-template-columns: 1fr; }
  .slide__caption { max-width: 60%; }
}

@media (max-width: 768px) {
  :root { --header-h: var(--header-h-mobile); }
  .header-inner { height: var(--header-h-mobile); }
  .logo img { height: 46px; }
  .logo-text .brand { font-size: 26px; }
  .logo-text .sub { font-size: 12px; margin-top: 3px; }

  .burger { display: block; z-index: 210; }
  .main-nav {
    position: fixed; top: 0; right: 0; height: 100vh; width: 78%; max-width: 320px;
    background: #fff; box-shadow: -6px 0 24px rgba(0,0,0,.15);
    transform: translateX(100%); transition: transform .3s ease; z-index: 200;
    padding-top: calc(var(--header-h-mobile) + 10px);
  }
  .main-nav.is-open { transform: translateX(0); }
  .main-nav > ul { flex-direction: column; height: auto; align-items: stretch; }
  .main-nav li { display: block; }
  .main-nav a { height: auto; padding: 16px 26px; font-size: 18px; border-bottom: 1px solid var(--border); }
  .nav-overlay {
    position: fixed; inset: 0; background: rgba(0,0,0,.4); opacity: 0; visibility: hidden;
    transition: opacity .3s ease; z-index: 150;
  }
  .nav-overlay.is-open { opacity: 1; visibility: visible; }

  .slide { height: 340px; }
  .slide__hours { position: static; max-width: 100%; }
  .slide__caption { position: static; max-width: 100%; padding: 20px 8%; }
  /* Auf Mobile: Öffnungszeiten-Box unter dem Bild statt Overlay */
  .slide { display: flex; align-items: stretch; }

  .section { padding: 44px 0; }
  .red-heading, .section-title, .footer-contact h2 { font-size: 28px; }
  .sub-heading { font-size: 24px; }

  .brands-grid { grid-template-columns: repeat(2, 1fr); gap: 30px 20px; }
  .services-grid { grid-template-columns: 1fr; }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }

  .footer-grid { grid-template-columns: 1fr; gap: 30px; }
  .footer-contact .col-right { text-align: left; }
  .footer-bar .container { flex-direction: column; gap: 10px; text-align: center; }
  .footer-bar .copy { text-align: center; }

  .standort-logo { text-align: center; padding: 24px 20px 0; }
  .standort-logo .logo-text { align-items: center; }
  .standort-title { font-size: 30px; margin: 24px 0 36px; }
  .standort-cards { gap: 24px; padding: 0 20px 50px; }
  .standort-card { padding: 26px 26px 32px; }
  .error-code { font-size: 84px; }
}

@media (max-width: 480px) {
  .brands-grid { grid-template-columns: 1fr; }
  .gallery-grid { grid-template-columns: 1fr; }
}

/* ===== Joomla-Anpassungen (überschreibt template.css, da später geladen) ===== */
/* Google-Maps-Container (iframe wird per JS geladen) */
.map-wrap .gmap { position: absolute; inset: 0; width: 100%; height: 100%; }
.map-wrap .gmap iframe { width: 100%; height: 100%; border: 0; display: block; filter: grayscale(.15); }
/* Standort-Karten nebeneinander im Joomla-Container */
.standort-cards { gap: 30px; align-items: stretch; }
.standort-card { width: auto; flex: 1 1 300px; max-width: 520px; }
