/* ==========================================================
   Casibare II · Sitio público
   Colores tomados del logo: verde lima + azul marino
   ========================================================== */
:root {
    --green: #8cc63f;
    --green-dark: #6e9f2c;
    --green-soft: #eef7e2;
    --navy: #1c2039;
    --navy-2: #262b4a;
    --navy-3: #343a5e;
    --ink: #2b2f42;
    --muted: #6b7088;
    --line: #e4e7ee;
    --bg: #f5f7f3;
    --white: #ffffff;
    --danger: #e0473c;
    --radius: 10px;
    --shadow: 0 10px 30px rgba(28, 32, 57, .08);
    --shadow-lg: 0 20px 50px rgba(28, 32, 57, .15);
    --header-h: 84px;
    --font-head: 'Montserrat', system-ui, sans-serif;
    --font-body: 'Inter', system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 10px); }
body { margin: 0; font-family: var(--font-body); color: var(--ink); background: var(--white); line-height: 1.6; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { font-family: var(--font-head); margin: 0 0 .5em; line-height: 1.2; color: var(--navy); }
p { margin: 0 0 1em; }
.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 20px; }
[hidden] { display: none !important; }
.skip-link { position: absolute; left: 12px; top: -60px; z-index: 200; background: var(--navy); color: var(--white); padding: 10px 16px; border-radius: 6px; font-weight: 600; transition: top .2s; }
.skip-link:focus { top: 12px; }
:focus-visible { outline: 3px solid var(--green); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }

