/* =====================================================
   MFG Haueneberstein Theme
   Farben: Dunkelblau (#1a3a5c), Hellblau (#4a90d9), Weiß, Hellgrau
   Schriften: System Sans-Serif Stack (wie Original Joomla-Theme)
   ===================================================== */

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

@font-face {
  font-family: 'Open Sans';
  src: url('/fonts/OpenSans.woff2') format('woff2');
  font-weight: 100 900;   /* Variable font – deckt alles ab */
  font-style: normal;
  font-display: swap;     /* Text sofort sichtbar, Font lädt nach */
}


:root {
  --color-primary:     #1a3a5c;
  --color-primary-light: #2a5a8c;
  --color-accent:      #4a90d9;
  --color-accent-hover: #357abd;
  --color-bg:          #f5f5f5;
  --color-white:       #ffffff;
  --color-text:        #333333;
  --color-text-muted:  #666666;
  --color-border:      #dde3ea;
  --color-footer-bg:   #1a3a5c;
  --color-footer-text: #ccd9e8;
  --color-table-head:  #2a5a8c;
  --font-main: 'Open Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --max-width: 1100px;
  --nav-height: 60px;
  --border-radius: 4px;
  --shadow: 0 2px 8px rgba(0,0,0,0.12);
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-main);
  font-weight: 300;
  color: var(--color-text);
  background-color: var(--color-bg);
  line-height: 1.65;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

h1, h2, h3 {
  font-weight: 600;
}

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

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

/* --- Header --- */
.site-header {
  background-color: #1a3a5c !important;
  background: #1a3a5c !important;
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(0,0,0,0.25);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--nav-height);
  background: transparent;
}

/* Der Titel darf NICHT umbrechen und muss sichtbar weiß sein */
.site-title,
.site-title a,
a.site-title {
  display: inline-block;
  font-size: 1.05rem;
  font-weight: 700;
  color: #ffffff !important;
  text-decoration: none !important;
  white-space: nowrap;
  letter-spacing: 0.02em;
  line-height: var(--nav-height);
}
.site-title:hover,
.site-title a:hover,
a.site-title:hover {
  color: var(--color-accent) !important;
  text-decoration: none !important;
}

/* --- Navigation --- */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  color: var(--color-white);
}
.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: currentColor;
  margin: 5px 0;
  transition: transform 0.3s, opacity 0.3s;
}

.main-nav ul {
  list-style: none;
  display: flex;
  gap: 0;
}

.main-nav a {
  display: block;
  padding: 0 1rem;
  height: var(--nav-height);
  line-height: var(--nav-height);
  color: rgba(255,255,255,0.88);
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none;
  transition: color 0.2s, background-color 0.2s;
  white-space: nowrap;
}
.main-nav a:hover,
.main-nav a.active {
  color: var(--color-white);
  background-color: var(--color-primary-light);
  text-decoration: none;
}

/* --- Hero Banner (Startseite) --- */
.hero {
  width: 100%;
  background-color: var(--color-primary);
}
.hero img {
  width: 100%;
  height: auto;
  display: block;
}

/* --- Hauptinhalt --- */
.site-main {
  flex: 1;
}

.page-wrapper {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2.5rem 1.5rem;
}



/* --- Cards / Content Boxes --- */
.content-card {
  background: var(--color-white);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  padding: 2rem;
  margin-bottom: 1.5rem;
}

.content-card h2,
.content-card h3 {
  color: var(--color-primary);
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--color-border);
}

/* --- Termine-Tabelle --- */
.termine-table,
.content-card table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}
.termine-table th,
.content-card table th {
  background-color: var(--color-table-head);
  color: var(--color-white);
  padding: 0.6rem 1rem;
  text-align: left;
}
.termine-table td,
.content-card table td {
  padding: 0.55rem 1rem;
  border-bottom: 1px solid var(--color-border);
}
.termine-table tr:last-child td,
.content-card table tr:last-child td {
  border-bottom: none;
}
.termine-table tr:nth-child(even) td,
.content-card table tr:nth-child(even) td {
  background-color: #f0f5fb;
}

/* --- Wetter Widget --- */
.weather-card {
  background: var(--color-white);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  padding: 1.5rem;
}
.weather-card h3 {
  color: var(--color-primary);
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--color-border);
}
.weather-card iframe {
  width: 100%;
  border: none;
  border-radius: var(--border-radius);
}

