:root {
  --dark: #1f1f1f;
  --dark-overlay: rgba(31, 31, 31, 0.65);
  --orange: #e67e22;
  --text: #333;
  --light: #f5f5f5;
  --dropdown-bg: rgba(0, 0, 0, 0.72);
  --radius: 14px;
  --gap: .45rem;
  --icon-default: #777;
  --icon-hover: #e67e22;
  --icon-active: #c55f12;
  --icon-bg-hover: rgba(230,126,34,.12);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: system-ui, sans-serif;
  color: var(--text);
  background: #fff;
  min-height: 100vh;
  display: flex;
  flex-direction: column;  
}

/* =========================
   HEADER / HERO
   ========================= */
.site-header {
  height: 280px;
  background: url("../Images/header-zurich.png") center/cover no-repeat;
  position: relative;
}

.header-overlay {
  position: absolute;
  inset: 0;
  background: var(--dark-overlay);
}

.header-inner {
  position: relative;
  z-index: 2;
  max-width: 1100px;
  margin: 0 auto;
  height: 100%;
  padding: 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 2rem;
}

.site-title {
  margin: 0;
  color: var(--orange);
  font-size: 1.9rem;
  font-weight: 700;
  line-height: 1.1;
  text-shadow: 0 2px 10px rgba(0,0,0,.55);
}

.header-icons {
  display: flex;
  gap: 1.4rem;
}

.header-icons .icon {
  width: 22px;
  height: 22px;
  display: block;
}

.header-icons .icon-link {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  color: var(--orange);
  border-radius: 12px;
  transition: color .2s ease, background .2s ease, transform .15s ease;
}

.header-icons .icon-link:hover {
  color: var(--icon-hover);
  background: var(--icon-bg-hover);
  transform: translateY(-2px);
}

.header-icons .icon-link.is-active {
  color: var(--icon-active);
  background: rgba(230,126,34,.2);
}

/* =========================
   NAVIGATION
   ========================= */
.main-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.main-nav > ul.nav-level-1 {
  display: flex;
  gap: 1.5rem;
  align-items: center;
}

.main-nav .nav-level-1 > li {
  position: relative;
}

.main-nav a {
  display: inline-block;
  color: #fff;
  text-decoration: none;
  font-weight: 650;
  padding: .35rem .25rem;
  text-shadow: 0 2px 10px rgba(0,0,0,.75);
}

.main-nav a:hover,
.main-nav li.active > a {
  color: var(--orange);
}

.main-nav li.has-sub > a::after {
  content: "▾";
  font-size: 0.75em;
  margin-left: 0.35rem;
  opacity: 0.75;
  display: inline-block;
  transition: transform 0.2s ease;
}

.main-nav li.has-sub.open > a::after {
  transform: rotate(180deg);
}

/* =========================
   DROPDOWNS
   ========================= */
.main-nav .nav-level-2,
.main-nav .nav-level-3 {
  display: none;
  background: var(--dropdown-bg);
  border-radius: var(--radius);
  padding: .6rem .8rem;
  min-width: 220px;
  box-shadow: 0 10px 30px rgba(0,0,0,.35);
  position: absolute;
  top: calc(100% + var(--gap));
  left: 0;
  z-index: 999;
}

.main-nav .nav-level-2 a,
.main-nav .nav-level-3 a {
  color: #fff;
  font-weight: 550;
  padding: .35rem .2rem;
  text-shadow: none;
  white-space: nowrap;
}

.main-nav .nav-level-2 > li + li,
.main-nav .nav-level-3 > li + li {
  border-top: 1px solid rgba(255,255,255,.10);
}

.main-nav .nav-level-1 > li.has-sub.open > .nav-level-2,
.main-nav .nav-level-2 > li.has-sub.open > .nav-level-3 {
  display: block;
}

@media (hover: none) {
  .main-nav a {
    -webkit-tap-highlight-color: rgba(230, 126, 34, 0.15);
  }
}

@media (max-width: 900px) {
  .header-inner {
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
  }
  .main-nav > ul.nav-level-1 {
    flex-wrap: wrap;
    gap: 1rem;
  }
  .main-nav .nav-level-1 > li.has-sub > .nav-level-2 {
    left: 0;
    right: auto;
    top: calc(100% + 0.3rem);
    min-width: max-content;
    max-width: 90vw;
  }
  .main-nav .nav-level-2 > li {
    position: relative;
  }
  .main-nav .nav-level-2 > li.has-sub > .nav-level-3 {
    position: absolute;
    top: calc(100% + 0.3rem);
    left: 0;
    right: auto;
  }
}

