/* ========== GENEL AYARLAR ========== */
:root {
  --blue: #007bff;
  --light-blue: #e8f6ff;
  --dark: #222;
  --gray: #666;
  --border: #ddd;
}

body {
  margin: 0;
  font-family: 'Lora', serif;
  background: #ffffff;
  color: var(--dark);
  transition: background 0.4s, color 0.4s, opacity 0.5s ease-in-out;
  opacity: 0;
}
body.loaded { opacity: 1; }

/* === HERO === */
.hero {
  text-align: center;
  padding: 0.5px 20px 40px;
  background: linear-gradient(120deg, #e3f2fd, #e0f7fa);
  border-radius: 0 0 30px 30px;
}

.hero-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.hero-title-link {
  color: #004aad;
  text-decoration: none;
  font-weight: 700;
  transition: color 0.3s ease;
}
.hero-title-link:hover { color: #007bff; text-decoration: underline; }

/* 🌙 Üst Butonlar */
.hero-buttons {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  margin: 15px auto 25px auto;
}
.hero-btn {
  display: inline-block;
  background: linear-gradient(135deg, #4b6cb7, #182848);
  color: #fff;
  padding: 10px 18px;
  border-radius: 25px;
  font-size: 0.95rem;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.3s ease;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}
.hero-btn:hover {
  background: linear-gradient(135deg, #6a85b6, #bac8e0);
  color: #222;
  transform: translateY(-2px);
}

/* ========== ARAMA FORMU ========== */
.search-form-modern {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 10px;
  position: relative;
}
.autocomplete-container {
  position: relative;
  width: 100%;
  max-width: 640px;
  margin: 0 auto;
}
.search-box {
  display: flex;
  align-items: center;
  border-radius: 50px;
  overflow: hidden;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.1);
  background: #fff;
}

.search-box input {
  flex: 1;
  border: none;
  padding: 14px 18px;
  font-size: 1rem;
  outline: none;
}
.search-box button {
  background: var(--blue);
  border: none;
  color: #fff;
  font-size: 1.2rem;
  width: 60px;
  height: 48px;
  cursor: pointer;
  transition: background 0.3s;
}
.search-box button:hover { background: #005fa3; }


/* ========== HARFLER ========== */
.harfler-grid { margin-top: 20px; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }

.harfler-grid a { background: var(--light-blue); color: var(--dark); text-decoration: none; padding: 6px 10px; border-radius: 6px; transition: 0.25s ease; }

.harfler-grid a:hover { background: var(--blue); color: #fff; }



/* ========== AUTOCOMPLETE ========== */
.autocomplete-results {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: #fff;
  border: 1px solid #ddd;
  border-top: none;
  z-index: 10;
  max-height: 260px;
  overflow-y: auto;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}
.autocomplete-results li {
  padding: 10px 14px;
  cursor: pointer;
  transition: background 0.2s;
  font-size: 0.95rem;
}
.autocomplete-results li:hover { background: #f0f8ff; }

/* ========== RÜYA SONUÇLARI ========== */
.ruya-sonuclari {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 2rem auto;
  max-width: 800px;
}
.ruya-list {
  list-style: none;
  padding: 0;
  margin: 1rem auto;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  width: 100%;
  max-width: 500px;
  text-align: left;
}
.ruya-list li a {
  display: block;
  text-decoration: none;
  color: var(--dark);
  font-size: 1.05rem;
  background: var(--light-blue);
  padding: 10px 15px;
  border-radius: 8px;
  transition: 0.25s ease;
}
.ruya-list li a:hover { background: var(--blue); color: #fff; }

/* ========== SAYFALAMA ========== */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin: 1.5rem 0 4rem;
  flex-wrap: wrap;
}
.pagination a, .pagination span {
  padding: 6px 12px;
  border-radius: 6px;
  background: var(--light-blue);
  color: var(--dark);
  text-decoration: none;
  transition: 0.25s ease;
}
.pagination a:hover, .pagination .active-page {
  background: var(--blue);
  color: #fff;
  font-weight: bold;
}

/* ========== SIK ARANAN RÜYALAR ========== */
.sik-aranan {
  text-align: center;
  margin: 10px auto;
  max-width: 1000px;
  padding: 0 20px;
}
.sik-aranan h2 { margin-bottom: 15px; font-size: 1.3rem; }
.ruya-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  justify-content: center;
}
.ruya-grid a {
  background: #f8fbff;
  padding: 10px;
  border-radius: 10px;
  color: #0055cc;
  text-decoration: none;
  transition: all 0.2s ease;
  font-weight: 500;
}
.ruya-grid a:hover { background: #e6f0ff; transform: translateY(-2px); }

/* 🌙 Bilgilendirme Sayfaları */
.page-content {
  max-width: 800px;
  margin: 60px auto;
  padding: 30px 20px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
  line-height: 1.7;
  color: #333;
}
.page-content h1 {
  text-align: center;
  font-size: 1.8rem;
  color: #2a2a2a;
  margin-bottom: 25px;
}
.page-content p { font-size: 0.95rem; margin-bottom: 15px; }

/* 🌙 Footer */
.site-footer {
  text-align: center;
  font-size: 0.85rem;
  color: #666;
  background: #f8f8f8;
  padding: 8px 0;
  border-top: 1px solid #e2e2e2;
  line-height: 1.4;
}
.site-footer .footer-links a {
  color: #555;
  margin: 0 6px;
  text-decoration: none;
  font-size: 0.9rem;
}
.site-footer .footer-links a:hover { text-decoration: underline; }

main { padding-bottom: 100px; }
/* === RÜYA DETAY SAYFASI — Modern Ortalanmış Stil === */
.ruya-icerik-sayfasi {
  max-width: 780px;
  margin: 60px auto;                /* Ortalar ve yukarıdan boşluk bırakır */
  padding: 40px 35px;
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.08);
  line-height: 1.75;
  font-size: 1.05rem;
  color: #333;
  transition: all 0.3s ease;
}

/* Başlık */
.ruya-detay h1 {
  font-size: 2.1rem;
  font-weight: 700;
  text-align: center;
  color: #004aad;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
  margin-bottom: 1.8rem;
  letter-spacing: 0.5px;
}

/* İçerik paragrafı */
.ruya-icerik p {
  margin-bottom: 1.2rem;
  text-align: justify;
  color: #333;
}

/* Alt başlıklar */
.ruya-icerik h2,
.ruya-icerik h3 {
  margin-top: 2rem;
  margin-bottom: 0.8rem;
  color: #004aad;
  font-weight: 600;
}

/* Liste düzeni */
.ruya-icerik ul, .ruya-icerik ol {
  margin-left: 1.5rem;
  padding-left: 0.5rem;
}

/* Kalın metin */
.ruya-icerik strong {
  color: #003c99;
}

/* === Dark Mode Uyumu === */
.dark-mode .ruya-icerik-sayfasi {
  background: #1e1e1e;
  color: #e0e0e0;
  box-shadow: 0 4px 14px rgba(255, 255, 255, 0.06);
}

.dark-mode .ruya-detay h1 {
  color: #80d8ff;
  text-shadow: none;
}

.dark-mode .ruya-icerik strong {
  color: #4fc3f7;
}










/* === RÜYA DETAY SAYFASI === */
.ruya-icerik-sayfasi {
  display: flex;
  justify-content: center;
  padding: 2rem 1rem;
  background: #f9fafb;
}

.ruya-detay {
  max-width: 850px;
  width: 100%;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.08);
  padding: 2rem 2.5rem;
  font-family: "Segoe UI", system-ui, sans-serif;
  line-height: 1.75;
  color: #333;
  box-sizing: border-box;
}

.ruya-baslik h1 {
    font-family: 'Playfair Display', serif;

  font-size: 1.9rem;
  text-align: center;
  color: #222;
  margin-bottom: 1.5rem;
  position: relative;
  line-height: 1.3;
}

.ruya-baslik h1 span {
    font-family: 'Playfair Display', serif;

  color: #0074D9;
  font-weight: 600;
}

.ruya-icerik {
 font-family: 'Playfair Display', serif;

  font-size: 1.05rem;
  background: #fefefe;
  padding: 1.2rem 1.5rem;
  border-radius: 12px;
  border: 1px solid #e6e6e6;
}

.ruya-icerik p {
    font-family: 'Playfair Display', serif;

  white-space: pre-line;
  font-size: 1.05rem;
}

.ruya-footer {
  text-align: center;
  margin-top: 2rem;
}

.geri-btn {
  display: inline-block;
  background: #0074D9;
  color: #fff;
  text-decoration: none;
  padding: 0.6rem 1.2rem;
  border-radius: 8px;
  transition: background 0.3s;
  font-weight: 500;
}

.geri-btn:hover {
  background: #005fa3;
}

/* 📱 Mobil Uyum */
@media (max-width: 768px) {
  .ruya-detay {
    padding: 1.2rem 1rem;
    border-radius: 12px;
  }

  .ruya-baslik h1 {
    font-size: 1.4rem;
    margin-bottom: 1rem;
  }

  .ruya-icerik {
    font-size: 1rem;
    padding: 1rem;
  }

  .geri-btn {
    width: 100%;
    padding: 0.8rem;
    font-size: 1rem;
  }
}

/* 📱 Küçük Ekranlar (telefonlar) */
@media (max-width: 480px) {
  .ruya-baslik h1 {
    font-size: 1.25rem;
  }
  .ruya-icerik {
    font-size: 0.95rem;
    padding: 0.8rem;
  }
}


.harf-menu {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.4rem;
  margin: 1.5rem auto;
  max-width: 600px;
}

.harf-menu a {
  display: inline-block;
  background: #f3f4f6;
  color: #333;
  border-radius: 6px;
  padding: 0.4rem 0.7rem;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.25s ease;
  border: 1px solid #e5e7eb;
}

.harf-menu a:hover {
  background: #0074D9;
  color: #fff;
}

@media (max-width: 600px) {
  .harf-menu {
    gap: 0.25rem;
  }

  .harf-menu a {
    padding: 0.3rem 0.5rem;
    font-size: 0.9rem;
  }
}
/* 🌗 Tema geçişi */
body {
  margin: 0;
  font-family: Arial, sans-serif;
  transition: background 0.4s, color 0.4s;
  background: #ffffff;
  color: #222;
}

.dark-mode {
  background: #121212;
  color: #f5f5f5;
}

/* 🌙 Toggle Butonu */
.toggle-container {
  position: relative;
  top: 0;
  right: 0;
  margin-left: 10px;
}

.toggle-btn {
  width: 50px;
  height: 26px;
  background: #ddd;
  border-radius: 30px;
  position: relative;
  cursor: pointer;
  transition: background 0.3s ease-in-out;
}

.toggle-btn::before {
  content: "";
  width: 22px;
  height: 22px;
  background: url("/public/icons/sun.svg") center/cover no-repeat;
  border-radius: 50%;
  position: absolute;
  top: 2px;
  left: 2px;
  transition: transform 0.3s, background 0.3s;
}

/* 🌘 Karanlık mod */
.dark-mode .toggle-btn {
  background: #555;
}

.dark-mode .toggle-btn::before {
  transform: translateX(24px);
  background: url("/public/icons/moon.svg") center/cover no-repeat;
}

/* 🌟 Hover efekti */
.toggle-btn:hover {
  box-shadow: 0 0 8px rgba(255, 221, 87, 0.6);
  transform: scale(1.08);
}


/* 🌘 Aktif (Karanlık Mod) */
.dark-mode .toggle-btn::before {
  transform: translateX(24px);
  background: url("/public/icons/moon.svg") center/cover no-repeat;
}

/* Header hizalaması */


.main-header .logo a {
  text-decoration: none;
  font-size: 1.5rem;
  font-weight: bold;
  color: inherit;
}
.main-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 40px;
  position: relative;
}

.toggle-container {
  position: static;
  margin-left: 15px;
}
/* Başlık satırını yatay hizala */
.hero-title-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px; /* başlık ve toggle arası boşluk */
}

/* Toggle’ın pozisyonunu sadeleştir */
.toggle-container {
  position: relative;
  top: 0;
  right: 0;
  margin-left: 10px;
}

.toggle-btn {
  width: 50px;
  height: 26px;
  background: #ddd;
  border-radius: 30px;
  position: relative;
  cursor: pointer;
  transition: background 0.3s ease-in-out;
  overflow: hidden;
}

.toggle-btn::before {
  content: "";
  width: 22px;
  height: 22px;
  background: url("/public/icons/sun.svg") center/cover no-repeat;
  border-radius: 50%;
  position: absolute;
  top: 2px;
  left: 2px;
  transition: transform 0.3s, background 0.3s;
}

.dark-mode .toggle-btn {
  background: #555;
}


/* 🌗 Tema geçişi yumuşatma */
body {
  transition: background-color 0.5s ease, color 0.5s ease;
}

/* 🌟 Hover efekti (buton parlaması) */
.toggle-btn:hover {
  box-shadow: 0 0 8px rgba(255, 221, 87, 0.6);
  transform: scale(1.08);
}

/* ✨ Geçiş animasyonu — karanlık modda kısa bir “ışık dalgası” */
@keyframes theme-fade {
  0% {
    opacity: 0.8;
    filter: brightness(1.2);
  }
  50% {
    opacity: 1;
    filter: brightness(1);
  }
  100% {
    opacity: 1;
  }
}

.dark-mode {
  animation: theme-fade 0.6s ease-in-out;
}
/* 🌙 Karanlık modda header da kararsın */
.dark-mode .hero,
.dark-mode .main-header {
  background: #1c1c1c !important;
  color: #f5f5f5 !important;
}

/* Başlık linkinin rengi */
.dark-mode .hero-title-link {
  color: #f5f5f5 !important;
}

/* Alt açıklama metni */
.dark-mode .hero p {
  color: #ddd;
}

/* Menü butonları (örnek: Anasayfa, Rüya Nedir) */
.dark-mode .hero-buttons .hero-btn {
  background: #2a2a2a;
  color: #f5f5f5;
  box-shadow: 0 0 5px rgba(255, 221, 87, 0.3);
}

.dark-mode .hero-buttons .hero-btn:hover {
  background: #3a3a3a;
}
.hero, .main-header {
  transition: background 0.5s ease, color 0.5s ease;
}
/* 🌙 Rüya Detay Sayfası - Karanlık Mod */
.dark-mode .ruya-icerik-sayfasi {
  background: #121212;
  color: #f5f5f5;
}

/* İçteki kutu (örnek: beyaz panel) */
.dark-mode .ruya-kutu,
.dark-mode .ruya-detay,
.dark-mode .ruya-card,
.dark-mode .ruya-meaning-box {
  background: #1e1e1e !important;
  border-color: #333 !important;
  color: #ddd !important;
}

/* Rüya başlığı */
.dark-mode .ruya-baslik,
.dark-mode .ruya-baslik h1 {
  color: #ffdd57 !important;
}

/* Rüya anlamı metni */
.dark-mode .ruya-meaning,
.dark-mode .ruya-meaning p {
  color: #e0e0e0 !important;
}

/* "Diğer Rüyalar" butonu */
.dark-mode .ruya-back-btn {
  background: #333 !important;
  color: #ffdd57 !important;
  border: 1px solid #555;
}

.dark-mode .ruya-back-btn:hover {
  background: #444 !important;
  color: #fff !important;
}
/* 🌙 Rüya Detay Sayfası Karanlık Mod */
.dark-mode .ruya-icerik-sayfasi {
  background: #121212 !important;
  color: #f0f0f0;
}

.dark-mode .ruya-detay {
  background: #1a1a1a !important;
  border-radius: 10px;
  padding: 20px;
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.05);
}

.dark-mode .ruya-baslik h1 {
  color: #a8a7f3 !important;
}

.dark-mode .ruya-icerik {
  background: #1e1e1e !important;
  border: 1px solid #333;
  color: #e0e0e0 !important;
  padding: 20px;
  border-radius: 10px;
  transition: background 0.3s ease, color 0.3s ease;
}

.dark-mode .ruya-icerik p {
  color: #e5e5e5 !important;
  line-height: 1.6;
}

.dark-mode .geri-btn {
  background: #333 !important;
  color: #a8a7f3 !important;
  border: 1px solid #555;
  padding: 10px 20px;
  border-radius: 8px;
  text-decoration: none;
  transition: all 0.3s ease;
}

.dark-mode .geri-btn:hover {
  background: #444 !important;
  color: #fff !important;
}






/* 📱 Mobilde Sık Görüntülenen Rüyalar 2 sütun */
.ruya-listesi {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: 1fr; /* varsayılan: tek sütun */
  gap: 10px;
}

.ruya-listesi li {
  background: #fff;
  border-radius: 8px;
  padding: 10px;
  text-align: center;
  transition: transform 0.2s ease;
}

.ruya-listesi li:hover {
  transform: scale(1.03);
}

.ruya-listesi li a {
  text-decoration: none;
  color: #333;
  font-weight: 500;
}

.dark-mode .ruya-listesi li {
  background: #1e1e1e;
}

.dark-mode .ruya-listesi li a {
  color: #f5f5f5;
}

/* 🌙 Mobil görünüm - 2 sütun */
@media (max-width: 768px) {
  .ruya-listesi {
    grid-template-columns: repeat(2, 1fr); /* 2 sütun */
    gap: 12px;
  }

  .ruya-listesi li {
    font-size: 0.95rem;
    padding: 8px;
  }
}



/* 📱 Mobilde Sık Görüntülenen Rüyalar 2 sütun */
.ruya-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr); /* Masaüstü: 4 sütun */
  gap: 15px;
  margin-top: 10px;
}

