/* ==========================================================================
   ADIGÜZEL ERİŞİLEBİLİRLİK ASİSTANI (ACCESSIBILITY ASSISTANT) STYLES
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. KLAVYE "İÇERİĞE ATLA" BAĞLANTISI (SKIP TO CONTENT)
   -------------------------------------------------------------------------- */
.adg-a11y-skip-link {
  position: fixed;
  top: -100px;
  left: 20px;
  background: #00548f;
  color: #ffffff;
  padding: 12px 24px;
  font-size: 1rem;
  font-weight: 700;
  border-radius: 0 0 8px 8px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  z-index: 9999999;
  text-decoration: none;
  border: 3px solid #ff8f35;
  transition: top 0.2s ease-in-out;
}

.adg-a11y-skip-link:focus {
  top: 0;
  outline: 3px solid #ffffff;
  outline-offset: 2px;
}

/* --------------------------------------------------------------------------
   2. GENEL EKRAN OKUYUCU YARDIMCISI (SR-ONLY)
   -------------------------------------------------------------------------- */
.adg-a11y-sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

/* --------------------------------------------------------------------------
   3. YÜZEN ERİŞİLEBİLİRLİK BUTONU & WRAPPER
   -------------------------------------------------------------------------- */
.adg-a11y-wrapper {
  position: fixed;
  bottom: 24px;
  left: 24px;
  z-index: 999999;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.adg-a11y-trigger-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  background-color: #00548f;
  color: #ffffff;
  border: 2px solid #ffffff;
  padding: 12px 18px;
  border-radius: 50px;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(0, 84, 143, 0.4);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.adg-a11y-trigger-btn i {
  font-size: 1.35rem;
  color: #ff8f35;
  transition: transform 0.25s ease;
}

.adg-a11y-trigger-btn:hover {
  background-color: #003e6b;
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 84, 143, 0.5);
}

.adg-a11y-trigger-btn:hover i {
  transform: scale(1.1);
}

/* --------------------------------------------------------------------------
   4. ERİŞİLEBİLİRLİK PANELİ (MODAL)
   -------------------------------------------------------------------------- */
.adg-a11y-panel {
  position: fixed;
  bottom: 90px;
  left: 24px;
  width: 380px;
  max-width: calc(100vw - 32px);
  max-height: calc(100vh - 120px);
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.25);
  border: 1px solid #e2e8f0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px) scale(0.95);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 1000000;
}

.adg-a11y-panel.is-active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

/* Panel Header */
.adg-a11y-panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  background-color: #00548f;
  color: #ffffff;
  border-bottom: 2px solid #ff8f35;
}

.adg-a11y-panel-title {
  display: flex;
  align-items: center;
  gap: 10px;
}

.adg-a11y-panel-title i {
  font-size: 1.25rem;
  color: #ff8f35;
}

.adg-a11y-panel-title h3 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  color: #ffffff;
}

.adg-a11y-close-btn {
  background: rgba(255, 255, 255, 0.15);
  border: none;
  color: #ffffff;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1rem;
  transition: background 0.2s;
}

.adg-a11y-close-btn:hover {
  background: rgba(255, 255, 255, 0.3);
}

