/* css/components.css */
.nav-link {
  color: var(--light);
  margin-left: 1.5rem;
  text-decoration: none;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: color 0.3s ease;
  position: relative;
}
.nav-link span { position: relative; z-index: 1; }
.nav-link .nav-plus { display: none !important; }
.nav-link:hover { color: var(--primary); }
/* Chevron indicator for dropdown triggers */
.nav-dropdown > a.nav-link .nav-chevron {
  font-size: 0.9rem;
  line-height: 1;
  color: currentColor;
  opacity: 0.85;
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.nav-dropdown.dd-open > a.nav-link .nav-chevron { transform: rotate(180deg); opacity: 1; }
.nav-link::after {
  content: "";
  display: block;
  position: absolute;
  left: 0;
  bottom: -3px;
  width: 0;
  height: 0.5px;
  background: var(--primary);
  border-radius: 2px;
  transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.nav-link:hover::after { width: 100%; }

/* Language Switch */
.lang-switch { margin-left: auto; color: var(--light); opacity: 0.8; font-weight: 600; font-size: 0.9rem; display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.lang-switch a { color: var(--light); text-decoration: none; padding: 0; }
.lang-switch a:hover { color: var(--primary); }
.lang-switch a.active { color: var(--primary); }
.lang-switch .sep { display: block; width: 18px; height: 0; border-top: 1px solid rgba(255,255,255,0.4); opacity: 0.8; margin: 2px 0; overflow: hidden; text-indent: -9999px; }

.hamburger {
  margin-left: 3rem;
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 40px;
  height: 40px;
  background: none;
  border: none;
  cursor: pointer;
  z-index: 4002; /* above backdrop */
  transition: background 0.2s;
  position: relative;
}
.hamburger .bar { position: absolute; left: 6px; right: 6px; height: 3px; background: #fff; border-radius: 2px; transition: all 0.35s cubic-bezier(0.4,0,0.2,1); }
.hamburger .bar:first-child { top: 13px; }
.hamburger .bar:last-child { top: 23px; }
.hamburger.active .bar { background: var(--accent); }
.hamburger.active .bar:first-child { top: 18px; transform: rotate(38deg) scaleX(1.1); }
.hamburger.active .bar:last-child { top: 18px; transform: rotate(-52deg) scaleX(0.9); }
.hamburger:hover, .hamburger:focus { outline: none; }
/* Hover Orange für Bars, Active (X-Form) bleibt Blau */
.hamburger:hover .bar, .hamburger:focus .bar { background: var(--primary); }
.hamburger.active:hover .bar, .hamburger.active:focus .bar { background: var(--accent); }

.cta-btn {
  background-color: var(--primary);
  color: #111;
  border: none;
  padding: 0.7rem 2rem;
  font-size: 1rem;
  border-radius: 4px;
  cursor: pointer;
  transition: color 0.2s ease, transform 0.2s ease;
  text-decoration: none; /* ensure no underline when used as <a> */
}
.cta-btn:visited { text-decoration: none; }
.cta-btn:hover, .cta-btn:focus { text-decoration: none; }
.cta-btn:hover { background-color: var(--accent); color: #111; }
.cta-btn:active { transform: scale(0.97); background-color: var(--accent); color: #111; }

/* Inline CTA variant for compact placement within text */
.cta-btn.cta-inline {
  padding: 0.45rem 1rem;
  font-size: 0.9rem;
  margin-left: 0.5rem;
  display: inline-block;
  vertical-align: baseline;
}

/* FAQ page separators for better visual grouping */
.faq-page section { padding: 0.9rem 0; }
.faq-page section + section { border-top: 1px solid rgba(255,255,255,0.12); margin-top: 0.6rem; }
.faq-page h2 { margin-top: 0.2rem; }

/* Legal pages (Impressum/Datenschutz/Imprint/Privacy): add calm separators between sections */
.legal-page section { padding: 0.9rem 0; }
.legal-page section + section { border-top: 1px solid rgba(255,255,255,0.12); margin-top: 0.6rem; }

.feature {
  background: #c5c5c5; /* Light gray background for cards */
  color: rgba(0,0,0,0.7); /* Darker text for contrast */
  padding: 1.5rem;
  border-radius: 18px;
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out, box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1), background-color 0.3s ease;
  box-shadow: 0 4px 16px rgba(0,0,0,0.1), 0 0 4px rgba(247,147,26,0.03); /* Subtle initial primary glow */
}
.feature.visible { opacity: 1; transform: translateY(0); }
.feature.is-focused {
  background-color: var(--primary); /* Primary color on hover */
  box-shadow: 0 8px 32px rgba(0,0,0,0.4), 0 0 12px rgba(106, 214, 255, 0.3); /* Stronger accent glow on hover */
  transform: translateY(-10px) scale(1.06); /* More pronounced lift */
  z-index: 2;
  /* color: var(--light); removed */
}
.feature h3 { margin-bottom: 1rem; font-size: 1.2rem; color: rgba(0,0,0,0.8); transition: color 0.3s ease, text-shadow 0.3s ease; }
.feature.is-focused h3 { color: rgba(0,0,0,0.8); text-shadow: 0 0 4px rgba(255,255,255,0.3); }

.feature-icon {
  margin-right: 0.5rem; /* Space between icon and text */
  font-size: 1.2em; /* Slightly larger than text */
  color: var(--accent); /* Use accent color for icons */
}
.feature:nth-child(2) { transition-delay: 0.1s; }
.feature:nth-child(3) { transition-delay: 0.2s; }
.feature:nth-child(4) { transition-delay: 0.3s; }

@media (max-width: 900px) {
  .feature { padding: 0.9rem 1rem; border-radius: 14px; }
  .feature.is-focused { transform: none; box-shadow: 0 6px 18px rgba(0,0,0,0.18); }
}

/* Disable hover highlight on items already in view unless they are .is-focused */
.feature.visible.in-view:hover:not(.is-focused) {
  background-color: #c5c5c5;
  box-shadow: 0 4px 16px rgba(0,0,0,0.1), 0 0 4px rgba(247,147,26,0.03);
  transform: none;
  z-index: auto;
}
.feature.visible.in-view:hover:not(.is-focused) h3 { text-shadow: none; }

/* Footer link styles are defined in layout.css final footer block */

/* (cookie-info removed – no persistent notice needed with necessary-only cookies) */

#contact-form { max-width: 700px; margin: 0 auto; display: flex; flex-direction: column; gap: 1rem; }
.form-group { display: flex; gap: 1.2rem; }
/* Stack name & email fields vertically in the contact form */
#contact-form .form-group { flex-direction: column; gap: 1rem; }
.form-group input, .form-group textarea { width: 100%; padding: 0.9rem; background-color: #222; border: 1px solid #333; color: var(--light); border-radius: 6px; font-family: inherit; font-size: 1rem; transition: border-color 0.3s, box-shadow 0.3s; }
.form-group input:focus, .form-group textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(0, 188, 212, 0.2); }
.form-group-footer { display: flex; flex-direction: column; align-items: stretch; gap: 1rem; flex-wrap: wrap; }
.privacy-notice { font-size: 0.85rem; color: var(--color-text-muted); text-align: left; margin: 0.3rem 0 0.5rem 0; }
.privacy-notice a { color: var(--color-text-muted); text-decoration: underline; }
.privacy-notice a:hover { color: var(--primary); }
#contact-form .cta-btn { margin-left: auto; }
#form-status { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); min-width: 220px; max-width: 90vw; padding: 1.2rem 1.5rem; border-radius: 12px; font-weight: 600; font-size: 1.1rem; text-align: center; z-index: 2000; opacity: 0; pointer-events: none; transition: opacity 0.4s cubic-bezier(0.4,0,0.2,1); box-shadow: 0 8px 32px rgba(0,0,0,0.18); background: #163236; color: var(--primary); display: flex; align-items: center; gap: 0.7rem; }
#form-status.show { opacity: 1; pointer-events: auto; }
#form-status.success { background: #163236; color: var(--primary); }
#form-status.error { background: #2a181b; color: var(--accent); }


/* Inline phone hint inside contact form */
.callout-phone { display: flex; align-items: center; justify-content: center; gap: 0.5rem; margin: 0.2rem 0 0.2rem; font-size: 0.95rem; }
.callout-phone .callout-label { color: var(--color-text-muted); }
.callout-phone .callout-link { color: var(--accent); text-decoration: none; font-weight: 700; letter-spacing: 0.02em; display: inline-flex; align-items: center; gap: 0.35rem; }
/* Only underline the number text on hover, not the icon */
.callout-phone .callout-link:hover .callout-number { text-decoration: underline; }

/* Mobile sticky call bar */
.call-bar { position: fixed; left: 12px; right: 12px; bottom: calc(8px + env(safe-area-inset-bottom, 0px)); background: rgba(24,24,24,0.96); border: 1px solid rgba(255,255,255,0.08); box-shadow: 0 8px 24px rgba(0,0,0,0.35); border-radius: 12px; display: none; align-items: center; justify-content: center; gap: 0.6rem; padding: 0.55rem 0.75rem; z-index: 4000; backdrop-filter: saturate(140%) blur(8px); }
.call-bar.show { display: flex; }
.call-bar .call-bar-link { display: inline-flex; align-items: center; gap: 0.45rem; color: var(--accent); font-weight: 800; text-decoration: none; }
.call-bar .call-bar-link:hover .call-bar-text { text-decoration: underline; }
.call-bar .call-bar-link:active { transform: translateY(1px); }
.call-bar .call-bar-icon { font-size: 1.1rem; }
.call-bar .call-bar-text { font-size: 1rem; color: #fff; }
.call-bar .call-bar-close { margin-left: auto; background: none; border: none; color: #aaa; font-size: 1.2rem; cursor: pointer; padding: 0 0.35rem; }
.call-bar .call-bar-close:hover { color: #fff; }

/* Only show the call bar on small viewports */
@media (min-width: 641px) {
  .call-bar { display: none !important; }
}


.contact-modal { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,0.75); display: flex; align-items: center; justify-content: center; z-index: 5000; transition: opacity 0.3s; }
.contact-modal[style*="display:none"] { opacity: 0; pointer-events: none; }
.contact-modal-content { background: #181818; padding: 1.2rem; border-radius: 16px; max-width: 98vw; width: 100%; max-width: 420px; box-shadow: 0 8px 32px rgba(0,0,0,0.25); position: relative; animation: modalIn 0.3s cubic-bezier(0.4,0,0.2,1); max-height: 90vh; overflow-y: auto; }
.contact-modal-content h2, .contact-modal-content p { margin-left: 0.2rem; margin-right: 0.2rem; text-align: center; }
.contact-modal-content h2 { margin-bottom: 0.9rem; }
.contact-modal-content form { width: 100%; }
.contact-modal-content .form-group > * { margin-bottom: 0 !important; }
.contact-modal-content .form-group > *:last-child { margin-bottom: 0 !important; }
.contact-modal-content p { margin-bottom: 1.2rem; }
.contact-modal-content .contact-intro { font-size: 0.9rem; color: var(--color-text-muted); }
.contact-modal-content .cta-btn { display: block; margin: 0.5rem auto 0 auto; max-width: 260px; }
.contact-modal-close { position: absolute; top: 1.5rem; right: 0.5rem; bottom: auto; background: none; border: none; color: var(--primary); font-size: 2.2rem; cursor: pointer; z-index: 10; line-height: 1; padding: 0 0.2em; padding-bottom: 0.7em; transition: color 0.2s; }
.contact-modal-close:hover, .contact-modal-close:focus { color: var(--accent); outline: none; }
@keyframes modalIn { from { transform: translateY(40px) scale(0.98); opacity: 0; } to { transform: translateY(0) scale(1); opacity: 1; } }

/* Responsive Component Anpassungen */
/* Show hamburger only on true mobile (<= 900px) */
@media (max-width: 900px) {
    .hamburger {
      display: flex !important;
      margin-left: 0 !important;
      position: relative;
      right: 0;
      top: 0;
      transform: none;
      z-index: 4002;
    }
    /* Keep button aligned when overlay is open */
    body.nav-open .hamburger {
      position: relative;
      right: 0;
      top: 0;
      transform: none;
    }
    /* Keep language switch just to the left of the hamburger */
    .header-right .lang-switch {
      position: relative;
      right: 0;
      top: 0;
      transform: none;
      z-index: 4002;
    }
    body.nav-open .header-right { display: flex; align-items: center; gap: 1rem; }
    body.nav-open .header-right .lang-switch {
      position: relative;
      right: 0;
      top: 0;
      transform: none;
    }
    body.nav-open .header-right .lang-switch .sep { display: inline-block; width: 1px; height: 1.1em; border: 0; margin: 0 0.35rem; opacity: 0.8; text-indent: -9999px; overflow: hidden; background: rgba(255,255,255,0.55); }
}

/* Header CTA is server-side suppressed on hero pages; keep visible elsewhere */
.mobile-contact-btn { display: none; }
@media (max-width: 600px) {
    /* Center vertically, but keep clear space from bottom via content margins */
    .contact-modal { align-items: flex-start; padding-top: 0; padding-bottom: 0; bottom: 10vh; }
    .form-group { flex-direction: column; }
    .form-group-footer { flex-direction: column; align-items: stretch; }
    #contact-form .cta-btn { display: block; margin: 0 auto; }
    .privacy-notice { text-align: left; margin-bottom: 0; }
    .contact-modal-content { padding: 1.8rem 1.2rem 1.2rem 1.2rem; max-width: 98vw; margin: 4vh 1.2rem 18vh 1.2rem; max-height: 92vh; }
    .contact-modal-close { top: 1rem; right: 1rem; }
}

/* Removed unused .form-group-consent styles */

/* Hide header CTA on mobile without removing it from DOM */
@media (max-width: 900px) {
  .header-contact-btn {
    display: none !important;
  }
}

/* About page header layout */
.about-header { display: block; margin-top: 1.5rem; }
.about-header .about-title { margin-top: 0; }

/* About content grid */
.about-content { display: grid; grid-template-columns: 1fr; gap: 1.5rem; align-items: start; margin-top: 3rem; }
.about-image { display: flex; justify-content: flex-end; }

/* About page profile image */
.about-profile { width: 100%; max-width: 320px; height: auto; border-radius: 10px; margin: 0; box-shadow: 0 8px 22px rgba(0,0,0,0.35); opacity: 0.97; }

/* (no clearfix needed due to grid) */

@media (max-width: 900px) {
  .about-header { gap: 0.5rem; margin-top: 1rem; }
  .about-content { grid-template-columns: 1fr; }
  .about-image { justify-content: center; }
  .about-profile { max-width: min(60vw, 260px); }
}

/* Hero CTA Button */
.hero-cta-div {
    /* Place CTA right below the typed hero content */
    position: relative;
    margin-top: clamp(1.2rem, 3.5vh, 2.2rem);
    z-index: 10;
    width: 100%;
    display: flex;
    justify-content: flex-start;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s ease;
}

.hero-cta-div.show {
    opacity: 1;
    pointer-events: auto;
}

.hero-cta-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    background-color: var(--accent); /* Blue base */
    color: #111;
    padding: 0.95rem 1.6rem;
    border-radius: 10px;
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: 800;
    line-height: 1;
    border: 1px solid transparent; /* no orange border by default */
    box-shadow: 0 10px 28px rgba(0,0,0,0.35);
    transform: translateZ(0);
    transition: transform 0.18s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.25s ease, background-color 0.25s ease, color 0.2s ease;
}

.hero-cta-btn:hover {
    background-color: #4fc9f7; /* slightly darker blue on hover */
    color: #111;
    transform: translateY(-2px);
    /* subtle orange ring/glow on hover */
    box-shadow: 0 14px 34px rgba(0,0,0,0.45), 0 0 0 4px rgba(var(--primary-rgb), 0.10);
}

.hero-cta-btn:active {
    transform: translateY(0);
}

.hero-cta-btn:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(106,214,255, 0.85), 0 10px 28px rgba(0,0,0,0.35);
}

.hero-cta-btn .cta-arrow { transition: transform 0.2s ease; display: inline-block; }
.hero-cta-btn:hover .cta-arrow { transform: translateX(3px); }

/* Responsive adjustments for smaller screens */
@media (max-width: 768px) {
    .hero-cta-div {
        justify-content: center;
        margin-top: clamp(1.4rem, 4.5vh, 2.4rem);
    }
    .hero-cta-btn {
        padding: 0.9rem 1.3rem;
        font-size: 1rem;
        border-radius: 10px;
    }
}

/* Scroll indicator visibility controlled by body class */
.scroll-indicator {
    opacity: 0; /* Initially hidden */
    pointer-events: none; /* Prevent interaction when hidden */
    transition: opacity 0.5s ease; /* Smooth fade-in */
}

body.show-scroll-indicator .scroll-indicator {
    opacity: 1;
    pointer-events: auto;
}

/* Simple hero robot links */
.robot-link { color: inherit; text-decoration: none; }
.robot-link:hover, .robot-link:focus-visible { color: var(--accent); }

/* Anchor offset for fixed header so titles aren't hidden */
:root { scroll-padding-top: var(--header-offset, 96px); }
h2[id], h3[id] { scroll-margin-top: var(--header-offset, 96px); }
/* Ensure feature card anchors align below fixed header */
.feature[id] { scroll-margin-top: var(--header-offset, 96px); }
/* Ensure the features section itself aligns well for in-page anchors */
#leistungen { scroll-margin-top: var(--header-offset, 96px); }
/* Make header CTA slightly smaller than default buttons */
.header-contact-btn {
  padding: 0.5rem 1.2rem;
  font-size: 0.9rem;
  border-radius: 3px;
}
