/* ==============================================
   AESTATE TEMPLATE - TAILWIND MIGRATION
   Reduzierte Styles (vorher: 2231 Zeilen)
   Nur Template-spezifische Overrides & Animationen
   ============================================== */

/* Font Face Declarations */
@font-face {
  font-family: 'Zapf Humanist';
  src:
    url('/fonts/Zapf-Humanist-Regular.woff2') format('woff2'),
    url('/fonts/Zapf-Humanist-Regular.woff') format('woff'),
    url('/fonts/Zapf-Humanist-Regular.ttf') format('truetype');
  font-display: swap;
}

@font-face {
  font-family: 'Brandon Grotesque';
  src:
    url('/fonts/BrandonGrotesque-Light.woff2') format('woff2'),
    url('/fonts/BrandonGrotesque-Light.woff') format('woff'),
    url('/fonts/BrandonGrotesque-Light.eot') format('embedded-opentype');
  font-display: swap;
}

/* Body States */
body {
  margin: 0;
  padding: 0;
  height: 100%;
}

body.nav-open {
  overflow: hidden;
  height: 100vh;
}

main {
  margin: 0;
  padding: 0;
}

/* ==============================================
   ANIMATIONS
   ============================================== */

/* Navigation Slide Down Animation */
@keyframes slideDown {
  from {
    transform: translateY(-100%);
  }
  to {
    transform: translateY(0);
  }
}

/* Google Maps Marker Pulse */
@keyframes marker-pulse {
  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.7;
    transform: scale(1.1);
  }
}

/* Fade In Animation */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* Mobile menu item stagger animation (replaces framer-motion) */
@keyframes menuItemIn {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Hero Text Intro */
@keyframes heroTextIn {
  from {
    opacity: 0;
    transform: translate3d(0, 18px, 0);
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

/* ==============================================
   GOOGLE MAPS INFOWINDOW (Third-Party Override)
   ============================================== */

.google-maps-infowindow {
  padding: 0.75rem;
  max-width: 250px;
}

.google-maps-infowindow__title {
  font-size: 0.95rem !important;
  font-weight: 600 !important;
  margin: 0 0 0.5rem 0 !important;
  color: var(--font-h3-color, #333) !important;
  text-transform: none !important;
  letter-spacing: normal !important;
  line-height: 1.4 !important;
  font-family: inherit !important;
}

.google-maps-infowindow__description {
  font-size: 0.875rem;
  color: #666;
  margin: 0;
}

/* ==============================================
   UTILITY CLASSES
   ============================================== */

/* Text Alignment - Falls noch irgendwo genutzt */
.text-left {
  text-align: left;
}

.text-center {
  text-align: center;
}

.text-right {
  text-align: right;
}

.hero-block__content > * {
  opacity: 0;
  animation: heroTextIn 720ms cubic-bezier(0.22, 1, 0.36, 1) forwards;
  will-change: opacity, transform;
}

.hero-block__eyebrow {
  animation-delay: 80ms;
}

.hero-block__headline {
  animation-delay: 140ms;
}

.hero-block__body {
  animation-delay: 220ms;
}

.hero-block__cta {
  animation-delay: 300ms;
}

@media (prefers-reduced-motion: reduce) {
  .hero-block__content > * {
    opacity: 1;
    transform: none;
    animation: none;
  }
}

/* Prose styling for RichText content */

.prose p {
  margin-bottom: 1rem;
}

.prose a {
  color: var(--font-link-color, #0066cc);
  text-decoration: underline;
}

.prose a:hover {
  color: var(--font-link-color-hover, #0052a3);
}

/* Override prose link styles for buttons */
.prose a.btn-primary {
  color: var(--font-button-color);
  text-decoration: none;
}

.prose a.btn-primary:hover {
  color: var(--font-button-color-hover);
  text-decoration: none;
}

.prose a.btn-primary:active {
  color: var(--font-button-color-active);
  text-decoration: none;
}

.prose ul,
.prose ol {
  margin-left: 1.5rem;
  margin-bottom: 1rem;
}

.prose li {
  margin-bottom: 0.5rem;
}

.prose strong {
  font-weight: 600;
}

.prose em {
  font-style: italic;
}

/* ==============================================
   RESPONSIVE BREAKPOINTS (Falls irgendwo genutzt)
   ============================================== */

/* Mobile: < 768px - Tailwind md */
/* Tablet: 768px - 1024px - Tailwind md bis lg */
/* Desktop: > 1024px - Tailwind lg+ */

/* Alle Block-spezifischen BEM-Klassen wurden durch Tailwind ersetzt */
/* Zusätzliche spezifische Anpassungen sind in dynamic-styles.css zu finden */

/* ==============================================
   BLOCK-ABSTÄNDE
   - Blöcke werden in div[data-block-type] Wrappers gerendert.
   - Selektor auf Wrapper-Divs (nicht section+section —
     sections sind keine DOM-Geschwister).
   - Hero/HeroSmall ausgenommen → deren Abstände bleiben.
   - .section-block hat kein py → explizit ausschließen.
   ============================================== */

/* Zweiter Block: padding-top reduzieren */
.page
  > div[data-block-type]:not([data-block-type='hero']):not([data-block-type='heroSmall'])
  + div[data-block-type]:not([data-block-type='hero']):not([data-block-type='heroSmall'])
  > section:not(.section-block) {
  padding-top: 1rem;
}

/* Erster Block wenn gefolgt von weiterem Block: padding-bottom reduzieren */
.page
  > div[data-block-type]:not([data-block-type='hero']):not([data-block-type='heroSmall']):has(
    + div[data-block-type]:not([data-block-type='hero']):not([data-block-type='heroSmall'])
  )
  > section:not(.section-block) {
  padding-bottom: 1rem;
}

/* Blöcke innerhalb SectionBlock */
.section-block div[data-block-type] + div[data-block-type] > section:not(.section-block) {
  padding-top: 1rem;
}
.section-block div[data-block-type]:has(+ div[data-block-type]) > section:not(.section-block) {
  padding-bottom: 1rem;
}

@media (min-width: 1024px) {
  .page
    > div[data-block-type]:not([data-block-type='hero']):not([data-block-type='heroSmall'])
    + div[data-block-type]:not([data-block-type='hero']):not([data-block-type='heroSmall'])
    > section:not(.section-block) {
    padding-top: 1.5rem;
  }
  .page
    > div[data-block-type]:not([data-block-type='hero']):not([data-block-type='heroSmall']):has(
      + div[data-block-type]:not([data-block-type='hero']):not([data-block-type='heroSmall'])
    )
    > section:not(.section-block) {
    padding-bottom: 1.5rem;
  }
  .section-block div[data-block-type] + div[data-block-type] > section:not(.section-block) {
    padding-top: 1.5rem;
  }
  .section-block div[data-block-type]:has(+ div[data-block-type]) > section:not(.section-block) {
    padding-bottom: 1.5rem;
  }
}

@media (max-width: 768px) {
  .navigation .content-container > button {
    color: #000000 !important;
  }
  .navigation__logo-link > div svg {
    color: #000000 !important;
  }
}
