/* Yerel Quicksand kopyası: çevrimdışı önizlemede de aynı font. */
@font-face {
  font-family: 'Quicksand';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('assets/fonts/Quicksand-400.ttf') format('truetype');
}
@font-face {
  font-family: 'Quicksand';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('assets/fonts/Quicksand-500.ttf') format('truetype');
}
@font-face {
  font-family: 'Quicksand';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('assets/fonts/Quicksand-600.ttf') format('truetype');
}
@font-face {
  font-family: 'Quicksand';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('assets/fonts/Quicksand-700.ttf') format('truetype');
}

/* RENKLER: kullanıcının orijinal MegaGergin başlık görselinden örneklendi. */
:root {
  --blue: #3477bb;
  --cyan: #14b2fb;
  --navy: #162d3f;
  --ink: #020f15;
  --grey: #858585;
  --paper: #f8f8f8;
  --white: #ffffff;
  --line: #dbe2e7;
}

/* Font form alanları dahil tüm sitede aynıdır. */
* { box-sizing: border-box; }
body {
  margin: 0;
  color: var(--navy);
  background: var(--paper);
  font-family: 'Quicksand', sans-serif;
  font-weight: 500;
}
button, input, textarea, select { font: inherit; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; }
[hidden] { display: none !important; }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 3px solid var(--cyan);
  outline-offset: 4px;
}

/* Üst marka alanı */
header, footer, main { max-width: 1240px; margin: auto; }
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 22px 32px;
  border-bottom: 1px solid var(--line);
  position: relative;
  z-index: 10;
}
.brand { display: flex; align-items: center; gap: 12px; font-size: 30px; font-weight: 700; }
.brand img { width: 56px; height: 56px; }
.brand small { display: block; color: var(--grey); font-size: 10px; letter-spacing: 1px; margin-top: 4px; }

