/* ========================================
   CUSTOM VARIABLES
   ======================================== */
:root {
  --forest: #2d423b;
  --sage: #7a948b;
  --light-sand: #ede3de;
  --warm-beige: #c6aa96;
  --dusty-rose: #b4cec1;
  --forest-light: #3d5750;
  --sage-light: #8ba49b;
  --sand-dark: #e5d6d0;
  --navbar-color: #e4d1d5;
  --navbar-text-color: var(--forest);
  --custom-primary: var(--forest);
  --custom-secondary: var(--sage);
  --custom-accent: var(--navbar-color);
  --custom-background: var(--light-sand);
  --custom-light: var(--warm-beige);
  --text-dark: var(--forest);
  --text-light: var(--light-sand);
  /* Display font for heroes */
  --font-display: "herculanum-lt-pro", sans-serif;

  /* Typography: Adobe Fonts (Futura PT) */
  --font-sans: "futura-pt", system-ui, -apple-system, "Segoe UI", Roboto,
    Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol",
    sans-serif;
  --font-sans-bold: "futura-pt-bold", var(--font-sans);
}

/* ========================================
   GLOBAL RESETS & BASE STYLES
   ======================================== */

html {
  scroll-behavior: auto;
}

body {
  background-color: var(--sage);
  color: var(--text-dark);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  letter-spacing: 0.2px;
}

/* ========================================
   ICONS - Font Awesome 6 safety shim
   Ensures icons render even if style classes are partially missing
   ======================================== */
i[class^="fa-"],
i[class*=" fa-"] {
  font-style: normal;
  line-height: 1;
}
i.fa-solid {
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
}
i.fa-regular {
  font-family: "Font Awesome 6 Free";
  font-weight: 400;
}
i.fa-brands {
  font-family: "Font Awesome 6 Brands";
  font-weight: 400;
}

/* ========================================
   TYPOGRAPHY
   ======================================== */
h1,
h2,
h3,
h4,
h5,
h6 {
  color: var(--text-dark);
  letter-spacing: 0.5px;
  margin-bottom: 1rem;
  font-family: var(--font-display);
  font-weight: 400;
}

h1 {
  font-size: 2.5rem;
}
h2 {
  font-size: 2rem;
}
h3 {
  font-size: 1.75rem;
}
h4 {
  font-size: 1.5rem;
}
h5,
h6 {
  font-size: 1.25rem;
}

/* ========================================
   TYPOGRAPHY UTILITIES (Futura PT)
   ======================================== */
.font-sans {
  font-family: var(--font-sans) !important;
}
.font-sans-bold {
  font-family: var(--font-sans-bold) !important;
}
.fw-400 {
  font-weight: 400 !important;
}
.fw-500 {
  font-weight: 500 !important;
}
.fw-600 {
  font-weight: 600 !important;
}
.fw-700 {
  font-weight: 700 !important;
}
.italic {
  font-style: italic !important;
}

/* ========================================
   LINKS - KEINE UNTERSTREICHUNGEN
   ======================================== */
a,
a:link,
a:visited,
a:hover,
a:active,
a:focus,
.nav-link,
.nav-link:hover,
.nav-link:focus,
.card a,
.card a:hover,
.card a:focus,
.offcanvas a,
.offcanvas a:hover,
.offcanvas a:focus,
footer a,
footer a:hover,
footer a:focus {
  text-decoration: none !important;
  text-decoration-line: none !important;
  text-decoration-style: none !important;
  -webkit-text-decoration: none !important;
  -moz-text-decoration: none !important;
}

a {
  color: var(--custom-accent);
  transition: all 0.3s ease;
}
a:hover {
  color: var(--custom-primary);
}

/* ========================================
   BUTTONS
   ======================================== */
.btn,
.btn:hover,
.btn:focus,
.btn:active {
  border-radius: 2rem;
  padding: 0.75rem 1.5rem;
  font-weight: 500;
  transition: all 0.3s ease;
  text-decoration: none !important;
  /* Global filled style: navbar color + dark text */
  background-color: var(--navbar-color) !important;
  border-color: var(--navbar-color) !important;
  color: var(--text-dark) !important;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(71, 45, 48, 0.15);
}

.btn-primary {
  background-color: var(--navbar-color) !important;
  border-color: var(--navbar-color) !important;
  color: var(--text-dark) !important;
}

.btn-outline-primary {
  color: var(--text-dark) !important;
  background-color: var(--navbar-color) !important;
  border-color: var(--navbar-color) !important;
}

