/* ============================================
   HIZIR DINLER - İNTERAKTİF KATMAN
   Bu dosya temanın üzerine eklenir, hiçbir
   temel stili silmez. Renkleri kendi temanla
   uyumlu tutmaya çalıştım (bordo/kızıl vurgu,
   krem/koyu zemin).
   ============================================ */

:root {
  --hizir-accent: #8b1e1e;      /* temandaki "vivid-red" tonuna yakın */
  --hizir-accent-soft: #b04b4b;
  --hizir-ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ---------- 1. ANA MENÜ LİNKLERİ ---------- */
/* Alttan büyüyen zarif bir çizgi animasyonu */
.wp-block-navigation-item > .wp-block-navigation-item__content {
  position: relative;
  transition: color 0.3s var(--hizir-ease);
}

.wp-block-navigation-item > .wp-block-navigation-item__content::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 0%;
  height: 1px;
  background-color: currentColor;
  transition: width 0.35s var(--hizir-ease);
}

.wp-block-navigation-item:hover > .wp-block-navigation-item__content::after,
.wp-block-navigation-item:focus-within > .wp-block-navigation-item__content::after {
  width: 100%;
}

.wp-block-navigation-item:hover > .wp-block-navigation-item__content {
  letter-spacing: 0.5px;
}

/* ---------- 2. ALT MENÜLER (KİTAPLAR, ÖLÇME ARAÇLARI) ---------- */
/* Açılırken sert "flaş" yerine yumuşak kayma + solma */
.wp-block-navigation__submenu-container {
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity 0.28s var(--hizir-ease), transform 0.28s var(--hizir-ease);
  pointer-events: none;
}

.wp-block-navigation-item:hover > .wp-block-navigation__submenu-container,
.wp-block-navigation-item:focus-within > .wp-block-navigation__submenu-container,
.wp-block-navigation-submenu.hizir-submenu-open > .wp-block-navigation__submenu-container {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

/* Ok işareti - hover'da yumuşak dönüş */
.wp-block-navigation__submenu-icon {
  transition: transform 0.3s var(--hizir-ease);
}

.wp-block-navigation-item:hover > .wp-block-navigation-item__content .wp-block-navigation__submenu-icon,
.wp-block-navigation-submenu.hizir-submenu-open .wp-block-navigation__submenu-icon {
  transform: rotate(180deg);
}

/* Alt menü linkleri de tek tek hafif kaysın */
.wp-block-navigation__submenu-container .wp-block-navigation-item {
  transition: transform 0.25s var(--hizir-ease), opacity 0.25s var(--hizir-ease);
}

.wp-block-navigation-item:hover .wp-block-navigation__submenu-container .wp-block-navigation-item:hover {
  transform: translateX(4px);
}

/* ---------- 3. BUTONLAR VE LİNKLER (satın al, gönder, vs.) ---------- */
.wp-block-button__link,
.wp-block-search__button,
input[type="submit"],
button[type="submit"] {
  position: relative;
  overflow: hidden;
  transition: transform 0.25s var(--hizir-ease),
              box-shadow 0.25s var(--hizir-ease),
              background-color 0.25s var(--hizir-ease);
}

.wp-block-button__link:hover,
.wp-block-search__button:hover,
input[type="submit"]:hover,
button[type="submit"]:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
}

.wp-block-button__link:active,
input[type="submit"]:active,
button[type="submit"]:active {
  transform: translateY(0);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

/* İçerik içindeki normal metin linkleri (BURAYA tıklayın vb.) */
.entry-content a:not(.wp-block-button__link),
.wp-block-post-content a:not(.wp-block-button__link) {
  background-image: linear-gradient(var(--hizir-accent), var(--hizir-accent));
  background-repeat: no-repeat;
  background-position: 0 100%;
  background-size: 0% 1px;
  transition: background-size 0.3s var(--hizir-ease);
  padding-bottom: 1px;
}

.entry-content a:not(.wp-block-button__link):hover,
.wp-block-post-content a:not(.wp-block-button__link):hover {
  background-size: 100% 1px;
}

/* ---------- 4. KİTAP KAPAKLARI / GÖRSELLER ---------- */
/* Slideshow ve tekil görsellerde hafif kaldırma efekti */
.wp-block-jetpack-slideshow img,
.wp-block-image img,
.wp-block-post-featured-image img {
  transition: transform 0.5s var(--hizir-ease), filter 0.5s var(--hizir-ease);
}

.wp-block-image:hover img {
  transform: scale(1.02);
}

.wp-block-post-featured-image:hover img {
  transform: scale(1.03);
}

/* ---------- 5. SAYFA İÇİ GİRİŞ ANİMASYONU (scroll reveal) ---------- */
/* JS tarafından .hizir-reveal sınıfı eklenir, görünür olunca .hizir-visible eklenir */
.hizir-reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s var(--hizir-ease), transform 0.7s var(--hizir-ease);
}

.hizir-reveal.hizir-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Erişilebilirlik: animasyonu istemeyen kullanıcılar için */
@media (prefers-reduced-motion: reduce) {
  .hizir-reveal,
  .wp-block-button__link,
  .wp-block-image img,
  .wp-block-navigation-item > .wp-block-navigation-item__content::after,
  .wp-block-navigation__submenu-container {
    transition: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
}

/* ---------- 6. MOBİL MENÜ (hamburger) ANİMASYONU ---------- */
.wp-block-navigation__responsive-container-open svg,
.wp-block-navigation__responsive-container-close svg {
  transition: transform 0.3s var(--hizir-ease);
}

.wp-block-navigation__responsive-container-open:hover svg {
  transform: rotate(90deg);
}
