/* ==========================================================
   Karamin · A11y Widget + Skip-to-content
   ========================================================== */

/* Skip link — sadece klavye odağında görünür, ekran okuyucu hep okur */
.cms-skip-link {
  position: absolute;
  top: -40px;
  left: 8px;
  z-index: 99999;
  padding: 10px 20px;
  background: #000;
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  border-radius: 0 0 8px 8px;
  transition: top .15s ease;
}
.cms-skip-link:focus {
  top: 0;
  outline: 3px solid #ffd700;
}


.a11y-toggle {
  position: fixed; right: 18px; bottom: 18px; z-index: 9000;
  width: 56px; height: 56px; border-radius: 50%;
  background: var(--red, #d91e26); color: #fff;
  border: 0; cursor: pointer;
  box-shadow: 0 12px 28px rgba(0,0,0,0.25);
  display: flex; align-items: center; justify-content: center;
  transition: transform .2s ease;
}
.a11y-toggle:hover { transform: scale(1.08); }
.a11y-toggle svg { width: 26px; height: 26px; }

.a11y-panel {
  position: fixed; right: 18px; bottom: 86px; z-index: 9001;
  width: 320px; max-width: calc(100vw - 36px);
  background: #fff; color: #1a1a1a;
  border-radius: 18px; padding: 18px;
  box-shadow: 0 30px 60px rgba(0,0,0,0.18);
  border: 1px solid rgba(0,0,0,0.08);
  font-family: ui-sans-serif, system-ui, -apple-system, sans-serif;
}
.a11y-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.a11y-head h3 { margin: 0; font-size: 15px; font-weight: 700; }
.a11y-close { background: none; border: 0; font-size: 26px; line-height: 1; cursor: pointer; color: #555; }
.a11y-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; }
.a11y-tile {
  padding: 14px 6px; border: 1px solid rgba(0,0,0,0.08);
  background: #fafafa; border-radius: 12px;
  display: flex; flex-direction: column; gap: 6px;
  align-items: center; cursor: pointer; font-size: 11px;
  color: #333; text-align: center; line-height: 1.25;
  transition: all .18s ease;
}
.a11y-tile:hover { background: #fff; border-color: rgba(0,0,0,0.2); transform: translateY(-1px); }
.a11y-tile.is-active { background: var(--red, #d91e26); color: #fff; border-color: var(--red, #d91e26); }
.a11y-tile .a11y-icon { font-size: 18px; line-height: 1; font-weight: 700; }
.a11y-tile-reset { grid-column: 1 / 2; }
.a11y-tile-read { grid-column: 2 / 4; flex-direction: row; gap: 8px; font-size: 12px; }
.a11y-tile-read.is-active { background: #1a1a1a; color: #fff; border-color: #1a1a1a; }
.a11y-foot { margin: 12px 0 0; font-size: 11px; color: #777; }

/* === Reading Guide bar === */
.a11y-guide-bar {
  position: fixed; left: 0; right: 0; height: 28px;
  background: rgba(255, 230, 0, 0.25);
  border-top: 1px solid rgba(0,0,0,0.4);
  border-bottom: 1px solid rgba(0,0,0,0.4);
  z-index: 8500; pointer-events: none;
}

/* === Karaoke bar === */
.a11y-karaoke {
  position: fixed; left: 50%; bottom: 0; transform: translateX(-50%);
  z-index: 9002; width: min(900px, 96vw);
  background: #1a1a1a; color: #fff;
  border-radius: 22px 22px 0 0;
  padding: 14px 22px; box-shadow: 0 -10px 30px rgba(0,0,0,0.3);
}
.a11y-karaoke-inner { display: flex; flex-direction: column; gap: 10px; }
.a11y-karaoke-controls {
  display: flex; align-items: center; gap: 12px; font-size: 13px;
}
.a11y-karaoke-controls button {
  background: rgba(255,255,255,0.08); border: 0;
  color: #fff; width: 36px; height: 36px; border-radius: 50%;
  cursor: pointer; font-size: 14px;
}
.a11y-karaoke-controls button:hover { background: rgba(255,255,255,0.15); }
.a11y-karaoke-speed { display: inline-flex; align-items: center; gap: 8px; opacity: 0.85; margin-left: auto; }
.a11y-karaoke-speed select {
  background: rgba(255,255,255,0.1); color: #fff;
  border: 1px solid rgba(255,255,255,0.2); border-radius: 8px;
  padding: 4px 8px; font-size: 12px;
}
.a11y-karaoke-text {
  font-size: 18px; line-height: 1.5; min-height: 28px;
  font-family: var(--ff-display, ui-serif, serif);
  letter-spacing: 0.01em;
}
.a11y-karaoke-text mark {
  background: var(--red, #d91e26); color: #fff;
  padding: 2px 6px; border-radius: 4px;
}

/* === Highlight currently-being-read element on the page === */
.a11y-read-cur {
  outline: 2px solid var(--red, #d91e26) !important;
  outline-offset: 2px;
  background: rgba(217, 30, 38, 0.08) !important;
  scroll-margin: 200px;
}

/* === Body when reading: leave space for karaoke === */
body.a11y-reading { padding-bottom: 140px; }

/* ==========================================================
   A11y Feature Modes (html.a11y-XXX)
   ========================================================== */
/* Yüksek kontrast modu — WCAG-uyumlu siyah/beyaz/sarı şeması.
   Tüm konteyner ve overlay'ler zorla siyah arka plana çekilir. */
html.a11y-contrast,
html.a11y-contrast body,
html.a11y-contrast header,
html.a11y-contrast footer,
html.a11y-contrast main,
html.a11y-contrast nav,
html.a11y-contrast section,
html.a11y-contrast article,
html.a11y-contrast aside,
html.a11y-contrast div,
html.a11y-contrast .topbar,
html.a11y-contrast .site-header,
html.a11y-contrast .site-footer,
html.a11y-contrast .nav-main,
html.a11y-contrast .mega,
html.a11y-contrast .footer-top,
html.a11y-contrast .footer-bottom,
html.a11y-contrast .section,
html.a11y-contrast .wrap,
html.a11y-contrast .h1-hero,
html.a11y-contrast .premium-cat-card,
html.a11y-contrast .gallery-item,
html.a11y-contrast .card,
html.a11y-contrast [class*="comp-"],
html.a11y-contrast [class*="premium-"] {
  background: #000 !important;
  background-color: #000 !important;
  background-image: none !important;
  color: #fff !important;
  border-color: #fff !important;
  box-shadow: none !important;
}

html.a11y-contrast h1,
html.a11y-contrast h2,
html.a11y-contrast h3,
html.a11y-contrast h4,
html.a11y-contrast h5,
html.a11y-contrast h6,
html.a11y-contrast p,
html.a11y-contrast span,
html.a11y-contrast li,
html.a11y-contrast strong,
html.a11y-contrast em,
html.a11y-contrast small {
  color: #fff !important;
  background: transparent !important;
}

html.a11y-contrast a,
html.a11y-contrast a * {
  color: #ffd700 !important;
  text-decoration: underline !important;
}

html.a11y-contrast a:focus,
html.a11y-contrast button:focus,
html.a11y-contrast input:focus,
html.a11y-contrast select:focus,
html.a11y-contrast textarea:focus {
  outline: 3px solid #ffd700 !important;
  outline-offset: 2px !important;
}

html.a11y-contrast button,
html.a11y-contrast .btn {
  background: #fff !important;
  color: #000 !important;
  border: 2px solid #fff !important;
}
html.a11y-contrast button:hover,
html.a11y-contrast .btn:hover {
  background: #ffd700 !important;
  color: #000 !important;
  border-color: #ffd700 !important;
}

html.a11y-contrast img,
html.a11y-contrast video,
html.a11y-contrast svg {
  filter: contrast(1.3) brightness(1.1);
  border: 1px solid #fff !important;
}

/* A11y widget'ın kendi panel'i okunabilir kalsın */
html.a11y-contrast .a11y-panel,
html.a11y-contrast .a11y-panel * {
  background: #000 !important;
  color: #fff !important;
  border-color: #fff !important;
}
html.a11y-contrast .a11y-tile.is-active {
  background: #ffd700 !important;
  color: #000 !important;
}

html.a11y-grayscale { filter: grayscale(1); }

html.a11y-bigtext { font-size: 120% !important; }
html.a11y-bigtext h1 { font-size: 200% !important; }
html.a11y-bigtext h2 { font-size: 175% !important; }
html.a11y-bigtext h3 { font-size: 150% !important; }
html.a11y-bigtext p, html.a11y-bigtext li, html.a11y-bigtext span { line-height: 1.7 !important; }

html.a11y-cleanfont,
html.a11y-cleanfont * {
  font-family: "Atkinson Hyperlegible","Verdana","Tahoma",Arial,sans-serif !important;
  letter-spacing: 0.02em !important;
}

html.a11y-links a {
  text-decoration: underline !important;
  color: #0c4ed1 !important;
  background: rgba(255,255,0,0.18) !important;
  padding: 0 2px;
}

html.a11y-cursor,
html.a11y-cursor * {
  cursor: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='40' height='40' viewBox='0 0 24 24' fill='%23000' stroke='%23fff' stroke-width='1.5'><path d='M3 2l7 18 2-8 8-2z'/></svg>") 4 2, auto !important;
}

@media (max-width: 600px) {
  .a11y-panel { right: 8px; bottom: 80px; width: calc(100vw - 16px); }
  .a11y-toggle { right: 12px; bottom: 12px; width: 50px; height: 50px; }
  .a11y-grid { grid-template-columns: 1fr 1fr; }
  .a11y-tile-reset, .a11y-tile-read { grid-column: auto; }
  .a11y-karaoke-text { font-size: 15px; }
}
