/*
Theme Name: Universidad Internacional
Theme URI: https://uni.datoestrategico.com
Author: Universidad Internacional
Author URI: https://uni.datoestrategico.com
Description: Tema institucional minimalista para Universidad Internacional. Branded con Pantone Red 032 (#EF3340) y tipografia Times New Roman segun manual de identidad oficial.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.9
Requires PHP: 8.0
License: GPL v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: uninter
*/

/* =========================================================
   1. RESET & BASE
   ========================================================= */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    font-family: 'Times New Roman', Times, serif;
    font-size: 17px;
    line-height: 1.65;
    color: #1a1a1a;
    background: #ffffff;
    -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: #EF3340; text-decoration: none; transition: color .2s ease; }
a:hover { color: #b8252f; }
h1, h2, h3, h4, h5, h6 {
    font-family: 'Times New Roman', Times, serif;
    font-weight: 700;
    line-height: 1.2;
    margin: 0 0 .6em;
    color: #1a1a1a;
}
h1 { font-size: clamp(2rem, 5vw, 3.4rem); }
h2 { font-size: clamp(1.6rem, 3.6vw, 2.4rem); }
h3 { font-size: 1.4rem; }
h4 { font-size: 1.2rem; }
p { margin: 0 0 1em; }
ul, ol { padding-left: 1.4em; }
:root {
    --uni-red: #EF3340;
    --uni-red-dark: #b8252f;
    --uni-black: #1a1a1a;
    --uni-grey: #666;
    --uni-light: #f7f5f4;
    --uni-border: #e5e0dc;
}

/* =========================================================
   2. LAYOUT WRAPPERS
   ========================================================= */
.container { max-width: 1180px; margin: 0 auto; padding: 0 24px; }
.section { padding: 80px 0; }
.section--alt { background: var(--uni-light); }
.section--dark { background: var(--uni-black); color: #fff; }
.section--dark h1, .section--dark h2, .section--dark h3 { color: #fff; }
.section-title { text-align: center; margin-bottom: 48px; }
.section-title h2 { margin: 0 0 12px; }
.section-title p { color: var(--uni-grey); font-style: italic; max-width: 640px; margin: 0 auto; }

/* =========================================================
   3. HEADER & NAVIGATION
   ========================================================= */
.site-header {
    background: #fff;
    border-bottom: 3px solid var(--uni-red);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 8px rgba(0,0,0,.04);
}
.site-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 0;
    gap: 24px;
}
.site-brand { display: flex; align-items: center; gap: 14px; text-decoration: none; }
.site-brand__shield { width: 52px; height: auto; flex-shrink: 0; }
.site-brand__text {
    font-family: 'Times New Roman', Times, serif;
    font-weight: 700;
    font-size: 1.25rem;
    line-height: 1.05;
    color: var(--uni-red);
    letter-spacing: .2px;
}
.site-brand__text span { display: block; }

.main-nav { display: flex; align-items: center; gap: 4px; }
.main-nav ul {
    display: flex;
    gap: 2px;
    list-style: none;
    padding: 0;
    margin: 0;
}
.main-nav li { position: relative; }
.main-nav a {
    display: block;
    padding: 10px 14px;
    color: var(--uni-black);
    font-size: .95rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .5px;
    border-radius: 2px;
}
.main-nav a:hover,
.main-nav .current-menu-item > a {
    color: var(--uni-red);
}
.btn-cta {
    background: var(--uni-red);
    color: #fff !important;
    padding: 10px 22px !important;
    border-radius: 2px;
    transition: background .2s ease;
}
.btn-cta:hover { background: var(--uni-red-dark); }

.menu-toggle {
    display: none;
    background: none;
    border: 0;
    font-size: 1.6rem;
    color: var(--uni-red);
    cursor: pointer;
}

/* =========================================================
   4. HERO
   ========================================================= */
.hero {
    background:
        linear-gradient(135deg, rgba(239,51,64,.72), rgba(120,20,28,.88)),
        url('assets/img/hero-bg.jpg') center/cover no-repeat;
    background-blend-mode: multiply, normal;
    color: #fff;
    padding: 140px 0 120px;
    text-align: center;
    position: relative;
}
.hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,0) 60%, rgba(0,0,0,.25));
    pointer-events: none;
}
.hero > .container { position: relative; z-index: 1; }
.hero h1 {
    text-shadow: 0 2px 12px rgba(0,0,0,.3);
}
.hero p {
    text-shadow: 0 1px 6px rgba(0,0,0,.35);
}
.hero h1 { color: #fff; max-width: 900px; margin: 0 auto 18px; }
.hero p {
    font-size: 1.15rem;
    max-width: 720px;
    margin: 0 auto 32px;
    opacity: .95;
    font-style: italic;
}
.hero-cta {
    display: inline-flex;
    gap: 14px;
    flex-wrap: wrap;
    justify-content: center;
}
.btn {
    display: inline-block;
    padding: 14px 32px;
    font-family: 'Times New Roman', Times, serif;
    font-size: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    border: 2px solid #fff;
    color: #fff;
    background: transparent;
    transition: all .25s ease;
    cursor: pointer;
    border-radius: 2px;
}
.btn:hover { background: #fff; color: var(--uni-red); }
.btn--solid {
    background: #fff;
    color: var(--uni-red);
}
.btn--solid:hover { background: var(--uni-black); color: #fff; border-color: var(--uni-black); }
.btn--red {
    background: var(--uni-red);
    border-color: var(--uni-red);
    color: #fff;
}
.btn--red:hover { background: var(--uni-red-dark); border-color: var(--uni-red-dark); color: #fff; }

/* =========================================================
   5. CARDS & GRIDS
   ========================================================= */
.grid { display: grid; gap: 28px; }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid--4 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }

.card {
    background: #fff;
    border: 1px solid var(--uni-border);
    border-top: 4px solid var(--uni-red);
    padding: 32px 28px;
    transition: transform .25s ease, box-shadow .25s ease;
}
.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0,0,0,.08);
}
.card h3 { color: var(--uni-red); margin-top: 0; }
.card .card__icon {
    font-size: 2.2rem;
    color: var(--uni-red);
    margin-bottom: 12px;
}

/* =========================================================
   6. CONTENT (PAGES & POSTS)
   ========================================================= */
.page-content,
.entry-content {
    max-width: 800px;
    margin: 0 auto;
}
.page-content h2,
.entry-content h2 {
    border-bottom: 2px solid var(--uni-red);
    padding-bottom: 8px;
    margin-top: 1.4em;
}
.page-header {
    background: var(--uni-black);
    color: #fff;
    padding: 70px 0 50px;
    text-align: center;
    border-bottom: 4px solid var(--uni-red);
}
.page-header h1 { color: #fff; margin: 0; }
.page-header__breadcrumb {
    color: rgba(255,255,255,.7);
    font-style: italic;
    margin-top: 8px;
    font-size: .95rem;
}

/* Posts */
.post-card {
    background: #fff;
    border: 1px solid var(--uni-border);
    overflow: hidden;
    transition: transform .25s ease;
}
.post-card:hover { transform: translateY(-3px); }
.post-card__thumb {
    aspect-ratio: 16/9;
    background: var(--uni-light) center/cover;
    border-bottom: 3px solid var(--uni-red);
}
.post-card__body { padding: 22px 24px; }
.post-card__meta { color: var(--uni-grey); font-size: .85rem; font-style: italic; margin-bottom: 8px; }
.post-card__title { margin: 0 0 8px; font-size: 1.2rem; }
.post-card__title a { color: var(--uni-black); }
.post-card__title a:hover { color: var(--uni-red); }

/* =========================================================
   7. FOOTER
   ========================================================= */
.site-footer {
    background: var(--uni-black);
    color: #cfcfcf;
    padding: 60px 0 24px;
}
.site-footer h4 {
    color: #fff;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin: 0 0 16px;
    border-bottom: 2px solid var(--uni-red);
    padding-bottom: 8px;
    display: inline-block;
}
.site-footer a { color: #cfcfcf; }
.site-footer a:hover { color: var(--uni-red); }
.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    gap: 36px;
    margin-bottom: 32px;
}
.footer-grid ul { list-style: none; padding: 0; margin: 0; }
.footer-grid ul li { margin-bottom: 6px; font-size: .92rem; }
.site-footer__bottom {
    border-top: 1px solid #333;
    padding-top: 18px;
    text-align: center;
    font-size: .85rem;
    color: #888;
    font-style: italic;
}
.site-footer__brand {
    display: flex;
    gap: 14px;
    align-items: center;
    margin-bottom: 12px;
}
.site-footer__brand-text {
    color: #fff;
    font-weight: 700;
    font-size: 1.1rem;
    line-height: 1.05;
}
.site-footer__brand-text span { display: block; }

/* Contact list with inline icons */
.footer-contact { list-style: none; padding: 0; margin: 0; }
.footer-contact li { display: flex; align-items: flex-start; gap: 8px; margin-bottom: 8px; font-size: .92rem; }
.footer-contact__icon { color: var(--uni-red); font-size: 1rem; line-height: 1.4; flex-shrink: 0; }

/* Social icons row */
.footer-social {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 26px 0 22px;
    border-top: 1px solid #333;
    flex-wrap: wrap;
}
.footer-social__label {
    color: #fff;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-size: .85rem;
}
.footer-social__icons { display: flex; gap: 10px; }
.footer-social__icon {
    display: flex; align-items: center; justify-content: center;
    width: 40px; height: 40px;
    background: transparent;
    color: #cfcfcf;
    border: 2px solid #333;
    border-radius: 50%;
    transition: all .25s ease;
}
.footer-social__icon:hover {
    color: #fff;
    transform: translateY(-2px);
}
.footer-social__icon--facebook:hover  { background: #1877F2; border-color: #1877F2; }
.footer-social__icon--instagram:hover { background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%); border-color: transparent; }
.footer-social__icon--youtube:hover   { background: #FF0000; border-color: #FF0000; }

@media (max-width: 540px) {
    .footer-social { flex-direction: column; gap: 12px; }
}

/* =========================================================
   8. CONTACT FORM (vanilla)
   ========================================================= */
.contact-form { max-width: 640px; margin: 0 auto; }
.contact-form .row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px; }
.contact-form label { display: block; font-weight: 700; margin-bottom: 6px; font-size: .9rem; }
.contact-form input,
.contact-form textarea,
.contact-form select {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--uni-border);
    background: #fff;
    font-family: 'Times New Roman', Times, serif;
    font-size: 1rem;
    border-radius: 2px;
    transition: border-color .2s ease;
}
.contact-form input:focus,
.contact-form textarea:focus,
.contact-form select:focus {
    border-color: var(--uni-red);
    outline: none;
}
.contact-form textarea { min-height: 140px; resize: vertical; }
.contact-form .field { margin-bottom: 16px; }
.alert { padding: 14px 18px; border-radius: 2px; margin-bottom: 18px; font-weight: 700; }
.alert--success { background: #e8f5e9; color: #1b5e20; border-left: 4px solid #1b5e20; }
.alert--error { background: #ffebee; color: #b71c1c; border-left: 4px solid #b71c1c; }

/* =========================================================
   9. RESPONSIVE
   ========================================================= */
@media (max-width: 900px) {
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .menu-toggle { display: block; }
    .main-nav { display: none; position: absolute; top: 100%; left: 0; right: 0; background: #fff; border-bottom: 3px solid var(--uni-red); flex-direction: column; padding: 18px 24px; box-shadow: 0 6px 18px rgba(0,0,0,.08); }
    .main-nav.is-open { display: flex; }
    .main-nav ul { flex-direction: column; width: 100%; gap: 0; }
    .main-nav a { padding: 12px 8px; border-bottom: 1px solid var(--uni-border); }
    .btn-cta { margin-top: 8px; text-align: center; }
    .contact-form .row { grid-template-columns: 1fr; }
}
@media (max-width: 540px) {
    .footer-grid { grid-template-columns: 1fr; }
    .section { padding: 60px 0; }
    .hero { padding: 80px 0 70px; }
    .site-brand__text { font-size: 1.05rem; }
    .site-brand__shield { width: 42px; }
}

/* =========================================================
   10. UTILITIES
   ========================================================= */
.text-center { text-align: center; }
.mb-0 { margin-bottom: 0 !important; }
.mb-2 { margin-bottom: 16px; }
.mt-3 { margin-top: 24px; }
.italic { font-style: italic; }
.lead { font-size: 1.15rem; color: var(--uni-grey); }

/* WP core alignment & screen-reader */
.alignleft { float: left; margin: 0 24px 16px 0; }
.alignright { float: right; margin: 0 0 16px 24px; }
.aligncenter { display: block; margin: 16px auto; }
.screen-reader-text { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.skip-link { position: absolute; top: -100px; left: 0; background: var(--uni-red); color: #fff; padding: 8px 16px; z-index: 9999; }
.skip-link:focus { top: 0; }

/* Universal focus visible */
:focus-visible {
    outline: 3px solid var(--uni-red);
    outline-offset: 2px;
    border-radius: 2px;
}

/* =========================================================
   10a. INSCRIPTION MODAL
   ========================================================= */
.modal {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.modal.is-open { display: flex; animation: modal-fade .2s ease; }
.modal__overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,.6);
    backdrop-filter: blur(3px);
}
.modal__dialog {
    position: relative;
    width: 100%;
    max-width: 540px;
    max-height: calc(100vh - 40px);
    background: #fff;
    border-radius: 4px;
    box-shadow: 0 20px 60px rgba(0,0,0,.4);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: modal-slide .25s cubic-bezier(.16,1,.3,1);
}
.modal__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--uni-red);
    color: #fff;
    padding: 16px 22px;
}
.modal__title {
    font-family: 'Times New Roman', Times, serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: #fff;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: .5px;
}
.modal__close {
    background: transparent;
    border: 0;
    color: #fff;
    font-size: 1.8rem;
    line-height: 1;
    cursor: pointer;
    padding: 4px 10px;
    border-radius: 2px;
    transition: background .15s ease;
}
.modal__close:hover { background: rgba(255,255,255,.15); }
.modal__body {
    padding: 22px 26px 26px;
    overflow-y: auto;
}
.modal__lead {
    color: var(--uni-grey);
    font-style: italic;
    margin: 0 0 18px;
    text-align: center;
    font-size: .95rem;
}
.modal-form .field { margin-bottom: 14px; }
.modal-form .row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 0; }
.modal-form label {
    display: block;
    font-weight: 700;
    margin-bottom: 5px;
    font-size: .85rem;
    color: var(--uni-black);
}
.modal-form input,
.modal-form textarea,
.modal-form select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--uni-border);
    background: #fff;
    font-family: 'Times New Roman', Times, serif;
    font-size: 1rem;
    border-radius: 2px;
    transition: border-color .2s ease, box-shadow .2s ease;
}
.modal-form input:focus,
.modal-form textarea:focus,
.modal-form select:focus {
    border-color: var(--uni-red);
    outline: none;
    box-shadow: 0 0 0 3px rgba(239,51,64,.15);
}
.modal-form textarea { resize: vertical; min-height: 80px; }
.modal-form__note {
    font-size: .78rem;
    color: var(--uni-grey);
    font-style: italic;
    margin: 8px 0 14px;
    text-align: center;
}
.modal-form__submit {
    width: 100%;
    padding: 14px;
    font-size: 1rem;
}
@keyframes modal-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes modal-slide { from { opacity: 0; transform: translateY(20px) scale(.97); } to { opacity: 1; transform: none; } }
body.modal-open { overflow: hidden; }

