/* ===================================================================
   Hosting Sözlüğüm — Stil Rehberi
   Renkler:  Navy #172A46 · Bej #F3EBDD · Muted Gold #C6A96B · Off-white #FCFAF5
   Yazı:     Başlıklar/terimler → Source Serif 4  |  Arayüz/açıklama → IBM Plex Sans
   =================================================================== */

:root{
  --navy:        #172A46;
  --navy-ink:    #20304A;
  --navy-soft:   #5B6B84;
  --bej:         #F3EBDD;
  --bej-line:    #E4D7BE;
  --gold:        #C6A96B;
  --gold-deep:   #A9854A;
  --off-white:   #FCFAF5;
  --white:       #FFFFFF;

  --serif: 'Source Serif 4', Georgia, 'Times New Roman', serif;
  --sans:  'IBM Plex Sans', -apple-system, Segoe UI, Helvetica, Arial, sans-serif;

  --entry-size: 17px;   /* terim + açıklama ortak font-size (istenen kural) */
  --radius-sm: 3px;
}

*{ box-sizing: border-box; }

html{ scroll-behavior: smooth; }

body{
  margin:0;
  background: var(--bej);
  color: var(--navy-ink);
  font-family: var(--sans);
  font-weight: 400;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a{ color: inherit; text-decoration: none; }

.wrap{
  max-width: 980px;
  margin: 0 auto;
  padding: 0 24px;
}

::selection{ background: var(--gold); color: var(--navy); }

/* focus visibility */
a:focus-visible, button:focus-visible, input:focus-visible{
  outline: 2px solid var(--gold-deep);
  outline-offset: 2px;
}

/* -------------------- Header -------------------- */
.site-header{
  background: var(--navy);
  border-bottom: 3px solid var(--gold);
}
.site-header__inner{
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 16px;
  padding-bottom: 16px;
}
.brand{
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--off-white);
}
.brand__mark{
  width: 40px;
  height: 40px;
  border: 1.5px solid var(--gold);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--serif);
  font-weight: 600;
  font-size: 15px;
  color: var(--gold);
  flex-shrink: 0;
}
.brand__name{
  font-family: var(--serif);
  font-weight: 600;
  font-size: 16px;
  line-height: 1.15;
}
.main-nav{ display: flex; gap: 28px; font-size: 14.5px; }
.main-nav a{ color: var(--bej); opacity: .85; padding: 4px 0; border-bottom: 1px solid transparent; }
.main-nav a:hover{ opacity: 1; border-color: var(--gold); }

/* -------------------- Hero / arama -------------------- */
.hero{
  background: var(--navy);
  color: var(--off-white);
  padding: 64px 0 56px;
  text-align: center;
  position: relative;
}
.hero::after{
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -1px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}
.hero h1{
  font-family: var(--serif);
  font-weight: 600;
  font-size: 40px;
  margin: 0 0 14px;
  letter-spacing: .2px;
}
.hero p.tagline{
  font-size: 16.5px;
  color: #C9D2E0;
  max-width: 480px;
  margin: 0 auto 34px;
}

.search-box{
  max-width: 560px;
  margin: 0 auto;
  position: relative;
}
.search-box input[type="search"]{
  width: 100%;
  padding: 17px 22px 17px 52px;
  font-size: 16px;
  font-family: var(--sans);
  border: 1.5px solid var(--gold);
  border-radius: var(--radius-sm);
  background: var(--off-white);
  color: var(--navy-ink);
}
.search-box input[type="search"]::placeholder{ color: var(--navy-soft); }
.search-box .icon{
  position: absolute;
  left: 20px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px; height: 18px;
  color: var(--gold-deep);
  pointer-events: none;
}
.search-box .icon svg{ width: 100%; height: 100%; }

.search-meta{
  margin-top: 14px;
  font-size: 13.5px;
  color: #9FADC4;
}