.ruya-grid a {
  display: block;
  background: #fff;
  border-radius: 8px;
  padding: 10px;
  text-align: center;
  text-decoration: none;
  color: #333;
  font-weight: 500;
  transition: transform 0.2s ease, background 0.3s;
}

.ruya-grid a:hover {
  transform: scale(1.03);
  background: #f3f3f3;
}

/* 🌙 Karanlık mod uyumu */
.dark-mode .ruya-grid a {
  background: #1e1e1e;
  color: #f5f5f5;
}

.dark-mode .ruya-grid a:hover {
  background: #2a2a2a;
}

/* 📱 Mobilde 2 sütun görünüm */
@media (max-width: 768px) {
  .ruya-grid {
    grid-template-columns: repeat(2, 1fr); /* 2 sütun */
    gap: 12px;
  }

  .ruya-grid a {
    font-size: 0.95rem;
    padding: 8px;
  }
}

/* === GECE MODU METİN DÜZELTMELERİ === */
body.dark-mode,
body.dark {
  color: #e8e8e8 !important;
}

body.dark-mode h1,
body.dark-mode h2,
body.dark-mode h3,
body.dark-mode h4,
body.dark-mode h5,
body.dark-mode h6 {
  color: #ffffff !important;
}

body.dark-mode p,
body.dark-mode li,
body.dark-mode span,
body.dark-mode a,
body.dark-mode time {
  color: #d0d0d0 !important;
}

