:root {
  --brand: #a92132;
  --brand-dark: #751724;
  --ink: #182230;
  --muted: #607083;
  --line: #e6eaf0;
}

html { scroll-behavior: smooth; }
img { max-width: 100%; }
main { overflow-wrap: break-word; }
main:target { scroll-margin-top: 120px; }
.skip-link { background: #fff; border: 2px solid var(--brand); color: var(--ink); left: 1rem; padding: .75rem 1rem; position: fixed; top: -100px; z-index: 1100; }
.skip-link:focus { top: 1rem; }
:focus-visible { outline: 3px solid #2455a4; outline-offset: 3px; }

body {
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  overflow-x: hidden;
}

.topbar { background: #102536; color: #dce5eb; font-size: .78rem; }
.topbar a { color: #fff; text-decoration: none; }
.topbar .container > span:last-child { align-items: center; display: inline-flex; flex-wrap: wrap; gap: .3rem; justify-content: center; }
.brand-mark { width: 220px; height: auto; max-height: 85px; object-fit: contain; object-position: left center; }
.navbar { box-shadow: 0 7px 24px rgba(18, 38, 54, .09); }
.nav-link { border-radius: .45rem; color: #334152; font-size: .9rem; font-weight: 650; transition: background .18s ease, color .18s ease; }
.nav-link:hover { background: #fbecef; color: var(--brand); }
.nav-link.active, .navbar-nav .nav-link.active { background: #fbecef; color: var(--brand); font-weight: 800; }
.navbar .dropdown-toggle:not(.active):hover, .navbar .dropdown-toggle.show:not(.active) { background: transparent; color: #334152; }
.navbar .dropdown-toggle.show:not(.active):focus-visible { background: transparent; box-shadow: none; color: #334152; }
.nav-link:focus { box-shadow: none; outline: none; }
.nav-link:focus-visible { background: #fbecef; box-shadow: 0 0 0 2px rgba(169, 33, 50, .35); color: var(--brand); outline: none; }
.dropdown-menu { max-height: min(70vh, 520px); min-width: 285px; overflow-y: auto; }
.dropdown-item { font-size: .87rem; padding: .55rem 1rem; white-space: normal; }
.dropdown-item:active, .dropdown-item:hover { background: #fbecef; color: var(--brand-dark); }
.submenu-card { min-width: 290px; padding: .8rem; }
.commissions-menu { min-width: 290px; }
.submenu-card__heading { align-items: center; display: flex; gap: .75rem; padding: .25rem .45rem; }
.submenu-card__heading strong { color: var(--ink); display: block; font-size: .92rem; }
.submenu-card__heading small { color: var(--muted); display: block; font-size: .74rem; margin-top: .1rem; }
.submenu-card .dropdown-item { border-radius: .55rem; line-height: 1.25; margin: .08rem 0; padding: .6rem .65rem; }
.btn-brand { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn-brand:hover { background: var(--brand-dark); border-color: var(--brand-dark); color: #fff; }
.btn-actas { flex-shrink: 0; white-space: nowrap; }

.hero {
  background: #102536;
  height: 700px;
  margin-inline: auto;
  max-width: 1920px;
  position: relative;
  scroll-margin-top: 110px;
}
.hero-layout { align-items: flex-end; display: flex; height: 100%; margin-inline: auto; max-width: 1140px; padding: 2.5rem .75rem; width: 100%; }
.hero-copy { color: #fff; max-width: 620px; min-width: 0; pointer-events: none; position: relative; z-index: 2; }
.hero-copy a { pointer-events: auto; }
.hero .eyebrow { color: #ffdb8b; line-height: 1.6; }
.hero h1 { font-size: clamp(2.5rem, 4vw, 4rem); font-weight: 800; letter-spacing: -.045em; line-height: 1.1; margin-bottom: 1.35rem; text-wrap: balance; }
.hero-description { color: #e0e8ee; font-size: clamp(1rem, 1.2vw, 1.2rem); line-height: 1.7; margin-bottom: 1.75rem; max-width: 46ch; }
.hero-actions { align-items: flex-start; display: flex; flex-wrap: wrap; gap: .75rem; }
.hero-actions .btn { align-items: center; display: inline-flex; justify-content: center; min-height: 48px; }
.hero .btn-outline-dark { border-color: #fff; color: #fff; }
.hero .btn-outline-dark:hover { background: #fff; color: var(--ink); }
.hero-note { border-left: 3px solid #e77785; color: #d7e1e8; font-size: .8rem; margin: 1.75rem 0 0; padding-left: .8rem; }
.hero-gallery { background: #102536; inset: 0; min-width: 0; overflow: hidden; position: absolute; }
.hero-gallery::after { background: linear-gradient(to top, rgba(9, 26, 40, .94) 0%, rgba(9, 26, 40, .8) 27%, rgba(9, 26, 40, .3) 65%, rgba(9, 26, 40, 0) 100%); content: ""; inset: 0; pointer-events: none; position: absolute; z-index: 1; }
.hero-gallery:focus-visible, .hero-toolbar button:focus-visible { outline: 3px solid var(--brand); outline-offset: 4px; }
.hero-slides { height: 100%; isolation: isolate; overflow: hidden; position: relative; touch-action: pan-y; }
.hero-slide { inset: 0; opacity: 0; pointer-events: none; position: absolute; transition: opacity .6s ease, visibility 0s linear .6s; visibility: hidden; }
.hero-slide.is-active { opacity: 1; transition-delay: 0s; visibility: visible; z-index: 1; }
/* La foto cubre el formato 1920 × 700 manteniendo su proporción original. */
.hero-slide-image { display: block; height: 100%; object-fit: cover; object-position: center 35%; position: relative; width: 100%; }
.hero-image-error { color: #fff; inset: 0; place-content: center; position: absolute; text-align: center; }
.hero-image-error:not([hidden]) { display: grid; }
.hero-toolbar { position: absolute; right: clamp(.75rem, 2vw, 1.75rem); top: 50%; transform: translateY(-50%); z-index: 3; }
.hero-toolbar[hidden] { display: none; }
.hero-controls { align-items: center; background: rgba(16, 37, 54, .58); border: 1px solid rgba(255,255,255,.2); border-radius: 99px; display: flex; flex-direction: column; padding: .45rem .35rem; }
.hero-control { align-items: center; background: transparent; border: 0; display: inline-flex; height: 28px; justify-content: center; padding: 0; width: 28px; }
.hero-control::before { background: rgba(255,255,255,.55); border: 2px solid transparent; border-radius: 50%; content: ""; height: 8px; transition: transform .2s ease, background .2s ease, border-color .2s ease; width: 8px; }
.hero-control.is-active::before { background: #fff; border-color: rgba(16,37,54,.35); transform: scale(1.35); }
.hero-control:hover::before { background: var(--brand); }

@media (min-width: 1400px) {
  .hero-layout { max-width: 1320px; }
}

@media (min-width: 992px) and (max-width: 1199.98px) {
  .hero-layout { max-width: 960px; }
}

.eyebrow, .section-kicker, .document-type { font-size: .78rem; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }
.eyebrow { color: #ffdb8b; }
.section-kicker, .document-type { color: var(--brand); }
.section-title { font-size: clamp(1.8rem, 3vw, 2.55rem); font-weight: 760; letter-spacing: -.035em; }

.quick-link {
  background: #fff; border: 1px solid var(--line); border-radius: 1rem; color: var(--ink); display: flex;
  gap: 1rem; height: 100%; padding: 1.25rem; text-decoration: none; transition: .2s ease;
}
.quick-link:hover { border-color: #dc9aa4; box-shadow: 0 12px 28px rgba(36, 50, 66, .1); color: var(--brand); transform: translateY(-4px); }
.quick-icon { align-items: center; background: #fbecef; border-radius: .8rem; color: var(--brand); display: flex; font-size: 1.15rem; height: 42px; justify-content: center; min-width: 42px; }

.feature-card, .news-card, .document-card { background: #fff; border: 1px solid var(--line); border-radius: 1.1rem; overflow: hidden; }
.feature-card img { height: 250px; object-fit: cover; width: 100%; }
.feature-card .card-body, .document-card { padding: 1.35rem; }
.article-image { height: 100%; min-height: 190px; object-fit: cover; width: 100%; }
.news-card { transition: box-shadow .2s ease, transform .2s ease; }
.news-card:hover { box-shadow: 0 13px 32px rgba(33, 50, 70, .1); transform: translateY(-2px); }
.news-card h3, .feature-card h3 { font-size: 1.18rem; font-weight: 750; letter-spacing: -.02em; }
.news-card__body { display: flex; flex-direction: column; height: 100%; }
.news-card__summary { color: var(--muted); font-size: .88rem; line-height: 1.55; margin-bottom: 1.15rem; }
.news-card .btn-outline-dark:hover { background: var(--brand); border-color: var(--brand); }
.meta { color: #789; font-size: .75rem; font-weight: 650; text-transform: uppercase; }
.document-card + .document-card { margin-top: .7rem; }
.document-card a { color: var(--ink); font-size: .91rem; font-weight: 700; text-decoration: none; }
.document-card a:hover { color: var(--brand); }

/* Documentos de portada: dos archivos equilibrados con títulos desplegables. */
.public-documents-section { background: #f6f8fa; border-block: 1px solid var(--line); padding-block: clamp(2.5rem, 5vw, 4rem); scroll-margin-top: 125px; }
.public-documents-heading { align-items: flex-end; display: flex; gap: 2rem; justify-content: space-between; margin-bottom: 1.75rem; }
.public-documents-heading .section-title { font-size: clamp(1.85rem, 3vw, 2.4rem); }
.public-documents-intro { color: var(--muted); font-size: .95rem; line-height: 1.65; margin: 0; max-width: 365px; }
.public-documents-grid { align-items: stretch; display: grid; gap: 1.5rem; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.public-documents-panel { background: #fff; border: 1px solid #dfe5ec; border-radius: 1.25rem; box-shadow: 0 8px 24px rgba(24, 34, 48, .035); display: flex; flex-direction: column; min-width: 0; overflow: hidden; }
.public-documents-panel-heading { align-items: center; display: flex; gap: .9rem; padding: 1.35rem; }
.public-documents-icon { align-items: center; background: #fbecef; border-radius: .85rem; color: var(--brand); display: inline-flex; flex-shrink: 0; font-size: 1.2rem; height: 46px; justify-content: center; width: 46px; }
.public-documents-panel-heading h3 { font-size: 1.2rem; font-weight: 750; margin: 0 0 .2rem; }
.public-documents-panel-heading p { color: var(--muted); font-size: .78rem; margin: 0; }
.public-documents-label { background: #f2f5f8; border-radius: 99px; color: #68798a; font-size: .65rem; font-weight: 650; margin-left: auto; padding: .4rem .6rem; white-space: nowrap; }
.public-documents-list { display: grid; flex: 1; gap: .75rem; grid-auto-rows: 1fr; padding: 0 1.35rem 1.35rem; }
.public-document { background: #fafbfd; border: 1px solid var(--line); border-radius: .85rem; display: flex; flex-direction: column; min-height: 170px; padding: 1.15rem; }
.public-document-reference { color: var(--brand); font-size: .75rem; font-weight: 750; letter-spacing: .025em; margin: 0 0 .65rem; }
.public-document-title { color: var(--ink); display: block; font-size: .9rem; font-weight: 650; line-height: 1.55; margin: 0; overflow-wrap: anywhere; }
.public-document-details summary { cursor: pointer; list-style: none; }
.public-document-details summary::-webkit-details-marker { display: none; }
.public-document-details:not([open]) .public-document-title { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
.public-document-expand { align-items: center; color: var(--brand); display: inline-flex; font-size: .73rem; font-weight: 700; gap: .5rem; margin-top: .45rem; }
.public-document-expand i { font-size: .6rem; }
.public-document-expand-less, .public-document-details[open] .public-document-expand-more { display: none; }
.public-document-details[open] .public-document-expand-less { display: inline; }
.public-document-details[open] .public-document-expand i { transform: rotate(180deg); }
.public-document-footer { align-items: center; color: #6b7d8f; display: flex; flex-wrap: wrap; font-size: .72rem; gap: .5rem; justify-content: space-between; margin-top: auto; padding-top: 1rem; }
.public-document-footer i { margin-right: .4rem; }
.public-document-footer a { color: var(--brand); font-weight: 750; text-decoration: none; }
.public-document-footer a:hover { text-decoration: underline; }
.public-document-kind { color: #8593a1; }
.public-documents-archive { align-items: center; border-top: 1px solid var(--line); color: var(--brand); display: flex; font-size: .85rem; font-weight: 750; gap: 1rem; justify-content: space-between; padding: 1.1rem 1.35rem; text-decoration: none; }
.public-documents-archive:hover { background: #fbecef; color: var(--brand-dark); }
.public-document-details summary:focus-visible, .public-documents-archive:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; }
.public-documents-empty { color: var(--muted); font-size: .9rem; margin: 0; padding-block: 2rem; }

@media (max-width: 1199.98px) {
  .public-documents-label { display: none; }
}
@media (max-width: 767.98px) {
  .public-documents-heading { align-items: flex-start; flex-direction: column; gap: .8rem; }
  .public-documents-intro { max-width: none; }
  .public-documents-grid { grid-template-columns: minmax(0, 1fr); }
  .public-documents-panel-heading { padding: 1.1rem; }
  .public-documents-list { padding: 0 1.1rem 1.1rem; }
  .public-document { min-height: 180px; padding: 1rem; }
}

.institutional-section { background: #fff; }
.cta { border-radius: 1.1rem; color: #fff; min-height: 100%; overflow: hidden; }
.cta-pattern { background: radial-gradient(circle at 15% 110%, rgba(255,255,255,.18) 0 110px, transparent 111px), radial-gradient(circle at 95% 10%, rgba(255,255,255,.12) 0 170px, transparent 171px), linear-gradient(120deg, var(--brand-dark), var(--brand)); }
.cta-links { display: flex; flex-wrap: wrap; gap: .55rem; }
.cta-links a { background: rgba(255,255,255,.13); border: 1px solid rgba(255,255,255,.2); border-radius: 99rem; font-size: .77rem; padding: .35rem .6rem; }
.cta-links i { margin-right: .25rem; }
.site-footer { background: #102536; color: #c9d4dc; overflow: hidden; position: relative; }
.site-footer::before { background: var(--brand); content: ""; height: 4px; inset: 0 0 auto; position: absolute; }
.footer-main { padding: 4rem 0 2.75rem; }
.footer-logo-panel { background: #fff; border-radius: .7rem; display: inline-flex; margin-bottom: 1.15rem; padding: .45rem .7rem; }
.footer-logo { max-height: 58px; max-width: 220px; object-fit: contain; object-position: left center; }
.footer-intro { color: #b2c0ca; line-height: 1.7; max-width: 355px; }
.site-footer h2 { color: #fff; font-size: .78rem; font-weight: 800; letter-spacing: .1em; margin: .5rem 0 1.1rem; text-transform: uppercase; }
.site-footer a { color: #c9d4dc; text-decoration: none; }
.site-footer a:hover { color: #fff; }
.footer-links li + li { margin-top: .65rem; }
.footer-links a { font-size: .9rem; }
.footer-links a::before { color: #d65061; content: "›"; font-weight: 800; margin-right: .45rem; }
.footer-contact li { align-items: flex-start; display: flex; font-size: .87rem; gap: .7rem; line-height: 1.5; margin-bottom: .9rem; }
.footer-contact i { color: #e25868; margin-top: .2rem; width: 14px; }
.footer-social { display: flex; gap: .65rem; }
.footer-social a { align-items: center; background: rgba(255,255,255,.1); border-radius: 50%; display: inline-flex; height: 38px; justify-content: center; transition: background .2s ease, transform .2s ease; width: 38px; }
.footer-social a:hover { background: var(--brand); transform: translateY(-2px); }
.footer-bottom { align-items: center; border-top: 1px solid rgba(255,255,255,.13); color: #91a2ad; display: flex; flex-wrap: wrap; font-size: .78rem; gap: .8rem 1.5rem; justify-content: space-between; padding: 1.25rem 0; }
.footer-bottom a { color: #fff; font-weight: 700; }
.back-to-top { align-items: center; background: var(--brand); border: 2px solid #fff; border-radius: 50%; bottom: 1.25rem; box-shadow: 0 8px 24px rgba(16, 37, 54, .28); color: #fff; display: inline-flex; height: 48px; justify-content: center; opacity: 0; pointer-events: none; position: fixed; right: 1.25rem; text-decoration: none; transform: translateY(10px); transition: background .2s ease, opacity .2s ease, transform .2s ease, visibility .2s ease; visibility: hidden; width: 48px; z-index: 1050; }
.back-to-top.is-visible { opacity: 1; pointer-events: auto; transform: translateY(0); visibility: visible; }
.back-to-top.is-visible:hover { background: var(--brand-dark); color: #fff; transform: translateY(-3px); }

/* Páginas de noticias */
.page-hero { background: #f6f8fb; border-bottom: 1px solid #eef1f4; padding: 3.5rem 0; }
.breadcrumb { font-size: .84rem; margin-bottom: 1.6rem; }
.breadcrumb a { color: var(--brand); text-decoration: none; }
.news-search .input-group { box-shadow: 0 8px 22px rgba(25, 40, 56, .07); }
.news-search .input-group-text, .news-search .form-control { background: #fff; border-color: #dbe3ea; }
.news-search .input-group-text { border-right: 0; color: var(--brand); padding-left: 1rem; }
.news-search .form-control { border-left: 0; box-shadow: none; min-height: 48px; }
.news-search .form-control:focus { border-color: #dbe3ea; }
.news-search .btn { padding-inline: 1.2rem; }
.news-feed { border-top: 1px solid var(--line); }
.news-feed-item { align-items: flex-start; border-bottom: 1px solid var(--line); display: flex; gap: 1.35rem; padding: 1.6rem 0; }
.news-feed-image { border-radius: .7rem; display: block; flex: 0 0 200px; height: 135px; overflow: hidden; }
.news-feed-image img { height: 100%; object-fit: cover; transition: transform .25s ease; width: 100%; }
.news-feed-item:hover .news-feed-image img { transform: scale(1.04); }
.news-feed-content { min-width: 0; }
.news-feed-date { color: #53677b; font-size: .88rem; font-weight: 600; }
.news-feed-content h2 { font-size: clamp(1.2rem, 2vw, 1.45rem); font-weight: 780; letter-spacing: -.025em; line-height: 1.22; margin: 0 0 .7rem; }
.news-feed-content h2 a { color: var(--ink); text-decoration: none; }
.news-feed-content h2 a:hover, .news-feed-more:hover { color: var(--brand); }
.news-feed-summary { color: #52677b; font-size: .98rem; line-height: 1.55; margin: 0 0 .65rem; }
.news-feed-more { color: var(--brand); display: inline-block; font-size: .94rem; font-weight: 800; text-decoration: none; }
.news-feed-more i { margin-left: .3rem; transition: transform .2s ease; }
.news-feed-more:hover i { transform: translateX(3px); }
.pagination { flex-wrap: wrap; gap: .35rem; }
.pagination-status { color: var(--muted); font-size: .94rem; }
.pagination-news .page-link { align-items: center; background: #e7f1ff; border: 0; border-radius: .55rem !important; color: #174aa8; display: flex; font-weight: 700; gap: .55rem; height: 44px; justify-content: center; min-width: 44px; padding: 0 .9rem; width: auto; }
.pagination-news .page-item.active .page-link { background: #174aa8; color: #fff; }
.pagination-news .page-item.disabled .page-link { opacity: .45; }
.post-meta { align-items: center; color: var(--muted); display: flex; flex-wrap: wrap; font-size: .78rem; font-weight: 700; gap: .75rem; letter-spacing: .06em; text-transform: uppercase; }
.post-meta span:first-child { color: var(--brand); }
.post-meta span + span { border-left: 1px solid var(--line); padding-left: .75rem; }
.post-header { background: #f6f8fb; border-bottom: 1px solid #eef1f4; padding: 2.75rem 0; }
.post-title { font-size: clamp(2.15rem, 4.5vw, 3.7rem); font-weight: 800; letter-spacing: -.045em; line-height: 1.07; }
.post-date { color: #53677b; font-size: 1rem; font-weight: 600; }
.post-actions { display: flex; flex-wrap: wrap; gap: .65rem; }
.post-action-icon, .post-action-share { align-items: center; background: #e7f1ff; border: 0; border-radius: .55rem; color: #174aa8; display: inline-flex; font-weight: 700; gap: .55rem; height: 48px; justify-content: center; padding: 0 1rem; }
.post-action-icon { padding: 0; width: 48px; }
.post-action-icon:hover, .post-action-share:hover { background: #d5e7ff; }
.post-share-wrap { position: relative; }
.post-share-menu { background: #fff; border-radius: .2rem; box-shadow: 0 5px 15px rgba(23, 42, 62, .18); display: none; min-width: 155px; padding: .35rem 0; position: absolute; right: 0; top: calc(100% + .45rem); z-index: 5; }
.post-share-menu.is-open { display: block; }
.post-share-menu a { color: #174aa8; display: block; font-size: .82rem; font-weight: 700; padding: .6rem 1rem; text-decoration: none; }
.post-share-menu a:hover { background: #eef5ff; }
.post-article { max-width: 970px; }
.post-lead { color: var(--muted); font-size: 1.2rem; line-height: 1.6; }
.post-image { border-radius: 1rem; display: block; height: min(53vw, 470px); margin: 2rem 0; object-fit: cover; width: 100%; }
.post-content { font-size: 1.04rem; line-height: 1.8; }
.related-news { background: #f7f8fa; border-radius: 1rem; padding: 1.6rem; }
.related-news li + li { border-top: 1px solid var(--line); margin-top: .85rem; padding-top: .85rem; }
.related-news li a { color: var(--ink); display: flex; font-size: .9rem; font-weight: 700; gap: .8rem; justify-content: space-between; text-decoration: none; }
.related-news li a:hover { color: var(--brand); }
.related-news li i { color: var(--brand); flex: 0 0 auto; margin-top: .2rem; }

.resolution-feed-cover, .ordinance-feed-cover { align-items: center; background: #fbecef; border: 1px solid #f0dbe0; border-radius: .8rem; color: var(--brand); display: flex; flex: 0 0 160px; flex-direction: column; gap: .4rem; justify-content: center; min-height: 132px; padding: 1rem; text-decoration: none; }
.resolution-feed-cover > i, .ordinance-feed-cover > i { font-size: 1.8rem; }
.resolution-feed-cover strong, .ordinance-feed-cover strong { font-size: 1.15rem; }
.resolution-feed-cover span, .ordinance-feed-cover span { font-size: .65rem; text-align: center; }
.resolution-feed-cover:hover, .ordinance-feed-cover:hover { background: #f5e0e5; color: var(--brand-dark); }
.resolution-body, .ordinance-body { overflow-wrap: anywhere; }
.resolution-body p, .ordinance-body p { margin-bottom: 1.2rem; }
.resolution-body table, .ordinance-body table { border-collapse: collapse; margin: 1.5rem 0; table-layout: fixed; width: 100%; }
.resolution-body td, .resolution-body th, .ordinance-body td, .ordinance-body th { border: 1px solid var(--line); padding: .8rem; vertical-align: top; }
.resolution-body td p:last-child, .ordinance-body td p:last-child { margin-bottom: 0; }
.resolution-attachment, .ordinance-attachment { align-items: center; background: #f6f8fb; border: 1px solid var(--line); border-radius: .85rem; display: flex; flex-wrap: wrap; gap: 1rem; justify-content: space-between; padding: 1rem; }
.ordinance-page .post-title { font-size: clamp(1.8rem, 2.6vw, 2.65rem); line-height: 1.12; }

.committees-hero { background: linear-gradient(135deg, #f7f9fc 0%, #fff5f6 100%); }
.committees-lead { color: var(--muted); font-size: 1.05rem; line-height: 1.7; max-width: 760px; }
.committees-summary { align-items: center; background: #fff; border: 1px solid var(--line); border-radius: 1rem; box-shadow: 0 14px 35px rgba(14, 40, 59, .08); display: flex; gap: 1rem; margin-left: auto; max-width: 320px; padding: 1.2rem 1.35rem; }
.committees-summary-icon { align-items: center; background: #fbecef; border-radius: .85rem; color: var(--brand); display: inline-flex; flex: 0 0 56px; font-size: 1.35rem; height: 56px; justify-content: center; }
.committees-summary strong { color: var(--ink); display: block; font-size: 1.8rem; line-height: 1; }
.committees-summary div span { color: var(--muted); display: block; font-size: .82rem; margin-top: .3rem; }
.committees-content { background: #fff; }
.committees-directory { background: #f7f9fb; border: 1px solid var(--line); border-radius: 1rem; padding: 1.25rem; }
.committees-directory-title { align-items: center; color: var(--ink); display: flex; font-size: .78rem; font-weight: 800; gap: .55rem; letter-spacing: .08em; margin-bottom: 1rem; text-transform: uppercase; }
.committees-directory-title i { color: var(--brand); }
.committees-directory-links { display: flex; flex-wrap: wrap; gap: .6rem; }
.committees-directory-links a { align-items: center; background: #fff; border: 1px solid var(--line); border-radius: 999px; color: var(--ink); display: inline-flex; font-size: .78rem; font-weight: 700; gap: .5rem; padding: .5rem .8rem; text-decoration: none; transition: border-color .2s ease, color .2s ease, transform .2s ease; }
.committees-directory-links a span { color: var(--brand); font-size: .68rem; }
.committees-directory-links a:hover { border-color: var(--brand); color: var(--brand); transform: translateY(-1px); }
.committee-card { background: #fff; border: 1px solid var(--line); border-radius: 1rem; box-shadow: 0 12px 30px rgba(14, 40, 59, .06); display: flex; flex-direction: column; overflow: hidden; padding: 1.5rem; scroll-margin-top: 8rem; }
.committee-card:target { border-color: rgba(169, 33, 50, .55); box-shadow: 0 16px 38px rgba(169, 33, 50, .14); }
.committee-card-header { align-items: flex-start; border-bottom: 1px solid var(--line); display: grid; gap: 1rem; grid-template-columns: auto auto 1fr; padding-bottom: 1.2rem; }
.committee-card-number { color: #bdc5ce; font-size: .72rem; font-weight: 800; padding-top: .7rem; }
.committee-card-icon { align-items: center; background: #fbecef; border-radius: .8rem; color: var(--brand); display: inline-flex; flex: 0 0 48px; font-size: 1.1rem; height: 48px; justify-content: center; }
.committee-card-header p { color: var(--brand); font-size: .68rem; font-weight: 800; letter-spacing: .1em; margin: 0 0 .3rem; text-transform: uppercase; }
.committee-card-header h2 { color: var(--ink); font-size: 1.2rem; font-weight: 800; line-height: 1.3; margin: 0; }
.committee-roles { padding-top: .35rem; }
.committee-roles > div { display: grid; gap: .25rem; grid-template-columns: 120px minmax(0, 1fr); padding: .85rem 0; }
.committee-roles > div + div { border-top: 1px solid #eef1f4; }
.committee-roles dt { color: var(--brand); font-size: .72rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.committee-roles dd { color: var(--ink); font-size: .9rem; line-height: 1.55; margin: 0; }
.committee-back { align-items: center; align-self: flex-end; color: var(--muted); display: inline-flex; font-size: .72rem; font-weight: 700; gap: .4rem; margin-top: auto; padding-top: .5rem; text-decoration: none; }
.committee-back:hover { color: var(--brand); }
.committee-profile { background: #fff; border: 1px solid var(--line); border-radius: 1.1rem; box-shadow: 0 16px 38px rgba(14, 40, 59, .07); overflow: hidden; padding: clamp(1.35rem, 3vw, 2rem); }
.committee-profile-header { align-items: center; border-bottom: 1px solid var(--line); display: flex; gap: 1rem; margin-bottom: 1.25rem; padding-bottom: 1.25rem; }
.committee-profile-header > span { align-items: center; background: #fbecef; border-radius: .9rem; color: var(--brand); display: inline-flex; flex: 0 0 58px; font-size: 1.25rem; height: 58px; justify-content: center; }
.committee-profile-header h2 { color: var(--ink); font-size: clamp(1.45rem, 2.5vw, 2rem); font-weight: 800; margin: 0; }
.committee-profile-intro { color: var(--muted); line-height: 1.75; margin-bottom: 1.2rem; }
.committee-profile-roles { display: grid; gap: .8rem; }
.committee-profile-roles > div { background: #f7f9fb; border: 1px solid var(--line); border-radius: .85rem; display: grid; gap: .4rem; grid-template-columns: 140px minmax(0, 1fr); padding: 1rem 1.1rem; }
.committee-profile-roles dt { color: var(--brand); font-size: .72rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.committee-profile-roles dd { color: var(--ink); line-height: 1.65; margin: 0; }
.committee-related { margin-top: 2.5rem; }
.committee-related-heading { align-items: end; display: flex; gap: 1rem; justify-content: space-between; margin-bottom: 1rem; }
.committee-related-heading h2 { color: var(--ink); font-size: 1.5rem; font-weight: 800; margin: 0; }
.committee-related-heading > a { color: var(--brand); font-size: .8rem; font-weight: 800; text-decoration: none; }
.committee-related-grid { display: grid; gap: .75rem; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.committee-related-grid a { align-items: center; background: #fff; border: 1px solid var(--line); border-radius: .85rem; color: var(--ink); display: grid; gap: .7rem; grid-template-columns: auto minmax(0, 1fr) auto; min-height: 78px; padding: .9rem 1rem; text-decoration: none; transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease; }
.committee-related-grid a:hover { border-color: rgba(169, 33, 50, .5); box-shadow: 0 10px 24px rgba(14, 40, 59, .07); color: var(--brand); transform: translateY(-2px); }
.committee-related-grid span { color: #a8b2bc; font-size: .68rem; font-weight: 800; }
.committee-related-grid strong { font-size: .84rem; line-height: 1.35; }
.committee-related-grid i { color: var(--brand); font-size: .75rem; }

@media (max-width: 991.98px) {
  .committees-summary { margin-left: 0; }
}

@media (max-width: 575.98px) {
  .committees-directory-links { display: grid; grid-template-columns: 1fr; }
  .committees-directory-links a { border-radius: .7rem; }
  .committee-card { padding: 1.15rem; }
  .committee-card-header { gap: .7rem; grid-template-columns: auto 1fr; }
  .committee-card-number { display: none; }
  .committee-roles > div { grid-template-columns: 1fr; }
  .committee-profile-roles > div { grid-template-columns: 1fr; }
  .committee-related-grid { grid-template-columns: 1fr; }
}

.authorities-hero { background: linear-gradient(135deg, #f7f9fc 0%, #fff7f8 100%); }
.authorities-lead { color: var(--muted); font-size: 1.05rem; line-height: 1.7; max-width: 750px; }
.authorities-summary { align-items: center; background: #fff; border: 1px solid var(--line); border-radius: 1rem; box-shadow: 0 14px 35px rgba(14, 40, 59, .08); display: flex; gap: 1rem; margin-left: auto; max-width: 330px; padding: 1.2rem 1.35rem; }
.authorities-summary > span { align-items: center; background: #fbecef; border-radius: .85rem; color: var(--brand); display: inline-flex; flex: 0 0 56px; font-size: 1.3rem; height: 56px; justify-content: center; }
.authorities-summary strong { color: var(--ink); display: block; font-size: 1rem; font-weight: 800; }
.authorities-summary small { color: var(--muted); display: block; margin-top: .25rem; }
.directive-grid { display: grid; gap: 1.5rem; grid-template-columns: repeat(2, minmax(0, 1fr)); margin-inline: auto; max-width: 1040px; }
.directive-card { background: #fff; border: 1px solid var(--line); border-radius: 1.1rem; box-shadow: 0 14px 35px rgba(14, 40, 59, .07); overflow: hidden; }
.directive-photo { aspect-ratio: 5 / 4; background: #eef1f4; overflow: hidden; position: relative; }
.directive-photo::after, .councilor-photo::after { background: linear-gradient(180deg, transparent 55%, rgba(11, 34, 51, .72)); content: ''; inset: 0; pointer-events: none; position: absolute; }
.directive-photo img, .councilor-photo img { height: 100%; object-fit: cover; object-position: center top; transition: transform .35s ease; width: 100%; }
.directive-card:hover .directive-photo img, .councilor-card:hover .councilor-photo img { transform: scale(1.02); }
.directive-photo > span, .councilor-photo > span { background: var(--brand); border-radius: 999px; bottom: 1rem; color: #fff; font-size: .72rem; font-weight: 800; left: 1rem; letter-spacing: .06em; padding: .5rem .8rem; position: absolute; text-transform: uppercase; z-index: 1; }
.directive-info { padding: 1.5rem; }
.directive-info h2 { color: var(--ink); font-size: 1.5rem; font-weight: 800; line-height: 1.25; margin-bottom: 1.2rem; }
.member-facts > div { display: grid; gap: .4rem; grid-template-columns: 80px minmax(0, 1fr); padding: .7rem 0; }
.member-facts > div + div { border-top: 1px solid var(--line); }
.member-facts dt { color: var(--brand); font-size: .7rem; letter-spacing: .06em; text-transform: uppercase; }
.member-facts dd { color: var(--ink); font-size: .88rem; line-height: 1.5; margin: 0; }
.councilor-card { background: #fff; border: 1px solid var(--line); border-radius: 1rem; box-shadow: 0 12px 30px rgba(14, 40, 59, .06); overflow: hidden; }
.councilor-photo { aspect-ratio: 4 / 5; background: #eef1f4; overflow: hidden; position: relative; }
.councilor-info { padding: 1.25rem; }
.councilor-info h2 { color: var(--ink); font-size: 1.15rem; font-weight: 800; line-height: 1.3; margin-bottom: 1rem; min-height: 3rem; }
.councilor-info p { align-items: flex-start; color: var(--muted); display: flex; font-size: .82rem; gap: .6rem; line-height: 1.45; margin-bottom: .55rem; }
.councilor-info p:last-child { margin-bottom: 0; }
.councilor-info i { color: var(--brand); flex: 0 0 14px; margin-top: .2rem; text-align: center; }
.party-flag { --party-color: #75808c; align-items: flex-start; display: flex; gap: .6rem; }
.party-flag--anr { --party-color: #c61f35; }
.party-flag--plra { --party-color: #2455a4; }
.councilor-info .party-flag i, .member-facts .party-flag i { color: var(--party-color); }
.member-facts .party-flag i { flex: 0 0 14px; margin-top: .22rem; text-align: center; }
.authorities-next { align-items: center; background: #f7f9fb; border: 1px solid var(--line); border-radius: 1rem; display: flex; gap: 2rem; justify-content: space-between; margin-top: 3rem; padding: 1.5rem 1.7rem; }
.authorities-next h2 { color: var(--ink); font-size: 1.45rem; font-weight: 800; margin-bottom: .3rem; }
.authorities-next p:not(.section-kicker) { color: var(--muted); margin: 0; }
.authorities-next .btn { flex: 0 0 auto; }
.page-news-sidebar { align-self: flex-start; }
.news-sidebar-stack { display: grid; gap: 1rem; position: sticky; top: 112px; }
.news-sidebar-search, .news-sidebar-card { background: #f7f9fb; border: 1px solid var(--line); border-radius: 1rem; padding: 1.25rem; }
.news-sidebar-search label { color: var(--ink); display: block; font-size: .82rem; font-weight: 800; margin-bottom: .65rem; }
.news-sidebar-search .input-group { box-shadow: 0 8px 20px rgba(14, 40, 59, .06); }
.news-sidebar-search .input-group-text, .news-sidebar-search .form-control { background: #fff; border-color: #dbe3ea; }
.news-sidebar-search .input-group-text { border-right: 0; color: var(--brand); }
.news-sidebar-search .form-control { border-left: 0; box-shadow: none; font-size: .86rem; min-height: 46px; }
.news-sidebar-search .btn { align-items: center; display: inline-flex; justify-content: center; min-width: 46px; }
.news-sidebar-card h2 { color: var(--ink); font-size: 1.4rem; font-weight: 800; margin-bottom: .5rem; }
.news-sidebar-list article { padding: .9rem 0; }
.news-sidebar-list article + article { border-top: 1px solid var(--line); }
.news-sidebar-list p { color: var(--muted); font-size: .7rem; font-weight: 700; letter-spacing: .04em; margin: 0 0 .35rem; }
.news-sidebar-list h3 { font-size: .88rem; font-weight: 750; line-height: 1.4; margin: 0; }
.news-sidebar-list h3 a { color: var(--ink); text-decoration: none; }
.news-sidebar-list h3 a:hover { color: var(--brand); }
.news-sidebar-all { align-items: center; border-top: 1px solid var(--line); color: var(--brand); display: flex; font-size: .82rem; font-weight: 800; justify-content: space-between; padding-top: 1rem; text-decoration: none; }
.news-sidebar-all i { transition: transform .2s ease; }
.news-sidebar-all:hover { color: var(--brand-dark); }
.news-sidebar-all:hover i { transform: translateX(3px); }

.contact-hero { background: #f7f9fb; }
.contact-lead { color: var(--muted); font-size: 1.05rem; line-height: 1.7; max-width: 700px; }
.contact-section-heading { margin-bottom: 1.35rem; }
.contact-section-heading h2 { font-size: 1.6rem; font-weight: 800; letter-spacing: -.025em; margin: 0; }
.contact-cards { display: grid; gap: 1rem; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.contact-card { background: #fff; border: 1px solid var(--line); border-radius: 1rem; display: flex; flex-direction: column; padding: 1.5rem; }
.contact-icon { align-items: center; background: #fbecef; border-radius: .8rem; color: var(--brand); display: inline-flex; flex: 0 0 48px; font-size: 1.1rem; height: 48px; justify-content: center; width: 48px; }
.contact-card .contact-icon { flex-basis: auto; margin-bottom: 1.1rem; }
.contact-card h3 { color: var(--muted); font-size: .82rem; font-weight: 700; margin-bottom: .65rem; }
.contact-phone, .contact-hours { color: var(--ink); font-size: clamp(1.2rem, 1.8vw, 1.5rem); font-weight: 800; letter-spacing: -.025em; text-decoration: none; }
.contact-phone:hover { color: var(--brand); }
.contact-card p { color: var(--muted); font-size: .86rem; line-height: 1.5; margin: .5rem 0 1.2rem; }
.contact-card-link, .contact-card-note { border-top: 1px solid var(--line); font-size: .79rem; margin-top: auto; padding-top: 1rem; }
.contact-card-link { align-items: center; color: var(--brand); display: flex; font-weight: 800; justify-content: space-between; text-decoration: none; }
.contact-card-note { color: var(--muted); }
.contact-location { border: 1px solid var(--line); border-radius: 1.1rem; margin-top: 1.5rem; overflow: hidden; }
.contact-location-header { align-items: flex-start; display: flex; gap: 1rem; padding: 1.5rem; }
.contact-location-header h2 { font-size: 1.5rem; font-weight: 800; margin-bottom: .5rem; }
.contact-location-header address { color: var(--muted); font-size: .9rem; line-height: 1.65; margin: 0; }
.contact-map { background: #edf1f5; height: 380px; }
.contact-map iframe { border: 0; display: block; height: 100%; width: 100%; }
.contact-map-actions { align-items: center; background: #f7f9fb; display: flex; flex-wrap: wrap; gap: 1rem; padding: 1.25rem 1.5rem; }
.contact-map-actions p { color: var(--muted); flex-basis: 100%; font-size: .86rem; margin: 0; }
.contact-map-actions .btn { min-height: 44px; }
.contact-map-link { color: var(--ink); font-size: .8rem; font-weight: 700; text-decoration: none; }
.contact-map-link:hover { color: var(--brand); }
.contact-map-link i { margin-left: .35rem; }
.contact-social { align-items: center; background: #f7f9fb; border: 1px solid var(--line); border-radius: 1rem; display: flex; flex-wrap: wrap; gap: 1rem; margin-top: 1.5rem; padding: 1.4rem; }
.contact-social > div { flex: 1 1 200px; }
.contact-social h2 { font-size: 1.05rem; font-weight: 800; margin-bottom: .4rem; }
.contact-social p { color: var(--muted); font-size: .85rem; line-height: 1.55; margin: 0; }
.contact-social .btn { font-size: .85rem; min-height: 44px; }

@media (max-width: 575.98px) {
  .contact-cards { grid-template-columns: 1fr; }
  .contact-location-header { padding: 1.2rem; }
  .contact-location-header .section-kicker { font-size: .65rem; }
  .contact-map { height: 300px; }
  .contact-map-actions { align-items: flex-start; flex-direction: column; padding: 1.2rem; }
  .contact-map-actions p { flex-basis: auto; }
}

@media (max-width: 991.98px) {
  .authorities-summary { margin-left: 0; }
  .news-sidebar-stack { margin-top: 1rem; position: static; }
}

@media (max-width: 767.98px) {
  .directive-grid { grid-template-columns: 1fr; }
  .directive-photo { aspect-ratio: 4 / 3; }
  .authorities-next { align-items: flex-start; flex-direction: column; }
}

@media (max-width: 575.98px) {
  .directive-info { padding: 1.2rem; }
  .directive-info h2 { font-size: 1.25rem; }
  .member-facts > div { grid-template-columns: 1fr; }
  .councilor-info h2 { min-height: 0; }
  .authorities-next { padding: 1.2rem; }
}
@media (max-width: 575.98px) {
  .resolution-feed-item, .ordinance-feed-item { flex-direction: column; }
  .resolution-feed-cover, .ordinance-feed-cover { flex-basis: auto; flex-direction: row; gap: .75rem; min-height: 64px; width: 100%; }
  .resolution-body, .ordinance-body { font-size: .96rem; }
  .resolution-body td, .resolution-body th, .ordinance-body td, .ordinance-body th { font-size: .82rem; padding: .5rem; }
}
@media print {
  .resolution-page .post-actions, .resolution-related, .resolution-page .btn, .ordinance-page .post-actions, .ordinance-related, .ordinance-page .btn, .page-news-sidebar, body:has(.resolution-page) .navbar, body:has(.resolution-page) .topbar, body:has(.resolution-page) .site-footer, body:has(.ordinance-page) .navbar, body:has(.ordinance-page) .topbar, body:has(.ordinance-page) .site-footer { display: none !important; }
  .resolution-page .col-lg-8, .resolution-page .col-lg-9, .ordinance-page .col-lg-8, .ordinance-page .col-lg-9 { width: 100%; }
  .resolution-page .post-header, .ordinance-page .post-header { background: #fff; padding-block: 1rem; }
  .resolution-page .post-title, .ordinance-page .post-title { font-size: 1.6rem; }
  .resolution-body, .ordinance-body { font-size: 11pt; }
}

/* Escritorio: los submenús se activan con el puntero, sin requerir clic. */
@media (min-width: 1200px) {
  .navbar .dropdown-menu {
    display: block;
    margin-top: 0;
    opacity: 0;
    pointer-events: none;
    transform: translateY(-.45rem);
    transition: opacity .16s ease, transform .16s ease;
    visibility: hidden;
  }

  .navbar .dropdown-menu.show {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
    visibility: visible;
  }

  .navbar .dropdown-toggle::after { transition: transform .16s ease; }
  .navbar .dropdown:has(.dropdown-menu.show) .dropdown-toggle::after { transform: rotate(180deg); }
}

/* Tablet: menú y grilla se mantienen cómodos entre 576 px y 991 px. */
@media (max-width: 1199.98px) {
  .navbar { position: relative; }
  .navbar-collapse { border-top: 1px solid var(--line); margin-top: .7rem; padding: .7rem 0 1rem; }
  .nav-link { padding: .65rem 0; }
  .dropdown-menu { border: 0; box-shadow: none !important; max-height: none; padding-left: .75rem; }
  .submenu-card { min-width: 0; padding: .7rem 0 .7rem .75rem; }
  .commissions-menu .row { row-gap: 0 !important; }
  .submenu-card__heading { padding-left: .65rem; }
  .brand-mark { width: 164px; }
  .feature-card img { height: 290px; }
  .article-image { min-height: 220px; }
}

/* En tablet se ajustan altura y tipografía sin desbordar el banner. */
@media (max-width: 991.98px) {
  .hero { height: 620px; }
  .hero-layout { max-width: 720px; padding-bottom: 7rem; }
  .hero-copy { max-width: 540px; }
  .hero h1 { font-size: clamp(2rem, 5vw, 3rem); }
  .hero-note { margin-top: 1.25rem; }
}

/* En móvil se prioriza la imagen institucional y se evita que el hero ocupe
   varias pantallas con controles y texto que ya aparecen en el contenido. */
@media (max-width: 767.98px) {
  .hero { height: auto; }
  .hero-layout { display: flex; flex-direction: column; padding: 0; }
  .hero-gallery { order: -1; position: relative; width: 100%; }
  .hero-gallery::after { display: none; }
  /* Cada foto conserva todo su ancho y su proporción natural. La grilla
     reserva la altura de la más alta para que los controles no salten. */
  .hero-slides { aspect-ratio: auto; display: grid; height: auto; }
  .hero-slide { align-self: center; grid-area: 1 / 1; inset: auto; position: relative; width: 100%; }
  .hero-slide-image { height: auto; object-fit: contain; object-position: center; width: 100%; }
  .hero-copy, .hero-toolbar { display: none; }
}

/* Móvil: se evita texto comprimido y las tarjetas de noticias quedan verticales. */
@media (max-width: 575.98px) {
  .topbar .container { justify-content: center !important; text-align: center; }
  .topbar .mx-2 { display: none; }
  .brand-mark { width: 145px; max-height: 62px; }
  .hero h1 { font-size: clamp(2rem, 8vw, 2.6rem); }
  .hero-actions { gap: .6rem; }
  .hero-actions .btn { font-size: .88rem; padding-inline: 1rem !important; }
  .section-title { font-size: 1.85rem; }
  .quick-link { padding: 1rem; }
  .feature-card img { height: 210px; }
  .article-image { height: 210px; min-height: 0; }
  .news-card .row { display: block; }
  .news-card .col-sm-5, .news-card .col-sm-7 { width: 100%; }
  .cta { border-radius: 1rem; }
  .footer-main { padding: 3rem 0 2rem; }
  .footer-bottom { align-items: flex-start; flex-direction: column; }
  .back-to-top { bottom: 1rem; height: 44px; right: 1rem; width: 44px; }
  .page-hero { padding: 2.5rem 0; }
  .news-feed-item { gap: 1rem; padding: 1.25rem 0; }
  .news-feed-image { flex-basis: 140px; height: 105px; }
  .news-feed-content h2 { font-size: 1.08rem; }
  .news-feed-summary { font-size: .9rem; }
  .post-image { height: 270px; }
  .post-header { padding: 2rem 0; }
  .post-actions { justify-content: flex-start; }
  .post-share-menu { left: 0; right: auto; }
  .news-feed-item { flex-direction: column; }
  .news-feed-image { flex-basis: auto; height: auto; aspect-ratio: 16 / 9; width: 100%; }
  .resolution-feed-cover, .ordinance-feed-cover { flex-basis: auto; min-height: 105px; width: 100%; }
  .news-feed-content { width: 100%; }
  .news-search .form-select { min-width: 0; }
}

/* Pantallas muy pequeñas: evita columnas y controles demasiado angostos. */
@media (max-width: 374.98px) {
  .brand-mark { width: 125px; }
  .navbar .container { padding-inline: .8rem; }
  .hero h1 { font-size: 2.1rem; }
  .quick-link { gap: .75rem; }
  .news-feed-item { gap: .8rem; }
  .news-feed-image { flex-basis: auto; height: auto; }
  .pagination-news .page-link { padding-inline: .65rem; }
  .pagination-news .page-link span { display: none; }
  .footer-bottom { font-size: .75rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-slide { transition: none; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

.cta-links a { align-items: center; color: #fff; display: inline-flex; min-height: 44px; padding: .55rem .8rem; text-decoration: none; transition: background .18s ease, border-color .18s ease; }
.cta-links a:hover { background: rgba(255,255,255,.25); border-color: rgba(255,255,255,.65); }
.home-authorities { background: #fff; border-top: 1px solid var(--line); padding: 4rem 0; }
.home-authorities-heading { display: grid; grid-template-columns: 1.4fr 1fr; align-items: end; gap: 3rem; margin-bottom: 1.75rem; }
.home-authorities-heading .section-title { margin-bottom: 0; }
.home-authorities-heading > p { color: var(--muted); line-height: 1.7; margin: 0; }
.home-authorities-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 1.5rem; }
.home-authority-card { background: #f8fafc; border: 1px solid var(--line); border-radius: 1rem; color: var(--ink); display: flex; flex-direction: column; padding: 1.75rem; text-decoration: none; transition: background .18s ease, border-color .18s ease, box-shadow .18s ease; }
.home-authority-card:hover { background: #fff; border-color: #e2b6bd; box-shadow: 0 10px 28px rgba(16,37,54,.08); color: var(--ink); }
.home-authority-icon { align-items: center; background: #fbecef; border-radius: .8rem; color: var(--brand); display: inline-flex; font-size: 1.25rem; height: 48px; justify-content: center; margin-bottom: 1.25rem; width: 48px; }
.home-authority-card h3 { font-size: 1.2rem; font-weight: 750; margin: 0 0 .75rem; }
.home-authority-card p { color: var(--muted); font-size: .95rem; line-height: 1.7; margin: 0 0 1.5rem; }
.home-authority-action { align-items: center; color: var(--brand); display: flex; font-size: .88rem; font-weight: 750; gap: .75rem; justify-content: space-between; margin-top: auto; }
@media (max-width: 991.98px) {
  .home-authorities-heading { grid-template-columns: 1fr; gap: .75rem; }
  .home-authorities-grid { gap: 1rem; }
  .home-authority-card { padding: 1.25rem; }
}
@media (max-width: 767.98px) {
  .home-authorities { padding: 2.5rem 0; }
  .home-authorities-grid { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) { .home-authority-card, .cta-links a { transition: none; } }

/* Noticias de inicio: en tablet cada tarjeta conserva todo el ancho del texto. */
@media (min-width: 768px) and (max-width: 1199.98px) {
  #noticias .news-card > .row { flex-direction: column; }
  #noticias .news-card .col-sm-5,
  #noticias .news-card .col-sm-7 { width: 100%; }
  #noticias .news-card .col-sm-7 { flex: 1; }
  #noticias .article-image { display: block; height: 210px; min-height: 0; object-position: center 30%; }
  #noticias .news-card__body { padding: 1.25rem !important; }
  #noticias .news-card h3 { font-size: 1.1rem; line-height: 1.4; }
  #noticias .news-card__summary { font-size: .9rem; line-height: 1.65; }
  #noticias .news-card .btn { min-height: 44px; display: inline-flex; align-items: center; }
}

/* Pie del portal en tablet: presentación y contacto, seguidos de enlaces. */
@media (min-width: 768px) and (max-width: 991.98px) {
  .site-footer .footer-main {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 2rem 2.5rem;
    margin: 0;
    padding: 2.75rem 0 2rem;
  }
  .site-footer .footer-main > div { width: auto; min-width: 0; margin: 0; padding: 0; }
  .site-footer .footer-main > div:nth-child(1) { grid-column: 1; grid-row: 1; }
  .site-footer .footer-main > div:nth-child(4) { grid-column: 2; grid-row: 1; }
  .site-footer .footer-main > div:nth-child(2) { grid-column: 1; grid-row: 2; }
  .site-footer .footer-main > div:nth-child(3) { grid-column: 2; grid-row: 2; }
  .site-footer .footer-intro { font-size: .9rem; margin-bottom: 1rem; }
  .site-footer .footer-links { margin-bottom: 0; }
  .site-footer .footer-links a { display: inline-flex; align-items: center; min-height: 36px; }
  .site-footer .footer-links li + li { margin-top: .2rem; }
  .site-footer .footer-contact i { flex-shrink: 0; }
  .site-footer .footer-contact li { line-height: 1.7; }
  .site-footer .footer-bottom { gap: .75rem 1.5rem; padding: 1.25rem 3.5rem 1.25rem 0; }
}

.post-gallery { border-top: 1px solid var(--line); margin-top: 2.5rem; padding-top: 2rem; }
.post-gallery-heading { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1.25rem; }
.post-gallery-heading h2 { font-size: 1.5rem; font-weight: 750; margin: 0; }
.post-gallery-heading span { color: var(--muted); font-size: .9rem; }
.post-gallery-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 1rem; }
.post-gallery-grid figure { margin: 0; min-width: 0; }
.post-gallery-grid a { display: block; border-radius: .75rem; overflow: hidden; }
.post-gallery-grid img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.post-gallery-grid figcaption { color: var(--muted); font-size: .85rem; margin-top: .5rem; }
.post-gallery-dialog { background: #102536; border: 0; border-radius: 1rem; color: #fff; max-width: 1100px; width: calc(100% - 32px); max-height: 92dvh; padding: 3.5rem 1rem 1rem; }
.post-gallery-dialog::backdrop { background: rgba(0,0,0,.8); }
.gallery-full-image { display: block; width: 100%; height: min(65dvh,720px); object-fit: contain; }
.gallery-close { position: absolute; top: .5rem; right: .75rem; font-size: 1.75rem; }
.post-gallery-dialog button { border: 1px solid #ffffff55; border-radius: .5rem; background: transparent; color: #fff; min-width: 44px; min-height: 44px; }
.post-gallery-dialog button:hover { background: #ffffff22; }
.gallery-caption { text-align: center; margin: .75rem 0; }
.gallery-controls { display: flex; align-items: center; justify-content: center; gap: 1.5rem; }
body.gallery-open { overflow: hidden; }
@media (max-width: 575.98px) { .post-gallery-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: .75rem; } }
@media print { .post-gallery-dialog { display: none; } }
