:root {
  --brand: #007a7a;
  --brand-dark: #005f5f;
  --brand-accent: #00a0a0;
  --brand-soft: #01978c;
  --ink: #333;
  --bg: #eef2f2;
  --white: #fff;
  --line: #dce8e8;
  --table-line: #d0e8e8;
  --table-stripe: #f4fafa;
  --shell: 960px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "Segoe UI", Arial, sans-serif;
  font-size: 15px;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
}

img { max-width: 100%; height: auto; }
a { color: var(--brand); }
:focus-visible { outline: 3px solid #f0b429; outline-offset: 3px; }

.skip-link {
  position: fixed;
  z-index: 100;
  left: 12px;
  top: 12px;
  transform: translateY(-160%);
  padding: 10px 14px;
  background: var(--brand-dark);
  color: #fff;
  text-decoration: none;
}
.skip-link:focus { transform: none; }

/* Topbar – like live site */
.topbar {
  background: var(--white);
  padding: 7px 30px;
  font-size: 13px;
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--line);
}
.topbar a { color: var(--brand); text-decoration: none; font-weight: 500; }
.topbar span { display: flex; align-items: center; gap: 5px; }

/* Hero – like live site */
.hero {
  position: relative;
  width: 100%;
  height: 300px;
  overflow: hidden;
  background: var(--brand-dark);
}
.hero img.hero-bg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 55%;
  display: block;
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(0, 40, 40, 0.1), rgba(0, 40, 40, 0.45));
}
.hero-title {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.hero-title-inner {
  display: flex;
  align-items: center;
  gap: 16px;
  border: 2px solid rgba(255, 255, 255, 0.9);
  padding: 18px 36px;
}
.hero-title-inner h1 {
  margin: 0;
  color: #fff;
  font-size: clamp(1.15rem, 3.2vw, 1.75rem);
  font-weight: 400;
  line-height: 1.3;
  text-align: center;
  text-shadow: 1px 1px 6px rgba(0, 0, 0, 0.7), 0 0 20px rgba(0, 0, 0, 0.4);
  letter-spacing: 0.5px;
}

/* Nav bar shell */
.nav-bar {
  background: var(--brand);
  position: relative;
}
.menu-button {
  display: none;
  width: calc(100% - 24px);
  margin: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 4px;
  padding: 10px 14px;
  background: rgba(0, 0, 0, 0.18);
  color: #fff;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.main-navigation > ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  margin: 0;
  padding: 0 20px;
}
.main-navigation > ul > li { position: relative; }
.main-navigation > ul > li > a {
  display: flex;
  align-items: center;
  gap: 5px;
  color: #fff;
  text-decoration: none;
  padding: 12px 14px;
  font-size: 13.5px;
  font-weight: 500;
  white-space: nowrap;
}
.main-navigation > ul > li > a:hover,
.main-navigation > ul > li:hover > a,
.main-navigation > ul > li > a[aria-current="page"] {
  background: rgba(0, 0, 0, 0.2);
}
.nav-caret { font-size: 10px; opacity: 0.7; }

/* Content shell */
.wrapper {
  max-width: var(--shell);
  margin: 18px auto 30px;
  padding: 0 16px;
}
main#content {
  background: var(--white);
  padding: 30px 36px;
  border-radius: 6px;
  box-shadow: 0 1px 6px rgba(0, 100, 100, 0.1);
  min-height: 420px;
}

.page-heading h1 {
  margin: 0 0 18px;
  color: var(--brand);
  font-size: 22px;
  font-weight: 700;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--brand);
}

.content h2 {
  color: var(--brand-dark);
  font-size: 17px;
  margin: 20px 0 8px;
}
.content h3,
.content .module-title {
  color: var(--brand-dark);
  font-size: 15px;
  margin: 14px 0 6px;
}
.content p { margin: 0 0 10px; line-height: 1.7; }
.content ul,
.content ol {
  margin: 8px 0 12px 22px;
  line-height: 1.75;
}
.content a { color: var(--brand); }
.content img {
  max-width: 100%;
  height: auto;
  margin: 10px 0;
  border-radius: 4px;
}

.content table,
.imported-module table,
.uk-table {
  width: 100%;
  border-collapse: collapse;
  margin: 14px 0;
  font-size: 14px;
  display: block;
  overflow-x: auto;
}
.content td,
.content th,
.imported-module td,
.imported-module th,
.uk-table td,
.uk-table th {
  border: 1px solid var(--table-line);
  padding: 9px 12px;
  text-align: left;
  vertical-align: top;
}
.content th,
.imported-module th,
.uk-table th {
  background: var(--brand);
  color: #fff;
  font-weight: 600;
}
.content tr:nth-child(even),
.uk-table-striped tr:nth-child(even) {
  background: var(--table-stripe);
}

/* Migrated Astroid / Bootstrap compatibility */
.astroid-section { margin-bottom: 1.25rem; }
.headline-border-primary,
.headline-bullet {
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--brand);
}
.headline-border-primary .module-title,
.headline-bullet .module-title {
  margin: 0;
  color: var(--brand);
  font-size: 18px;
  font-weight: 700;
}
.imported-module { margin-block: 1.75rem; }