/* Hamburger menü: açık/kapalı durumu app.js ile yönetilir. */
.menu-wrap { position: relative; padding: 10px 0 10px 20px; }
.menu-toggle { width: 46px; height: 42px; display: grid; align-content: center; gap: 6px; padding: 9px; border: 0; background: none; }
.menu-toggle span { display: block; height: 2px; width: 28px; background: var(--navy); }
.menu-panel {
  position: absolute;
  top: 100%;
  right: 0;
  width: 250px;
  padding: 12px;
  background: var(--white);
  border: 1px solid var(--line);
  box-shadow: 0 16px 45px #162d3f20;
  border-radius: 9px;
  visibility: hidden;
  opacity: 0;
}
.menu-wrap.open .menu-panel { visibility: visible; opacity: 1; }
.menu-panel a, .submenu > button {
  display: block;
  width: 100%;
  padding: 11px 14px;
  text-align: left;
  border: 0;
  background: none;
  color: var(--navy);
  font-weight: 600;
  border-radius: 5px;
}
.menu-panel a:hover, .submenu > button:hover { background: #edf6fc; color: var(--blue); }
.submenu { position: relative; }
.submenu > button { display: flex; justify-content: space-between; }
.submenu-panel {
  position: absolute;
  right: 100%;
  top: 0;
  width: 210px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: white;
  box-shadow: 0 12px 28px #162d3f15;
  visibility: hidden;
}
.submenu.open .submenu-panel { visibility: visible; }
.language { border-top: 1px solid var(--line); margin-top: 10px; padding-top: 12px; }
.language small { display: block; padding: 0 14px 6px; color: var(--grey); }
.language a[aria-current='true'] { color: var(--blue); background: #edf6fc; }

/* Ana sayfa ve yayın bağlantıları */
.hero { padding: 56px 32px 30px; }
.eyebrow { font-size: 11px; letter-spacing: 1.5px; color: #657c8b; font-weight: 700; }
h1 { font-size: clamp(39px, 5.8vw, 72px); line-height: 1.12; letter-spacing: -2px; margin: 22px 0; }
h1 em { color: var(--blue); font-style: normal; }
.intro { color: #647889; font-size: 17px; line-height: 1.7; }
.channels { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; margin-top: 35px; }
.channel { padding: 32px; border-radius: 10px; min-height: 230px; transition: transform .18s; }
.channel:hover { transform: translateY(-3px); }
.channel > span { font-weight: 700; font-size: 16px; }
.channel h2 { font-size: 36px; line-height: 1.15; letter-spacing: -1px; max-width: 390px; }
.channel p { font-size: 13px; }
.youtube { color: white; background: var(--blue); border-top: 4px solid var(--cyan); }
.kick { color: white; background: var(--navy); border-top: 4px solid var(--cyan); }

/* Arşiv kartları ve filtreler */
.archive-section { padding: 35px 32px 65px; }
.section-head { display: flex; justify-content: space-between; align-items: center; gap: 20px; }
.section-head h2 { font-size: 30px; }
.section-head > a { font-size: 13px; color: var(--blue); }
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 25px; }
.card { display: block; background: white; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.card:hover { border-color: var(--blue); }
.cover { height: 200px; background: #edf2f5; }
.cover img { width: 100%; height: 100%; object-fit: cover; }
.cover img.fallback { object-fit: contain; padding: 40px; opacity: .6; }
.card-body { padding: 22px; }
.card-body small { font-size: 11px; color: #688297; }
.card h3 { margin: 14px 0 20px; font-size: 21px; line-height: 1.3; min-height: 55px; }
.card-body > span { color: var(--blue); font-size: 12px; }
.tools { display: flex; gap: 20px; justify-content: space-between; align-items: center; margin-top: 32px; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; }
.filters button { border: 1px solid var(--line); border-radius: 6px; padding: 10px 14px; background: white; }
.filters button.active { background: var(--blue); border-color: var(--blue); color: white; }
#search { width: 230px; padding: 11px 14px; border: 1px solid var(--line); border-radius: 6px; }
#count { font-size: 12px; color: #688297; margin: 24px 0; }

/* Makale: orijinal resim ölçüleri ve metnin resim çevresinden akışı. */
.article { max-width: 800px; padding: 40px 40px 65px; background: white; }
.article h1 { font-size: 44px; margin-bottom: 30px; }
.back { display: inline-block; font-size: 13px; color: var(--blue); margin-bottom: 25px; }
.back.end { clear: both; display: block; padding-top: 35px; }
.prose { display: flow-root; font-size: 16px; line-height: 1.7; color: #263b49; overflow-wrap: anywhere; }
.prose p { margin: 0 0 13px; }
.prose img { max-width: 100%; height: auto; vertical-align: middle; }
.prose .float-right { float: right; margin: 4px 0 12px 16px; }
.prose .float-left { float: left; margin: 4px 16px 12px 0; }
.prose .inline-image { display: inline-block; margin: 5px 8px 10px 0; }
.prose a { color: var(--blue); text-decoration: underline; }
.prose table { display: block; max-width: 100%; overflow: auto; border-collapse: collapse; }
.prose td, .prose th { padding: 8px; border: 1px solid var(--line); }
.missing-image {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  max-width: 100%;
  border: 1px solid #b3c2cc;
  color: #7b8b97;
  background: transparent;
  vertical-align: middle;
}
.missing-image > span { padding: 10px; text-align: center; font-size: 11px; overflow-wrap: anywhere; }
.translation-note { font-size: 13px; padding: 12px; border-left: 2px solid var(--cyan); background: #f0f8fd; }

/* İletişim formu */
.contact { max-width: 780px; padding: 45px 32px 65px; }
form { margin-top: 30px; }
form label { display: block; margin-bottom: 20px; font-weight: 600; }
form input, form textarea { display: block; width: 100%; padding: 13px; margin-top: 8px; border: 1px solid #c5d2db; border-radius: 6px; background: white; color: var(--navy); }
form textarea { resize: vertical; }
.honey { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.send { border: 0; background: var(--blue); color: white; padding: 13px 28px; border-radius: 6px; }
.send:disabled { opacity: .45; cursor: not-allowed; }
#form-status { font-size: 13px; line-height: 1.6; }
footer { display: flex; justify-content: space-between; gap: 20px; padding: 30px 32px; border-top: 1px solid var(--line); font-size: 12px; }
footer span { color: var(--grey); }

/* Telefon: alt menü iç içe açılır; görseller tek sütuna geçer. */
@media (max-width: 760px) {
  header { padding: 17px 20px; }
  .brand { font-size: 25px; gap: 8px; }
  .brand img { width: 45px; height: 45px; }
  .brand small { font-size: 8px; letter-spacing: .4px; }
  .submenu-panel { position: static; width: auto; display: none; box-shadow: none; border: 0; border-left: 2px solid var(--cyan); margin: 0 8px; }
  .submenu.open .submenu-panel { display: block; }
  .menu-panel { max-height: 78vh; overflow: auto; }
  .hero, .archive-section { padding: 30px 20px; }
  h1 { letter-spacing: -1px; }
  .channel { padding: 24px; }
  .channel h2 { font-size: 28px; }
  .grid { grid-template-columns: repeat(2, 1fr); gap: 15px; }
  .tools, .section-head { align-items: stretch; flex-direction: column; gap: 12px; }
  #search { width: 100%; }
  .section-head { margin-bottom: 20px; }
  .section-head h2 { margin-bottom: 0; }
  .article { padding: 30px 20px; }
  .article h1 { font-size: 36px; }
  .prose .float-left, .prose .float-right { float: none; display: block; margin: 15px auto; }
  .prose { font-size: 16px; }
  footer { flex-wrap: wrap; padding: 25px 20px; }
}
@media (max-width: 480px) {
  .channels, .grid { grid-template-columns: 1fr; }
  .channel { min-height: 190px; }
  .card h3 { min-height: 0; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}

/* V4: filtrelerin fare ve klavye geri bildirimi */
.filters button {
    transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}
.filters button:hover, .filters button:focus-visible {
    border-color: var(--cyan);
    box-shadow: 0 0 0 2px var(--cyan);
    transform: translateY(-2px);
    outline: none;
}
/* Film listesi: puan tek satırda; küçük ekranlarda tablo kendi içinde kayar. */
.table-scroll { max-width: 100%; overflow-x: auto; clear: both; }
.prose table.film-table { display: table; width: 100%; min-width: 510px; table-layout: fixed; font-size: 13px; line-height: 1.5; }
.film-table th:nth-child(1), .film-table td:nth-child(1) { width: 37%; }
.film-table th:nth-child(2), .film-table td:nth-child(2) { width: 19%; }
.film-table th:nth-child(3), .film-table td:nth-child(3) { width: 30%; }
.film-table th:nth-child(4), .film-table td:nth-child(4) { width: 14%; min-width: 65px; white-space: nowrap; text-align: center; overflow-wrap: normal; }
.replacement-photo { margin: 14px 0; clear: both; }
.replacement-photo img { display: block; width: 100%; max-height: 460px; object-fit: contain; background: #f8f8f8; }
.replacement-photo figcaption { font-size: 12px; line-height: 1.5; color: #526776; padding: 8px 0; }
.visit { border-top: 1px solid var(--line); margin-top: 48px; padding-top: 30px; }
.visit h2 { font-size: 28px; }
.visit p { line-height: 1.6; }
.visit iframe { display: block; width: 100%; height: 370px; border: 0; border-radius: 8px; margin: 20px 0; }
.visit > a { color: var(--blue); }

/* V4.1: Tek ışık yayı çerçeve boyunca 2.4 saniyede döner.
   Kanallarda sürekli; kart ve filtrelerde hover/focus ile çalışır. */
@property --mg-frame-angle {
    syntax: '<angle>';
    initial-value: 0deg;
    inherits: false;
}
.card, .channel, .filters button {
    position: relative;
    isolation: isolate;
}
.card::after, .channel::after, .filters button::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 1;
    padding: 2px;
    border-radius: inherit;
    pointer-events: none;
    background: conic-gradient(
        from var(--mg-frame-angle),
        #3477bb35 0deg 282deg,
        #3477bb 300deg,
        #14b2fb 326deg,
        #ffffff 334deg,
        #14b2fb 340deg,
        #3477bb35 360deg
    );
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask-composite: exclude;
    opacity: 0;
    animation: mg-frame-orbit 2.4s linear infinite;
    animation-play-state: paused;
    transition: opacity 180ms ease;
}
.channel::after,
.card:hover::after, .card:focus-visible::after,
.filters button:hover::after, .filters button:focus-visible::after {
    opacity: 1;
    animation-play-state: running;
}
/* Önceki düz mavi halkanın yerini hareketli çerçeve alır. */
.filters button:hover, .filters button:focus-visible {
    box-shadow: none;
}
@keyframes mg-frame-orbit {
    to { --mg-frame-angle: 360deg; }
}
@media (prefers-reduced-motion: reduce) {
    .card::after, .channel::after, .filters button::after {
        animation: none;
        transition: none;
    }
}