.btn-outline-primary:hover {
  background-color: var(--navbar-color) !important;
  color: var(--text-dark) !important;
  border-color: var(--navbar-color) !important;
}

.btn-outline-light {
  color: var(--text-dark) !important;
  border-color: var(--navbar-color) !important;
  background-color: var(--navbar-color) !important;
}

.btn-outline-light:hover {
  background-color: var(--navbar-color) !important;
  color: var(--text-dark) !important;
  border-color: var(--navbar-color) !important;
}
/* Button icons should follow button text color for contrast */
.btn i,
.btn .fa,
.btn .fa-solid,
.btn .fas {
  color: inherit !important;
}

/* ========================================
   UTILITY CLASSES
   ======================================== */
.text-primary,
.text-custom-primary {
  color: var(--custom-primary) !important;
}
.text-custom-secondary {
  color: var(--custom-secondary) !important;
}
.text-custom-accent {
  color: var(--custom-accent) !important;
}
.bg-custom-primary {
  background-color: var(--custom-primary) !important;
}
.bg-custom-secondary {
  background-color: var(--custom-secondary) !important;
}
.hover-accent:hover {
  color: var(--custom-accent) !important;
  opacity: 1 !important;
}

hr.container {
  width: 100%;
  max-width: 1320px;
  margin-left: auto;
  margin-right: auto;
  border-color: var(--custom-primary);
  opacity: 0.15;
  border-width: 2px;
}

.rounded-circle {
  border: 4px solid var(--custom-light);
  box-shadow: 0 4px 8px rgba(71, 45, 48, 0.2);
}

/* ========================================
   HERO SECTIONS
   ======================================== */
.hero-section {
  position: relative;
  min-height: 40vh;
  display: flex;
  align-items: center;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  color: var(--text-light);
  padding: 4.5rem 0;
}

.hero-section::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(45, 66, 59, 0.7);
  z-index: 1;
}

.hero-section .container {
  position: relative;
  z-index: 2;
}

.hero-section h1 {
  color: var(--light-sand);
  font-family: var(--font-display);
  font-size: 3.25rem;
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: 0.5px;
  margin-bottom: 1.5rem;
}

.hero-section p {
  color: var(--warm-beige);
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 400;
  letter-spacing: 0.2px;
}

.hero-welcome {
  height: 100vh;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  background-image: url("../images/old/All06.jpg");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
  overflow: hidden;
}

.hero-welcome::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(45, 66, 59, 0.75);
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  color: var(--text-light);
  max-width: 900px;
  padding: 2rem;
  animation: fadeInUp 1.2s ease-out;
}

