/*
Theme Name: Mozaik
Theme URI: https://example.com/mozaik
Author: Yiğit Acar
Author URI: https://example.com
Description: A grid/mosaic theme for schools and studios. A mosaic cover page and centered single-column content pages, fully brandable via CSS variables. Everything on the homepage — including the brand block, News column and footer — is editable as a Cover Box. Custom Post Types: News & Events, Cover Boxes, Projects.
Version: 1.5.3
Requires at least: 6.0
Tested up to: 6.6
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: mozaik
Tags: education, grid, custom-post-types, block-styles, translation-ready, custom-menu, featured-images
*/

/* =========================================================
   0. Marka değişkenleri  —  Buradan tüm görünümü değiştir
   ========================================================= */
:root {
  /* Renkler */
  --color-bg:        #ffffff;
  --color-fg:        #111111;   /* ana metin / siyah */
  --color-muted:     #555555;   /* ikincil metin */
  --color-line:      #111111;   /* grid çizgileri (LSA'da ince siyah) */
  --color-line-soft: #e6e6e6;   /* yumuşak ayraç */
  --color-accent:    #111111;   /* vurgu / buton dolgusu */
  --color-accent-fg: #ffffff;   /* vurgu üstü metin */
  --color-link:      #111111;

  /* Tipografi */
  --font-heading: "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-body:    "Helvetica Neue", Helvetica, Arial, sans-serif;
  --fs-base: 17px;
  --lh-base: 1.5;

  /* Ölçüler */
  --rail-w: 56px;          /* sol sabit ray genişliği */
  --cell-pad: clamp(1.25rem, 2vw, 2rem);
  --maxw-content: 760px;   /* içerik sayfası metin genişliği */
  --line-gap: 6px;         /* kutular arası çok ince boşluk (çizgiler üst üste binmesin) */
}

/* Koyu tema örneği (isteğe bağlı; body.dark ile aç) */
body.mozaik-dark {
  --color-bg: #0e0e0e;
  --color-fg: #f4f4f4;
  --color-muted: #b5b5b5;
  --color-line: #f4f4f4;
  --color-line-soft: #2a2a2a;
  --color-accent: #f4f4f4;
  --color-accent-fg: #0e0e0e;
  --color-link: #f4f4f4;
}

/* =========================================================
   1. Reset / temel
   ========================================================= */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-fg);
  font-family: var(--font-body);
  font-size: var(--fs-base);
  line-height: var(--lh-base);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--color-link); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.1;
  margin: 0 0 .5em;
  letter-spacing: -0.01em;
}
p { margin: 0 0 1em; }
ul, ol { margin: 0 0 1em; padding-left: 1.2em; }

.screen-reader-text {
  position: absolute !important;
  clip: rect(1px,1px,1px,1px);
  width: 1px; height: 1px; overflow: hidden;
}
.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--color-fg); color: var(--color-bg);
  padding: .5rem 1rem; z-index: 1000;
}
.skip-link:focus { left: var(--rail-w); }

/* =========================================================
   2. Sol sabit ray (hamburger + sosyal)
   ========================================================= */
.site-rail {
  position: fixed;
  top: 0; left: 0; bottom: 0;
  width: var(--rail-w);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 0;
  border-right: 1px solid var(--color-line);
  background: var(--color-bg);
  z-index: 200;
}
.rail-toggle {
  appearance: none; border: 0; background: none; cursor: pointer;
  width: 32px; height: 32px; padding: 0;
  display: grid; place-items: center;
  color: var(--color-fg);
}
.rail-toggle .bars { display: block; width: 22px; height: 2px; background: currentColor; position: relative; }
.rail-toggle .bars::before,
.rail-toggle .bars::after { content: ""; position: absolute; left: 0; width: 22px; height: 2px; background: currentColor; }
.rail-toggle .bars::before { top: -7px; }
.rail-toggle .bars::after  { top: 7px; }
.rail-social { display: flex; flex-direction: column; gap: .9rem; }
.rail-social a { display: grid; place-items: center; color: var(--color-fg); width: 28px; height: 28px; }
.rail-social svg { width: 20px; height: 20px; }

