/* === Gotham Fonts === */
@font-face { font-family: 'Gotham'; src: url('../fuentes/GOTHAM-LIGHT.OTF') format('opentype'); font-weight: 300; font-style: normal; font-display: swap; }
@font-face { font-family: 'Gotham'; src: url('../fuentes/GOTHAM-LIGHTITA.OTF') format('opentype'); font-weight: 300; font-style: italic; font-display: swap; }
@font-face { font-family: 'Gotham'; src: url('../fuentes/GOTHAM-BOOK.OTF') format('opentype'); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: 'Gotham'; src: url('../fuentes/GOTHAM-BOOKITA.OTF') format('opentype'); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: 'Gotham'; src: url('../fuentes/GOTHAM-MEDIUM.OTF') format('opentype'); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: 'Gotham'; src: url('../fuentes/GOTHAM-MEDIUMITALIC.OTF') format('opentype'); font-weight: 500; font-style: italic; font-display: swap; }
@font-face { font-family: 'Gotham'; src: url('../fuentes/GOTHAMBOLD.OTF') format('opentype'); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: 'Gotham'; src: url('../fuentes/GOTHAMBOLDITALIC.TTF') format('truetype'); font-weight: 700; font-style: italic; font-display: swap; }
@font-face { font-family: 'Gotham'; src: url('../fuentes/GOTHAM-BLACK.OTF') format('opentype'); font-weight: 800; font-style: normal; font-display: swap; }
@font-face { font-family: 'Gotham'; src: url('../fuentes/GOTHAM-BLACKITA.OTF') format('opentype'); font-weight: 800; font-style: italic; font-display: swap; }

/* === Base === */
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; background: #fff; font-family: 'Gotham', Arial, sans-serif; -webkit-font-smoothing: antialiased; }
a { color: inherit; }

