/* ============================================================
   Frank Schmitz Elektrotechnik GmbH — Joomla JSON-Import
   Alle Klassen mit Prefix "fsx-", damit nichts mit dem
   Joomla-Template (Cassiopeia o.ae.) kollidiert.
   AUFBAU: strikt Mobile First (Basis = Mobil, min-width = groesser)
   ============================================================ */

/* ---------- Custom Properties ---------- */
:root {
  --fsx-red: #c1272d;
  --fsx-red-dark: #a81f24;
  --fsx-red-btn: #a83e46;
  --fsx-footer-bg: #2b2b2b;
  --fsx-footer-bottom-bg: #262626;
  --fsx-heading: #333333;
  --fsx-body: #6f6f6f;
  --fsx-nav: #555555;
  --fsx-nav-hover: #111111;
  --fsx-border: #e2e2e2;

  --fsx-maxw: 1170px;
  --fsx-content-w: 820px;

  --fsx-sp-1: 4px;
  --fsx-sp-2: 8px;
  --fsx-sp-3: 16px;
  --fsx-sp-4: 24px;
  --fsx-sp-5: 32px;
  --fsx-sp-6: 48px;
  --fsx-sp-7: 64px;

  --fsx-font: 'Open Sans', 'Helvetica Neue', Arial, sans-serif;
}

/* ============================================================
   FULL-WIDTH HELPER
   Joomla legt Beitraege meist in einen Container mit fester
   Breite. Elemente mit .fsx-full brechen aus diesem Container
   aus und laufen ueber die volle Fensterbreite.
   WICHTIG: Der Eltern-Container darf KEIN "overflow: hidden"
   haben, sonst funktioniert der Ausbruch nicht.
   ============================================================ */
.fsx-full {
  width: 100vw;
  margin-left: calc(-50vw + 50%);
  max-width: 100vw;
}

/* ============================================================
   BASIS-RESETS
   Wichtig: Beim JSON-Import liegt der Beitragsinhalt direkt im
   Joomla-Container (ohne eigenen Wrapper-DIV). Die Styles haengen
   deshalb an den Inhaltsbloecken selbst, nicht an einem Wrapper.
   Header/Footer kommen als eigene Module und brauchen die Resets
   ebenfalls, sonst erben sie Bullets/Unterstreichungen vom
   Joomla-Template.
   ============================================================ */
.fsx-header ul,
.fsx-footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.fsx-header a,
.fsx-footer a,
.fsx-cookie a,
.fsx-section a,
.fsx-refs a,
.fsx-legal a {
  text-decoration: none;
}
.fsx-cookie a { text-decoration: underline; } /* im Banner bewusst unterstrichen */

.fsx-header ul li::before,
.fsx-footer ul li::before { content: none; } /* Template-Bullets abschalten */

/* ---------- Grundtypografie der Inhaltsbloecke ---------- */
.fsx-section,
.fsx-refs,
.fsx-legal {
  font-family: var(--fsx-font);
  font-size: 16px;
  line-height: 1.7;
  color: var(--fsx-body);
}
.fsx-hero img,
.fsx-section img,
.fsx-refs img,
.fsx-legal img { max-width: 100%; height: auto; display: block; }

.fsx-section a,
.fsx-refs a { color: inherit; transition: color .2s ease; }

.fsx-section h1, .fsx-section h2, .fsx-section h3,
.fsx-refs h1, .fsx-refs h2, .fsx-refs h3,
.fsx-legal h1 { margin: 0; color: var(--fsx-heading); font-weight: 400; }

/* ============================================================
   HEADER-MODUL
   ============================================================ */
