/**
 * Bethesda FSE Theme - Custom Styles
 * 1:1 Match with React/Tailwind Design
 */

/* ===== CSS Variables ===== */
:root {
  --background: 220 30% 96%;
  --foreground: 220 20% 10%;
  --card: 0 0% 100%;
  --primary: 210 100% 50%;
  --primary-light: 210 100% 60%;
  --muted: 220 25% 92%;
  --muted-foreground: 220 10% 40%;
  --border: 0 0% 90%;
}

/* ===== Reset & Base ===== */
html {
  scroll-behavior: smooth;
}

body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* ===== Gradient Text ===== */
.text-gradient-blue,
.wp-block-heading.is-style-gradient-text {
  background: linear-gradient(135deg, #0066ff 0%, #4d4dff 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ===== Header / Navbar ===== */
.site-header {
  position: fixed !important;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  padding-top: 1.25rem !important;
  padding-bottom: 1.25rem !important;
  background: transparent !important;
}

.site-header.scrolled {
  background: rgba(240, 242, 246, 0.8) !important;
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-bottom: 1px solid rgba(229, 229, 229, 0.5);
  padding-top: 0.75rem !important;
  padding-bottom: 0.75rem !important;
}

/* Navbar links – white by default (hero is dark) */
.site-header .wp-block-navigation-item a,
.site-header .wp-block-site-title a,
.site-header .wp-block-site-title {
  color: rgba(255, 255, 255, 0.9) !important;
  transition: all 0.5s ease;
}

.site-header.scrolled .wp-block-navigation-item a,
.site-header.scrolled .wp-block-site-title a,
.site-header.scrolled .wp-block-site-title {
  color: hsl(var(--foreground)) !important;
}

.site-header .wp-block-navigation-item a:hover {
  opacity: 0.6;
}

/* CTA Button in header */
.site-header .wp-block-button__link {
  background: white !important;
  color: black !important;
  border-radius: 9999px !important;
  padding: 0.625rem 1.25rem !important;
  font-size: 0.875rem !important;
  font-weight: 500 !important;
  transition: all 0.3s;
}

.site-header.scrolled .wp-block-button__link {
  background: hsl(var(--foreground)) !important;
  color: hsl(220 30% 96%) !important;
}

.site-header .wp-block-button__link:hover {
  opacity: 0.9;
}

/* Mobile navigation menu */
.wp-block-navigation__responsive-container.is-menu-open {
  background: rgba(255, 255, 255, 0.95) !important;
  backdrop-filter: blur(24px);
}

.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item a {
  color: hsl(var(--foreground)) !important;
  font-size: 1.125rem;
  padding: 1rem 0;
}

/* ===== Hero Section ===== */
.hero-section {
  position: relative;
}

.hero-section .wp-block-cover {
  min-height: 100vh !important;
}

.hero-section .wp-block-cover__background {
  opacity: 0.7 !important;
}

.hero-section .wp-block-cover__image-background {
  filter: blur(4px);
  transform: scale(1.1);
}

/* Hero animations */
.hero-section .wp-block-cover__inner-container > * {
  opacity: 0;
  animation: fadeUp 0.8s ease-out forwards;
}

.hero-section .wp-block-cover__inner-container > *:nth-child(1) { animation-delay: 0.2s; }
.hero-section .wp-block-cover__inner-container > *:nth-child(2) { animation-delay: 0.4s; }
.hero-section .wp-block-cover__inner-container > *:nth-child(3) { animation-delay: 0.6s; }
.hero-section .wp-block-cover__inner-container > *:nth-child(4) { animation-delay: 0.8s; }
.hero-section .wp-block-cover__inner-container > *:nth-child(5) { animation-delay: 1s; }

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Hero CTA buttons */
.hero-section .wp-block-button.is-style-fill .wp-block-button__link {
  background: white !important;
  color: black !important;
  padding: 1rem 2rem !important;
  border-radius: 9999px !important;
  font-weight: 500 !important;
  transition: all 0.3s;
}

.hero-section .wp-block-button.is-style-fill .wp-block-button__link:hover {
  background: rgba(255, 255, 255, 0.9) !important;
  transform: scale(1.05);
}

.hero-section .wp-block-button.is-style-outline .wp-block-button__link {
  background: transparent !important;
  color: white !important;
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
  padding: 1rem 2rem !important;
  border-radius: 9999px !important;
  font-weight: 500 !important;
  transition: all 0.3s;
}

.hero-section .wp-block-button.is-style-outline .wp-block-button__link:hover {
  background: rgba(255, 255, 255, 0.1) !important;
  border-color: rgba(255, 255, 255, 0.4) !important;
}

/* ===== Service Cards ===== */
.service-card {
  position: relative;
  overflow: hidden;
  transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: default;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  background: rgba(255, 255, 255, 0.05) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
}

.service-card:hover,
.service-card:active,
.service-card.touched {
  background: rgba(255, 255, 255, 0.1) !important;
  border-color: rgba(255, 255, 255, 0.2) !important;
}

/* Service time number - color change on hover */
.service-card .service-time {
  transition: color 0.5s;
}

.service-card:hover .service-time,
.service-card:active .service-time,
.service-card.touched .service-time {
  color: var(--wp--preset--color--primary) !important;
}

/* Hover line effect */
.service-card::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--wp--preset--color--primary);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  border-radius: 0 0 1rem 1rem;
}

