/*
Theme Name: Meraklı Kaşif
Theme URI: https://example.com
Author: Meraklı Kaşif
Description: Çocuklara yönelik kısa mini belgeseller için tasarlanmış, gerçek bir bilim/belgesel yayın sitesi görünümüne sahip WordPress teması. YouTube videolarınızı kolayca ekleyip düzenli bir video akışında sergileyin.
Version: 2.0
Requires at least: 6.0
Requires PHP: 7.4
Tested up to: 6.6
License: GNU General Public License v2 or later
License URI: LICENSE
Text Domain: meraklikasif
*/

/* ============================================
   TOKENS
   ============================================ */
:root {
  --cream: #F7F5EF;
  --paper: #FFFFFF;
  --ink: #12213A;
  --ink-soft: #4B5A75;
  --ink-line: rgba(18,33,58,0.10);

  --sun: #FFC94A;
  --sun-deep: #E8A800;
  --sky: #2E8FC2;
  --sky-deep: #1F6C97;
  --leaf: #3E8E56;
  --leaf-deep: #2E6E42;
  --coral: #E4573D;
  --coral-deep: #C2432B;
  --grape: #6C5B9E;

  --radius-lg: 18px;
  --radius-md: 12px;
  --radius-sm: 8px;

  --shadow-card: 0 2px 6px rgba(18,33,58,0.06), 0 10px 24px rgba(18,33,58,0.08);
  --shadow-card-hover: 0 6px 14px rgba(18,33,58,0.10), 0 18px 34px rgba(18,33,58,0.14);
  --shadow-pop: 0 2px 8px rgba(18,33,58,0.14);

  --font-display: "Poppins", "Segoe UI", sans-serif;
  --font-body: "Inter", "Segoe UI", sans-serif;
}

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

/* ============================================
   BASE
   ============================================ */
* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
}

h1, h2, h3, h4, .brand-text, .btn, .site-nav a, .eyebrow {
  font-family: var(--font-display);
}

h1, h2, h3, h4 {
  color: var(--ink);
  line-height: 1.2;
  margin: 0 0 0.5em;
  font-weight: 700;
}

a { color: var(--sky-deep); text-decoration: none; }
a:hover { color: var(--coral-deep); }

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

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

:focus-visible {
  outline: 3px solid var(--sky-deep);
  outline-offset: 3px;
  border-radius: 4px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 15px;
  padding: 12px 24px;
  border-radius: var(--radius-sm);
  background: var(--sun);
  color: var(--ink);
  border: none;
  box-shadow: var(--shadow-pop);
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.btn:hover {
  background: var(--sun-deep);
  color: var(--ink);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(18,33,58,0.18);
}

/* ============================================
   HEADER
   ============================================ */
.site-header {
  background: var(--ink);
  padding: 0;
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: 0 2px 12px rgba(0,0,0,0.12);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  padding: 14px 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-sm);
  background: var(--sun);
  border: 2px solid var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}

.brand-text {
  font-weight: 800;
  font-size: 21px;
  color: var(--paper);
  letter-spacing: 0.1px;
  text-transform: uppercase;
}

.site-nav ul {
  list-style: none;
  display: flex;
  gap: 2px;
  margin: 0;
  padding: 0;
  flex-wrap: wrap;
}

.site-nav a {
  display: inline-block;
  padding: 9px 16px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.75);
  background: transparent;
  transition: color 0.15s ease, background 0.15s ease;
}

.site-nav a:hover,
.site-nav a:focus-visible {
  background: rgba(255,255,255,0.08);
  color: var(--sun);
}

/* ============================================
   SPOTLIGHT (öne çıkan belgesel - front page hero)
   ============================================ */
.spotlight {
  background: var(--ink);
  background-image: radial-gradient(circle at 85% 20%, rgba(46,143,194,0.25) 0, transparent 45%);
  padding: 48px 0 56px;
  margin-bottom: 8px;
}

.spotlight-inner {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 48px;
  align-items: center;
}

.spotlight-text .eyebrow {
  color: var(--sun);
  margin-bottom: 14px;
}

.spotlight-text h1 {
  color: var(--paper);
  font-size: clamp(28px, 3.6vw, 42px);
  margin-bottom: 16px;
}

