/* ============================================================
   TCC Teltow – Responsive Stylesheet
   Mobile-first, no external dependencies
   ============================================================ */

/* --- Custom Properties ------------------------------------ */
:root {
  --color-red:        #cc0000;
  --color-red-dark:   #990000;
  --color-red-light:  #e8000020;
  --color-gold:       #c8a000;
  --color-text:       #1a1a1a;
  --color-text-light: #555;
  --color-bg:         #ffffff;
  --color-bg-gray:    #f5f5f5;
  --color-border:     #ddd;
  --color-white:      #fff;

  --font-sans: system-ui, -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;

  --header-height: 64px;
  --container-max: 1140px;
  --radius:        6px;
  --shadow:        0 2px 8px rgba(0,0,0,0.12);
  --transition:    0.2s ease;
}

/* --- Reset ------------------------------------------------ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--color-text);
  background: var(--color-bg);
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--color-red); text-decoration: none; }
a:hover, a:focus { text-decoration: underline; color: var(--color-red-dark); }

ul { list-style: none; }

/* --- Utility ---------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: 1rem;
}

.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; overflow: hidden; clip: rect(0,0,0,0);
  white-space: nowrap; border: 0;
}

/* --- Header ----------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--color-red);
  box-shadow: var(--shadow);
  height: var(--header-height);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-height);
  gap: 1rem;
}

/* Logo */
.logo {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
  text-decoration: none;
  color: var(--color-white);
  flex-shrink: 0;
}
.logo-main {
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: 0.05em;
}
.logo-sub {
  font-size: 0.65rem;
  font-weight: 400;
  letter-spacing: 0.08em;
  opacity: 0.85;
  text-transform: uppercase;
}

/* Hamburger */
.nav-toggle {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 4px;
  border-radius: var(--radius);
  flex-shrink: 0;
}
.nav-toggle:focus-visible {
  outline: 2px solid var(--color-white);
  outline-offset: 2px;
}
.hamburger-bar {
  display: block;
  width: 100%;
  height: 3px;
  background: var(--color-white);
  border-radius: 2px;
  transition: transform var(--transition), opacity var(--transition);
}
.nav-toggle[aria-expanded="true"] .hamburger-bar:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}
.nav-toggle[aria-expanded="true"] .hamburger-bar:nth-child(2) {
  opacity: 0;
}
.nav-toggle[aria-expanded="true"] .hamburger-bar:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

/* Mobile navigation (hidden by default) */
.main-nav {
  display: none;
  position: absolute;
  top: var(--header-height);
  left: 0;
  right: 0;
  background: var(--color-red-dark);
  padding: 0.5rem 0 1rem;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}
.main-nav.is-open { display: block; }

.nav-list { display: flex; flex-direction: column; }

.nav-link {
  display: block;
  padding: 0.7rem 1.25rem;
  color: var(--color-white);
  font-size: 0.95rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  text-decoration: none;
  transition: background var(--transition);
}
.nav-link:hover,
.nav-link:focus { background: rgba(255,255,255,0.15); color: var(--color-white); text-decoration: none; }
.nav-link--active {
  background: rgba(255,255,255,0.2);
  font-weight: 700;
  border-left: 4px solid var(--color-gold);
}

/* Desktop navigation */
@media (min-width: 768px) {
  .nav-toggle { display: none; }

  .main-nav {
    display: flex !important;
    position: static;
    background: transparent;
    padding: 0;
    box-shadow: none;
    align-items: center;
  }

  .nav-list { flex-direction: row; gap: 0.1rem; }

  .nav-link {
    padding: 0.45rem 0.75rem;
    border-radius: var(--radius);
    font-size: 0.85rem;
  }
  .nav-link--active {
    background: rgba(255,255,255,0.2);
    border-left: none;
    border-bottom: 3px solid var(--color-gold);
    border-radius: 0;
  }
}

@media (min-width: 1024px) {
  .nav-link { font-size: 0.9rem; padding: 0.5rem 1rem; }
}