@media (max-width: 540px) {
    .modal-form .row { grid-template-columns: 1fr; gap: 0; }
    .modal__title { font-size: 1.25rem; }
    .modal__body { padding: 18px 20px 22px; }
}

/* If user paused animations, drop modal animations */
body.a11y-pause-anim .modal,
body.a11y-pause-anim .modal__dialog { animation: none !important; }

/* =========================================================
   10b. WHATSAPP FLOATING BUTTON
   ========================================================= */
.wa-btn {
    position: fixed;
    bottom: 22px;
    right: 22px;
    z-index: 9998;
    display: flex; align-items: center; justify-content: center;
    width: 60px; height: 60px;
    background: #25D366;
    color: #fff !important;
    border-radius: 50%;
    box-shadow: 0 4px 14px rgba(0,0,0,.25), 0 0 0 0 rgba(37,211,102,.6);
    text-decoration: none;
    transition: transform .2s ease, background .2s ease, box-shadow .25s ease;
    animation: wa-pulse 2.5s infinite;
}
.wa-btn:hover {
    transform: scale(1.08);
    background: #1ebd5a;
    color: #fff !important;
}
.wa-btn:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }
.wa-btn svg { width: 34px; height: 34px; position: relative; z-index: 1; }
.wa-btn__pulse {
    position: absolute; inset: 0;
    border-radius: 50%;
    background: #25D366;
    z-index: 0;
    opacity: .6;
    animation: wa-ring 2.5s infinite;
}
@keyframes wa-pulse {
    0%   { box-shadow: 0 4px 14px rgba(0,0,0,.25), 0 0 0 0 rgba(37,211,102,.6); }
    70%  { box-shadow: 0 4px 14px rgba(0,0,0,.25), 0 0 0 16px rgba(37,211,102,0); }
    100% { box-shadow: 0 4px 14px rgba(0,0,0,.25), 0 0 0 0 rgba(37,211,102,0); }
}
@keyframes wa-ring {
    0%   { transform: scale(1); opacity: .6; }
    70%  { transform: scale(1.5); opacity: 0; }
    100% { transform: scale(1.5); opacity: 0; }
}