.hero-title {
  font-family: var(--font-display);
  font-size: 4rem;
  font-weight: 400;
  line-height: 1.2;
  margin-bottom: 1.5rem;
  color: var(--light-sand);
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.hero-logo {
  width: 250px;
  height: 250px;
  object-fit: contain;
  margin-right: 12px;
  flex-shrink: 0;
}

.hero-lead {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 400;
  margin-bottom: 2rem;
  color: var(--warm-beige);
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

.hero-overlay-text {
  background: var(--navbar-color);
  border-radius: 1rem;
  padding: 1.5rem 2rem;
  font-size: 1.1rem;
  color: var(--forest);
  box-shadow: 0 8px 32px rgba(45, 66, 59, 0.3);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(237, 227, 222, 0.2);
  max-width: 600px;
  margin: 0 auto;
}

.scroll-indicator {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  text-align: center;
  color: var(--light-sand);
  animation: bounce 2s infinite;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  user-select: none;
  padding: 1rem;
  border-radius: 2rem;
  backdrop-filter: blur(10px);
  background: rgba(45, 66, 59, 0.1);
  border: 1px solid rgba(237, 227, 222, 0.2);
}

.scroll-indicator:hover {
  transform: translateX(-50%) translateY(-8px);
  color: var(--warm-beige);
  background: rgba(45, 66, 59, 0.2);
  box-shadow: 0 8px 32px rgba(45, 66, 59, 0.3);
  animation-play-state: paused;
}

.scroll-indicator:active {
  transform: translateX(-50%) translateY(-2px) scale(0.95);
  transition: all 0.15s ease;
}

.scroll-indicator span {
  display: block;
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.scroll-indicator i {
  font-size: 1.5rem;
}

/* ========================================
   NAVBAR
   ======================================== */
.navbar-dark {
  background-color: var(--navbar-color);
  box-shadow: 0 2px 4px rgba(45, 66, 59, 0.15);
}

.navbar-dark .navbar-brand {
  color: var(--navbar-text-color);
  font-weight: 600;
}

.navbar-dark .navbar-brand:hover {
  color: var(--forest-light);
}

.navbar-dark .navbar-nav .nav-link {
  color: var(--navbar-text-color);
  padding: 0.5rem 1rem;
  transition: all 0.3s ease;
  font-weight: 500;
}

.navbar-dark .navbar-nav .nav-link:hover,
.navbar-dark .navbar-nav .nav-link:focus {
  color: var(--forest-light);
  transform: translateY(-2px);
}

.navbar-dark .navbar-nav .active > .nav-link {
  color: var(--forest);
  position: relative;
}

.navbar-dark .navbar-nav .active > .nav-link::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 1rem;
  right: 1rem;
  height: 2px;
  background-color: var(--forest);
  border-radius: 1px;
}

.navbar-dark .dropdown-menu {
  background-color: var(--navbar-color);
  border: none;
  box-shadow: 0 4px 8px rgba(45, 66, 59, 0.2);
}

.navbar-dark .dropdown-item {
  color: var(--navbar-text-color);
  transition: all 0.2s ease;
}

.navbar-dark .dropdown-item:hover,
.navbar-dark .dropdown-item:focus {
  background-color: rgba(45, 66, 59, 0.1);
  color: var(--forest);
}

/* Make dropdown active/selected states use navbar color (avoid native blue on mobile)
   Keep dark readable text */
.navbar-dark .dropdown-item:active,
.navbar-dark .dropdown-item.active,
.navbar-dark .dropdown-item:focus-visible,
.navbar-dark .dropdown-item:focus {
  background-color: var(--navbar-color) !important;
  color: var(--text-dark) !important;
  box-shadow: none !important;
  outline: none !important;
  -webkit-tap-highlight-color: transparent;
}

/* Remove iOS/Android tap highlight for dropdown items */
.navbar-dark .dropdown-menu .dropdown-item {
  -webkit-tap-highlight-color: transparent;
}

/* ========================================
   CONTENT GRID (Text-Image Sections)
   ======================================== */
.content-grid {
  margin: 4rem 0;
}

.content-grid h2 {
  font-size: 1.75rem;
  margin-bottom: 1.25rem;
}

.content-grid .image-container {
  position: relative;
  overflow: hidden;
  border-radius: 1rem;
  height: 400px;
  width: 100%;
  margin: 0;
  box-shadow: 0 4px 12px rgba(71, 45, 48, 0.15);
  transition: transform 0.3s ease;
}

.content-grid .image-container:hover {
  transform: translateY(-5px);
}

.content-grid .image-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.content-grid .text-container {
  padding: 2.5rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background-color: var(--custom-primary);
  color: var(--text-light);
  border-radius: 1rem;
  margin: 1rem 0;
  box-shadow: 0 4px 12px rgba(71, 45, 48, 0.2);
}

.content-grid .text-container h2,
.content-grid .text-container h3 {
  color: var(--text-light);
}

.content-grid .text-container .btn-outline-light {
  align-self: flex-start;
  margin-top: 1rem;
}

/* ========================================
   IMAGE GALLERY
   ======================================== */
.image-gallery {
  background-color: var(--sage);
  padding: 4rem 0;
  min-height: 50vh;
  position: relative;
}

.image-gallery::before {
  content: "";
  position: absolute;
  top: -50px;
  left: 0;
  right: 0;
  height: 50px;
  background: linear-gradient(to bottom, transparent, var(--sage));
  z-index: 1;
}

.image-gallery .container {
  position: relative;
  z-index: 2;
}

/* CSS Grid Layout - Kugelsicher mit festen Höhen */
.gallery-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  grid-template-rows: 300px 300px;
  gap: 1rem;
  width: 100%;
}

.gallery-main {
  grid-column: 1 / 2;
  grid-row: 1 / 3;
}

.gallery-top {
  grid-column: 2 / 3;
  grid-row: 1 / 2;
}

.gallery-bottom {
  grid-column: 2 / 3;
  grid-row: 2 / 3;
}

/* Gallery Items mit Hover-Effekten */
.gallery-item-link {
  display: block;
  text-decoration: none !important;
  color: inherit;
  width: 100%;
  height: 100%;
}

.gallery-item {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  border-radius: 1rem;
  box-shadow: 0 4px 12px rgba(45, 66, 59, 0.15);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  border: 2px solid transparent;
}

.gallery-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.gallery-item:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 24px rgba(45, 66, 59, 0.25);
  border-color: var(--custom-accent);
}

