/* ===================================
   Reset & Base Styles
   =================================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary-color: #2c5f7d;
  --secondary-color: #7ba6a9;
  --accent-color: #d4a373;
  --text-color: #333333;
  --text-light: #666666;
  --bg-light: #f8f9fa;
  --bg-white: #ffffff;
  --border-color: #e0e0e0;
  --shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  --shadow-hover: 0 5px 20px rgba(0, 0, 0, 0.15);
  --transition: all 0.3s ease;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  scroll-padding-top: 120px;
}

h1 {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  font-weight: 600;
  line-height: 1.15;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  line-height: 1.6;
  color: var(--text-color);
  background-color: var(--bg-white);
  /* Improve text rendering */
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
  /* Performance optimization */
  content-visibility: auto;
}

a {
  text-decoration: none;
  color: inherit;
  transition: var(--transition);
}

ul {
  list-style: none;
}

/* ===================================
   Container & Layout
   =================================== */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

section {
  padding: 80px 0;
}

.section-title {
  font-size: 2.5rem;
  color: var(--primary-color);
  text-align: center;
  margin-bottom: 50px;
  position: relative;
}

.section-title::after {
  content: "";
  display: block;
  width: 80px;
  height: 3px;
  background-color: var(--accent-color);
  margin: 20px auto 0;
}

/* ===================================
   Buttons
   =================================== */
.btn {
  display: inline-block;
  padding: 12px 30px;
  border-radius: 5px;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  border: none;
  transition: var(--transition);
  text-align: center;
}

.btn-primary {
  background-color: var(--primary-color);
  color: white;
}

.btn-primary:hover {
  background-color: #1d4558;
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
}

.btn-secondary {
  background-color: var(--secondary-color);
  color: white;
}

.btn-secondary:hover {
  background-color: #648f92;
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
}

/* ===================================
   Navigation
   =================================== */
.navbar {
  background-color: var(--bg-white);
  box-shadow: var(--shadow);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.navbar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-brand {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary-color);
}

/* Logo sizing inside navbar */
.nav-brand .nav-logo {
  height: 120px;
  display: block;
}

.nav-menu {
  display: flex;
  gap: 30px;
  align-items: center;
}

.nav-menu.active {
  padding-bottom: 15px;
}

.nav-link {
  color: var(--text-color);
  font-weight: 500;
  padding: 8px 0;
  position: relative;
}

.nav-link::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--accent-color);
  transition: var(--transition);
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  background: none;
  border: none;
  cursor: pointer;
  padding: 5px;
}

.nav-toggle span {
  width: 25px;
  height: 3px;
  background-color: var(--primary-color);
  margin: 3px 0;
  transition: var(--transition);
}

/* ===================================
   Welcome Section
   =================================== */
.welcome-section {
  background: linear-gradient(
    135deg,
    var(--primary-color) 0%,
    var(--secondary-color) 100%
  );
  color: white;
  text-align: center;
  padding: 120px 0;
}

/* Notice / Temporary closure announcement - made prominent */
.notice-section {
  background-color: #fbaa6b; /* prominent orange background */
  color: white;
  padding: 36px 0;
}

.notice-content p {
  max-width: 880px;
  margin: 0 auto;
  color: var(--primary-color); /* blue text for the notice body */
  font-weight: 600;
  text-align: center;
  line-height: 1.5;
  font-size: 1.15rem;
}

.notice-content p strong {
  display: inline-block;
  color: #ffffff; /* make 'Aktuell:' white */
  font-weight: 700;
  margin-right: 6px;
}

/* small decorative underline to echo the quote section */
.notice-section::after {
  content: "";
  display: block;
  width: 60px;
  height: 4px;
  background-color: #ffffff; /* white decorative underline */
  margin: 12px auto 0;
  border-radius: 3px;
}

/* Quote section styled with site colours */
.quote-section {
  background: linear-gradient(
    135deg,
    var(--secondary-color) 0%,
    var(--primary-color) 100%
  );
  color: white;
  padding: 48px 0;
}