.spotlight-text p {
  color: rgba(255,255,255,0.72);
  font-size: 17px;
  max-width: 480px;
  margin: 0 0 22px;
}

.spotlight-meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 22px;
}

.spotlight-media {
  position: relative;
}

.spotlight-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: #0A1524;
  box-shadow: 0 20px 44px rgba(0,0,0,0.35);
}

.spotlight-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.spotlight-frame:hover img { transform: scale(1.04); }

.spotlight-frame .duration-tag {
  bottom: 14px;
  top: auto;
  right: 14px;
}

.spotlight-play {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.spotlight-play span {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  background: rgba(255,201,74,0.95);
  color: var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  transition: transform 0.2s ease;
  box-shadow: 0 8px 20px rgba(0,0,0,0.3);
}

.spotlight-frame:hover .spotlight-play span { transform: scale(1.08); }

/* Yedek hero (hiç yazı yokken front-page'de gösterilir) */
.hero-fallback {
  text-align: center;
  padding: 56px 0 40px;
}

.hero-fallback .brand-mark {
  width: 84px;
  height: 84px;
  margin: 0 auto 20px;
  font-size: 38px;
  background: var(--paper);
  border: 2px solid var(--ink-line);
  box-shadow: var(--shadow-card);
}

.hero-fallback h1 {
  font-size: clamp(28px, 4vw, 40px);
}

.hero-fallback p {
  max-width: 520px;
  margin: 0 auto;
  font-size: 18px;
  color: var(--ink-soft);
}

/* ============================================
   TAG STRIP / KATEGORİ ŞERİDİ
   ============================================ */
.tag-strip {
  padding: 22px 0 6px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.tag-strip .strip-label {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-right: 4px;
}

/* ============================================
   BADGES / ETIKETLER
   ============================================ */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 6px 13px;
  border-radius: 999px;
  border: none;
  background: var(--cream);
  color: var(--ink);
}

.badge.badge-sky { background: var(--sky); color: var(--paper); }
.badge.badge-leaf { background: var(--leaf); color: var(--paper); }
.badge.badge-coral { background: var(--coral); color: var(--paper); }
.badge.badge-outline { background: transparent; border: 1.5px solid rgba(255,255,255,0.4); color: var(--paper); }

.duration-tag {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(18,33,58,0.82);
  color: var(--paper);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 12px;
  padding: 5px 10px;
  border-radius: var(--radius-sm);
  z-index: 2;
  backdrop-filter: blur(2px);
}

/* ============================================
   SECTION HEADINGS
   ============================================ */
.section-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 30px 0 4px;
  border-bottom: 2px solid var(--ink-line);
  margin-bottom: 8px;
}

.section-heading h2 {
  font-size: 24px;
  margin: 0;
  padding-bottom: 14px;
  border-bottom: 3px solid var(--sun);
  margin-bottom: -2px;
}

.section-heading .section-sub {
  font-size: 14px;
  color: var(--ink-soft);
  padding-bottom: 14px;
}

/* ============================================
   VIDEO GRID / KARE VIDEO KARTLARI
   ============================================ */
.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 26px;
  padding: 22px 0 60px;
}

.video-card {
  position: relative;
  background: var(--paper);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  border: 1px solid var(--ink-line);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  display: flex;
  flex-direction: column;
}

.video-card:hover,
.video-card:focus-within {
  transform: translateY(-4px);
  box-shadow: var(--shadow-card-hover);
}

.video-thumb {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #0A1524;
}

.video-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.video-card:hover .video-thumb img { transform: scale(1.06); }

.thumb-category {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 2;
}

