/*
Theme Name: Alcaldia Diaz
Theme URI: https://www.jcalcaldediaz.com
Author: Luvatec
Description: Tema institucional personalizado para la Junta Comunal de Alcalde Diaz.
Version: 1.2.0
Text Domain: alcaldia-diaz
*/

:root {
  --red: #D8232A;
  --red-dark: #A5121B;
  --red-deep: #7A0E14;
  --green: #8CC63F;
  --green-dark: #5D8F22;
  --yellow: #F6C90E;
  --blue: #1B9BD8;
  --teal: #1FA0A8;
  --ink: #231F20;
  --muted: #5F6672;
  --paper: #F8F7F4;
  --white: #ffffff;
  --line: #E8E4DE;
  --radius: 16px;
  --radius-sm: 9px;
  --shadow: 0 16px 38px rgba(122, 14, 20, 0.11);
  --shadow-soft: 0 7px 22px rgba(35, 31, 32, 0.06);
  --font-body: "Public Sans", Arial, Helvetica, sans-serif;
  --font-head: "Archivo", "Public Sans", Arial, sans-serif;
  --container: 1140px;
}

/* ---------- Base ---------- */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--white); font-family: var(--font-body); font-size: 16px; line-height: 1.6; -webkit-font-smoothing: antialiased; }
h1, h2, h3, h4 { font-family: var(--font-head); line-height: 1.18; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--red); text-decoration: none; transition: color .15s ease; }
a:hover { color: var(--red-dark); }
::selection { background: var(--red); color: var(--white); }
.container { width: min(var(--container), calc(100% - 40px)); margin-inline: auto; }
.screen-reader-text { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.icon { flex-shrink: 0; vertical-align: -3px; }

.skip-link { position: absolute; top: -60px; left: 16px; z-index: 100; padding: 11px 18px; border-radius: 0 0 var(--radius-sm) var(--radius-sm); background: var(--red-deep); color: var(--white); font-weight: 700; font-size: 14px; transition: top .18s ease; }
.skip-link:focus { top: 0; color: var(--white); }

:focus-visible { outline: 3px solid rgba(216, 35, 42, .45); outline-offset: 2px; border-radius: 4px; }

/* ---------- Botones ---------- */
.button { display: inline-flex; align-items: center; justify-content: center; gap: 9px; padding: 14px 26px; border-radius: 10px; background: var(--yellow); color: var(--ink); font-family: var(--font-head); font-weight: 700; font-size: 15px; letter-spacing: .02em; border: 0; cursor: pointer; box-shadow: 0 6px 16px rgba(246, 201, 14, .35); transition: transform .16s ease, box-shadow .16s ease, background .16s ease; }
.button:hover { background: #ffd92e; color: var(--ink); transform: translateY(-2px); box-shadow: 0 11px 24px rgba(246, 201, 14, .45); }
.button:active { transform: translateY(0); }
.button-outline { background: transparent; color: var(--white); border: 2px solid rgba(255, 255, 255, .65); box-shadow: none; }
.button-outline:hover { background: rgba(255, 255, 255, .14); color: var(--white); box-shadow: none; }
.button-small { padding: 11px 17px; font-size: 13px; box-shadow: none; }

/* ---------- Barra superior ---------- */
.topbar { background: var(--red-deep); color: #f6dada; font-size: 13px; }
.topbar .container { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 8px 0; }
.topbar a { display: inline-flex; align-items: center; gap: 7px; color: var(--white); font-weight: 600; }
.topbar a:hover { color: var(--yellow); }
.topbar a + a { margin-left: 18px; }
.topbar .topbar-lema { display: inline-flex; align-items: center; gap: 8px; color: var(--yellow); font-weight: 700; letter-spacing: .08em; text-transform: uppercase; font-size: 11.5px; }
.topbar-social { display: inline-flex; align-items: center; margin-left: 16px; opacity: .92; }

/* ---------- Encabezado ---------- */
.site-header { position: sticky; top: 0; z-index: 20; background: var(--white); border-bottom: 4px solid var(--red); box-shadow: 0 4px 18px rgba(35, 31, 32, .06); transition: box-shadow .2s ease; }
.site-header.is-scrolled { box-shadow: 0 8px 26px rgba(35, 31, 32, .13); }
.header-inner { display: flex; align-items: center; justify-content: space-between; min-height: 88px; gap: 24px; transition: min-height .2s ease; }
.site-header.is-scrolled .header-inner { min-height: 70px; }
.brand { display: inline-flex; align-items: center; gap: 13px; color: var(--red-dark); font-weight: 700; }
.brand:hover { color: var(--red); }
.brand-escudo { height: 60px; width: auto; filter: drop-shadow(0 3px 6px rgba(35, 31, 32, .16)); transition: height .2s ease; }
.site-header.is-scrolled .brand-escudo { height: 48px; }
.custom-logo { max-height: 60px; width: auto; }
.brand-name { display: grid; line-height: 1.12; }
.brand-name strong { font-family: var(--font-head); font-size: 18px; letter-spacing: -.01em; }
.brand-name small { color: var(--muted); font-size: 10.5px; font-weight: 700; letter-spacing: .11em; text-transform: uppercase; }
.header-actions { display: flex; align-items: center; gap: 10px; }
.menu-toggle, .search-toggle { display: inline-flex; align-items: center; justify-content: center; gap: 8px; background: var(--red); color: var(--white); border: 0; width: 42px; height: 42px; border-radius: 9px; font-weight: 700; cursor: pointer; transition: background .15s ease; }
.menu-toggle { display: none; }
.search-toggle:hover, .menu-toggle:hover { background: var(--red-dark); }
.main-navigation ul { display: flex; align-items: center; gap: 26px; list-style: none; margin: 0; padding: 0; }
.main-navigation a { position: relative; display: inline-block; color: var(--ink); font-size: 14px; font-weight: 600; padding: 6px 0; }
.main-navigation a::after { content: ""; position: absolute; left: 0; bottom: 0; width: 0; height: 3px; border-radius: 2px; background: var(--red); transition: width .18s ease; }
.main-navigation a:hover, .main-navigation .current-menu-item > a { color: var(--red); }
.main-navigation a:hover::after, .main-navigation .current-menu-item > a::after { width: 100%; }

/* Buscador del encabezado */
.header-search { position: absolute; top: 100%; right: 20px; z-index: 21; display: none; width: min(360px, calc(100vw - 40px)); padding: 16px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--white); box-shadow: var(--shadow); }
.header-search.is-open { display: block; }
.search-form { display: flex; gap: 9px; }
.search-form input[type="search"] { flex: 1; padding: 12px 14px; border: 1px solid #d4d9de; border-radius: 8px; font: inherit; font-size: 14px; }
.search-form input[type="search"]:focus { border-color: var(--red); outline: 3px solid rgba(216, 35, 42, .18); }
.search-submit { display: inline-flex; align-items: center; justify-content: center; width: 46px; border: 0; border-radius: 8px; background: var(--red); color: var(--white); cursor: pointer; }
.search-submit:hover { background: var(--red-dark); }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; background: linear-gradient(112deg, rgba(122, 14, 20, .97) 15%, rgba(165, 18, 27, .9) 55%, rgba(216, 35, 42, .8)), url('assets/hero-texture.svg') center/cover; color: var(--white); padding: 116px 0 124px; }
.hero::after { content: ""; position: absolute; right: -60px; top: 50%; transform: translateY(-50%); width: min(500px, 42vw); aspect-ratio: 600 / 729; background: url('assets/escudo.webp') center/contain no-repeat; opacity: .17; pointer-events: none; }
.hero-content { position: relative; z-index: 1; max-width: 680px; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; color: var(--red-dark); font-size: 12.5px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
.eyebrow::before { content: ""; width: 26px; height: 3px; border-radius: 2px; background: currentColor; opacity: .85; }
.hero .eyebrow, .page-header .eyebrow, .communities-card .eyebrow, .cta-band .eyebrow, .convocation-header .eyebrow { color: var(--yellow); }
.hero h1 { max-width: 720px; margin: 15px 0 18px; font-size: clamp(38px, 6vw, 66px); font-weight: 800; line-height: 1.04; letter-spacing: -.03em; text-shadow: 0 3px 18px rgba(0, 0, 0, .28); }
.hero p { max-width: 560px; margin: 0 0 32px; color: #fbe9ea; font-size: 18px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; }

/* ---------- Franja de valores ---------- */
.values-band { background: var(--ink); color: var(--white); }
.values-band .container { display: flex; justify-content: center; align-items: center; gap: clamp(18px, 5vw, 54px); padding: 17px 0; font-family: var(--font-head); font-weight: 700; letter-spacing: .18em; text-transform: uppercase; font-size: clamp(13px, 2vw, 16px); }
.values-band span { display: inline-flex; align-items: center; gap: clamp(18px, 5vw, 54px); }
.values-band i { font-style: normal; color: var(--yellow); }

/* ---------- Secciones ---------- */
.section { padding: 80px 0; }
.section-alt { background: var(--paper); }
.section-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 34px; }
.section-heading h2 { margin: 0; color: var(--red-dark); font-size: clamp(27px, 4vw, 40px); font-weight: 800; letter-spacing: -.02em; }
.section-heading p { max-width: 560px; margin: 9px 0 0; color: var(--muted); }
.section-heading > a { display: inline-flex; align-items: center; gap: 7px; font-weight: 700; white-space: nowrap; }
.section-heading-centered { justify-content: center; text-align: center; }
.section-heading-centered .eyebrow { justify-content: center; }
.section-heading-centered p { margin-inline: auto; }

/* ---------- Tarjetas ---------- */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.card { overflow: hidden; background: var(--white); border: 1px solid var(--line); border-top: 4px solid var(--red); border-radius: var(--radius); box-shadow: var(--shadow-soft); transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease; }
.card:hover { transform: translateY(-5px); box-shadow: var(--shadow); border-color: rgba(216, 35, 42, .35); }
.card-image { aspect-ratio: 16 / 9; width: 100%; object-fit: cover; }
.card-placeholder { position: relative; background: linear-gradient(135deg, #faf0f0, #eff6e4); }
.card-placeholder::after { content: ""; position: absolute; inset: 0; background: url('assets/escudo.webp') center/58% no-repeat; opacity: .2; }
.card-body { padding: 22px; }
.card-meta { display: inline-flex; align-items: center; gap: 7px; color: var(--red); font-size: 12px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; }
.card h3 { margin: 9px 0; font-size: 20px; font-weight: 700; }
.card h3 a { color: var(--ink); }
.card h3 a:hover { color: var(--red); }
.card-excerpt { margin: 0; color: var(--muted); font-size: 14px; }
.card-read-more { display: inline-flex; align-items: center; gap: 6px; margin-top: 16px; color: var(--red); font-size: 13px; font-weight: 700; }
.card-read-more:hover { gap: 10px; color: var(--red-dark); }
.empty-state { grid-column: 1 / -1; padding: 30px; border: 1px dashed #d7d0c8; border-radius: var(--radius); color: var(--muted); background: var(--white); }

/* ---------- Servicios (home) ---------- */
.services { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.service { position: relative; padding: 27px 22px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); transition: transform .18s ease, box-shadow .18s ease; }
.service::before { content: ""; position: absolute; inset: 0 0 auto; height: 5px; border-radius: var(--radius) var(--radius) 0 0; background: var(--red); }
.service:nth-child(2)::before { background: var(--green); }
.service:nth-child(3)::before { background: var(--blue); }
.service:nth-child(4)::before { background: var(--teal); }
.service:hover { transform: translateY(-5px); box-shadow: var(--shadow); }
.service-icon { display: inline-flex; align-items: center; justify-content: center; width: 48px; height: 48px; margin-bottom: 15px; border-radius: 13px; background: rgba(216, 35, 42, .1); color: var(--red); }
.service:nth-child(2) .service-icon { background: rgba(140, 198, 63, .16); color: var(--green-dark); }
.service:nth-child(3) .service-icon { background: rgba(27, 155, 216, .12); color: var(--blue); }
.service:nth-child(4) .service-icon { background: rgba(31, 160, 168, .12); color: var(--teal); }
.service strong { display: block; margin-bottom: 7px; color: var(--ink); font-family: var(--font-head); font-size: 16.5px; line-height: 1.3; }
.service:hover strong { color: var(--red); }
.service p { margin: 0; color: var(--muted); font-size: 14px; }

/* ---------- CTA final ---------- */
.cta-band { position: relative; overflow: hidden; background: linear-gradient(100deg, var(--green-dark), var(--green)); color: var(--white); }
.cta-band::after { content: ""; position: absolute; right: -90px; top: 50%; transform: translateY(-50%); width: 330px; aspect-ratio: 600 / 729; background: url('assets/escudo.webp') center/contain no-repeat; opacity: .1; }
.cta-band .container { position: relative; z-index: 1; display: flex; align-items: center; justify-content: space-between; gap: 26px; padding: 50px 0; }
.cta-band h2 { margin: 0 0 7px; font-size: clamp(24px, 3.4vw, 34px); font-weight: 800; }
.cta-band p { margin: 0; color: #eef7df; }
.cta-band .button { flex-shrink: 0; }

/* ---------- Breadcrumbs ---------- */
.breadcrumb { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; color: rgba(255, 255, 255, .82); font-size: 12.5px; font-weight: 600; }
.breadcrumb a { display: inline-flex; align-items: center; gap: 6px; color: rgba(255, 255, 255, .9); }
.breadcrumb a:hover { color: var(--yellow); }
.breadcrumb .icon { opacity: .75; }
.breadcrumb [aria-current="page"] { color: var(--yellow); font-weight: 700; }

/* ---------- Paginas internas ---------- */
.page-header { padding: 62px 0; background: linear-gradient(112deg, rgba(122, 14, 20, .95), rgba(216, 35, 42, .8)), url('assets/hero-texture.svg') center/cover; color: var(--white); }
.page-header h1 { margin: 0; font-size: clamp(32px, 5vw, 52px); font-weight: 800; text-shadow: 0 2px 12px rgba(0, 0, 0, .25); }
.page-header-description { max-width: 640px; margin: 14px 0 0; color: #fbe9ea; font-size: 17.5px; }
.page-header .post-date { color: var(--yellow); }
.content-area { padding: 66px 0; }
.content-area article { max-width: 800px; margin-inline: auto; }
.content-area h2, .content-area h3 { color: var(--red-dark); line-height: 1.22; }
.content-area h2 { font-size: 27px; margin-top: 1.7em; }
.content-area h3 { font-size: 21px; margin-top: 1.5em; }
.content-area p, .content-area li { color: #41454d; }
.content-area blockquote { margin: 28px 0; padding: 4px 0 4px 22px; border-left: 4px solid var(--yellow); color: var(--muted); font-style: italic; }
.content-area img { border-radius: var(--radius-sm); }
.content-area a { text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgba(216, 35, 42, .4); }
.content-area a:hover { text-decoration-color: var(--red); }
.post-thumbnail { width: 100%; max-height: 500px; object-fit: cover; margin-bottom: 30px; border-radius: var(--radius); box-shadow: var(--shadow-soft); }
.post-date { display: inline-flex; align-items: center; gap: 7px; color: var(--red); font-size: 13px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; }
.post-meta-bar { display: flex; align-items: center; flex-wrap: wrap; gap: 16px; margin-bottom: 12px; }
.post-meta-bar .cat-links a { display: inline-flex; padding: 4px 11px; border-radius: 999px; background: rgba(216, 35, 42, .09); color: var(--red); font-size: 12px; font-weight: 700; }
.post-navigation { max-width: 800px; margin: 46px auto 0; padding-top: 24px; border-top: 1px solid var(--line); }

/* ---------- Paginacion ---------- */
.pagination, .news-pagination { display: flex; justify-content: center; margin-top: 42px; }
.pagination ul, .news-pagination ul { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; list-style: none; margin: 0; padding: 0; }
.pagination .page-numbers, .news-pagination a, .news-pagination span, .pagination a, .pagination span { display: inline-flex; align-items: center; justify-content: center; min-width: 42px; min-height: 40px; padding: 7px 13px; border: 1px solid var(--line); border-radius: 8px; color: var(--ink); font-size: 13px; font-weight: 700; }
.pagination a:hover, .news-pagination a:hover { border-color: var(--red); color: var(--red); }
.pagination .current, .news-pagination .current { background: var(--red); border-color: var(--red); color: var(--white); }

/* ---------- Noticias ---------- */
.news-count { color: var(--muted); font-size: 14px; font-weight: 700; white-space: nowrap; }

/* ---------- Tablero Virtual ---------- */
.board-card { border-top-color: var(--green-dark); }
.board-card-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 20px 22px 0; }
.board-status { display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: 999px; background: #e8f3d9; color: #356415; font-size: 11px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; }
.board-status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.board-status-cerrado, .board-status-cancelado { background: #fbe2e3; color: var(--red-dark); }
.board-status-adjudicado { background: #e0f0fa; color: #12628b; }
.board-number { display: inline-flex; align-items: center; gap: 6px; margin: 0 0 8px; color: var(--red); font-size: 13px; font-weight: 700; }
.convocation-header h1 { max-width: 920px; margin-top: 14px; }
.convocation-status-row { display: flex; align-items: center; flex-wrap: wrap; gap: 14px; margin-top: 15px; }
.convocation-header .board-status { padding: 7px 14px; font-size: 12px; }
.convocation-header .post-date { color: #fbe9ea; }
.convocation-number { display: inline-flex; align-items: center; gap: 8px; margin: 18px 0 0; color: #fbe9ea; font-size: 15px; }
.convocation-number strong { color: var(--yellow); }
.convocation-content { background: var(--paper); }
.convocation-grid { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(290px, .75fr); gap: 24px; align-items: start; }
.convocation-main, .convocation-side { display: grid; gap: 24px; }
.convocation-side { position: sticky; top: 110px; }
.convocation-panel { padding: 28px; border: 1px solid var(--line); border-top: 5px solid var(--red); border-radius: var(--radius); background: var(--white); box-shadow: var(--shadow-soft); }
.convocation-side .convocation-panel { border-top-color: var(--green); }
.convocation-panel h2 { display: flex; align-items: center; gap: 9px; margin: 0 0 18px; color: var(--red-dark); font-size: 21px; font-weight: 800; }
.convocation-panel dl { margin: 0; }
.convocation-row { display: grid; grid-template-columns: minmax(150px, .8fr) 1.2fr; gap: 18px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.convocation-row:last-child { border-bottom: 0; }
.convocation-row dt { color: var(--muted); font-size: 13px; font-weight: 700; }
.convocation-row dd { margin: 0; color: var(--ink); font-size: 14px; font-weight: 600; overflow-wrap: anywhere; }
.convocation-description p { color: var(--muted); margin: 0; }
.attachments-panel { border-top-color: var(--yellow) !important; }
.attachments-list { display: grid; gap: 10px; }
.attachment-link { display: grid; grid-template-columns: 40px 1fr auto; align-items: center; gap: 11px; padding: 12px; border: 1px solid var(--line); border-radius: 9px; color: var(--ink); font-size: 13px; font-weight: 700; transition: border-color .15s ease, color .15s ease, transform .15s ease; }
.attachment-link:hover { border-color: var(--red); color: var(--red); transform: translateX(3px); }
.attachment-icon { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 8px; background: rgba(216, 35, 42, .1); color: var(--red); }
.attachment-link strong { display: inline-flex; align-items: center; gap: 5px; color: var(--red); font-size: 11px; white-space: nowrap; text-transform: uppercase; letter-spacing: .04em; }
.attachment-ext { position: absolute; bottom: 2px; right: 3px; font-size: 7.5px; font-weight: 800; }

/* ---------- Servicios (pagina) ---------- */
.service-detail-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.service-detail { position: relative; padding: 32px; border: 1px solid var(--line); border-top: 6px solid var(--red); border-radius: var(--radius); background: var(--white); box-shadow: var(--shadow-soft); }
.service-detail-green { border-top-color: var(--green); }
.service-detail-blue { border-top-color: var(--blue); }
.service-detail-teal { border-top-color: var(--teal); }
.service-detail .service-icon { width: 52px; height: 52px; }
.service-detail h3 { margin: 0 0 11px; color: var(--red-dark); font-size: 22px; font-weight: 800; }
.service-detail p { margin: 0 0 15px; color: var(--muted); font-size: 15px; }
.service-detail ul { display: grid; gap: 7px; margin: 0 0 22px; padding: 0; list-style: none; color: var(--muted); font-size: 14px; }
.service-detail li { display: flex; align-items: flex-start; gap: 9px; }
.service-detail li .icon { margin-top: 3px; color: var(--green-dark); }

/* ---------- Formularios ---------- */
.request-section { border-top: 1px solid var(--line); }
.request-layout { display: grid; grid-template-columns: .75fr 1.25fr; gap: clamp(35px, 7vw, 100px); align-items: start; }
.request-intro h2 { margin: 9px 0 14px; color: var(--red-dark); font-size: clamp(30px, 4vw, 44px); font-weight: 800; }
.request-intro p { max-width: 360px; color: var(--muted); }
.request-email { display: inline-flex; align-items: center; gap: 8px; margin: 4px 0 18px; font-size: 16.5px; font-weight: 700; overflow-wrap: anywhere; }
.form-note { font-size: 13px; font-style: italic; }
.service-form { padding: 32px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); box-shadow: var(--shadow); }
.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.form-row { margin-bottom: 18px; }
.form-row label { display: block; margin-bottom: 7px; color: var(--ink); font-size: 13px; font-weight: 700; }
.form-row label span { color: var(--red); }
.form-row input, .form-row select, .form-row textarea { width: 100%; padding: 12px 14px; border: 1px solid #d4d9de; border-radius: 8px; color: var(--ink); background: var(--white); font: inherit; font-size: 14px; transition: border-color .15s ease, box-shadow .15s ease; }
.form-row input:focus, .form-row select:focus, .form-row textarea:focus { outline: 0; border-color: var(--red); box-shadow: 0 0 0 3px rgba(216, 35, 42, .16); }
.form-row textarea { resize: vertical; min-height: 130px; }
.form-honeypot { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-message { display: flex; align-items: center; gap: 10px; margin-bottom: 19px; padding: 13px 15px; border-radius: 9px; font-size: 14px; font-weight: 700; }
.form-message-success { background: #e6f4d8; color: #356415; }
.form-message-error { background: #fbe2e3; color: var(--red-dark); }
.form-required-note { margin: -6px 0 16px; color: var(--muted); font-size: 12.5px; }

/* ---------- Contacto ---------- */
.contact-intro { max-width: 680px; margin: 0 auto 36px; text-align: center; }
.contact-intro .eyebrow { justify-content: center; }
.contact-intro h2, .contact-form-intro h2 { margin: 9px 0 13px; color: var(--red-dark); font-size: clamp(30px, 4vw, 44px); font-weight: 800; }
.contact-intro p, .contact-form-intro > p { margin: 0; color: var(--muted); }
.contact-details-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 17px; }
.contact-detail { display: flex; gap: 14px; padding: 24px 19px; border: 1px solid var(--line); border-top: 4px solid var(--red); border-radius: var(--radius); background: var(--white); transition: transform .18s ease, box-shadow .18s ease; }
.contact-detail:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.contact-detail:nth-child(2) { border-top-color: var(--green); }
.contact-detail:nth-child(3) { border-top-color: var(--blue); }
.contact-detail:nth-child(4) { border-top-color: var(--yellow); }
.contact-detail-icon { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 40px; height: 40px; border-radius: 11px; background: rgba(216, 35, 42, .1); color: var(--red); }
.contact-detail:nth-child(2) .contact-detail-icon { background: rgba(140, 198, 63, .16); color: var(--green-dark); }
.contact-detail:nth-child(3) .contact-detail-icon { background: rgba(27, 155, 216, .12); color: var(--blue); }
.contact-detail:nth-child(4) .contact-detail-icon { background: rgba(246, 201, 14, .18); color: #9a7900; }
.contact-detail h3 { margin: 0 0 5px; color: var(--red-dark); font-size: 16px; }
.contact-detail p { margin: 0 0 5px; color: var(--muted); font-size: 14px; }
.contact-detail p a { font-weight: 700; overflow-wrap: anywhere; }
.contact-detail a:not(p a) { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; font-weight: 700; }
.contact-detail-note { color: var(--muted); font-size: 11.5px; line-height: 1.35; }
.contact-form-section { border-top: 1px solid var(--line); }
.contact-form-layout { display: grid; grid-template-columns: .7fr 1.3fr; gap: clamp(35px, 7vw, 100px); align-items: start; }
.contact-form-intro { padding-top: 18px; }
.contact-response { display: grid; gap: 6px; margin-top: 27px; padding: 17px 19px; border-left: 4px solid var(--yellow); border-radius: 0 9px 9px 0; background: #fff9dc; color: var(--ink); font-size: 14px; }
.contact-response a { display: inline-flex; align-items: center; gap: 7px; font-weight: 700; overflow-wrap: anywhere; }
.contact-map-section { padding-top: 0; }
.contact-map { overflow: hidden; min-height: 430px; border: 6px solid var(--white); border-radius: var(--radius); background: #e9efe2; box-shadow: var(--shadow); }
.contact-map iframe { display: block; width: 100%; height: 430px; border: 0; }

/* ---------- Pagina Nosotros ---------- */
.nosotros-header p { max-width: 620px; margin: 14px 0 0; color: #fbe9ea; font-size: 18px; }
.leaders-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 26px; }
.leader-card { display: grid; grid-template-columns: 190px 1fr; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); box-shadow: var(--shadow-soft); transition: transform .18s ease, box-shadow .18s ease; }
.leader-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.leader-photo-wrap { display: flex; align-items: center; justify-content: center; min-height: 310px; background: var(--paper); }
.leader-photo { width: 100%; height: 100%; object-fit: cover; }
.leader-content { padding: 27px 25px; }
.leader-content h3 { margin: 8px 0 4px; color: var(--red-dark); font-size: 20px; font-weight: 800; }
.leader-content p { margin: 12px 0 0; color: var(--muted); font-size: 14px; }
.leader-role { display: inline-flex; align-items: center; gap: 7px; color: var(--red) !important; font-weight: 700; margin-top: 4px !important; }
.placeholder-note { display: inline-flex; align-items: center; gap: 6px; color: var(--red-dark) !important; font-size: 12px !important; font-style: italic; }
.identity-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.identity-card { padding: 31px 27px; border: 1px solid var(--line); border-top: 5px solid var(--green); border-radius: var(--radius); background: var(--white); box-shadow: var(--shadow-soft); }
.identity-card:nth-child(2) { border-top-color: var(--blue); }
.identity-card:nth-child(3) { border-top-color: var(--yellow); }
.identity-card h2 { margin: 9px 0 14px; color: var(--red-dark); font-size: 27px; font-weight: 800; }
.identity-card p { margin: 0 0 16px; color: var(--muted); }
.values-list { list-style: none; margin: 0 0 17px; padding: 0; }
.values-list li { display: grid; grid-template-columns: 92px 1fr; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.values-list strong { color: var(--red); font-family: var(--font-head); }
.values-list span { color: var(--muted); }
.history-grid { display: grid; grid-template-columns: 240px 1fr; align-items: center; gap: 70px; max-width: 930px; }
.history-grid h2 { margin: 9px 0 14px; color: var(--red-dark); font-size: clamp(30px, 4vw, 42px); font-weight: 800; }
.history-grid p { max-width: 760px; color: var(--muted); }
.history-mark { display: flex; align-items: center; justify-content: center; width: 210px; height: 210px; margin-inline: auto; border: 12px solid var(--red); border-radius: 50%; background: var(--yellow); color: var(--red-dark); text-align: center; transform: rotate(-8deg); box-shadow: 0 0 0 10px rgba(216, 35, 42, .1); }
.history-mark span { display: block; font-family: var(--font-head); font-size: 62px; font-weight: 800; line-height: .9; }
.history-mark small { display: block; margin-left: 7px; font-family: var(--font-head); font-size: 17px; font-weight: 700; line-height: 1.05; text-transform: uppercase; }
.map-layout { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(260px, .8fr); gap: 24px; }
.map-frame { position: relative; min-height: 500px; overflow: hidden; border: 6px solid var(--white); border-radius: var(--radius); box-shadow: var(--shadow); background: #e9efe2; }
.map-frame iframe { display: block; width: 100%; height: 500px; border: 0; }
.map-link { position: absolute; right: 14px; bottom: 14px; display: inline-flex; align-items: center; gap: 6px; padding: 10px 14px; border-radius: 7px; background: var(--white); color: var(--red-dark); font-size: 12px; font-weight: 700; box-shadow: 0 3px 12px rgba(0, 0, 0, .16); }
.map-link:hover { color: var(--red); }
.communities-card { align-self: center; padding: 31px 27px; border-radius: var(--radius); background: var(--red-dark); color: var(--white); box-shadow: var(--shadow); }
.communities-card h3 { margin: 9px 0 18px; color: var(--white); font-size: 24px; font-weight: 800; }
.communities-card ul { list-style: none; margin: 0 0 20px; padding: 0; }
.communities-card li { display: flex; align-items: center; gap: 11px; padding: 10px 0; border-bottom: 1px solid rgba(255, 255, 255, .2); }
.communities-card li .icon { color: var(--yellow); }
.communities-card .placeholder-note { color: #f7d9da !important; }

/* ---------- 404 y busqueda ---------- */
.error-404-hero { padding: 90px 0; text-align: center; }
.error-404-code { font-family: var(--font-head); font-size: clamp(90px, 16vw, 150px); font-weight: 800; line-height: 1; color: var(--red); opacity: .9; }
.error-404-hero h1 { margin: 8px 0 12px; color: var(--red-dark); font-size: clamp(26px, 4vw, 38px); font-weight: 800; }
.error-404-hero p { max-width: 480px; margin: 0 auto 30px; color: var(--muted); }
.error-404-hero .search-form { max-width: 460px; margin: 0 auto 34px; }
.error-404-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
.error-404-links a { display: inline-flex; align-items: center; gap: 8px; padding: 11px 18px; border: 1px solid var(--line); border-radius: 9px; color: var(--ink); font-weight: 700; font-size: 14px; }
.error-404-links a:hover { border-color: var(--red); color: var(--red); }
.search-summary { margin-bottom: 26px; color: var(--muted); }
.search-summary strong { color: var(--red-dark); }

/* ---------- Footer ---------- */
.site-footer { background: var(--red-deep); color: #f2cfd1; }
.footer-main { display: grid; grid-template-columns: 1.5fr 1fr 1fr .9fr; gap: 44px; padding: 60px 0 50px; }
.site-footer h2 { display: flex; align-items: center; gap: 9px; color: var(--white); font-size: 16.5px; font-weight: 800; letter-spacing: .02em; }
.site-footer h2 .icon { color: var(--yellow); }
.site-footer p { margin: 8px 0; font-size: 14px; }
.site-footer a { color: #f2cfd1; }
.site-footer a:hover { color: var(--yellow); }
.footer-lema { display: inline-flex; align-items: center; gap: 8px; color: var(--yellow); font-weight: 700; letter-spacing: .08em; text-transform: uppercase; font-size: 12.5px; }
.footer-escudo { height: 86px; width: auto; margin-bottom: 14px; }
.footer-links { list-style: none; margin: 0; padding: 0; }
.footer-links li { margin: 0; }
.footer-links a { display: inline-flex; align-items: center; gap: 8px; padding: 5px 0; font-size: 14px; }
.footer-links a .icon { opacity: .7; }
.footer-contact p { display: flex; align-items: flex-start; gap: 9px; }
.footer-contact .icon { margin-top: 4px; color: var(--yellow); flex-shrink: 0; }
.footer-social { display: flex; gap: 10px; margin-top: 14px; }
.footer-social a { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 50%; background: rgba(255, 255, 255, .12); color: var(--white); transition: background .15s ease, transform .15s ease; }
.footer-social a:hover { background: var(--yellow); color: var(--ink); transform: translateY(-3px); }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, .16); padding: 16px 0; font-size: 12.5px; color: #dfa9ab; }
.footer-bottom .container { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; }

/* Volver arriba */
.back-to-top { position: fixed; right: 22px; bottom: 22px; z-index: 30; display: inline-flex; align-items: center; justify-content: center; width: 46px; height: 46px; border: 0; border-radius: 50%; background: var(--red); color: var(--white); cursor: pointer; box-shadow: var(--shadow); opacity: 0; visibility: hidden; transform: translateY(12px); transition: opacity .2s ease, transform .2s ease, visibility .2s; }
.back-to-top.is-visible { opacity: 1; visibility: visible; transform: translateY(0); }
.back-to-top:hover { background: var(--red-dark); }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .cards { grid-template-columns: repeat(2, 1fr); }
  .services { grid-template-columns: repeat(2, 1fr); }
  .leader-card { grid-template-columns: 150px 1fr; }
  .identity-grid { grid-template-columns: 1fr; }
  .history-grid { grid-template-columns: 170px 1fr; gap: 35px; }
  .history-mark { width: 160px; height: 160px; border-width: 9px; }
  .history-mark span { font-size: 46px; }
  .history-mark small { font-size: 13px; }
  .map-layout { grid-template-columns: 1fr; }
  .contact-details-grid { grid-template-columns: repeat(2, 1fr); }
  .convocation-side { position: static; }
}
@media (max-width: 760px) {
  .service-detail-grid, .request-layout, .contact-form-layout, .convocation-grid { grid-template-columns: 1fr; }
  .service-form { padding: 24px 20px; }
  .convocation-panel { padding: 22px 19px; }
  .convocation-row { grid-template-columns: 1fr; gap: 3px; }
  .attachment-link { grid-template-columns: 36px 1fr; }
  .attachment-link strong { grid-column: 2; }
  .board-card-top { padding-inline: 18px; }
}
@media (max-width: 640px) {
  .topbar .topbar-lema { display: none; }
  .topbar a + a { margin-left: 12px; }
  .menu-toggle { display: inline-flex; }
  .search-toggle { display: none; }
  .main-navigation { display: none; position: absolute; z-index: 21; inset: 100% 0 auto; padding: 14px 20px 22px; background: var(--white); border-bottom: 4px solid var(--red); box-shadow: var(--shadow); }
  .main-navigation.is-open { display: block; }
  .main-navigation ul { align-items: stretch; flex-direction: column; gap: 0; }
  .main-navigation li { border-bottom: 1px solid var(--line); }
  .main-navigation a { display: block; padding: 13px 0; }
  .hero { padding: 74px 0 84px; }
  .hero::after { opacity: .1; right: -130px; width: 320px; }
  .cards, .services { grid-template-columns: 1fr; }
  .cta-band .container { flex-direction: column; align-items: flex-start; }
  .cta-band::after { opacity: .07; }
  .footer-main { grid-template-columns: 1fr; gap: 26px; padding: 44px 0 36px; }
  .section { padding: 56px 0; }
  .brand-name strong { font-size: 14.5px; }
  .brand-escudo { height: 48px; }
  .leaders-grid { grid-template-columns: 1fr; }
  .leader-card { grid-template-columns: 120px 1fr; }
  .leader-photo-wrap { min-height: 250px; }
  .leader-content { padding: 21px 17px; }
  .leader-content h3 { font-size: 18px; }
  .history-grid { grid-template-columns: 1fr; gap: 28px; }
  .history-mark { width: 150px; height: 150px; }
  .map-frame, .map-frame iframe { min-height: 390px; height: 390px; }
  .contact-details-grid { grid-template-columns: 1fr; }
  .contact-detail { padding: 20px 17px; }
  .values-band .container { letter-spacing: .1em; }
}
@media (max-width: 520px) {
  .form-grid { grid-template-columns: 1fr; gap: 0; }
}

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