/*
Theme Name: Sarayönü KYDD
Theme URI: https://www.sarayonu.com.tr
Author: Sarayönü K.Y.D. Derneği
Description: Sarayönü Kültür Yardımlaşma ve Dayanışma Derneği için özel olarak hazırlanmış, hafif ve hızlı kurumsal tema. Duyuru, haber ve etkinlik kategorileri, kurumsal sayfalar ve iletişim formu içerir.
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
License: GPL v2 or later
Text Domain: sarayonu-kydd
*/

@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Plus+Jakarta+Sans:wght@600;700;800&display=swap");

:root {
  --background: oklch(1 0 0);
  --foreground: oklch(0.20 0.04 260);
  --card: oklch(1 0 0);
  --primary: oklch(0.26 0.08 260);
  --primary-foreground: oklch(0.98 0.01 85);
  --secondary: oklch(0.96 0.02 85);
  --secondary-foreground: oklch(0.26 0.06 260);
  --muted: oklch(0.97 0.012 85);
  --muted-foreground: oklch(0.48 0.02 260);
  --accent: oklch(0.70 0.13 75);
  --accent-foreground: oklch(0.18 0.04 260);
  --border: oklch(0.90 0.012 85);
  --radius: 0.6rem;
  --font-sans: "Inter", ui-sans-serif, system-ui, sans-serif;
  --font-display: "Plus Jakarta Sans", "Inter", ui-sans-serif, system-ui, sans-serif;
  --max-width: 1280px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--foreground);
  background: var(--background);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }

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

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.25;
  margin: 0 0 0.5em;
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.25rem;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  background: var(--primary);
  color: var(--primary-foreground);
  padding: 0.75rem 1.25rem;
  border-radius: 0 0 var(--radius) 0;
  font-weight: 700;
}
.skip-link:focus { left: 0; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  width: 100%;
  border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  height: auto;
  min-height: 4.25rem;
  padding-top: 0.4rem;
  padding-bottom: 0.4rem;
  max-width: 1440px;
}
.site-branding {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-shrink: 0;
}
.site-branding .site-logo-img {
  display: block;
  width: auto;
  height: 2.6rem;
  max-height: 2.6rem;
  max-width: 11rem;
  object-fit: contain;
  flex-shrink: 0;
}
.site-branding .logo-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.6rem;
  height: 2.6rem;
  border-radius: 999px;
  background: var(--primary);
  color: var(--accent);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 0.82rem;
  letter-spacing: 0.02em;
  flex-shrink: 0;
}
.site-branding .brand-text .brand-name {
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--primary);
  white-space: nowrap;
}
.site-branding .brand-text .brand-sub {
  font-size: 0.66rem;
  color: var(--muted-foreground);
  font-weight: 500;
  white-space: nowrap;
}

@media (max-width: 1400px) {
  .site-branding .brand-text .brand-sub { display: none; }
}

.main-nav {
  flex: 1;
  display: flex;
  justify-content: flex-end;
  min-width: 0;
}
.main-nav > ul {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.05rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.main-nav ul li { position: relative; }
.main-nav a {
  display: block;
  padding: 0.5rem 0.55rem;
  border-radius: var(--radius);
  font-size: 0.76rem;
  font-weight: 600;
  white-space: nowrap;
  color: color-mix(in oklch, var(--foreground) 80%, transparent);
  transition: background 0.15s ease, color 0.15s ease;
}
.main-nav a:hover { background: var(--secondary); color: var(--foreground); }
.main-nav li.current-menu-item > a,
.main-nav li.current-cat > a,
.main-nav li.current-menu-parent > a,
.main-nav li.current-menu-ancestor > a {
  background: var(--secondary);
  color: var(--primary);
}

/* Açılır alt menü (dropdown) */
.main-nav li.menu-item-has-children > a::after { content: "▾"; margin-left: 0.3rem; font-size: 0.65em; opacity: 0.7; }
.main-nav .sub-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 13rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 12px 28px rgba(0,0,0,0.1);
  padding: 0.4rem;
  list-style: none;
  margin: 0.25rem 0 0;
  z-index: 50;
}
.main-nav li.menu-item-has-children:hover > .sub-menu,
.main-nav li.menu-item-has-children:focus-within > .sub-menu {
  display: block;
}
.main-nav .sub-menu a { white-space: nowrap; }
.main-nav .sub-menu li.current-menu-item > a { background: var(--secondary); color: var(--primary); }

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  background: none;
  border-radius: var(--radius);
  width: 2.3rem;
  height: 2.3rem;
  font-size: 1rem;
  cursor: pointer;
  flex-shrink: 0;
}