.play-dot {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.video-card:hover .play-dot,
.video-card:focus-within .play-dot { opacity: 1; }

.play-dot span {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: rgba(255,201,74,0.95);
  color: var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  transition: transform 0.2s ease;
}

.video-card:hover .play-dot span { transform: scale(1.08); }

.card-body {
  padding: 16px 18px 18px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.card-title {
  margin: 0 0 10px;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-title a { color: var(--ink); }
.card-title a:hover { color: var(--coral-deep); }

.card-meta {
  margin-top: auto;
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

/* ============================================
   SINGLE POST
   ============================================ */
.single-video-wrap {
  max-width: 880px;
  margin: 0 auto 20px;
}

.single-video-frame {
  position: relative;
  width: 100%;
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 16 / 9;
  box-shadow: var(--shadow-card);
  border: 1px solid var(--ink-line);
  background: #0A1524;
}

.single-video-frame iframe,
.single-video-frame video,
.single-video-frame img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  object-fit: cover;
}

.video-facade {
  position: absolute;
  inset: 0;
  cursor: pointer;
  background: #0A1524;
}

.video-facade::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(10,21,36,0) 55%, rgba(10,21,36,0.55) 100%);
  pointer-events: none;
}

.facade-play {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
}

.facade-play span {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  background: rgba(255,201,74,0.95);
  color: var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 27px;
  transition: transform 0.2s ease;
  box-shadow: 0 10px 24px rgba(0,0,0,0.35);
}

.video-facade:hover .facade-play span,
.video-facade:focus-visible .facade-play span {
  transform: scale(1.08);
}

.single-header {
  text-align: center;
  max-width: 760px;
  margin: 30px auto 10px;
}

.single-header h1 {
  font-size: clamp(24px, 3.6vw, 34px);
}

.single-meta {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin: 14px 0 20px;
  flex-wrap: wrap;
}

.single-meta .badge { background: var(--cream); }

.single-content {
  max-width: 660px;
  margin: 0 auto 40px;
  font-size: 18px;
  color: var(--ink-soft);
}

.single-content p { margin: 0 0 1.1em; }

.related-heading {
  text-align: center;
  margin-top: 10px;
  padding-top: 24px;
  border-top: 2px solid var(--ink-line);
}

.related-heading span {
  display: inline-block;
  background: var(--ink);
  color: var(--paper);
  padding: 8px 22px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* ============================================
   PAGE / GENERIC CONTENT
   ============================================ */
.page-content {
  max-width: 760px;
  margin: 30px auto 60px;
  background: var(--paper);
  border-radius: var(--radius-lg);
  padding: 40px;
  box-shadow: var(--shadow-card);
  border: 1px solid var(--ink-line);
}

.page-content h1 { font-size: 30px; }

.no-results {
  text-align: center;
  max-width: 480px;
  margin: 40px auto 80px;
}

.no-results .brand-mark {
  width: 88px;
  height: 88px;
  margin: 0 auto 20px;
  font-size: 38px;
  background: var(--paper);
  border: 2px solid var(--ink-line);
  box-shadow: var(--shadow-card);
}

/* ============================================
   FOOTER
   ============================================ */
.site-footer {
  background: var(--ink);
  padding: 30px 0;
  margin-top: 20px;
}

.footer-inner {
  text-align: center;
  color: rgba(255,255,255,0.65);
  font-weight: 600;
  font-size: 14px;
}

/* ============================================
   WIDGETS
   ============================================ */
.widget {
  background: var(--paper);
  border-radius: var(--radius-md);
  padding: 20px;
  margin-bottom: 20px;
  border: 1px solid var(--ink-line);
  box-shadow: var(--shadow-card);
}

.widget-title {
  font-size: 17px;
  margin-bottom: 10px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--ink-line);
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 860px) {
  .spotlight-inner {
    grid-template-columns: 1fr;
    gap: 28px;
  }
  .spotlight-text { text-align: center; }
  .spotlight-text p { margin-left: auto; margin-right: auto; }
  .spotlight-meta { justify-content: center; }
}

@media (max-width: 640px) {
  .wrap { padding: 0 16px; }
  .header-inner { justify-content: center; text-align: center; }
  .site-nav ul { justify-content: center; }
  .video-grid { grid-template-columns: 1fr; gap: 22px; }
  .brand-text { font-size: 18px; }
  .spotlight { padding: 32px 0 40px; }
  .section-heading { flex-direction: column; align-items: flex-start; gap: 2px; }

  .single-video-wrap {
    width: 100vw;
    max-width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    margin-bottom: 18px;
  }

  .single-video-frame {
    border-radius: 0;
    border-left: 0;
    border-right: 0;
  }
}

@media (max-width: 400px) {
  .video-thumb { aspect-ratio: 4 / 3; }
}