.gallery-item:hover .gallery-img {
  transform: scale(1.08);
}

.gallery-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    to bottom,
    rgba(45, 66, 59, 0) 0%,
    rgba(45, 66, 59, 0.7) 60%,
    rgba(45, 66, 59, 0.9) 100%
  );
  display: flex;
  align-items: flex-end;
  padding: 2rem;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.gallery-item:hover .gallery-overlay {
  opacity: 1;
}

.gallery-text {
  color: var(--text-light);
  transform: translateY(20px);
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.gallery-item:hover .gallery-text {
  transform: translateY(0);
}

.gallery-text h3,
.gallery-text h4 {
  color: var(--light-sand);
  margin-bottom: 0.5rem;
  font-weight: 400;
}

.gallery-text h3 {
  font-size: 1.75rem;
}

.gallery-text h4 {
  font-size: 1.25rem;
}

.gallery-text p {
  color: var(--warm-beige);
  margin-bottom: 0.75rem;
  font-size: 0.95rem;
}

.gallery-link-indicator {
  display: inline-block;
  color: var(--dusty-rose);
  font-weight: 500;
  font-size: 0.9rem;
  transition: transform 0.3s ease;
}

.gallery-item:hover .gallery-link-indicator {
  transform: translateX(5px);
}

/* Fade-in Animation für Text */
.fade-in-text {
  animation: fadeInUp 1s ease-out 0.3s both;
}

/* ========================================
   CARDS (Allgemein)
   ======================================== */
.card {
  background-color: var(--custom-primary);
  color: var(--text-light);
  border: none;
  border-radius: 1rem;
  box-shadow: 0 4px 12px rgba(71, 45, 48, 0.2);
  transition: all 0.3s ease;
  min-height: 200px;
  display: flex;
  flex-direction: column;
}

.card:hover {
  transform: translateY(-5px);
}

.card .card-title {
  margin-bottom: 0;
  color: var(--text-light);
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 1.25rem;
}

.card .card-text {
  margin-top: 1rem;
  color: var(--custom-light);
  line-height: 1.6;
}

.card .text-muted {
  color: rgba(237, 227, 222, 0.75) !important;
  font-size: 0.9rem;
}

.card .d-flex {
  align-items: center;
  margin-bottom: 1.5rem;
}

.card .fa-2x,
.card i.fas,
.card i.fa,
.card i.fa-solid {
  color: var(--custom-accent) !important;
  transition: transform 0.3s ease;
  font-size: 1.75rem;
  width: 2.5rem;
}

.card:hover .fa-2x,
.card:hover i.fas,
.card:hover i.fa,
.card:hover i.fa-solid {
  color: var(--custom-light) !important;
  transform: scale(1.1);
}

.card .d-flex.align-items-center i.fa-2x {
  flex-shrink: 0;
  min-width: 40px;
}

.card .btn,
.card .btn-outline-primary,
.card .btn-outline-light {
  color: var(--text-dark) !important;
  border-color: var(--navbar-color) !important;
  background-color: var(--navbar-color) !important;
  transition: all 0.3s ease;
}

.card .btn:hover,
.card .btn-outline-primary:hover,
.card .btn-outline-light:hover {
  background-color: var(--navbar-color) !important;
  color: var(--text-dark) !important;
  border-color: var(--navbar-color) !important;
}

/* Ensure icons inside card buttons keep readable dark color */
.card .btn i,
.card .btn .fa,
.card .btn .fa-solid,
.card .btn .fas {
  color: var(--text-dark) !important;
}

/* ========================================
   OVERVIEW CARDS (Forest Theme)
   ======================================== */
.overview-card {
  background-color: var(--forest) !important;
  border: none !important;
  color: var(--text-light) !important;
}

.overview-card .card-body {
  display: flex;
  flex-direction: column;
}

.overview-card .card-title {
  color: var(--text-light) !important;
  font-weight: 400;
}

.overview-card .card-text {
  color: var(--custom-light) !important;
  margin-bottom: 1.5rem;
}

.overview-card i {
  color: var(--custom-accent) !important;
}

.overview-card:hover {
  background-color: var(--forest-light) !important;
  transform: translateY(-5px);
  box-shadow: 0 8px 24px rgba(45, 66, 59, 0.25);
}

.overview-card .btn-outline-light {
  margin-top: auto;
  align-self: flex-start;
  color: var(--text-dark) !important;
  background-color: var(--navbar-color) !important;
  border-color: var(--navbar-color) !important;
}

.overview-card .btn-outline-light:hover {
  background-color: var(--light-sand) !important;
  color: var(--text-dark) !important;
  border-color: var(--light-sand) !important;
}

/* ========================================
   GENERIC SECTION HELPER
   ======================================== */
.section {
  padding: 4rem 0;
}

/* ========================================
   CONTACT PAGE
   ======================================== */
.contact-section .contact-form-wrapper,
.contact-section .contact-info-wrapper {
  background: var(--custom-primary);
  border-radius: 1rem;
  padding: 1.5rem 1.75rem;
  box-shadow: 0 4px 12px rgba(45, 66, 59, 0.15);
  border: 1px solid rgba(45, 66, 59, 0.08);
  color: var(--text-light);
}

.contact-section h2 {
  font-weight: 400;
  color: var(--text-light);
}

/* Form controls - subtle theming */
.contact-section .form-label {
  font-weight: 600;
  color: var(--light-sand);
}

.contact-section .form-control,
.contact-section .form-select {
  border-radius: 0.75rem;
  border-color: rgba(45, 66, 59, 0.2);
}

.contact-section .form-control:focus,
.contact-section .form-select:focus {
  border-color: var(--forest-light);
  box-shadow: 0 0 0 0.2rem rgba(45, 66, 59, 0.15);
}

/* Info items with icons */
.contact-info-item {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  padding: 0.75rem 0;
  border-bottom: 1px solid rgba(45, 66, 59, 0.08);
}

.contact-info-item:last-of-type {
  border-bottom: 0;
}

.contact-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--custom-accent);
  color: var(--forest) !important;
  box-shadow: 0 2px 6px rgba(45, 66, 59, 0.2);
  flex-shrink: 0;
}