.quote-content blockquote {
  max-width: 920px;
  margin: 0 auto;
  font-size: 1.6rem;
  font-style: italic;
  color: #ffffff;
  text-align: center;
  line-height: 1.4;
}

.quote-content blockquote footer {
  margin-top: 14px;
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.9);
  font-weight: 600;
}

.quote-content blockquote p {
  margin: 0;
}

.welcome-content h1 {
  font-size: 3rem;
  margin-bottom: 25px;
  line-height: 1.2;
}

.welcome-text {
  font-size: 1.2rem;
  max-width: 800px;
  margin: 0 auto 40px;
  line-height: 1.8;
}

/* ===================================
   About Section
   =================================== */
.about-section {
  background-color: var(--bg-white);
}

/* Single column layout for about content */
.about-content {
  display: flex;
  flex-direction: column;
  gap: 30px;
  width: 100%;
  align-items: center;
}

.about-image {
  min-width: 0;
  max-width: 600px;
}

.about-text {
  background-color: var(--bg-light);
  padding: 30px;
  border-radius: 10px;
  box-shadow: var(--shadow);
  min-width: 0;
}

/* Feature cards inside About */
.about-text .feature-card {
  background-color: var(--bg-white);
  padding: 18px;
  border-radius: 8px;
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.05);
  margin-bottom: 16px;
}

.about-text .feature-card p {
  margin: 0;
  color: var(--text-color);
  line-height: 1.6;
}

/* Labels used to highlight key working-stance words in the about text */
.feature-label {
  font-weight: 700;
  color: var(--primary-color);
  display: inline-block;
  margin-right: 8px;
  font-size: 1.02rem;
}

.about-image img {
  border-radius: 10px;
  box-shadow: var(--shadow);
  width: 100%;
  object-fit: cover;
}

/* Make welcome image match about image styling */
.welcome-text img {
  border-radius: 10px;
  box-shadow: var(--shadow);
  width: 100%;
  object-fit: cover;
  margin: 12px 0;
}

/* Utility: make image half-width and responsive */
.half-size {
  width: 50%;
  height: auto;
  display: block;
  margin-top: 12px;
}

/* center half-size images when inside notes/cards */
.costs-note .half-size {
  margin-left: auto;
  margin-right: auto;
}

.about-text h3 {
  margin-top: 1rem;
  font-size: 1.8rem;
  color: var(--primary-color);
  margin-bottom: 20px;
}

.about-text p {
  margin-bottom: 20px;
  color: var(--text-light);
  line-height: 1.8;
}

/* Visible styling for external links inside the about text */
/* Visible styling for external links (applies site-wide via class) */
.external-link {
  color: var(--accent-color);
  text-decoration: underline;
  text-underline-offset: 3px;
  font-weight: 600;
  transition: var(--transition);
}

.external-link:hover,
.external-link:focus {
  color: var(--primary-color);
  text-decoration-color: var(--primary-color);
}

.external-link:focus {
  outline: none;
  box-shadow: 0 0 0 4px rgba(44, 95, 125, 0.12);
  border-radius: 4px;
}

/* ===================================
   Offers Section
   =================================== */
.offers-section {
  background-color: var(--bg-light);
}

.offers-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
}

.offer-card {
  background-color: var(--bg-white);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  height: 60%;
  /* Performance hint for animations */
  will-change: transform;
}

.offer-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-hover);
}

.offer-image {
  height: 200px;
  overflow: hidden;
}

.offer-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* show the top of the image (heads) by biasing the crop downward */
  object-position: 50% 20%;
  transition: var(--transition);
}

/* Revert cropping for Fortbildung (Offer 3) so the colored figures remain visible */
.offer-card[data-offer="fortbildung"] .offer-image img {
  /* cut only upper part: shift image up so lower area (colored figures) is visible */
  object-position: 50% 84%;
}

.offer-card:hover .offer-image img {
  transform: scale(1.05);
}

