/* =============================================
   ATH-ECS — Accessibility Widget
   ============================================= */

/* ---- TOGGLE BUTTON ---- */
#a11y-btn {
  position: fixed;
  right: 24px;
  bottom: 24px;
  top: auto;
  transform: none;
  z-index: 9000;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: linear-gradient(135deg, #A06020, #CD7F32);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(205,127,50,.5);
  transition: transform .25s ease, box-shadow .25s ease;
  padding: 0;
  outline: none;
}
#a11y-btn:hover {
  transform: scale(1.08);
  box-shadow: 0 6px 28px rgba(205,127,50,.65);
}
#a11y-btn:focus-visible {
  outline: 2px solid #CD7F32;
  outline-offset: 3px;
}
#a11y-btn svg {
  width: 26px;
  height: 26px;
  fill: #fff;
  flex-shrink: 0;
}

/* ---- PANEL ---- */
#a11y-panel {
  position: fixed;
  right: -340px;
  top: 0;
  width: 320px;
  height: 100vh;
  background: #111009;
  border-left: 1px solid rgba(205,127,50,.25);
  z-index: 8999;
  overflow-y: auto;
  transition: right .35s cubic-bezier(.4,0,.2,1);
  box-shadow: -8px 0 40px rgba(0,0,0,.55);
  display: flex;
  flex-direction: column;
}
#a11y-panel.open {
  right: 0;
}

/* Scrollbar inside panel */
#a11y-panel::-webkit-scrollbar { width: 3px; }
#a11y-panel::-webkit-scrollbar-track { background: #111009; }
#a11y-panel::-webkit-scrollbar-thumb { background: #CD7F32; border-radius: 2px; }

