/* === PAGES.CSS — Seiten-spezifische Stile === */

/* ── HOMEPAGE HERO ── */
.hero {
  position: relative;
  min-height: 280px;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
}

.hero__image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.hero__overlay {
  position: relative;
  z-index: 1;
  background: linear-gradient(to top, rgba(89, 145, 34, 0.85) 0%, rgba(89, 145, 34, 0.4) 100%);
  width: 100%;
  padding: 2rem;
}

.hero__title {
  color: #fff;
  font-size: clamp(1.4rem, 4vw, 2.2rem);
  margin-bottom: 0.4rem;
  text-shadow: 1px 2px 4px rgba(0, 0, 0, 0.3);
}

.hero__subtitle {
  color: #e8f5d0;
  font-size: clamp(0.9rem, 2vw, 1.05rem);
  margin-bottom: 1.25rem;
  max-width: 520px;
}

.hero__cta {
  display: inline-block;
  background: var(--color-accent);
  color: #fff;
  padding: 0.6rem 1.4rem;
  border-radius: var(--radius-card);
  font-weight: bold;
  font-size: 0.95rem;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
  transition: background 0.2s;
}

.hero__cta:hover {
  background: var(--color-primary);
  text-decoration: none;
  color: #fff;
}

/* ── HOMEPAGE SERVICE CARDS ── */
.service-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-top: 1.5rem;
}

.service-card {
  background: var(--color-bg);
  border-radius: var(--radius-card);
  padding: 1rem;
  border-top: 3px solid var(--color-accent);
}

.service-card h3 {
  margin-bottom: 0.4rem;
}

.service-card p {
  font-size: 0.875rem;
  color: var(--color-text-light);
  margin-bottom: 0.5rem;
}

.service-card a {
  font-size: 0.85rem;
  font-weight: bold;
}

@media (max-width: 640px) {
  .service-cards {
    grid-template-columns: 1fr;
  }
}

/* ── CONTENT PAGE mit Bild (floated) ── */
.content-img-right {
  float: right;
  margin: 0 0 1rem 1.5rem;
  border-radius: var(--radius-card);
}

/* ── REFERENZEN KARTEN ── */
.reference-card {
  background: var(--color-bg);
  border-left: 4px solid var(--color-accent);
  border-radius: 0 var(--radius-card) var(--radius-card) 0;
  padding: 1rem 1.25rem;
  margin-bottom: 1rem;
}

.reference-card h3 {
  font-size: 0.95rem;
  margin-bottom: 0.25rem;
}

.reference-card p {
  font-size: 0.875rem;
  color: var(--color-text-light);
  margin-bottom: 0.25rem;
}

.reference-card .reference-year {
  font-size: 0.8rem;
  color: var(--color-primary);
  font-weight: bold;
}

.reference-note {
  margin-top: 1.5rem;
  padding: 0.75rem 1rem;
  background: var(--color-bg);
  border-radius: var(--radius-card);
  font-size: 0.9rem;
}

/* ── KONTAKT LAYOUT ── */
.kontakt-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin-top: 1rem;
}

.kontakt-grid h3 {
  margin-bottom: 0.5rem;
}

.kontakt-grid address {
  font-style: normal;
  line-height: 1.8;
}

.kontakt-grid address a {
  font-weight: bold;
}

.kontakt-meta dt {
  font-weight: bold;
  color: var(--color-text-light);
  font-size: 0.8rem;
  margin-top: 0.5rem;
}

.kontakt-meta dd {
  font-size: 0.9rem;
}

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

/* ── RECHTSSEITEN (Impressum / Datenschutz) ── */
.legal-text {
  max-width: 720px;
}

.legal-text h2 {
  margin-top: 1.5rem;
  font-size: 1.1rem;
}

.legal-text h3,
.legal-text h4 {
  margin-top: 1.2rem;
  font-size: 1rem;
}

.legal-text p,
.legal-text li {
  font-size: 0.9rem;
  line-height: 1.7;
}

.legal-text ul {
  margin-bottom: 0.75rem;
}

.legal-text a {
  word-break: break-all;
}

/* ── ÜBER UNS – PAGE HEADER BANNER ── */
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background:
    linear-gradient(rgba(89, 145, 34, 0.78), rgba(89, 145, 34, 0.78)),
    url('/assets/images/bg/hero.svg') center / cover no-repeat;
  color: #fff;
  padding: 2rem;
}