/* Panel Body */
.adg-a11y-panel-body {
  padding: 16px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.adg-a11y-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.adg-a11y-group-title {
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #475569;
  display: flex;
  align-items: center;
  gap: 6px;
}

.adg-a11y-group-title i {
  color: #00548f;
}

.adg-a11y-badge {
  margin-left: auto;
  background: #e2e8f0;
  color: #0f172a;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 700;
}

/* Buton Grupları ve Grid */
.adg-a11y-btn-row {
  display: grid;
  grid-template-columns: 1fr 1.2fr 1fr;
  gap: 8px;
}

.adg-a11y-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.adg-a11y-btn,
.adg-a11y-btn-toggle {
  background-color: #f8fafc;
  color: #1e293b;
  border: 1.5px solid #e2e8f0;
  border-radius: 10px;
  padding: 10px 8px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  text-align: center;
  transition: all 0.2s ease;
  min-height: 48px;
}

.adg-a11y-btn:hover,
.adg-a11y-btn-toggle:hover {
  background-color: #f1f5f9;
  border-color: #cbd5e1;
  color: #00548f;
}

.adg-a11y-btn-icon {
  font-size: 1.15rem;
  color: #00548f;
  transition: transform 0.2s;
}

.adg-a11y-btn-text {
  line-height: 1.2;
}

/* Aktif Buton Durumu */
.adg-a11y-btn-toggle.is-active {
  background-color: #00548f;
  color: #ffffff;
  border-color: #00548f;
  box-shadow: 0 4px 10px rgba(0, 84, 143, 0.25);
}

.adg-a11y-btn-toggle.is-active .adg-a11y-btn-icon {
  color: #ff8f35;
}

/* Panel Footer */
.adg-a11y-panel-footer {
  padding: 12px 16px;
  background-color: #f8fafc;
  border-top: 1px solid #e2e8f0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
}

.adg-a11y-reset-btn {
  width: 100%;
  background: #ef4444;
  color: #ffffff;
  border: none;
  padding: 9px 16px;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: background 0.2s;
}

.adg-a11y-reset-btn:hover {
  background: #dc2626;
}

.adg-a11y-powered {
  font-size: 0.72rem;
  color: #64748b;
  text-align: center;
}

/* --------------------------------------------------------------------------
   5. ERİŞİLEBİLİRLİK MODLARI (HTML / BODY SINIFLARI)
   -------------------------------------------------------------------------- */

/* Yüksek Kontrast Modu (Siyah / Sarı - WCAG AAA) */
html.adg-high-contrast {
  --primary-blue: #000000 !important;
  --bg-light: #000000 !important;
  --white: #000000 !important;
  --text-dark: #ffff00 !important;
  --text-muted: #ffff00 !important;
  --border-color: #ffff00 !important;
  background-color: #000000 !important;
}

html.adg-high-contrast body,
html.adg-high-contrast section,
html.adg-high-contrast header,
html.adg-high-contrast footer,
html.adg-high-contrast nav,
html.adg-high-contrast main,
html.adg-high-contrast div:not(.adg-a11y-wrapper, .adg-a11y-wrapper *),
html.adg-high-contrast article,
html.adg-high-contrast aside,
html.adg-high-contrast .card,
html.adg-high-contrast .blue-card,
html.adg-high-contrast .white-card,
html.adg-high-contrast .post-item,
html.adg-high-contrast .publication-card,
html.adg-high-contrast .partners-banner {
  background-color: #000000 !important;
  background: #000000 !important;
  color: #ffff00 !important;
  border-color: #ffff00 !important;
  box-shadow: none !important;
  text-shadow: none !important;
}

/* Yüksek Kontrastta Dalgaları Temizle / Düz Çizgiye Dönüştür */
html.adg-high-contrast .section-wave,
html.adg-high-contrast .section-wave-header {
  display: none !important;
}

html.adg-high-contrast .section-wave svg,
html.adg-high-contrast .section-wave-header svg {
  display: none !important;
}

html.adg-high-contrast h1,
html.adg-high-contrast h2,
html.adg-high-contrast h3,
html.adg-high-contrast h4,
html.adg-high-contrast h5,
html.adg-high-contrast h6,
html.adg-high-contrast p,
html.adg-high-contrast span:not(.adg-a11y-wrapper span, [class*="fa-"], [class*="fa"]),
html.adg-high-contrast li,
html.adg-high-contrast label,
html.adg-high-contrast strong {
  color: #ffff00 !important;
}

html.adg-high-contrast a:not(.adg-a11y-wrapper a, .adg-a11y-trigger-btn) {
  color: #00ffff !important;
  text-decoration: underline !important;
}

html.adg-high-contrast button:not(.adg-a11y-wrapper button, .adg-a11y-trigger-btn, .adg-a11y-close-btn) {
  background-color: #111111 !important;
  color: #ffff00 !important;
  border: 2px solid #ffff00 !important;
}

/* Koyu Mod (Dark Mode) */
html.adg-dark-mode {
  --primary-blue: #0b1523 !important;
  --bg-light: #0f172a !important;
  --white: #1e293b !important;
  --text-dark: #f8fafc !important;
  --text-muted: #94a3b8 !important;
  --border-color: #334155 !important;
  background-color: #0f172a !important;
}

html.adg-dark-mode body {
  background-color: #0f172a !important;
  color: #f1f5f9 !important;
}

html.adg-dark-mode header,
html.adg-dark-mode .top-bar,
html.adg-dark-mode .navbar,
html.adg-dark-mode footer,
html.adg-dark-mode main,
html.adg-dark-mode .site-main,
html.adg-dark-mode .gramotech-content,
html.adg-dark-mode .main-content,
html.adg-dark-mode .blog-details,
html.adg-dark-mode .card,
html.adg-dark-mode .quick-access-bar,
html.adg-dark-mode .blue-card,
html.adg-dark-mode .white-card,
html.adg-dark-mode .post-item,
html.adg-dark-mode .publication-card,
html.adg-dark-mode .partners-banner,
html.adg-dark-mode .news-events-section,
html.adg-dark-mode .announcements-section,
html.adg-dark-mode .programs-section,
html.adg-dark-mode .quadrant-card,
html.adg-dark-mode .split-vertical-card,
html.adg-dark-mode .mega-sub-menu {
  background-color: #1e293b !important;
  border-color: #334155 !important;
  color: #f8fafc !important;
}

/* Koyu Modda Dalga Renklerini Koyu Zemine Uyarla */
html.adg-dark-mode .section-wave,
html.adg-dark-mode .section-wave-header {
  background: transparent !important;
}

html.adg-dark-mode .wave-fill-white {
  fill: #0f172a !important;
}

html.adg-dark-mode .wave-fill-light {
  fill: #1e293b !important;
}

html.adg-dark-mode .wave-fill-blue {
  fill: #0b1523 !important;
}

html.adg-dark-mode h1,
html.adg-dark-mode h2,
html.adg-dark-mode h3,
html.adg-dark-mode h4,
html.adg-dark-mode h5,
html.adg-dark-mode h6,
html.adg-dark-mode strong {
  color: #ffffff !important;
}

html.adg-dark-mode p,
html.adg-dark-mode li,
html.adg-dark-mode span:not(.adg-a11y-wrapper span, [class*="fa-"], [class*="fa"]) {
  color: #e2e8f0 !important;
}

html.adg-dark-mode a:not(.adg-a11y-wrapper a, .adg-a11y-trigger-btn, .publication-card, .quick-access-item, .post-item) {
  color: #38bdf8 !important;
}

/* Monokrom (Gri Tonlama) */
html.adg-grayscale {
  filter: grayscale(100%) !important;
}

/* Negatif Kontrast (Invert Colors) */
html.adg-invert-colors {
  filter: invert(100%) hue-rotate(180deg) !important;
}

html.adg-invert-colors img,
html.adg-invert-colors video,
html.adg-invert-colors iframe,
html.adg-invert-colors .adg-a11y-wrapper {
  filter: invert(100%) hue-rotate(180deg) !important;
}

/* Disleksi Dostu Font */
@import url('https://fonts.googleapis.com/css2?family=Lexend:wght@400;500;600;700&display=swap');

html.adg-dyslexic-font *:not(i, [class*="fa-"], [class*="fa"], .fa, .fas, .far, .fab, .fa-solid, .fa-regular, .fa-brands, svg, path) {
  font-family: 'Lexend', 'Comic Sans MS', -apple-system, BlinkMacSystemFont, sans-serif !important;
  letter-spacing: 0.05em !important;
}

/* Font Awesome ve İkon Fontlarını Kesin Olarak Koru */
html.adg-dyslexic-font i,
html.adg-dyslexic-font [class*="fa-"],
html.adg-dyslexic-font [class*="fa"],
html.adg-dyslexic-font .fa,
html.adg-dyslexic-font .fas,
html.adg-dyslexic-font .far,
html.adg-dyslexic-font .fab,
html.adg-dyslexic-font .fa-solid,
html.adg-dyslexic-font .fa-regular,
html.adg-dyslexic-font .fa-brands {
  font-family: "Font Awesome 6 Free", "Font Awesome 6 Brands", "FontAwesome", "Font Awesome 5 Free", "Font Awesome 5 Brands" !important;
  letter-spacing: normal !important;
}

/* Bağlantıları Vurgula */
html.adg-highlight-links a:not(.adg-a11y-panel a, .adg-a11y-trigger-btn) {
  background-color: #fef08a !important;
  color: #854d0e !important;
  text-decoration: underline !important;
  font-weight: 700 !important;
  padding: 0 4px !important;
  border-radius: 2px !important;
  outline: 1px solid #ca8a04 !important;
}

/* Başlıkları Vurgula */
html.adg-highlight-headings h1,
html.adg-highlight-headings h2,
html.adg-highlight-headings h3,
html.adg-highlight-headings h4,
html.adg-highlight-headings h5,
html.adg-highlight-headings h6 {
  background-color: #dbeafe !important;
  color: #1e3a8a !important;
  border-left: 6px solid #1d4ed8 !important;
  padding-left: 10px !important;
  border-radius: 4px !important;
}

/* Metin ve Satır Boşlukları */
html.adg-text-spacing body,
html.adg-text-spacing p,
html.adg-text-spacing a,
html.adg-text-spacing li,
html.adg-text-spacing span {
  line-height: 2 !important;
  letter-spacing: 0.12em !important;
  word-spacing: 0.16em !important;
}

/* Animasyonları Durdur */
html.adg-stop-animations *,
html.adg-stop-animations *::before,
html.adg-stop-animations *::after {
  animation-play-state: paused !important;
  animation-duration: 0.001s !important;
  transition-duration: 0.001s !important;
  scroll-behavior: auto !important;
}

/* Büyük Fare İmleci */
html.adg-large-cursor,
html.adg-large-cursor * {
  cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='36' height='36' viewBox='0 0 24 24' fill='%2300548f' stroke='%23ffffff' stroke-width='2'%3E%3Cpath d='M3 3l7 18 3-7 7-3L3 3z'/%3E%3C/svg%3E"), auto !important;
}

/* Okuma Kılavuzu (Yatay Çizgi) */
.adg-a11y-reading-guide-line {
  position: fixed;
  left: 0;
  width: 100vw;
  height: 4px;
  background-color: #ff8f35;
  box-shadow: 0 0 12px rgba(255, 143, 53, 0.9), 0 0 0 10000px rgba(0, 0, 0, 0.25);
  pointer-events: none;
  z-index: 999998;
  display: none;
}

html.adg-reading-guide-active .adg-a11y-reading-guide-line {
  display: block;
}

/* Okuma Maskesi (Focus Mask) */
html.adg-screen-mask-active .adg-a11y-reading-guide-line {
  display: block;
  height: 45px;
  background-color: transparent;
  border-top: 3px solid #ff8f35;
  border-bottom: 3px solid #ff8f35;
  box-shadow: 0 -10000px 0 10000px rgba(0, 0, 0, 0.65), 0 10000px 0 10000px rgba(0, 0, 0, 0.65);
}

/* --------------------------------------------------------------------------
   6. EVRENSEL KLAVYE ODAK ÇERÇEVESİ (FOCUS-VISIBLE)
   -------------------------------------------------------------------------- */
:focus-visible {
  outline: 3px solid #ff8f35 !important;
  outline-offset: 3px !important;
  box-shadow: 0 0 0 4px rgba(0, 84, 143, 0.4) !important;
}

/* --------------------------------------------------------------------------
   7. MOBİL UYUMLULUK
   -------------------------------------------------------------------------- */
@media (max-width: 768px) {
  .adg-a11y-wrapper {
    bottom: 16px;
    left: 16px;
  }

  .adg-a11y-trigger-btn {
    padding: 10px 14px;
    font-size: 0.85rem;
  }

  .adg-a11y-trigger-label {
    display: none;
  }

  .adg-a11y-panel {
    bottom: 75px;
    left: 16px;
    width: calc(100vw - 32px);
  }
}