.menu-toggle { display: none; }

.header-search { display: none; border-top: 1px solid var(--border); background: var(--secondary); }
.header-search.is-open, .header-search:not([hidden]) { display: block; }
.header-search form { display: flex; gap: 0.5rem; padding: 0.9rem 1.25rem; }
.header-search input { flex: 1; padding: 0.6rem 0.85rem; border: 1px solid var(--border); border-radius: var(--radius); font-family: inherit; font-size: 0.9rem; }

@media (max-width: 1180px) {
  .main-nav { display: none; flex: 1 1 100%; width: 100%; max-width: 100%; border-top: 1px solid var(--border); padding: 0.75rem 0; order: 3; }
  .main-nav.is-open { display: flex; }
  .main-nav > ul { flex-direction: column; flex-wrap: nowrap; width: 100%; }
  .main-nav a { white-space: normal; }
  .menu-toggle { display: inline-flex; }
  .site-header .container { flex-wrap: wrap; }

  /* Alt menüler mobilde açılır pencere yerine düz (accordion) liste olarak görünür */
  .main-nav .sub-menu {
    display: block;
    position: static;
    box-shadow: none;
    border: none;
    background: none;
    padding-left: 1rem;
    margin: 0;
  }
  .main-nav li.menu-item-has-children > a::after { content: ""; }
}

/* ---------- Hero ---------- */
.hero {
  background: linear-gradient(135deg, var(--primary), color-mix(in oklch, var(--primary) 80%, black));
  color: var(--primary-foreground);
}
.hero-inner { padding-top: 4rem; padding-bottom: 3rem; }
@media (max-width: 600px) {
  .hero-inner { padding-top: 2.5rem; padding-bottom: 2rem; }
}
.hero-eyebrow {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.75rem;
}
.hero h1 { font-size: clamp(1.9rem, 4vw, 3rem); max-width: 40rem; }
.hero p.lead {
  margin-top: 0.9rem;
  max-width: 38rem;
  font-size: 1.05rem;
  color: color-mix(in oklch, var(--primary-foreground) 82%, transparent);
}
.quick-links {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr));
  gap: 0.75rem;
  margin-top: 2rem;
  max-width: 64rem;
}
.quick-link {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.85rem 1rem;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  font-weight: 600;
  font-size: 0.92rem;
  transition: background 0.15s ease;
}
.quick-link:hover { background: rgba(255, 255, 255, 0.16); }
.quick-link .dot { width: 0.5rem; height: 0.5rem; border-radius: 999px; background: var(--accent); flex-shrink: 0; }

/* ---------- Page hero (inner pages) ---------- */
.page-hero {
  border-bottom: 1px solid var(--border);
  background: linear-gradient(135deg, var(--primary), color-mix(in oklch, var(--primary) 88%, black));
  color: var(--primary-foreground);
}
.page-hero .container { padding: 3rem 1.25rem 3.5rem; }
.page-hero h1 { font-size: clamp(1.6rem, 3vw, 2.3rem); }
.page-hero p { margin-top: 0.6rem; max-width: 42rem; color: color-mix(in oklch, var(--primary-foreground) 82%, transparent); font-size: 1.02rem; }

