/* Mobil: yatay taşma, metin ölçüsü, ana gövde */
html {
  overflow-x: hidden;
}
body {
  overflow-x: hidden;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
@media (max-width: 767px) {
  body {
    /* Alt sabit menü + güvenli alan (menü yüksekliği ile uyumlu, çift boşluk yok) */
    padding-bottom: calc(3.5rem + env(safe-area-inset-bottom, 0px));
  }
}
main {
  min-width: 0;
}

/* Mobil header çekmece */
html.mentidea-nav-open {
  overflow: hidden;
}
html.mentidea-nav-open body {
  overflow: hidden;
}

.mentidea-nav-drawer {
  pointer-events: none;
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.22s ease, visibility 0.22s ease;
}
.mentidea-nav-drawer.is-open {
  pointer-events: auto;
  visibility: visible;
  opacity: 1;
}
.mentidea-nav-drawer .mentidea-nav-backdrop {
  opacity: 0;
  transition: opacity 0.22s ease;
}
.mentidea-nav-drawer.is-open .mentidea-nav-backdrop {
  opacity: 1;
}
.mentidea-nav-drawer .mentidea-nav-panel {
  transform: translateX(100%);
  transition: transform 0.28s cubic-bezier(0.32, 0.72, 0, 1);
}
.mentidea-nav-drawer.is-open .mentidea-nav-panel {
  transform: translateX(0);
}

#mentidea-nav-toggle .mentidea-nav-icon-close {
  display: none;
}
#mentidea-nav-toggle[aria-expanded='true'] .mentidea-nav-icon-open {
  display: none;
}
#mentidea-nav-toggle[aria-expanded='true'] .mentidea-nav-icon-close {
  display: block;
}

@media (prefers-reduced-motion: reduce) {
  .mentidea-nav-drawer,
  .mentidea-nav-drawer .mentidea-nav-backdrop,
  .mentidea-nav-drawer .mentidea-nav-panel {
    transition-duration: 0.01ms !important;
  }
}
.touch-scroll {
  -webkit-overflow-scrolling: touch;
}

.mobile-bottom-nav {
  box-sizing: border-box;
  position: fixed !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  width: 100% !important;
  max-width: none !important;
  min-width: 0;
  margin: 0 !important;
  box-shadow: 0 -8px 26px rgba(58, 28, 56, 0.12);
  /* Güvenli alan: yalnızca iç dolgu, çubuk her zaman ekran altına yapışık */
  padding-left: max(0.25rem, env(safe-area-inset-left, 0px));
  padding-right: max(0.25rem, env(safe-area-inset-right, 0px));
  padding-bottom: env(safe-area-inset-bottom, 0px);
  padding-top: 0.35rem;
}
.mobile-bottom-nav__link {
  -webkit-tap-highlight-color: transparent;
  flex: 1 1 0%;
  min-width: 0;
  justify-content: center;
}

/* Global tema: ornekprofil.jpg paletine gecis */
body {
  background: #f3eff2 !important;
  color: #332337 !important;
}

.bg-ink {
  background-color: #f3eff2 !important;
}
.bg-panel {
  background-color: #ffffff !important;
}
.bg-card {
  background-color: #fcf9fb !important;
}
.border-line {
  border-color: #e9deea !important;
}

.text-white {
  color: #38243c !important;
}
.text-gray-200 {
  color: #4c3851 !important;
}
.text-gray-300 {
  color: #634f69 !important;
}
.text-gray-400 {
  color: #7a687f !important;
}
.text-gray-500 {
  color: #9b8da1 !important;
}
.text-gray-600 {
  color: #b4a8b8 !important;
}
.text-brand {
  color: #5e1f56 !important;
}

.bg-brand,
.hover\:bg-brand-hover:hover {
  background-color: #5e1f56 !important;
}
.hover\:bg-brand:hover {
  background-color: #5e1f56 !important;
}
.bg-brand.text-white,
.bg-brand .text-white,
.hover\:bg-brand-hover:hover .text-white,
.hover\:bg-brand:hover .text-white {
  color: #fff !important;
}

.border-brand,
.hover\:border-brand:hover {
  border-color: #5e1f56 !important;
}

/* Eski siyah utility kullanimlarini yeni palete yaklastir */
[class*='bg-black/'] {
  background-color: rgba(74, 45, 72, 0.32) !important;
}
[class*='from-black'] {
  --tw-gradient-from: rgba(74, 45, 72, 0.92) var(--tw-gradient-from-position) !important;
  --tw-gradient-to: rgba(74, 45, 72, 0) var(--tw-gradient-to-position) !important;
}
[class*='via-black'] {
  --tw-gradient-stops: var(--tw-gradient-from), rgba(74, 45, 72, 0.34) var(--tw-gradient-via-position), var(--tw-gradient-to) !important;
}
[class*='to-black'] {
  --tw-gradient-to: rgba(243, 239, 242, 0.12) var(--tw-gradient-to-position) !important;
}