.offer-content {
  padding: 25px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.offer-content h3 {
  font-size: 1.5rem;
  color: var(--primary-color);
  margin-bottom: 15px;
}

.offer-content p {
  color: var(--text-light);
  margin-bottom: 20px;
  flex-grow: 1;
}

.offer-content .btn {
  margin-top: auto;
  align-self: center;
}

/* ===================================
   Costs Section
   =================================== */
.costs-section {
  background-color: var(--bg-white);
}

.costs-content {
  display: flex;
  flex-direction: column;
  gap: 30px;
  margin-bottom: 40px;
}

.cost-card {
  background-color: var(--bg-light);
  padding: 40px 30px;
  border-radius: 10px;
  text-align: center;
  box-shadow: var(--shadow);
  transition: var(--transition);
}

.cost-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-hover);
}

.cost-card h3 {
  font-size: 1.5rem;
  color: var(--primary-color);
  margin-bottom: 20px;
}

.price {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--accent-color);
  margin-bottom: 10px;
}

.duration {
  color: var(--text-light);
  margin-bottom: 30px;
}

.cost-details {
  text-align: left;
  margin-top: 20px;
}

.cost-details li {
  padding: 8px 0;
  color: var(--text-light);
  position: relative;
  padding-left: 25px;
}

.cost-details li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--secondary-color);
  font-weight: bold;
}

.costs-note {
  background-color: var(--bg-light);
  padding: 20px;
  border-radius: 5px;
  border-left: 4px solid var(--accent-color);
  margin-top: 1rem;
}

.costs-note p {
  color: var(--text-light);
}

/* Freestyle color integration for the Costs section (freetext layout) */
.costs-content h3 {
  font-size: 1.4rem;
  color: var(--primary-color);
  margin-top: 0.4rem;
  margin-bottom: 0.6rem;
}

.costs-content h3::after {
  content: "";
  display: block;
  width: 60px;
  height: 4px;
  background-color: var(--accent-color);
  margin-top: 8px;
  margin-bottom: 12px;
  border-radius: 3px;
}

.costs-content p {
  color: var(--text-light);
  margin-bottom: 12px;
  line-height: 1.6;
}

.costs-content p strong {
  color: var(--primary-color);
  font-weight: 700;
}

/* If price class is used, make it stand out with the accent color */
.costs-content .price {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--accent-color);
  margin-bottom: 8px;
}

/* ===================================
   Contact Section
   =================================== */
.contact-section {
  background-color: var(--bg-light);
}

.contact-content {
  display: flex;
  flex-direction: column;
  gap: 50px;
}

.contact-form-wrapper h3,
.contact-info h3 {
  font-size: 1.5rem;
  color: var(--primary-color);
  margin-bottom: 25px;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  color: var(--text-color);
  font-weight: 500;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 12px;
  border: 1px solid var(--border-color);
  border-radius: 5px;
  font-size: 1rem;
  font-family: inherit;
  transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(44, 95, 125, 0.1);
}

.form-message {
  margin-top: 20px;
  padding: 15px;
  border-radius: 5px;
  display: none;
}

.form-message.success {
  background-color: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
  display: block;
}

.form-message.error {
  background-color: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
  display: block;
}

.contact-info-wrapper {
  display: flex;
  flex-direction: column;
  gap: 30px;
}

.contact-item {
  margin-bottom: 20px;
}

.contact-item strong {
  color: var(--primary-color);
  display: block;
  margin-bottom: 8px;
}

.contact-item p,
.contact-item a {
  color: var(--text-light);
}

/* Make the Anfahrt direction text match heading color */
.contact-anfahrt {
  background-color: var(--bg-light);
  padding: 20px;
  border-radius: 5px;
  border-left: 4px solid var(--accent-color);
  color: var(--text-light);
  line-height: 1.6;
  margin-bottom: 18px;
}

.contact-anfahrt strong {
  color: var(--primary-color);
  font-weight: 700;
}

.contact-item a {
  text-decoration: underline;
  text-decoration-color: transparent;
  transition: var(--transition);
}