/* Tooltip */
.wa-btn::before {
    content: attr(data-tooltip);
    position: absolute;
    right: calc(100% + 12px);
    top: 50%;
    transform: translateY(-50%);
    background: #1a1a1a;
    color: #fff;
    padding: 8px 14px;
    border-radius: 4px;
    font-family: 'Times New Roman', Times, serif;
    font-size: .9rem;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s ease, transform .2s ease;
}
.wa-btn::after {
    content: "";
    position: absolute;
    right: calc(100% + 6px);
    top: 50%;
    transform: translateY(-50%);
    border: 6px solid transparent;
    border-left-color: #1a1a1a;
    opacity: 0;
    transition: opacity .2s ease;
}
.wa-btn:hover::before,
.wa-btn:focus-visible::before,
.wa-btn:hover::after,
.wa-btn:focus-visible::after { opacity: 1; }

@media (max-width: 540px) {
    .wa-btn { bottom: 14px; right: 14px; width: 52px; height: 52px; }
    .wa-btn svg { width: 28px; height: 28px; }
    .wa-btn::before, .wa-btn::after { display: none; }
}

/* Pause WhatsApp button animation if user activated "pause animations" */
body.a11y-pause-anim .wa-btn,
body.a11y-pause-anim .wa-btn__pulse { animation: none !important; }