/* canlı arama sonuç paneli */
.search-results{
  position: absolute;
  left: 0; right: 0; top: calc(100% + 8px);
  background: var(--off-white);
  border: 1px solid var(--bej-line);
  border-radius: var(--radius-sm);
  text-align: left;
  box-shadow: 0 12px 28px rgba(23,42,70,.18);
  max-height: 380px;
  overflow-y: auto;
  display: none;
  z-index: 20;
}
.search-results.is-open{ display: block; }
.search-results a{
  display: block;
  padding: 13px 20px;
  border-bottom: 1px solid var(--bej-line);
}
.search-results a:last-child{ border-bottom: none; }
.search-results a:hover, .search-results a.is-active{ background: var(--bej); }
.search-results .sr-term{
  font-family: var(--serif);
  font-weight: 700;
  font-size: var(--entry-size);
  color: var(--navy);
}
.search-results .sr-cat{
  font-size: 12.5px;
  color: var(--gold-deep);
  margin-left: 8px;
}
.search-results .sr-desc{
  font-weight: 300;
  font-size: var(--entry-size);
  color: var(--navy-soft);
  margin-top: 2px;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.search-results .sr-empty{
  padding: 18px 20px;
  font-size: 14px;
  color: var(--navy-soft);
}

/* -------------------- A-Z şeridi -------------------- */
.az-strip{
  background: var(--off-white);
  border-bottom: 1px solid var(--bej-line);
}
.az-strip__inner{
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px;
  padding: 16px 24px;
}
.az-strip a, .az-strip span{
  width: 30px; height: 30px;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--serif);
  font-weight: 600;
  font-size: 14px;
  color: var(--navy);
  border-radius: 50%;
  transition: background .15s ease, color .15s ease;
}
.az-strip a:hover{ background: var(--gold); color: var(--navy); }
.az-strip a.is-disabled, .az-strip span.is-disabled{ color: #C7BFAE; pointer-events: none; }

/* -------------------- Genel section başlıkları -------------------- */
.section{ padding: 52px 0; }
.section + .section{ border-top: 1px solid var(--bej-line); }
.section__head{
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 26px;
  gap: 16px;
  flex-wrap: wrap;
}
.section__head h2{
  font-family: var(--serif);
  font-weight: 600;
  font-size: 25px;
  margin: 0;
  color: var(--navy);
}
.section__head .section__note{
  font-size: 14px;
  color: var(--navy-soft);
}

/* -------------------- Kategori çipleri -------------------- */
.category-grid{
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}
.category-card{
  border: 1px solid var(--bej-line);
  background: var(--off-white);
  padding: 16px 18px;
  border-radius: var(--radius-sm);
}
.category-card:hover{ border-color: var(--gold); }
.category-card .cc-name{
  font-family: var(--serif);
  font-weight: 700;
  font-size: 16px;
  color: var(--navy);
}
.category-card .cc-desc{
  font-weight: 300;
  font-size: 13.5px;
  color: var(--navy-soft);
  margin-top: 4px;
}

/* -------------------- Sözlük girişleri (dictionary entries) -------------------- */
.entry-list{
  border-top: 1px solid var(--bej-line);
}
.entry{
  display: grid;
  grid-template-columns: 30px 1fr;
  gap: 18px;
  padding: 22px 0;
  border-bottom: 1px solid var(--bej-line);
}
.entry__letter{
  font-family: var(--serif);
  font-weight: 600;
  font-size: 15px;
  color: var(--gold-deep);
  padding-top: 2px;
}
.entry__body a{ display: block; }
.term-title{
  font-family: var(--serif);
  font-weight: 700;
  font-size: var(--entry-size);
  color: var(--navy);
}
.term-title .short-name{
  font-family: var(--sans);
  font-weight: 400;
  font-style: italic;
  font-size: 13.5px;
  color: var(--gold-deep);
  margin-left: 9px;
}
.term-category{
  font-size: 12px;
  color: var(--navy-soft);
  margin-top: 3px;
}
.term-description{
  font-weight: 300;
  font-size: var(--entry-size);
  color: var(--navy-ink);
  margin-top: 6px;
  max-width: 68ch;
}

/* -------------------- Terim detay sayfası -------------------- */
.breadcrumb{
  font-size: 13px;
  color: var(--navy-soft);
  margin-bottom: 22px;
}
.breadcrumb a:hover{ color: var(--navy); text-decoration: underline; }

.term-page{
  background: var(--off-white);
  border: 1px solid var(--bej-line);
  border-radius: var(--radius-sm);
  padding: 40px 44px;
}
.term-page__eyebrow{
  font-size: 13px;
  color: var(--gold-deep);
  margin-bottom: 6px;
}
.term-page h1{
  font-family: var(--serif);
  font-weight: 700;
  font-size: 34px;
  color: var(--navy);
  margin: 0 0 4px;
}
.term-page .short-name{
  font-family: var(--sans);
  font-style: italic;
  font-weight: 400;
  font-size: 16px;
  color: var(--gold-deep);
}
.term-page hr{
  border: none;
  border-top: 2px solid var(--gold);
  width: 56px;
  margin: 22px 0;
}
.term-page__desc{
  font-weight: 300;
  font-size: 18px;
  line-height: 1.75;
  color: var(--navy-ink);
  max-width: 68ch;
}
.term-page__meta{
  margin-top: 34px;
  padding-top: 22px;
  border-top: 1px solid var(--bej-line);
  display: flex;
  gap: 40px;
  flex-wrap: wrap;
}
.term-page__meta .meta-label{
  font-size: 12.5px;
  color: var(--navy-soft);
  margin-bottom: 6px;
}
.related-pills{ display: flex; flex-wrap: wrap; gap: 8px; }
.related-pills a{
  font-size: 13.5px;
  padding: 6px 13px;
  border: 1px solid var(--bej-line);
  border-radius: 30px;
  color: var(--navy);
}
.related-pills a:hover{ border-color: var(--gold); background: var(--bej); }

.term-nav{
  display: flex;
  justify-content: space-between;
  margin-top: 28px;
  font-size: 14.5px;
}
.term-nav a{ color: var(--navy); }
.term-nav a:hover{ color: var(--gold-deep); }
.term-nav .dir{ display:block; font-size: 11.5px; color: var(--navy-soft); margin-bottom: 2px; }
.term-nav .nav-next{ text-align: right; }

/* -------------------- Footer -------------------- */
.site-footer{
  background: var(--navy);
  color: #B9C3D6;
  padding: 36px 0;
  margin-top: 0;
}
.site-footer__brand{
  font-family: var(--serif);
  font-weight: 600;
  color: var(--off-white);
  margin: 0 0 4px;
  font-size: 16px;
}
.site-footer__note{ margin: 0 0 14px; font-size: 13.5px; }
.site-footer__copy{ margin: 0; font-size: 12.5px; color: #7C8AA3; }

/* -------------------- Yardımcı / form ögeleri (admin ile paylaşılan temeller) -------------------- */
.btn{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 20px;
  border-radius: var(--radius-sm);
  background: var(--navy);
  color: var(--off-white);
  border: 1px solid var(--navy);
  font-size: 14.5px;
  cursor: pointer;
}
.btn:hover{ background: #0E1D33; }
.btn--gold{ background: var(--gold); color: var(--navy); border-color: var(--gold); }
.btn--gold:hover{ background: var(--gold-deep); }
.btn--ghost{ background: transparent; color: var(--navy); border-color: var(--bej-line); }
.btn--ghost:hover{ border-color: var(--navy); }
.btn--danger{ background: #A63A32; border-color: #A63A32; color: #fff; }

.empty-state{
  text-align: center;
  padding: 40px 20px;
  color: var(--navy-soft);
  font-size: 15px;
}

/* -------------------- Responsive -------------------- */
@media (max-width: 760px){
  .category-grid{ grid-template-columns: repeat(2, 1fr); }
  .hero{ padding: 48px 0 40px; }
  .hero h1{ font-size: 30px; }
  .term-page{ padding: 28px 22px; }
  .term-page h1{ font-size: 27px; }
  .main-nav{ gap: 16px; font-size: 13px; }
  .brand__name{ display: none; }
}
@media (max-width: 480px){
  .category-grid{ grid-template-columns: 1fr; }
  .az-strip a{ width: 26px; height: 26px; font-size: 13px; }
}

@media (prefers-reduced-motion: reduce){
  *{ scroll-behavior: auto !important; transition: none !important; }
}
