/* edirnespamass.com — ek stiller */
:root {
  --grain: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
}

/* Mobil: istenmeyen yatay kaydırma */
html {
  overflow-x: hidden;
}
body {
  overflow-x: hidden;
}

.grain::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: var(--grain);
  opacity: 0.35;
  mix-blend-mode: multiply;
}

/* Tam ekran yükseklik: mobil adres çubuğu açılıp kapanınca svh sabit kalmasın diye dvh */
.hero-section {
  min-height: 100svh;
  min-height: 100dvh;
}

.hero-section__inner {
  min-height: 100svh;
  min-height: 100dvh;
}

/* Mobil: tam ekran zorunluluğunu gevşet — hero daha az dikey yer kaplar */
@media (max-width: 767px) {
  .hero-section:not(#home-hero),
  .hero-section__inner {
    min-height: 82svh;
    min-height: 82dvh;
  }

  #home-hero.hero-section {
    min-height: 0;
  }

  body.home-bottom-cta .wa-float {
    display: none !important;
  }
}

/* Dar ekran: cephe / tabela üst bölgede — kırpmayı üste yaklaştır */
.hero-photo {
  object-position: 50% 8%;
}

@media (min-aspect-ratio: 16/10) {
  .hero-photo {
    object-position: 50% 0%;
  }
}

@media (max-aspect-ratio: 9/17) {
  .hero-photo {
    object-position: 50% 10%;
  }
}

.hero-heading {
  text-wrap: balance;
}

/* Hero: foto üstünde okunabilirlik; yeşil primary yerine nötr siyah tonları */
.hero-overlay {
  background:
    linear-gradient(105deg, rgba(0, 0, 0, 0.72) 0%, rgba(0, 0, 0, 0.28) 48%, rgba(0, 0, 0, 0.45) 100%),
    linear-gradient(180deg, rgba(0, 0, 0, 0.45) 0%, transparent 42%, rgba(0, 0, 0, 0.75) 100%);
}

@keyframes float-soft {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-6px);
  }
}

.animate-float-soft {
  animation: float-soft 7s ease-in-out infinite;
}

@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(28px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.reveal {
  opacity: 0;
}

.reveal.is-visible {
  animation: fade-up 0.85s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.stagger-1 {
  animation-delay: 0.08s;
}
.stagger-2 {
  animation-delay: 0.16s;
}
.stagger-3 {
  animation-delay: 0.24s;
}

.nav-scrolled {
  box-shadow: 0 12px 40px rgba(6, 27, 14, 0.08);
  background-color: rgba(250, 249, 246, 0.92) !important;
}

/* Desktop submenu: mouse geçişinde kapanmasın (hover köprüsü) */
.nav-submenu-panel {
  position: absolute;
}

.nav-submenu-panel::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: -14px; /* mt-3 (~12px) + küçük tolerans */
  height: 16px;
}

/* Header yüksekliği (daha kompakt) */
#site-nav > div {
  padding-top: 0.5rem !important;
  padding-bottom: 0.5rem !important;
}

/* Dil seçici */
.lang-btn.active {
  color: #775a19;
  font-weight: 700;
}

.lang-btn:not(.active) {
  color: rgba(6, 27, 14, 0.45);
}

.lang-btn {
  touch-action: manipulation;
}

@media (max-width: 767px) {
  #site-nav > div.mx-auto.flex.items-center.justify-between {
    gap: 0.5rem;
    min-width: 0;
  }

  #site-nav .flex.items-center.gap-3 {
    gap: 0.25rem;
    flex-shrink: 0;
    min-width: 0;
  }

  #site-nav .flex.items-center.gap-3 > [role="group"][aria-label="Dil"] {
    flex-shrink: 0;
    white-space: nowrap;
  }

  #site-nav .flex.items-center.gap-3 .lang-btn {
    padding-left: 0.45rem;
    padding-right: 0.45rem;
  }

  .brand-badge--header {
    width: 64px;
    height: 64px;
    border-radius: 22px;
  }

  .brand-badge--header .brand-logo {
    width: 38px;
    height: 38px;
    transform: scale(1.32);
    transform-origin: center center;
  }

  .hero-section__inner {
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  #nav-mobile {
    max-height: min(85dvh, 640px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
}

html[lang="tr"] .only-en {
  display: none !important;
}

html[lang="en"] .only-tr {
  display: none !important;
}

/* Logo: sadece logo (arka plan yok) */
.brand-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent !important;
  box-shadow: none !important; /* Tailwind ring (box-shadow) dahil */
}

.brand-badge--header {
  width: 88px;
  height: 88px;
  border-radius: 32px; /* kare değil, yumuşak köşe */
}

.brand-badge--footer {
  width: 68px;
  height: 68px;
  border-radius: 24px;
  box-shadow: none !important;
}

.brand-badge--footer .brand-logo {
  width: 54px;
  height: 54px;
  object-fit: contain;
}

.brand-logo {
  width: 44px;
  height: 44px;
  object-fit: contain;
}

/* Header'da logo daha büyük dursun */
.brand-badge--header .brand-logo {
  width: 72px;
  height: 72px;
  transform: scale(1.85);
  transform-origin: left center;
}