/* ---------- Sections ---------- */
.section { padding: 3.5rem 0; }
.section.muted { background: var(--secondary); }
.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.75rem;
  flex-wrap: wrap;
}
.section-head h2 { font-size: 1.5rem; }
.section-head a.more { font-size: 0.85rem; font-weight: 600; color: var(--primary); }

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr));
  gap: 1.25rem;
}
.card {
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) + 4px);
  overflow: hidden;
  background: var(--card);
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.15s ease, transform 0.15s ease;
}
.card:hover { box-shadow: 0 8px 24px rgba(0,0,0,0.08); transform: translateY(-2px); }
.card .card-thumb { aspect-ratio: 16/9; background: var(--secondary); overflow: hidden; }
.card .card-thumb img { width: 100%; height: 100%; object-fit: cover; }
.card .card-body { padding: 1.1rem 1.2rem 1.3rem; flex: 1; display: flex; flex-direction: column; }
.card .card-meta { font-size: 0.75rem; color: var(--muted-foreground); font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 0.4rem; }
.card h3 { font-size: 1.05rem; margin-bottom: 0.4rem; }
.card p { margin: 0; color: var(--muted-foreground); font-size: 0.92rem; flex: 1; }
.card .card-link { margin-top: 0.9rem; font-size: 0.85rem; font-weight: 700; color: var(--primary); }

.empty-state {
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  padding: 2.5rem 1.5rem;
  text-align: center;
  color: var(--muted-foreground);
}

/* ---------- Single / Page content ---------- */
.content-wrap { max-width: 48rem; margin: 0 auto; padding: 3rem 1.25rem 4rem; }
.content-wrap .entry-meta { font-size: 0.85rem; color: var(--muted-foreground); font-weight: 600; margin-bottom: 1rem; }
.content-wrap .entry-content { font-size: 1.02rem; }
.content-wrap .entry-content p { margin: 0 0 1.1em; }
.content-wrap .entry-content ul, .content-wrap .entry-content ol { margin: 0 0 1.1em; padding-left: 1.4em; }
.content-wrap .entry-content li { margin-bottom: 0.4em; }
.content-wrap .back-link { display: inline-block; margin-top: 2rem; font-weight: 600; color: var(--primary); font-size: 0.9rem; }

.pagination { display: flex; gap: 0.5rem; justify-content: center; margin-top: 2.5rem; }
.pagination a, .pagination span {
  padding: 0.5rem 0.9rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.85rem;
  font-weight: 600;
}
.pagination .current { background: var(--primary); color: var(--primary-foreground); border-color: var(--primary); }

/* ---------- Contact form ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 2.5rem;
  align-items: start;
}
@media (max-width: 800px) { .contact-grid { grid-template-columns: 1fr; } }
.info-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.9rem; }
.info-list li { display: flex; gap: 0.65rem; font-size: 0.95rem; }
.info-list .icon { color: var(--accent); font-weight: 700; }

form.contact-form { display: flex; flex-direction: column; gap: 1rem; }
form.contact-form label { font-size: 0.85rem; font-weight: 600; margin-bottom: 0.3rem; display: block; }
form.contact-form input, form.contact-form textarea {
  width: 100%;
  padding: 0.7rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 0.95rem;
  background: var(--background);
  color: var(--foreground);
}
form.contact-form input:focus, form.contact-form textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.75rem 1.4rem;
  border-radius: var(--radius);
  background: var(--primary);
  color: var(--primary-foreground);
  font-weight: 700;
  font-size: 0.92rem;
  border: none;
  cursor: pointer;
  width: fit-content;
}
.btn:hover { background: color-mix(in oklch, var(--primary) 85%, black); }
.form-notice { padding: 0.85rem 1rem; border-radius: var(--radius); font-size: 0.9rem; margin-bottom: 1rem; }
.form-notice.success { background: color-mix(in oklch, var(--accent) 20%, white); color: var(--foreground); }
.form-notice.error { background: #fdecec; color: #7a1f1f; }
.hp-field { position: absolute; left: -9999px; }

/* ---------- Breadcrumbs ---------- */
.breadcrumbs { padding: 0.9rem 0; }
.breadcrumbs ol { display: flex; flex-wrap: wrap; gap: 0.4rem; list-style: none; margin: 0; padding: 0; font-size: 0.82rem; color: var(--muted-foreground); }
.breadcrumbs li:not(:last-child)::after { content: "/"; margin-left: 0.4rem; color: var(--border); }
.breadcrumbs a { color: var(--muted-foreground); font-weight: 600; }
.breadcrumbs a:hover { color: var(--primary); }
.breadcrumbs [aria-current="page"] { color: var(--foreground); font-weight: 600; }