/* Off-canvas menü */
.site-nav-overlay {
  position: fixed; inset: 0; left: var(--rail-w);
  background: var(--color-bg);
  transform: translateX(-102%);
  transition: transform .35s cubic-bezier(.6,.2,.1,1);
  z-index: 190;
  padding: 5rem clamp(2rem, 6vw, 6rem);
  overflow-y: auto;
}
.site-nav-overlay.is-open { transform: translateX(0); }
.site-nav-overlay .menu { list-style: none; padding: 0; margin: 0; }
.site-nav-overlay .menu li { border-bottom: 1px solid var(--color-line-soft); }
.site-nav-overlay .menu a {
  display: block; padding: .7rem 0;
  font-family: var(--font-heading); font-weight: 700;
  font-size: clamp(1.4rem, 3vw, 2.4rem);
}
.nav-close {
  position: absolute; top: 1.4rem; right: 1.6rem;
  background: none; border: 0; font-size: 2rem; cursor: pointer; color: var(--color-fg); line-height: 1;
}

/* =========================================================
   3. İçerik kabı (raydan sonra)
   ========================================================= */
.site {
  margin-left: var(--rail-w);
  min-height: 100vh;
}

/* =========================================================
   4. Mozaik kapak
   ========================================================= */
.cover {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-auto-rows: minmax(320px, auto);
  gap: var(--line-gap, 6px);
  padding: var(--line-gap, 6px);
}
.cell {
  border: 1px solid var(--color-line);
  padding: var(--cell-pad);
  display: flex;
  flex-direction: column;
  min-width: 0;
  position: relative;
}
.cell--tall  { grid-row: span 2; }
.cell--wide  { grid-column: span 2; }
.cell--center { align-items: center; justify-content: center; text-align: center; }
.cell--media { padding: 0; }
.cell--media img { width: 100%; height: 100%; object-fit: cover; }

.cell h2 { font-size: clamp(1.3rem, 1.6vw, 1.9rem); }
.cell h3 { font-size: clamp(1.1rem, 1.4vw, 1.5rem); }
.cell .cell-kicker { font-size: .8rem; letter-spacing: .08em; text-transform: uppercase; color: var(--color-muted); margin-bottom: .6rem; }
.cell p { color: var(--color-fg); }
.cell .cell-more {
  margin-top: auto;
  font-weight: 700;
  display: inline-flex; align-items: center; gap: .4rem;
}
.cell .cell-more::after { content: "→"; }

/* Logo hücresi */
.cell-brand .brand-logo { max-height: var(--brand-logo-h, 84px); width: auto; margin-bottom: 1rem; }
.cell-brand .brand-title { font-family: var(--font-heading); font-weight: 800; font-size: 1.5rem; line-height: 1; margin-bottom: 1rem; }
.cell-brand p { color: var(--color-fg); font-size: .98rem; }

/* APPLY dairesi */
.apply-circle {
  width: clamp(120px, 14vw, 170px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--color-accent);
  color: var(--color-accent-fg);
  display: grid; place-items: center;
  font-family: var(--font-heading); font-weight: 800; letter-spacing: .06em;
  font-size: 1.3rem;
  transition: transform .25s ease;
}
.apply-circle:hover { transform: scale(1.05); text-decoration: none; }

/* Öne çıkan tekli görsel hücresi (medya + başlık altta) */
.cell-media-tile { padding: 0; overflow: hidden; }
.cell-media-tile .tile-img { width: 100%; aspect-ratio: 4/3; object-fit: cover; }
.cell-media-tile .tile-body { padding: var(--cell-pad); }

/* News & Events sütunu */
.news-col { padding: var(--cell-pad); }
.news-col h2 { margin-bottom: 1rem; }
.news-item { display: block; margin-bottom: 1.25rem; }
.news-item:last-child { margin-bottom: 0; }
.news-item .news-thumb { width: 100%; aspect-ratio: 16/11; object-fit: cover; margin-bottom: .5rem; }
.news-item .news-title { font-weight: 700; text-transform: uppercase; font-size: .85rem; letter-spacing: .02em; }
.news-item .news-meta { font-size: .75rem; color: var(--color-muted); }

