/*
Theme Name: Alakarga Modern
Theme URI: https://alakarga.com.tr/
Author: Alakarga Sanat Yayınları
Description: Lovable tasarımından uyarlanmış, Alakarga için hazırlanmış dinamik WordPress teması.
Version: 1.1.0
Requires at least: 6.4
Tested up to: 7.0
Requires PHP: 7.4
Text Domain: alakarga-modern
*/

:root {
  --paper: #f7f2e8;
  --paper-soft: #fbf8f2;
  --ink: #211e1a;
  --rule: #d9d1c4;
  --primary: #8a3a31;
  --primary-dark: #6f2d27;
  --primary-foreground: #fffaf2;
  --secondary: #eee5d6;
  --muted: #746e65;
  --card: #fcfaf5;
  --focus: #a45a4e;
  --radius: 4px;
  --shadow-card: 0 8px 24px -12px rgba(33, 30, 26, .25);
  --shadow-editorial: 0 30px 60px -30px rgba(33, 30, 26, .35);
  --font-serif: Georgia, "Times New Roman", serif;
  --font-sans: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
button, input, textarea { font: inherit; }
button { cursor: pointer; }
address { font-style: normal; }
::selection { background: rgba(138, 58, 49, .2); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }

h1, h2, h3, h4, h5, h6, .font-serif {
  margin-top: 0;
  font-family: var(--font-serif);
  font-weight: 400;
  letter-spacing: -.015em;
}
p { margin-top: 0; }

.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 {
  clip: auto !important;
  width: auto; height: auto;
  left: 12px; top: 12px;
  padding: 12px 16px;
  background: var(--ink); color: var(--paper);
  z-index: 99999;
}

.container-editorial {
  width: min(100% - 2.5rem, 1248px);
  margin-inline: auto;
}
.eyebrow {
  color: var(--muted);
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .18em;
  line-height: 1.3;
  text-transform: uppercase;
}
.muted { color: var(--muted); }
.rule-top { border-top: 1px solid var(--rule); }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  background: rgba(247, 242, 232, .92);
  backdrop-filter: blur(14px);
}
.admin-bar .site-header { top: 32px; }
.header-inner {
  min-height: 74px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.site-brand { display: inline-flex; align-items: center; gap: 12px; min-width: 0; }
.site-brand img { display: block; width: auto; max-width: min(210px, 42vw); height: 46px; object-fit: contain; }
.site-brand--with-logo { flex: 0 1 auto; }
.site-brand__text { display: flex; flex-direction: column; line-height: 1; }
.site-brand__name { font-family: var(--font-serif); font-size: 1.65rem; }
.site-brand__tag { margin-top: 5px; color: var(--muted); font-size: .62rem; font-weight: 600; letter-spacing: .18em; text-transform: uppercase; }
.primary-nav ul { display: flex; align-items: center; gap: 30px; margin: 0; padding: 0; list-style: none; }
.primary-nav a { color: rgba(33,30,26,.82); font-size: .9rem; transition: color .2s ease; }
.primary-nav a:hover, .primary-nav .current-menu-item > a, .primary-nav .current_page_item > a, .primary-nav a[aria-current="page"] { color: var(--primary); }
.menu-toggle {
  display: none;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  background: transparent;
  color: var(--ink);
  padding: 7px 12px;
  font-size: .86rem;
}

/* Buttons */
.button {
  display: inline-flex;
  min-height: 43px;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: var(--radius);
  padding: 10px 20px;
  font-size: .76rem;
  font-weight: 600;
  letter-spacing: .1em;
  line-height: 1.2;
  text-transform: uppercase;
  transition: background .2s ease, color .2s ease, border-color .2s ease, transform .2s ease;
}
.button:hover { transform: translateY(-1px); }
.button-primary { background: var(--primary); color: var(--primary-foreground); }
.button-primary:hover { background: var(--primary-dark); }
.button-outline { border-color: rgba(33,30,26,.82); background: transparent; color: var(--ink); }
.button-outline:hover { background: var(--ink); color: var(--paper); }
.button-small { min-height: 38px; padding: 9px 13px; font-size: .68rem; }
.text-link { text-decoration: underline; text-underline-offset: 4px; font-size: .9rem; }
.text-link:hover { color: var(--primary); }

/* Sections */
.page-hero { border-bottom: 1px solid var(--rule); }
.page-hero__inner { padding-block: 64px 76px; }
.page-hero h1 { margin: 14px 0 0; font-size: clamp(3.2rem, 8vw, 6rem); line-height: .98; }
.page-hero p { max-width: 650px; margin: 24px 0 0; color: var(--muted); font-size: 1.1rem; }

.home-hero { border-bottom: 1px solid var(--rule); }
.home-hero__inner {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(260px, .9fr);
  gap: 48px;
  align-items: end;
  padding-block: 88px 104px;
}
.home-hero h1 { max-width: 950px; margin: 20px 0 0; font-size: clamp(3.7rem, 7.5vw, 7rem); line-height: .94; }
.home-hero h1 em { color: var(--primary); font-weight: 400; }
.home-hero__lead { max-width: 760px; margin: 32px 0 0; color: var(--muted); font-size: 1.15rem; line-height: 1.75; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 38px; }
.hero-stats { border-left: 1px solid var(--rule); padding-left: 34px; }
.hero-stats dl { margin: 18px 0 0; }
.hero-stat { display: flex; align-items: baseline; justify-content: space-between; gap: 20px; padding: 8px 0; }
.hero-stat dt { color: var(--muted); font-size: .85rem; }
.hero-stat dd { margin: 0; font-family: var(--font-serif); font-size: 2.4rem; line-height: 1; }

.content-section { padding-block: 78px; }
.content-section--large { padding-block: 96px; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 28px; margin-bottom: 46px; }
.section-heading h2 { margin: 12px 0 0; font-size: clamp(2.7rem, 5vw, 4rem); line-height: 1; }
.section-tinted { border-top: 1px solid var(--rule); background: rgba(238,229,214,.48); }

/* Books */
.books-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); column-gap: 28px; row-gap: 52px; }
.books-grid--home { grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: 34px; row-gap: 58px; }
.book-card { display: flex; min-width: 0; flex-direction: column; }
.book-card__cover-link { display: block; overflow: hidden; border-radius: var(--radius); background: var(--secondary); box-shadow: var(--shadow-card); }
.book-card__cover { position: relative; aspect-ratio: 2 / 3; overflow: hidden; display: flex; align-items: center; justify-content: center; background: #ffffff; }
.book-card__cover img { width: 100%; height: 100%; object-fit: contain; object-position: center top; transition: transform .35s ease; background: #ffffff; }
.book-card:hover .book-card__cover img { transform: scale(1.01); }
.book-card__placeholder { width: 100%; height: 100%; background: linear-gradient(135deg, var(--secondary), #ded2bf); }
.book-card__body { display: flex; flex: 1; flex-direction: column; margin-top: 16px; }
.book-card__title { margin: 0; font-family: var(--font-serif); font-size: 1.35rem; line-height: 1.12; }
.book-card__title a:hover { color: var(--primary); }
.book-card__author { margin: 5px 0 0; color: var(--muted); font-size: .86rem; }
.book-card__actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 17px; }

.catalog-header {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(260px, 1fr);
  gap: 48px;
  align-items: end;
}
.catalog-count { margin: 15px 0 0; color: var(--muted); }
.catalog-search label { display: block; margin-bottom: 7px; }
.catalog-search input {
  width: 100%;
  border: 0;
  border-bottom: 1px solid rgba(33,30,26,.42);
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  padding: 10px 0;
  font-family: var(--font-serif);
  font-size: 1.18rem;
}
.catalog-search input:focus { outline: 0; border-color: var(--primary); }
.catalog-empty { display: none; color: var(--muted); }

/* Book detail */
.book-detail { padding-block: 48px 92px; }
.back-link { display: inline-block; margin-bottom: 38px; color: var(--muted); font-size: .9rem; text-decoration: underline; text-underline-offset: 4px; }
.back-link:hover { color: var(--primary); }
.book-detail__grid { display: grid; grid-template-columns: minmax(260px, 5fr) minmax(0, 7fr); gap: 72px; align-items: start; }
.book-detail__media { position: sticky; top: 106px; }
.book-detail__cover { width: min(100%, 470px); border-radius: var(--radius); box-shadow: var(--shadow-editorial); background: #ffffff; object-fit: contain; }
.book-detail__title { margin: 13px 0 0; font-size: clamp(3rem, 6vw, 5rem); line-height: 1.02; }
.book-detail__excerpt { margin: 32px 0 0; border-left: 2px solid var(--primary); padding-left: 20px; font-family: var(--font-serif); font-size: 1.45rem; font-style: italic; line-height: 1.55; }
.prose { margin-top: 38px; font-size: 1.03rem; line-height: 1.82; }
.prose > * { max-width: 760px; }
.prose p { margin-bottom: 1.35em; }
.prose blockquote { margin: 1.8em 0; border-left: 2px solid var(--rule); padding-left: 22px; font-family: var(--font-serif); font-size: 1.22rem; font-style: italic; }
.prose a { color: var(--primary); text-decoration: underline; text-underline-offset: 3px; }
.purchase-box { margin-top: 44px; border: 1px solid var(--rule); border-radius: var(--radius); background: var(--card); padding: 24px; }
.purchase-box__inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.purchase-box h2 { margin: 0; font-size: 1.65rem; }
.purchase-box p { margin: 4px 0 0; color: var(--muted); font-size: .76rem; }
.book-meta { margin: 45px 0 0; border-top: 1px solid var(--rule); }
.book-meta__row { display: grid; grid-template-columns: 1fr 2fr; gap: 18px; border-bottom: 1px solid var(--rule); padding: 12px 0; }
.book-meta dt { align-self: center; color: var(--muted); font-size: .68rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; }
.book-meta dd { margin: 0; font-family: var(--font-serif); font-size: 1.15rem; }

/* News */
.news-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 30px; }
.news-card { display: block; overflow: hidden; border: 1px solid var(--rule); border-radius: var(--radius); background: var(--card); transition: box-shadow .25s ease; }
.news-card:hover { box-shadow: var(--shadow-editorial); }
.news-card__image { aspect-ratio: 3 / 2; overflow: hidden; background: var(--secondary); }
.news-card__image img { width: 100%; height: 100%; object-fit: cover; transition: transform .65s ease; }
.news-card:hover .news-card__image img { transform: scale(1.04); }
.news-card__body { padding: 24px; }
.news-card h3 { margin: 9px 0 0; font-size: 1.65rem; line-height: 1.12; }
.news-card__read { margin-top: 17px; font-size: .86rem; text-decoration: underline; text-underline-offset: 4px; }
.news-list { display: grid; gap: 52px; }
.news-list-item { display: grid; grid-template-columns: 5fr 7fr; gap: 48px; align-items: start; border-bottom: 1px solid var(--rule); padding-bottom: 52px; }
.news-list-item:last-child { border-bottom: 0; }
.news-list-item__image { overflow: hidden; border-radius: var(--radius); background: var(--secondary); aspect-ratio: 3 / 2; }
.news-list-item__image img { width: 100%; height: 100%; object-fit: cover; transition: transform .65s ease; }
.news-list-item:hover img { transform: scale(1.025); }
.news-list-item h2 { margin: 12px 0 0; font-size: clamp(2rem, 4vw, 3.2rem); line-height: 1.06; }
.news-list-item:hover h2 { color: var(--primary); }
.news-single { padding-block: 60px 96px; }
.news-single__header { width: min(100%, 980px); margin-inline: auto; text-align: center; }
.news-single__title { margin: 16px 0 0; font-size: clamp(3.1rem, 7vw, 6rem); line-height: 1; }
.news-single__image { width: min(100%, 1100px); margin: 46px auto 0; border-radius: var(--radius); }
.news-single__content { width: min(100%, 760px); margin: 45px auto 0; }
.post-navigation { width: min(100%, 900px); margin: 64px auto 0; border-top: 1px solid var(--rule); padding-top: 28px; }
.post-navigation .nav-links { display: flex; justify-content: space-between; gap: 30px; }
.post-navigation a { font-family: var(--font-serif); font-size: 1.1rem; }
.post-navigation a:hover { color: var(--primary); }

/* About */
.about-intro { display: grid; grid-template-columns: 7fr 5fr; gap: 62px; padding-block: 84px; }
.about-copy { font-size: 1.12rem; line-height: 1.85; }
.about-copy p { margin-bottom: 1.35em; }
.about-areas { border-left: 1px solid var(--rule); padding-left: 40px; }
.about-areas ol { margin: 18px 0 0; padding: 0; list-style: none; }
.about-areas li { display: flex; align-items: baseline; gap: 14px; border-bottom: 1px solid var(--rule); padding: 11px 0; }
.about-areas__number { color: rgba(138,58,49,.75); font-family: var(--font-serif); font-size: 1.65rem; font-variant-numeric: tabular-nums; }
.about-areas__label { font-family: var(--font-serif); font-size: 1.25rem; }

/* Contact */
.contact-layout { display: grid; grid-template-columns: 4fr 8fr; gap: 70px; padding-block: 74px 92px; }
.contact-aside { display: grid; align-content: start; gap: 34px; }
.contact-aside address, .contact-aside__link { font-family: var(--font-serif); font-size: 1.28rem; line-height: 1.35; }
.contact-aside__link:hover { color: var(--primary); }
.contact-form { display: grid; gap: 24px; }
.form-field label { display: block; margin-bottom: 7px; }
.form-field input, .form-field textarea {
  width: 100%;
  border: 0;
  border-bottom: 1px solid rgba(33,30,26,.42);
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  padding: 10px 0;
  font-family: var(--font-serif);
  font-size: 1.12rem;
}
.form-field textarea { min-height: 160px; resize: vertical; }
.form-field input:focus, .form-field textarea:focus { outline: 0; border-color: var(--primary); }
.form-honeypot { position: absolute; left: -9999px; }
.form-notice { margin-bottom: 28px; border: 1px solid var(--rule); border-radius: var(--radius); padding: 18px 20px; }
.form-notice--success { border-color: rgba(45,110,65,.45); background: rgba(45,110,65,.07); }
.form-notice--error { border-color: rgba(138,58,49,.5); background: rgba(138,58,49,.07); }

/* Generic / 404 */
.generic-content { width: min(100% - 2.5rem, 800px); margin: 0 auto; padding-block: 72px 100px; }
.not-found { display: grid; min-height: 62vh; place-items: center; text-align: center; padding: 70px 20px; }
.not-found h1 { margin: 14px 0 0; font-size: clamp(3.2rem, 7vw, 5.5rem); }
.not-found p { max-width: 520px; margin: 15px auto 0; color: var(--muted); }
.not-found .button { margin-top: 26px; }

/* Footer */
.site-footer { margin-top: 90px; border-top: 1px solid var(--rule); background: rgba(238,229,214,.5); }
.footer-main { display: grid; grid-template-columns: 1.25fr .8fr 1fr; gap: 48px; padding-block: 54px; }
.footer-brand { display: flex; align-items: center; gap: 12px; }
.footer-brand img { width: auto; height: 48px; object-fit: contain; }
.footer-brand__name { font-family: var(--font-serif); font-size: 1.65rem; }
.footer-description { max-width: 400px; margin: 9px 0 0; color: var(--muted); font-size: .88rem; }
.footer-links { margin: 12px 0 0; padding: 0; list-style: none; }
.footer-links li + li { margin-top: 7px; }
.footer-links a { font-size: .9rem; }
.footer-links a:hover { color: var(--primary); }
.footer-address { margin-top: 12px; color: var(--muted); font-size: .9rem; line-height: 1.75; }
.footer-address a:hover { color: var(--primary); }
.footer-bottom { border-top: 1px solid var(--rule); }
.footer-bottom__inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; padding-block: 17px; color: var(--muted); font-size: .72rem; }

.pagination { margin-top: 52px; }
.pagination .nav-links { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px; }
.pagination .page-numbers { display: grid; min-width: 40px; min-height: 40px; place-items: center; border: 1px solid var(--rule); border-radius: var(--radius); padding: 7px; }
.pagination .current, .pagination a:hover { background: var(--ink); color: var(--paper); }

@media (max-width: 1024px) {
  .books-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .home-hero__inner { grid-template-columns: 1fr; }
  .hero-stats { max-width: 520px; border-left: 0; border-top: 1px solid var(--rule); padding: 28px 0 0; }
}

@media (max-width: 782px) {
  .admin-bar .site-header { top: 46px; }
}

@media (max-width: 768px) {
  .container-editorial { width: min(100% - 2.5rem, 1248px); }
  .site-brand__tag { display: none; }
  .menu-toggle { display: inline-flex; }
  .primary-nav {
    position: absolute;
    top: 100%; left: 0; right: 0;
    display: none;
    border-top: 1px solid var(--rule);
    border-bottom: 1px solid var(--rule);
    background: var(--paper);
  }
  .primary-nav.is-open { display: block; }
  .primary-nav ul { display: block; width: min(100% - 2.5rem, 1248px); margin-inline: auto; padding-block: 8px; }
  .primary-nav li { border-bottom: 1px solid rgba(217,209,196,.65); }
  .primary-nav li:last-child { border-bottom: 0; }
  .primary-nav a { display: block; padding: 12px 0; }
  .home-hero__inner { padding-block: 64px 72px; }
  .content-section, .content-section--large { padding-block: 64px; }
  .books-grid, .books-grid--home { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 20px; row-gap: 42px; }
  .news-grid { grid-template-columns: 1fr; }
  .news-list-item { grid-template-columns: 1fr; gap: 24px; }
  .catalog-header { grid-template-columns: 1fr; gap: 32px; }
  .book-detail__grid { grid-template-columns: 1fr; gap: 44px; }
  .book-detail__media { position: static; }
  .book-detail__cover { margin-inline: auto; }
  .about-intro { grid-template-columns: 1fr; }
  .about-areas { border-left: 0; border-top: 1px solid var(--rule); padding: 34px 0 0; }
  .contact-layout { grid-template-columns: 1fr; gap: 50px; }
  .footer-main { grid-template-columns: 1fr; }
}

@media (max-width: 520px) {
  .site-brand__name { font-size: 1.45rem; }
  .home-hero h1 { font-size: clamp(3rem, 15vw, 4rem); }
  .page-hero h1 { font-size: clamp(2.8rem, 15vw, 4.2rem); }
  .books-grid, .books-grid--home { column-gap: 14px; }
  .book-card__title { font-size: 1.08rem; }
  .book-card__actions { align-items: stretch; flex-direction: column; }
  .book-card__actions .button { width: 100%; padding-inline: 8px; }
  .section-heading { align-items: start; flex-direction: column; }
  .purchase-box__inner { align-items: stretch; flex-direction: column; }
  .purchase-box .button { width: 100%; }
  .post-navigation .nav-links { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