.contact-icon i {
  font-size: 1rem;
}

.contact-details h4 {
  margin: 0 0 0.25rem 0;
  font-size: 1.05rem;
  color: var(--custom-accent);
}

.contact-details p,
.contact-details a {
  margin: 0;
  color: var(--custom-light);
}

.location-image img {
  height: 30vh;
  border-radius: 1rem;
  box-shadow: 0 4px 12px rgba(45, 66, 59, 0.15);
}

@media (max-width: 768px) {
  .section {
    padding: 2.5rem 0;
  }

  .contact-section .contact-form-wrapper,
  .contact-section .contact-info-wrapper {
    padding: 1rem 1.25rem;
  }

  .contact-icon {
    width: 40px;
    height: 40px;
  }
}

/* page-ueber-uns override removed: buttons are styled globally */

/* ========================================
   TEAM SECTION - Profile Cards
   ======================================== */
#team .team-group {
  margin-bottom: 4rem;
}

/* Intro paragraph under Teams heading */
#team .team-intro {
  max-width: 980px;
  margin: 0 auto 2rem;
  padding: 1rem 1.25rem;
  text-align: center;
  line-height: 1.75;
  letter-spacing: 0.2px;
  color: var(--text-dark);
  background: rgba(180, 206, 193, 0.16); /* soft sage tint */
  border: 1px solid rgba(45, 66, 59, 0.08);
  border-left: 4px solid var(--custom-accent);
  border-radius: 0.75rem;
  box-shadow: 0 4px 12px rgba(45, 66, 59, 0.12);
}

@media (max-width: 768px) {
  #team .team-intro {
    padding: 0.75rem 1rem;
    margin-bottom: 1.5rem;
  }
}

#team .team-group:last-child {
  margin-bottom: 0;
}

#team .text-custom-accent {
  color: var(--custom-accent) !important;
  font-weight: 500;
}

#team .card {
  text-align: center;
  min-height: 450px;
}

#team .card-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 2rem;
}

#team .card-text {
  flex: 1;
  margin-bottom: 1.5rem;
  margin-top: 0.5rem;
}

#team .btn-outline-light {
  margin-top: auto;
  align-self: center;
}

.profile-img {
  width: 120px;
  height: 120px;
  object-fit: cover;
  margin: 0 auto 1.5rem;
  display: block;
}

#team .profile-header {
  margin-bottom: 1.5rem;
}

#team .profile-header h4,
#team .profile-header h5 {
  color: var(--light-sand);
  font-weight: 400;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
  margin-bottom: 0.5rem;
}

#team .profile-header h4 {
  font-size: 1.5rem;
}

#team .profile-header h5 {
  font-size: 1.1rem;
}

#team .profile-header .text-muted {
  margin-top: 0.75rem;
}