@media (min-width: 901px) {
  .main-nav .nav-level-1 > li.has-sub > .nav-level-2::before {
    content: "";
    position: absolute;
    top: calc(-1 * var(--gap));
    left: 0;
    right: 0;
    height: var(--gap);
  }
  .main-nav .nav-level-1 > li.has-sub:hover > .nav-level-2 {
    display: block;
  }
  .main-nav .nav-level-2 > li {
    position: relative;
    padding: .15rem 0;
  }
  .main-nav .nav-level-2 > li.has-sub > .nav-level-3 {
    position: absolute;
    top: 0;
    left: calc(100% + var(--gap));
    z-index: 1000;
  }
  .main-nav .nav-level-2 > li.has-sub > .nav-level-3::before {
    content: "";
    position: absolute;
    left: calc(-1 * var(--gap));
    top: 0;
    width: var(--gap);
    height: 100%;
  }
  .main-nav .nav-level-2 > li.has-sub:hover > .nav-level-3 {
    display: block;
  }
}

/* =========================
   Site Map
   ========================= */
.sitemap {
  list-style: none;
  padding-left: 0;
}

.sitemap ul {
  list-style: none;
  padding-left: 1.2rem;
  margin-top: .3rem;
}

.sitemap a {
  color: var(--text);
  text-decoration: none;
}

.sitemap a:hover {
  color: var(--orange);
}

/* =========================
   MAIN CONTENT
   ========================= */
.site-main {
  max-width: 900px;
  margin: 2rem auto;
  padding: 0 1.5rem;
  flex: 1;
  width: 100%;
}

.page-title {
  color: var(--dark);
  border-bottom: 3px solid var(--orange);
  padding-bottom: .3rem;
}

.page-subtitle {
  color: #666;
  margin-top: .5rem;
}

/* =========================
   Team
   ========================= */
.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 2rem;
}

.team-member {
  text-align: center;
}

.team-member img {
  border-radius: 50%;
  margin-bottom: 1rem;
}

.team-member .email a {
  font-size: 0.9rem;
  color: var(--orange);
  text-decoration: none;
}

/* =========================
   FORMS - Gemeinsames Styling
   ========================= */

/* Fieldset Base Styling - für beide Formulare */
fieldset {
  border: 1px solid rgba(0,0,0,.12);
  border-radius: 14px;
  padding: 1.2rem;
  background: #fff;
  margin: 0;
}

legend {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--dark);
  padding: 0 .5rem;
}

/* Labels */
label {
  font-weight: 600;
  display: block;
  margin: .8rem 0 .3rem;
  color: var(--text);
}

/* Input Fields - Text, Password, Email */
input[type="text"],
input[type="password"],
input[type="email"],
select {
  width: 100%;
  max-width: 520px;
  padding: .55rem .7rem;
  border-radius: 12px;
  border: 1px solid rgba(0,0,0,.18);
  outline: none;
  font-size: 1rem;
  background: #fff;
  transition: border-color .2s ease, box-shadow .2s ease;
}

/* Focus States */
input[type="text"]:focus,
input[type="password"]:focus,
input[type="email"]:focus,
select:focus {
  border-color: var(--orange);
  box-shadow: 0 0 0 3px rgba(230,126,34,.20);
}

/* Checkboxes */
input[type="checkbox"] {
  width: auto;
  margin-right: .3rem;
}

/* Submit Buttons */
input[type="submit"],
button[type="submit"],
.btn,
.button {
  appearance: none;
  border: 0;
  border-radius: 12px;
  padding: .6rem 1.2rem;
  font-weight: 700;
  cursor: pointer;
  background: var(--orange);
  color: #fff;
  margin-top: .8rem;
  font-size: 1rem;
  transition: filter .2s ease, transform .15s ease;
  font-family: inherit;
  display: inline-block;
}

input[type="submit"]:hover,
button[type="submit"]:hover,
.btn:hover,
.button:hover {
  filter: brightness(0.95);
  transform: translateY(-1px);
}

input[type="submit"]:active,
button[type="submit"]:active,
.btn:active,
.button:active {
  transform: translateY(0);
}

