/* ===== SKIP LINK ===== */
.skip-link {
  position: absolute;
  top: -100px;
  right: 0;
  background: var(--gold);
  color: #fff;
  padding: 12px 24px;
  font-size: 15px;
  font-weight: 700;
  border-radius: 0 0 var(--radius) var(--radius);
  z-index: 99999;
  transition: top 0.2s;
  text-decoration: none;
}
.skip-link:focus {
  top: 0;
  outline: 3px solid #fff;
  outline-offset: 2px;
}

/* ===== FOCUS STYLES ===== */
*:focus-visible {
  outline: 3px solid var(--gold) !important;
  outline-offset: 3px !important;
  border-radius: 4px;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid var(--gold) !important;
  outline-offset: 3px !important;
}

/* ===== ACCESSIBILITY WIDGET BUTTON ===== */
.a11y-toggle {
  position: fixed;
  left: 20px;
  bottom: 100px;
  z-index: 9999;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold), var(--gold-light));
  color: #fff;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(201,168,76,0.5);
  transition: transform 0.2s, box-shadow 0.2s;
  font-size: 22px;
  line-height: 1;
}
.a11y-toggle:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 28px rgba(201,168,76,0.65);
}
.a11y-toggle:focus-visible {
  outline: 3px solid #fff !important;
  outline-offset: 3px !important;
}

/* ===== ACCESSIBILITY PANEL ===== */
.a11y-panel {
  position: fixed;
  left: 80px;
  bottom: 100px;
  z-index: 9998;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 20px 18px;
  width: 230px;
  box-shadow: 0 12px 48px rgba(0,0,0,0.18);
  display: none;
  flex-direction: column;
  gap: 6px;
  animation: a11ySlide 0.2s ease;
}
.a11y-panel.open {
  display: flex;
}
@keyframes a11ySlide {
  from { opacity: 0; transform: translateX(-12px); }
  to   { opacity: 1; transform: translateX(0); }
}

.a11y-panel-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-light);
  letter-spacing: 1.2px;
  text-transform: uppercase;
  margin-bottom: 8px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

.a11y-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--off-white);
  border: 1.5px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  cursor: pointer;
  transition: all 0.2s;
  text-align: right;
  width: 100%;
  font-family: var(--font);
}
.a11y-btn:hover {
  border-color: var(--gold);
  background: #fdf8ee;
  color: var(--gold-dark);
}
.a11y-btn.active {
  border-color: var(--gold);
  background: linear-gradient(135deg, #fdf8ee, #fef6e0);
  color: var(--gold-dark);
  font-weight: 700;
}
.a11y-btn .a11y-icon {
  font-size: 17px;
  width: 22px;
  text-align: center;
  flex-shrink: 0;
}

.a11y-font-row {
  display: flex;
  gap: 6px;
}
.a11y-font-row .a11y-btn {
  flex: 1;
  justify-content: center;
  padding: 10px 6px;
  font-weight: 700;
}

.a11y-reset {
  margin-top: 6px;
  background: #fff5f5;
  border-color: #ffd0d0;
  color: #c0392b;
  justify-content: center;
  font-size: 13px;
}
.a11y-reset:hover {
  background: #ffe5e5;
  border-color: #e74c3c;
  color: #c0392b;
}

/* ===== ACCESSIBILITY MODES ===== */

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

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

/* Underline links */
body.a11y-underline-links a {
  text-decoration: underline !important;
  text-underline-offset: 3px;
}

/* No animations */
body.a11y-no-animations *,
body.a11y-no-animations *::before,
body.a11y-no-animations *::after {
  animation-duration: 0.001ms !important;
  transition-duration: 0.001ms !important;
}

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

/* Font sizes */
body.a11y-font-lg { font-size: 18px !important; }
body.a11y-font-xl { font-size: 21px !important; }

body.a11y-font-lg p,
body.a11y-font-lg li,
body.a11y-font-lg span,
body.a11y-font-lg a,
body.a11y-font-lg label,
body.a11y-font-lg input,
body.a11y-font-lg select,
body.a11y-font-lg textarea {
  font-size: 1.15em !important;
}

body.a11y-font-xl p,
body.a11y-font-xl li,
body.a11y-font-xl span,
body.a11y-font-xl a,
body.a11y-font-xl label,
body.a11y-font-xl input,
body.a11y-font-xl select,
body.a11y-font-xl textarea {
  font-size: 1.3em !important;
}

/* Cursor */
body.a11y-big-cursor,
body.a11y-big-cursor * {
  cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 32 32'%3E%3Cpath d='M8 0 L8 28 L14 22 L18 32 L22 30 L18 20 L26 20 Z' fill='%23000' stroke='%23fff' stroke-width='1.5'/%3E%3C/svg%3E") 0 0, auto !important;
}

@media (max-width: 540px) {
  .a11y-panel {
    left: 10px;
    bottom: 160px;
    width: calc(100vw - 20px);
    max-width: 300px;
  }
  .a11y-toggle {
    left: 14px;
    bottom: 94px;
  }
}