.profile-detail {
  background-color: rgba(45, 66, 59, 0.4);
  border-radius: 0.75rem;
  margin-top: 1rem;
  border: 1px solid rgba(180, 206, 193, 0.3);
  box-shadow: 0 2px 8px rgba(45, 66, 59, 0.1);
  color: var(--text-light);
}

.profile-section {
  border-left: 3px solid var(--custom-accent);
  padding-left: 1rem;
  margin-bottom: 1.25rem;
}

.profile-section:last-child {
  margin-bottom: 0;
}

.profile-section h6 {
  color: var(--custom-accent);
  font-weight: 400;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.profile-section p,
.profile-section li {
  color: var(--custom-light);
}

.profile-section ul {
  margin-bottom: 0;
  padding-left: 1.25rem;
}

.profile-section li {
  margin-bottom: 0.25rem;
}

/* ========================================
   OFFCANVAS - Steckbriefe
   ======================================== */
.offcanvas {
  background-color: var(--custom-primary);
  color: var(--text-light);
}

.offcanvas-header {
  border-bottom: 1px solid rgba(180, 206, 193, 0.3);
  flex-direction: column;
  align-items: center;
  text-align: center;
  position: relative;
  padding-top: 2rem;
}

.offcanvas-title {
  color: var(--text-light);
  font-size: 1.75rem;
  font-weight: 600;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
  width: 100%;
}

.offcanvas .btn-close {
  filter: invert(1);
  opacity: 0.8;
  position: absolute;
  top: 1rem;
  right: 1rem;
}

.offcanvas-body {
  color: var(--custom-light);
}

.offcanvas h4,
.offcanvas h5,
.offcanvas h6 {
  color: var(--light-sand);
  font-weight: 400;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.offcanvas .text-muted {
  color: rgba(237, 227, 222, 0.85) !important;
  font-size: 1.05rem;
}

.offcanvas .profile-img {
  width: 150px;
  height: 150px;
  margin: 1rem auto 1rem;
  display: block;
}

.offcanvas .text-center {
  margin-bottom: 2rem;
  text-align: center;
}

.offcanvas .profile-header {
  text-align: center;
}

.offcanvas .profile-header h4,
.offcanvas .profile-header h5,
.offcanvas .profile-header .text-muted {
  text-align: center;
}

.fun-fact {
  background-color: rgba(180, 206, 193, 0.1);
  border-radius: 0.5rem;
  padding: 0.75rem;
  border-left: 3px solid var(--dusty-rose);
}

/* ========================================
   FOOTER
   ======================================== */
footer {
  background-color: var(--custom-primary);
  color: var(--text-light);
  box-shadow: 0 -4px 6px rgba(71, 45, 48, 0.1);
}

footer h5 {
  color: var(--navbar-color);
  font-weight: 600;
  margin-bottom: 1.25rem;
  line-height: 1.25;
}

/* Footer brand row: allow logo to size naturally and align consistently */
footer .d-flex.align-items-center {
  height: auto;
  min-height: 50px;
  margin-bottom: 1.25rem !important;
  align-items: center;
  gap: 12px;
}

/* Ensure footer columns align content from the top and space uniformly */
footer .row > [class*="col-"] {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

/* Normalize logo sizing and prevent overflow/clipping */
.footer-logo {
  width: 50px;
  height: 50px;
  object-fit: contain;
  margin-right: 12px;
  flex-shrink: 0;
}

footer p,
footer ul li {
  color: var(--text-light);
  opacity: 0.9;
}

footer a {
  color: var(--text-light);
  opacity: 0.9;
}

footer a:hover {
  color: var(--navbar-color);
  opacity: 1;
}

footer hr {
  border-color: var(--text-light);
  opacity: 0.2;
}

.footer-logo {
  width: 160px;
  height: 160px;
  object-fit: contain;
  margin-right: 12px;
}

.footer-credits a {
  color: var(--custom-accent);
  font-weight: 500;
}

.footer-credits a:hover {
  color: var(--custom-light);
}

/* ========================================
   ANIMATIONS
   ======================================== */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes bounce {
  0%,
  20%,
  50%,
  80%,
  100% {
    transform: translateX(-50%) translateY(0);
  }
  40% {
    transform: translateX(-50%) translateY(-12px);
  }
  60% {
    transform: translateX(-50%) translateY(-6px);
  }
}

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */
@media (max-width: 768px) {
  .hero-section {
    min-height: 38vh;
    padding: 3rem 0;
  }
  .hero-section h1 {
    font-size: 2rem;
  }
  .hero-section p {
    font-size: 1rem;
  }
  .hero-title {
    font-size: 2.5rem;
  }

  .hero-lead {
    font-size: 1.2rem;
  }

  .hero-overlay-text {
    font-size: 1rem;
    padding: 1rem 1.5rem;
  }

  .hero-content {
    padding: 1rem;
  }

  .hero-welcome {
    background-attachment: scroll;
  }

  .content-grid .image-container {
    height: 240px; /* overrides desktop fixed height */
    min-height: 200px;
    margin: 1rem 0;
  }

  .content-grid .text-container {
    padding: 1rem;
  }

  /* Gallery Mobile: Stapeln untereinander */
  .gallery-grid {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto;
    aspect-ratio: auto;
    height: auto;
    max-height: none;
    gap: 1.75rem; /* slightly larger gap for breathing room */
    padding: 0.5rem 0; /* small vertical padding inside the grid */
  }

  .gallery-main {
    grid-column: 1 / 2;
    grid-row: 1 / 2;
    aspect-ratio: 4 / 3;
    min-height: 300px;
  }

  .gallery-top {
    grid-column: 1 / 2;
    grid-row: 2 / 3;
    aspect-ratio: 4 / 3;
    min-height: 250px;
  }

  .gallery-bottom {
    grid-column: 1 / 2;
    grid-row: 3 / 4;
    aspect-ratio: 4 / 3;
    min-height: 250px;
  }

  /* Gallery Mobile Optimierung */
  .gallery-text h3 {
    font-size: 1.5rem;
  }

  .gallery-text h4 {
    font-size: 1.1rem;
  }

  .gallery-text p {
    font-size: 0.85rem;
  }

  .gallery-overlay {
    padding: 1.5rem 1.5rem 2rem 1.5rem; /* extra bottom padding for CTA buttons */
  }

  /* The surrounding gallery section needs slightly more vertical padding on mobile */
  .image-gallery {
    padding-top: 3rem;
    padding-bottom: 3rem;
  }

  /* Touch-Geräte: Overlay immer leicht sichtbar */
  @media (hover: none) {
    /* Make overlays readable on touch devices: fully visible + stronger gradient */
    .gallery-overlay {
      opacity: 1 !important;
      background: linear-gradient(
        to bottom,
        rgba(45, 66, 59, 0) 0%,
        rgba(45, 66, 59, 0.6) 40%,
        rgba(45, 66, 59, 0.85) 100%
      );
      padding: 1.5rem 1.5rem 2.5rem 1.5rem !important; /* more bottom space for touch targets */
    }

    /* Make the overlay text clearer: larger, bolder, and with background CTA */
    .gallery-text h3,
    .gallery-text h4 {
      color: var(--light-sand);
      text-shadow: none;
      font-weight: 700;
    }

    .gallery-text p {
      color: var(--warm-beige);
      opacity: 0.95;
    }

    .gallery-link-indicator {
      display: inline-block;
      background: rgba(236, 225, 222, 0.9);
      color: var(--forest);
      padding: 0.4rem 0.6rem;
      border-radius: 0.5rem;
      margin-top: 0.5rem;
      font-weight: 600;
    }
  }
}

/* Medium Tablets - Grid bleibt, aber kleinere Höhe */
@media (max-width: 991px) and (min-width: 769px) {
  .gallery-grid {
    max-height: 550px;
  }
}

/* Tablet (portrait & landscape) improvements: make gallery more readable
   on iPads by stacking the large image on top and two smaller images below */
@media (min-width: 768px) and (max-width: 1199px) {
  .gallery-grid {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto auto;
    gap: 1.5rem;
    align-items: start;
  }

  /* large image becomes full-width on top */
  .gallery-main {
    grid-column: 1 / -1;
    grid-row: 1 / 2;
    height: auto;
    min-height: 360px;
  }

  .gallery-top {
    grid-column: 1 / 2;
    grid-row: 2 / 3;
    min-height: 220px;
  }

  .gallery-bottom {
    grid-column: 2 / 3;
    grid-row: 2 / 3;
    min-height: 220px;
  }

  .gallery-item .gallery-img {
    object-position: center top;
  }

  /* Give overlays more breathing room on tablet */
  .gallery-overlay {
    padding: 2rem !important;
  }

  .gallery-link-indicator {
    margin-top: 0.6rem;
    margin-bottom: 0.25rem;
  }
}

@media (max-width: 480px) {
  .content-grid .image-container {
    height: 200px;
  }
  .hero-section {
    min-height: 34vh;
    padding: 2.25rem 0;
  }
  .hero-section h1 {
    font-size: 1.75rem;
  }
  .hero-section p {
    font-size: 0.95rem;
  }
  .hero-title {
    font-size: 2rem;
  }
  .hero-lead {
    font-size: 1.1rem;
  }

  .gallery-main {
    min-height: 250px;
  }

  .gallery-top,
  .gallery-bottom {
    min-height: 200px;
  }

  .gallery-text h3 {
    font-size: 1.25rem;
  }

  .gallery-text h4 {
    font-size: 1rem;
  }

  .gallery-overlay {
    padding: 1rem 1rem 1.75rem 1rem; /* extra bottom padding on smallest screens */
  }
}

/* Larger screens: make heroes feel more immersive */
@media (min-width: 992px) {
  .hero-section {
    min-height: 60vh;
    padding: 6rem 0;
  }
}

/* Larger type on wide screens (Futura PT reads small) */
@media (min-width: 1200px) {
  body {
    font-size: 17px;
  }
  h1 {
    font-size: 2.75rem;
  }
  h2 {
    font-size: 2.15rem;
  }
  h3 {
    font-size: 1.9rem;
  }
  .hero-section h1 {
    font-size: 3.5rem;
  }
  .hero-section p {
    font-size: 1.5rem;
  }
  .hero-title {
    font-size: 4.25rem;
  }
  .hero-lead {
    font-size: 1.75rem;
  }
}

@media (min-width: 1400px) {
  body {
    font-size: 18px;
  }
  h1 {
    font-size: 3rem;
  }
  h2 {
    font-size: 2.25rem;
  }
  h3 {
    font-size: 2rem;
  }
  .hero-section h1 {
    font-size: 3.75rem;
  }
  .hero-section p {
    font-size: 1.6rem;
  }
  .hero-title {
    font-size: 4.5rem;
  }
  .hero-lead {
    font-size: 1.85rem;
  }
}

/* Offcanvas responsive typography and layout */
.offcanvas {
  /* sensible width defaults with viewport awareness */
  width: min(92vw, 440px);
}

@media (max-width: 576px) {
  .offcanvas {
    width: 100vw;
  }
  .offcanvas-header {
    padding-top: 1.5rem;
  }
  .offcanvas-body {
    padding: 1rem 1.25rem;
  }
}

@media (min-width: 768px) {
  .offcanvas {
    width: min(86vw, 480px);
  }
}

@media (min-width: 992px) {
  .offcanvas {
    width: min(40vw, 520px);
  }
}

/* Offcanvas type scale: h4 > p > small with breakpoints */
.offcanvas h4 {
  font-size: 1.5rem;
}
.offcanvas p {
  font-size: 1rem;
}
.offcanvas small,
.offcanvas .small {
  font-size: 0.9rem;
}

@media (max-width: 576px) {
  .offcanvas h4 {
    font-size: 1.25rem;
  }
  .offcanvas p {
    font-size: 0.95rem;
  }
  .offcanvas small,
  .offcanvas .small {
    font-size: 0.85rem;
  }
}

@media (min-width: 768px) {
  .offcanvas h4 {
    font-size: 1.6rem;
  }
  .offcanvas p {
    font-size: 1.05rem;
  }
  .offcanvas small,
  .offcanvas .small {
    font-size: 0.95rem;
  }
}

@media (min-width: 1200px) {
  .offcanvas h4 {
    font-size: 1.75rem;
  }
  .offcanvas p {
    font-size: 1.1rem;
  }
  .offcanvas small,
  .offcanvas .small {
    font-size: 1rem;
  }
}

/* Contact form mobile UX and touch targets */
@media (max-width: 576px) {
  .form-control {
    font-size: 16px; /* prevent iOS zoom */
    padding: 0.75rem 1rem;
  }
  textarea.form-control {
    min-height: 140px;
  }
  .btn {
    min-height: 44px;
    width: 100%;
  }
}

/* General touch-targets */
.btn {
  min-height: 44px;
}
.navbar-nav .nav-link {
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
}

/* Accessible focus styles */
.btn:focus-visible,
.navbar-nav .nav-link:focus-visible,
.form-control:focus-visible,
a:focus-visible {
  outline: 2px solid var(--forest-light);
  outline-offset: 2px;
}

/* Cards on mobile: tighten spacing and icon size */
@media (max-width: 768px) {
  .card .fa-2x {
    font-size: 1.5rem;
    width: 2rem;
  }
  .card .d-flex {
    margin-bottom: 1rem;
  }
  #team .card {
    min-height: auto;
  }
}