/* Scrollable rails — scrollbar gizli */
.hide-scrollbar::-webkit-scrollbar {
  display: none;
}
.hide-scrollbar {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.hero-gradient {
  background: radial-gradient(1200px 600px at 70% 20%, rgba(94, 31, 86, 0.16), transparent 60%),
    radial-gradient(800px 400px at 20% 80%, rgba(241, 223, 184, 0.4), transparent 55%);
}

.card-hover {
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.card-hover:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 36px rgba(58, 28, 56, 0.14);
  border-color: rgba(94, 31, 86, 0.28);
}
@media (hover: none) {
  .card-hover:hover {
    transform: none;
  }
}

/* Popüler alanlar: tek satır, eşit genişlik, kompakt ölçüler */
.home-categories-row {
  display: flex;
  flex-wrap: nowrap;
  align-items: stretch;
  gap: clamp(0.2rem, 1.1vw, 0.65rem);
  margin-top: 1.5rem;
}
@media (min-width: 640px) {
  .home-categories-row {
    margin-top: 2rem;
  }
}

.home-categories-row__item {
  flex: 1 1 0%;
  min-width: 0;
}

.home-categories-row .home-cat-icon {
  width: clamp(1.75rem, 5.2vw, 2.75rem);
  height: clamp(1.75rem, 5.2vw, 2.75rem);
}

.home-categories-row .home-cat-icon svg {
  width: clamp(0.875rem, 2.6vw, 1.375rem) !important;
  height: clamp(0.875rem, 2.6vw, 1.375rem) !important;
}

.home-categories-row .home-cat-name {
  font-size: clamp(0.5625rem, 1.65vw, 0.8125rem);
  word-break: break-word;
}

.home-categories-row .home-cat-meta {
  font-size: clamp(0.5rem, 1.35vw, 0.6875rem);
  line-height: 1.2;
  white-space: nowrap;
}

/* Önerilen uzmanlar / Trend konular: yatay kaydırma (scrollbar yok; butonlarla adım) */
.home-scroll-shell {
  position: relative;
  width: 100%;
  min-width: 0;
}

.home-scroll-stage {
  width: 100%;
  min-width: 0;
}

.home-scroll-track {
  display: flex;
  flex-wrap: nowrap;
  align-items: stretch;
  gap: 0.875rem;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  padding-bottom: 0.35rem;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-x;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.home-scroll-track::-webkit-scrollbar {
  display: none;
  height: 0;
  width: 0;
}

@media (min-width: 640px) {
  .home-scroll-track {
    gap: 1.125rem;
  }
}

.home-scroll-item {
  flex: 0 0 auto;
}

/* Kenar solukluğu (derinlik hissi) */
.home-scroll-shell::before,
.home-scroll-shell::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0.35rem;
  width: 3.5rem;
  z-index: 5;
  pointer-events: none;
}
.home-scroll-shell::before {
  left: 0;
  background: linear-gradient(90deg, rgba(243, 239, 242, 0.98) 0%, transparent 100%);
}
.home-scroll-shell::after {
  right: 0;
  background: linear-gradient(270deg, rgba(243, 239, 242, 0.98) 0%, transparent 100%);
}

@media (max-width: 639px) {
  .home-scroll-shell::before,
  .home-scroll-shell::after {
    width: 2rem;
  }
}

/* Başlık satırı + cam efektli kaydır kontrolleri */
.home-scroll-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.75rem 1rem;
}
.home-scroll-head__title {
  min-width: 0;
}
.home-scroll-pillbar {
  display: inline-flex;
  align-items: center;
  gap: 0.15rem;
  padding: 0.25rem 0.35rem;
  border-radius: 999px;
  border: 1px solid rgba(94, 31, 86, 0.14);
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.9) 0%, rgba(252, 249, 251, 0.92) 50%, rgba(241, 223, 184, 0.32) 100%);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 8px 26px rgba(58, 28, 56, 0.12), 0 0 0 1px rgba(94, 31, 86, 0.05) inset, 0 1px 0 rgba(255, 255, 255, 0.9) inset;
  flex-shrink: 0;
}
.home-scroll-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.65rem;
  height: 2.65rem;
  border-radius: 999px;
  border: none;
  background: transparent;
  color: rgba(66, 43, 69, 0.85);
  cursor: pointer;
  transition: background 0.22s ease, color 0.2s ease, transform 0.15s ease, opacity 0.2s ease, box-shadow 0.22s ease;
}
.home-scroll-pill:hover:not(:disabled) {
  background: radial-gradient(circle at 30% 25%, rgba(94, 31, 86, 0.28) 0%, rgba(94, 31, 86, 0.1) 55%, transparent 70%);
  color: #3b2440;
  box-shadow: 0 0 18px rgba(94, 31, 86, 0.18);
}
.home-scroll-pill:active:not(:disabled) {
  transform: scale(0.92);
}
.home-scroll-pill:disabled {
  opacity: 0.28;
  cursor: not-allowed;
  box-shadow: none;
}
.home-scroll-pillbar__divider {
  width: 1px;
  height: 1.35rem;
  background: linear-gradient(180deg, transparent, rgba(94, 31, 86, 0.2), transparent);
  flex-shrink: 0;
  margin: 0 0.1rem;
}
.home-scroll-pill svg {
  width: 1.2rem;
  height: 1.2rem;
}

