/* ===== Sitio público ===== */
body.public { background: var(--paper); }
body.public h1, body.public h2 { font-family: var(--font-display); font-weight: 700; letter-spacing: -.01em; }
.skip-link { position: absolute; left: -999px; top: 0; background: var(--navy); color: var(--white); padding: .5rem 1rem; z-index: 100; }
.skip-link:focus { left: 0; }

/* Encabezado */
.site-header { background: rgba(255, 255, 255, .92); backdrop-filter: blur(10px); position: sticky; top: 0; z-index: 50; transition: box-shadow .2s; }
.site-header.scrolled { box-shadow: 0 4px 20px rgba(15, 42, 92, .1); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-block: .6rem; }
.brand { display: flex; align-items: center; gap: .75rem; text-decoration: none; color: var(--navy); min-width: 0; }
.brand-logo { width: 50px; height: 50px; object-fit: contain; flex: none; }
.brand-fallback { display: grid; place-items: center; background: var(--navy); color: var(--white); border-radius: 12px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.brand-text strong { font-size: .95rem; font-weight: 800; }
.brand-text small { color: var(--gray-600); font-size: .8rem; }
.nav-toggle { display: none; background: var(--blue-tint); border: 0; border-radius: 12px; padding: .55rem; color: var(--navy); cursor: pointer; }
.nav-toggle .icon-close, .nav-toggle[aria-expanded="true"] .icon-open { display: none; }
.nav-toggle[aria-expanded="true"] .icon-close { display: block; }
.main-nav { display: flex; gap: .15rem; }
.main-nav a { position: relative; padding: .5rem .9rem; border-radius: 999px; text-decoration: none; color: var(--navy); font-weight: 700; font-size: .96rem; transition: background .15s; }
.main-nav a:hover { background: var(--blue-tint); }
.main-nav a.active { background: var(--navy); color: var(--white); }

/* Fondos decorativos (portada y encabezados internos) */
.hero, .page-hero { position: relative; overflow: hidden; color: var(--white); background: radial-gradient(1200px 500px at 85% -10%, #2b7bc4 0%, transparent 60%), linear-gradient(135deg, var(--navy-dark), var(--navy) 55%, var(--navy-soft)); }
.hero-bg span { position: absolute; border-radius: 50%; opacity: .16; }
.hero-bg span:nth-child(1) { width: 360px; height: 360px; right: -90px; top: -120px; background: var(--sun); }
.hero-bg span:nth-child(2) { width: 220px; height: 220px; left: -70px; bottom: -90px; background: var(--blue-soft); }
.hero-bg span:nth-child(3) { width: 90px; height: 90px; left: 46%; top: 14%; border: 12px solid var(--sun); background: none; opacity: .3; }
.hero::after, .page-hero::after { content: ""; position: absolute; inset: auto 0 -1px 0; height: 46px; background: var(--paper); clip-path: ellipse(75% 100% at 50% 100%); }
.hero h1, .page-hero h1 { color: var(--white); }

.hero { padding-block: clamp(2.5rem, 7vw, 5rem) clamp(4.5rem, 9vw, 6.5rem); }
.hero-inner { position: relative; display: grid; gap: 2.5rem; grid-template-columns: 1.4fr 1fr; align-items: center; }
.hero h1 { font-size: clamp(2rem, 4.6vw, 3.2rem); line-height: 1.1; margin-bottom: .8rem; }
.eyebrow { display: inline-flex; align-items: center; gap: .5rem; background: rgba(255, 255, 255, .12); border: 1px solid rgba(255, 255, 255, .25); padding: .3rem .9rem; border-radius: 999px; font-weight: 800; font-size: .8rem; letter-spacing: .1em; text-transform: uppercase; color: var(--sun); margin-bottom: 1rem; }
.hero-lema { font-family: var(--font-display); font-style: italic; font-size: clamp(1.1rem, 2vw, 1.4rem); color: var(--sun); margin-bottom: 1.2rem; }
.hero-copy { max-width: 58ch; color: #dbe7f7; }
.hero-copy .pendiente { background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .35); color: #dbe7f7; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.5rem; }
.hero-art { display: grid; place-items: center; }
.hero-logo { background: var(--white); border-radius: 50%; padding: 1.6rem; width: clamp(180px, 26vw, 300px); aspect-ratio: 1; display: grid; place-items: center; box-shadow: 0 0 0 10px rgba(255, 255, 255, .14), 0 0 0 22px rgba(255, 255, 255, .07), var(--shadow-lg); color: var(--navy); animation: float 6s ease-in-out infinite; }
.hero-logo img { max-height: 100%; object-fit: contain; }
.icon-xl { width: 3.2rem; height: 3.2rem; }
@keyframes float { 50% { transform: translateY(-10px); } }

/* Banda de datos */
.info-band { margin-top: -2.2rem; position: relative; z-index: 2; }
.info-cards { list-style: none; margin: 0; padding: 0; display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
.info-cards li { display: flex; align-items: center; gap: .9rem; background: var(--white); padding: 1rem 1.2rem; border-radius: var(--radius); box-shadow: var(--shadow); }
.info-cards small { display: block; color: var(--gray-600); font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.info-cards strong { color: var(--navy); line-height: 1.25; display: block; }
.info-ico, .quick-ico, .mv-ico { display: grid; place-items: center; flex: none; width: 46px; height: 46px; border-radius: 14px; background: var(--sun-tint); color: var(--sun-dark); }
.info-ico .icon { width: 1.4rem; height: 1.4rem; }

/* Encabezado de páginas internas */
.page-hero { padding-block: 2.2rem 4.2rem; }
.page-hero-inner { position: relative; }
.crumbs { display: flex; gap: .5rem; font-size: .85rem; color: var(--blue-soft); margin-bottom: .6rem; font-weight: 700; }
.crumbs a { color: var(--blue-soft); text-decoration: none; }
.crumbs a:hover { color: var(--white); }
.page-hero p { margin: 0; color: #cfe0f5; font-size: 1.1rem; }

/* Secciones */
.section { padding-block: clamp(2.5rem, 6vw, 4.2rem); }
.section-tint { background: linear-gradient(180deg, var(--blue-tint), #f4f9fe); }
.kicker { color: var(--sun-dark); font-weight: 800; text-transform: uppercase; letter-spacing: .12em; font-size: .78rem; margin-bottom: .2rem; }
.section-title { position: relative; padding-bottom: .7rem; margin-bottom: 1.4rem; }
.section-title::after { content: ""; position: absolute; left: 0; bottom: 0; width: 54px; height: 4px; background: var(--sun); border-radius: 4px; }
.section-title-center::after, .center .section-title::after { left: 50%; transform: translateX(-50%); }
.section-intro { margin-bottom: 1rem; }
.section-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; }
.more { display: inline-flex; align-items: center; gap: .35rem; font-weight: 800; text-decoration: none; color: var(--blue); }
.more:hover { color: var(--navy); }
.more:hover .icon { transform: translateX(3px); }
.more .icon { transition: transform .15s; width: 1.05em; height: 1.05em; }

.grid { display: grid; gap: 1.1rem; }
.grid-3 { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.group-space { margin-bottom: 2.25rem; }
.two-col { display: grid; gap: 2.5rem; grid-template-columns: 1fr 1fr; }
.two-col-wide { grid-template-columns: 2fr 1fr; }
.stack { display: grid; gap: 1.1rem; }

/* Accesos rápidos */
.quick-link { position: relative; display: flex; flex-direction: column; gap: .35rem; background: var(--white); padding: 1.5rem; border-radius: var(--radius); text-decoration: none; color: var(--text); box-shadow: var(--shadow-sm); border: 1px solid var(--gray-100); transition: transform .2s, box-shadow .2s; overflow: hidden; }
.quick-link:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); }
.quick-link strong { color: var(--navy); font-size: 1.2rem; font-family: var(--font-display); }
.quick-desc { color: var(--gray-600); font-size: .95rem; }
.quick-ico { margin-bottom: .6rem; }
.quick-go { position: absolute; right: 1.2rem; bottom: 1.2rem; color: var(--gray-300); transition: color .2s, transform .2s; }
.quick-link:hover .quick-go { color: var(--navy); transform: translateX(4px); }
.tone-blue .quick-ico { background: var(--blue-tint); color: var(--blue); }
.tone-sun .quick-ico { background: var(--sun-tint); color: var(--sun-dark); }
.tone-coral .quick-ico { background: #fdebe7; color: var(--coral); }
.tone-leaf .quick-ico { background: #e3f5ec; color: var(--leaf); }

/* Información de contacto y fotos */
.contact-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 1rem; }
.contact-list li { display: flex; gap: .9rem; align-items: flex-start; }
.contact-list > li > .icon { width: 2.4rem; height: 2.4rem; padding: .55rem; border-radius: 12px; background: var(--white); color: var(--blue); box-shadow: var(--shadow-sm); }
.contact-list small { display: block; color: var(--gray-600); font-weight: 700; font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; }
.photo-strip { display: grid; grid-template-columns: 2fr 1fr; grid-template-rows: 1fr 1fr; gap: .6rem; margin-bottom: 1rem; }
.photo-strip img { width: 100%; height: 100%; object-fit: cover; border-radius: 14px; min-height: 120px; }
.photo-strip img:first-child { grid-row: span 2; }
.photo-placeholder { display: grid; place-content: center; justify-items: center; text-align: center; gap: .35rem; min-height: 200px; padding: 1rem; border: 2px dashed var(--gray-300); border-radius: var(--radius); background: var(--white); color: var(--gray-600); }

/* Avisos y eventos */
.meta { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; color: var(--gray-600); font-size: .86rem; margin-bottom: .5rem; }
.meta time { display: inline-flex; align-items: center; gap: .35rem; }
.meta .icon { width: 1em; height: 1em; }
.tag { background: var(--blue-tint); color: var(--navy); padding: .15rem .7rem; border-radius: 999px; font-weight: 800; font-size: .78rem; }
.aviso-card { position: relative; padding-left: 1.7rem; transition: transform .2s, box-shadow .2s; }
.aviso-card::before { content: ""; position: absolute; left: 0; top: 14px; bottom: 14px; width: 5px; border-radius: 0 5px 5px 0; background: var(--blue); }
.aviso-card[data-cat="comunicados"]::before { background: var(--sun); }
.aviso-card[data-cat="noticias"]::before { background: var(--coral); }
.aviso-card[data-cat="avisos-generales"]::before { background: var(--leaf); }
.aviso-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.aviso-card h3 { margin-bottom: .35rem; font-size: 1.2rem; }
.aviso-card h3 a { color: var(--navy); text-decoration: none; }
.aviso-card h3 a:hover { color: var(--blue); }
.filters { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1.4rem; }
.filters a { padding: .4rem 1rem; background: var(--white); border: 1.5px solid var(--gray-300); border-radius: 999px; text-decoration: none; color: var(--navy); font-weight: 700; font-size: .9rem; transition: all .15s; }
.filters a.active, .filters a:hover { background: var(--navy); color: var(--white); border-color: var(--navy); }
.back-link { display: inline-flex; align-items: center; gap: .4rem; font-weight: 800; text-decoration: none; }
.icon-flip { transform: scaleX(-1); }
.article h1 { margin-top: .4rem; font-size: clamp(1.8rem, 3.5vw, 2.5rem); }
.lead { font-size: 1.15rem; color: var(--gray-600); }
.prose p { max-width: 68ch; }
.article { background: var(--white); padding: clamp(1.4rem, 4vw, 2.5rem); border-radius: var(--radius); box-shadow: var(--shadow); }
.events { list-style: none; margin: 0; padding: 0; display: grid; gap: .9rem; }
.event { display: flex; gap: .9rem; background: var(--white); padding: .9rem; border-radius: var(--radius); box-shadow: var(--shadow-sm); border: 1px solid var(--gray-100); }
.event-date { flex: none; width: 58px; text-align: center; background: linear-gradient(160deg, var(--navy), var(--navy-soft)); color: var(--white); border-radius: 12px; padding: .4rem 0; line-height: 1.1; }
.event-date strong { display: block; font-size: 1.45rem; font-family: var(--font-display); }
.event-date span { text-transform: uppercase; font-size: .72rem; letter-spacing: .08em; color: var(--sun); font-weight: 800; }
.event-body small { display: block; color: var(--gray-600); }
.event-body p { margin: .25rem 0 0; font-size: .92rem; }

/* Nosotros */
.content-block { margin-bottom: 0; }
.mv-card { background: var(--white); padding: 2rem; border-radius: var(--radius); box-shadow: var(--shadow); border-top: 5px solid var(--blue); }
.mv-vision { border-top-color: var(--sun); }
.mv-card .mv-ico { margin-bottom: 1rem; width: 54px; height: 54px; background: var(--blue-tint); color: var(--blue); }
.mv-vision .mv-ico { background: var(--sun-tint); color: var(--sun-dark); }
.values { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 1rem; list-style: none; padding: 0; margin: 0; }
.values li { display: flex; align-items: center; gap: .8rem; padding: 1rem 1.2rem; background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow-sm); font-weight: 800; color: var(--navy); border: 1px solid var(--gray-100); }
.v-ico { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 12px; background: var(--blue-tint); color: var(--blue); flex: none; }
.v-1 .v-ico { background: var(--sun-tint); color: var(--sun-dark); }
.v-2 .v-ico { background: #fdebe7; color: var(--coral); }
.v-3 .v-ico { background: #e3f5ec; color: var(--leaf); }

/* Personal (página sin enlace en el menú) */
.person-card { text-align: center; }
.avatar { width: 68px; height: 68px; border-radius: 50%; margin: 0 auto .75rem; display: grid; place-items: center; background: var(--blue-tint); color: var(--navy); font-weight: 800; font-size: 1.3rem; border: 3px solid var(--sun); }
.person-card h3 { margin-bottom: .15rem; }
.person-card .role { margin: 0; color: var(--brown); font-weight: 700; }
.person-card .detail { margin: .25rem 0 0; color: var(--gray-600); font-size: .9rem; }

/* Ubicación y galería */
.address-card { display: flex; gap: 1rem; font-style: normal; background: var(--white); padding: 1.3rem; border-radius: var(--radius); box-shadow: var(--shadow-sm); margin-bottom: 1.4rem; line-height: 1.7; }
.address-card strong { display: block; color: var(--navy); }
.address-ico { display: grid; place-items: center; flex: none; width: 46px; height: 46px; border-radius: 14px; background: #fdebe7; color: var(--coral); }
.two-col-map { grid-template-columns: 1fr 1.2fr; }
.map-frame { border-radius: var(--radius); overflow: hidden; aspect-ratio: 4 / 3; background: var(--gray-100); box-shadow: var(--shadow); margin-bottom: .6rem; }
.map-frame iframe { width: 100%; height: 100%; border: 0; display: block; }
.gallery { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); grid-auto-flow: dense; }
.gallery figure { margin: 0; position: relative; overflow: hidden; border-radius: var(--radius); box-shadow: var(--shadow-sm); background: var(--white); }
.gallery figure:nth-child(6n+1) { grid-column: span 2; }
.gallery a { display: block; overflow: hidden; }
.gallery img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; transition: transform .4s; }
.gallery figure:hover img { transform: scale(1.06); }
.gallery figcaption { font-size: .9rem; color: var(--gray-600); padding: .6rem .9rem .8rem; }
.lightbox { position: fixed; inset: 0; background: rgba(8, 26, 61, .94); display: grid; place-items: center; padding: 1rem; z-index: 200; cursor: zoom-out; animation: fade .2s; }
.lightbox img { max-height: 92vh; max-width: 96vw; object-fit: contain; border-radius: 10px; }
@keyframes fade { from { opacity: 0; } }

/* Llamado a la acción */
.cta { padding-block: 0 3.5rem; }
.cta-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.2rem; background: linear-gradient(135deg, var(--navy), var(--navy-soft)); color: var(--white); padding: clamp(1.6rem, 4vw, 2.6rem); border-radius: 22px; box-shadow: var(--shadow-lg); }
.cta h2 { color: var(--white); margin-bottom: .3rem; }
.cta p { margin: 0; color: #cfe0f5; max-width: 52ch; }

/* Pie */
.site-footer { background: var(--navy-dark); color: #cdd9ee; position: relative; margin-top: 2rem; }
.footer-wave { position: absolute; inset: -1px 0 auto 0; height: 34px; background: var(--paper); clip-path: ellipse(75% 100% at 50% 0); }
.site-footer a { color: var(--blue-soft); }
.site-footer h3 { color: var(--white); font-size: 1rem; text-transform: uppercase; letter-spacing: .08em; }
.footer-grid { display: grid; gap: 2.2rem; grid-template-columns: 1.3fr 1.2fr 1fr; padding-block: 4.2rem 2.2rem; }
.footer-brand { display: flex; align-items: center; gap: .7rem; color: var(--white); }
.footer-logo { width: 46px; height: 46px; object-fit: contain; background: var(--white); border-radius: 50%; padding: 3px; }
.footer-lema { font-family: var(--font-display); font-style: italic; color: var(--sun); margin: .8rem 0; }
.social { display: inline-flex; align-items: center; gap: .5rem; text-decoration: none; font-weight: 700; }
.footer-list, .footer-links { list-style: none; padding: 0; margin: .6rem 0 0; display: grid; gap: .65rem; }
.footer-list li { display: flex; gap: .7rem; align-items: flex-start; }
.footer-list .icon { color: var(--sun); margin-top: .2rem; }
.footer-links a { text-decoration: none; }
.footer-links a:hover { color: var(--white); text-decoration: underline; }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, .12); font-size: .875rem; }
.footer-bottom .container { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem; padding-block: 1rem; }

/* Animación de entrada (la activa app.js; sin JS todo se ve normal) */
.will-reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.will-reveal.is-in { opacity: 1; transform: none; }

/* Adaptable */
@media (max-width: 900px) {
    .two-col, .two-col-wide, .two-col-map, .hero-inner, .footer-grid { grid-template-columns: 1fr; }
    .hero-art { order: -1; }
    .hero-logo { width: 150px; padding: 1rem; }
    .nav-toggle { display: block; }
    .main-nav { display: none; position: absolute; left: 0; right: 0; top: 100%; flex-direction: column; background: var(--white); padding: .5rem 1.25rem 1.2rem; box-shadow: 0 14px 24px rgba(15, 42, 92, .14); }
    .main-nav.open { display: flex; }
    .main-nav a { padding: .8rem 1rem; }
    .gallery figure:nth-child(6n+1) { grid-column: auto; }
}
@media (max-width: 480px) {
    .brand-logo { width: 42px; height: 42px; }
    .brand-text strong { font-size: .82rem; }
    .section-head { flex-direction: column; align-items: flex-start; }
}

.hero-logo img { border-radius: 50%; }