/* =========================================================
   11. ACCESSIBILITY WIDGET
   ========================================================= */
.a11y-widget {
    position: fixed;
    bottom: 22px;
    left: 22px;
    z-index: 9998;
    font-family: 'Times New Roman', Times, serif;
}
.a11y-widget__toggle {
    display: flex; align-items: center; justify-content: center;
    width: 56px; height: 56px;
    background: var(--uni-red);
    color: #fff;
    border: 0;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(0,0,0,.25);
    transition: transform .2s ease, background .2s ease;
}
.a11y-widget__toggle:hover { transform: scale(1.06); background: var(--uni-red-dark); }
.a11y-widget__toggle svg { width: 32px; height: 32px; }
.a11y-widget__panel {
    display: none;
    position: absolute;
    bottom: 70px; left: 0;
    width: 320px; max-width: calc(100vw - 44px);
    background: #fff;
    border: 2px solid var(--uni-red);
    border-radius: 4px;
    box-shadow: 0 8px 32px rgba(0,0,0,.18);
    padding: 0;
}
.a11y-widget__panel.is-open { display: block; }
.a11y-widget__header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 12px 16px;
    background: var(--uni-red);
    color: #fff;
    border-radius: 2px 2px 0 0;
}
.a11y-widget__title { font-size: 1rem; font-weight: 700; margin: 0; text-transform: uppercase; letter-spacing: .5px; }
.a11y-widget__close {
    background: transparent; border: 0; color: #fff;
    font-size: 1.4rem; line-height: 1; cursor: pointer; padding: 4px 8px;
}
.a11y-widget__body { padding: 14px 16px 18px; max-height: 70vh; overflow-y: auto; }
.a11y-widget__group { margin-bottom: 14px; }
.a11y-widget__group:last-child { margin-bottom: 0; }
.a11y-widget__label {
    display: block;
    font-size: .8rem; font-weight: 700; text-transform: uppercase;
    letter-spacing: .5px; color: var(--uni-grey); margin-bottom: 8px;
}
.a11y-widget__textsize { display: flex; gap: 6px; }
.a11y-widget__textsize button {
    flex: 1;
    background: #fff;
    border: 2px solid var(--uni-border);
    color: var(--uni-black);
    cursor: pointer;
    padding: 10px 0;
    font-family: inherit;
    font-weight: 700;
    border-radius: 2px;
    transition: all .15s ease;
}
.a11y-widget__textsize button[aria-pressed="true"] {
    background: var(--uni-red);
    color: #fff;
    border-color: var(--uni-red);
}
.a11y-widget__toggle-btn {
    display: flex; align-items: center; justify-content: space-between;
    width: 100%;
    background: #fff;
    border: 1px solid var(--uni-border);
    padding: 10px 14px;
    font-family: inherit;
    font-size: .95rem;
    color: var(--uni-black);
    cursor: pointer;
    margin-bottom: 6px;
    border-radius: 2px;
    text-align: left;
    transition: all .15s ease;
}
.a11y-widget__toggle-btn:hover { border-color: var(--uni-red); }
.a11y-widget__toggle-btn::after {
    content: "";
    width: 32px; height: 18px;
    background: #ddd;
    border-radius: 18px;
    position: relative;
    flex-shrink: 0;
    transition: background .2s ease;
}
.a11y-widget__toggle-btn::before {
    content: "";
    width: 14px; height: 14px;
    background: #fff;
    border-radius: 50%;
    position: absolute;
    right: 30px;
    transition: right .2s ease;
    box-shadow: 0 1px 3px rgba(0,0,0,.2);
    z-index: 1;
}
.a11y-widget__toggle-btn { position: relative; }
.a11y-widget__toggle-btn[aria-pressed="true"]::after { background: var(--uni-red); }
.a11y-widget__toggle-btn[aria-pressed="true"]::before { right: 16px; }
.a11y-widget__reset {
    width: 100%;
    background: var(--uni-black);
    color: #fff;
    border: 0;
    padding: 10px 14px;
    font-family: inherit;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .5px;
    cursor: pointer;
    border-radius: 2px;
    margin-top: 6px;
}
.a11y-widget__reset:hover { background: var(--uni-red); }