.service-card:hover::after,
.service-card:active::after,
.service-card.touched::after {
  transform: scaleX(1);
}

/* ===== Value Cards ===== */
.value-card {
  transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.value-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.value-icon {
  width: 4rem;
  height: 4rem;
  margin: 0 auto 1.5rem;
  background: rgba(0, 102, 255, 0.1);
  border-radius: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.5s;
}

.value-card:hover .value-icon {
  background: rgba(0, 102, 255, 0.2);
  transform: scale(1.1);
}

/* ===== Community Cards ===== */
.community-card {
  transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
}

.community-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  border-color: rgba(0, 102, 255, 0.3) !important;
}

/* ===== Coffee Banner ===== */
.coffee-banner {
  position: relative;
  overflow: hidden;
  background: linear-gradient(to bottom right, #fffbeb, #fff7ed) !important;
  border: 1px solid rgba(251, 191, 36, 0.3) !important;
}

.coffee-emoji {
  position: absolute;
  font-size: 2.5rem;
  z-index: 10;
  pointer-events: none;
}

.coffee-emoji-1 {
  top: 1rem;
  right: 1rem;
  animation: bounceEmoji 2s ease-in-out infinite;
}

.coffee-emoji-2 {
  bottom: 1rem;
  left: 1rem;
  animation: bounceEmoji 2.5s ease-in-out infinite;
  animation-delay: 0.5s;
}

@keyframes bounceEmoji {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}

/* ===== FAQ ===== */
.faq-item {
  border: 1px solid rgba(229, 229, 229, 0.5);
  background: white;
  border-radius: 0.75rem;
  overflow: hidden;
  transition: border-color 0.3s;
  margin-bottom: 0.75rem;
}

.faq-item:hover {
  border-color: #e5e5e5;
}

.faq-question {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem;
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
  font-weight: 500;
  font-size: 1rem;
  color: hsl(var(--foreground));
  font-family: inherit;
}

.faq-question svg {
  width: 1.25rem;
  height: 1.25rem;
  color: hsl(var(--muted-foreground));
  transition: transform 0.3s;
  flex-shrink: 0;
}

.faq-item.open .faq-question svg {
  transform: rotate(180deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: all 0.3s ease-out;
}

.faq-item.open .faq-answer {
  max-height: 10rem;
  padding-bottom: 1.25rem;
}

.faq-answer p {
  padding: 0 1.25rem;
  color: hsl(var(--muted-foreground));
  font-weight: 300;
  line-height: 1.6;
}

/* ===== Contact Items ===== */
.contact-card {
  transition: all 0.3s;
}

.contact-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.contact-item-link {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.25rem;
  background: white;
  border: 1px solid rgba(229, 229, 229, 0.5);
  border-radius: 0.75rem;
  text-decoration: none;
  color: inherit;
  transition: all 0.3s;
  margin-bottom: 1rem;
}

.contact-item-link:hover {
  border-color: #e5e5e5;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.contact-item-link.whatsapp {
  background: rgba(37, 211, 102, 0.1);
  border-color: rgba(37, 211, 102, 0.3);
}

.contact-item-link.whatsapp:hover {
  border-color: rgba(37, 211, 102, 0.5);
}

.contact-item-icon {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.contact-item-icon.primary-bg {
  background: rgba(0, 102, 255, 0.1);
}

.contact-item-icon.whatsapp-bg {
  background: rgba(37, 211, 102, 0.2);
}

.contact-item-label {
  font-size: 0.875rem;
  color: hsl(var(--muted-foreground));
}

.contact-item-value {
  font-weight: 500;
  color: hsl(var(--foreground));
}

/* ===== Prayer Card ===== */
.prayer-card {
  padding: 2rem;
  background: white;
  border: 1px solid rgba(229, 229, 229, 0.5);
  border-radius: 0.75rem;
}

.prayer-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.prayer-icon {
  width: 2.5rem;
  height: 2.5rem;
  background: rgba(0, 102, 255, 0.1);
  border-radius: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.prayer-btn {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem;
  background: hsl(var(--foreground));
  color: hsl(220 30% 96%);
  font-weight: 500;
  border-radius: 0.5rem;
  transition: background 0.3s;
  border: none;
  cursor: pointer;
  text-decoration: none;
  font-size: 0.875rem;
}

.prayer-btn:hover {
  background: hsl(var(--foreground) / 0.9);
  color: hsl(220 30% 96%);
}

/* ===== CTA / Welcome Card ===== */
.cta-card {
  position: relative;
  padding: 2rem;
  background: hsl(var(--foreground));
  color: white;
  border-radius: 1rem;
  overflow: hidden;
  margin-top: 1rem;
}

.cta-card h3 {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  color: white;
}

.cta-card p {
  color: rgba(255, 255, 255, 0.7);
  font-weight: 300;
  margin-bottom: 1.5rem;
}

/* ===== Map Placeholder ===== */
.map-container {
  max-width: 72rem;
  margin: 0 auto;
  border: 1px solid rgba(229, 229, 229, 0.5);
  background: white;
  border-radius: 1rem;
  overflow: hidden;
}

.map-header {
  padding: 1.5rem;
  border-bottom: 1px solid rgba(229, 229, 229, 0.5);
  display: flex;
  align-items: center;
  gap: 1rem;
}

.map-header-left {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.map-icon {
  width: 3rem;
  height: 3rem;
  background: rgba(0, 102, 255, 0.1);
  border-radius: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.map-clean-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem;
  background: hsl(var(--muted) / 0.3);
}

.map-clean-icon {
  width: 3rem;
  height: 3rem;
  background: rgba(0, 102, 255, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
}

.map-clean-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  background: hsl(var(--foreground));
  color: white;
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: 9999px;
  border: none;
  cursor: pointer;
  transition: background 0.3s;
  text-decoration: none;
}

.map-clean-btn:hover {
  background: hsl(var(--foreground) / 0.9);
  color: white;
}

.map-clean-hint {
  font-size: 0.75rem;
  color: hsl(var(--muted-foreground));
  margin-top: 0.75rem;
}

/* ===== Meaning Section ===== */
.meaning-section {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.hebrew-card {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  border-radius: 1rem;
  padding: 1.5rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.hebrew-card:hover {
  border-color: rgba(0, 102, 255, 0.5);
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-4px);
}

/* Tags */
.meaning-tags .wp-block-button.is-style-outline .wp-block-button__link {
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
  color: rgba(255, 255, 255, 0.6) !important;
  background: transparent !important;
  font-size: 0.875rem !important;
  font-weight: 500 !important;
  padding: 0.75rem 1.5rem !important;
  transition: all 0.3s;
}

.meaning-tags .wp-block-button.is-style-outline .wp-block-button__link:hover {
  border-color: var(--wp--preset--color--primary) !important;
  color: var(--wp--preset--color--primary) !important;
}

/* ===== Services Section ===== */
.services-section {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* ===== Scroll Animations ===== */
.scroll-animate {
  opacity: 0;
  transform: translateY(3rem);
  transition: all 1s cubic-bezier(0.16, 1, 0.3, 1);
}

.scroll-animate.visible {
  opacity: 1;
  transform: translateY(0);
}

.scroll-animate[data-delay="1"] { transition-delay: 0.1s; }
.scroll-animate[data-delay="2"] { transition-delay: 0.2s; }
.scroll-animate[data-delay="3"] { transition-delay: 0.3s; }
.scroll-animate[data-delay="4"] { transition-delay: 0.4s; }
.scroll-animate[data-delay="5"] { transition-delay: 0.5s; }

/* ===== Footer ===== */
.site-footer {
  background: hsl(var(--foreground)) !important;
  color: white;
}

.site-footer .wp-block-navigation-item a {
  color: #a0a0a0 !important;
  transition: color 0.3s;
}

.site-footer .wp-block-navigation-item a:hover {
  color: white !important;
}

.site-footer .wp-block-social-links .wp-social-link {
  transition: transform 0.2s, opacity 0.2s;
}

.site-footer .wp-block-social-links .wp-social-link:hover {
  transform: translateY(-2px);
  opacity: 0.8;
}

/* ===== Responsive ===== */
@media (max-width: 782px) {
  .hero-section h1 {
    font-size: 3rem !important;
  }

  .services-section h2 {
    font-size: 3rem !important;
  }

  .meaning-section h2 {
    font-size: 3.5rem !important;
  }

  .site-header {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
}

/* ===== Animations ===== */
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}

/* Scroll indicator */
.hero-scroll {
  position: absolute;
  bottom: 2.5rem;
  left: 50%;
  transform: translateX(-50%);
  opacity: 0;
  transition: opacity 1s;
  text-align: center;
}

.hero-scroll.visible {
  opacity: 1;
}

.hero-scroll span {
  display: block;
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.5);
  margin-bottom: 0.5rem;
}

.hero-scroll svg {
  color: rgba(255, 255, 255, 0.5);
  animation: bounce 1s ease-in-out infinite;
}

/* ===== Datenschutz Footnote ===== */
.datenschutz-footnote {
  font-size: 0.6875rem;
  line-height: 1.5;
  color: rgba(0, 0, 0, 0.6);
}

.datenschutz-footnote a {
  color: var(--wp--preset--color--primary);
}

/* ===== Utility ===== */
.text-muted-fg {
  color: hsl(var(--muted-foreground));
}

/* Hide admin bar overlap */
body.admin-bar .site-header {
  top: 32px;
}

@media (max-width: 782px) {
  body.admin-bar .site-header {
    top: 46px;
  }
}