input[type="submit"]:disabled,
button[type="submit"]:disabled,
.btn:disabled,
.button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
/* =========================
   Form Spezifisch
   ========================= */

/* TYPO3 Form Styling - einheitliche Feldbreite */
.form-group,
.form-control,
form input[type="text"],
form input[type="email"],
form input[type="tel"],
form textarea {
  width: 100%;
  max-width: 800px; /* Maximale Breite festlegen */
  box-sizing: border-box;
}

/* Einheitliches Styling für alle Felder */
.form-control,
form input[type="text"],
form input[type="email"],
form input[type="tel"],
form textarea {
  padding: 12px 15px;
  border: 1px solid #ccc;
  border-radius: 8px;
  font-size: 16px;
  font-family: inherit;
  background-color: #fff;
  transition: border-color 0.3s ease;
}

.form-control:focus,
form input:focus,
form textarea:focus {
  outline: none;
  border-color: #666;
}

/* Textarea spezifisch */
textarea.form-control,
form textarea {
  min-height: 150px;
  resize: vertical;
}

/* Labels auch einheitlich positionieren */
form label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
}

/* Form-Group Container */
.form-group {
  margin-bottom: 20px;
}

/* Optional: Textarea fix height ohne Resize */
/* 
textarea.form-control {
  height: 150px;
  resize: none;
}
*/
/* =========================
   Index Search Spezifisch
   ========================= */
.tx-indexedsearch,
.tx-indexedsearch-searchbox {
  max-width: 760px;
}

/* =========================
   Frontend Login Spezifisch
   ========================= */
.tx-felogin-pi1,
.frame-type-felogin_login {
  max-width: 760px;
}

/* Beschreibungstext */
.tx-felogin-pi1 > p:first-of-type {
  margin-bottom: 1rem;
  color: #666;
}

/* Erstes Label ohne oberen Abstand */
.tx-felogin-pi1 fieldset label:first-of-type {
  margin-top: 0;
}

/* Login-Nachrichten */
.tx-felogin-pi1 .felogin-message,
.tx-felogin-pi1 .alert {
  padding: .8rem 1rem;
  border-radius: 12px;
  margin-bottom: 1rem;
}

.tx-felogin-pi1 .alert-success {
  background: rgba(40, 167, 69, 0.1);
  border: 1px solid rgba(40, 167, 69, 0.3);
  color: #155724;
}

.tx-felogin-pi1 .alert-danger,
.tx-felogin-pi1 .alert-error {
  background: rgba(220, 53, 69, 0.1);
  border: 1px solid rgba(220, 53, 69, 0.3);
  color: #721c24;
}

/* =========================
   BREADCRUMB
   ========================= */
.breadcrumb {
  font-size: .85rem;
  margin-bottom: 1.5rem;
}

.breadcrumb__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
}

.breadcrumb__item {
  display: inline-flex;
  align-items: center;
}

.breadcrumb__item + .breadcrumb__item::before {
  content: ">";
  margin: 0 .4rem;
  opacity: .6;
}

/* =========================
   FOOTER
   ========================= */
.site-footer {
  background: var(--dark);
  color: var(--light);
  text-align: center;
  padding: 1.5rem;
  font-size: .85rem;
  flex-shrink: 0;
}

.footer-icons {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
  margin-bottom: .75rem;
}

.footer-icons .icon {
  width: 18px;
  height: 18px;
  display: block;
  flex: 0 0 auto;
}

.footer-icons .icon-link {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  color: var(--icon-default);
  text-decoration: none;
  padding: .35rem .5rem;
  border-radius: 10px;
  transition: color .2s ease, background .2s ease;
}

.footer-icons .icon-link:hover {
  color: var(--icon-hover);
  background: rgba(255,255,255,.06);
}

.footer-icons .icon-link.is-active {
  color: var(--icon-active);
  font-weight: 500;
  background: rgba(230,126,34,.12);
}

/* =========================
   PAGE UP BUTTON
   ========================= */
#page-up {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background: rgba(31,31,31,.85);
  color: var(--orange);
  display: grid;
  place-items: center;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: opacity .25s ease, transform .25s ease, background .2s ease;
  z-index: 9999;
}

#page-up svg {
  width: 20px;
  height: 20px;
}

#page-up.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

#page-up:hover {
  background: rgba(230,126,34,.2);
}

@media (max-width: 900px) {
  #page-up {
    bottom: 1.75rem;
    right: 1rem;
  }
}