﻿/* ============================================================
   Würzburger Hundeschule – Stylesheet
   ============================================================ */

/* --- CSS Variables --- */
:root {
  --color-primary:  #5B96C4;   /* Frühlingsblau (Kornblume) */
  --color-accent:   #82BDD9;   /* helles Himmelblau */
  --color-bg:       #F4F9FD;   /* zartes Blau-Weiß */
  --color-bg-alt:   #E5F1F9;   /* sanftes Hellblau für Sections */
  --color-brown:    #F0956B;   /* warmes Pfirsich/Korall (Frühlingsblüten) */
  --color-text:     #1A2D42;   /* dunkles Nachtblau, gut lesbar */
  --color-white:    #FDFEFF;
  --color-border:   #AECDE8;   /* helle Blaugrenze */

  --font-base: 'Inter', system-ui, -apple-system, sans-serif;
  --radius:    6px;
  --shadow:    0 2px 8px rgba(0,0,0,0.10);
  --transition: 0.2s ease;
  --max-width: 900px;
}

/* --- Klassisches Farbschema (Dunkelblau / Natur) --- */
html[data-theme="classic"] {
  --color-primary:  #2F6FA3;   /* Dunkelblau (Natur) */
  --color-accent:   #6FAED9;   /* helles Mint */
  --color-bg:       #F4F8FC;   /* zartes Mintweiss */
  --color-bg-alt:   #E9F2FA;   /* sanftes Mint für Sections */
  --color-brown:    #F0956B;   /* warmes Pfirsich/Korall (Frühlingsblüten) */
  --color-text:     #1E2F44;   /* dunkles Grün, gut lesbar */
  --color-white:    #FDFFFE;
  --color-border:   #C7D9EA;   /* helle Mintgrenze */
}
html[data-theme="classic"] .notice         { background: #EAF2DB; }
html[data-theme="classic"] .notice.warning { background: #FFF4E5; }

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-base);
  font-size: 1rem;
  line-height: 1.7;
  color: var(--color-text);
  background: var(--color-bg);
}

img { max-width: 100%; height: auto; display: block; }

a {
  color: var(--color-accent);
  text-decoration: none;
}
a:hover { text-decoration: underline; color: var(--color-primary); }

/* --- Skip Link --- */
.skip-link {
  position: absolute;
  left: -9999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.skip-link:focus {
  left: 16px;
  top: 16px;
  width: auto;
  height: auto;
  background: var(--color-primary);
  color: var(--color-white);
  padding: 8px 16px;
  border-radius: var(--radius);
  z-index: 9999;
}

/* ============================================================
   HEADER & NAV
   ============================================================ */

header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--color-primary);
  box-shadow: var(--shadow);
}

.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 144px;
}

/* Logo */
.site-logo { line-height: 1.15; }
.site-logo a {
  color: var(--color-white);
  text-decoration: none;
  display: grid;
  grid-template-columns: 124px 1fr;
  grid-template-rows: auto auto;
  align-items: center;
  column-gap: 0.6rem;
}
.site-logo-icon {
  grid-column: 1;
  grid-row: 1 / 3;
  display: block;
  height: 124px;
  width: 124px;
  min-width: 124px;
  min-height: 124px;
  flex-shrink: 0;
  object-fit: contain;
  background: #ffffff;
  padding: 8px;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.25);
}
.logo-main {
  grid-column: 2;
  grid-row: 1;
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}
.logo-sub {
  grid-column: 2;
  grid-row: 2;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.8;
  color: var(--color-white);
}

/* Nav */
nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

nav ul {
  list-style: none;
  display: flex;
  gap: 0.1rem;
  flex-wrap: wrap;
}

nav ul li a {
  display: block;
  padding: 0.35rem 0.7rem;
  color: var(--color-white);
  font-size: 0.88rem;
  border-radius: var(--radius);
  transition: background var(--transition);
  white-space: nowrap;
}
nav ul li a:hover,
nav ul li a.active {
  background: rgba(255,255,255,0.15);
  text-decoration: none;
}