/* Alt görselli kutu içindeki carousel/görsel */
.cell .cell-figure { margin: 1rem calc(-1 * var(--cell-pad)) calc(-1 * var(--cell-pad)); }
.cell .cell-figure img { width: 100%; aspect-ratio: 16/9; object-fit: cover; }

.cover-scroll-hint { text-align: center; padding: .5rem; grid-column: 1 / -1; }

/* =========================================================
   5. İçerik sayfaları (single / page)
   ========================================================= */
.content-header {
  display: flex; align-items: center;
  padding: var(--cell-pad);
  border-bottom: 1px solid var(--color-line-soft);
}
.content-header .brand-logo { max-height: var(--brand-logo-h, 64px); width: auto; }
.content-header .brand-title { font-family: var(--font-heading); font-weight: 800; font-size: 1.3rem; }

.content-layout {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: clamp(1.5rem, 4vw, 4rem);
  padding: clamp(1.5rem, 4vw, 3.5rem) var(--cell-pad);
  max-width: 1600px;
}
.content-side nav ul { list-style: none; padding: 0; margin: 0; }
.content-side nav li { margin-bottom: .4rem; }
.content-side nav a {
  font-family: var(--font-heading); font-weight: 700;
  text-transform: uppercase; letter-spacing: .02em; font-size: .95rem;
}
.content-side nav .current-menu-item > a,
.content-side nav .current_page_item > a { text-decoration: underline; }
.content-side nav .sub-menu { list-style: none; padding-left: .8rem; margin: .3rem 0; }
.content-side nav .sub-menu a { font-weight: 400; text-transform: none; letter-spacing: 0; font-size: .9rem; }
.content-side .side-title {
  font-size: 1rem; text-transform: uppercase; letter-spacing: .04em;
  margin-bottom: .8rem; padding-bottom: .5rem; border-bottom: 1px solid var(--color-line-soft);
}
.content-side .side-sticky { position: sticky; top: 2rem; }

.content-main .entry-hero { margin-bottom: 2rem; }
.content-main .entry-hero img { width: 100%; max-height: 70vh; object-fit: cover; }
.content-main .entry-title { font-size: clamp(1.8rem, 3vw, 2.8rem); margin-bottom: .5rem; }
.content-main .entry-meta { color: var(--color-muted); font-size: .9rem; margin-bottom: 1.5rem; }
/* İçerik tüm sütun genişliğini kullanır; sağda boşluk kalmaz. */
.content-main .entry-content { max-width: none; }
/* Ama düz akan metin okunaklı bir satır genişliğinde kalır. */
.content-main .entry-content > p,
.content-main .entry-content > h2,
.content-main .entry-content > h3,
.content-main .entry-content > h4,
.content-main .entry-content > ul,
.content-main .entry-content > ol,
.content-main .entry-content > blockquote,
.content-main .entry-content > pre,
.content-main .entry-content > figure.wp-block-image:not(.alignwide):not(.alignfull) {
  max-width: var(--maxw-content);
}
/* Çok sütunlu ve geniş bloklar tüm alanı kullanır. */
.content-main .entry-content > .wp-block-columns,
.content-main .entry-content > .alignwide,
.content-main .entry-content > .alignfull,
.content-main .entry-content > .wp-block-gallery,
.content-main .entry-content > .wp-block-table {
  max-width: none;
  width: 100%;
}
.content-main .entry-content .wp-block-columns { display: flex; flex-wrap: wrap; gap: clamp(1.5rem, 4vw, 3rem); }
.content-main .entry-content .wp-block-column { flex: 1 1 320px; min-width: 0; }
.content-main .entry-content h2 { margin-top: 1.8rem; font-size: 1.6rem; }
.content-main .entry-content h3 { margin-top: 1.4rem; font-size: 1.25rem; }
.content-main .entry-content img { margin: 1.5rem 0; }
.content-main .entry-content blockquote {
  border-left: 3px solid var(--color-line); margin: 1.5rem 0; padding-left: 1.2rem; color: var(--color-muted); font-style: italic;
}

/* Etkinlik meta rozeti */
.event-badge {
  display: inline-flex; gap: .5rem; align-items: baseline;
  border: 1px solid var(--color-line); padding: .35rem .7rem; margin-bottom: 1rem; font-size: .85rem;
}
.event-badge .event-date { font-weight: 700; }