.a11y-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 20px 16px;
  border-bottom: 1px solid rgba(205,127,50,.2);
  flex-shrink: 0;
}
.a11y-panel-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: 'Playfair Display', serif;
  font-size: 17px;
  color: #EDE8E0;
  font-weight: 700;
}
.a11y-panel-title svg {
  width: 20px;
  height: 20px;
  fill: #CD7F32;
}
.a11y-close {
  width: 30px;
  height: 30px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 50%;
  background: none;
  color: #7A706A;
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color .2s, color .2s;
  line-height: 1;
  padding: 0;
}
.a11y-close:hover { border-color: #CD7F32; color: #CD7F32; }

.a11y-panel-body {
  padding: 16px 16px 20px;
  flex: 1;
}

/* ---- SECTION ---- */
.a11y-section {
  margin-bottom: 20px;
}
.a11y-section-label {
  font-size: 9px;
  letter-spacing: .35em;
  text-transform: uppercase;
  color: #CD7F32;
  font-family: 'Inter', sans-serif;
  font-weight: 500;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.a11y-section-label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: rgba(205,127,50,.2);
}

/* ---- OPTION BUTTONS ---- */
.a11y-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.a11y-opt {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 14px 8px 12px;
  background: rgba(255,255,255,.025);
  border: 1px solid rgba(255,255,255,.07);
  border-radius: 4px;
  cursor: pointer;
  transition: background .2s, border-color .2s;
  color: #7A706A;
  font-size: 11px;
  font-family: 'Inter', sans-serif;
  text-align: center;
  line-height: 1.3;
  -webkit-user-select: none;
  user-select: none;
}
.a11y-opt:hover {
  background: rgba(205,127,50,.06);
  border-color: rgba(205,127,50,.3);
  color: #EDE8E0;
}
.a11y-opt.active {
  background: rgba(205,127,50,.14);
  border-color: #CD7F32;
  color: #CD7F32;
}
.a11y-opt svg {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.8;
}

/* ---- RESET ---- */
.a11y-reset {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 12px;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 4px;
  color: #7A706A;
  font-size: 11px;
  letter-spacing: .1em;
  text-transform: uppercase;
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  transition: border-color .2s, color .2s, background .2s;
  margin-top: 4px;
}
.a11y-reset:hover {
  border-color: rgba(205,127,50,.4);
  color: #EDE8E0;
  background: rgba(205,127,50,.06);
}

/* ---- ACCESSIBILITY STATES ---- */

/* Bigger text */
body.a11y-bigger-text {
  font-size: 18px !important;
}
body.a11y-bigger-text h1 { font-size: clamp(48px, 7vw, 96px) !important; }
body.a11y-bigger-text h2 { font-size: clamp(34px, 4.5vw, 54px) !important; }
body.a11y-bigger-text h3 { font-size: clamp(22px, 3vw, 30px) !important; }
body.a11y-bigger-text .nav-link,
body.a11y-bigger-text .btn,
body.a11y-bigger-text .footer-link { font-size: 14px !important; }

/* Line height */
body.a11y-line-height * {
  line-height: 2.2 !important;
}

/* Text align */
body.a11y-text-align p,
body.a11y-text-align li,
body.a11y-text-align .fleet-card-desc,
body.a11y-text-align .service-detail-desc,
body.a11y-text-align .testi-text,
body.a11y-text-align .about-text p {
  text-align: left !important;
}

/* Readable font */
body.a11y-readable-font,
body.a11y-readable-font * {
  font-family: Arial, Helvetica, sans-serif !important;
  letter-spacing: .02em !important;
}

/* High contrast */
body.a11y-contrast {
  filter: contrast(1.6) brightness(1.1);
}

/* Grayscale */
body.a11y-grayscale {
  filter: grayscale(1);
}

/* Combined filters */
body.a11y-contrast.a11y-grayscale {
  filter: contrast(1.6) brightness(1.1) grayscale(1);
}

/* Hide images */
body.a11y-hide-images img,
body.a11y-hide-images .hero-bg,
body.a11y-hide-images .cta-banner-bg,
body.a11y-hide-images .testi-bg,
body.a11y-hide-images .page-hero-bg,
body.a11y-hide-images .post-hero-img {
  visibility: hidden !important;
  opacity: 0 !important;
}

/* Pause animations */
body.a11y-pause-anim *,
body.a11y-pause-anim *::before,
body.a11y-pause-anim *::after {
  animation-play-state: paused !important;
  transition: none !important;
}

/* Highlight links */
body.a11y-highlight-links a:not(.a11y-opt):not(.a11y-close):not(.a11y-reset) {
  outline: 2px solid #CD7F32 !important;
  outline-offset: 2px !important;
  background: rgba(205,127,50,.08) !important;
  border-radius: 2px;
}
body.a11y-highlight-links a:not(.a11y-opt):not(.a11y-close):not(.a11y-reset):hover {
  background: rgba(205,127,50,.18) !important;
}

/* Outline focus */
body.a11y-outline-focus *:focus {
  outline: 3px solid #CD7F32 !important;
  outline-offset: 3px !important;
}
body.a11y-outline-focus a:focus,
body.a11y-outline-focus button:focus,
body.a11y-outline-focus input:focus,
body.a11y-outline-focus select:focus,
body.a11y-outline-focus textarea:focus {
  outline: 3px solid #CD7F32 !important;
  outline-offset: 3px !important;
}

/* Page structure labels */
.a11y-structure-label {
  display: none;
}
body.a11y-page-structure .a11y-structure-label {
  display: inline-block;
  background: #CD7F32;
  color: #fff;
  font-size: 10px !important;
  font-family: Arial, sans-serif !important;
  letter-spacing: .1em;
  text-transform: uppercase;
  padding: 1px 7px;
  border-radius: 2px;
  margin-right: 8px;
  vertical-align: middle;
  pointer-events: none;
}
body.a11y-page-structure h1,
body.a11y-page-structure h2,
body.a11y-page-structure h3 {
  outline: 1px dashed rgba(205,127,50,.45) !important;
  padding: 2px 4px !important;
}
body.a11y-page-structure section,
body.a11y-page-structure footer,
body.a11y-page-structure nav,
body.a11y-page-structure .page {
  outline: 1px dashed rgba(100,150,255,.25) !important;
}

/* ---- READING MASK ---- */
#a11y-mask {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 8990;
  pointer-events: none;
}
#a11y-mask.active { display: block; }
#a11y-mask-top,
#a11y-mask-bottom {
  position: absolute;
  left: 0; right: 0;
  background: rgba(13,11,9,.82);
  pointer-events: none;
  transition: top .05s, height .05s, bottom .05s;
}
#a11y-mask-window {
  position: absolute;
  left: 0; right: 0;
  height: 80px;
  border-top: 2px solid rgba(205,127,50,.5);
  border-bottom: 2px solid rgba(205,127,50,.5);
  pointer-events: none;
}

/* ---- MOBILE ---- */
@media (max-width: 768px) {
  #a11y-btn {
    right: 14px;
    bottom: 16px;
    width: 44px;
    height: 44px;
    box-shadow: 0 3px 14px rgba(205,127,50,.4);
  }
  #a11y-btn svg { width: 22px; height: 22px; }

  #a11y-panel {
    width: 100%;
    right: -100%;
    top: auto;
    bottom: 0;
    height: 85vh;
    border-left: none;
    border-top: 1px solid rgba(205,127,50,.25);
    border-radius: 16px 16px 0 0;
  }
  #a11y-panel.open {
    right: 0;
  }
}