.fsx-header {
  position: sticky;
  top: 0;
  /* muss ueber .fsx-backdrop (1050) liegen, sonst deckt das Overlay
     das geoeffnete Mobilmenue ab (Header bildet eigenen Stacking-Kontext) */
  z-index: 1200;
  background: #ffffff;
  border-bottom: 1px solid var(--fsx-border);
  box-shadow: 0 1px 3px rgba(0,0,0,.04);
  font-family: var(--fsx-font);
}
.fsx-header-inner {
  max-width: var(--fsx-maxw);
  margin: 0 auto;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.fsx-skip {
  position: absolute; left: -999px; top: 0;
  background: var(--fsx-red); color: #fff; padding: 10px 16px; z-index: 2000;
}
.fsx-skip:focus { left: 0; }

/* Logo */
.fsx-logo { display: flex; align-items: center; flex-shrink: 0; }
.fsx-logo-svg { width: 200px; height: auto; display: block; }

/* Burger (Mobile = Standard) */
.fsx-navtoggle {
  display: block;
  background: none; border: 0; cursor: pointer;
  width: 44px; height: 44px; padding: 8px;
  flex-shrink: 0;
}
.fsx-navtoggle span {
  display: block; height: 3px; background: #333; border-radius: 2px;
  margin: 5px 0; transition: transform .3s ease, opacity .3s ease;
}
.fsx-navtoggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.fsx-navtoggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.fsx-navtoggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* Navigation (Mobile = Offcanvas) */
.fsx-nav {
  position: fixed; top: 0; right: -100%;
  width: 78%; max-width: 320px; height: 100vh;
  background: #fff; box-shadow: -4px 0 20px rgba(0,0,0,.15);
  padding: 90px 30px 30px;
  transition: right .3s ease;
  z-index: 1100;
  overflow-y: auto;
}
.fsx-nav.is-open { right: 0; }
.fsx-nav ul { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.fsx-nav a {
  display: block; width: 100%;
  padding: 12px 0; font-size: 18px; color: var(--fsx-nav);
  border-bottom: 1px solid #f0f0f0;
  min-height: 44px; /* Touch-Ziel */
}
.fsx-nav a:hover,
.fsx-nav a.is-active { color: var(--fsx-nav-hover); }

.fsx-backdrop {
  position: fixed; inset: 0; background: rgba(0,0,0,.4);
  opacity: 0; visibility: hidden; transition: opacity .3s ease; z-index: 1050;
}
.fsx-backdrop.is-open { opacity: 1; visibility: visible; }
body.fsx-nav-open { overflow: hidden; }

/* ============================================================
   HERO / BANNER
   ============================================================ */
.fsx-hero { line-height: 0; }
.fsx-hero img { width: 100%; height: auto; object-fit: cover; }

/* ============================================================
   INHALTSSEKTIONEN
   ============================================================ */
.fsx-section { padding: var(--fsx-sp-6) 20px; }
.fsx-narrow { max-width: var(--fsx-content-w); margin: 0 auto; text-align: center; }
.fsx-title {
  font-size: 24px;
  font-weight: 400;
  color: var(--fsx-heading);
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: var(--fsx-sp-5);
}
.fsx-narrow p { margin: 0 0 var(--fsx-sp-4); }
.fsx-highlight {
  color: var(--fsx-red);
  font-weight: 700;
  font-size: 19px;
  margin: var(--fsx-sp-5) 0 var(--fsx-sp-3);
}

/* ============================================================
   REFERENZEN
   ============================================================ */
.fsx-refs { max-width: var(--fsx-maxw); margin: 0 auto; padding: var(--fsx-sp-6) 20px; }
.fsx-refs-title { text-align: center; margin-bottom: var(--fsx-sp-6); }
.fsx-ref {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--fsx-sp-3);
  align-items: start;
  margin-bottom: var(--fsx-sp-6);
}
.fsx-ref h3 {
  color: var(--fsx-red);
  font-weight: 700;
  font-size: 18px;
  text-transform: uppercase;
  line-height: 1.35;
  margin-bottom: var(--fsx-sp-3);
}
.fsx-ref-label {
  color: #8a8a8a;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .5px;
  font-size: 15px;
  margin: 0 0 var(--fsx-sp-1);
  padding-left: var(--fsx-sp-4);
}
.fsx-ref-value { margin: 0; padding-left: var(--fsx-sp-4); }
.fsx-ref-img { line-height: 0; max-width: 500px; }
.fsx-ref-img img { width: 100%; height: auto; }

/* ============================================================
   KONTAKT
   ============================================================ */
.fsx-contact p { margin: 0 0 var(--fsx-sp-4); }
.fsx-contact strong { color: var(--fsx-heading); }
.fsx-maillink { color: var(--fsx-red); }

/* ============================================================
   GOOGLE MAPS (wird per JS befuellt, siehe fsx-gmap.js)
   ============================================================ */
.fsx-map { border-top: 1px solid var(--fsx-border); }
.gmap-container {
  position: relative;
  width: 100%;
  height: 340px;
  background: #e9e7e2;
  display: flex;
  align-items: center;
  justify-content: center;
}
.gmap-container iframe { width: 100%; height: 100%; border: 0; display: block; }
.fsx-map-consent { text-align: center; padding: 24px; max-width: 520px; }
.fsx-map-consent p { margin: 0 0 var(--fsx-sp-3); font-size: 15px; color: #555; }
.fsx-map-btn {
  background: var(--fsx-red); color: #fff; border: 0;
  padding: 12px 24px; cursor: pointer;
  font-family: inherit; font-size: 15px;
  min-height: 44px;
}
.fsx-map-btn:hover { background: var(--fsx-red-dark); }

/* ============================================================
   RECHTSTEXTE (Impressum / Datenschutz)
   ============================================================ */
.fsx-legal { max-width: var(--fsx-content-w); margin: 0 auto; padding: var(--fsx-sp-6) 20px; text-align: left; }
.fsx-legal .fsx-title { text-align: left; }
.fsx-legal h2 {
  font-size: 20px; color: var(--fsx-heading); font-weight: 700;
  margin: var(--fsx-sp-5) 0 var(--fsx-sp-2);
}
.fsx-legal p { margin: 0 0 var(--fsx-sp-3); }
.fsx-legal a { color: var(--fsx-red); word-break: break-word; }

/* ============================================================
   404
   ============================================================ */
.fsx-error-code { font-size: 56px; color: var(--fsx-red); }
.fsx-error-lead { font-size: 20px; color: #333; margin-bottom: var(--fsx-sp-2); }
.fsx-error-actions { margin-top: var(--fsx-sp-5); }
.fsx-btn {
  display: inline-block; background: var(--fsx-red); color: #fff;
  padding: 14px 30px; transition: background .2s ease;
}
.fsx-btn:hover { background: var(--fsx-red-dark); }

/* ============================================================
   FOOTER-MODUL
   ============================================================ */
.fsx-footer { background: var(--fsx-footer-bg); color: #d8d8d8; font-family: var(--fsx-font); }
.fsx-footer-grid {
  max-width: var(--fsx-maxw); margin: 0 auto;
  padding: var(--fsx-sp-6) 20px;
  display: grid; grid-template-columns: 1fr;
  gap: var(--fsx-sp-6); text-align: center;
}
.fsx-footer-col i { color: var(--fsx-red); font-size: 34px; margin-bottom: var(--fsx-sp-3); display: block; }
.fsx-footer-col p { margin: 0; line-height: 1.9; color: #cfcfcf; }
.fsx-footer-col a { color: #cfcfcf; text-decoration: none; }
.fsx-footer-col a:hover { color: #fff; }

/* Agentur-Branding (Styles bewusst hier statt inline) */
.agency-branding {
  background: var(--fsx-footer-bottom-bg);
  color: #8f8f8f;
  font-size: 13px;
  letter-spacing: 1px;
  text-align: center;
  padding: 20px;
}
.agency-branding p { margin: 0; }
.agency-branding a { color: #adadad; text-decoration: none; }
.agency-branding a:hover { color: #fff; }
.agency-branding .fsx-heart { color: red; }

/* ============================================================
   SCROLL-TO-TOP
   ============================================================ */
.fsx-totop {
  position: fixed; right: 16px; bottom: 16px;
  width: 46px; height: 46px;
  background: var(--fsx-red-btn); color: #fff;
  border: 0; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
  opacity: 0; visibility: hidden;
  transition: opacity .3s ease, background .2s ease;
  z-index: 900;
}
.fsx-totop:hover { background: #8f3138; }
.fsx-totop.is-visible { opacity: 1; visibility: visible; }

/* ============================================================
   COOKIE-BANNER
   ============================================================ */
.fsx-cookie {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 1500;
  background: #1f1f1f; color: #e6e6e6;
  padding: 18px 20px;
  display: none;
  align-items: center; justify-content: center;
  gap: 16px; flex-wrap: wrap;
  font-family: var(--fsx-font);
}
.fsx-cookie.is-visible { display: flex; }
.fsx-cookie p { margin: 0; font-size: 14px; }
.fsx-cookie a { color: #ff9ea2; text-decoration: underline; }
.fsx-cookie-btn {
  background: var(--fsx-red); color: #fff; border: 0;
  padding: 10px 22px; cursor: pointer; font-size: 14px;
  font-family: inherit; min-height: 44px;
}
.fsx-cookie-btn:hover { background: var(--fsx-red-dark); }

/* ============================================================
   REVEAL-ANIMATION
   Nur aktiv wenn JS laeuft -> ohne JS bleibt alles sichtbar.
   ============================================================ */
html.fsx-js .fsx-reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .7s ease, transform .7s ease;
}
html.fsx-js .fsx-reveal.is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html.fsx-js .fsx-reveal { opacity: 1; transform: none; transition: none; }
}

/* ============================================================
   >= 768px  (Tablet)
   ============================================================ */
@media (min-width: 768px) {
  .fsx-header-inner { padding: 14px 24px; }
  .fsx-logo-svg { width: 270px; }
  .fsx-section { padding: var(--fsx-sp-7) 24px; }
  .fsx-title { font-size: 30px; }
  .fsx-refs { padding: var(--fsx-sp-7) 24px; }
  .fsx-ref { grid-template-columns: 1fr 1fr; gap: var(--fsx-sp-6); }
  .fsx-ref-img { max-width: none; }
  .fsx-legal { padding: var(--fsx-sp-7) 24px; }
  .fsx-footer-grid { grid-template-columns: repeat(3, 1fr); padding: var(--fsx-sp-7) 24px; gap: var(--fsx-sp-5); }
  .gmap-container { height: 420px; }
  .fsx-totop { right: 26px; bottom: 26px; width: 54px; height: 54px; font-size: 22px; }
  .fsx-error-code { font-size: 64px; }
}

/* ============================================================
   >= 1024px  (Desktop) — horizontale Navigation
   ============================================================ */
@media (min-width: 1024px) {
  .fsx-logo-svg { width: 340px; }

  .fsx-navtoggle { display: none; }
  .fsx-backdrop { display: none; }

  .fsx-nav {
    position: static;
    width: auto; max-width: none; height: auto;
    background: none; box-shadow: none;
    padding: 0;
    overflow: visible;
  }
  .fsx-nav ul { flex-direction: row; align-items: center; gap: 30px; }
  .fsx-nav a {
    width: auto; display: inline-block;
    padding: 6px 0; font-size: 17px;
    border-bottom: 0; min-height: 0;
    position: relative;
  }
  .fsx-nav a.is-active::after {
    content: ""; position: absolute; left: 0; right: 0; bottom: -2px;
    height: 2px; background: var(--fsx-red);
  }
}


/* ============================================================
   JOOMLA-ANPASSUNGEN (Werbeagentur-Template)
   Ergaenzt nach dem Live-Test auf der Staging-Instanz.
   ============================================================ */

/* Das Template gibt den Beitragsbereich bereits in voller
   Fensterbreite aus. Der 100vw-Ausbruch ist deshalb nicht noetig
   und erzeugt sogar 8px Ueberlauf (100vw zaehlt die Scrollbar mit).
   -> hier neutralisiert. */
.fsx-full {
  width: 100%;
  margin-left: 0;
  max-width: 100%;
}
html, body { overflow-x: clip; }

/* Beitragsinfos (Autor, Kategorie, Datum, Zugriffe) ausblenden.
   Zusaetzlich in den Beitragsoptionen abgeschaltet - das hier ist
   die Absicherung fuer Ansichten, die eigene Optionen mitbringen. */
.com-content-article__info,
.article-info,
dl.article-info,
.com-content-article__aside { display: none; }

/* Abstand oben, da das Template keinen eigenen setzt */
.com-content-article__body > .fsx-hero:first-child { margin-top: 0; }