/* =========================================================
   12. ACCESSIBILITY BODY MODIFIERS
   ========================================================= */
body.a11y-text-lg { font-size: 19.5px; }
body.a11y-text-lg h1 { font-size: clamp(2.2rem, 5.5vw, 3.8rem); }
body.a11y-text-lg h2 { font-size: clamp(1.8rem, 4vw, 2.7rem); }
body.a11y-text-xl { font-size: 22px; }
body.a11y-text-xl h1 { font-size: clamp(2.5rem, 6vw, 4.2rem); }
body.a11y-text-xl h2 { font-size: clamp(2rem, 4.4vw, 3rem); }

body.a11y-high-contrast {
    background: #000 !important;
    color: #ffff00 !important;
}
body.a11y-high-contrast .site-header,
body.a11y-high-contrast .site-footer,
body.a11y-high-contrast .section,
body.a11y-high-contrast .section--alt,
body.a11y-high-contrast .section--dark,
body.a11y-high-contrast .card,
body.a11y-high-contrast .post-card,
body.a11y-high-contrast .page-header,
body.a11y-high-contrast .hero {
    background: #000 !important;
    color: #ffff00 !important;
}
body.a11y-high-contrast .hero { background-image: none !important; }
body.a11y-high-contrast h1,
body.a11y-high-contrast h2,
body.a11y-high-contrast h3,
body.a11y-high-contrast h4 { color: #ffff00 !important; }
body.a11y-high-contrast a,
body.a11y-high-contrast .site-brand__text,
body.a11y-high-contrast .main-nav a,
body.a11y-high-contrast .card h3,
body.a11y-high-contrast .post-card__title a {
    color: #00ffff !important;
    text-decoration: underline !important;
}
body.a11y-high-contrast .btn,
body.a11y-high-contrast .btn-cta,
body.a11y-high-contrast .btn--red,
body.a11y-high-contrast .btn--solid {
    background: #ffff00 !important;
    color: #000 !important;
    border: 2px solid #ffff00 !important;
}
body.a11y-high-contrast .card,
body.a11y-high-contrast .post-card,
body.a11y-high-contrast .site-header { border-color: #ffff00 !important; }

/* Apply grayscale to page chrome, NOT to body — applying filter to body
   breaks position:fixed (creates new containing block for descendants). */
body.a11y-grayscale .site-header,
body.a11y-grayscale .site-main,
body.a11y-grayscale .site-footer {
    filter: grayscale(1);
}

body.a11y-underline-links a:not(.btn):not(.btn-cta):not(.site-brand) {
    text-decoration: underline !important;
}

body.a11y-large-cursor,
body.a11y-large-cursor * {
    cursor: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='40' height='40' viewBox='0 0 40 40'><path d='M5 3 L5 32 L13 24 L18 35 L22 33 L17 22 L28 22 Z' fill='%23000' stroke='%23fff' stroke-width='2'/></svg>") 4 4, auto !important;
}

body.a11y-pause-anim *,
body.a11y-pause-anim *::before,
body.a11y-pause-anim *::after {
    animation-duration: 0s !important;
    animation-delay: 0s !important;
    transition-duration: 0s !important;
    transition-delay: 0s !important;
    scroll-behavior: auto !important;
}

body.a11y-readable-font,
body.a11y-readable-font * {
    font-family: 'Verdana', 'Arial', sans-serif !important;
}
body.a11y-readable-font h1,
body.a11y-readable-font h2,
body.a11y-readable-font h3,
body.a11y-readable-font h4 { font-family: 'Verdana', 'Arial', sans-serif !important; }

@media (max-width: 540px) {
    .a11y-widget { bottom: 14px; left: 14px; }
    .a11y-widget__toggle { width: 48px; height: 48px; }
    .a11y-widget__toggle svg { width: 26px; height: 26px; }
    .a11y-widget__panel { width: calc(100vw - 28px); }
}

/* Respect reduced-motion preference globally */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}
