:root {
      --bg: #f3f3f3;
      --white: #ffffff;
      --navy: #394766;
      --navy-dark: #2f3c59;
      --gold: #b79a5f;
      --gold-light: #d4b77b;
      --text: #49526a;
      --muted: #a9adb7;
      --line: #d6d7db;
      --hero: #d7d9df;
      --card-shadow: 0 8px 24px rgba(38, 49, 74, .10);
    }

    * { box-sizing: border-box; }
    html { scroll-behavior: smooth; }

    body {
      margin: 0;
      font-family: 'Montserrat', sans-serif;
      background: var(--bg);
      color: var(--text);
    }

    .container {
      width: min(1180px, calc(100% - 48px));
      margin: 0 auto;
    }

    .hidden { display: none !important; }

    header.hero {
      background: linear-gradient(180deg, #d7d9df 0%, #cfd4dd 100%);
      min-height: 285px;
      position: relative;
      overflow: hidden;
    }

    header.hero::before {
      content: "";
      position: absolute;
      inset: 0;
      background:
        repeating-radial-gradient(circle at 88% 28%, rgba(255,255,255,.22) 0 2px, transparent 2px 16px),
        repeating-radial-gradient(circle at 78% 52%, rgba(255,255,255,.16) 0 2px, transparent 2px 19px),
        repeating-radial-gradient(circle at 95% 58%, rgba(255,255,255,.14) 0 1px, transparent 1px 12px);
      opacity: .75;
      pointer-events: none;
    }

    .hero-inner {
      position: relative;
      z-index: 1;
      padding: 82px 0 60px;
    }

    .brand { max-width: 700px; }

    .brand-title {
      margin: 0;
      line-height: .95;
      letter-spacing: .12em;
      color: var(--navy);
      font-size: clamp(34px, 4vw, 60px);
      font-weight: 300;
      text-transform: uppercase;
    }

    .brand-title strong {
      display: block;
      font-weight: 800;
      letter-spacing: .12em;
    }

    .brand-subtitle {
      margin-top: 16px;
      font-size: 11px;
      letter-spacing: .12em;
      color: #6b7180;
      text-transform: uppercase;
      max-width: 620px;
      line-height: 1.7;
    }

    nav {
      background: rgba(255,255,255,.97);
      border-bottom: 1px solid #efefef;
      position: sticky;
      top: 0;
      z-index: 40;
      backdrop-filter: blur(10px);
    }

    .nav-inner {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 20px;
      min-height: 92px;
    }

    .menu {
      display: flex;
      gap: 28px;
      flex-wrap: wrap;
      align-items: center;
    }

    .menu a, .menu button {
      text-decoration: none;
      color: #4f5666;
      font-size: 11px;
      font-weight: 700;
      letter-spacing: .18em;
      text-transform: uppercase;
      background: transparent;
      border: 0;
      cursor: pointer;
      padding: 0;
      position: relative;
    }

    .menu button::after, .menu a::after {
      content: "";
      position: absolute;
      left: 0;
      bottom: -8px;
      width: 0;
      height: 2px;
      background: var(--gold);
      transition: width .25s ease;
    }

    .menu button:hover::after,
    .menu a:hover::after,
    .menu button.active::after {
      width: 100%;
    }

    .search {
      width: 260px;
      max-width: 100%;
      height: 38px;
      border: 1px solid #d7d7d7;
      border-radius: 999px;
      padding: 0 16px;
      font-size: 11px;
      letter-spacing: .08em;
      text-transform: uppercase;
      outline: none;
      background: #fafafa;
      color: var(--navy);
    }

    section { padding: 54px 0; }
    .view { animation: fade .25s ease; }
    @keyframes fade { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

    .announcement { padding-top: 34px; }

    .announcement-card {
      min-height: 355px;
      display: grid;
      grid-template-columns: 1.05fr 1.25fr;
      align-items: stretch;
      background: transparent;
    }

    .announcement-copy {
      display: flex;
      flex-direction: column;
      justify-content: center;
      padding-left: 32px;
      position: relative;
      z-index: 2;
    }

    .announcement-copy::after {
      content: "";
      position: absolute;
      right: -90px;
      top: 0;
      bottom: 0;
      width: 180px;
      background: linear-gradient(to right, var(--bg) 22%, rgba(243,243,243,0.82) 55%, rgba(243,243,243,0) 100%);
      pointer-events: none;
    }

    .announcement-title {
      margin: 0;
      color: var(--gold);
      font-size: clamp(42px, 6vw, 72px);
      font-style: italic;
      font-weight: 500;
      letter-spacing: .06em;
      text-transform: uppercase;
    }

    .announcement-sub {
      margin-top: 8px;
      color: var(--gold-light);
      font-size: 24px;
      letter-spacing: .12em;
      text-transform: uppercase;
      font-weight: 300;
    }

    .announcement-text {
      margin-top: 18px;
      max-width: 420px;
      line-height: 1.8;
      font-size: 14px;
      color: #667085;
    }

    .announcement-image {
      min-height: 355px;
      background:
        linear-gradient(to left, rgba(243,243,243,.0), rgba(243,243,243,.45) 28%, rgba(243,243,243,.9) 52%, var(--bg) 82%),
        url('https://images.unsplash.com/photo-1500530855697-b586d89ba3ee?auto=format&fit=crop&w=1400&q=80') center/cover no-repeat;
      border-radius: 2px;
    }

    .section-title {
      text-align: center;
      margin: 0 0 44px;
      color: var(--navy);
      font-size: 22px;
      font-weight: 700;
      letter-spacing: .22em;
      text-transform: uppercase;
    }

    .meta-bar {
      display: flex;
      justify-content: center;
      margin: -8px 0 30px;
      color: #7a8392;
      font-size: 12px;
      letter-spacing: .12em;
      text-transform: uppercase;
    }

    .countries-grid {
      display: grid;
      grid-template-columns: repeat(5, 1fr);
      gap: 36px 22px;
      justify-items: center;
      max-width: 980px;
      margin: 0 auto;
    }

    .country {
      text-align: center;
      position: relative;
      width: 150px;
      cursor: pointer;
      transition: transform .25s ease;
    }

    .country:hover { transform: translateY(-6px); }

    .flag-wrap {
      width: 96px;
      margin: 0 auto;
      position: relative;
    }

    .flag {
      width: 96px;
      height: 96px;
      border-radius: 50%;
      border: 2px solid #f7f7f7;
      box-shadow: 0 0 0 2px #7c8394;
      overflow: hidden;
      background: linear-gradient(180deg, #d9dde4 0%, #cfd5df 100%);
      position: relative;
      display: grid;
      place-items: center;
      font-size: 42px;
    }

    .flag::after {
      content: "";
      position: absolute;
      inset: 7px;
      border-radius: 50%;
      border: 1px solid rgba(255,255,255,.85);
      pointer-events: none;
    }

    .connector-side, .connector-bottom {
      position: absolute;
      background: #4f5a74;
      opacity: .85;
    }

    .connector-side {
      width: 22px;
      height: 2px;
      right: -18px;
      top: 50%;
      transform: translateY(-50%);
    }

    .connector-side::after, .connector-bottom::after {
      content: "";
      position: absolute;
      width: 8px;
      height: 8px;
      border-radius: 50%;
      background: #30405c;
    }

    .connector-side::after { right: -4px; top: -3px; }

    .connector-bottom {
      width: 2px;
      height: 18px;
      left: 50%;
      bottom: -18px;
      transform: translateX(-50%);
    }

    .connector-bottom::after { left: -3px; bottom: -4px; }

    .country-name {
      margin-top: 22px;
      font-size: 15px;
      font-weight: 700;
      color: var(--navy);
      letter-spacing: .12em;
      text-transform: uppercase;
      line-height: 1.4;
    }

    .country-city {
      margin-top: 4px;
      font-size: 12px;
      font-weight: 500;
      color: #626a7d;
      letter-spacing: .12em;
      text-transform: uppercase;
    }

    .more-wrap {
      width: 300px;
      margin: 42px auto 0;
      text-align: center;
      color: #525b6f;
      font-size: 14px;
      letter-spacing: .22em;
      text-transform: uppercase;
      position: relative;
    }

    .more-wrap::before {
      content: "";
      position: absolute;
      top: -12px;
      left: 26px;
      right: 26px;
      height: 1px;
      background: #b9bcc4;
    }


    .search-results {
      max-width: 980px;
      margin: -10px auto 30px;
      display: grid;
      grid-template-columns: repeat(2, minmax(260px, 1fr));
      gap: 14px;
    }

    .search-result-card {
      background: #fff;
      border: 1px solid #e2e7ef;
      border-left: 4px solid var(--gold);
      border-radius: 14px;
      padding: 16px 18px;
      box-shadow: 0 4px 14px rgba(38, 49, 74, .08);
      cursor: pointer;
      transition: transform .2s ease, border-color .2s ease;
    }

    .search-result-card:hover {
      transform: translateY(-2px);
      border-color: var(--gold-light);
    }

    .search-result-card h4 {
      margin: 0 0 8px;
      color: var(--navy);
      font-size: 14px;
      letter-spacing: .08em;
      text-transform: uppercase;
    }

    .search-result-card p {
      margin: 0;
      color: #6f7788;
      font-size: 12px;
      line-height: 1.6;
    }

    .search-tag {
      display: inline-block;
      margin: 8px 6px 0 0;
      padding: 5px 9px;
      border-radius: 999px;
      background: #f5f6f9;
      border: 1px solid #e0e5ec;
      color: #6f7788;
      font-size: 10px;
      letter-spacing: .1em;
      text-transform: uppercase;
      font-weight: 700;
    }


    .search-summary {
      margin: 0 auto 16px;
      max-width: 920px;
      color: var(--navy);
      font-size: 13px;
      font-weight: 700;
      letter-spacing: .12em;
      text-transform: uppercase;
      text-align: center;
    }

    .empty-msg {
      text-align: center;
      color: #7a8392;
      font-size: 13px;
      letter-spacing: .08em;
      text-transform: uppercase;
      margin-top: 20px;
    }

    .detail-card, .info-card {
      background: var(--white);
      border-radius: 18px;
      box-shadow: var(--card-shadow);
      border: 1px solid #e4e7ed;
      overflow: hidden;
    }

    .detail-header {
      padding: 34px;
      background: linear-gradient(180deg, #eef1f5 0%, #f7f8fa 100%);
      position: relative;
      display: flex;
      gap: 24px;
      align-items: center;
    }

    .detail-header::before {
      content: "";
      position: absolute;
      top: 0;
      left: 0;
      right: 0;
      height: 4px;
      background: var(--gold);
    }

    .detail-flag {
      width: 110px;
      height: 110px;
      border-radius: 50%;
      display: grid;
      place-items: center;
      font-size: 52px;
      background: linear-gradient(180deg, #d9dde4 0%, #cfd5df 100%);
      box-shadow: 0 0 0 2px #7c8394;
      position: relative;
      flex: 0 0 auto;
    }

    .detail-flag::after {
      content: "";
      position: absolute;
      inset: 8px;
      border-radius: 50%;
      border: 1px solid rgba(255,255,255,.85);
    }

    .detail-title {
      margin: 0;
      color: var(--navy);
      font-size: clamp(28px, 4vw, 42px);
      letter-spacing: .08em;
      text-transform: uppercase;
    }

    .detail-sub {
      margin-top: 8px;
      color: #6f7788;
      font-size: 12px;
      letter-spacing: .18em;
      text-transform: uppercase;
    }

    .back-btn {
      display: inline-flex;
      align-items: center;
      gap: 10px;
      padding: 12px 18px;
      border-radius: 999px;
      background: var(--navy);
      color: white;
      border: 0;
      cursor: pointer;
      font-size: 12px;
      letter-spacing: .14em;
      text-transform: uppercase;
      font-weight: 700;
      margin-bottom: 24px;
    }

    .facts-grid {
      display: grid;
      grid-template-columns: repeat(4, 1fr);
      border-top: 1px solid #e4e7ed;
      border-bottom: 1px solid #e4e7ed;
    }

    .fact {
      padding: 22px 16px;
      text-align: center;
      border-right: 1px solid #e4e7ed;
    }

    .fact:last-child { border-right: 0; }

    .fact-label {
      color: #929aab;
      font-size: 11px;
      letter-spacing: .16em;
      text-transform: uppercase;
      margin-bottom: 8px;
      font-weight: 700;
    }

    .fact-value {
      color: var(--navy);
      font-size: 15px;
      font-weight: 700;
      line-height: 1.5;
    }

    .detail-body {
      padding: 34px;
      display: grid;
      gap: 22px;
    }

    .info-block {
      background: #f7f8fa;
      border-left: 4px solid var(--gold);
      border-radius: 0 14px 14px 0;
      padding: 20px 22px;
    }

    .info-block h3 {
      margin: 0 0 10px;
      color: var(--navy);
      font-size: 15px;
      letter-spacing: .14em;
      text-transform: uppercase;
    }

    .info-block p,
    .info-block li {
      margin: 0;
      line-height: 1.8;
      color: #667085;
      font-size: 14px;
    }

    .gallery {
      display: grid;
      grid-template-columns: repeat(3, 1fr);
      gap: 16px;
    }

    .gallery-item {
      aspect-ratio: 1.6 / 1;
      border-radius: 14px;
      background: linear-gradient(180deg, #d8dde8 0%, #e6e9ef 100%);
      border: 1px solid #dfe3ea;
      display: grid;
      place-items: center;
      color: #7d8799;
    }


    .states-wrap {
      margin-top: 8px;
    }

    .states-grid {
      display: grid;
      grid-template-columns: repeat(3, minmax(200px, 1fr));
      gap: 16px;
      margin-top: 18px;
    }

    .state-card {
      background: #fff;
      border: 1px solid #e2e7ef;
      border-radius: 14px;
      padding: 18px;
      box-shadow: 0 4px 14px rgba(38, 49, 74, .08);
      cursor: pointer;
      transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
    }

    .state-card:hover {
      transform: translateY(-4px);
      border-color: var(--gold-light);
      box-shadow: 0 10px 24px rgba(38, 49, 74, .12);
    }

    .state-card h4 {
      margin: 0 0 8px;
      color: var(--navy);
      font-size: 15px;
      letter-spacing: .06em;
      text-transform: uppercase;
    }

    .state-card p {
      margin: 0;
      color: #6f7788;
      font-size: 13px;
      line-height: 1.7;
    }

    .state-detail-grid {
      display: grid;
      gap: 20px;
      margin-top: 26px;
    }

    .state-detail-card {
      background: #fff;
      border: 1px solid #e2e7ef;
      border-radius: 16px;
      padding: 24px;
      box-shadow: 0 6px 18px rgba(38,49,74,.08);
      scroll-margin-top: 110px;
    }

    .state-detail-head {
      display: flex;
      justify-content: space-between;
      align-items: center;
      gap: 16px;
      margin-bottom: 16px;
      flex-wrap: wrap;
    }

    .state-detail-title {
      margin: 0;
      color: var(--navy);
      font-size: 22px;
      letter-spacing: .08em;
      text-transform: uppercase;
    }

    .state-badge {
      display: inline-flex;
      align-items: center;
      gap: 8px;
      border-radius: 999px;
      background: #f5f6f9;
      border: 1px solid #e0e5ec;
      color: #6f7788;
      padding: 8px 14px;
      font-size: 11px;
      letter-spacing: .12em;
      text-transform: uppercase;
      font-weight: 700;
    }

    .norm-grid {
      display: grid;
      grid-template-columns: repeat(3, minmax(220px, 1fr));
      gap: 16px;
    }

    .norm-grid.norm-grid-general {
      grid-template-columns: 1fr;
    }

    .norm-general-card {
      width: 100%;
    }

    .norm-general-header {
      margin-bottom: 14px;
    }

    .norm-general-header h5 {
      margin-bottom: 6px;
    }

    .norm-general-header p {
      margin: 0;
      color: #7a8392;
      font-size: 12px;
      line-height: 1.6;
    }

    .norm-general-documents {
      display: grid;
      grid-template-columns: repeat(3, minmax(220px, 1fr));
      gap: 12px;
    }

    .norm-general-documents .norm-link {
      margin-bottom: 0;
      height: 100%;
    }

    .norm-card {
      background: #f8f9fb;
      border: 1px solid #e3e7ee;
      border-top: 4px solid var(--gold);
      border-radius: 14px;
      padding: 18px;
    }

    .norm-card h5 {
      margin: 0 0 12px;
      color: var(--navy);
      font-size: 13px;
      letter-spacing: .12em;
      text-transform: uppercase;
    }

    .norm-link {
      display: block;
      text-decoration: none;
      color: inherit;
      background: #fff;
      border: 1px solid #e5e8ef;
      border-radius: 12px;
      padding: 12px;
      margin-bottom: 10px;
      transition: border-color .2s ease, transform .2s ease;
    }

    .norm-link:hover {
      border-color: var(--gold-light);
      transform: translateY(-2px);
    }

    .norm-link strong {
      display: block;
      color: var(--navy);
      font-size: 13px;
      margin-bottom: 6px;
    }

    .norm-link span {
      display: block;
      color: #6f7788;
      font-size: 12px;
      line-height: 1.6;
    }


    .municipality-section {
      display: grid;
      gap: 16px;
      margin-top: 22px;
    }

    .municipality-head {
      display: flex;
      justify-content: space-between;
      align-items: center;
      gap: 12px;
      flex-wrap: wrap;
    }

    .municipality-title {
      margin: 0;
      color: var(--navy);
      font-size: 15px;
      letter-spacing: .12em;
      text-transform: uppercase;
    }

    .municipality-note {
      margin: 0;
      color: #6f7788;
      font-size: 13px;
      line-height: 1.7;
    }

    .municipality-grid {
      display: grid;
      grid-template-columns: repeat(4, minmax(150px, 1fr));
      gap: 12px;
    }

    .municipality-card {
      background: #fff;
      border: 1px solid #e3e7ee;
      border-radius: 12px;
      padding: 14px;
      box-shadow: 0 4px 12px rgba(38,49,74,.06);
      transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
      cursor: pointer;
    }

    .municipality-card:hover {
      transform: translateY(-2px);
      border-color: var(--gold-light);
      box-shadow: 0 8px 18px rgba(38,49,74,.10);
    }

    .municipality-card.active {
      border-color: var(--gold);
      box-shadow: 0 10px 22px rgba(38,49,74,.14);
      background: #fffdf8;
    }

    .municipality-card strong {
      display: block;
      color: var(--navy);
      font-size: 13px;
      margin-bottom: 4px;
    }

    .municipality-card span {
      display: block;
      color: #6f7788;
      font-size: 12px;
      line-height: 1.5;
    }

    .municipality-empty {
      background: #f8f9fb;
      border: 1px dashed #cfd6e2;
      border-radius: 12px;
      padding: 16px;
      color: #6f7788;
      font-size: 13px;
      line-height: 1.7;
    }


    .municipal-detail-wrap {
      margin-top: 20px;
      display: grid;
      gap: 16px;
    }

    .municipal-detail-card {
      background: #fff;
      border: 1px solid #e2e7ef;
      border-radius: 16px;
      padding: 22px;
      box-shadow: 0 6px 18px rgba(38,49,74,.08);
    }

    .municipal-detail-head {
      display: flex;
      justify-content: space-between;
      align-items: center;
      gap: 12px;
      flex-wrap: wrap;
      margin-bottom: 16px;
    }

    .municipal-detail-title {
      margin: 0;
      color: var(--navy);
      font-size: 18px;
      letter-spacing: .08em;
      text-transform: uppercase;
    }

    .municipal-detail-sub {
      display: inline-flex;
      align-items: center;
      gap: 8px;
      border-radius: 999px;
      background: #f5f6f9;
      border: 1px solid #e0e5ec;
      color: #6f7788;
      padding: 8px 14px;
      font-size: 11px;
      letter-spacing: .12em;
      text-transform: uppercase;
      font-weight: 700;
    }

    .municipal-placeholder {
      background: #f8f9fb;
      border-left: 4px solid var(--gold);
      border-radius: 0 14px 14px 0;
      padding: 14px 16px;
      color: #6f7788;
      font-size: 13px;
      line-height: 1.7;
    }
    .documents-grid, .activities-grid {
      display: grid;
      gap: 28px;
    }

    .documents-grid {
      grid-template-columns: repeat(3, minmax(220px, 1fr));
      max-width: 920px;
      margin: 0 auto;
    }

    .doc-card {
      min-height: 210px;
      border-radius: 14px;
      padding: 28px 20px;
      color: white;
      background:
        radial-gradient(circle at 30% 20%, rgba(255,255,255,.08), transparent 25%),
        repeating-radial-gradient(circle at 70% 40%, rgba(255,255,255,.08) 0 1px, transparent 1px 12px),
        linear-gradient(180deg, #425071 0%, #33415f 100%);
      box-shadow: 0 8px 22px rgba(38, 49, 74, .12);
      display: flex;
      flex-direction: column;
      justify-content: flex-start;
    }

    .doc-card h3 {
      margin: 0 0 14px;
      font-size: 30px;
      line-height: 1;
      letter-spacing: .04em;
      text-transform: uppercase;
    }

    .doc-card p {
      margin: 0;
      font-size: 14px;
      line-height: 1.6;
      letter-spacing: .08em;
      text-transform: uppercase;
    }

    .activities-grid {
      grid-template-columns: repeat(3, 1fr);
      max-width: 1060px;
      margin: 0 auto;
    }

    .activity-card {
      display: block;
      text-decoration: none;
      color: inherit;
    }

    .activity-thumb {
      background: #d8dde8;
      aspect-ratio: 1.7 / 1;
      position: relative;
      overflow: hidden;
      border-radius: 10px;
    }

    .activity-thumb::before,
    .activity-thumb::after {
      content: "";
      position: absolute;
      left: 0;
      top: 0;
      width: 100%;
      height: 1px;
      background: #9099aa;
      transform-origin: left top;
    }

    .activity-thumb::before {
      transform: rotate(39deg) translateY(-1px);
      width: 150%;
    }

    .activity-label {
      margin-top: 10px;
      font-size: 16px;
      color: #616a7b;
    }

    .social-bar {
      margin-top: 60px;
      background: var(--navy);
      padding: 18px 0;
    }

    .social-list {
      display: flex;
      justify-content: center;
      gap: 28px;
    }

    .social {
      width: 42px;
      height: 42px;
      border-radius: 50%;
      background: rgba(255,255,255,.14);
      border: 1px solid rgba(255,255,255,.24);
      color: white;
      display: grid;
      place-items: center;
      font-size: 18px;
      font-weight: 700;
    }

    .collaborators {
      padding: 24px 0 48px;
      background: var(--bg);
    }

    .collaborators h3 {
      margin: 0;
      color: var(--navy);
      font-size: 22px;
      letter-spacing: .22em;
      text-transform: uppercase;
    }



    #mapaCatastro {
      height: 540px;
      width: 100%;
      margin-top: 24px;
      border-radius: 18px;
      overflow: hidden;
      border: 1px solid #e2e8f0;
      box-shadow: 0 8px 24px rgba(38, 49, 74, .10);
      background: #e8eef6;
    }

    .map-legend {
      background: rgba(255,255,255,.95);
      padding: 12px 14px;
      border-radius: 12px;
      box-shadow: 0 6px 18px rgba(38,49,74,.16);
      color: #475569;
      font-size: 12px;
      line-height: 1.8;
      border: 1px solid #e2e8f0;
    }

    .map-tooltip {
      background: var(--navy);
      color: #fff;
      border: 0;
      border-radius: 8px;
      padding: 6px 10px;
      font-size: 12px;
      font-weight: 700;
      box-shadow: 0 4px 12px rgba(38,49,74,.18);
    }

    .map-actions {
      display: flex;
      flex-wrap: wrap;
      gap: 10px;
      margin-top: 18px;
      justify-content: center;
    }

    .map-chip {
      border: 1px solid #e2e8f0;
      background: #fff;
      color: var(--navy);
      border-radius: 999px;
      padding: 9px 14px;
      font-size: 11px;
      font-weight: 700;
      letter-spacing: .1em;
      text-transform: uppercase;
      cursor: pointer;
      transition: transform .2s ease, border-color .2s ease, background .2s ease;
    }

    .map-chip:hover {
      transform: translateY(-2px);
      border-color: var(--gold-light);
      background: #fffdf8;
    }

    @media (max-width: 980px) {
      .announcement-card,
      .facts-grid,
      .documents-grid,
      .activities-grid,
      .norm-grid {
        grid-template-columns: 1fr;
      }

      .announcement-copy { padding: 0 12px 24px; }
      .announcement-copy::after { display: none; }
      .countries-grid { grid-template-columns: repeat(3, 1fr); }
      .search-results { grid-template-columns: 1fr; }
      .states-grid { grid-template-columns: repeat(2, 1fr); }
      .municipality-grid { grid-template-columns: repeat(2, 1fr); }
      .norm-general-documents { grid-template-columns: 1fr; }
      .fact { border-right: 0; border-bottom: 1px solid #e4e7ed; }
      .fact:last-child { border-bottom: 0; }
      .gallery { grid-template-columns: 1fr; }
    }

    @media (max-width: 700px) {
      .nav-inner {
        flex-direction: column;
        align-items: stretch;
        padding: 20px 0;
      }

      .menu { justify-content: center; gap: 18px 24px; }
      .search { width: 100%; }
      .countries-grid { grid-template-columns: repeat(2, 1fr); }
      .states-grid { grid-template-columns: 1fr; }
      .municipality-grid { grid-template-columns: 1fr; }
      .country { width: 130px; }
      .flag-wrap, .flag { width: 84px; height: 84px; }
      .brand-title { font-size: 40px; }
      .announcement-sub { font-size: 18px; }
      .detail-header { flex-direction: column; text-align: center; }
      .detail-body, .detail-header { padding: 24px; }
    }
/* Información dinámica por país */
.country-content-card {
  background: #f8f9fb;
  border: 1px solid #e3e7ee;
  border-left: 4px solid var(--gold);
  border-radius: 0 16px 16px 0;
  padding: 24px;
}
.country-content-head { display:flex; align-items:center; gap:12px; margin-bottom:14px; }
.country-content-head svg { width:22px; height:22px; color:var(--gold); }
.country-content-head h3 { margin:0; color:var(--navy); font-size:16px; letter-spacing:.12em; text-transform:uppercase; }
.country-content-card > p { margin:0; color:#667085; font-size:14px; line-height:1.8; }
.country-data-grid { display:grid; grid-template-columns:repeat(2,minmax(220px,1fr)); gap:14px; margin-top:18px; }
.country-data-grid > div { background:#fff; border:1px solid #e4e8ef; border-radius:12px; padding:14px; }
.country-data-grid span { display:block; color:#929aab; font-size:10px; font-weight:700; letter-spacing:.12em; text-transform:uppercase; margin-bottom:6px; }
.country-data-grid strong { color:var(--navy); font-size:13px; line-height:1.5; }
.country-links { display:flex; flex-wrap:wrap; gap:10px; margin-top:18px; }
.country-info-link { display:inline-flex; align-items:center; gap:8px; text-decoration:none; background:var(--navy); color:#fff; border-radius:999px; padding:10px 14px; font-size:11px; font-weight:700; letter-spacing:.08em; }
.country-info-link svg { width:15px; height:15px; }
.country-info-empty { display:block; padding:14px; background:#fff; border:1px dashed #cfd6e2; border-radius:12px; color:#778195; font-size:13px; line-height:1.6; }
.country-gallery-grid { display:grid; grid-template-columns:repeat(3,minmax(200px,1fr)); gap:16px; }
.country-gallery-card { margin:0; overflow:hidden; border-radius:14px; background:#fff; border:1px solid #e0e5ec; }
.country-gallery-card img { width:100%; aspect-ratio:1.55/1; object-fit:cover; display:block; }
.country-gallery-card figcaption { padding:12px 14px; color:var(--navy); font-size:12px; font-weight:700; }
.country-maps-grid { display:grid; grid-template-columns:repeat(2,minmax(240px,1fr)); gap:14px; }
.country-map-card { display:flex; gap:14px; text-decoration:none; background:#fff; border:1px solid #e0e5ec; border-radius:14px; padding:16px; transition:.2s ease; }
.country-map-card:hover { transform:translateY(-2px); border-color:var(--gold-light); box-shadow:0 8px 18px rgba(38,49,74,.09); }
.country-map-icon { width:42px; height:42px; flex:0 0 auto; display:grid; place-items:center; border-radius:12px; background:#f2ede3; color:var(--gold); }
.country-map-card strong,.country-map-card span,.country-map-card small { display:block; }
.country-map-card strong { color:var(--navy); font-size:13px; margin-bottom:5px; }
.country-map-card span { color:#6f7788; font-size:12px; line-height:1.5; }
.country-map-card small { margin-top:8px; color:var(--gold); font-weight:700; text-transform:uppercase; letter-spacing:.08em; }
.country-flag-img { width:100%; height:100%; object-fit:cover; display:block; }
.country-flag-img-detail { border-radius:50%; }
@media (max-width:980px){.country-gallery-grid,.country-maps-grid,.country-data-grid{grid-template-columns:1fr;}}


/* ============================================================
   BANDERAS COMPATIBLES EN TODOS LOS DISPOSITIVOS Y NAVEGADORES
   Usa la biblioteca Flag Icons en lugar de emojis del sistema.
   ============================================================ */
.flag .country-flag-img,
.detail-flag .country-flag-img {
  display: block;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  line-height: 1;
}

.flag .country-flag-img {
  border-radius: 50%;
}

.detail-flag .country-flag-img-detail {
  border-radius: 50%;
}

.search-flag {
  display: inline-block;
  width: 24px;
  height: 16px;
  margin-right: 8px;
  vertical-align: -2px;
  border-radius: 2px;
  box-shadow: 0 0 0 1px rgba(57, 71, 102, .18);
}


/* ============================================================
   BANDERAS CUADRADAS, COMPLETAS Y CON SELECCIÓN PERSISTENTE
   ============================================================ */
.flag-wrap {
  width: 98px;
  height: 122px;
  display: flex;
  justify-content: center;
  position: relative;
}

.flag {
  width: 96px;
  height: 96px;
  border-radius: 8px;
  border: 2px solid #f7f7f7;
  box-shadow: 0 0 0 2px #7c8394;
  overflow: hidden;
  background: rgba(78, 102, 145, .16);
  transition: transform .28s ease, box-shadow .28s ease, background .28s ease;
}

.flag::after {
  inset: 5px;
  border-radius: 5px;
}

.flag .country-flag-img {
  width: 100%;
  height: 100%;
  border-radius: 6px;
  background-size: contain !important;
  background-position: center !important;
  background-repeat: no-repeat !important;
  background-color: #eef1f6;
  filter: grayscale(1) sepia(.35) hue-rotate(175deg) saturate(1.8) opacity(.62);
  transition: filter .28s ease, transform .28s ease, background-color .28s ease;
}

.country:hover .flag .country-flag-img,
.country.selected .flag .country-flag-img {
  filter: none;
  background-color: #fff;
}

.country:hover .flag,
.country.selected .flag {
  transform: translateY(-2px);
  box-shadow: 0 0 0 2px var(--gold), 0 9px 20px rgba(38,49,74,.16);
}

/* Todos los palitos empiezan horizontales */
.connector-side,
.connector-bottom {
  width: 24px;
  height: 2px;
  right: -20px;
  left: auto;
  top: 48px;
  bottom: auto;
  transform: none;
  transition: width .28s ease, height .28s ease, left .28s ease,
              right .28s ease, top .28s ease, bottom .28s ease,
              transform .28s ease, background .28s ease;
}

.connector-side::after,
.connector-bottom::after {
  right: -4px;
  left: auto;
  top: -3px;
  bottom: auto;
  transition: left .28s ease, right .28s ease, top .28s ease, bottom .28s ease,
              background .28s ease;
}

/* Al pasar el mouse o seleccionar, el palito baja y queda vertical */
.country:hover .connector-side,
.country:hover .connector-bottom,
.country.selected .connector-side,
.country.selected .connector-bottom {
  width: 2px;
  height: 20px;
  left: 50%;
  right: auto;
  top: auto;
  bottom: 3px;
  transform: translateX(-50%);
  background: var(--gold);
}

.country:hover .connector-side::after,
.country:hover .connector-bottom::after,
.country.selected .connector-side::after,
.country.selected .connector-bottom::after {
  left: -3px;
  right: auto;
  top: auto;
  bottom: -4px;
  background: var(--gold);
}

.country.selected .country-name {
  color: var(--gold);
}

.detail-flag {
  border-radius: 10px;
}

.detail-flag::after,
.detail-flag .country-flag-img-detail {
  border-radius: 8px;
}

.detail-flag .country-flag-img-detail {
  background-size: contain !important;
  background-position: center !important;
  background-repeat: no-repeat !important;
  background-color: #fff;
}

@media (max-width: 760px) {
  .flag-wrap {
    width: 86px;
    height: 108px;
  }

  .flag {
    width: 84px;
    height: 84px;
  }

  .connector-side,
  .connector-bottom {
    top: 42px;
  }
}


/* ============================================================
   GALERÍA CON TARJETAS COMPLETAMENTE CLICABLES
   ============================================================ */
.country-gallery-card {
  display: block;
  text-decoration: none;
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}

.country-gallery-link {
  cursor: pointer;
}

.country-gallery-link:hover,
.country-gallery-link:focus-visible {
  transform: translateY(-3px);
  border-color: var(--gold-light);
  box-shadow: 0 10px 22px rgba(38, 49, 74, .12);
  outline: none;
}

.country-gallery-icon {
  min-height: 132px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #f2ede3, #eef1f6);
  color: var(--gold);
}

.country-gallery-icon svg {
  width: 38px;
  height: 38px;
}

.country-gallery-content {
  padding: 14px;
}

.country-gallery-content strong,
.country-gallery-content span,
.country-gallery-content small {
  display: block;
}

.country-gallery-content strong {
  color: var(--navy);
  font-size: 13px;
  margin-bottom: 6px;
}

.country-gallery-content span {
  color: #6f7788;
  font-size: 12px;
  line-height: 1.55;
}

.country-gallery-content small {
  margin-top: 10px;
  color: var(--gold);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}

/* ============================================================
   REDES SOCIALES Y CARRUSEL DE COLABORADORES
   ============================================================ */
.social-list {
  min-height: 118px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 38px;
}

.social-list .social {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 2px solid rgba(255,255,255,.24);
  background: rgba(255,255,255,.10);
  color: #fff;
  text-decoration: none;
  font-size: 25px;
  font-weight: 600;
  transition: transform .25s ease, background .25s ease, border-color .25s ease;
}

.social-list .social:hover,
.social-list .social:focus-visible {
  transform: translateY(-5px) scale(1.05);
  background: rgba(255,255,255,.20);
  border-color: rgba(255,255,255,.65);
  outline: none;
}

.collaborators {
  min-height: 390px;
  padding: 46px 0 54px;
  background: #f7f7f8;
  overflow: hidden;
}

.collaborators h3 {
  margin: 0 0 34px;
  color: var(--navy);
  font-size: 31px;
  font-weight: 700;
  letter-spacing: .22em;
  text-transform: uppercase;
}

.collaborators-carousel {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) 52px;
  align-items: center;
  gap: 18px;
}

.collaborators-viewport {
  position: relative;
  min-height: 215px;
  overflow: hidden;
}

.collaborators-track {
  position: relative;
  min-height: 215px;
}

.collaborator-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transform: translateX(45px) scale(.98);
  transition: opacity .55s ease, transform .55s ease, visibility .55s;
  pointer-events: none;
}

.collaborator-slide.active {
  opacity: 1;
  visibility: visible;
  transform: translateX(0) scale(1);
  pointer-events: auto;
}

.collaborator-card {
  min-height: 215px;
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr);
  align-items: center;
  gap: 40px;
  padding: 28px 58px;
  border: 1px solid #e1e4ea;
  border-radius: 22px;
  background: #fff;
  box-shadow: var(--card-shadow);
  color: inherit;
  text-decoration: none;
  transition: transform .25s ease, box-shadow .25s ease;
}

.collaborator-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 40px rgba(38,49,74,.16);
}

.collaborator-flag {
  width: 180px;
  height: 120px;
  display: block;
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(38,49,74,.16);
}

.collaborator-copy {
  min-width: 0;
}

.collaborator-label {
  display: block;
  margin-bottom: 8px;
  color: var(--gold);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .18em;
  text-transform: uppercase;
}

.collaborator-copy h4 {
  margin: 0 0 9px;
  color: var(--navy);
  font-size: clamp(27px, 4vw, 43px);
  line-height: 1.1;
}

.collaborator-copy p {
  margin: 0 0 18px;
  color: #687285;
  font-size: 14px;
  line-height: 1.7;
}

.collaborator-link {
  color: var(--navy);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.carousel-control {
  width: 48px;
  height: 48px;
  border: 1px solid #d9dde5;
  border-radius: 50%;
  background: #fff;
  color: var(--navy);
  font-size: 34px;
  line-height: 1;
  cursor: pointer;
  transition: background .2s ease, color .2s ease, transform .2s ease;
}

.carousel-control:hover,
.carousel-control:focus-visible {
  background: var(--navy);
  color: #fff;
  transform: scale(1.06);
  outline: none;
}

.collaborators-dots {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 22px;
}

.collaborator-dot {
  width: 8px;
  height: 8px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: #c6cad3;
  cursor: pointer;
  transition: width .25s ease, background .25s ease;
}

.collaborator-dot.active {
  width: 28px;
  background: var(--gold);
}

@media (max-width: 760px) {
  .social-list { gap: 18px; min-height: 96px; }
  .social-list .social { width: 52px; height: 52px; font-size: 21px; }
  .collaborators h3 { font-size: 23px; letter-spacing: .14em; }
  .collaborators-carousel { grid-template-columns: 38px minmax(0, 1fr) 38px; gap: 8px; }
  .carousel-control { width: 38px; height: 38px; font-size: 27px; }
  .collaborators-viewport,
  .collaborators-track { min-height: 350px; }
  .collaborator-card {
    min-height: 350px;
    grid-template-columns: 1fr;
    justify-items: center;
    gap: 20px;
    padding: 28px 22px;
    text-align: center;
  }
  .collaborator-flag { width: 150px; height: 100px; }
}

@media (prefers-reduced-motion: reduce) {
  .collaborator-slide,
  .social-list .social,
  .collaborator-card,
  .carousel-control { transition: none; }
}

/* Normativa general del país, ubicada después del sistema catastral */
.country-general-norms {
  margin: 0;
}

.country-general-norms .norm-general-card {
  width: 100%;
}
.norm-files {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.norm-file-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  cursor: pointer;
}

.norm-link {
  display: flex;
  flex-direction: column;
}