/* --- Standard Seiteninhalte --- */
.page-content {
  background: var(--color-white);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  padding: 2.5rem;
}

.page-content h1 {
  color: var(--color-primary);
  font-size: 1.75rem;
  margin-bottom: 1.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 3px solid var(--color-accent);
}

.page-content h2, .page-content h3 {
  color: var(--color-primary);
  margin-top: 1.75rem;
  margin-bottom: 0.75rem;
}

.page-content p {
  margin-bottom: 1rem;
}

.page-content ul, .page-content ol {
  margin-left: 1.5rem;
  margin-bottom: 1rem;
}

.page-content figure {
  margin: 1.5rem 0;
}

.page-content figure img {
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
}

/* Vorstandsliste */
.vorstand-list {
  list-style: none;
  padding: 0;
  display: grid;
  gap: 0.25rem;
}
.vorstand-list li {
  padding: 0.2rem 0;
}

/* GPS / Anfahrt Info Box */
.info-box {
  background: #f0f5fb;
  border: 1px solid var(--color-border);
  border-left: 4px solid var(--color-accent);
  border-radius: var(--border-radius);
  padding: 1rem 1.25rem;
  margin: 1.25rem 0;
  font-size: 0.95rem;
}
.info-box strong {
  color: var(--color-primary);
}

/* Kontakt Card */
.kontakt-card {
  background: #f0f5fb;
  border-radius: var(--border-radius);
  padding: 1.5rem;
  margin-top: 1rem;
}
.kontakt-card p {
  margin-bottom: 0.4rem;
}

/* --- Media Übersichtsseite --- */
.media-overview-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: start;
}

.media-section h2 {
  color: var(--color-primary);
  font-size: 1.2rem;
  margin-bottom: 1.25rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--color-border);
}

.gallery-list {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.gallery-list a {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.6rem;
  border-radius: var(--border-radius);
  text-decoration: none;
  color: var(--color-text);
  background: #f8fafc;
  border: 1px solid var(--color-border);
  transition: background 0.15s, box-shadow 0.15s;
}
.gallery-list a:hover {
  background: #eef4fb;
  box-shadow: var(--shadow);
  text-decoration: none;
  color: var(--color-text);
}

.gallery-list img {
  width: 100px;
  height: 65px;
  object-fit: cover;
  border-radius: var(--border-radius);
  flex-shrink: 0;
}

.gallery-thumb-placeholder {
  width: 100px;
  height: 65px;
  background: var(--color-border);
  border-radius: var(--border-radius);
  flex-shrink: 0;
}

.video-placeholder {
  background: var(--color-primary);
  display: flex;
  align-items: center;
  justify-content: center;
}
.video-icon {
  color: white;
  font-size: 1.5rem;
}

.gallery-title {
  font-weight: 600;
  font-size: 0.95rem;
  flex: 1;
  color: var(--color-primary);
}

.gallery-date {
  font-size: 0.8rem;
  color: var(--color-text-muted);
  margin-left: auto;
  white-space: nowrap;
}

@media (max-width: 768px) {
  .media-overview-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

/* --- Footer --- */
.site-footer {
  background-color: var(--color-footer-bg);
  color: var(--color-footer-text);
  padding: 1.5rem 0;
  margin-top: auto;
}
.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}
.footer-links {
  list-style: none;
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
}
.footer-links a {
  color: var(--color-footer-text);
  font-size: 0.875rem;
  text-decoration: none;
  transition: color 0.2s;
}
.footer-links a:hover {
  color: var(--color-white);
  text-decoration: underline;
}
.footer-copyright {
  font-size: 0.875rem;
  color: rgba(255,255,255,0.6);
}

/* --- Responsive --- */
@media (max-width: 768px) {
  .nav-toggle {
    display: block;
  }
  .main-nav {
    display: none;
    position: absolute;
    top: var(--nav-height);
    left: 0;
    right: 0;
    background-color: var(--color-primary-light);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
  }
  .main-nav.is-open {
    display: block;
  }
  .main-nav ul {
    flex-direction: column;
  }
  .main-nav a {
    height: auto;
    line-height: 1.4;
    padding: 0.85rem 1.5rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
  }
  .page-content {
    padding: 1.5rem;
  }
  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 480px) {
  .site-title {
    font-size: 0.95rem;
  }
  .page-content h1 {
    font-size: 1.4rem;
  }
}
