/* =========================================================
   ANPEMUFA — Sitio público
   Los colores y tipografías vienen de variables CSS generadas
   desde el panel (Apariencia y configuración).
   Mobile-first: iPhone, Android, tablet y escritorio.
   ========================================================= */

:root {
    --c-primary: #E8590C; --c-primary-rgb: 232, 89, 12; --c-primary-dark: #be490a;
    --c-secondary: #1B3A5C; --c-secondary-rgb: 27, 58, 92;
    --c-accent: #F4B400; --c-text: #1F2933; --c-bg: #fff; --c-soft: #FFF6F0;
    --c-header-bg: #fff; --c-header-text: #1B3A5C; --c-footer-bg: #12263F; --c-footer-text: #E6ECF2;
    --c-on-primary: #fff; --c-on-secondary: #fff;
    --f-heading: 'Poppins', system-ui, sans-serif; --f-body: 'Open Sans', system-ui, sans-serif;
    --radius: 12px;
    --shadow: 0 10px 30px -12px rgba(18, 38, 63, .18);
    --shadow-sm: 0 4px 14px -6px rgba(18, 38, 63, .16);
    --header-h: 76px;

    --bs-primary: var(--c-primary);
    --bs-primary-rgb: var(--c-primary-rgb);
    --bs-link-color: var(--c-primary);
    --bs-link-color-rgb: var(--c-primary-rgb);
    --bs-link-hover-color: var(--c-primary-dark);
    --bs-body-font-family: var(--f-body);
    --bs-body-color: var(--c-text);
    --bs-body-bg: var(--c-bg);
    --bs-border-radius: var(--radius);
    --bs-border-radius-lg: calc(var(--radius) + 4px);
}

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { font-family: var(--f-body); color: var(--c-text); background: var(--c-bg); font-size: 1rem; line-height: 1.65; overflow-x: hidden; }
h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6 { font-family: var(--f-heading); font-weight: 700; color: var(--c-secondary); line-height: 1.2; }
img { max-width: 100%; height: auto; }
a { color: var(--c-primary); text-underline-offset: 3px; }
a:hover { color: var(--c-primary-dark); }
::selection { background: rgba(var(--c-primary-rgb), .18); }
:focus-visible { outline: 3px solid rgba(var(--c-primary-rgb), .55); outline-offset: 2px; }
.skip-link { position: absolute; z-index: 2000; left: 1rem; top: 1rem; background: #fff; padding: .5rem 1rem; border-radius: 8px; }

/* ---------- Botones ---------- */
.btn { border-radius: calc(var(--radius) * .75); font-weight: 600; padding: .6rem 1.2rem; }
.btn-lg { padding: .8rem 1.6rem; font-size: 1.05rem; }
.btn-sm { padding: .35rem .8rem; }
.btn-primary { --bs-btn-bg: var(--c-primary); --bs-btn-border-color: var(--c-primary); --bs-btn-color: var(--c-on-primary);
    --bs-btn-hover-bg: var(--c-primary-dark); --bs-btn-hover-border-color: var(--c-primary-dark); --bs-btn-hover-color: var(--c-on-primary);
    --bs-btn-active-bg: var(--c-primary-dark); --bs-btn-active-border-color: var(--c-primary-dark); --bs-btn-disabled-bg: var(--c-primary); --bs-btn-disabled-border-color: var(--c-primary);
    box-shadow: 0 6px 16px -6px rgba(var(--c-primary-rgb), .6); }
.btn-outline-primary { --bs-btn-color: var(--c-primary); --bs-btn-border-color: var(--c-primary); --bs-btn-hover-bg: var(--c-primary); --bs-btn-hover-border-color: var(--c-primary);
    --bs-btn-active-bg: var(--c-primary); --bs-btn-active-border-color: var(--c-primary); --bs-btn-hover-color: var(--c-on-primary); --bs-btn-active-color: var(--c-on-primary); }
.btn-outline-secondary { --bs-btn-color: var(--c-secondary); --bs-btn-border-color: rgba(var(--c-secondary-rgb), .35); --bs-btn-hover-bg: var(--c-secondary); --bs-btn-hover-border-color: var(--c-secondary); --bs-btn-hover-color: var(--c-on-secondary); }
.btn-link { font-weight: 600; text-decoration: none; color: var(--c-primary); }
.form-control, .form-select { border-radius: calc(var(--radius) * .66); padding: .65rem .9rem; border-color: #d6dde5; }
.form-control:focus, .form-select:focus, .form-check-input:focus { border-color: var(--c-primary); box-shadow: 0 0 0 .2rem rgba(var(--c-primary-rgb), .18); }
.form-check-input:checked { background-color: var(--c-primary); border-color: var(--c-primary); }
.form-label { font-weight: 600; font-size: .92rem; color: var(--c-secondary); }
.page-link { color: var(--c-secondary); border-radius: 8px !important; margin: 0 3px; border: 0; min-width: 40px; text-align: center; }
.page-item.active .page-link { background: var(--c-primary); color: var(--c-on-primary); }

/* ---------- Utilidades ---------- */
.eyebrow { text-transform: uppercase; letter-spacing: .12em; font-size: .78rem; font-weight: 700; color: var(--c-primary); margin-bottom: .5rem; }
.section { padding: 64px 0; }
.bg-soft { background: var(--c-soft); }
.bg-brand { background: var(--c-primary); color: var(--c-on-primary); }
.bg-brand h2, .bg-brand h3, .bg-brand a:not(.btn) { color: var(--c-on-primary); }
.bg-dark-brand { background: var(--c-secondary); color: var(--c-on-secondary); }
.bg-dark-brand .section-title, .bg-dark-brand h2, .bg-dark-brand h3 { color: var(--c-on-secondary); }
.bg-dark-brand .card { background: rgba(255, 255, 255, .06); border-color: rgba(255, 255, 255, .1); }
.bg-dark-brand .card-title a { color: #fff; }
.rounded-brand { border-radius: var(--radius); }
.narrow { max-width: 820px; margin-inline: auto; }
.section-title { font-size: clamp(1.5rem, 1.1rem + 1.5vw, 2.2rem); margin-bottom: 1rem; }
.section-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; margin-bottom: 1.75rem; flex-wrap: wrap; }
.display-title { font-size: clamp(1.9rem, 1.2rem + 2.6vw, 3.1rem); font-weight: 800; }
.meta { color: #6b7785; font-size: .88rem; margin-bottom: .5rem; }
.meta i { color: var(--c-primary); margin-right: .2rem; }
.hp-field { position: absolute !important; left: -10000px !important; width: 1px; height: 1px; overflow: hidden; }
.empty-state { text-align: center; padding: 3rem 1rem; color: #6b7785; }
.empty-state i { font-size: 3rem; color: rgba(var(--c-primary-rgb), .45); display: block; margin-bottom: .5rem; }
.opacity-90 { opacity: .9; }

/* ---------- Header ---------- */
.topbar { background: var(--c-secondary); color: var(--c-on-secondary); font-size: .85rem; padding: .45rem 0; }
.topbar a { color: inherit; text-decoration: none; opacity: .9; }
.topbar a:hover { opacity: 1; color: inherit; }
.site-header { background: var(--c-header-bg); transition: box-shadow .25s ease; z-index: 1030; }
.site-header.scrolled { box-shadow: 0 6px 24px -12px rgba(0, 0, 0, .25); }
.site-header .navbar { min-height: var(--header-h); padding: .4rem 0; }
.brand-logo { height: 52px; width: auto; max-width: 190px; object-fit: contain; transition: height .25s; }
.site-header.scrolled .brand-logo { height: 44px; }
.navbar-toggler { color: var(--c-header-text); }
.navbar-toggler:focus { box-shadow: none; }
.site-header .nav-link { color: var(--c-header-text); font-weight: 600; font-size: .95rem; padding: .55rem .7rem !important; border-radius: 8px; }
.site-header .nav-link:hover, .site-header .nav-link.active, .site-header .nav-link.show { color: var(--c-primary); background: rgba(var(--c-primary-rgb), .07); }
.dropdown-menu { border-radius: var(--radius); padding: .5rem; min-width: 230px; }
.dropdown-item { border-radius: 8px; padding: .55rem .8rem; font-weight: 500; }
.dropdown-item.active, .dropdown-item:active { background: var(--c-primary); color: var(--c-on-primary); }
.btn-cta { padding: .55rem 1.1rem; }
.offcanvas { --bs-offcanvas-width: min(88vw, 360px); }
@media (max-width: 991.98px) {
    :root { --header-h: 64px; }
    .brand-logo { height: 44px; }
    .offcanvas-body .nav-link { font-size: 1.05rem; padding: .8rem .75rem !important; }
    .offcanvas-body .dropdown-menu { box-shadow: none !important; background: var(--c-soft); margin: 0 0 .5rem; }
}
@media (min-width: 992px) {
    .offcanvas { position: static; visibility: visible !important; transform: none !important; border: 0; background: transparent; width: auto !important; }
    .offcanvas-header { display: none; }
    .offcanvas-body { padding: 0; overflow: visible; display: flex; flex-grow: 1; }
    .dropdown:hover > .dropdown-menu { display: block; margin-top: 0; }
}

/* ---------- Hero / slider ---------- */
.hero-slider { position: relative; background: var(--c-secondary); }
.hero-slider .carousel-item { height: clamp(420px, 68vh, 640px); }
.hero-img { width: 100%; height: 100%; object-fit: cover; }
.hero-caption { position: absolute; inset: 0; display: flex; align-items: center;
    background: linear-gradient(90deg, rgba(var(--c-secondary-rgb), .88) 0%, rgba(var(--c-secondary-rgb), .55) 45%, rgba(var(--c-secondary-rgb), 0) 80%); }
.hero-text { max-width: 620px; color: #fff; }
.hero-title { color: #fff; font-size: clamp(1.9rem, 1.1rem + 3.2vw, 3.4rem); font-weight: 800; margin-bottom: 1rem; text-wrap: balance; }
.hero-sub { font-size: clamp(1rem, .9rem + .5vw, 1.25rem); opacity: .92; margin-bottom: 1.6rem; }
.carousel-indicators [data-bs-target] { width: 28px; height: 5px; border-radius: 3px; }
@media (max-width: 767.98px) {
    .hero-slider .carousel-item { height: 78vh; min-height: 460px; max-height: 620px; }
    .hero-caption { align-items: flex-end; padding-bottom: 3.5rem; background: linear-gradient(0deg, rgba(var(--c-secondary-rgb), .92) 0%, rgba(var(--c-secondary-rgb), .5) 55%, rgba(var(--c-secondary-rgb), .1) 100%); }
    .carousel-control-prev, .carousel-control-next { display: none; }
}

.page-hero { position: relative; padding: 48px 0 40px; background: linear-gradient(135deg, var(--c-secondary) 0%, rgba(var(--c-secondary-rgb), .92) 60%, rgba(var(--c-primary-rgb), .85) 140%); color: #fff; overflow: hidden; }
.page-hero::after { content: ''; position: absolute; right: -80px; top: -80px; width: 320px; height: 320px; border-radius: 50%; background: rgba(var(--c-primary-rgb), .25); filter: blur(4px); z-index: 0; }
.page-hero .container { z-index: 1; }
@media (max-width: 767.98px) { .page-hero::after { width: 200px; height: 200px; right: -110px; top: -110px; } }
.page-hero.has-image { background: linear-gradient(90deg, rgba(var(--c-secondary-rgb), .92), rgba(var(--c-secondary-rgb), .6)), var(--hero-img) center / cover no-repeat; padding: 80px 0 64px; }
.page-hero h1 { color: #fff; font-size: clamp(1.7rem, 1.2rem + 2.2vw, 2.8rem); margin-bottom: .5rem; text-wrap: balance; }
.page-hero .lead { opacity: .9; max-width: 760px; }
.page-hero .breadcrumb { --bs-breadcrumb-divider-color: rgba(255, 255, 255, .6); --bs-breadcrumb-item-active-color: rgba(255, 255, 255, .75); font-size: .85rem; margin-bottom: .75rem; }
.page-hero .breadcrumb a { color: #fff; text-decoration: none; opacity: .9; }

/* ---------- Intro y cifras ---------- */
.intro { padding-top: 72px; }
.stats-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; margin-top: 3rem; }
@media (min-width: 992px) { .stats-grid { grid-template-columns: repeat(4, 1fr); gap: 1.5rem; } }
.stat { background: #fff; border-radius: var(--radius); padding: 1.4rem 1rem; text-align: center; box-shadow: var(--shadow-sm); border-top: 4px solid var(--c-primary); }
.stat-number { display: block; font-family: var(--f-heading); font-weight: 800; font-size: clamp(1.8rem, 1.4rem + 1.6vw, 2.6rem); color: var(--c-secondary); line-height: 1.1; }
.stat-label { display: block; font-size: .88rem; color: #5b6775; margin-top: .35rem; }

.quick-link { display: flex; flex-direction: column; gap: .25rem; height: 100%; padding: 1.25rem; background: #fff; border-radius: var(--radius); text-decoration: none; color: var(--c-text); box-shadow: var(--shadow-sm); transition: transform .2s, box-shadow .2s; }
.quick-link:hover { transform: translateY(-4px); box-shadow: var(--shadow); color: var(--c-text); }
.quick-link strong { font-family: var(--f-heading); color: var(--c-secondary); font-size: 1.02rem; }
.quick-link small { color: #6b7785; line-height: 1.35; }
.ql-icon { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; font-size: 1.4rem; background: rgba(var(--c-primary-rgb), .1); color: var(--c-primary); margin-bottom: .5rem; }

/* ---------- Tarjetas ---------- */
.card { border: 1px solid #edf0f3; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); transition: transform .2s, box-shadow .2s; }
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.card-img-wrap { position: relative; display: block; overflow: hidden; aspect-ratio: 16 / 10; background: #eef2f6; }
.card-img-wrap img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.card:hover .card-img-wrap img { transform: scale(1.05); }
.card-title a { color: var(--c-secondary); text-decoration: none; }
.card-title a:hover { color: var(--c-primary); }
.card-body { padding: 1.25rem; }
.badge-float { position: absolute; left: 12px; top: 12px; background: var(--c-accent); color: #1f2933; font-size: .75rem; font-weight: 700; padding: .3rem .6rem; border-radius: 20px; }
.date-chip { position: absolute; left: 14px; top: 14px; background: #fff; border-radius: 12px; padding: .35rem .7rem; text-align: center; line-height: 1.1; font-size: .72rem; font-weight: 700; color: var(--c-primary); box-shadow: var(--shadow-sm); }
.date-chip strong { display: block; font-size: 1.5rem; color: var(--c-secondary); font-family: var(--f-heading); }
.play-btn { position: absolute; inset: 0; margin: auto; width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; font-size: 2rem; color: #fff; background: rgba(var(--c-primary-rgb), .92); box-shadow: 0 0 0 10px rgba(var(--c-primary-rgb), .25); transition: transform .2s; }
.card-video:hover .play-btn { transform: scale(1.1); }
.card-play .card-img-wrap { aspect-ratio: auto; min-height: 220px; }
.price { font-weight: 800; color: var(--c-secondary); font-family: var(--f-heading); }

.info-card { background: #fff; border-radius: var(--radius); padding: 1.6rem 1.4rem; box-shadow: var(--shadow-sm); position: relative; border: 1px solid #f0f2f4; }
.info-card strong { font-family: var(--f-heading); color: var(--c-secondary); font-size: 1.1rem; display: inline-block; margin-bottom: .35rem; }
.info-num { position: absolute; right: 1rem; top: .75rem; font-family: var(--f-heading); font-weight: 800; font-size: 2rem; color: rgba(var(--c-primary-rgb), .15); }
.highlight-box { max-width: 860px; margin: 0 auto; }
.bg-brand .highlight-box h2 { color: var(--c-on-primary); }
.bg-brand .rich a { color: var(--c-on-primary); font-weight: 700; }

.survey-teaser { display: flex; gap: 1rem; align-items: center; padding: 1.1rem 1.2rem; background: #fff; border-radius: var(--radius); box-shadow: var(--shadow-sm); text-decoration: none; color: var(--c-text); border: 1px solid #eef1f4; transition: transform .2s, box-shadow .2s; }
.survey-teaser:hover { transform: translateY(-3px); box-shadow: var(--shadow); color: var(--c-text); }
.survey-teaser strong { display: block; font-family: var(--f-heading); color: var(--c-secondary); }
.survey-teaser small { display: block; color: #6b7785; }
.st-icon { flex: 0 0 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; background: rgba(var(--c-primary-rgb), .1); color: var(--c-primary); font-size: 1.3rem; }

/* ---------- Galerías ---------- */
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 1rem; }
.gallery-card { position: relative; display: block; border-radius: var(--radius); overflow: hidden; aspect-ratio: 4 / 3; box-shadow: var(--shadow-sm); }
.gallery-card img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.gallery-card:hover img { transform: scale(1.06); }
.gallery-card-body { position: absolute; inset: auto 0 0 0; padding: 1rem; color: #fff; background: linear-gradient(0deg, rgba(0, 0, 0, .75), transparent); }
.gallery-card-body strong { display: block; font-family: var(--f-heading); }
.gallery-card-body small { opacity: .85; }
.photo-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: .6rem; }
@media (min-width: 768px) { .photo-grid { grid-template-columns: repeat(3, 1fr); gap: .75rem; } }
@media (min-width: 1200px) { .photo-grid { grid-template-columns: repeat(4, 1fr); } }
.photo-grid a { display: block; border-radius: calc(var(--radius) * .75); overflow: hidden; aspect-ratio: 4 / 3; background: var(--c-soft); }
.photo-grid img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .4s; }
.photo-grid a:hover img { transform: scale(1.04); }

/* ---------- Equipo y organigrama ---------- */
.team-group { margin-top: 2.5rem; }
.team-group-title { text-align: center; font-size: 1.2rem; margin-bottom: 1.25rem; position: relative; }
.team-group-title::after { content: ''; display: block; width: 48px; height: 3px; background: var(--c-primary); margin: .6rem auto 0; border-radius: 2px; }
.team-card { background: #fff; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); text-align: center; margin: 0; height: 100%; }
.team-card img { width: 100%; aspect-ratio: 1; object-fit: cover; object-position: top; background: #eef2f6; }
.team-card figcaption { padding: .8rem .6rem 1rem; }
.team-card strong { display: block; font-family: var(--f-heading); color: var(--c-secondary); font-size: .95rem; line-height: 1.25; }
.team-card span { display: block; color: var(--c-primary); font-size: .82rem; font-weight: 600; margin-top: .2rem; }

.org-scroll { overflow-x: auto; padding-bottom: 1rem; -webkit-overflow-scrolling: touch; }
.org-chart { display: inline-block; min-width: 100%; text-align: center; }
.org-chart ul { padding-top: 24px; position: relative; display: flex; justify-content: center; margin: 0; padding-left: 0; }
.org-chart li { list-style: none; position: relative; padding: 24px 6px 0; display: flex; flex-direction: column; align-items: center; }
.org-chart li::before, .org-chart li::after { content: ''; position: absolute; top: 0; right: 50%; width: 50%; height: 24px; border-top: 2px solid rgba(var(--c-secondary-rgb), .25); }
.org-chart li::after { right: auto; left: 50%; border-left: 2px solid rgba(var(--c-secondary-rgb), .25); }
.org-chart li:only-child::before, .org-chart li:only-child::after { display: none; }
.org-chart li:only-child { padding-top: 0; }
.org-chart li:first-child::before, .org-chart li:last-child::after { border: 0 none; }
.org-chart li:last-child::before { border-right: 2px solid rgba(var(--c-secondary-rgb), .25); border-radius: 0 8px 0 0; }
.org-chart li:first-child::after { border-radius: 8px 0 0 0; }
.org-chart ul ul::before { content: ''; position: absolute; top: 0; left: 50%; border-left: 2px solid rgba(var(--c-secondary-rgb), .25); height: 24px; }
.org-chart > ul { padding-top: 0; }
.org-node { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow-sm); padding: .8rem .7rem; width: 136px; border-top: 3px solid var(--c-primary); }
.org-node img { width: 60px; height: 60px; border-radius: 50%; object-fit: cover; object-position: top; margin-bottom: .4rem; border: 3px solid rgba(var(--c-primary-rgb), .2); background: #eef2f6; }
.org-node strong { display: block; font-size: .8rem; color: var(--c-secondary); font-family: var(--f-heading); line-height: 1.2; }
.org-node span { display: block; font-size: .72rem; color: var(--c-primary); font-weight: 600; margin-top: .15rem; }
.org-node .org-group { color: #6b7785; font-weight: 500; }
.org-chart ul.stack { flex-direction: column; align-items: center; gap: 10px; background: linear-gradient(rgba(var(--c-secondary-rgb), .25), rgba(var(--c-secondary-rgb), .25)) center top / 2px calc(100% - 30px) no-repeat; }
.org-chart ul.stack > li { padding: 0; }
.org-chart ul.stack > li::before, .org-chart ul.stack > li::after { display: none; }
.org-chart ul.stack .org-node { display: flex; align-items: center; gap: .6rem; width: 230px; text-align: left; padding: .55rem .7rem; border-top: 0; border-left: 3px solid var(--c-primary); }
.org-chart ul.stack .org-node img { width: 42px; height: 42px; margin: 0; flex-shrink: 0; border-width: 2px; }

/* ---------- Contenido enriquecido ---------- */
.rich { overflow-wrap: anywhere; }
.rich img { border-radius: var(--radius); }
.rich figure { margin: 1.5rem 0; }
.rich h2 { font-size: 1.6rem; margin-top: 2rem; }
.rich h3 { font-size: 1.3rem; margin-top: 1.5rem; }
.rich blockquote { border-left: 4px solid var(--c-primary); padding: .5rem 0 .5rem 1rem; font-style: italic; color: #4a5561; }
.rich ul li::marker { color: var(--c-primary); }
.rich iframe, .video-embed iframe { width: 100%; aspect-ratio: 16 / 9; height: auto; border: 0; border-radius: var(--radius); }
.page-content > :first-child { margin-top: 0; }
.page-content .video-embed { margin-bottom: 1.5rem; }
@media (min-width: 992px) {
    .page-content:has(.video-embed) { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.5rem; }
    .page-content:has(.video-embed) > p { grid-column: 1 / -1; }
    .page-content .video-embed { margin: 0; }
}
.page-section { padding: 56px 0; }
.article-body { font-size: 1.06rem; }
.share-bar { display: flex; align-items: center; gap: .5rem; margin-top: 2rem; padding-top: 1.25rem; border-top: 1px solid #eef1f4; flex-wrap: wrap; }
.share-bar span { font-weight: 600; font-size: .9rem; margin-right: .25rem; }
.share-bar a, .share-bar button { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--c-soft); color: var(--c-secondary); border: 0; text-decoration: none; }
.share-bar a:hover, .share-bar button:hover { background: var(--c-primary); color: var(--c-on-primary); }

.sidebar-box { background: #fff; border-radius: var(--radius); padding: 1.3rem; box-shadow: var(--shadow-sm); border: 1px solid #eef1f4; }
.sidebar-box.bg-brand { border: 0; }
.side-item { display: flex; gap: .75rem; padding: .6rem 0; text-decoration: none; color: var(--c-text); border-bottom: 1px solid #f1f3f5; }
.side-item:last-child { border: 0; }
.side-item img { width: 72px; height: 56px; object-fit: cover; border-radius: 8px; flex-shrink: 0; }
.side-item strong { display: block; font-size: .9rem; line-height: 1.3; color: var(--c-secondary); }
.side-item small { color: #6b7785; }

.search-bar { position: relative; display: flex; gap: .5rem; max-width: 560px; }
.search-bar i { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: #8a96a3; }
.search-bar input { padding-left: 2.4rem; }
.chip-filter, .amount-chips { display: flex; gap: .5rem; flex-wrap: wrap; }
.chip { display: inline-flex; align-items: center; padding: .45rem 1rem; border-radius: 30px; background: #fff; border: 1.5px solid #e1e6eb; color: var(--c-secondary); font-weight: 600; font-size: .9rem; text-decoration: none; cursor: pointer; }
.chip:hover, .chip.active { background: var(--c-primary); border-color: var(--c-primary); color: var(--c-on-primary); }
.pill-tabs .nav-link { border-radius: 30px; font-weight: 600; color: var(--c-secondary); }
.pill-tabs .nav-link.active { background: var(--c-primary); }

/* ---------- Eventos ---------- */
.event-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: .75rem; }
.event-facts > div { display: flex; gap: .75rem; align-items: flex-start; background: var(--c-soft); border-radius: calc(var(--radius) * .75); padding: .8rem 1rem; }
.event-facts i { font-size: 1.3rem; color: var(--c-primary); }
.event-facts small { display: block; font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: #6b7785; font-weight: 700; }
.form-card { background: #fff; border-radius: calc(var(--radius) + 4px); padding: 1.5rem; box-shadow: var(--shadow); border: 1px solid #eef1f4; }
@media (min-width: 992px) { .form-card { padding: 2rem; } .sticky-lg-top { top: calc(var(--header-h) + 16px); } }

/* ---------- Encuestas ---------- */
.survey-progress { height: 6px; background: #eef1f4; border-radius: 3px; margin: 1.5rem 0; position: sticky; top: calc(var(--header-h) + 4px); z-index: 5; }
.survey-progress .bar { height: 100%; width: 0; background: var(--c-primary); border-radius: 3px; transition: width .3s; }
.question-card { background: #fff; border: 1px solid #e9edf1; border-radius: var(--radius); padding: 1.3rem; margin-bottom: 1rem; box-shadow: var(--shadow-sm); }
.question-card.has-error { border-color: #dc3545; }
.q-title { font-family: var(--f-heading); font-weight: 600; color: var(--c-secondary); font-size: 1.05rem; margin-bottom: .75rem; }
legend.q-title { float: left; width: 100%; padding: 0; }
legend.q-title + * { clear: left; }
.q-num { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 8px; background: var(--c-primary); color: var(--c-on-primary); font-size: .85rem; margin-right: .4rem; }
.yesno { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; }
.option-list { display: grid; gap: .5rem; }
.option-item { display: flex; gap: .75rem; align-items: center; padding: .75rem 1rem; border: 1.5px solid #e1e6eb; border-radius: calc(var(--radius) * .66); cursor: pointer; transition: border-color .15s, background .15s; }
.option-item:hover { border-color: rgba(var(--c-primary-rgb), .5); }
.option-item:has(input:checked) { border-color: var(--c-primary); background: rgba(var(--c-primary-rgb), .06); }
.option-item .form-check-input { margin: 0; flex-shrink: 0; width: 1.2em; height: 1.2em; }
.scale { display: flex; gap: .35rem; flex-wrap: wrap; }
.scale .btn { flex: 1 0 40px; padding: .55rem 0; }
.stars { display: inline-flex; flex-direction: row-reverse; gap: .25rem; }
.stars input { position: absolute; opacity: 0; pointer-events: none; }
.stars label { font-size: 2.2rem; color: #d7dde3; cursor: pointer; transition: color .15s, transform .15s; line-height: 1; }
.stars label:hover, .stars label:hover ~ label, .stars input:checked ~ label { color: var(--c-accent); }
.stars label:hover { transform: scale(1.1); }
.stars input:focus-visible + label { outline: 2px solid var(--c-primary); border-radius: 4px; }
.result-row { margin-bottom: .75rem; }
.result-bar { height: 12px; background: #eef1f4; border-radius: 6px; overflow: hidden; margin-top: .25rem; }
.result-bar span { display: block; height: 100%; background: linear-gradient(90deg, var(--c-primary), var(--c-accent)); border-radius: 6px; }

/* ---------- Teatro ---------- */
.showtime-option { display: grid; grid-template-columns: auto 1fr auto; grid-template-areas: "radio date price" "radio info price"; column-gap: .9rem; align-items: center; padding: .8rem 1rem; border: 1.5px solid #e1e6eb; border-radius: calc(var(--radius) * .66); cursor: pointer; }
.showtime-option input { grid-area: radio; width: 1.2em; height: 1.2em; accent-color: var(--c-primary); }
.showtime-option .st-date { grid-area: date; }
.showtime-option .st-date strong { text-transform: capitalize; color: var(--c-secondary); }
.showtime-option .st-date small { margin-left: .4rem; color: #6b7785; }
.showtime-option .st-info { grid-area: info; font-size: .8rem; color: #2f9e44; font-weight: 600; }
.showtime-option .st-price { grid-area: price; font-weight: 800; color: var(--c-secondary); }
.showtime-option:has(input:checked) { border-color: var(--c-primary); background: rgba(var(--c-primary-rgb), .06); }
.showtime-option.soldout { opacity: .5; cursor: not-allowed; }
.showtime-option.soldout .st-info { color: #c92a2a; }
.qty-control { display: flex; max-width: 180px; }
.qty-control .btn { width: 48px; font-size: 1.2rem; padding: .4rem; }
.qty-control .form-control { border-radius: 0; -moz-appearance: textfield; }
.qty-control .btn:first-child { border-radius: 10px 0 0 10px; }
.qty-control .btn:last-child { border-radius: 0 10px 10px 0; }
.total-box { display: flex; justify-content: space-between; align-items: center; background: var(--c-soft); padding: .9rem 1.1rem; border-radius: calc(var(--radius) * .66); font-weight: 600; }
.total-box strong { font-size: 1.4rem; color: var(--c-secondary); font-family: var(--f-heading); }
.step-num { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--c-primary); color: var(--c-on-primary); font-size: .9rem; margin-right: .35rem; }
.pay-list li { display: flex; justify-content: space-between; gap: 1rem; padding: .55rem 0; border-bottom: 1px dashed #e5e9ee; }
.pay-list small { color: #6b7785; }
.ticket { display: grid; grid-template-columns: 1fr; background: #fff; border-radius: calc(var(--radius) + 6px); box-shadow: var(--shadow); overflow: hidden; border: 1px solid #eef1f4; }
@media (min-width: 768px) { .ticket { grid-template-columns: 1fr 240px; } }
.ticket-main { padding: 1.75rem; border-top: 6px solid var(--c-primary); }
.ticket-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: .9rem; margin-top: 1rem; }
.ticket-grid small { display: block; font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: #6b7785; }
.ticket-grid strong { color: var(--c-secondary); text-transform: capitalize; }
.ticket-stub { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 1.5rem; background: var(--c-soft); border-top: 2px dashed #d8dee4; }
@media (min-width: 768px) { .ticket-stub { border-top: 0; border-left: 2px dashed #d8dee4; } }
.qr { width: 180px; height: 180px; background: #fff; padding: 8px; border-radius: 10px; }
.qr img, .qr svg { width: 100%; height: 100%; }
.ticket-code { font-size: 1.1rem; letter-spacing: .15em; margin-top: .75rem; color: var(--c-secondary); font-weight: 700; }
.result-icon { width: 76px; height: 76px; border-radius: 50%; display: inline-grid; place-items: center; font-size: 2.4rem; }
.result-icon.ok { background: #d3f9d8; color: #2b8a3e; }
.result-icon.err { background: #ffe3e3; color: #c92a2a; }
.result-icon.wait { background: #fff3bf; color: #e67700; }
.error-code { font-family: var(--f-heading); font-size: 5rem; font-weight: 800; color: rgba(var(--c-primary-rgb), .3); line-height: 1; margin: 0; }

/* ---------- Formularios públicos ---------- */
.benefits { list-style: none; padding: 0; display: grid; gap: 1rem; }
.benefits li { display: flex; gap: .9rem; align-items: flex-start; }
.benefits i { flex: 0 0 44px; height: 44px; display: grid; place-items: center; border-radius: 12px; background: rgba(var(--c-primary-rgb), .1); color: var(--c-primary); font-size: 1.25rem; }
.captcha-box { background: var(--c-soft); border-radius: calc(var(--radius) * .66); padding: .9rem 1rem; }
.captcha-box input { max-width: 140px; }
.contact-list { display: grid; gap: .75rem; }
.contact-item { display: flex; gap: .9rem; align-items: center; padding: 1rem; background: #fff; border-radius: var(--radius); box-shadow: var(--shadow-sm); text-decoration: none; color: var(--c-secondary); font-weight: 600; border: 1px solid #eef1f4; overflow-wrap: anywhere; }
.contact-item i { flex: 0 0 44px; height: 44px; display: grid; place-items: center; border-radius: 12px; background: rgba(var(--c-primary-rgb), .1); color: var(--c-primary); font-size: 1.2rem; }
.contact-item small { display: block; font-weight: 400; color: #6b7785; font-size: .8rem; }
.bank-card { background: linear-gradient(135deg, var(--c-secondary), rgba(var(--c-secondary-rgb), .85) 60%, var(--c-primary) 160%); color: #fff; border-radius: calc(var(--radius) + 6px); padding: 1.75rem; box-shadow: var(--shadow); }
.bank-number { font-family: var(--f-heading); font-size: clamp(1.4rem, 1.1rem + 1.2vw, 1.9rem); font-weight: 800; letter-spacing: .06em; margin: .25rem 0; }
.amount-chips .chip { font-size: 1.05rem; padding: .55rem 1.2rem; }

/* ---------- CTA y footer ---------- */
.cta-band { background: linear-gradient(120deg, var(--c-primary), var(--c-primary-dark)); color: var(--c-on-primary); padding: 48px 0; }
.cta-band h2 { color: var(--c-on-primary); font-size: clamp(1.4rem, 1.1rem + 1.2vw, 2rem); }
.sponsors-strip { padding: 36px 0; background: #fff; border-top: 1px solid #eef1f4; }
.sponsors-row { display: flex; justify-content: center; align-items: center; gap: 1.5rem 2.5rem; flex-wrap: wrap; }
.sponsors-row img { height: 56px; width: auto; max-width: 150px; object-fit: contain; filter: grayscale(1); opacity: .75; transition: filter .2s, opacity .2s; }
.sponsors-row a:hover img { filter: none; opacity: 1; }
.site-footer { background: var(--c-footer-bg); color: var(--c-footer-text); padding: 56px 0 24px; font-size: .93rem; }
.site-footer a { color: var(--c-footer-text); text-decoration: none; opacity: .85; }
.site-footer a:hover { opacity: 1; color: #fff; }
.footer-logo { height: 58px; width: auto; filter: brightness(0) invert(1); opacity: .95; }
.footer-title { color: #fff; font-size: 1rem; text-transform: uppercase; letter-spacing: .08em; margin-bottom: 1rem; }
.footer-links li, .footer-contact li { margin-bottom: .55rem; }
.footer-contact li { display: flex; gap: .6rem; overflow-wrap: anywhere; }
.footer-contact i { color: var(--c-primary); }
.social-btn { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, .08); opacity: 1 !important; }
.social-btn:hover { background: var(--c-primary); }
.donate-box { background: rgba(255, 255, 255, .06); border-radius: var(--radius); padding: 1rem 1.1rem; }
.donate-box .account { font-family: var(--f-heading); font-weight: 700; font-size: 1.1rem; color: #fff; }
.footer-bottom { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-top: 2.5rem; padding-top: 1.25rem; border-top: 1px solid rgba(255, 255, 255, .1); font-size: .85rem; opacity: .85; }
.whatsapp-float { position: fixed; right: 18px; bottom: calc(18px + env(safe-area-inset-bottom)); width: 58px; height: 58px; border-radius: 50%; background: #25D366; color: #fff; display: grid; place-items: center; font-size: 1.8rem; box-shadow: 0 8px 24px -6px rgba(0, 0, 0, .35); z-index: 1020; transition: transform .2s; }
.whatsapp-float:hover { transform: scale(1.08); color: #fff; }

/* ---------- Móvil ---------- */
@media (max-width: 575.98px) {
    .section { padding: 44px 0; }
    .page-section { padding: 40px 0; }
    .container { padding-inline: 18px; }
    .form-card { padding: 1.2rem; }
    .btn-lg { width: 100%; }
    .intro .d-flex .btn-lg { width: 100%; }
    .section-head .btn-link { padding-left: 0; }
    .ticket-grid { grid-template-columns: 1fr 1fr; }
    .gallery-grid { grid-template-columns: 1fr 1fr; gap: .6rem; }
    .gallery-card-body { padding: .6rem; font-size: .85rem; }
    .whatsapp-float { width: 52px; height: 52px; font-size: 1.6rem; }
    .sponsors-row img { height: 44px; max-width: 110px; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

@media print {
    .topbar, .site-header, .site-footer, .sponsors-strip, .whatsapp-float, .no-print, .cta-band { display: none !important; }
    .section { padding: 0; }
    .ticket { box-shadow: none; border: 2px solid #000; }
}

/* =========================================================
   Página de convocatoria / inscripción (eventos tipo simposio)
   ========================================================= */
.lp-hero { position: relative; overflow: hidden; color: #fff; padding: 36px 0 110px;
    background: radial-gradient(1200px 500px at 85% 20%, rgba(var(--c-primary-rgb), .45), transparent 60%),
                linear-gradient(135deg, #0f2440 0%, var(--c-secondary) 55%, #214d7a 100%); }
.lp-glow { position: absolute; width: 520px; height: 520px; border-radius: 50%; left: -180px; bottom: -260px; background: rgba(var(--c-primary-rgb), .25); filter: blur(30px); }
.lp-crumbs { --bs-breadcrumb-divider-color: rgba(255,255,255,.5); font-size: .85rem; margin-bottom: 1.5rem; }
.lp-crumbs a { color: rgba(255,255,255,.85); text-decoration: none; }
.lp-kicker { display: inline-block; font: 700 .8rem var(--f-heading); letter-spacing: .28em; text-transform: uppercase; padding: .45rem .9rem; border: 1px solid rgba(255,255,255,.35); border-radius: 30px; background: rgba(255,255,255,.08); margin-bottom: 1rem; }
.lp-title { color: #fff; font-size: clamp(2rem, 1.2rem + 3.4vw, 3.6rem); font-weight: 800; line-height: 1.08; text-wrap: balance; margin-bottom: .75rem; }
.lp-sub { font-size: clamp(1.05rem, .95rem + .5vw, 1.35rem); opacity: .9; max-width: 560px; }
.lp-cta { color: var(--c-secondary); font-weight: 700; }
.lp-banner { border-radius: calc(var(--radius) + 10px); overflow: hidden; box-shadow: 0 30px 60px -25px rgba(0,0,0,.6); border: 1px solid rgba(255,255,255,.15); transform: rotate(1.2deg); }
.lp-banner img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; display: block; }
.lp-countdown { display: flex; gap: .6rem; margin-top: 1.75rem; }
.lp-countdown div { min-width: 74px; text-align: center; padding: .55rem .5rem; border-radius: 12px; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.15); }
.lp-countdown strong { display: block; font: 800 1.6rem var(--f-heading); line-height: 1; }
.lp-countdown span { font-size: .72rem; text-transform: uppercase; letter-spacing: .12em; opacity: .8; }
.lp-facts-wrap { margin-top: -70px; position: relative; z-index: 2; }
.lp-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 1px; background: #e8edf3; border-radius: calc(var(--radius) + 6px); overflow: hidden; box-shadow: var(--shadow); }
.lp-fact { background: #fff; padding: 1.4rem 1.5rem; display: flex; gap: 1rem; align-items: center; }
.lp-fact > i { font-size: 1.6rem; color: var(--c-primary); flex-shrink: 0; width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; background: rgba(var(--c-primary-rgb), .1); }
.lp-fact small { display: block; font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: #6b7785; font-weight: 700; }
.lp-fact strong { display: block; color: var(--c-secondary); font-family: var(--f-heading); font-size: 1.12rem; line-height: 1.3; }
.lp-date { flex-direction: column; justify-content: center; gap: 0; background: linear-gradient(160deg, var(--c-primary), var(--c-primary-dark)); color: #fff; text-align: center; }
.lp-date .lp-month { font: 700 .95rem var(--f-heading); letter-spacing: .2em; }
.lp-date .lp-day { font: 800 3.4rem/1 var(--f-heading); }
.lp-date .lp-weekday { font: 600 .78rem var(--f-heading); letter-spacing: .3em; opacity: .9; }
.lp-desc { font-size: 1.08rem; }
.lp-logos { background: #fff; border-radius: calc(var(--radius) + 4px); padding: 1.5rem; height: 100%; box-shadow: var(--shadow-sm); }
.lp-logos-title { font: 700 .95rem var(--f-heading); letter-spacing: .25em; text-transform: uppercase; color: var(--c-secondary); text-align: center; margin-bottom: 1.25rem; }
.lp-logos-title::after { content: ''; display: block; width: 40px; height: 3px; background: var(--c-primary); border-radius: 2px; margin: .6rem auto 0; }
.lp-logos-grid { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 1.25rem 2rem; }
.lp-logos-grid img { height: 58px; width: auto; max-width: 150px; object-fit: contain; transition: transform .2s; }
.lp-logos-grid a:hover img { transform: scale(1.05); }
.lp-contact { background: var(--c-secondary); color: #fff; padding: 1rem 0; font-size: .95rem; }
.lp-contact a { color: #fff; text-decoration: none; opacity: .92; }
.lp-contact a:hover { opacity: 1; color: #fff; }
.lp-form-section { background: linear-gradient(180deg, var(--c-soft), #fff 60%); }
.lp-form-card { max-width: 860px; margin: 0 auto; background: #fff; border-radius: calc(var(--radius) + 10px); padding: clamp(1.25rem, 3vw, 2.5rem); box-shadow: 0 24px 60px -28px rgba(18, 38, 63, .35); border: 1px solid #edf0f3; border-top: 6px solid var(--c-primary); }
.lp-form-head { display: flex; gap: 1rem; align-items: center; margin-bottom: 1.25rem; }
.lp-form-icon { flex: 0 0 56px; height: 56px; border-radius: 16px; display: grid; place-items: center; font-size: 1.6rem; color: #fff; background: linear-gradient(135deg, var(--c-primary), var(--c-primary-dark)); }
.lp-intro { color: #4a5561; }
.lp-privacy { display: flex; gap: .9rem; background: #f1f6fb; border: 1px solid #dce7f2; border-radius: var(--radius); padding: 1rem 1.1rem; margin-bottom: 1.5rem; font-size: .9rem; color: #3d4b59; }
.lp-privacy > i { font-size: 1.4rem; color: var(--c-secondary); }
.lp-privacy strong { color: var(--c-secondary); display: block; margin-bottom: .15rem; }
.lf-grid { display: grid; grid-template-columns: 1fr; gap: 1.1rem 1.25rem; }
@media (min-width: 768px) { .lf-grid { grid-template-columns: 1fr 1fr; } .lf-wide { grid-column: 1 / -1; } }
.lf-field fieldset { border: 0; padding: 0; margin: 0; }
.lf-label { display: block; font-weight: 700; font-size: .92rem; color: var(--c-secondary); margin-bottom: .4rem; float: none; width: auto; padding: 0; }
.lf-label .req { color: var(--c-primary); }
.lf-hint { font-size: .8rem; color: #6b7785; margin: -.2rem 0 .5rem; }
.lf-field .form-control, .lf-field .form-select { padding: .75rem .95rem; background: #fbfcfd; }
.lf-pills { display: flex; flex-wrap: wrap; gap: .5rem; }
.lf-pill { display: inline-flex; align-items: center; gap: .45rem; padding: .6rem 1rem; border: 1.5px solid #dbe2ea; border-radius: 30px; cursor: pointer; font-weight: 600; color: #3d4b59; background: #fff; transition: all .15s; user-select: none; }
.lf-pill .bi:last-of-type { display: none; }
.btn-check:checked + .lf-pill { border-color: var(--c-primary); background: rgba(var(--c-primary-rgb), .08); color: var(--c-primary-dark); }
.btn-check:checked + .lf-pill .bi:first-of-type { display: none; }
.btn-check:checked + .lf-pill .bi:last-of-type { display: inline; }
.btn-check:focus-visible + .lf-pill { outline: 3px solid rgba(var(--c-primary-rgb), .4); }
.has-error .lf-pill { border-color: #f1aeb5; }
.lp-antispam { margin-top: 1.25rem; }
.lp-submit { width: 100%; margin-top: .5rem; padding: .95rem; font-size: 1.1rem; }
@media (max-width: 575.98px) {
    .lp-hero { padding: 24px 0 96px; }
    .lp-banner { transform: none; }
    .lp-countdown div { min-width: 64px; }
    .lp-fact { padding: 1.1rem 1.2rem; }
    .lp-hero .btn-lg { width: 100%; }
}

/* ---------- Aviso destacado ---------- */
.announce-bar { background: var(--c-primary); color: var(--c-on-primary); font-size: .95rem; padding: .55rem 0; position: relative; }
.announce-bar p { text-align: center; line-height: 1.45; }
.announce-bar.announce-secondary { background: var(--c-secondary); color: var(--c-on-secondary); }
.announce-bar.announce-accent { background: var(--c-accent); color: #1F2933; }
.announce-bar.announce-danger { background: #B42318; color: #fff; }
.announce-link { color: inherit; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; margin-left: .35rem; white-space: nowrap; }
.announce-link:hover { color: inherit; opacity: .85; }
.announce-close { background: transparent; border: 0; color: inherit; padding: .25rem .4rem; margin-left: .25rem; border-radius: 6px; line-height: 1; flex-shrink: 0; }
.announce-close:hover, .announce-close:focus-visible { background: rgba(255, 255, 255, .2); }
.maintenance-bar { background: #FFF3BF; color: #5C4200; text-align: center; padding: .5rem 1rem; font-size: .9rem; border-bottom: 1px solid #F0D264; }
.maintenance-bar a { color: inherit; font-weight: 700; }

/* ---------- Página de mantenimiento ---------- */
.maintenance-page { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; background: linear-gradient(160deg, var(--c-soft), #fff 60%); }
.maintenance-box { max-width: 560px; text-align: center; background: #fff; border-radius: calc(var(--radius) * 1.5); padding: 2.5rem 1.8rem; box-shadow: 0 20px 50px -24px rgba(var(--c-secondary-rgb), .35); }
.maintenance-logo { max-height: 64px; max-width: 220px; margin-bottom: 1.2rem; }
.maintenance-icon { width: 72px; height: 72px; border-radius: 50%; margin: 0 auto 1rem; display: grid; place-items: center; background: rgba(var(--c-primary-rgb), .12); color: var(--c-primary); font-size: 2rem; }
.maintenance-box h1 { font-family: var(--f-heading); color: var(--c-secondary); font-size: 1.7rem; }
.maintenance-until { color: var(--c-secondary); font-weight: 600; }

/* ---------- Consentimiento y autoguardado ---------- */
.consent-check { background: var(--c-soft); border-radius: var(--radius); padding: .8rem .9rem .7rem 2.4rem; font-size: .9rem; line-height: 1.5; }
.consent-check .form-check-input { margin-top: .2rem; }
.consent-check a { font-weight: 600; }
.autosave-note { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: .3rem .6rem; background: #EBFBEE; color: #1B5E20; border: 1px solid #B2F2BB; border-radius: var(--radius); padding: .55rem .8rem; margin-bottom: 1rem; font-size: .92rem; line-height: 1.4; }
.autosave-note .btn-link { color: #1B5E20; font-weight: 600; text-align: right; }
@media (max-width: 575.98px) { .autosave-note { grid-template-columns: auto 1fr; } .autosave-note .btn-link { grid-column: 2; text-align: left; } }

/* ---------- Botón de accesibilidad ---------- */
.a11y-widget { position: fixed; bottom: calc(18px + env(safe-area-inset-bottom)); z-index: 1030; }
.a11y-widget.a11y-left { left: 18px; }
.a11y-widget.a11y-right { right: 18px; bottom: calc(88px + env(safe-area-inset-bottom)); }
.a11y-toggle { width: 54px; height: 54px; border-radius: 50%; border: 3px solid #fff; background: var(--c-secondary); color: #fff; font-size: 1.75rem; display: grid; place-items: center; box-shadow: 0 8px 24px -6px rgba(0, 0, 0, .35); }
.a11y-toggle:hover { transform: scale(1.06); }
.a11y-toggle:focus-visible { outline: 3px solid var(--c-accent); outline-offset: 2px; }
.a11y-widget.is-custom .a11y-toggle { background: var(--c-primary); }
.a11y-panel { position: absolute; bottom: 66px; width: min(320px, calc(100vw - 32px)); background: #fff; color: #1F2933; border-radius: 16px; box-shadow: 0 20px 50px -12px rgba(0, 0, 0, .35); padding: 1rem; max-height: calc(100vh - 120px); overflow-y: auto; }
.a11y-left .a11y-panel { left: 0; }
.a11y-right .a11y-panel { right: 0; }
.a11y-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: .6rem; font-size: 1.05rem; }
.a11y-label { font-size: .85rem; font-weight: 600; color: #52606D; margin: .2rem 0 .4rem; }
.a11y-size { display: grid; grid-template-columns: repeat(4, 1fr); gap: .4rem; margin-bottom: .8rem; }
.a11y-size button { border: 2px solid #D9E2EC; background: #fff; border-radius: 10px; padding: .45rem 0; font-weight: 700; font-size: 1rem; color: #1F2933; min-height: 44px; }
.a11y-size button[aria-pressed="true"] { border-color: var(--c-primary); background: rgba(var(--c-primary-rgb), .1); color: var(--c-primary-dark); }
.a11y-options { display: grid; gap: .35rem; }
.a11y-option { display: flex; align-items: center; gap: .6rem; padding: .55rem .6rem; border-radius: 10px; border: 1px solid #E4E7EB; cursor: pointer; min-height: 44px; font-size: .95rem; }
.a11y-option:hover { background: #F5F7FA; }
.a11y-option input { width: 1.2rem; height: 1.2rem; accent-color: var(--c-primary); flex-shrink: 0; }
.a11y-option i { color: var(--c-secondary); margin-right: .2rem; }
.a11y-note { font-size: .78rem; color: #7B8794; margin: .6rem 0 0; text-align: center; }
@media (max-width: 575.98px) {
    .a11y-widget.a11y-left { left: 14px; }
    .a11y-toggle { width: 50px; height: 50px; font-size: 1.6rem; }
    .announce-bar { font-size: .88rem; }
}

/* Preferencias aplicadas (clases en <html>) */
html.a11y-size-1 { font-size: 112.5%; }
html.a11y-size-2 { font-size: 125%; }
html.a11y-size-3 { font-size: 140%; }
/* En escritorio, con letra grande el menú pasa a dos líneas en vez de desbordarse */
@media (min-width: 992px) {
    html[class*="a11y-size-"] .site-header .offcanvas-body { min-width: 0; flex: 1 1 auto; }
    html[class*="a11y-size-"] .site-header .navbar-nav { flex-wrap: wrap; justify-content: flex-end; row-gap: .15rem; }
    html.a11y-size-1 .site-header .navbar-nav .nav-link, html.a11y-size-1 .site-header .btn { font-size: .92rem; }
    html.a11y-size-2 .site-header .navbar-nav .nav-link, html.a11y-size-2 .site-header .btn { font-size: .86rem; padding-inline: .45rem; }
    html.a11y-size-3 .site-header .navbar-nav .nav-link, html.a11y-size-3 .site-header .btn { font-size: .8rem; padding-inline: .4rem; }
    html.a11y-size-2 .site-header .brand-logo, html.a11y-size-3 .site-header .brand-logo { max-height: 44px; width: auto; }
}
.site-header .btn { white-space: nowrap; }
html.a11y-spacing body { line-height: 1.95; letter-spacing: .03em; word-spacing: .1em; }
html.a11y-spacing p, html.a11y-spacing li { margin-bottom: 1.1em; }
html.a11y-font body, html.a11y-font h1, html.a11y-font h2, html.a11y-font h3, html.a11y-font h4, html.a11y-font h5, html.a11y-font .btn, html.a11y-font .nav-link, html.a11y-font input, html.a11y-font select, html.a11y-font textarea { font-family: 'Atkinson Hyperlegible', Verdana, Tahoma, sans-serif !important; }
html.a11y-links a:not(.btn):not(.a11y-toggle) { text-decoration: underline !important; text-underline-offset: 3px; text-decoration-thickness: 2px; }
html.a11y-links a:focus-visible, html.a11y-links button:focus-visible, html.a11y-links input:focus-visible, html.a11y-links select:focus-visible, html.a11y-links textarea:focus-visible { outline: 4px solid #FFBF00 !important; outline-offset: 2px; box-shadow: none !important; }
html.a11y-links .btn { box-shadow: inset 0 0 0 2px currentColor; }
html.a11y-motion *, html.a11y-motion *::before, html.a11y-motion *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
html.a11y-contrast { --c-text: #000; --c-bg: #fff; --c-soft: #fff; --c-primary: #A93A00; --c-primary-rgb: 169, 58, 0; --c-primary-dark: #7A2A00; --c-secondary: #0A1C30; --c-secondary-rgb: 10, 28, 48; --c-on-primary: #fff; --c-on-secondary: #fff; --c-header-bg: #fff; --c-header-text: #000; --c-footer-bg: #000; --c-footer-text: #fff; }
html.a11y-contrast body { color: #000; }
html.a11y-contrast .text-muted, html.a11y-contrast .small.text-muted, html.a11y-contrast .form-text { color: #1F2933 !important; }
html.a11y-contrast a:not(.btn) { color: #0033CC; }
html.a11y-contrast .topbar a, html.a11y-contrast .announce-bar a, html.a11y-contrast .hero-slider a:not(.btn), html.a11y-contrast .page-hero a:not(.btn), html.a11y-contrast .cta-band a:not(.btn) { color: #FFE066; opacity: 1; }
html.a11y-contrast .site-footer a:not(.btn) { color: #FFE066; opacity: 1; }
html.a11y-contrast .card, html.a11y-contrast .form-card, html.a11y-contrast .form-control, html.a11y-contrast .form-select { border: 2px solid #000 !important; }
html.a11y-contrast img { filter: contrast(1.05); }
html.a11y-contrast .hero-slide::after, html.a11y-contrast .page-hero::before { background: rgba(0, 0, 0, .75) !important; }

/* ---------- Opciones de precio ---------- */
.price-options { display: grid; gap: .6rem; }
.po-row { display: grid; grid-template-columns: 1fr auto; grid-template-areas: "info price" "info qty"; gap: .35rem .9rem; align-items: center; padding: .75rem 1rem; border: 1.5px solid #e1e6eb; border-radius: calc(var(--radius) * .66); transition: border-color .15s, background .15s; }
.po-row.active { border-color: var(--c-primary); background: rgba(var(--c-primary-rgb), .06); }
.po-info { grid-area: info; display: flex; flex-direction: column; cursor: pointer; margin: 0; }
.po-info strong { color: var(--c-secondary); }
.po-info small { color: #6b7785; line-height: 1.35; }
.po-price { grid-area: price; font-weight: 800; color: var(--c-secondary); text-align: right; }
.po-row .qty-control { grid-area: qty; }
.qty-control.qty-sm { max-width: 8.5rem; }
.qty-control.qty-sm .btn { width: 38px; font-size: 1.05rem; padding: .2rem; }
.qty-control.qty-sm input { padding: .25rem; }
@media (max-width: 420px) { .po-row { grid-template-columns: 1fr; grid-template-areas: "info" "price" "qty"; } .po-price { text-align: left; } }
.yappy-btn { background: #0a4cff; border-color: #0a4cff; color: #fff; font-weight: 700; }
.yappy-btn:hover, .yappy-btn:focus { background: #003ad6; border-color: #003ad6; color: #fff; }
.pay-or { display: flex; align-items: center; gap: .75rem; color: #6b7785; font-size: .85rem; margin: 1rem 0; }
.pay-or::before, .pay-or::after { content: ""; flex: 1; border-top: 1px solid #e1e6eb; }
.charge-card .card-img-top { aspect-ratio: 16/9; object-fit: cover; }

/* Ficha del paciente en el registro */
.patient-card { border: 1.5px dashed rgba(var(--c-secondary-rgb), .25); border-radius: calc(var(--radius) * .75); padding: 1rem 1.1rem 1.2rem; background: rgba(var(--c-secondary-rgb), .025); }
.patient-card legend { float: none; width: auto; padding: 0 .35rem; margin-left: -.35rem; color: var(--c-secondary); font-weight: 700; }
/* Evita desbordamiento horizontal en celulares con filas de separación amplia */
@media (max-width: 991.98px) { .row.g-5, .row.gx-5 { --bs-gutter-x: 1.5rem; } }

/* Ventana Donar con Yappy */
.yappy-donate { border-radius: calc(var(--radius) * 1.2); }
.yappy-donate .amount-chips { display: flex; flex-wrap: wrap; gap: .5rem; }
.yappy-donate .yd-more summary { cursor: pointer; color: var(--c-secondary); }
.footer .yappy-btn, .site-footer .yappy-btn { box-shadow: none; }