/* ---------- Botones ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 13px 26px; border-radius: 6px; border: 2px solid transparent; font-family: var(--font-head); font-weight: 700; font-size: .85rem; letter-spacing: .04em; text-transform: uppercase; cursor: pointer; transition: all .25s; }
.btn-primary { background: var(--green); color: var(--navy); }
.btn-primary:hover { background: var(--green-dark); color: var(--white); transform: translateY(-2px); }
.btn-outline { border-color: var(--navy); color: var(--navy); background: transparent; }
.btn-outline:hover { background: var(--navy); color: var(--white); }
.btn-sm { padding: 8px 14px; font-size: .72rem; }

/* ---------- Topbar ---------- */
.topbar { background: var(--navy); color: #c9cde0; font-size: .8rem; }
.topbar-inner { display: flex; gap: 26px; justify-content: flex-end; padding: 7px 20px; flex-wrap: wrap; }
.topbar i { color: var(--green); margin-right: 6px; }

/* ---------- Header ---------- */
.site-header { position: sticky; top: 0; z-index: 100; background: var(--white); box-shadow: 0 2px 18px rgba(28, 32, 57, .08); border-bottom: 3px solid var(--green); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: var(--header-h); }
.brand img { height: 62px; width: auto; object-fit: contain; }
.main-nav { display: flex; gap: 6px; align-items: center; }
.main-nav a { position: relative; padding: 10px 16px; font-family: var(--font-head); font-weight: 700; font-size: .82rem; text-transform: uppercase; letter-spacing: .03em; color: var(--navy); border-radius: 6px; transition: color .2s, background .2s; }
.main-nav a i { color: var(--green-dark); margin-right: 6px; }
.main-nav a::after { content: ''; position: absolute; left: 16px; right: 16px; bottom: 4px; height: 3px; background: var(--green); transform: scaleX(0); transition: transform .25s; border-radius: 2px; }
.main-nav a:hover::after, .main-nav a.active::after { transform: scaleX(1); }

.header-cta { display: flex; align-items: center; gap: 12px; }
.btn-whatsapp { display: flex; align-items: center; gap: 10px; background: var(--navy); color: var(--white); padding: 7px 18px 7px 7px; border-radius: 50px; transition: transform .25s, box-shadow .25s; box-shadow: 0 6px 18px rgba(28, 32, 57, .25); }
.btn-whatsapp:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(37, 211, 102, .35); }
.wa-icon { width: 42px; height: 42px; border-radius: 50%; background: #25d366; display: grid; place-items: center; font-size: 1.45rem; color: var(--white); }
.wa-text { display: flex; flex-direction: column; line-height: 1.15; }
.wa-text small { font-size: .68rem; color: var(--green); font-weight: 600; }
.wa-text strong { font-family: var(--font-head); font-size: .9rem; }

.nav-toggle { display: none; width: 44px; height: 44px; border: 0; background: var(--green-soft); border-radius: 8px; cursor: pointer; flex-direction: column; justify-content: center; align-items: center; gap: 5px; }
.nav-toggle span { width: 22px; height: 2px; background: var(--navy); transition: .3s; }
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Avisos ---------- */
.avisos { background: linear-gradient(90deg, var(--navy) 0%, var(--navy-2) 100%); padding: 26px 0; }
.avisos-head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.avisos-head h2 { color: var(--white); font-size: 1rem; text-transform: uppercase; letter-spacing: .08em; margin: 0; }
.avisos-pulse { width: 12px; height: 12px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 0 rgba(140, 198, 63, .7); animation: pulse 1.8s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 12px rgba(140, 198, 63, 0); } 100% { box-shadow: 0 0 0 0 rgba(140, 198, 63, 0); } }
.avisos-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 14px; }
.aviso { display: flex; gap: 14px; background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .1); border-left: 5px solid var(--green); border-radius: var(--radius); padding: 16px 18px; color: #e3e6f2; }
.aviso-icon { flex: 0 0 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--green); color: var(--navy); font-size: 1.1rem; }
.aviso h3 { color: var(--white); font-size: 1rem; margin: 2px 0 6px; }
.aviso p { margin: 0; font-size: .9rem; }
.aviso-tag { display: inline-block; font-size: .65rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--green); }
.aviso-urgente { border-left-color: var(--danger); background: rgba(224, 71, 60, .12); }
.aviso-urgente .aviso-icon { background: var(--danger); color: var(--white); animation: shake 2.5s infinite; }
.aviso-urgente .aviso-tag { color: #ff8a80; }
.aviso-asamblea { border-left-color: #f5b82e; }
.aviso-asamblea .aviso-icon { background: #f5b82e; }
.aviso-asamblea .aviso-tag { color: #f5b82e; }
@keyframes shake { 0%, 90%, 100% { transform: rotate(0); } 92% { transform: rotate(-12deg); } 96% { transform: rotate(12deg); } }

/* ---------- Carrusel (hero) ---------- */
.hero { position: relative; background: var(--navy); overflow: hidden; }
.hero-track { position: relative; height: clamp(260px, 42vw, 580px); }
.hero-slide { position: absolute; inset: 0; opacity: 0; visibility: hidden; transition: opacity .9s ease, visibility .9s; }
.hero-slide.is-active { opacity: 1; visibility: visible; }
.hero-slide img { width: 100%; height: 100%; object-fit: cover; object-position: center; transform: scale(1.06); transition: transform 7s ease; }
.hero-slide.is-active img { transform: scale(1); }
.hero-slide::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(28, 32, 57, .75) 0%, rgba(28, 32, 57, .25) 55%, rgba(28, 32, 57, 0) 100%); pointer-events: none; }
.hero-caption { position: absolute; left: 0; right: 0; bottom: 18%; z-index: 2; color: var(--white); }
.hero-caption h1, .hero-caption h2 { color: var(--white); font-size: clamp(1.6rem, 4.2vw, 3.4rem); font-weight: 900; text-transform: uppercase; max-width: 640px; margin-bottom: 12px; text-shadow: 0 3px 16px rgba(0, 0, 0, .3); }
.hero-caption h1::after, .hero-caption h2::after { content: ''; display: block; width: 80px; height: 5px; background: var(--green); margin-top: 14px; border-radius: 3px; }
.hero-caption p { font-size: clamp(.95rem, 1.6vw, 1.15rem); max-width: 520px; color: #e1e4f0; }
.hero-fallback { position: relative; height: clamp(260px, 38vw, 500px); background: radial-gradient(circle at 80% 20%, rgba(140, 198, 63, .35), transparent 45%), linear-gradient(135deg, var(--navy) 0%, var(--navy-3) 100%); }
.hero-fallback::after { display: none; }
.hero-nav { position: absolute; top: 50%; transform: translateY(-50%); z-index: 3; width: 48px; height: 48px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .6); background: rgba(28, 32, 57, .35); color: var(--white); cursor: pointer; font-size: 1rem; transition: .25s; }
.hero-nav:hover { background: var(--green); border-color: var(--green); color: var(--navy); }
.hero-nav.prev { left: 20px; }
.hero-nav.next { right: 20px; }
.hero-dots { position: absolute; bottom: 22px; left: 50%; transform: translateX(-50%); z-index: 3; display: flex; gap: 10px; }
.hero-dots button { width: 12px; height: 12px; border-radius: 10px; border: 0; background: rgba(255, 255, 255, .5); cursor: pointer; transition: .3s; padding: 0; }
.hero-dots button.is-active { width: 34px; background: var(--green); }

/* ---------- Secciones genéricas ---------- */
.section { padding: 80px 0; }
.section-head { margin-bottom: 44px; }
.section-head.center { text-align: center; }
.eyebrow { display: inline-flex; align-items: center; gap: 10px; font-family: var(--font-head); font-size: .75rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--green-dark); margin-bottom: 10px; }
.eyebrow::before { content: ''; width: 28px; height: 3px; background: var(--green); border-radius: 2px; }
.eyebrow.light { color: var(--green); }
.section-title { font-size: clamp(1.5rem, 3vw, 2.3rem); font-weight: 800; text-transform: uppercase; letter-spacing: .01em; }
.section-title .hl { color: var(--green); }
.section-title.light { color: var(--white); }
.section-sub { color: var(--muted); max-width: 640px; margin: 0 auto; }
.section-sub.left { margin: 0 0 1em; }
.section-sub.light { color: #c4c8db; }

/* ---------- Cards (lema) ---------- */
.servicios { background: var(--bg); }
.cards-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 22px; }
.info-card { position: relative; background: var(--white); border-radius: var(--radius); padding: 34px 24px 30px; text-align: center; box-shadow: var(--shadow); transition: transform .3s, box-shadow .3s; overflow: hidden; border: 1px solid var(--line); }
.info-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.info-card-icon { width: 78px; height: 78px; margin: 0 auto 18px; border-radius: 50%; display: grid; place-items: center; background: var(--green-soft); color: var(--navy); font-size: 1.9rem; transition: .3s; overflow: hidden; }
.info-card:hover .info-card-icon { background: var(--green); }
.info-card-icon.has-img { width: 100%; height: 150px; border-radius: 8px; background: var(--bg); }
.info-card-icon.has-img img { width: 100%; height: 100%; object-fit: cover; }
.info-card h3 { font-size: 1rem; text-transform: uppercase; letter-spacing: .02em; }
.info-card p { font-size: .9rem; color: var(--muted); margin: 0; }
.info-card-bar { position: absolute; left: 50%; bottom: 0; transform: translateX(-50%); width: 50px; height: 4px; background: var(--green); border-radius: 4px 4px 0 0; transition: width .3s; }
.info-card:hover .info-card-bar { width: 100%; }

/* ---------- Mapa ---------- */
.mapa { background: var(--navy); }
.mapa-head { padding: 60px 0 40px; text-align: center; background: radial-gradient(circle at 15% 30%, rgba(140, 198, 63, .18), transparent 40%), var(--navy); }
.mapa-head .section-sub { margin: 0 auto; }
.mapa-frame { width: 100%; height: clamp(320px, 45vw, 480px); line-height: 0; border-top: 4px solid var(--green); }
.mapa-frame iframe { width: 100%; height: 100%; border: 0; filter: saturate(1.05); }

/* ---------- Horario ---------- */
.horario-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 50px; align-items: center; }
.contact-list { list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 14px; }
.contact-list li { display: flex; align-items: center; gap: 14px; font-weight: 500; }
.contact-list i { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; background: var(--green-soft); color: var(--green-dark); flex: 0 0 42px; }
.horario-card { background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow-lg); overflow: hidden; border-top: 5px solid var(--green); }
.horario-card-head { display: flex; align-items: center; gap: 12px; padding: 20px 26px; background: var(--navy); color: var(--white); font-family: var(--font-head); font-weight: 800; text-transform: uppercase; letter-spacing: .06em; }
.horario-card-head i { color: var(--green); font-size: 1.4rem; }
.horario-row { display: flex; justify-content: space-between; gap: 16px; padding: 16px 26px; border-bottom: 1px dashed var(--line); }
.horario-row:last-child { border-bottom: 0; }
.horario-row .dia { font-weight: 700; color: var(--navy); }
.horario-row .hora { color: var(--muted); text-align: right; }
.horario-row .hora.closed { color: var(--danger); font-weight: 600; }

