/* ═══════════════════════════════════════════════════
   ECS SHARED — Mobile-Responsive Navigation
   ═══════════════════════════════════════════════════ */

/* ── Hamburger button (hidden on desktop) ─────────── */
.nav-hamburger {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 36px;
  height: 22px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
  margin-left: 10px;
  z-index: 110;
}
.nav-hamburger span {
  display: block;
  width: 100%;
  height: 2px;
  background: #333;
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease;
  transform-origin: center;
}
.nav-hamburger.open span:nth-child(1) { transform: translateY(10px) rotate(45deg); }
.nav-hamburger.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav-hamburger.open span:nth-child(3) { transform: translateY(-10px) rotate(-45deg); }

/* ── Full-screen overlay ──────────────────────────── */
.nav-mobile-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 105;
  background: rgba(12, 25, 20, 0.55);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
}
.nav-mobile-overlay.open {
  display: flex;
  flex-direction: column;
}

/* ── Slide-down drawer ────────────────────────────── */
.nav-mobile-drawer {
  background: #fff;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  border-radius: 0 0 24px 24px;
  padding: 0 20px 28px;
  box-shadow: 0 16px 48px rgba(12,25,20,0.18);
  animation: mobileDrawerIn 0.28s cubic-bezier(.4,0,.2,1) both;
}

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