/* Language Toggle + Theme Toggle */
#lang-toggle,
#theme-toggle {
  margin-left: 0.5rem;
  padding: 0.3rem 0.75rem;
  background: transparent;
  border: 1.5px solid rgba(255,255,255,0.5);
  border-radius: var(--radius);
  color: var(--color-white);
  font-size: 0.82rem;
  font-family: inherit;
  cursor: pointer;
  white-space: nowrap;
  transition: background var(--transition), border-color var(--transition);
}
#lang-toggle:hover,
#theme-toggle:hover {
  background: rgba(255,255,255,0.15);
  border-color: rgba(255,255,255,0.8);
}

/* Hamburger */
.hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  flex-direction: column;
  gap: 5px;
}
.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--color-white);
  border-radius: 2px;
  transition: transform var(--transition), opacity var(--transition);
}
.hamburger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.hamburger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile nav overlay */
#nav-menu {
  display: flex;
  align-items: center;
}

/* ============================================================
   MAIN CONTENT
   ============================================================ */

main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2.5rem 1.25rem 3rem;
}

/* Page Hero */
.page-hero {
  background: var(--color-bg-alt);
  border-left: 4px solid var(--color-accent);
  padding: 1.5rem 1.75rem;
  border-radius: 0 var(--radius) var(--radius) 0;
  margin-bottom: 2.5rem;
}
.page-hero h1 {
  font-size: 1.85rem;
  font-weight: 700;
  color: var(--color-primary);
  line-height: 1.25;
}
.page-hero .lead {
  margin-top: 0.5rem;
  font-size: 1.05rem;
  color: var(--color-brown);
}

/* Sections */
section {
  margin-bottom: 2.5rem;
}

h2 {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: 0.75rem;
  padding-bottom: 0.35rem;
  border-bottom: 2px solid var(--color-bg-alt);
}

h3 {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--color-brown);
  margin-top: 1.25rem;
  margin-bottom: 0.4rem;
}

p {
  margin-bottom: 0.9rem;
}

ul, ol {
  padding-left: 1.5rem;
  margin-bottom: 0.9rem;
}
li { margin-bottom: 0.3rem; }

/* Motto / Blockquote */
.motto {
  background: var(--color-primary);
  color: var(--color-white);
  padding: 1.5rem 2rem;
  border-radius: var(--radius);
  margin: 1.5rem 0;
  font-size: 1.05rem;
  line-height: 1.6;
}
.motto strong { display: block; font-size: 1.15rem; }

blockquote {
  border-left: 3px solid var(--color-brown);
  padding: 0.5rem 1rem;
  margin: 1rem 0;
  color: var(--color-brown);
  font-style: italic;
}

/* Cards / Infobox */
.info-card {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  margin-bottom: 1.25rem;
  box-shadow: var(--shadow);
}
.info-card h3 { margin-top: 0; }

/* Image Grid */
.img-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 1rem;
  margin: 1.5rem 0;
}
.img-grid figure {
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--color-bg-alt);
}
.img-grid img {
  width: 100%;
  height: 160px;
  object-fit: cover;
  transition: transform 0.3s ease;
}
.img-grid img:hover { transform: scale(1.04); }
.img-grid figcaption {
  font-size: 0.78rem;
  color: var(--color-brown);
  padding: 0.4rem 0.6rem;
  text-align: center;
}

/* ============================================================
   TABLES
   ============================================================ */