/* Header hesap dropdown */
.mentidea-account-dropdown--open .mentidea-account-chevron {
  transform: rotate(180deg);
}
.mentidea-account-dropdown--open .mentidea-account-trigger {
  border-color: rgba(94, 31, 86, 0.32) !important;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.65) inset,
    0 8px 28px rgba(58, 28, 56, 0.12) !important;
}
@media (prefers-reduced-motion: reduce) {
  .mentidea-account-chevron,
  .mentidea-account-trigger {
    transition-duration: 0.01ms !important;
  }
  .mentidea-account-dropdown--open .mentidea-account-chevron {
    transform: rotate(180deg);
  }
}

/* --- Site header (mor bar): yazılar, logo, arama + hesap birlikte --- */
.site-header {
  background-color: #5e1f56 !important;
}
.site-header .site-header-toolbar {
  border-top-color: rgba(255, 255, 255, 0.18) !important;
}
@media (min-width: 640px) {
  .site-header .site-header-toolbar {
    border-top-color: transparent !important;
  }
}

/* Ana menü: global .text-gray-* üzerine yaz */
.site-header nav[aria-label='Ana menü'] a {
  color: #fff !important;
  font-weight: 500;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.12);
}
.site-header nav[aria-label='Ana menü'] a:hover {
  color: #ffffff !important;
  background-color: rgba(255, 255, 255, 0.16) !important;
  text-shadow: none;
}
.site-header nav[aria-label='Ana menü'] a[class*='bg-brand'] {
  background-color: rgba(255, 255, 255, 0.2) !important;
  color: #ffffff !important;
  font-weight: 600;
  --tw-ring-color: rgba(255, 255, 255, 0.45) !important;
  text-shadow: none;
}

.site-header .site-header-guest-link {
  color: #ffffff !important;
  font-weight: 500;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
}
.site-header .site-header-guest-link:hover {
  color: #ffffff !important;
  background-color: rgba(255, 255, 255, 0.14) !important;
}

.site-header .mentidea-nav-toggle {
  border-color: rgba(255, 255, 255, 0.35) !important;
  background-color: rgba(255, 255, 255, 0.14) !important;
  color: #ffffff !important;
}
.site-header .mentidea-nav-toggle:hover {
  border-color: rgba(255, 255, 255, 0.55) !important;
  background-color: rgba(255, 255, 255, 0.24) !important;
}

/* Logo: mor zeminde net kontrast */
.site-header .site-header-logo {
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.25));
}

/* Arama: cam beyaz kutu, mor header ile uyum */
.site-header .site-header-search {
  background-color: rgba(255, 255, 255, 0.96) !important;
  border-color: rgba(255, 255, 255, 0.45) !important;
  color: #2d1a30 !important;
  box-shadow: 0 2px 14px rgba(0, 0, 0, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.site-header .site-header-search::placeholder {
  color: rgba(94, 31, 86, 0.42) !important;
}
.site-header .site-header-search:focus {
  border-color: rgba(255, 255, 255, 0.75) !important;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.22), 0 4px 18px rgba(0, 0, 0, 0.14), inset 0 1px 0 rgba(255, 255, 255, 1);
}
.site-header .site-header-search-form .pointer-events-none.text-gray-500,
.site-header .site-header-search-form .pointer-events-none svg {
  color: rgba(94, 31, 86, 0.5) !important;
}

/* Hesap tetikleyici: arama ile aynı dil */
.site-header .mentidea-account-trigger {
  background-color: rgba(255, 255, 255, 0.96) !important;
  border-color: rgba(255, 255, 255, 0.45) !important;
  box-shadow: 0 2px 14px rgba(0, 0, 0, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.98) !important;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.site-header .mentidea-account-trigger .text-gray-800 {
  color: #2d1a30 !important;
}
.site-header .mentidea-account-trigger .text-gray-500 {
  color: rgba(94, 31, 86, 0.78) !important;
}
.site-header .mentidea-account-trigger .text-gray-400 {
  color: rgba(94, 31, 86, 0.55) !important;
}
.site-header .mentidea-account-trigger:hover {
  border-color: rgba(255, 255, 255, 0.65) !important;
}

.site-header .mentidea-account-dropdown--open .mentidea-account-trigger {
  border-color: rgba(255, 255, 255, 0.65) !important;
  box-shadow:
    0 0 0 2px rgba(255, 255, 255, 0.25),
    0 8px 28px rgba(0, 0, 0, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 1) !important;
}
.site-header .mentidea-account-dropdown--open .mentidea-account-trigger--compact {
  border-color: rgba(255, 255, 255, 0.65) !important;
  box-shadow:
    0 0 0 2px rgba(255, 255, 255, 0.25),
    0 8px 28px rgba(0, 0, 0, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 1) !important;
}

/* Açılır menü: header ile aynı gölge dili */
.site-header .mentidea-account-menu {
  border-color: rgba(255, 255, 255, 0.35) !important;
  box-shadow: 0 24px 48px -12px rgba(0, 0, 0, 0.28), 0 0 0 1px rgba(255, 255, 255, 0.12) !important;
}
