/* ==========================================================================
   Glaser-Innung Niedersachsen – Custom Styles
   Ergänzt w3.css (siehe css/w3.css) um Marke, Typografie und Feinheiten.
   ========================================================================== */

/* --- 1. Lokale Schriftarten -----------------------------------------------
   Dateien müssen selbst heruntergeladen und hier abgelegt werden, siehe
   fonts/ANLEITUNG.txt. Bis dahin greift der Fallback-Stack automatisch. */

@font-face {
  font-family: "Public Sans";
  src: url("../fonts/public-sans-regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Public Sans";
  src: url("../fonts/public-sans-bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Outfit";
  src: url("../fonts/outfit-semibold.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Outfit";
  src: url("../fonts/outfit-bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* --- 2. Design-Tokens: direkt aus dem Logo abgeleitet ----------------------
   Logo-Grün  #6EAB5B  (oberer/linker Teil des "G")
   Logo-Blau  #649ABA  (unterer/rechter Teil des "G", wirkt wie mattes Glas) */

:root {
  --color-primary: #6EAB5B;        /* Logo-Grün – Haupt-Akzent, Buttons, Links */
  --color-primary-dark: #528044;   /* dunkleres Grün – Hover-Zustand */
  --color-secondary: #649ABA;      /* Logo-Blau – zweiter Akzent, Icons */
  --color-secondary-dark: #416478; /* dunkleres Blau – Footer-Hintergrund */
  --color-footer-bg: #2D4553;      /* sehr dunkles Blau – Footer-Basis */
  --color-bg: #FAFAFA;             /* Seitenhintergrund */
  --color-surface: #FFFFFF;        /* Kartenhintergrund */
  --color-text: #2B2B2B;           /* Fließtext */
  --color-text-muted: #6B6B6B;     /* Sekundärtext, Meta-Infos */
  --color-border: #E3E7EA;

  --font-display: "Outfit", "Segoe UI", -apple-system, sans-serif;
  --font-body: "Public Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --radius: 6px;
  --shadow-soft: 0 2px 10px rgba(100, 154, 186, 0.15);
}

/* --- 3. Basis ---------------------------------------------------------- */

* { box-sizing: border-box; }

body {
  font-family: var(--font-body);
  color: var(--color-text);
  background: var(--color-bg);
  margin: 0;
  line-height: 1.6;
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--color-primary);
  line-height: 1.25;
}

h1 { font-size: 2.4rem; }
h2 { font-size: 1.7rem; margin-top: 0; }
h3 { font-size: 1.2rem; }

a { color: var(--color-primary); }
a:hover { color: var(--color-secondary); }

/* --- 4. Signature-Element: Glasfacetten-Linie --------------------------
   Wiederkehrendes grafisches Motiv (dünne, versetzte Diagonalen),
   erinnert an geschliffene Glaskanten. Wird unter Header und über Footer
   eingesetzt. */

.glass-facet-line {
  height: 6px;
  width: 100%;
  background: repeating-linear-gradient(
    115deg,
    var(--color-primary) 0px,
    var(--color-primary) 18px,
    var(--color-secondary) 18px,
    var(--color-secondary) 36px
  );
}

/* --- 5. Header ----------------------------------------------------------- */

.site-header {
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
}

.site-header .w3-bar {
  background: transparent;
  padding: 14px 24px;
}

.site-header .w3-bar .w3-right {
  padding-top: 18px;
}

.site-header img.logo {
  height: 52px;
  width: auto;
  display: block;
}

.site-header .w3-bar a.nav-link {
  color: var(--color-text);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 10px 16px;
  text-decoration: none;
  border-radius: var(--radius);
  transition: background 0.15s ease, color 0.15s ease;
}

.site-header .w3-bar a.nav-link:hover,
.site-header .w3-bar a.nav-link.active {
  background: var(--color-primary);
  color: #fff;
}

/* Mobile Navigation */
@media (max-width: 640px) {
  .site-header img.logo { height: 40px; }
  .site-header .w3-bar a.nav-link {
    display: block;
    width: 100%;
    padding: 12px 16px;
  }
}

/* --- 6. Hero -------------------------------------------------------------- */

.hero {
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 100%);
  color: #fff;
  padding: 64px 24px;
  text-align: center;
}

.hero h1 { color: #fff; margin-bottom: 12px; }
.hero p { font-size: 1.15rem; color: rgba(255,255,255,0.9); max-width: 640px; margin: 0 auto; }

/* --- 7. Kachel-Karten (Innung / Mitglieder / Ausbildung) ------------------ */

.tile-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 28px 24px;
  box-shadow: var(--shadow-soft);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  height: 100%;
}

.tile-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(100, 154, 186, 0.25);
}

.tile-card .tile-icon {
  width: 44px;
  height: 44px;
  margin-bottom: 14px;
  color: var(--color-secondary);
}

.tile-card h3 { margin-top: 0; }

.tile-card a.tile-link {
  display: inline-block;
  margin-top: 10px;
  font-weight: 600;
  font-size: 0.9rem;
}

/* --- 8. Buttons ------------------------------------------------------------ */

.btn-primary {
  display: inline-block;
  background: var(--color-secondary);
  color: #fff;
  font-weight: 600;
  padding: 12px 28px;
  border-radius: var(--radius);
  text-decoration: none;
  transition: background 0.15s ease;
}

.btn-primary:hover {
  background: var(--color-secondary-dark);
  color: #fff;
}

/* --- 9. Footer -------------------------------------------------------------- */

.site-footer {
  background: var(--color-footer-bg);
  color: rgba(255,255,255,0.85);
  padding: 40px 24px 24px;
  font-size: 0.9rem;
}

.site-footer h3 {
  color: #fff;
  font-size: 1rem;
  margin-bottom: 12px;
}

.site-footer a { color: rgba(255,255,255,0.85); }
.site-footer a:hover { color: var(--color-secondary); }

.site-footer .footer-bottom {
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid rgba(255,255,255,0.15);
  font-size: 0.8rem;
  color: rgba(255,255,255,0.6);
  text-align: center;
}

/* --- 12. Seiten-Layout mit Sidebar (Innung, Mitglieder, Ausbildung, etc.) -- */

.page-layout {
  display: flex;
  gap: 48px;
  max-width: 1100px;
  margin: 0 auto;
  padding: 48px 24px;
  align-items: flex-start;
}

.page-content { flex: 1; min-width: 0; }
.page-content h1 { margin-top: 0; }

.breadcrumb {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  margin-bottom: 20px;
}
.breadcrumb a { color: var(--color-text-muted); }
.breadcrumb a:hover { color: var(--color-primary); }

.page-sidebar {
  width: 260px;
  flex-shrink: 0;
}

.sidebar-block {
  margin-bottom: 32px;
}

.sidebar-block h3 {
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-secondary-dark);
  border-bottom: 2px solid var(--color-primary);
  padding-bottom: 8px;
  margin-bottom: 12px;
}

.sidebar-block ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.sidebar-block li { margin-bottom: 8px; }

.sidebar-block a {
  color: var(--color-text);
  text-decoration: none;
  font-size: 0.92rem;
}

.sidebar-block a:hover { color: var(--color-primary); }

.sidebar-highlight {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 18px;
}

.sidebar-highlight .value {
  font-family: var(--font-display);
  font-size: 1.4rem;
  color: var(--color-primary);
  font-weight: 700;
}

@media (max-width: 800px) {
  .page-layout { flex-direction: column; }
  .page-sidebar { width: 100%; }
}

a:focus-visible,
button:focus-visible {
  outline: 3px solid var(--color-secondary);
  outline-offset: 2px;
}

/* --- 11. Reduced Motion ----------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  .tile-card { transition: none; }
}
