/*
Theme Name: IFMC Sözlük
Theme URI: https://sozluk.ifmc.org.tr/
Author: IFMC
Description: IFMC Sözlük için hızlı, erişilebilir ve alfabetik gezinme odaklı özel tema.
Version: 1.0.0
Requires at least: 6.7
Tested up to: 7.1
Requires PHP: 8.1
Text Domain: ifmc-sozluk
*/

:root {
  --ifmc-blue: #69a9df;
  --ifmc-blue-dark: #236b9c;
  --ifmc-ink: #17384a;
  --ifmc-text: #263943;
  --ifmc-muted: #667983;
  --ifmc-paper: #f6f4ef;
  --ifmc-card: #ffffff;
  --ifmc-line: #dce5e8;
  --ifmc-accent: #b9cf45;
  --ifmc-shadow: 0 18px 55px rgba(23, 56, 74, .09);
  --ifmc-radius: 24px;
  --ifmc-width: 1180px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ifmc-text);
  background: var(--ifmc-paper);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 17px;
  line-height: 1.72;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; height: auto; }
a { color: var(--ifmc-blue-dark); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--ifmc-ink); }
button, input, textarea, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }

.screen-reader-text {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0);
  white-space: nowrap; border: 0;
}
.screen-reader-text:focus, .skip-link:focus {
  position: fixed !important;
  top: 12px; left: 12px; z-index: 10000;
  width: auto; height: auto; margin: 0;
  padding: 10px 14px; clip: auto;
  color: #fff; background: var(--ifmc-ink); border-radius: 8px;
}
.site-shell { width: min(calc(100% - 40px), var(--ifmc-width)); margin-inline: auto; }