/* --- Hero Banner ------------------------------------------ */
.hero {
  background: linear-gradient(135deg, var(--color-red) 0%, var(--color-red-dark) 60%, #3a0000 100%);
  color: var(--color-white);
  padding: 3rem 1rem;
  text-align: center;
}
.hero__title {
  font-size: clamp(1.8rem, 5vw, 3rem);
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 0.5rem;
}
.hero__subtitle {
  font-size: clamp(1rem, 2.5vw, 1.35rem);
  opacity: 0.9;
  margin-bottom: 1.5rem;
}
.hero__text {
  max-width: 640px;
  margin-inline: auto;
  font-size: 1rem;
  opacity: 0.85;
  margin-bottom: 2rem;
}
.btn {
  display: inline-block;
  padding: 0.75rem 1.75rem;
  border-radius: var(--radius);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  text-decoration: none;
  transition: background var(--transition), transform var(--transition);
}
.btn:hover { transform: translateY(-1px); text-decoration: none; }
.btn--primary {
  background: var(--color-white);
  color: var(--color-red);
}
.btn--primary:hover { background: #f0f0f0; color: var(--color-red-dark); }
.btn--gold {
  background: var(--color-gold);
  color: var(--color-white);
}
.btn--outline {
  background: transparent;
  border: 2px solid var(--color-white);
  color: var(--color-white);
}
.btn--outline:hover { background: rgba(255,255,255,0.15); color: var(--color-white); }

/* --- Sections --------------------------------------------- */
.section {
  padding: 3rem 0;
}
.section--gray { background: var(--color-bg-gray); }
.section--red {
  background: var(--color-red);
  color: var(--color-white);
}
.section--red a { color: var(--color-white); }

.section__title {
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--color-red);
}
.section--red .section__title { color: var(--color-white); }
.section__lead {
  font-size: 1.1rem;
  color: var(--color-text-light);
  margin-bottom: 2rem;
  max-width: 680px;
}

/* --- Cards Grid ------------------------------------------- */
.card-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}
@media (min-width: 480px) {
  .card-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 768px) {
  .card-grid { grid-template-columns: repeat(3, 1fr); }
}

.card {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  transition: transform var(--transition), box-shadow var(--transition);
}
.card:hover { transform: translateY(-3px); box-shadow: 0 6px 20px rgba(0,0,0,0.15); }
.card__img-wrap { aspect-ratio: 16/9; overflow: hidden; }
.card__img-wrap img { width: 100%; height: 100%; object-fit: cover; }
.card__body { padding: 1rem 1.25rem; flex: 1; }
.card__title {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 0.4rem;
  color: var(--color-red);
}
.card__text { font-size: 0.9rem; color: var(--color-text-light); }
.card__footer { padding: 0.75rem 1.25rem; border-top: 1px solid var(--color-border); }

/* --- Termine List ----------------------------------------- */
.termine-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.termin-item {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.25rem;
  background: var(--color-white);
  border-left: 4px solid var(--color-red);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 0.85rem 1rem;
  box-shadow: var(--shadow);
}
@media (min-width: 520px) {
  .termin-item { grid-template-columns: auto 1fr auto; align-items: center; gap: 1rem; }
}
.termin-item__date {
  font-weight: 700;
  color: var(--color-red);
  white-space: nowrap;
}
.termin-item__name { font-weight: 600; }
.termin-item__time { color: var(--color-text-light); font-size: 0.9rem; white-space: nowrap; }

/* --- Info Boxes ------------------------------------------- */
.info-box {
  background: var(--color-bg-gray);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}
.info-box h3 { font-size: 1.1rem; font-weight: 700; margin-bottom: 0.5rem; color: var(--color-red); }

/* --- Two-column layout ------------------------------------ */
.two-col {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}
@media (min-width: 768px) {
  .two-col { grid-template-columns: 2fr 1fr; }
}

/* --- Sidebar ---------------------------------------------- */
.sidebar .info-box { background: var(--color-bg-gray); }