/* ---------- PQRS ---------- */
.pqrs { background: linear-gradient(180deg, var(--bg) 0%, #eceff3 100%); position: relative; }
.pqrs-grid { display: grid; grid-template-columns: 1fr 1.25fr; gap: 50px; align-items: start; }
.pqrs-types { list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 16px; }
.pqrs-types li { display: flex; gap: 14px; align-items: flex-start; }
.pqrs-types i { width: 44px; height: 44px; flex: 0 0 44px; border-radius: 10px; display: grid; place-items: center; background: var(--navy); color: var(--green); }
.pqrs-types strong { display: block; color: var(--navy); font-family: var(--font-head); }
.pqrs-types span { font-size: .88rem; color: var(--muted); }
.pqrs-form-wrap { background: var(--white); border-radius: var(--radius); padding: 34px; box-shadow: var(--shadow-lg); border-top: 5px solid var(--green); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field.full { grid-column: 1 / -1; }
.pqrs-form input, .pqrs-form select, .pqrs-form textarea { width: 100%; padding: 13px 14px; border: 1px solid var(--line); border-radius: 6px; font: inherit; font-size: .92rem; color: var(--ink); background: #fbfcfd; transition: border-color .2s, box-shadow .2s; }
.pqrs-form textarea { resize: vertical; min-height: 120px; }
.pqrs-form input:focus, .pqrs-form select:focus, .pqrs-form textarea:focus { outline: none; border-color: var(--green); box-shadow: 0 0 0 3px rgba(140, 198, 63, .2); background: var(--white); }
.pqrs-form .btn { margin-top: 8px; }
.form-note { font-size: .78rem; color: var(--muted); margin: 12px 0 0; }
.form-errors { background: #fdecea; border-left: 4px solid var(--danger); padding: 12px 16px; border-radius: 6px; margin-bottom: 16px; color: #8c2a22; font-size: .88rem; }
.form-errors p { margin: 3px 0; }
.form-success { text-align: center; padding: 20px 0; }
.form-success > i { font-size: 3.6rem; color: var(--green); margin-bottom: 12px; }
.form-success .radicado { display: inline-block; font-family: var(--font-head); font-size: 1.5rem; background: var(--green-soft); color: var(--navy); padding: 10px 22px; border-radius: 8px; margin: 4px 0 14px; letter-spacing: .05em; }
.muted { color: var(--muted); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- Página de documentos ---------- */
.page-hero { padding: 70px 0 60px; text-align: center; background: radial-gradient(circle at 85% 20%, rgba(140, 198, 63, .25), transparent 40%), linear-gradient(135deg, var(--navy), var(--navy-3)); }
.page-hero .section-sub { margin: 0 auto; }
.docs { background: var(--bg); min-height: 50vh; }
.docs-toolbar { display: flex; flex-wrap: wrap; gap: 16px; justify-content: space-between; align-items: center; margin-bottom: 30px; }
.docs-search { position: relative; flex: 1 1 280px; max-width: 420px; }
.docs-search i { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.docs-search input { width: 100%; padding: 13px 16px 13px 44px; border: 1px solid var(--line); border-radius: 50px; font: inherit; background: var(--white); }
.docs-search input:focus { outline: none; border-color: var(--green); box-shadow: 0 0 0 3px rgba(140, 198, 63, .2); }
.docs-filters { display: flex; flex-wrap: wrap; gap: 8px; }
.docs-filters button { border: 1px solid var(--line); background: var(--white); padding: 8px 16px; border-radius: 50px; font: inherit; font-size: .82rem; font-weight: 600; color: var(--navy); cursor: pointer; transition: .2s; }
.docs-filters button.is-active, .docs-filters button:hover { background: var(--navy); color: var(--white); border-color: var(--navy); }
.docs-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 20px; }
.doc-card { display: grid; grid-template-columns: 56px 1fr; grid-template-rows: 1fr auto; gap: 16px; background: var(--white); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); border: 1px solid var(--line); transition: transform .25s, box-shadow .25s; }
.doc-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.doc-icon { width: 56px; height: 64px; border-radius: 8px; display: grid; place-items: center; font-size: 1.8rem; background: var(--green-soft); color: var(--green-dark); }
.doc-icon.ext-pdf { background: #fdecea; color: #d93025; }
.doc-icon.ext-doc, .doc-icon.ext-docx { background: #e8f0fe; color: #1a73e8; }
.doc-icon.ext-xls, .doc-icon.ext-xlsx { background: #e6f4ea; color: #188038; }
.doc-icon.ext-ppt, .doc-icon.ext-pptx { background: #fef3e8; color: #e8710a; }
.doc-cat { font-size: .68rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--green-dark); }
.doc-body h3 { font-size: 1rem; margin: 4px 0 6px; }
.doc-body p { font-size: .86rem; color: var(--muted); margin-bottom: 8px; }
.doc-meta { font-size: .75rem; color: var(--muted); }
.doc-actions { grid-column: 1 / -1; display: flex; gap: 10px; padding-top: 14px; border-top: 1px solid var(--line); margin-top: auto; }
.doc-actions .btn { flex: 1; }
.empty-state { text-align: center; padding: 60px 20px; color: var(--muted); }
.empty-state i { font-size: 3.5rem; color: var(--green); margin-bottom: 14px; }
.empty-filter { text-align: center; color: var(--muted); padding: 30px 0; }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy); color: #c4c8db; border-top: 5px solid var(--green); }
.footer-inner { text-align: center; padding: 56px 20px 40px; }
.footer-logo { display: inline-block; background: var(--white); padding: 14px 26px; border-radius: 12px; box-shadow: 0 10px 30px rgba(0, 0, 0, .25); margin-bottom: 20px; }
.footer-logo img { height: 80px; width: auto; }
.footer-text { max-width: 560px; margin: 0 auto 30px; font-size: .92rem; }
.footer-data { font-style: normal; padding: 0; margin: 0 auto; display: flex; justify-content: center; flex-wrap: wrap; gap: 18px; max-width: 900px; }
.footer-data .footer-item { display: flex; align-items: center; gap: 14px; text-align: left; background: var(--navy-2); padding: 14px 22px; border-radius: 10px; border: 1px solid rgba(255, 255, 255, .06); min-width: 230px; }
.footer-data i { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; background: var(--green); color: var(--navy); flex: 0 0 42px; }
.footer-data small { display: block; font-size: .7rem; text-transform: uppercase; letter-spacing: .1em; color: var(--green); font-weight: 700; }
.footer-data strong { color: var(--white); font-size: .95rem; }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, .08); font-size: .8rem; }
.footer-bottom-inner { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; padding: 16px 20px; }
.footer-bottom a:hover { color: var(--green); }

.wa-float { position: fixed; right: 22px; bottom: 22px; z-index: 90; width: 58px; height: 58px; border-radius: 50%; background: #25d366; color: var(--white); display: grid; place-items: center; font-size: 1.9rem; box-shadow: 0 10px 25px rgba(37, 211, 102, .45); transition: transform .25s; }
.wa-float:hover { transform: scale(1.08); }

/* ---------- Animación de aparición ---------- */
.reveal { transition: opacity .7s ease, transform .5s ease, box-shadow .3s ease; }
.reveal:not(.visible) { opacity: 0; transform: translateY(24px); }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
    .main-nav a { padding: 10px 10px; font-size: .76rem; }
    .wa-text small { display: none; }
}
@media (max-width: 900px) {
    :root { --header-h: 72px; }
    .brand img { height: 50px; }
    .nav-toggle { display: flex; }
    .main-nav { position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 0; background: var(--white); box-shadow: 0 12px 24px rgba(28, 32, 57, .12); max-height: 0; overflow: hidden; transition: max-height .35s ease; }
    .main-nav.open { max-height: 320px; }
    .main-nav a { padding: 16px 24px; border-bottom: 1px solid var(--line); border-radius: 0; font-size: .85rem; }
    .main-nav a::after { display: none; }
    .horario-grid, .pqrs-grid { grid-template-columns: 1fr; gap: 34px; }
    .section { padding: 60px 0; }
    .hide-sm { display: none; }
}
@media (max-width: 600px) {
    .topbar-inner { justify-content: center; gap: 14px; font-size: .74rem; }
    .wa-text { display: none; }
    .btn-whatsapp { padding: 5px; }
    .form-row { grid-template-columns: 1fr; }
    .pqrs-form-wrap { padding: 24px 18px; }
    .hero-nav { width: 38px; height: 38px; }
    .hero-nav.prev { left: 10px; }
    .hero-nav.next { right: 10px; }
    .footer-data .footer-item { min-width: 100%; }
    .docs-grid { grid-template-columns: 1fr; }
    .horario-row { flex-direction: column; gap: 2px; }
    .horario-row .hora { text-align: left; }
}