/* ── Top row inside drawer (logo + close btn) ─────── */
.nav-mobile-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0 12px;
  border-bottom: 1px solid #f0efec;
  margin-bottom: 8px;
}
.nav-mobile-close {
  width: 38px; height: 38px;
  border-radius: 50%;
  background: #f2f1ef;
  border: none;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem;
  color: #555;
  transition: background .2s, color .2s;
  flex-shrink: 0;
}
.nav-mobile-close:hover { background: #e5e4e0; color: #122620; }

/* ── Mobile nav link list ─────────────────────────── */
.nav-mobile-links {
  list-style: none;
  padding: 0;
  margin: 0;
}
.nav-mobile-links > li {
  border-bottom: 1px solid #f2f1ef;
}
.nav-mobile-links > li:last-child { border-bottom: none; }

/* Top-level link or toggle button */
.nav-mobile-links > li > a,
.nav-mobile-links > li > .nav-dropdown-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 15px 4px;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 1.8px;
  text-transform: uppercase;
  color: #333;
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
  text-decoration: none;
  transition: color 0.2s;
  height: auto !important;
  border-bottom: none !important;
}
.nav-mobile-links > li > a:hover,
.nav-mobile-links > li > .nav-dropdown-toggle:hover { color: #122620; }
.nav-mobile-links > li > a.active,
.nav-mobile-links > li > .nav-dropdown-toggle.active { color: #122620; font-weight: 700; }

/* Chevron in mobile toggle */
.nav-mobile-links > li > .nav-dropdown-toggle .chevron {
  transition: transform .25s;
  font-size: 0.65rem;
  color: #666;
}
.nav-mobile-links > li.open > .nav-dropdown-toggle .chevron { transform: rotate(180deg); }

/* Sub-menu inside drawer */
.nav-mobile-links .nav-dropdown {
  position: static !important;
  transform: none !important;
  opacity: 1 !important;
  pointer-events: all !important;
  display: none;
  box-shadow: none !important;
  border: none !important;
  border-radius: 12px !important;
  background: #faf9f7 !important;
  padding: 6px 8px 10px !important;
  margin-bottom: 8px;
  min-width: auto !important;
}
.nav-mobile-links li.open > .nav-dropdown { display: block; }
.nav-mobile-links .nav-dropdown-label { display: none; }
.nav-mobile-links .nav-dropdown a {
  padding: 10px 14px !important;
  font-size: 0.76rem !important;
  letter-spacing: 1px !important;
  color: #555 !important;
  border-radius: 8px !important;
  height: auto !important;
  border-bottom: none !important;
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  font-weight: 500 !important;
}
.nav-mobile-links .nav-dropdown a:hover { background: #f0efeb; color: #122620 !important; }
.nav-mobile-links .nav-dropdown a i { color: #D6AD60; width: 18px; text-align: center; font-size: 0.82rem; }

/* ── Contact action bar at drawer bottom ─────────── */
.nav-mobile-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 20px 0 4px;
  border-top: 1px solid #f0efec;
  margin-top: 12px;
}

/* ── Responsive breakpoints ───────────────────────── */
@media (max-width: 1128px) {
  .nav-hamburger { display: flex !important; }
  .nav-links     { display: none !important; }
  .nav-search    { display: none !important; }
  .nav-lang      { display: none !important; }
}

@media (min-width: 1129px) {
  .nav-mobile-overlay { display: none !important; }
  .nav-hamburger      { display: none !important; }
}

/* ═══════════════════════════════════════════════════
   ECS SHARED — Contact Forms (consent, recaptcha, popup)
   ═══════════════════════════════════════════════════ */

/* GDPR consent checkbox row */
.form-consent {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 4px 0 2px;
}
.form-consent input[type="checkbox"] {
  margin-top: 3px;
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  accent-color: #122620;
  cursor: pointer;
}
.form-consent label {
  font-size: 0.78rem;
  line-height: 1.55;
  color: #555;
  cursor: pointer;
}
.form-consent label a { color: #122620; text-decoration: underline; }
.form-consent label a:hover { color: #D6AD60; }

/* Inline error text under a field / consent (e.g. "Pflichtfeld") */
.form-field-error {
  display: none;
  color: #c0392b;
  font-size: 0.72rem;
  margin-top: 4px;
}
.form-group.has-error .form-field-error,
.form-consent.has-error .form-field-error { display: block; }
.form-group.has-error .form-control-ecs,
.form-group.has-error .fc-form-input { border-color: #c0392b !important; }

/* Submit button loading state */
.form-submit[disabled],
.fc-form-submit[disabled] {
  opacity: 0.6;
  cursor: not-allowed;
  pointer-events: none;
}
.form-submit .fa-spinner,
.fc-form-submit .fa-spinner { margin-right: 6px; }

/* ── Success / Error popup modal (built dynamically by contact-form.js) ── */
.ecs-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(8,18,14,0.55);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s ease;
}
.ecs-modal-overlay.visible {
  opacity: 1;
  pointer-events: all;
}
.ecs-modal {
  background: #fff;
  border-radius: 16px;
  max-width: 420px;
  width: 100%;
  padding: 40px 32px 32px;
  text-align: center;
  position: relative;
  box-shadow: 0 24px 64px rgba(0,0,0,0.28);
  transform: translateY(16px) scale(0.97);
  transition: transform .3s cubic-bezier(.2,.9,.3,1.1);
  font-family: 'Montserrat', sans-serif;
}
.ecs-modal-overlay.visible .ecs-modal {
  transform: translateY(0) scale(1);
}
.ecs-modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 32px;
  height: 32px;
  border: none;
  background: #f2f0eb;
  border-radius: 50%;
  color: #666;
  font-size: 0.85rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .2s, color .2s;
}
.ecs-modal-close:hover { background: #122620; color: #fff; }
.ecs-modal-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  font-size: 1.6rem;
}
.ecs-modal-icon.success { background: rgba(37,211,102,0.12); color: #1f9e50; }
.ecs-modal-icon.error   { background: rgba(192,57,43,0.12); color: #c0392b; }
.ecs-modal-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: #122620;
  margin-bottom: 10px;
  letter-spacing: -0.2px;
}
.ecs-modal-text {
  font-size: 0.88rem;
  line-height: 1.65;
  color: #555;
  margin-bottom: 4px;
}
.ecs-modal-text a { color: #122620; font-weight: 600; text-decoration: underline; }
.ecs-modal-text a:hover { color: #D6AD60; }
.ecs-modal-btn {
  margin-top: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 28px;
  background: #122620;
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 0.72rem;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  font-weight: 600;
  cursor: pointer;
  transition: background .2s;
}
.ecs-modal-btn:hover { background: #D6AD60; color: #122620; }