/* --- Page Hero (non-home) --------------------------------- */
.page-hero {
  background: linear-gradient(90deg, var(--color-red) 0%, var(--color-red-dark) 100%);
  color: var(--color-white);
  padding: 2rem 0;
}
.page-hero__title {
  font-size: clamp(1.5rem, 4vw, 2.4rem);
  font-weight: 800;
}
.page-hero__breadcrumb {
  font-size: 0.85rem;
  opacity: 0.8;
  margin-top: 0.25rem;
}
.page-hero__breadcrumb a { color: rgba(255,255,255,0.8); }

/* --- Prose content ---------------------------------------- */
.prose h2 { font-size: 1.5rem; font-weight: 700; margin: 1.75rem 0 0.75rem; color: var(--color-red); }
.prose h3 { font-size: 1.2rem; font-weight: 700; margin: 1.5rem 0 0.5rem; }
.prose p  { margin-bottom: 1rem; }
.prose ul, .prose ol { padding-left: 1.5rem; margin-bottom: 1rem; }
.prose ul { list-style: disc; }
.prose ol { list-style: decimal; }
.prose li { margin-bottom: 0.3rem; }

/* --- Subpage nav (wir-ueber-uns) -------------------------- */
.subpage-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 2rem;
}
.subpage-nav a {
  display: inline-block;
  padding: 0.4rem 0.9rem;
  border: 2px solid var(--color-red);
  border-radius: 999px;
  color: var(--color-red);
  font-size: 0.88rem;
  font-weight: 600;
  text-decoration: none;
  transition: background var(--transition), color var(--transition);
}
.subpage-nav a:hover,
.subpage-nav a.is-active {
  background: var(--color-red);
  color: var(--color-white);
  text-decoration: none;
}

/* --- Sponsor grid ----------------------------------------- */
.sponsor-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}
@media (min-width: 480px) {
  .sponsor-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 768px) {
  .sponsor-grid { grid-template-columns: repeat(4, 1fr); }
}
.sponsor-item {
  background: var(--color-bg-gray);
  border-radius: var(--radius);
  padding: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 80px;
  font-weight: 600;
  font-size: 0.9rem;
  text-align: center;
  border: 1px solid var(--color-border);
}

/* --- Highlight strip -------------------------------------- */
.highlight-strip {
  background: var(--color-red);
  color: var(--color-white);
  padding: 1.5rem 0;
  text-align: center;
}
.highlight-strip p { font-size: 1.1rem; margin-bottom: 0.75rem; }
.highlight-strip a.btn { margin: 0.25rem; }

/* --- Footer ----------------------------------------------- */
.site-footer {
  background: #1a1a1a;
  color: #ccc;
  padding: 3rem 0 0;
  margin-top: 3rem;
}
.footer-inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}
@media (min-width: 600px) {
  .footer-inner { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 900px) {
  .footer-inner { grid-template-columns: repeat(3, 1fr); }
}
.site-footer h3 {
  color: var(--color-white);
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.site-footer a { color: #bbb; }
.site-footer a:hover { color: var(--color-white); }
.footer-nav { display: flex; flex-direction: column; gap: 0.3rem; }
.footer-nav a { font-size: 0.9rem; }

.social-links { display: flex; flex-direction: column; gap: 0.6rem; }
.social-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: #bbb;
  font-size: 0.9rem;
  text-decoration: none;
  padding: 0.4rem 0.75rem;
  border-radius: var(--radius);
  border: 1px solid #444;
  transition: background var(--transition), color var(--transition);
}
.social-link:hover { color: var(--color-white); background: #333; text-decoration: none; }

.footer-bottom {
  margin-top: 2rem;
  border-top: 1px solid #333;
  padding: 1rem 0;
  text-align: center;
  font-size: 0.85rem;
  color: #777;
}
.footer-bottom a { color: #999; }
.footer-bottom a:hover { color: var(--color-white); }

/* --- Main content spacing --------------------------------- */
.main-content { min-height: calc(100vh - var(--header-height) - 300px); }

/* --- Accessibility ---------------------------------------- */
:focus-visible {
  outline: 3px solid var(--color-gold);
  outline-offset: 2px;
}