.table-wrap { overflow-x: auto; margin: 1rem 0; }

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.93rem;
}
thead th {
  background: var(--color-primary);
  color: var(--color-white);
  padding: 0.6rem 0.9rem;
  text-align: left;
  font-weight: 600;
}
tbody tr:nth-child(even) { background: var(--color-bg-alt); }
tbody tr:hover { background: #e0d9c8; }
td {
  padding: 0.55rem 0.9rem;
  border-bottom: 1px solid var(--color-border);
  vertical-align: top;
}

/* ============================================================
   HIGHLIGHT / NOTICE BOXES
   ============================================================ */

.notice {
  background: #DFF3E8;
  border: 1px solid var(--color-accent);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  margin: 1.25rem 0;
}
.notice.warning {
  background: #FEF0E6;
  border-color: var(--color-brown);
}

/* ============================================================
   CONTACT TABLE
   ============================================================ */

.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.25rem;
  margin-top: 1.25rem;
}
.contact-card {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1.25rem;
  box-shadow: var(--shadow);
}
.contact-card h3 { margin-top: 0; }
.contact-card .contact-detail {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  margin-top: 0.5rem;
  font-size: 0.93rem;
}
.contact-card .contact-label {
  font-weight: 600;
  color: var(--color-primary);
  min-width: 50px;
}

/* ============================================================
   STAMMTISCH BANNER
   ============================================================ */

.stammtisch {
  background: var(--color-brown);
  color: var(--color-white);
  padding: 1.25rem 1.5rem;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 1.5rem 0;
}
.stammtisch-icon { font-size: 2rem; }
.stammtisch p { margin: 0; }
.stammtisch strong { font-size: 1.05rem; }

/* ============================================================
   LINKS PAGE
   ============================================================ */

.link-list { list-style: none; padding: 0; }
.link-list li {
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--color-border);
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
}
.link-list li:last-child { border-bottom: none; }
.link-list li::before {
  content: '→';
  color: var(--color-accent);
  font-weight: 700;
}

/* ============================================================
   FOOTER
   ============================================================ */

footer {
  background: var(--color-primary);
  color: rgba(255,255,255,0.85);
  margin-top: 3rem;
}
.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2rem 1.25rem;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1.5rem;
}
.footer-col h4 {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(255,255,255,0.6);
  margin-bottom: 0.6rem;
}
.footer-col p,
.footer-col a {
  font-size: 0.9rem;
  color: rgba(255,255,255,0.85);
  margin-bottom: 0.25rem;
  display: block;
}
.footer-col a:hover { color: var(--color-white); text-decoration: underline; }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.15);
  text-align: center;
  padding: 0.9rem 1.25rem;
  font-size: 0.8rem;
  color: rgba(255,255,255,0.55);
}

/* ============================================================
   LANGUAGE VISIBILITY
   Uses html[lang="en"] which is set reliably by main.js
   ============================================================ */

.lang-en { display: none; }
.lang-de { display: inline; }

html[lang="en"] .lang-en { display: inline; }
html[lang="en"] .lang-de { display: none; }

/* Block-level lang elements */
.lang-en-block { display: none; }
.lang-de-block { display: block; }

html[lang="en"] .lang-en-block { display: block; }
html[lang="en"] .lang-de-block { display: none; }

/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 768px) {
  .hamburger { display: flex; }

  #nav-menu {
    display: none;
    position: absolute;
    top: 144px;
    left: 0;
    right: 0;
    background: var(--color-primary);
    flex-direction: column;
    align-items: stretch;
    padding: 0.75rem 1.25rem 1.25rem;
    border-top: 1px solid rgba(255,255,255,0.15);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  }
  #nav-menu.open { display: flex; }

  nav ul {
    flex-direction: column;
    gap: 0;
    width: 100%;
  }
  nav ul li a {
    padding: 0.6rem 0.5rem;
    font-size: 1rem;
    border-radius: 0;
    border-bottom: 1px solid rgba(255,255,255,0.08);
  }

  #lang-toggle {
    margin-left: 0;
    margin-top: 0.75rem;
    align-self: flex-start;
  }

  .page-hero h1 { font-size: 1.45rem; }

  .footer-inner { grid-template-columns: 1fr; gap: 1rem; }
}

@media (max-width: 480px) {
  .img-grid { grid-template-columns: repeat(2, 1fr); }
  .motto { padding: 1rem 1.25rem; }
}

/* ============================================================
   PRINT
   ============================================================ */

@media print {
  header, footer, #lang-toggle, .hamburger { display: none !important; }
  main { padding: 0; max-width: 100%; }
  a { color: var(--color-text); }
  .motto { background: #eee; color: var(--color-text); }
}