body.dark-mode a:hover {
  color: #66aaff !important;
}

/* Kartlar ve liste görünümü için */
body.dark-mode .article-card,
body.dark-mode .article-block {
  background: #1a1a1a !important;
  border: 1px solid #333;
}

body.dark-mode .article-card h2 a,
body.dark-mode .article-block h2 a {
  color: #ffffff !important;
}

/* Sayfa başlığı */
body.dark-mode .page-title {
  color: #ffffff !important;
}

/* Tarih metni */
body.dark-mode .tarih {
  color: #aaa !important;
}

/* Detay sayfası ana içerik */
body.dark-mode .icerik {
  color: #e0e0e0 !important;
}

body.dark-mode img {
  filter: brightness(0.95) contrast(1.05);
}










/* 🌙 Ek koyu tema düzeltmeleri */

/* Footer renk düzeltmesi */
.dark-mode footer {
  background: #0d0d0d;   /* koyu gri arka plan */
  color: #ccc;           /* açık gri yazı */
}

/* Harf butonları (A, B, C...) */
.dark-mode .harfler-grid a {
  background: #333;       /* koyu gri arka plan */
  color: #eee;            /* açık yazı rengi */
  border: 1px solid #444;
}
.dark-mode .harfler-grid a:hover {
  background: #555;       /* hover’da biraz daha açık gri */
}

/* Arama kutusu alanı */
.dark-mode .search-box {
  background: #1c1c1c;          /* koyu arka plan */
  box-shadow: 0 2px 6px rgba(255, 255, 255, 0.05);
}
.dark-mode .search-box input {
  color: #f2f2f2;
}
.dark-mode .search-box button {
  color: #f2f2f2;
}