.page-header__text h1 {
  margin: 0 0 0.25rem;
  font-size: 2rem;
  color: #fff;
}

.page-header__tagline {
  margin: 0;
  font-size: 1rem;
  opacity: 0.85;
}

.page-header__logo {
  flex-shrink: 0;
  margin-left: 1.5rem;
}

/* ── ÜBER UNS – STATS BAR ── */
.stats-bar {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  background: var(--color-accent);
}

.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1.25rem 1rem;
  border-right: 1px solid rgba(255, 255, 255, 0.4);
}

.stat-item:last-child {
  border-right: none;
}

.stat-item__value {
  font-size: 2rem;
  font-weight: 700;
  color: var(--color-primary);
  line-height: 1;
}

.stat-item__label {
  font-size: 0.85rem;
  color: #333;
  margin-top: 0.25rem;
  text-align: center;
}

/* ── ÜBER UNS – INTRO TEXT ── */
.page-intro {
  border-bottom: 1px solid var(--color-border);
}

.page-intro__toggle {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  cursor: pointer;
  user-select: none;
  font-weight: bold;
  color: var(--color-primary);
}

.page-intro__toggle:hover {
  background: var(--color-bg);
}

.page-intro__content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease;
  padding: 0 2rem;
}

.page-intro.is-open .page-intro__content {
  max-height: 400px;
  padding: 0 2rem 1.25rem;
}

.page-intro.is-open .competency-card__icon {
  transform: rotate(45deg);
}

.page-intro p {
  margin: 0 0 0.75rem;
}

.page-intro p:last-child {
  margin-bottom: 0;
}

/* ── ÜBER UNS – COMPETENCY SECTION ── */
.competency-section {
  padding: 1.5rem 2rem;
  position: relative;
}

/* ── ÜBER UNS – COMPETENCY CARDS ── */
.competency-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-top: 1rem;
}

.competency-card {
  background: var(--color-bg);
  border-radius: var(--radius-card);
  padding: 1.25rem;
  min-height: 95px;
  border-top: 3px solid var(--color-accent);
  cursor: pointer;
  user-select: none;
  transition: background 0.2s;
}

.competency-card:hover {
  background: #d4e0c4;
}

.competency-card h3 {
  font-size: 0.95rem;
  color: var(--color-primary);
  margin: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
}

.competency-card__icon {
  font-size: 1.1rem;
  font-weight: bold;
  color: var(--color-accent);
  flex-shrink: 0;
}

.competency-card p {
  display: none;
}

/* ── KOMPETENZ MODAL (große Kachel) ── */
.competency-wrap {
  position: relative;
  margin-top: 1rem;
}

.competency-section.modal-open .competency-cards {
  visibility: hidden;
}

.competency-modal {
  display: none;
  position: absolute;
  inset: 0;
  background: var(--color-bg);
  border-radius: var(--radius-card);
  border-top: 3px solid var(--color-accent);
  padding: 2.5rem 3rem;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
  animation: fadeIn 0.2s ease;
}

.competency-modal.is-open {
  display: block;
}

.competency-modal__close {
  position: absolute;
  top: 0.75rem;
  right: 1rem;
  background: none;
  border: none;
  font-size: 1.75rem;
  line-height: 1;
  cursor: pointer;
  color: var(--color-primary);
  font-weight: bold;
  padding: 0;
}

.competency-modal__close:hover {
  color: var(--color-accent);
}

.competency-modal__title {
  font-size: 1.3rem;
  color: var(--color-primary);
  margin: 0 0 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--color-accent);
  padding-right: 2rem;
}

.competency-modal__text {
  font-size: 0.95rem;
  line-height: 1.75;
  color: var(--color-text);
  margin: 0;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@media (max-width: 640px) {
  .page-header {
    flex-direction: column;
    text-align: center;
  }
  .page-header__logo {
    margin: 1rem 0 0;
  }
  .stats-bar {
    grid-template-columns: 1fr;
  }
  .stat-item {
    border-right: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.4);
  }
  .stat-item:last-child {
    border-bottom: none;
  }
  .competency-cards {
    grid-template-columns: 1fr;
  }
}

/* ── 404 PAGE ── */
.error-page {
  text-align: center;
  padding: 3rem 2rem;
}

.error-page h1 {
  font-size: 3rem;
  color: var(--color-primary);
  margin-bottom: 0.5rem;
}

.error-page p {
  margin-bottom: 1.5rem;
  color: var(--color-text-light);
}