.contact-item a:hover {
  color: var(--primary-color);
  text-decoration-color: var(--primary-color);
}

/* Prevent line breaks in phone numbers */
a[href^="tel:"] {
  white-space: nowrap;
}

.map-wrapper {
  background-color: var(--bg-white);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: var(--shadow);
  position: relative;
}

.map-container {
  height: 350px;
  width: 100%;
  border-radius: 10px;
}

.map-navigate-btn {
  position: absolute;
  bottom: 15px;
  right: 15px;
  z-index: 1000;
  box-shadow: var(--shadow-hover);
  font-size: 0.9rem;
  padding: 10px 20px;
}

.map-navigate-btn:hover {
  transform: translateY(-2px);
}

/* ===================================
   Footer
   =================================== */
.footer {
  background-color: var(--primary-color);
  color: white;
  padding: 50px 0 20px;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 40px;
  margin-bottom: 30px;
}

.footer-section h4 {
  margin-bottom: 15px;
  font-size: 1.2rem;
}

.footer-section p,
.footer-section a {
  color: rgba(255, 255, 255, 0.8);
  line-height: 1.8;
}

.footer-section a:hover {
  color: white;
}

.footer-bottom {
  text-align: center;
  padding-top: 30px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-bottom p {
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.9rem;
}

/* ===================================
   Modal
   =================================== */
.modal {
  display: none;
  position: fixed;
  z-index: 2000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.6);
  overflow: auto;
  animation: fadeIn 0.3s ease;
}

.modal.active {
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-content {
  background-color: var(--bg-white);
  margin: 20px;
  padding: 40px;
  border-radius: 10px;
  max-width: 700px;
  width: 100%;
  position: relative;
  animation: slideIn 0.3s ease;
  max-height: 90vh;
  overflow-y: auto;
}

.modal-close {
  position: absolute;
  right: 20px;
  top: 20px;
  font-size: 2rem;
  color: var(--text-light);
  cursor: pointer;
  transition: var(--transition);
}

.modal-close:hover {
  color: var(--primary-color);
}

#dialogContent h3 {
  color: var(--primary-color);
  margin-bottom: 20px;
}

#dialogContent p {
  color: var(--text-light);
  line-height: 1.8;
  margin-bottom: 15px;
}

#dialogContent ul {
  list-style: disc;
  margin-left: 20px;
  margin-bottom: 15px;
}

#dialogContent ul li {
  color: var(--text-light);
  margin-bottom: 8px;
}

/* ===================================
   Animations
   =================================== */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes slideIn {
  from {
    transform: translateY(-50px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* ===================================
   Responsive Design
   =================================== */

/* Tablet */
@media (max-width: 768px) {
  html {
    scroll-padding-top: 350px;
  }

  .section-title {
    font-size: 2rem;
  }

  .navbar .container {
    flex-wrap: wrap;
  }

  .nav-toggle {
    display: flex;
  }

  .nav-menu {
    flex-direction: column;
    width: 100%;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
  }

  .nav-menu.active {
    max-height: 400px;
    padding-top: 20px;
  }

  .welcome-content h1 {
    font-size: 2.2rem;
  }

  .welcome-text {
    font-size: 1.1rem;
  }

  .about-content {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .contact-content {
    grid-template-columns: 1fr;
  }

  .costs-content {
    grid-template-columns: 1fr;
  }

  .offers-grid {
    grid-template-columns: 1fr;
  }

  .modal-content {
    padding: 30px 20px;
  }
}

/* Mobile */
@media (max-width: 480px) {
  html {
    font-size: 14px;
  }

  section {
    padding: 50px 0;
  }

  .container {
    padding: 0 15px;
  }

  .welcome-section {
    padding: 80px 0;
  }

  .welcome-content h1 {
    font-size: 1.8rem;
  }

  .section-title {
    font-size: 1.7rem;
  }

  .footer-content {
    grid-template-columns: 1fr;
    gap: 30px;
  }
}