@media (min-width: 768px) {
  .brand-badge--header {
    width: 96px;
    height: 96px;
    border-radius: 34px;
  }

  .brand-badge--header .brand-logo {
    width: 78px;
    height: 78px;
    transform: scale(1.95);
  }
}

/* Preloader */
.preloader-lock {
  overflow: hidden !important;
}

.spa-preloader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(250, 249, 246, 0.18);
  backdrop-filter: blur(18px) saturate(1.05);
}

.spa-preloader__logo-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 6px 0;
  position: relative;
}

@keyframes spa-preloader-pop {
  0% {
    opacity: 0;
    transform: translateY(10px) scale(0.985);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.spa-preloader__logo {
  width: min(58vw, 220px);
  height: min(58vw, 220px);
  object-fit: contain;
  filter: drop-shadow(0 16px 32px rgba(6, 27, 14, 0.18));
  animation: spa-preloader-pop 620ms cubic-bezier(0.22, 1, 0.36, 1) both,
    spa-preloader-breathe 1180ms ease-in-out 650ms infinite;
}

@keyframes spa-preloader-breathe {
  0%,
  100% {
    transform: scale(1);
    filter: drop-shadow(0 16px 32px rgba(6, 27, 14, 0.18));
  }
  50% {
    transform: scale(1.03);
    filter: drop-shadow(0 18px 40px rgba(6, 27, 14, 0.22));
  }
}

.spa-preloader__halo {
  position: absolute;
  width: min(86vw, 420px);
  height: min(86vw, 420px);
  border-radius: 999px;
  background: radial-gradient(
    circle at 50% 50%,
    rgba(119, 90, 25, 0.18) 0%,
    rgba(119, 90, 25, 0.08) 35%,
    rgba(6, 27, 14, 0.0) 68%
  );
  filter: blur(2px);
  opacity: 0.9;
  animation: spa-preloader-halo 1250ms ease-in-out infinite;
}

@keyframes spa-preloader-halo {
  0%,
  100% {
    transform: scale(0.92);
    opacity: 0.75;
  }
  50% {
    transform: scale(1.06);
    opacity: 1;
  }
}

.spa-preloader--hide {
  animation: spa-preloader-hide 460ms ease-out forwards;
}

@keyframes spa-preloader-hide {
  to {
    opacity: 0;
    transform: translateY(-8px);
    pointer-events: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .spa-preloader__logo,
  .spa-preloader__halo,
  .spa-preloader--hide {
    animation: none !important;
  }
}

/* Sabit WhatsApp (sağ alt, tüm sayfalar) */
.wa-float {
  position: fixed;
  z-index: 60;
  right: max(1rem, env(safe-area-inset-right, 0px));
  bottom: max(1rem, env(safe-area-inset-bottom, 0px));
  display: flex;
  align-items: center;
  justify-content: center;
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 9999px;
  background: #25d366;
  color: #fff;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.28);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.wa-float:hover {
  transform: scale(1.06);
  box-shadow: 0 6px 28px rgba(0, 0, 0, 0.32);
}

.wa-float:focus-visible {
  outline: 3px solid #25d366;
  outline-offset: 3px;
}

.wa-float__icon {
  display: flex;
  line-height: 0;
}

@media (prefers-reduced-motion: reduce) {
  .wa-float:hover {
    transform: none;
  }
}

/* Üst bar site içi arama */
body.site-search-open {
  overflow: hidden;
}

.site-search {
  position: fixed;
  inset: 0;
  z-index: 85;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: max(5rem, env(safe-area-inset-top)) 1rem 1rem;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.site-search--open {
  pointer-events: auto;
  opacity: 1;
  visibility: visible;
}

.site-search__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(6, 27, 14, 0.45);
  backdrop-filter: blur(4px);
}

.site-search__panel {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 32rem;
  max-height: calc(100dvh - 5.5rem);
  max-height: calc(100vh - 5.5rem);
  overflow: hidden;
}

@media (max-width: 767px) {
  .site-search {
    padding-left: max(0.75rem, env(safe-area-inset-left, 0px));
    padding-right: max(0.75rem, env(safe-area-inset-right, 0px));
    align-items: stretch;
    padding-top: max(4.5rem, env(safe-area-inset-top, 0px));
  }

  .site-search__panel {
    max-height: min(78dvh, calc(100dvh - 5rem));
    max-height: min(78vh, calc(100vh - 5rem));
    margin-left: auto;
    margin-right: auto;
  }
}

.site-search__input:focus {
  outline: none;
}

.site-search__hit:focus-visible {
  outline: 2px solid #775a19;
  outline-offset: 2px;
}

.site-search__results a {
  text-decoration: none;
}

/* Blog: zengin metin gövdesi (DOMPurify sonrası) */
.blog-post-body {
  overflow-wrap: anywhere;
  word-wrap: break-word;
}
.blog-post-body a {
  color: #775a19;
  text-decoration: underline;
}
.blog-post-body a:hover {
  color: #061b0e;
}
.blog-post-body img {
  max-width: 100%;
  height: auto;
  border-radius: 0.75rem;
}
.blog-post-body blockquote {
  border-left: 4px solid rgba(119, 90, 25, 0.45);
  padding-left: 1rem;
  margin: 1rem 0;
  font-style: italic;
}