.btn,
.button {
  display: inline-block;
  margin: 4px 0;
  padding: 9px 18px;
  border: 1px solid var(--brand);
  border-radius: 4px;
  background: var(--brand);
  color: #fff !important;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}
.btn:hover,
.button:hover { background: var(--brand-dark); border-color: var(--brand-dark); }
.btn-sm { padding: 6px 12px; font-size: 13px; }
.btn-outline-primary {
  background: transparent;
  color: var(--brand) !important;
}
.btn-outline-primary:hover {
  background: var(--brand);
  color: #fff !important;
}
.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 3px;
  font-size: 12px;
  font-weight: 600;
  color: #fff;
}
.badge-success { background: #28a745; }
.badge-primary { background: var(--brand); }

/* Simple modal fallback for uk-modal markup */
[uk-modal] {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 300;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(0, 40, 40, 0.55);
}
[uk-modal].is-open { display: flex; }
.uk-modal-dialog {
  width: min(640px, 100%);
  max-height: 90vh;
  overflow: auto;
  background: #fff;
  border-radius: 6px;
  padding: 24px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
}
.uk-modal-title { color: var(--brand); margin: 0 0 12px; }
.uk-modal-close-default {
  float: right;
  border: 0;
  background: transparent;
  font-size: 1.4rem;
  cursor: pointer;
  color: var(--brand-dark);
}

.site-footer {
  background: var(--brand);
  color: rgba(255, 255, 255, 0.85);
  text-align: center;
  padding: 20px;
  font-size: 13px;
}
.site-footer a {
  color: #b2e8e8;
  text-decoration: none;
}
.site-footer a:hover { text-decoration: underline; }

/* Team accordion (replaces broken Joomla {/sliders}) */
.team-accordion-list {
  display: grid;
  gap: 10px;
  margin: 16px 0 8px;
}
.team-accordion {
  border: 1px solid #c5e0e0;
  border-radius: 6px;
  background: #f7fbfb;
  overflow: hidden;
}
.team-accordion-summary {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  cursor: pointer;
  color: var(--brand-dark);
  font-weight: 700;
  font-size: 1.05rem;
  background: #eaf6f6;
  user-select: none;
}
.team-accordion-summary-main {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.team-photo {
  width: 160px;
  height: 160px;
  object-fit: cover;
  border-radius: 50%;
  display: block;
  margin: 0 auto 12px;
  border: 3px solid #c5e0e0;
  background: #eef5f5;
}
.team-photo-sm {
  width: 40px;
  height: 40px;
  margin: 0;
  border-width: 2px;
  flex-shrink: 0;
}
.team-photo-wrap {
  margin: 0 0 8px !important;
}
.team-accordion[open] > .team-accordion-summary .team-photo-sm {
  border-color: rgba(255, 255, 255, 0.55);
}
.team-accordion-summary::-webkit-details-marker { display: none; }
.team-accordion-summary::marker { content: ""; }
.team-accordion-summary:hover { background: #dff1f1; }
.team-accordion[open] > .team-accordion-summary {
  background: var(--brand);
  color: #fff;
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}
.team-accordion-icon {
  width: 0.65rem;
  height: 0.65rem;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  transition: transform 0.2s ease;
  flex-shrink: 0;
}
.team-accordion[open] .team-accordion-icon {
  transform: rotate(-135deg);
  margin-top: 4px;
}
.team-accordion-body {
  padding: 12px 14px 16px;
  background: #fff;
}
.team-accordion-body table {
  margin: 0;
}
.team-accordion-body td {
  border-color: #d0e8e8;
}

@media (max-width: 900px) {
  .menu-button { display: block; }
  .main-navigation {
    display: none;
    padding-bottom: 10px;
  }
  .main-navigation.is-open { display: block; }
  .main-navigation > ul {
    display: block;
    padding: 0 12px 8px;
  }
  .main-navigation > ul > li > a {
    white-space: normal;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  }
  .hero { height: 220px; }
  .hero-title-inner { padding: 14px 18px; }
  main#content { padding: 22px 18px; }
  .topbar { padding: 8px 14px; gap: 10px 18px; }
}

@media (max-width: 560px) {
  .hero { height: 180px; }
  .hero-title-inner { width: 100%; justify-content: center; }
  .content table,
  .imported-module table,
  .uk-table { font-size: 13px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}

.vertretungsplan-form {
  display: grid;
  gap: 0.75rem;
  max-width: 22rem;
  margin-top: 1rem;
}
.vertretungsplan-form label {
  font-weight: 600;
}
.vertretungsplan-form input[type="password"] {
  width: 100%;
  padding: 0.55rem 0.7rem;
  border: 1px solid #c5cdd4;
  border-radius: 4px;
  font: inherit;
}
.vertretungsplan-form input[type="password"]:focus {
  outline: 2px solid var(--brand);
  outline-offset: 1px;
}
.vertretungsplan .form-error {
  color: #8b1e1e;
  font-weight: 600;
}
.btn-primary {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff !important;
}