/* =========================================================
   6. Arşiv / listeleme
   ========================================================= */
.archive-header { padding: var(--cell-pad); border-bottom: 1px solid var(--color-line); }
.archive-header h1 { font-size: clamp(1.6rem, 3vw, 2.6rem); }
.archive-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--line-gap, 6px);
  padding: var(--line-gap, 6px);
}
.archive-grid .card {
  border: 1px solid var(--color-line);
  padding: 0;
}
.archive-grid .card .card-img { width: 100%; aspect-ratio: 4/3; object-fit: cover; }
.archive-grid .card .card-body { padding: var(--cell-pad); }
.archive-grid .card h2 { font-size: 1.15rem; }
.archive-grid .card .card-meta { color: var(--color-muted); font-size: .8rem; margin-bottom: .5rem; }

.pagination { padding: var(--cell-pad); display: flex; gap: .5rem; flex-wrap: wrap; }
.pagination .page-numbers {
  border: 1px solid var(--color-line); padding: .4rem .8rem; display: inline-block;
}
.pagination .current { background: var(--color-accent); color: var(--color-accent-fg); }

/* =========================================================
   7. Footer (simple: logos + contact + copyright)
   ========================================================= */
.site-footer {
  border-top: 1px solid var(--color-line);
  font-size: .95rem; color: var(--color-fg);
}
.site-footer a { color: var(--color-fg); }

.footer-simple {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: clamp(1.5rem, 5vw, 4rem);
  padding: clamp(1.75rem, 4vw, 3rem) var(--cell-pad);
}
.footer-logos {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: clamp(1.25rem, 3vw, 2.5rem);
}
.footer-logos img { width: auto; display: block; }
.footer-logo-link { display: inline-flex; transition: opacity .2s ease; }
.footer-logo-link:hover { opacity: .7; }

.footer-contact { max-width: 520px; }
.footer-contact h3 {
  font-size: .8rem; letter-spacing: .08em; text-transform: uppercase;
  color: var(--color-muted); margin-bottom: .4rem;
}
.footer-contact p { margin: 0; line-height: 1.5; }
.footer-contact a { text-decoration: underline; }

.footer-copyright {
  padding: 1rem var(--cell-pad);
  border-top: 1px solid var(--color-line-soft);
  font-size: .8rem; color: var(--color-muted);
}

@media (max-width: 640px) {
  .footer-simple { flex-direction: column; align-items: flex-start; }
}

/* =========================================================
   8. Yorumlar (temel)
   ========================================================= */
.comments-area { max-width: var(--maxw-content); padding: 0 var(--cell-pad) 2rem; }
.comment-list { list-style: none; padding: 0; }
.comment-list .comment { border-top: 1px solid var(--color-line-soft); padding: 1rem 0; }

/* =========================================================
   9. Duyarlı (responsive)
   ========================================================= */
@media (max-width: 1100px) {
  .cover { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cell--wide { grid-column: span 2; }
  .cell--tall { grid-row: span 1; }
}
@media (max-width: 820px) {
  .content-layout { grid-template-columns: 1fr; }
  .content-side .side-sticky { position: static; }
  /* Masaüstünde menü solda; mobilde içeriğin sonuna in. */
  .content-main { order: 1; }
  .content-side {
    order: 2;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--color-line-soft);
  }
}
@media (max-width: 680px) {
  :root { --rail-w: 46px; }
  .cover { grid-template-columns: 1fr; grid-auto-rows: auto; }
  .cell { min-height: 200px; }
  .cell--wide { grid-column: span 1; }
}

/* WordPress zorunlu yardımcı sınıflar */
.alignleft { float: left; margin: .3rem 1.2rem 1rem 0; }
.alignright { float: right; margin: .3rem 0 1rem 1.2rem; }
.aligncenter { display: block; margin: 1rem auto; }
.wp-caption { max-width: 100%; }
.wp-caption-text { font-size: .8rem; color: var(--color-muted); }
.sticky, .gallery-caption, .bypostauthor { display: block; }
.entry-content .wp-block-image figcaption { font-size: .8rem; color: var(--color-muted); }