/* ---------- Share buttons ---------- */
.share-buttons { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem; margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid var(--border); }
.share-buttons .share-label { font-weight: 700; font-size: 0.85rem; margin-right: 0.3rem; }
.share-buttons a { padding: 0.4rem 0.8rem; border: 1px solid var(--border); border-radius: var(--radius); font-size: 0.8rem; font-weight: 600; }
.share-buttons a:hover { background: var(--secondary); }

/* ---------- Cookie banner (KVKK) ---------- */
.cookie-banner {
  position: fixed;
  z-index: 90;
  left: 1rem;
  right: 1rem;
  bottom: 1rem;
  max-width: 40rem;
  margin: 0 auto;
  background: var(--primary);
  color: var(--primary-foreground);
  border-radius: var(--radius);
  padding: 1.1rem 1.3rem;
  box-shadow: 0 10px 30px rgba(0,0,0,0.25);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  justify-content: space-between;
}
.cookie-banner[hidden] { display: none; }
.cookie-banner p { margin: 0; font-size: 0.85rem; flex: 1 1 16rem; color: color-mix(in oklch, var(--primary-foreground) 90%, transparent); }
.cookie-banner a { text-decoration: underline; color: var(--accent); }
.cookie-actions { display: flex; gap: 0.6rem; flex-shrink: 0; }
.btn-outline { background: transparent; border: 1px solid rgba(255,255,255,0.4); color: var(--primary-foreground); }
.btn-outline:hover { background: rgba(255,255,255,0.1); }

/* ---------- FAQ (details/summary) ---------- */
.faq-list details {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.2rem;
  margin-bottom: 0.75rem;
}
.faq-list summary {
  font-weight: 700;
  cursor: pointer;
  font-family: var(--font-display);
}
.faq-list details[open] summary { margin-bottom: 0.6rem; }
.faq-list details p { margin: 0; color: var(--muted-foreground); }

/* ---------- IBAN kartı ---------- */
.iban-card {
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) + 4px);
  padding: 1.5rem;
  background: var(--secondary);
  margin-bottom: 1.5rem;
}
.iban-card dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 0.5rem 1rem; }
.iban-card dt { font-weight: 700; color: var(--muted-foreground); font-size: 0.85rem; }
.iban-card dd { margin: 0; font-size: 1rem; font-weight: 600; }

/* ---------- WhatsApp yüzen buton ---------- */
.whatsapp-fab {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  z-index: 80;
  width: 3.2rem;
  height: 3.2rem;
  border-radius: 999px;
  background: #25D366;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  box-shadow: 0 8px 20px rgba(0,0,0,0.2);
}

/* ---------- Consent notice (form altı) ---------- */
.consent-row { display: flex; align-items: flex-start; gap: 0.5rem; font-size: 0.85rem; }
.consent-row input { width: auto; margin-top: 0.2rem; }

/* ---------- Sosyal medya ikonları (footer) ---------- */
.social-links { margin-top: 1.1rem; display: flex; gap: 0.5rem; }
.social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.3rem;
  height: 2.3rem;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.25);
  color: var(--primary-foreground);
  transition: background 0.15s ease, border-color 0.15s ease;
}
.social-link:hover { background: rgba(255,255,255,0.12); border-color: rgba(255,255,255,0.4); }

/* ---------- Footer ---------- */
.site-footer { margin-top: 4rem; padding: 0 1rem; border-top: 1px solid var(--border); background: var(--primary); color: var(--primary-foreground); }
.footer-grid { display: grid; gap: 2.5rem; padding: 3.5rem 0; grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px) { .footer-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-grid h3 { font-size: 1.05rem; }
.footer-grid h4 { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--accent); margin-bottom: 0.7rem; }
.footer-grid p { color: color-mix(in oklch, var(--primary-foreground) 78%, transparent); font-size: 0.9rem; }
.footer-grid ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.5rem; }
.footer-grid a { color: color-mix(in oklch, var(--primary-foreground) 82%, transparent); font-size: 0.9rem; }
.footer-grid a:hover { color: var(--accent); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.12);
  padding: 1rem 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  font-size: 0.78rem;
  color: color-mix(in oklch, var(--primary-foreground) 65%, transparent);
}
.footer-bottom a:hover { color: var(--accent); }