.site-header {
  position: relative;
  z-index: 20;
  background: rgba(255,255,255,.92);
  border-bottom: 1px solid rgba(35,107,156,.12);
  backdrop-filter: blur(16px);
}
.institution-bar {
  padding: 8px 20px;
  color: #dbeaf3;
  background: var(--ifmc-ink);
  font-size: 13px;
  letter-spacing: .02em;
  text-align: center;
}
.institution-bar a { color: #fff; text-decoration: none; }
.institution-bar a:hover { text-decoration: underline; }
.brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: max-content;
  max-width: 100%;
  margin: 0 auto;
  padding: 22px 16px 16px;
  color: inherit;
  text-decoration: none;
}
.brand-logo { display: block; width: 67px; height: auto; aspect-ratio: 614 / 927; object-fit: contain; }
.brand-title {
  color: var(--ifmc-blue-dark);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 500;
  letter-spacing: -.025em;
  line-height: 1;
}
.nav-row {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 56px;
  border-top: 1px solid rgba(35,107,156,.09);
}
.site-nav ul { display: flex; align-items: center; justify-content: center; gap: 7px; margin: 0; padding: 0; list-style: none; }
.site-nav a {
  display: block;
  padding: 9px 14px;
  color: var(--ifmc-text);
  border-radius: 999px;
  font-size: 15px;
  font-weight: 650;
  text-decoration: none;
}
.site-nav a:hover, .site-nav .current-menu-item > a, .site-nav .current_page_item > a { color: var(--ifmc-blue-dark); background: #eaf5fc; }
.nav-toggle {
  display: none;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  color: var(--ifmc-ink);
  background: #eef6fa;
  border: 0;
  border-radius: 999px;
  font-weight: 700;
  cursor: pointer;
}
.nav-toggle svg { width: 20px; height: 20px; }

.site-main { min-height: 55vh; }
.hero {
  position: relative;
  overflow: hidden;
  padding: clamp(62px, 8vw, 104px) 0 74px;
  background:
    radial-gradient(circle at 12% 18%, rgba(105,169,223,.20), transparent 30%),
    radial-gradient(circle at 89% 16%, rgba(185,207,69,.16), transparent 26%),
    linear-gradient(180deg, #fff 0%, var(--ifmc-paper) 100%);
}
.hero::after {
  content: "";
  position: absolute;
  inset: auto -10% -140px;
  height: 240px;
  border-radius: 50% 50% 0 0;
  background: rgba(105,169,223,.055);
  pointer-events: none;
}
.hero-inner { position: relative; z-index: 1; max-width: 870px; margin: 0 auto; text-align: center; }
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  padding: 7px 13px;
  color: var(--ifmc-blue-dark);
  background: #eaf5fc;
  border: 1px solid #d4eaf7;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 750;
  letter-spacing: .075em;
  text-transform: uppercase;
}
.eyebrow::before { content: ""; width: 7px; height: 7px; background: var(--ifmc-accent); border-radius: 50%; }
.hero h1, .page-hero h1, .entry-title, .archive-title {
  margin: 0;
  color: var(--ifmc-ink);
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 500;
  letter-spacing: -.035em;
  line-height: 1.08;
}
.hero h1 { font-size: clamp(42px, 7vw, 72px); }
.hero-copy { max-width: 700px; margin: 20px auto 30px; color: var(--ifmc-muted); font-size: clamp(17px, 2.2vw, 21px); }
.dictionary-search { max-width: 720px; margin: 0 auto; }
.search-wrap {
  display: flex;
  gap: 10px;
  padding: 9px;
  background: #fff;
  border: 1px solid rgba(35,107,156,.16);
  border-radius: 18px;
  box-shadow: var(--ifmc-shadow);
}
.search-wrap:focus-within { border-color: var(--ifmc-blue); box-shadow: 0 0 0 4px rgba(105,169,223,.16), var(--ifmc-shadow); }
.search-icon { display: grid; flex: 0 0 46px; place-items: center; color: var(--ifmc-blue-dark); }
.search-icon svg { width: 24px; height: 24px; }
.search-field { min-width: 0; flex: 1; padding: 10px 0; color: var(--ifmc-ink); background: transparent; border: 0; outline: 0; font-size: 18px; }
.search-field::placeholder { color: #8b9aa1; }
.search-submit, .button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 10px 20px;
  color: #fff;
  background: var(--ifmc-blue-dark);
  border: 0;
  border-radius: 12px;
  font-weight: 750;
  text-decoration: none;
  cursor: pointer;
  transition: transform .18s ease, background .18s ease;
}
.search-submit:hover, .button:hover { color: #fff; background: var(--ifmc-ink); transform: translateY(-1px); }
.search-hint { margin: 13px 0 0; color: #7c8c94; font-size: 13px; }

.section { padding: clamp(58px, 7vw, 88px) 0; }
.section-white { background: #fff; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 28px; }
.section-head h2 { margin: 0; color: var(--ifmc-ink); font-family: Georgia, "Times New Roman", serif; font-size: clamp(30px, 4vw, 42px); font-weight: 500; letter-spacing: -.025em; line-height: 1.15; }
.section-head p { max-width: 520px; margin: 7px 0 0; color: var(--ifmc-muted); }
.section-link { flex: 0 0 auto; font-size: 14px; font-weight: 750; text-decoration: none; }
.alphabet {
  display: grid;
  grid-template-columns: repeat(14, minmax(42px, 1fr));
  gap: 9px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.alphabet a {
  position: relative;
  display: grid;
  min-height: 52px;
  place-items: center;
  color: var(--ifmc-ink);
  background: #fff;
  border: 1px solid var(--ifmc-line);
  border-radius: 13px;
  font-size: 18px;
  font-weight: 750;
  text-decoration: none;
  box-shadow: 0 5px 14px rgba(23,56,74,.035);
  transition: transform .18s ease, border-color .18s ease, background .18s ease;
}
.alphabet a:hover, .alphabet a:focus { color: var(--ifmc-blue-dark); background: #edf7fd; border-color: var(--ifmc-blue); transform: translateY(-2px); }
.alphabet .is-empty a { color: #9ba8ad; background: rgba(255,255,255,.55); box-shadow: none; }
.alphabet-count { position: absolute; top: 4px; right: 6px; color: var(--ifmc-blue-dark); font-size: 9px; font-weight: 800; }

.term-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.term-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 270px;
  padding: 27px;
  overflow: hidden;
  background: var(--ifmc-card);
  border: 1px solid var(--ifmc-line);
  border-radius: var(--ifmc-radius);
  box-shadow: 0 10px 32px rgba(23,56,74,.055);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.term-card::before { content: ""; position: absolute; top: 0; left: 0; width: 72px; height: 4px; background: linear-gradient(90deg, var(--ifmc-blue), var(--ifmc-accent)); }
.term-card:hover { border-color: rgba(35,107,156,.3); transform: translateY(-4px); box-shadow: var(--ifmc-shadow); }
.term-letter { align-self: flex-start; margin-bottom: 18px; padding: 4px 9px; color: var(--ifmc-blue-dark); background: #edf7fd; border-radius: 8px; font-size: 12px; font-weight: 800; }
.term-card h3 { margin: 0 0 9px; color: var(--ifmc-ink); font-family: Georgia, "Times New Roman", serif; font-size: 27px; font-weight: 500; line-height: 1.18; }
.term-card h3 a { color: inherit; text-decoration: none; }
.term-contributor { margin: 0 0 12px; color: var(--ifmc-blue-dark); font-size: 13px; font-weight: 750; }
.term-excerpt { margin: 0 0 20px; color: var(--ifmc-muted); font-size: 15px; line-height: 1.62; }
.term-more { margin-top: auto; font-size: 13px; font-weight: 800; text-decoration: none; }

.suggest-band { padding: 0 0 clamp(58px, 7vw, 88px); }
.suggest-card {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 36px;
  padding: clamp(32px, 5vw, 54px);
  color: #fff;
  background: linear-gradient(135deg, var(--ifmc-ink), #205879);
  border-radius: 28px;
  box-shadow: var(--ifmc-shadow);
}
.suggest-card h2 { margin: 0 0 8px; font-family: Georgia, "Times New Roman", serif; font-size: clamp(28px, 4vw, 42px); font-weight: 500; line-height: 1.15; }
.suggest-card p { max-width: 720px; margin: 0; color: #d7e6ee; }
.suggest-card .button { color: var(--ifmc-ink); background: var(--ifmc-accent); white-space: nowrap; }
.suggest-card .button:hover { background: #d2e76a; }

.page-hero { padding: 62px 0 38px; text-align: center; }
.page-hero h1, .archive-title { font-size: clamp(38px, 6vw, 60px); }
.page-hero p { max-width: 680px; margin: 14px auto 0; color: var(--ifmc-muted); }
.content-wrap { width: min(calc(100% - 40px), 850px); margin: 0 auto; padding-bottom: 88px; }
.content-card { padding: clamp(28px, 5vw, 56px); background: #fff; border: 1px solid var(--ifmc-line); border-radius: var(--ifmc-radius); box-shadow: var(--ifmc-shadow); }
.entry-shell { width: min(calc(100% - 40px), 920px); margin: 0 auto; padding: 58px 0 88px; }
.breadcrumb { margin-bottom: 22px; color: var(--ifmc-muted); font-size: 13px; }
.breadcrumb a { text-decoration: none; }
.entry-header { margin-bottom: 34px; text-align: center; }
.entry-header .term-letter { display: inline-block; }
.entry-title { margin-top: 10px; font-size: clamp(42px, 7vw, 68px); }
.entry-meta { margin: 14px 0 0; color: var(--ifmc-blue-dark); font-size: 15px; font-weight: 750; }
.entry-content { color: #2d3f48; font-family: Georgia, "Times New Roman", serif; font-size: clamp(18px, 2vw, 20px); line-height: 1.88; }
.entry-content > * { max-width: 760px; margin-inline: auto; }
.entry-content > p:first-child { color: var(--ifmc-blue-dark); font-family: Inter, ui-sans-serif, system-ui, sans-serif; font-size: 15px; }
.single-post .entry-content > p:first-child { display: none; }
.entry-content p { margin-top: 0; margin-bottom: 1.35em; }
.entry-content h2, .entry-content h3 { margin-top: 2em; color: var(--ifmc-ink); font-family: Inter, ui-sans-serif, system-ui, sans-serif; line-height: 1.25; }
.entry-content a { overflow-wrap: anywhere; }
.entry-content blockquote { padding: 8px 0 8px 24px; border-left: 4px solid var(--ifmc-blue); color: var(--ifmc-muted); }
.entry-content figure { max-width: 100%; }
.entry-content img { border-radius: 16px; }
.entry-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 52px; padding-top: 26px; border-top: 1px solid var(--ifmc-line); }
.entry-nav a { display: block; padding: 18px; color: var(--ifmc-ink); background: #fff; border: 1px solid var(--ifmc-line); border-radius: 14px; font-weight: 700; text-decoration: none; }
.entry-nav .next { text-align: right; }
.nav-label { display: block; margin-bottom: 3px; color: var(--ifmc-muted); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; }

.archive-shell { padding: 62px 0 88px; }
.archive-head { max-width: 760px; margin: 0 auto 38px; text-align: center; }
.archive-description { margin-top: 13px; color: var(--ifmc-muted); }
.results-count { margin: 8px 0 0; color: var(--ifmc-muted); font-size: 14px; }
.no-results { padding: 46px; background: #fff; border: 1px solid var(--ifmc-line); border-radius: var(--ifmc-radius); text-align: center; }
.no-results .dictionary-search { margin-top: 24px; }
.pagination { margin-top: 34px; }
.pagination .nav-links { display: flex; justify-content: center; gap: 7px; }
.pagination a, .pagination span { display: grid; min-width: 42px; height: 42px; place-items: center; padding: 0 10px; background: #fff; border: 1px solid var(--ifmc-line); border-radius: 10px; text-decoration: none; }
.pagination .current { color: #fff; background: var(--ifmc-blue-dark); border-color: var(--ifmc-blue-dark); }

.wpforms-container input[type=text], .wpforms-container input[type=email], .wpforms-container textarea, .wpforms-container select {
  width: 100% !important;
  padding: 12px 14px !important;
  background: #fff !important;
  border: 1px solid #cbd8dc !important;
  border-radius: 10px !important;
}
.wpforms-container input:focus, .wpforms-container textarea:focus { border-color: var(--ifmc-blue) !important; box-shadow: 0 0 0 3px rgba(105,169,223,.14) !important; }
.wpforms-submit { min-height: 48px !important; padding: 10px 22px !important; color: #fff !important; background: var(--ifmc-blue-dark) !important; border: 0 !important; border-radius: 12px !important; font-weight: 750 !important; }

.site-footer { color: #c9dce6; background: #102c3c; }
.footer-main { display: grid; grid-template-columns: 1.2fr 1fr; gap: 54px; padding: 54px 0 38px; }
.footer-brand { display: flex; align-items: center; gap: 17px; }
.footer-brand img { width: 46px; height: auto; }
.footer-brand strong { display: block; color: #fff; font-family: Georgia, "Times New Roman", serif; font-size: 25px; font-weight: 500; }
.footer-brand p { max-width: 520px; margin: 7px 0 0; font-size: 14px; }
.footer-links { display: flex; flex-wrap: wrap; align-content: center; justify-content: flex-end; gap: 10px; }
.footer-links a { padding: 7px 10px; color: #d9e8ee; border: 1px solid rgba(255,255,255,.13); border-radius: 999px; font-size: 12px; text-decoration: none; }
.footer-links a:hover { color: #fff; border-color: var(--ifmc-blue); }
.footer-bottom { padding: 17px 0 22px; border-top: 1px solid rgba(255,255,255,.09); font-size: 12px; text-align: center; }

@media (max-width: 980px) {
  .alphabet { grid-template-columns: repeat(9, minmax(42px, 1fr)); }
  .term-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  body { font-size: 16px; }
  .site-shell, .content-wrap, .entry-shell { width: min(calc(100% - 28px), var(--ifmc-width)); }
  .brand { padding-top: 17px; padding-bottom: 13px; }
  .brand-logo { width: 55px; }
  .nav-row { justify-content: flex-end; min-height: 52px; }
  .nav-toggle { display: inline-flex; }
  .site-nav { position: absolute; top: 100%; left: 14px; right: 14px; display: none; padding: 12px; background: #fff; border: 1px solid var(--ifmc-line); border-radius: 16px; box-shadow: var(--ifmc-shadow); }
  .site-nav.is-open { display: block; }
  .site-nav ul { align-items: stretch; flex-direction: column; gap: 3px; }
  .site-nav a { padding: 11px 13px; }
  .hero { padding-top: 52px; }
  .search-wrap { gap: 3px; padding: 6px; }
  .search-icon { flex-basis: 38px; }
  .search-submit { padding-inline: 15px; }
  .alphabet { grid-template-columns: repeat(6, minmax(40px, 1fr)); gap: 7px; }
  .alphabet a { min-height: 47px; }
  .term-grid { grid-template-columns: 1fr; }
  .section-head { align-items: start; flex-direction: column; }
  .suggest-card { grid-template-columns: 1fr; gap: 24px; }
  .entry-nav { grid-template-columns: 1fr; }
  .entry-nav .next { text-align: left; }
  .footer-main { grid-template-columns: 1fr; gap: 28px; }
  .footer-links { justify-content: flex-start; }
}
@media (max-width: 420px) {
  .institution-bar { font-size: 11px; }
  .alphabet { grid-template-columns: repeat(5, minmax(38px, 1fr)); }
  .search-submit span { display: none; }
  .search-submit::after { content: "Ara"; }
  .term-card { min-height: auto; padding: 23px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