/* === Layout === */
.page { width: 100%; background: #fff; color: #3a3a3a; }
.container { max-width: 1620px; margin: 0 auto; }

/* === Header === */
.header { background: #fff; }
.header-inner { padding: 30px 48px 26px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.header-brand { display: flex; align-items: center; gap: 18px; }
.header-logo-placeholder { width: 60px; height: 78px; border: 2px solid #b6b3ad; border-radius: 50% 50% 47% 47%; background: #edece8; flex: none; }
.header-brand-text { line-height: 1.05; }
.header-brand-name { font-weight: 700; font-size: 27px; color: #5b6260; letter-spacing: .5px; }
.header-brand-region { font-weight: 400; font-size: 16px; color: #9aa0a4; letter-spacing: 2px; margin-top: 3px; }
.header-logos { display: flex; align-items: flex-start; gap: 26px; }
.header-logo-item { display: flex; flex-direction: column; align-items: center; gap: 5px; }
.header-logo-img { height: 39px; display: block; }
.header-visit { font-weight: 600; font-size: 10px; color: #6a6f72; letter-spacing: 1.2px; }
.header-divider { width: 1px; height: 52px; background: #dcdcdc; }
.header-diputados-row { display: flex; align-items: center; gap: 11px; height: 42px; }
.header-diputados-icon { width: 48px; height: 27px; background: #0a5ca8; border-radius: 48px 48px 0 0; flex: none; }
.header-diputados-text { line-height: 1; text-align: left; }
.header-diputados-name { font-weight: 700; font-size: 19px; color: #0a5ca8; letter-spacing: .5px; }
.header-diputados-region { font-weight: 600; font-size: 12px; color: #6a6f72; letter-spacing: 1.5px; margin-top: 2px; }

/* === Navbar === */
.navbar { background: #043C66; }
.navbar-inner { padding: 17px 48px; display: flex; justify-content: center; align-items: center; position: relative; }
.nav-links { display: flex; align-items: center; gap: 15px; flex-wrap: wrap; justify-content: center; }
.nav-link { font-weight: 400; font-size: 13px; color: #fff; text-decoration: none; letter-spacing: .6px; }
.nav-sep { color: #3f6c8e; font-size: 14px; }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  width: 100%;
  justify-content: flex-end;
  align-items: center;
  flex-direction: row;
  gap: 0;
}
.nav-toggle-lines {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: #fff;
  border-radius: 2px;
  transition: transform .25s ease, opacity .2s ease;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* === Footer === */
.footer-nav { background: #043C66; }
.footer-nav-inner { padding: 16px 48px; display: flex; justify-content: center; align-items: center; gap: 30px; }
.footer-link { font-weight: 600; font-size: 15px; color: #fff; text-decoration: none; letter-spacing: .5px; }
.footer-sep { color: #3f6c8e; }
.footer-copy { background: #fff; text-align: center; padding: 18px; font-weight: 400; font-size: 12px; color: #8a8a8a; }

/* === Poder Legislativo === */
.intro { padding: 60px 48px 50px; }
.section-heading { margin: 0 0 26px; font-weight: 700; font-size: 28px; color: #043C66; letter-spacing: .5px; }
.body-text { margin: 0 0 22px; font-size: 19px; line-height: 1.6; color: #444; text-align: justify; max-width: 1360px; }
.body-text:last-child { margin-bottom: 0; }
.authority-block { background: #f2f2f2; padding: 52px 0; }
.authority-block + .authority-block { margin-top: 18px; }
.authority-inner { padding: 0 48px; }
.authority-header { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 40px; }
.authority-label { font-weight: 700; font-size: 15px; color: #043C66; letter-spacing: .5px; }
.authority-chamber { font-weight: 700; font-size: 27px; color: #043C66; letter-spacing: .5px; margin-top: 4px; }
.authority-logo { height: 46px; display: block; }
.authority-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 26px; }
.authority-card { text-align: center; }
.authority-photo { width: 100%; aspect-ratio: 1 / 1.04; background: #666; border-radius: 9px; }
.authority-lastname { font-weight: 700; font-size: 18px; color: #043C66; margin-top: 14px; }
.authority-firstname { font-weight: 600; font-size: 15px; color: #043C66; margin-top: 1px; }
.authority-role { font-weight: 400; font-size: 14px; color: #043C66; margin-top: 8px; }
.diputados-logo { display: flex; align-items: center; gap: 11px; line-height: 1; }
.diputados-icon { width: 52px; height: 29px; background: #0a5ca8; border-radius: 52px 52px 0 0; flex: none; }
.diputados-text-name { font-weight: 700; font-size: 21px; color: #0a5ca8; }
.diputados-text-region { font-weight: 600; font-size: 13px; color: #6a6f72; letter-spacing: 1.5px; margin-top: 2px; }

/* === Document pages (Constitución / Reglamentos) === */
.doc-section { padding: 60px 48px 30px; display: flex; gap: 64px; align-items: flex-start; }
.doc-section--last { padding-top: 30px; padding-bottom: 60px; }
.doc-text { flex: 1 1 auto; }
.doc-heading { margin: 0 0 26px; font-weight: 700; font-size: 28px; color: #043C66; letter-spacing: .5px; line-height: 1.12; }
.doc-para { margin: 0 0 22px; font-size: 16px; line-height: 1.6; color: #444; text-align: justify; }
.doc-para:last-child { margin-bottom: 0; }
.doc-aside { flex: 0 0 270px; text-align: center; }
.doc-img { width: 200px; object-fit: cover; border-radius: 14px; display: block; margin: 0 auto;}
.doc-img--200 { height: 200px; }
.doc-img--230 { height: 230px; }
.doc-img--border { border: 1px solid #e4e4e4; }
.doc-img--top { object-position: center top; }
.doc-caption-light { font-weight: 400; font-size: 15px; color: #043C66; margin-top: 14px; letter-spacing: .5px; }
.doc-caption-bold { font-weight: 700; font-size: 18px; color: #043C66; letter-spacing: .5px; }
.doc-caption-bold--sm { font-size: 21px; line-height: 1.15; }

/* === Digesto Jurídico === */
.digesto-section { padding: 64px 48px 70px; display: flex; gap: 64px; align-items: flex-start; }
.digesto-text { flex: 1 1 auto; }
.digesto-heading { margin: 0 0 28px; font-weight: 700; font-size: 28px; color: #043C66; letter-spacing: .5px; line-height: 1.12; }
.digesto-para { margin: 0 0 22px; font-size: 16px; line-height: 1.6; color: #444; text-align: justify; max-width: 980px; }
.digesto-para:last-of-type { margin-bottom: 0; }
.btn-access {
    display: inline-block;
    margin-top: 34px;
    background: #666;
    color: #fff;
    font-weight: 600;
    font-size: 16px;
    letter-spacing: 1px;
    text-decoration: none;
    padding: 5px 15px;
    border-radius: 5px;
}
.digesto-aside { flex: 0 0 360px; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 18px; padding-top: 6px; }
.digesto-escudo { width: 150px; height: 190px; border: 2px solid #9fb0bf; border-radius: 50% 50% 47% 47%; background: #e7ecf0; display: flex; align-items: center; justify-content: center; font-family: monospace; font-size: 13px; color: #7f95a7; }
.digesto-name { font-weight: 700; font-size: 42px; color: #0c3251; line-height: 1.05; }
.digesto-province { font-weight: 400; font-size: 28px; color: #0c3251; margin-top: 4px; }

/* === Home hero === */
.hero { background: #f2f2f2; }
.hero-img { width: 100%; height: 420px; object-fit: cover; object-position: center 30%; display: block; }
.hero-content { padding: 34px 48px 44px; }
.hero-card {
    background: #f2f2f2;
    display: flex;
    align-items: center;
    gap: 60px;
    padding: 54px 70px;
    max-width: 1200px;
    margin: 0 auto;
}
.hero-sidebar { flex: 0 0 460px; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 18px; }
.hero-escudo { width: 128px; height: 160px; border: 2px solid #9fb0bf; border-radius: 50% 50% 47% 47%; background: #e7ecf0; display: flex; align-items: center; justify-content: center; font-family: monospace; font-size: 12px; color: #7f95a7; }
.hero-digesto-name { font-weight: 700; font-size: 46px; color: #0c3251; line-height: 1.05; }
.hero-digesto-province { font-weight: 400; font-size: 30px; color: #0c3251; margin-top: 4px; }
.hero-main { flex: 1 1 auto; margin-top: 10px;}
.hero-title { margin: 0; font-weight: 700; font-size: 28px; color: #043C66; letter-spacing: .5px; }
.hero-subtitle {
    font-weight: 700;
    font-size: 11px;
    color: #5a6a78;
    /* letter-spacing: 1.5px; */
    margin: 0px 0 22px;
}
.hero-text { margin: 0; font-size: 15px; line-height: 1.55; color: #444; max-width: 660px; }
.hero-btn {
    display: inline-block;
    margin-top: 28px;
    background: #666;
    color: #fff;
    font-weight: 600;
    font-size: 16px;
    letter-spacing: 1px;
    text-decoration: none;
    padding: 5px 20px;
    border-radius: 10px;
}
.logo-header{
    display: table;
    max-width: 265px;
}

.logo-digesto{
    display: table;
    margin: 0 auto;
    width: 100%;
    max-width: 320px;
}

.link-legislativo{
    font-size: 9px;
    font-weight: 600;
    color: #606060;
    display: block;
    text-align: left;
    width: 100%;
    text-decoration: none;
    margin-left: 15px;
}

.main-container .container{
    max-width: 1300px;
}

/*.main-footer{
    border-top: 10px solid #F2F2F2;
}*/

.img-digesto{
    display: table;
    margin: 25px auto 0 auto;
    width: 100%;
    max-width: 330px;
}

/* ===== NUEVO FOOTER (links teal + copyright) ===== */
.footer-links { background: #f5f5f5; border-top: 1px solid #e0e0e0; }
.footer-links-inner { padding: 22px 48px; display: flex; justify-content: center; align-items: center; }
.footer-link-teal { font-weight: 400; font-size: 13px; color: #043C66; text-decoration: none; letter-spacing: .5px; }
.footer-link-teal:hover { color: #0a5ca8; text-decoration: underline; }
.footer-link-sep { color: #bbb; font-size: 14px; margin: 0 18px; }

/* ===== BÚSQUEDA (home) ===== */
.search-section { background: #fff; padding: 70px 48px 54px; }
.search-center { max-width: 780px; margin: 0 auto; }
.search-title { font-weight: 700; font-size: 42px; color: #043C66; margin: 0; text-align: center; letter-spacing: 3px; }
.search-subtitle { font-size: 19px; font-weight: 400; color: #333; margin: 0px 0 34px; text-align: center; line-height: 1.5; }
.search-bar { display: flex; margin-bottom: 12px; border-radius: 12px; overflow: hidden; border: 1.5px solid #c8d0da; background: #fff; }
.search-input { flex: 1; padding: 16px 22px; font-size: 15px; font-family: inherit; border: none; outline: none; color: #333; background: #fff; }
.search-input::placeholder { color: #aaa; }
.search-input:focus { outline: none; }
.search-btn {
    background: #3771AA;
    color: #fff;
    font-weight: 600;
    font-size: 15px;
    font-family: inherit;
    letter-spacing: .5px;
    padding: 15px 36px;
    border: none;
    cursor: pointer;
    white-space: nowrap;
    flex-shrink: 0;
    max-width: 180px;
    margin: 0;
    border-radius: 10px;
}
.search-btn:hover { background: #0a5ca8; }
.search-hint { font-size: 13px; color: #3771AA; margin: 0 0 30px; padding-left: 2px; }
.search-adv-btn { display: inline-block; background: #3771AA; color: #fff; font-weight: 600; font-size: 14px; font-family: inherit; letter-spacing: .5px; padding: 13px 28px; border-radius: 7px; text-decoration: none; border: none; cursor: pointer; }
.search-adv-btn:hover { background: #0a5ca8; }
.search-hero-img { width: 100%; height: 250px; object-fit: cover; object-position: center 30%; display: block; }

/* ===== BÚSQUEDA AVANZADA ===== */
.advsearch-section { padding: 60px 48px 80px; }
.advsearch-inner { max-width: 1200px; margin: 0 auto; }
.advsearch-title { font-weight: 700; font-size: 28px; color: #043C66; margin: 0 0 8px; }
.advsearch-subtitle { font-size: 15px; color: #555; margin: 0 0 40px; }
.advsearch-form { background: #f5f5f5; padding: 48px 52px; border-radius: 10px; }
.advsearch-row { display: flex; gap: 30px; margin-bottom: 28px; }
.advsearch-row:last-child { margin-bottom: 0; }
.advsearch-field { flex: 1; display: flex; flex-direction: column; gap: 8px; }
.advsearch-label { font-weight: 700; font-size: 14px; color: #333; }
.advsearch-input, .advsearch-select {
  padding: 11px 14px;
  font-size: 14px;
  font-family: inherit;
  border: 1.5px solid #d0d0d0;
  border-radius: 6px;
  background: #fff;
  color: #333;
  outline: none;
  width: 100%;
}
.advsearch-input:focus, .advsearch-select:focus { border-color: #043C66; }
.advsearch-select {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23666' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 38px;
  cursor: pointer;
}

/* ===== CÓDIGOS ===== */
.codes-section { padding: 60px 48px 80px; }
.codes-inner { max-width: 1200px; }
.codes-title { font-weight: 700; font-size: 28px; color: #043C66; margin: 0 0 26px; }
.codes-intro {
    font-size: 18px;
    color: #333;
    line-height: 1.65;
    margin: 0 0 16px;
    max-width: 1200px;
    text-align: justify;
}
.codes-list { list-style: none; padding: 0; margin: 44px 0 0; max-width: 680px; }
.codes-list li { border-top: 1px solid #ccc; }
.codes-list li:last-child { border-bottom: 1px solid #ccc; }
.codes-list a { display: block; padding: 16px 0; font-weight: 700; font-size: 16px; color: #043C66; text-decoration: none; }
.codes-list a:hover { color: #0a5ca8; }
.codes-list a .codes-law { font-weight: 400; }

/* ===== CONTACTO ===== */
.contact-section { padding: 60px 48px 80px; }
.contact-inner { max-width: 1200px; margin: 0 auto; display: flex; gap: 64px; align-items: flex-start; }
.contact-info { flex: 1; }
.contact-title { font-weight: 700; font-size: 28px; color: #043C66; margin: 0 0 10px; }
.contact-lead { font-size: 15px; color: #555; line-height: 1.65; margin: 0 0 36px; }
.contact-items { display: flex; flex-direction: column; gap: 22px; }
.contact-item { display: flex; gap: 16px; align-items: flex-start; }
.contact-icon { flex-shrink: 0; width: 42px; height: 42px; border-radius: 50%; background: #043C66; color: #fff; display: flex; align-items: center; justify-content: center; }
.contact-icon svg { width: 18px; height: 18px; }
.contact-item-body { flex: 1; }
.contact-item-label { font-weight: 700; font-size: 13px; color: #043C66; letter-spacing: .3px; margin-bottom: 3px; text-transform: uppercase; }
.contact-item-value { font-size: 14px; color: #444; line-height: 1.55; }
.contact-item-value a { color: #043C66; font-weight: 600; text-decoration: none; }
.contact-item-value a:hover { color: #0a5ca8; text-decoration: underline; }
.contact-form-wrap { flex: 1; }
.contact-form-title { font-weight: 700; font-size: 17px; color: #043C66; margin: 0 0 20px; }
.contact-form { display: flex; flex-direction: column; gap: 16px; }
.contact-field { display: flex; flex-direction: column; gap: 7px; }
.contact-label { font-weight: 700; font-size: 13px; color: #333; }
.contact-input, .contact-textarea { padding: 11px 14px; font-size: 14px; font-family: inherit; border: 1.5px solid #d0d0d0; border-radius: 6px; background: #fff; color: #333; outline: none; width: 100%; box-sizing: border-box; transition: border-color .2s; }
.contact-input:focus, .contact-textarea:focus { border-color: #043C66; }
.contact-textarea { resize: vertical; min-height: 120px; }
.contact-submit { align-self: flex-start; background: #043C66; color: #fff; font-weight: 700; font-size: 14px; font-family: inherit; letter-spacing: .5px; padding: 13px 32px; border: none; border-radius: 7px; cursor: pointer; transition: background .2s; }
.contact-submit:hover { background: #0a5ca8; }
.contact-notice { background: #ecfdf5; border: 1px solid #6ee7b7; border-radius: 6px; padding: 12px 16px; margin-bottom: 16px; color: #065f46; font-size: 14px; font-weight: 600; }
.contact-errors { background: #fef2f2; border: 1px solid #fca5a5; border-radius: 6px; padding: 12px 16px; margin-bottom: 16px; color: #991b1b; font-size: 13px; }
.contact-errors ul { margin: 6px 0 0; padding-left: 18px; }

/* ===== ANTECEDENTES / TIMELINE ===== */
.antec-section { padding: 60px 48px 0; }
.antec-intro { max-width: 1200px; }
.antec-title { font-weight: 700; font-size: 28px; color: #043C66; margin: 0 0 26px; }
.antec-para { font-size: 15px; color: #444; line-height: 1.65; margin: 0 0 16px; text-align: justify; max-width: 1200px; }

.timeline { position: relative; max-width: 860px; margin: 60px auto 0; padding-bottom: 40px; }
.timeline::before { content: ''; position: absolute; left: 50%; top: 0; bottom: 0; width: 2px; background: #ccc; transform: translateX(-50%); }
.tl-item { display: grid; grid-template-columns: 1fr 30px 1fr; align-items: start; margin-bottom: 44px; }
.tl-left-content { padding-right: 30px; text-align: right; }
.tl-center-dot { display: flex; justify-content: center; padding-top: 10px; }
.tl-dot { width: 16px; height: 16px; border-radius: 50%; background: #043C66; flex-shrink: 0; position: relative; z-index: 1; }
.tl-right-content { padding-left: 30px; text-align: left; }
.tl-year { font-weight: 800; font-size: 38px; line-height: 1; margin-bottom: 8px; color: #043C66; }
.tl-sublabel { font-size: 11px; font-weight: 700; letter-spacing: .5px; color: #555; margin-bottom: 2px; text-transform: uppercase; }
.tl-text { font-size: 13px; color: #444; line-height: 1.6; }
.tl-text strong { font-weight: 700; }

.video-block {
    padding: 25px;
    text-align: center;
    margin: 25px 0;
}

.video-tag { font-size: 11px; font-weight: 700; color: #e06060; letter-spacing: 1.5px; margin-bottom: 2px; }
.video-tag-title { font-size: 16px; font-weight: 700; color: #e06060; letter-spacing: 1px; margin-bottom: 44px; }
.video-digesto-logo { max-width: 280px; filter: brightness(0) invert(1); display: block; margin: 0 auto; }

/* ===== FAQ ===== */
.faq-section { padding: 60px 48px 80px; }
.faq-inner { max-width: 1200px; margin: 0 auto; }
.faq-title { font-weight: 700; font-size: 28px; color: #043C66; margin: 0 0 40px; }
.faq-item { border-top: 1px solid #ccc; }
.faq-item:last-child { border-bottom: 1px solid #ccc; }
.faq-btn { width: 100%; display: flex; justify-content: space-between; align-items: center; padding: 18px 0; background: none; border: none; cursor: pointer; text-align: left; font-family: inherit; }
.faq-q { font-weight: 700; font-size: 15px; color: #043C66; flex: 1; line-height: 1.4; }
.faq-btn:hover .faq-q { color: #0a5ca8; }
.faq-icon { font-size: 18px; color: #666; margin-left: 16px; flex-shrink: 0; transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1); }
.faq-item.is-open .faq-icon { transform: rotate(180deg); }
.faq-body {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  padding: 0;
  font-size: 14px;
  color: #555;
  line-height: 1.65;
  transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1),
              opacity 0.3s ease,
              padding 0.3s ease;
}
.faq-item.is-open .faq-body {
  max-height: 400px;
  opacity: 1;
  padding: 0 0 22px;
}

/* ===== TOGGLE BÚSQUEDA AVANZADA ===== */
.adv-wrap {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  margin-top: 0;
  transition: max-height 0.45s cubic-bezier(0.4, 0, 0.2, 1),
              opacity 0.3s ease,
              margin-top 0.3s ease;
}
.adv-wrap.is-open {
  max-height: 800px;
  opacity: 1;
  margin-top: 28px;
}
.adv-toggle-arrow {
  display: inline-block;
  margin-left: 8px;
  font-size: 11px;
  vertical-align: middle;
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}
.search-adv-btn.is-open .adv-toggle-arrow { transform: rotate(180deg); }
.adv-close-btn {
  display: block;
  width: 100%;
  margin-top: 22px;
  padding: 12px 0 0;
  border: none;
  border-top: 1px solid #ddd;
  background: none;
  color: #043C66;
  font-weight: 600;
  font-size: 13px;
  font-family: inherit;
  letter-spacing: .3px;
  cursor: pointer;
  text-align: center;
  transition: color 0.2s;
}
.adv-close-btn:hover { color: #0a5ca8; }

/* ===== GLOSARIO ===== */
.glosario-section { padding: 60px 48px 80px; }
.glosario-inner { max-width: 1200px; }

/* === Responsive === */

/* Protección global de imágenes */
img { max-width: 100%; height: auto; }

/* Grilla de autoridades intrínseca — se adapta sin breakpoints */
.authority-grid {
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
}

/* ── Tablet ≤1024px ── */
@media (max-width: 1024px) {
  .header-inner { padding: 20px 24px 18px; }
  .navbar-inner  { padding: 14px 24px; }
  .nav-links     { gap: 14px 18px; }
  .logo-header   { max-width: 220px; }

  .intro            { padding: 40px 24px 36px; }
  .authority-inner  { padding: 0 24px; }

  .doc-section      { padding: 44px 24px 24px; gap: 40px; }
  .doc-section--last{ padding-top: 24px; padding-bottom: 44px; }
  .digesto-section  { padding: 44px 24px 50px; gap: 40px; }
  .digesto-aside    { flex: 0 0 280px; }

  .hero-card    { padding: 36px 32px; gap: 36px; }
  .hero-sidebar { flex: 0 0 280px; }
  .hero-img     { height: clamp(240px, 30vw, 420px); }
}

/* ── Mid ≤820px — hero y docs pasan a columna ── */
@media (max-width: 820px) {
  .search-title { font-size: 40px; }
  .search-section { padding: 50px 24px 40px; }
  .search-hero-img { height: 240px; }
  .advsearch-section { padding: 40px 24px 60px; }
  .advsearch-form { padding: 30px 28px; }
  .advsearch-row { flex-direction: column; gap: 18px; }
  .antec-section { padding: 40px 24px 0; }
  .tl-year { font-size: 28px; }
  .tl-left-content { padding-right: 18px; }
  .tl-right-content { padding-left: 18px; }
  .video-block { padding: 60px 24px; }
  .faq-section { padding: 40px 24px 60px; }
  .codes-section { padding: 40px 24px 60px; }
  .contact-section { padding: 40px 24px 60px; }
  .contact-inner { flex-direction: column; gap: 44px; }

  .hero-card {
    flex-direction: column;
    padding: 28px 24px 36px;
    gap: 22px;
    max-width: 600px;
  }
  .hero-sidebar { flex: none; width: 100%; }
  .hero-main    { margin-top: 0; }
  .logo-digesto { max-width: 240px; }

  .doc-section      { flex-direction: column; gap: 28px; }
  .doc-section--last{ padding-top: 0; }
  .doc-aside        { flex: none; width: 100%; }

  .digesto-section { flex-direction: column; gap: 28px; }
  .digesto-aside   { flex: none; width: 100%; }
  .img-digesto     { max-width: 260px; margin: 0 auto; }

  .authority-chamber { font-size: 24px; }
}

/* ── Mobile ≤580px ── */
@media (max-width: 580px) {
  .logo-header {
    max-width: 200px;

    }

  .header-inner {
    padding: 14px 16px 12px;
    flex-direction: column;
    align-items: center;
    gap: 12px;
  }
  .header-logos   { gap: 14px; }
  .header-logo-img{ height: 28px; }
  .header-divider { height: 36px; }
  .link-legislativo { display: none; }

  .navbar-inner { padding: 0; flex-wrap: wrap; justify-content: flex-end; }
  .nav-toggle   { display: flex; padding: 10px 16px; }
  .nav-links    { display: none; width: 100%; flex-direction: column; align-items: stretch; padding-bottom: 10px; }
  .navbar.nav-open .nav-links { display: flex; }
  .nav-links .nav-link {
    font-size: 13px;
    padding: 11px 20px;
    text-align: center;
    border-bottom: 1px solid rgba(255,255,255,.1);
    letter-spacing: .4px;
  }
  .nav-links .nav-sep { display: none; }

  .hero-img   { height: clamp(150px, 40vw, 220px); }
  .hero-card  { padding: 20px 16px 28px; gap: 18px; }
  .hero-title { font-size: 20px; }
  .hero-text  { font-size: 14px; }
  .logo-digesto { max-width: 200px; }

  .intro          { padding: 28px 16px; }
  .section-heading{ font-size: 20px; }
  .body-text      { font-size: 15px; }

  .authority-block  { padding: 30px 0; }
  .authority-inner  { padding: 0 16px; }
  .authority-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 22px;
  }
  .authority-chamber  { font-size: 18px; }
  .authority-grid     { gap: 14px; }
  .authority-lastname { font-size: 13px; margin-top: 10px; }
  .authority-firstname{ font-size: 12px; }
  .authority-role     { font-size: 12px; }

  .doc-section        { padding: 24px 16px; gap: 22px; }
  .doc-section--last  { padding-bottom: 28px; }
  .doc-heading        { font-size: 20px; }
  .doc-para           { font-size: 14px; }

  .digesto-section  { padding: 24px 16px 28px; gap: 22px; }
  .digesto-heading  { font-size: 20px; }
  .digesto-para     { font-size: 14px; }
  .img-digesto      { max-width: 200px; margin-top: 0; }

  .footer-copy { font-size: 11px; padding: 14px 16px; }
  .footer-links-inner { padding: 16px; }
  .footer-link-teal { font-size: 12px; }

  .search-section { padding: 36px 16px 32px; }
  .search-title { font-size: 30px; letter-spacing: 1.5px; }
  .search-subtitle { font-size: 14px; }
  .search-btn { padding: 0 18px; font-size: 14px; }
  .search-hero-img { height: 200px; }

  .advsearch-section { padding: 28px 16px 50px; }
  .advsearch-form { padding: 22px 16px; }

  .antec-section { padding: 28px 16px 0; }
  .video-block { padding: 50px 16px; }
  .tl-year { font-size: 22px; }
  .tl-left-content { padding-right: 12px; }
  .tl-right-content { padding-left: 12px; }
  .tl-dot { width: 12px; height: 12px; margin-top: 4px; }

  .faq-section { padding: 28px 16px 50px; }
  .faq-q { font-size: 14px; }

  .codes-section { padding: 28px 16px 50px; }
  .contact-section { padding: 28px 16px 50px; }
}

/* === Resultados de búsqueda === */
.results-section { background: #f7f8fa; padding: 40px 0 60px; }
.results-inner { padding: 0 48px; }
.results-count { font-size: 15px; color: #555; margin-bottom: 24px; }
.results-empty { font-size: 16px; color: #777; padding: 40px 0; text-align: center; }
.results-list { display: flex; flex-direction: column; gap: 16px; }

.result-item {
  background: #fff;
  border: 1px solid #e0e6ef;
  border-left: 4px solid #043C66;
  border-radius: 6px;
  padding: 18px 22px;
}
.result-header { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 6px; }
.result-tipo { font-size: 11px; font-weight: 700; color: #fff; background: #043C66; border-radius: 3px; padding: 2px 8px; text-transform: uppercase; letter-spacing: .5px; }
.result-num  { font-size: 14px; font-weight: 700; color: #043C66; }
.result-badge-ta { font-size: 11px; font-weight: 600; color: #fff; background: #0098bc; border-radius: 3px; padding: 2px 8px; }
.result-voz { font-size: 16px; font-weight: 600; color: #1a1a1a; margin-bottom: 6px; line-height: 1.4; }
.result-extracto { font-size: 14px; color: #444; line-height: 1.6; margin-bottom: 8px; }
.result-meta { display: flex; gap: 18px; flex-wrap: wrap; font-size: 12px; color: #888; }

.results-pagination { margin-top: 32px; display: flex; justify-content: center; }
.results-pagination nav { display: flex; gap: 6px; }
.results-pagination a, .results-pagination span {
  display: inline-block;
  padding: 6px 14px;
  border: 1px solid #dde3ea;
  border-radius: 4px;
  font-size: 13px;
  color: #043C66;
  text-decoration: none;
  background: #fff;
  transition: background .15s;
}
.results-pagination a:hover { background: #043C66; color: #fff; }

@media (max-width: 820px) { .results-inner { padding: 0 24px; } }
@media (max-width: 580px) { .results-inner { padding: 0 16px; } .result-item { padding: 14px 14px; } }

/* === Estadísticas === */
.stats-cards { display: flex; gap: 24px; flex-wrap: wrap; margin: 32px 0; }
.stat-card { flex: 1; min-width: 160px; background: #fff; border: 1px solid #e0e6ef; border-radius: 10px; padding: 24px; text-align: center; }
.stat-num { font-size: 40px; font-weight: 800; color: #043C66; line-height: 1; }
.stat-label { font-size: 13px; color: #777; margin-top: 6px; font-weight: 500; }
.stats-charts { display: flex; gap: 32px; flex-wrap: wrap; margin-top: 20px; }
.stats-chart-box { flex: 1; min-width: 280px; background: #fff; border: 1px solid #e0e6ef; border-radius: 10px; padding: 24px; }
.stats-chart-title { font-size: 15px; font-weight: 700; color: #043C66; margin: 0 0 18px; }

.nav-sep {
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: #fff;
    margin: 0 8px;
    vertical-align: middle;
}

/* ===== BUSCADOR / BÚSQUEDA AVANZADA ===== */
.srch-page { max-width: 1152px; margin: 0 auto; padding: 32px 16px; }

/* Form card */
.srch-card { background: #fff; padding: 32px; border-radius: 20px; border: 1px solid #e2e8f0; box-shadow: 0 4px 24px rgba(0,0,0,.08); }

/* Grid de 3 columnas para buscador simple */
.srch-form-grid { display: grid; grid-template-columns: 3fr 7fr 2fr; gap: 20px; align-items: end; }

/* Grid para búsqueda avanzada */
.srch-adv-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.srch-field--wide { grid-column: 1 / -1; }

/* Field */
.srch-field { display: flex; flex-direction: column; gap: 8px; }
.srch-label { font-size: 11px; font-weight: 700; color: #94a3b8; text-transform: uppercase; letter-spacing: .8px; display: block; }

/* Input / select base */
.srch-input, .srch-select {
    width: 100%; background: #f8fafc; border: 1.5px solid #e2e8f0; border-radius: 12px;
    padding: 12px 16px; font-size: 14px; font-family: inherit; color: #333;
    outline: none; box-sizing: border-box; transition: border-color .2s;
}
.srch-input:focus, .srch-select:focus { border-color: #0098bc; background: #fff; }
.srch-select {
    appearance: none; -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23666' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 14px center;
    background-color: #f8fafc; padding-right: 38px; cursor: pointer;
}
.srch-select:focus { background-color: #fff; }

/* Input con botón limpiar */
.srch-input-wrap { position: relative; }
.srch-input-wrap .srch-input { padding-right: 40px; }
.srch-clear-btn {
    position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
    background: none; border: none; cursor: pointer; color: #94a3b8;
    font-size: 16px; padding: 0; line-height: 1; transition: color .2s;
}
.srch-clear-btn:hover { color: #1e293b; }

/* Fila botones */
.srch-btn-row { display: flex; align-items: flex-end; gap: 8px; }
.srch-mic-btn {
    background: #e2e8f0; border: none; cursor: pointer; color: #475569;
    padding: 12px 16px; border-radius: 12px; font-size: 15px;
    transition: background .2s; flex-shrink: 0; font-family: inherit;
}
.srch-mic-btn:hover { background: #cbd5e1; }
.srch-submit-btn {
    flex: 1; background: #3771AA; color: #fff; font-weight: 700; font-size: 15px;
    font-family: inherit; border: none; cursor: pointer; padding: 12px 16px;
    border-radius: 12px; transition: background .2s; white-space: nowrap;
}
.srch-submit-btn:hover { background: #0a5ca8; }

/* Acciones búsqueda avanzada */
.srch-actions { display: flex; align-items: center; gap: 12px; margin-top: 24px; padding-top: 24px; border-top: 1px solid #f1f5f9; }
.srch-clear-link {
    color: #64748b; font-size: 14px; text-decoration: none; padding: 12px 16px;
    border: 1px solid #e2e8f0; border-radius: 12px; transition: border-color .2s, color .2s;
}
.srch-clear-link:hover { color: #1e293b; border-color: #cbd5e1; }
.srch-adv-title { font-size: 15px; font-weight: 900; color: #475569; text-transform: uppercase; letter-spacing: 2px; margin: 0 0 24px; }

/* Scroll-to-top */
.scroll-top-btn {
    position: fixed; bottom: 32px; right: 32px; background: #3771AA; color: #fff;
    border: none; cursor: pointer; padding: 14px 16px; border-radius: 50%;
    box-shadow: 0 4px 16px rgba(0,0,0,.25); opacity: 0; pointer-events: none;
    transition: opacity .25s; z-index: 9999; font-size: 16px; line-height: 1;
}
.scroll-top-btn.visible { opacity: 1; pointer-events: auto; }
.scroll-top-btn:hover { background: #0a5ca8; }

/* Área de resultados */
.srch-results { margin-top: 40px; display: flex; flex-direction: column; gap: 20px; }
.srch-count { font-size: 14px; color: #64748b; margin: 0; }
.srch-count strong { color: #1e293b; }
.srch-empty { text-align: center; padding: 80px 0; color: #94a3b8; font-size: 16px; }
.srch-empty i { font-size: 40px; display: block; margin-bottom: 16px; }
.srch-error { background: #fef2f2; color: #dc2626; padding: 24px; border-radius: 12px; border: 1px solid #fecaca; font-size: 14px; }

/* Tarjeta de resultado */
.rc { background: #fff; border: 1px solid #e2e8f0; border-radius: 16px; padding: 24px; display: flex; flex-direction: column; transition: border-color .3s; }
.rc:hover { border-color: #0098bc; }
.rc-top { display: flex; align-items: flex-start; justify-content: space-between; }
.rc-body { flex: 1; min-width: 0; }
.rc-title { font-weight: 700; font-size: 19px; color: #0098bc; margin: 0 0 4px; }
.rc-voz { color: #1e293b; font-size: 14px; font-weight: 500; margin-top: 4px; }
.rc-extracto { max-height: 5.5rem; overflow: hidden; color: #475569; font-size: 14px; line-height: 1.6; margin-top: 8px; }
.rc-actions { display: flex; gap: 14px; margin-left: 28px; flex-shrink: 0; align-items: flex-start; padding-top: 2px; }
.rc-action {
    background: none; border: none; cursor: pointer; color: #94a3b8;
    font-size: 22px; text-decoration: none; transition: color .2s; padding: 0; line-height: 1; display: inline-block;
}
.rc-action:hover { color: #0098bc; }
.rc-action--gold { color: #eab308; }
.rc-action--gold:hover { color: #ca8a04; }

/* Metadatos de la tarjeta */
.rc-meta { margin-top: 20px; padding-top: 20px; border-top: 1px solid #f1f5f9; }
.rc-meta-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px 20px; font-size: 12px; }
.rc-meta-label { display: block; color: #94a3b8; text-transform: uppercase; font-weight: 700; letter-spacing: .5px; margin-bottom: 2px; }
.rc-meta-val { color: #475569; }
.rc-estado { color: #059669; font-weight: 600; }
.rc-obs { margin-top: 12px; padding-top: 12px; border-top: 1px solid #f8fafc; font-size: 13px; color: #475569; }
.rc-obs .rc-meta-label { margin-bottom: 4px; }

/* Rich content (HTML de BD) */
.rich-content a { color: #0098bc; text-decoration: underline; word-break: break-all; }
.rich-content a:hover { color: #007a99; }
.rich-content p { margin: 0; }

/* Paginación del buscador */
.srch-pagination { margin-top: 8px; }
.results-pagination .pag-active { background: #043C66; color: #fff; cursor: default; }
.results-pagination .pag-disabled { color: #bbb; cursor: not-allowed; }

/* Responsive buscador */
@media (max-width: 820px) {
    .srch-form-grid { grid-template-columns: 1fr 1fr; }
    .srch-form-grid > .srch-btn-row { grid-column: 1 / -1; flex-direction: row; }
    .srch-adv-grid { grid-template-columns: repeat(2, 1fr); }
    .rc-meta-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 580px) {
    .srch-page { padding: 16px; }
    .srch-card { padding: 20px 16px; border-radius: 14px; }
    .srch-form-grid { grid-template-columns: 1fr; }
    .srch-adv-grid { grid-template-columns: 1fr; }
    .srch-field--wide { grid-column: auto; }
    .rc { padding: 16px; border-radius: 12px; }
    .rc-top { flex-direction: column; gap: 14px; }
    .rc-actions { margin-left: 0; }
    .rc-meta-grid { grid-template-columns: repeat(2, 1fr); }
    .scroll-top-btn { bottom: 20px; right: 16px; }
}


.srch-mic-btn{
    display: none !important;
}
