/* === Gotham Fonts === */
@font-face { font-family: 'Gotham'; src: url('/fuentes/GOTHAM-THIN.OTF') format('opentype'); font-weight: 100; font-style: normal; }
@font-face { font-family: 'Gotham'; src: url('/fuentes/GOTHAM-THINITA.OTF') format('opentype'); font-weight: 100; font-style: italic; }
@font-face { font-family: 'Gotham'; src: url('/fuentes/GOTHAM-XLIGHT.OTF') format('opentype'); font-weight: 200; font-style: normal; }
@font-face { font-family: 'Gotham'; src: url('/fuentes/GOTHAM-XLIGHTITA.OTF') format('opentype'); font-weight: 200; font-style: italic; }
@font-face { font-family: 'Gotham'; src: url('/fuentes/GOTHAM-LIGHT.OTF') format('opentype'); font-weight: 300; font-style: normal; }
@font-face { font-family: 'Gotham'; src: url('/fuentes/GOTHAM-LIGHTITA.OTF') format('opentype'); font-weight: 300; font-style: italic; }
@font-face { font-family: 'Gotham'; src: url('/fuentes/GOTHAM-BOOK.OTF') format('opentype'); font-weight: 400; font-style: normal; }
@font-face { font-family: 'Gotham'; src: url('/fuentes/GOTHAM-BOOKITA.OTF') format('opentype'); font-weight: 400; font-style: italic; }
@font-face { font-family: 'Gotham'; src: url('/fuentes/GOTHAM-MEDIUM.OTF') format('opentype'); font-weight: 500; font-style: normal; }
@font-face { font-family: 'Gotham'; src: url('/fuentes/GOTHAM-MEDIUMITALIC.OTF') format('opentype'); font-weight: 500; font-style: italic; }
@font-face { font-family: 'Gotham'; src: url('/fuentes/GOTHAMBOLD.OTF') format('opentype'); font-weight: 700; font-style: normal; }
@font-face { font-family: 'Gotham'; src: url('/fuentes/GOTHAMBOLDITALIC.TTF') format('truetype'); font-weight: 700; font-style: italic; }
@font-face { font-family: 'Gotham'; src: url('/fuentes/GOTHAMBLACK.OTF') format('opentype'); font-weight: 900; font-style: normal; }
@font-face { font-family: 'Gotham'; src: url('/fuentes/GOTHAM-BLACKITA.OTF') format('opentype'); font-weight: 900; font-style: italic; }

/* === 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: 42px; 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: 30px; flex-wrap: wrap; justify-content: center; }

.nav-link {
    font-weight: 400;
    font-size: 13px;
    color: #fff;
    text-decoration: none;
    letter-spacing: .6px;
}

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

.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: 17px; color: #043C66; letter-spacing: .5px; }
.authority-chamber { font-weight: 700; font-size: 31px; 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: 280px;
}

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

.link-legislativo{
    font-size: 10px;
    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;
}

/* === 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) {
  .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; }
}
