:root {
  --ink: #1e2624;
  --muted: #66706d;
  --paper: #fffdf8;
  --soft: #f3efe6;
  --forest: #173f35;
  --forest-2: #0d2e27;
  --gold: #b58a48;
  --gold-soft: #eadfc9;
  --line: #ded9cf;
  --white: #ffffff;
  --shadow: 0 18px 50px rgba(31, 41, 39, .10);
  --shadow-soft: 0 10px 32px rgba(31, 41, 39, .07);
  --radius: 18px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; line-height: 1.65; }
a { color: inherit; }
img { max-width: 100%; height: auto; display: block; }
button, input, select { font: inherit; }
.ili-shell { width: min(1180px, calc(100% - 40px)); margin-inline: auto; }
.narrow { width: min(820px, 100%); }
.skip-link { position: absolute; left: -9999px; top: 8px; background: #fff; padding: 8px 12px; z-index: 9999; }
.skip-link:focus { left: 8px; }
.site-header { position: sticky; top: 0; z-index: 80; background: rgba(255,253,248,.96); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.header-inner { min-height: 78px; display: flex; align-items: center; justify-content: space-between; gap: 28px; }
.site-brand { display: inline-flex; flex-direction: column; text-decoration: none; }
.brand-name { font-family: Georgia, "Times New Roman", serif; font-size: 1.42rem; font-weight: 700; color: var(--forest); }
.brand-tagline { color: var(--muted); font-size: .76rem; letter-spacing: .03em; }
.custom-logo { max-height: 58px; width: auto; }
.primary-nav ul { display: flex; gap: 26px; margin: 0; padding: 0; list-style: none; }
.primary-nav a { text-decoration: none; font-weight: 700; font-size: .93rem; }
.primary-nav a:hover { color: var(--forest); }
.nav-toggle { display: none; }
.eyebrow { margin: 0 0 11px; color: var(--gold); font-size: .76rem; font-weight: 850; text-transform: uppercase; letter-spacing: .14em; }
h1, h2, h3 { font-family: Georgia, "Times New Roman", serif; line-height: 1.12; margin-top: 0; }
h1 { font-size: clamp(2.7rem, 6vw, 5.5rem); max-width: 900px; margin-bottom: 22px; letter-spacing: -.025em; }
h2 { font-size: clamp(2rem, 4vw, 3.15rem); letter-spacing: -.02em; }
h3 { font-size: 1.55rem; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 50px; padding: 12px 21px; border-radius: 999px; text-decoration: none; font-weight: 820; transition: transform .2s ease, filter .2s ease, box-shadow .2s ease; }
.button-primary { background: var(--gold); color: #17130d; box-shadow: 0 8px 20px rgba(181,138,72,.22); }
.button-primary:hover { transform: translateY(-1px); filter: brightness(1.04); }
.button-ghost { border: 1px solid rgba(255,255,255,.5); color: #fff; }
.button-block { width: 100%; }
.text-link { color: var(--forest); font-weight: 800; text-decoration-thickness: 1px; text-underline-offset: 4px; }
.section { padding: 84px 0; }
.section-soft { background: var(--soft); }
.section-heading { display: flex; justify-content: space-between; align-items: end; gap: 24px; margin-bottom: 32px; }
.section-heading h2 { margin-bottom: 0; }
.compact-heading { margin-bottom: 26px; }

/* Home */
.home-hero { min-height: 610px; display: flex; align-items: center; background: radial-gradient(circle at 85% 25%, rgba(181,138,72,.20), transparent 28%), linear-gradient(135deg, var(--forest-2), var(--forest)); color: var(--white); position: relative; overflow: hidden; }
.home-hero::after { content: ""; position: absolute; inset: auto -10vw -50% auto; width: 600px; height: 600px; border: 1px solid rgba(255,255,255,.13); border-radius: 50%; box-shadow: 0 0 0 80px rgba(255,255,255,.035), 0 0 0 160px rgba(255,255,255,.018); }
.hero-inner { position: relative; z-index: 2; padding-block: 100px; }
.hero-lead { max-width: 760px; font-size: clamp(1.12rem, 2vw, 1.38rem); color: rgba(255,255,255,.86); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.home-intro-strip { background: #fff; border-bottom: 1px solid var(--line); }
.home-intro-grid { display: grid; grid-template-columns: repeat(3, 1fr); }
.home-intro-grid > div { padding: 26px 28px; border-right: 1px solid var(--line); }
.home-intro-grid > div:first-child { padding-left: 0; }
.home-intro-grid > div:last-child { border-right: 0; }
.home-intro-grid strong, .home-intro-grid span { display: block; }
.home-intro-grid strong { font-family: Georgia, serif; color: var(--forest); font-size: 1.13rem; }
.home-intro-grid span { color: var(--muted); font-size: .9rem; margin-top: 4px; }
.editorial-split { display: grid; grid-template-columns: 1fr 1fr; gap: 70px; align-items: start; }
.editorial-copy { font-size: 1.1rem; color: var(--muted); }


.button-secondary { background: #d8c29b; color: #17130d; }
.country-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }
.country-card { min-height: 270px; padding: 34px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; text-decoration: none; box-shadow: var(--shadow-soft); transition: transform .2s ease, box-shadow .2s ease; }
.country-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.country-label { display: inline-block; margin-bottom: 18px; color: var(--gold); font-size: .76rem; font-weight: 850; text-transform: uppercase; letter-spacing: .14em; }
.country-card h3 { font-size: clamp(2rem, 3.5vw, 3rem); margin-bottom: 14px; color: var(--forest); }
.country-card p { color: var(--muted); max-width: 560px; }
.country-card strong { color: var(--forest); }
.property-card .card-body p { min-height: 3.1em; }

/* Cards and archives */
.region-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.region-card { min-height: 140px; padding: 24px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; display: flex; flex-direction: column; justify-content: flex-end; text-decoration: none; box-shadow: var(--shadow-soft); transition: transform .2s ease, box-shadow .2s ease; }
.region-card span { font-family: Georgia, serif; font-size: 1.35rem; font-weight: 700; }
.region-card small { color: var(--muted); }
.region-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.parador-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-soft); }
.card-media { display: block; aspect-ratio: 16/10; background: var(--forest); overflow: hidden; text-decoration: none; }
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.parador-card:hover .card-media img { transform: scale(1.025); }
.card-placeholder { height: 100%; display: grid; place-items: center; font-family: Georgia, serif; font-size: 5rem; color: rgba(255,255,255,.2); }
.card-body { padding: 24px; }
.card-kicker { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; color: var(--muted); font-size: .76rem; text-transform: uppercase; letter-spacing: .08em; font-weight: 800; }
.card-kicker span + span::before { content: "•"; margin-right: 8px; }
.card-body h3 { margin-bottom: 10px; }
.card-body h3 a { text-decoration: none; }
.card-body p { color: var(--muted); }
.archive-hero { background: var(--soft); border-bottom: 1px solid var(--line); padding: 72px 0; }
.archive-hero h1 { font-size: clamp(2.6rem, 5vw, 4.4rem); margin-bottom: 18px; }
.empty-state { padding: 28px; border: 1px dashed var(--line); border-radius: var(--radius); color: var(--muted); }

/* Parador page */
.parador-topbar { background: var(--soft); border-bottom: 1px solid var(--line); }
.breadcrumbs { padding-block: 15px; color: var(--muted); font-size: .84rem; }
.breadcrumbs a { color: inherit; text-decoration: none; }
.breadcrumbs a:hover { text-decoration: underline; }
.breadcrumbs span { margin: 0 8px; color: #aaa49a; }
.parador-title-block { background: var(--paper); padding: 48px 0 34px; }
.parador-title-grid { display: grid; grid-template-columns: minmax(0, 1fr) 270px; gap: 54px; align-items: end; }
.parador-title-block h1 { font-size: clamp(3rem, 5.7vw, 5.3rem); margin-bottom: 10px; }
.parador-tagline { margin: 0 0 16px; font-family: Georgia, serif; color: var(--forest); font-size: clamp(1.2rem, 2vw, 1.5rem); }
.entity-summary { margin: 0; max-width: 800px; color: var(--muted); font-size: 1.06rem; }
.title-cta { display: flex; flex-direction: column; align-items: stretch; gap: 8px; text-align: center; }
.title-cta small { color: var(--muted); font-size: .76rem; }
.parador-gallery { padding: 0 0 34px; background: var(--paper); }
.gallery-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(300px, 1fr); gap: 10px; height: min(590px, 55vw); min-height: 390px; }
.gallery-grid button { appearance: none; border: 0; padding: 0; background: #ddd; cursor: pointer; overflow: hidden; }
.gallery-main { border-radius: 20px 0 0 20px; }
.gallery-main img, .gallery-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .28s ease, opacity .28s ease; }
.gallery-grid button:hover img { transform: scale(1.015); opacity: .96; }
.gallery-side { display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; gap: 10px; }
.gallery-thumb:nth-child(2) { border-radius: 0 20px 0 0; }
.gallery-thumb:nth-child(4) { border-radius: 0 0 20px 0; }
.gallery-single { grid-template-columns: 1fr; }
.gallery-single .gallery-main { border-radius: 20px; }
.parador-section-nav { position: sticky; top: 78px; z-index: 45; background: rgba(255,253,248,.97); backdrop-filter: blur(12px); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-nav-inner { display: flex; gap: 28px; overflow-x: auto; scrollbar-width: none; }
.section-nav-inner::-webkit-scrollbar { display: none; }
.section-nav-inner a { flex: 0 0 auto; padding: 15px 0 13px; text-decoration: none; font-size: .88rem; font-weight: 760; color: var(--muted); border-bottom: 2px solid transparent; }
.section-nav-inner a:hover { color: var(--forest); border-bottom-color: var(--gold); }
.parador-content-section { padding-top: 64px; }
.content-layout { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 72px; align-items: start; }
.parador-prose { max-width: 760px; font-size: 1.06rem; }
.prose p { margin: 0 0 1.25em; }
.prose h2 { margin-bottom: .65em; }
.prose ul { padding-left: 1.3em; }
.prose li { margin-bottom: .55em; }
.content-section { scroll-margin-top: 150px; padding-top: 48px; border-top: 1px solid var(--line); margin-top: 48px; }
.content-section-first { padding-top: 0; border-top: 0; margin-top: 0; }
.content-section .eyebrow { margin-bottom: 8px; }
.booking-column { min-width: 0; }
.booking-panel { position: sticky; top: 145px; padding: 28px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.booking-panel h2 { font-size: 1.85rem; margin-bottom: 20px; }
.quick-facts { margin: 0 0 25px; }
.quick-facts > div { display: grid; grid-template-columns: 102px 1fr; gap: 14px; padding: 12px 0; border-top: 1px solid #eee9e0; }
.quick-facts > div:first-child { border-top: 0; padding-top: 0; }
.quick-facts dt { color: var(--muted); font-size: .79rem; text-transform: uppercase; letter-spacing: .06em; font-weight: 780; }
.quick-facts dd { margin: 0; font-size: .91rem; }
.quick-facts dd a { color: var(--forest); }
.affiliate-note { color: var(--muted); font-size: .76rem; margin: 13px 0 0; }
.map-frame { overflow: hidden; border-radius: var(--radius); border: 1px solid var(--line); background: var(--soft); aspect-ratio: 16/9; margin: 22px 0 14px; }
.map-frame iframe { width: 100%; height: 100%; border: 0; }
.photo-strip { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.photo-strip-item { padding: 0; border: 0; background: transparent; overflow: hidden; border-radius: 14px; aspect-ratio: 4/3; cursor: pointer; }
.photo-strip-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .25s ease; }
.photo-strip-item:hover img { transform: scale(1.02); }

/* Footer */
.site-footer { background: var(--forest-2); color: rgba(255,255,255,.82); padding: 56px 0 24px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 44px; }
.footer-grid strong { color: #fff; font-family: Georgia, serif; font-size: 1.3rem; }
.footer-grid ul { margin: 0; padding: 0; list-style: none; }
.footer-grid a { color: #fff; }
.footer-bottom { display: flex; justify-content: space-between; gap: 20px; margin-top: 42px; padding-top: 20px; border-top: 1px solid rgba(255,255,255,.15); font-size: .82rem; }

@media (max-width: 980px) {
  .region-grid, .country-grid { grid-template-columns: repeat(2, 1fr); }
  .card-grid { grid-template-columns: repeat(2, 1fr); }
  .parador-title-grid { grid-template-columns: 1fr; gap: 24px; }
  .title-cta { max-width: 320px; align-items: stretch; }
  .content-layout { grid-template-columns: 1fr; gap: 48px; }
  .parador-prose { max-width: none; }
  .booking-panel { position: static; }
  .gallery-grid { grid-template-columns: 1.55fr 1fr; height: 500px; }
  .primary-nav { display: none; position: absolute; left: 20px; right: 20px; top: 72px; background: #fff; padding: 18px; border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); }
  .primary-nav.is-open { display: block; }
  .primary-nav ul { flex-direction: column; gap: 12px; }
  .nav-toggle { display: inline-flex; border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 9px 14px; font-weight: 750; }
}

@media (max-width: 720px) {
  .ili-shell { width: min(100% - 28px, 1180px); }
  .section { padding: 62px 0; }
  .home-hero { min-height: 530px; }
  .home-intro-grid, .editorial-split { grid-template-columns: 1fr; gap: 0; }
  .home-intro-grid > div { padding: 18px 0; border-right: 0; border-bottom: 1px solid var(--line); }
  .home-intro-grid > div:last-child { border-bottom: 0; }
  .region-grid, .country-grid, .card-grid { grid-template-columns: 1fr; }
  .section-heading, .footer-bottom { align-items: flex-start; flex-direction: column; }
  .footer-grid { grid-template-columns: 1fr; }
  .brand-tagline { display: none; }
  .parador-title-block { padding: 36px 0 25px; }
  .parador-title-block h1 { font-size: clamp(2.65rem, 13vw, 4.1rem); }
  .gallery-grid { display: block; height: auto; min-height: 0; }
  .gallery-main { width: 100%; border-radius: 16px; aspect-ratio: 4/3; }
  .gallery-main img { width: 100%; height: 100%; object-fit: cover; }
  .gallery-side { display: flex; margin-top: 8px; overflow-x: auto; gap: 8px; padding-bottom: 4px; }
  .gallery-thumb, .gallery-thumb:nth-child(2), .gallery-thumb:nth-child(4) { flex: 0 0 110px; border-radius: 10px; aspect-ratio: 1/1; }
  .parador-section-nav { top: 78px; }
  .section-nav-inner { gap: 22px; }
  .content-section { scroll-margin-top: 140px; }
  .photo-strip { grid-template-columns: repeat(2, 1fr); }
  .quick-facts > div { grid-template-columns: 92px 1fr; }
}

/* R010: balanced desktop gallery. Keep the image prominent without over-enlarging legacy sources. */
@media (min-width: 721px) {
  .gallery-grid {
    grid-template-columns: minmax(0, 2.15fr) minmax(270px, .9fr);
    height: clamp(420px, 38vw, 500px);
    min-height: 0;
  }
  .gallery-main img,
  .gallery-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }
}


/* R011: dimension-audited legacy gallery.
 * Granada's original server images are 470x200 (2.35:1). Keep the desktop
 * hero close to that aspect ratio instead of stretching the image vertically.
 */
@media (min-width: 721px) {
  .gallery-grid {
    grid-template-columns: minmax(0, 2.3fr) minmax(260px, .8fr);
    height: clamp(340px, 31vw, 390px);
    min-height: 0;
  }
  .gallery-main img,
  .gallery-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }
}


/* R012: rebalance the desktop gallery.
 * Make the four-image panel materially wider, shorten the main image,
 * and lower the overall gallery height to suit the 470x200 legacy images.
 */
@media (min-width: 721px) {
  .gallery-grid {
    grid-template-columns: minmax(0, 1.55fr) minmax(360px, 1fr);
    height: clamp(300px, 26vw, 330px);
    min-height: 0;
  }
  .gallery-side {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
  }
  .gallery-main img,
  .gallery-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }
}


/* R013: make the quad panel larger, shorten the main image, and lower the hero again. */
@media (min-width: 721px) {
  .gallery-grid {
    grid-template-columns: minmax(0, 1.28fr) minmax(420px, 1fr);
    height: clamp(270px, 23vw, 295px);
    min-height: 0;
    gap: 12px;
  }
  .gallery-side {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 12px;
  }
  .gallery-main {
    border-radius: 20px 0 0 20px;
  }
  .gallery-main img,
  .gallery-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }
}


/* R014: logged-in build mode and archive polish. */
.ili-build-mode {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 9999;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(23,63,53,.94);
  color: #fff;
  font-size: .74rem;
  font-weight: 800;
  letter-spacing: .04em;
  box-shadow: 0 8px 26px rgba(0,0,0,.18);
}
.archive-hero p:last-child { max-width: 760px; color: var(--muted); font-size: 1.08rem; }


/* R015: taller header for the new stacked Iberian Luxury Inns logo. */
@media (min-width: 981px) {
  .header-inner {
    min-height: 104px;
  }
  .custom-logo {
    max-height: 82px;
    width: auto;
  }
  .parador-section-nav {
    top: 104px;
  }
  .booking-panel {
    top: 172px;
  }
}

@media (max-width: 980px) {
  .header-inner {
    min-height: 88px;
  }
  .custom-logo {
    max-height: 68px;
    width: auto;
  }
  .primary-nav {
    top: 82px;
  }
  .parador-section-nav {
    top: 88px;
  }
}

@media (max-width: 720px) {
  .header-inner {
    min-height: 82px;
  }
  .custom-logo {
    max-height: 62px;
  }
  .primary-nav {
    top: 76px;
  }
  .parador-section-nav {
    top: 82px;
  }
}


/* R016: horizontal brand left, navigation truly centered. */
@media (min-width: 981px) {
  .header-inner {
    min-height: 100px;
    display: grid;
    grid-template-columns: minmax(260px, 1fr) auto minmax(260px, 1fr);
    align-items: center;
    gap: 24px;
  }
  .header-inner::after {
    content: "";
    grid-column: 3;
  }
  .site-brand {
    grid-column: 1;
    justify-self: start;
    align-items: flex-start;
    max-width: 330px;
  }
  .custom-logo-link {
    display: block;
    line-height: 0;
  }
  .custom-logo {
    max-height: 72px;
    max-width: 320px;
    width: auto;
    height: auto;
  }
  .primary-nav {
    grid-column: 2;
    justify-self: center;
  }
  .primary-nav ul {
    justify-content: center;
    gap: 30px;
  }
  .primary-nav a {
    white-space: nowrap;
  }
  .parador-section-nav {
    top: 100px;
  }
  .booking-panel {
    top: 168px;
  }
}

/* Keep the mobile/tablet layout conventional and easy to use. */
@media (max-width: 980px) {
  .header-inner {
    display: flex;
    justify-content: space-between;
  }
  .site-brand {
    align-items: flex-start;
  }
}


/* R017: fix custom-logo markup and enforce a true three-column header. */
.site-brand { min-width: 0; }
.brand-text-link { display: inline-flex; flex-direction: column; text-decoration: none; }
@media (min-width: 981px) {
  .header-inner {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    min-height: 96px;
    gap: 28px;
  }
  .site-brand {
    grid-column: 1;
    justify-self: start;
    align-self: center;
    max-width: 340px;
  }
  .site-brand .custom-logo-link {
    display: block;
    line-height: 0;
  }
  .site-brand .custom-logo {
    display: block;
    max-height: 72px;
    max-width: 330px;
    width: auto;
    height: auto;
  }
  .primary-nav {
    grid-column: 2;
    justify-self: center;
    align-self: center;
  }
  .header-balance {
    display: block;
    grid-column: 3;
  }
}
@media (max-width: 980px) {
  .header-balance { display: none; }
}


/* R018: horizontal-logo header + larger navigation labels. */
@media (min-width: 981px) {
  .header-inner {
    min-height: 94px;
    grid-template-columns: minmax(330px, 1fr) auto minmax(330px, 1fr);
  }

  .site-brand {
    max-width: 390px;
  }

  .custom-logo {
    max-height: 70px;
    max-width: 370px;
    width: auto;
    height: auto;
  }

  .primary-nav ul {
    gap: 34px;
  }

  .primary-nav a {
    font-size: 1.03rem;
    font-weight: 760;
    letter-spacing: .005em;
  }

  .parador-section-nav {
    top: 94px;
  }

  .booking-panel {
    top: 162px;
  }
}

@media (max-width: 980px) {
  .custom-logo {
    max-width: 285px;
    max-height: 62px;
  }

  .primary-nav a {
    font-size: 1rem;
  }
}


/* R025: reopen the desktop gallery for HBX high-resolution imagery.
 * Keep a substantial 4-image panel while giving the hero more visual impact.
 */
@media (min-width: 721px) {
  .gallery-grid {
    grid-template-columns: minmax(0, 1.5fr) minmax(390px, 1fr);
    height: clamp(410px, 38vw, 460px);
    min-height: 0;
    gap: 12px;
  }

  .gallery-side {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 12px;
  }

  .gallery-main {
    border-radius: 20px 0 0 20px;
  }

  .gallery-main img,
  .gallery-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }
}


/* R026: balance the editorial content and quick-facts column. */
@media (min-width: 981px) {
  .parador-content-section {
    padding-top: 56px;
  }

  .content-layout {
    grid-template-columns: minmax(0, 1fr) 315px;
    gap: 52px;
  }

  .parador-prose {
    max-width: 850px;
    font-size: 1.055rem;
    line-height: 1.72;
  }

  .content-section {
    padding-top: 42px;
    margin-top: 42px;
  }

  .booking-panel {
    padding: 24px;
    border-radius: 16px;
    box-shadow: 0 14px 36px rgba(28, 45, 38, .09);
  }

  .booking-panel h2 {
    font-size: 1.55rem;
    margin-bottom: 18px;
  }

  .quick-facts > div {
    grid-template-columns: 94px 1fr;
    gap: 12px;
    padding: 10px 0;
  }

  .quick-facts dt {
    font-size: .74rem;
  }

  .quick-facts dd {
    font-size: .9rem;
    line-height: 1.45;
  }

  .affiliate-note {
    line-height: 1.45;
  }
}

.photo-strip-section {
  padding-top: 54px;
  padding-bottom: 58px;
}

.photo-strip {
  gap: 16px;
}

.photo-strip-item {
  border-radius: 16px;
}


/* R035: archive browsing controls */
.archive-browse-bar {
  position: sticky;
  top: 94px;
  z-index: 36;
  background: rgba(255,253,248,.97);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}

.archive-filters {
  display: grid;
  grid-template-columns: minmax(220px, 1.35fr) minmax(170px, .85fr) minmax(170px, .85fr) minmax(135px, .55fr) auto;
  gap: 14px;
  align-items: end;
  padding: 18px 0;
}

.archive-filter-field {
  min-width: 0;
}

.archive-filter-field label {
  display: block;
  margin-bottom: 6px;
  color: var(--forest);
  font-size: .72rem;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.archive-filter-field input,
.archive-filter-field select {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  padding: 10px 12px;
  color: var(--ink);
  font: inherit;
}

.archive-filter-field input:focus,
.archive-filter-field select:focus {
  outline: 2px solid rgba(184,135,59,.25);
  border-color: var(--gold);
}

.archive-filter-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 46px;
}

.archive-filter-actions .button {
  min-height: 46px;
  padding: 10px 18px;
  border: 0;
  cursor: pointer;
  white-space: nowrap;
}

.archive-filter-reset {
  color: var(--forest);
  font-size: .86rem;
  font-weight: 760;
}

.archive-results-section {
  padding-top: 38px;
}

.archive-results-heading {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 20px;
  margin-bottom: 20px;
}

.archive-result-count {
  margin: 0;
  color: var(--forest);
  font-family: Georgia, serif;
  font-size: 1.45rem;
  font-weight: 700;
}

.archive-result-note {
  margin: 0;
  color: var(--muted);
  font-size: .86rem;
}

.navigation.pagination {
  margin-top: 42px;
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.page-numbers {
  min-width: 42px;
  min-height: 42px;
  padding: 9px 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  background: #fff;
  color: var(--forest);
  font-weight: 760;
}

.page-numbers.current {
  border-color: var(--forest);
  background: var(--forest);
  color: #fff;
}

@media (max-width: 1100px) {
  .archive-browse-bar {
    position: static;
  }

  .archive-filters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .archive-filter-actions {
    grid-column: 1 / -1;
  }
}

@media (max-width: 640px) {
  .archive-filters {
    grid-template-columns: 1fr;
    gap: 11px;
    padding: 16px 0;
  }

  .archive-filter-actions {
    grid-column: auto;
  }

  .archive-filter-actions .button {
    flex: 1;
  }

  .archive-results-heading {
    display: block;
  }

  .archive-result-note {
    margin-top: 4px;
  }
}


/* R036: keep odd HBX media from stretching the fixed gallery frame. */
@media (min-width: 721px) {
  .gallery-grid,
  .gallery-main,
  .gallery-side,
  .gallery-thumb {
    min-width: 0;
    min-height: 0;
  }

  .gallery-grid {
    overflow: hidden;
  }

  .gallery-main,
  .gallery-thumb {
    height: 100%;
  }

  .gallery-main img,
  .gallery-thumb img {
    display: block;
    min-width: 0;
    min-height: 0;
  }
}

.gallery-choice-rejected {
  display: none !important;
}


/* R037: archive-card HBX image quality guard. */
.property-card .card-media {
  overflow: hidden;
  background: #ece8df;
}

.property-card .card-media img {
  display: block;
}


/* R040: Regions landing page — clickable geographic browsing diagrams. */
.regions-hero p:last-child {
  max-width: 760px;
}

.regions-country-section {
  overflow: hidden;
}

.regions-country-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 40px;
  align-items: end;
  margin-bottom: 34px;
}

.regions-country-heading h2 {
  margin-bottom: 12px;
}

.regions-country-heading p:last-child {
  max-width: 760px;
  margin: 0;
  color: var(--muted);
  font-size: 1.05rem;
}

.regions-country-button {
  min-height: 46px;
  padding: 10px 19px;
  background: #fff;
  border: 1px solid var(--line);
  color: var(--forest);
  box-shadow: var(--shadow-soft);
}

.region-map-panel {
  position: relative;
  border: 1px solid var(--line);
  border-radius: 28px;
  background:
    radial-gradient(circle at 20% 12%, rgba(181,138,72,.09), transparent 28%),
    linear-gradient(145deg, #fffefa, #f2eee5);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
}

.region-map-panel::before,
.region-map-panel::after {
  content: "";
  position: absolute;
  pointer-events: none;
}

.region-map-panel::before {
  inset: 18px;
  border: 1px solid rgba(23,63,53,.06);
  border-radius: 20px;
}

.region-map-panel::after {
  width: 340px;
  height: 340px;
  right: -145px;
  bottom: -185px;
  border: 1px solid rgba(181,138,72,.15);
  border-radius: 50%;
  box-shadow:
    0 0 0 55px rgba(181,138,72,.035),
    0 0 0 110px rgba(181,138,72,.02);
}

.region-map-compass {
  position: absolute;
  z-index: 3;
  top: 32px;
  right: 34px;
  display: grid;
  justify-items: center;
  gap: 3px;
  color: var(--gold);
  font-size: .68rem;
  font-weight: 900;
  letter-spacing: .12em;
}

.region-map-compass i {
  display: block;
  width: 1px;
  height: 28px;
  background: currentColor;
  position: relative;
}

.region-map-compass i::before {
  content: "";
  position: absolute;
  top: -1px;
  left: -4px;
  width: 7px;
  height: 7px;
  border-top: 1px solid currentColor;
  border-left: 1px solid currentColor;
  transform: rotate(45deg);
}

.region-map {
  position: relative;
  z-index: 2;
}

.region-map-spain {
  min-height: 650px;
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  grid-template-rows: repeat(8, minmax(46px, 1fr));
  gap: 7px;
  padding: 58px 86px 58px 66px;
}

.region-map-zone {
  display: flex;
  min-width: 0;
  flex-direction: column;
  justify-content: center;
  padding: 10px 12px;
  border: 1px solid rgba(23,63,53,.18);
  border-radius: 14px;
  background: rgba(255,255,255,.92);
  color: var(--forest);
  text-decoration: none;
  box-shadow: 0 7px 18px rgba(31,41,39,.045);
  transition: transform .18s ease, background .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.region-map-zone:hover,
.region-map-zone:focus-visible {
  z-index: 5;
  transform: translateY(-2px);
  border-color: var(--gold);
  background: #fff;
  box-shadow: 0 12px 28px rgba(31,41,39,.12);
  outline: none;
}

.region-map-name {
  display: block;
  font-family: Georgia, "Times New Roman", serif;
  font-size: .98rem;
  font-weight: 700;
  line-height: 1.12;
}

.region-map-zone small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: .68rem;
  line-height: 1.15;
}

/* Spain: deliberately geographic rather than alphabetical. */
.region-map-zone-galicia        { grid-column: 1 / 3;  grid-row: 2 / 4; }
.region-map-zone-asturias       { grid-column: 3 / 5;  grid-row: 1 / 2; }
.region-map-zone-cantabria      { grid-column: 5 / 6;  grid-row: 1 / 2; }
.region-map-zone-basque         { grid-column: 6 / 8;  grid-row: 1 / 2; }
.region-map-zone-navarre        { grid-column: 7 / 9;  grid-row: 2 / 3; }
.region-map-zone-rioja          { grid-column: 6 / 7;  grid-row: 2 / 3; }
.region-map-zone-castile-leon   { grid-column: 3 / 6;  grid-row: 2 / 5; }
.region-map-zone-aragon         { grid-column: 7 / 9;  grid-row: 3 / 5; }
.region-map-zone-catalonia      { grid-column: 9 / 12; grid-row: 2 / 4; }
.region-map-zone-madrid         { grid-column: 5 / 6;  grid-row: 5 / 6; }
.region-map-zone-extremadura    { grid-column: 2 / 4;  grid-row: 5 / 7; }
.region-map-zone-castile-mancha { grid-column: 4 / 7;  grid-row: 5 / 7; }
.region-map-zone-valencia       { grid-column: 8 / 10; grid-row: 5 / 7; }
.region-map-zone-murcia         { grid-column: 7 / 9;  grid-row: 7 / 8; }
.region-map-zone-andalusia      { grid-column: 2 / 7;  grid-row: 7 / 9; }
.region-map-zone-canary         { grid-column: 10 / 12; grid-row: 7 / 9; }
.region-map-zone-ceuta          { grid-column: 6 / 7;  grid-row: 8 / 9; }
.region-map-zone-melilla        { grid-column: 8 / 9;  grid-row: 8 / 9; }

.region-map-zone-madrid,
.region-map-zone-rioja,
.region-map-zone-ceuta,
.region-map-zone-melilla {
  padding: 8px;
}

.region-map-zone-madrid .region-map-name,
.region-map-zone-rioja .region-map-name,
.region-map-zone-ceuta .region-map-name,
.region-map-zone-melilla .region-map-name {
  font-size: .82rem;
}

.region-map-zone-ceuta small,
.region-map-zone-melilla small,
.region-map-zone-rioja small {
  display: none;
}

/* Portugal: vertical mainland plus an Azores inset. */
.region-map-portugal {
  min-height: 680px;
  display: grid;
  grid-template-columns: minmax(170px, .75fr) minmax(280px, 1fr) minmax(190px, .75fr);
  grid-template-rows: repeat(10, 1fr);
  gap: 8px;
  padding: 56px 110px;
}

.region-map-portugal .region-map-zone {
  padding: 14px 18px;
}

.region-map-portugal .region-map-name {
  font-size: 1.1rem;
}

.region-map-zone-north {
  grid-column: 2 / 3;
  grid-row: 1 / 4;
  border-radius: 34px 28px 18px 22px;
}

.region-map-zone-central {
  grid-column: 2 / 3;
  grid-row: 4 / 6;
  border-radius: 18px 22px 16px 20px;
}

.region-map-zone-lisbon {
  grid-column: 1 / 3;
  grid-row: 6 / 7;
  margin-left: 28%;
  border-radius: 24px 14px 18px 26px;
}

.region-map-zone-alentejo {
  grid-column: 2 / 3;
  grid-row: 7 / 10;
  border-radius: 20px 18px 28px 22px;
}

.region-map-zone-algarve {
  grid-column: 2 / 3;
  grid-row: 10 / 11;
  margin-inline: 10%;
  border-radius: 16px 16px 34px 34px;
}

.region-map-zone-azores {
  grid-column: 1 / 2;
  grid-row: 3 / 5;
  align-self: center;
  border-style: dashed;
}

.regions-map-note {
  max-width: 860px;
  margin: 18px auto 0;
  text-align: center;
  color: var(--muted);
  font-size: .84rem;
}

.regions-editorial {
  border-top: 1px solid var(--line);
}

@media (max-width: 980px) {
  .regions-country-heading {
    grid-template-columns: 1fr;
    gap: 22px;
  }

  .regions-country-button {
    justify-self: start;
  }

  .region-map-spain {
    min-height: 600px;
    padding: 58px 34px 44px;
  }

  .region-map-portugal {
    min-height: 640px;
    padding: 52px 60px;
  }
}

@media (max-width: 720px) {
  .region-map-panel {
    border-radius: 20px;
  }

  .region-map-panel::before,
  .region-map-panel::after,
  .region-map-compass {
    display: none;
  }

  .region-map-spain,
  .region-map-portugal {
    min-height: 0;
    display: grid;
    grid-template-columns: 1fr;
    grid-template-rows: none;
    gap: 10px;
    padding: 14px;
  }

  .region-map-zone,
  .region-map-zone-galicia,
  .region-map-zone-asturias,
  .region-map-zone-cantabria,
  .region-map-zone-basque,
  .region-map-zone-navarre,
  .region-map-zone-rioja,
  .region-map-zone-castile-leon,
  .region-map-zone-aragon,
  .region-map-zone-catalonia,
  .region-map-zone-madrid,
  .region-map-zone-extremadura,
  .region-map-zone-castile-mancha,
  .region-map-zone-valencia,
  .region-map-zone-murcia,
  .region-map-zone-andalusia,
  .region-map-zone-canary,
  .region-map-zone-ceuta,
  .region-map-zone-melilla,
  .region-map-zone-north,
  .region-map-zone-central,
  .region-map-zone-lisbon,
  .region-map-zone-alentejo,
  .region-map-zone-algarve,
  .region-map-zone-azores {
    grid-column: auto;
    grid-row: auto;
    margin: 0;
    min-height: 74px;
    border-radius: 14px;
    border-style: solid;
    padding: 13px 15px;
  }

  .region-map-zone-madrid .region-map-name,
  .region-map-zone-rioja .region-map-name,
  .region-map-zone-ceuta .region-map-name,
  .region-map-zone-melilla .region-map-name,
  .region-map-portugal .region-map-name {
    font-size: 1rem;
  }

  .region-map-zone-ceuta small,
  .region-map-zone-melilla small,
  .region-map-zone-rioja small {
    display: block;
  }
}


/* R042: true regional-boundary map presentation. */
.true-region-map {
  position: relative;
  border: 1px solid var(--line);
  border-radius: 28px;
  background:
    radial-gradient(circle at 18% 12%, rgba(181,138,72,.08), transparent 30%),
    linear-gradient(145deg, #fffefa, #f4efe6);
  box-shadow: var(--shadow-soft);
  padding: 28px;
  overflow: hidden;
}

.true-map-canvas {
  position: relative;
  width: min(100%, 960px);
  margin: 0 auto;
}

.true-region-map-spain .true-map-canvas {
  width: min(100%, 980px);
}

.true-region-map-portugal .true-map-canvas {
  width: min(100%, 650px);
}

.true-map-base {
  display: block;
  width: 100%;
  height: auto;
  max-width: none;
  border-radius: 18px;
  filter: saturate(.22) sepia(.08) contrast(.93) brightness(1.03);
  opacity: .86;
}

.true-map-label-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.true-map-label {
  position: absolute;
  left: var(--map-x);
  top: var(--map-y);
  transform: translate(-50%, -50%);
  z-index: 4;
  max-width: 150px;
  padding: 7px 10px 6px;
  border: 1px solid rgba(23,63,53,.22);
  border-radius: 999px;
  background: rgba(255,253,248,.95);
  color: var(--forest);
  text-align: center;
  text-decoration: none;
  line-height: 1.05;
  box-shadow: 0 5px 16px rgba(31,41,39,.10);
  pointer-events: auto;
  transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease, background .16s ease;
}

.true-map-label:hover,
.true-map-label:focus-visible {
  z-index: 8;
  transform: translate(-50%, -50%) scale(1.045);
  border-color: var(--gold);
  background: #fff;
  box-shadow: 0 10px 26px rgba(31,41,39,.18);
  outline: none;
}

.true-map-label span {
  display: block;
  font-family: Georgia, "Times New Roman", serif;
  font-size: .84rem;
  font-weight: 700;
  white-space: nowrap;
}

.true-map-label small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: .58rem;
  font-weight: 700;
  white-space: nowrap;
}

.true-map-label-castile-leon,
.true-map-label-castile-mancha,
.true-map-label-valencia,
.true-map-label-basque {
  max-width: 175px;
}

.true-map-label-ceuta,
.true-map-label-melilla {
  padding: 5px 8px;
}

.true-map-label-ceuta small,
.true-map-label-melilla small {
  display: none;
}

.true-region-map-portugal .true-map-label {
  max-width: 180px;
  padding: 8px 11px 7px;
}

.true-region-map-portugal .true-map-label span {
  font-size: .9rem;
}

.regions-map-attribution {
  margin: 12px auto 0;
  max-width: 980px;
  color: var(--muted);
  text-align: center;
  font-size: .68rem;
  line-height: 1.45;
}

.regions-map-attribution a {
  color: inherit;
}

@media (max-width: 900px) {
  .true-region-map {
    padding: 18px;
  }

  .true-map-label {
    padding: 6px 8px 5px;
  }

  .true-map-label span {
    font-size: .73rem;
  }

  .true-map-label small {
    display: none;
  }
}

@media (max-width: 650px) {
  .true-region-map {
    padding: 10px;
    border-radius: 20px;
  }

  .true-map-canvas {
    overflow: visible;
  }

  .true-map-label {
    padding: 4px 6px;
    border-radius: 8px;
  }

  .true-map-label span {
    font-family: inherit;
    font-size: .62rem;
    line-height: 1;
    white-space: normal;
  }

  .true-region-map-portugal .true-map-label span {
    font-size: .64rem;
  }

  .regions-map-attribution {
    font-size: .62rem;
  }
}


/* R043: visually aligned labels for the true region maps. */
.true-map-label {
  padding: 6px 9px 5px;
  box-shadow: 0 4px 13px rgba(31,41,39,.10);
}

.true-map-label span {
  font-size: .78rem;
}

.true-map-label small {
  font-size: .54rem;
}

.true-map-label-ceuta,
.true-map-label-melilla {
  padding: 4px 7px;
}

.true-region-map-portugal .true-map-label {
  padding: 7px 10px 6px;
}

.true-map-label-azores {
  border-color: rgba(184,135,59,.52);
}

@media (max-width: 900px) {
  .true-map-label span {
    font-size: .68rem;
  }
}


/* R044: Spain map now includes the North African coast for Ceuta and Melilla. */
.true-region-map-spain .true-map-canvas {
  width: min(100%, 920px);
}

.true-map-context-label {
  position: absolute;
  z-index: 2;
  color: rgba(23,63,53,.52);
  font-size: .66rem;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
  pointer-events: none;
}

.true-map-context-morocco {
  left: 45%;
  top: 91%;
  transform: translate(-50%, -50%);
}

.true-map-label-ceuta,
.true-map-label-melilla {
  border-color: rgba(184,135,59,.58);
}

@media (max-width: 650px) {
  .true-map-context-label {
    font-size: .5rem;
  }
}


/* R045: stable map navigation — small markers on-map, full names in a key. */
.region-map-marker-layer {
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
}

.region-map-marker {
  position: absolute;
  left: var(--map-x);
  top: var(--map-y);
  transform: translate(-50%, -50%);
  width: 27px;
  height: 27px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #b8873b;
  border-radius: 50%;
  background: #fffdf8;
  color: var(--forest);
  box-shadow: 0 3px 10px rgba(31,41,39,.18);
  font-size: .68rem;
  font-weight: 900;
  line-height: 1;
  text-decoration: none;
  pointer-events: auto;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}

.region-map-marker:hover,
.region-map-marker:focus-visible {
  z-index: 20;
  transform: translate(-50%, -50%) scale(1.14);
  background: #fff;
  box-shadow: 0 7px 18px rgba(31,41,39,.24);
  outline: none;
}

.region-map-marker::after {
  content: attr(data-region-tooltip);
  position: absolute;
  left: 50%;
  bottom: calc(100% + 9px);
  transform: translateX(-50%) translateY(3px);
  width: max-content;
  max-width: 220px;
  padding: 7px 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255,253,248,.98);
  color: var(--forest);
  box-shadow: 0 8px 22px rgba(31,41,39,.15);
  font-size: .69rem;
  font-weight: 750;
  line-height: 1.2;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .12s ease, transform .12s ease;
}

.region-map-marker:hover::after,
.region-map-marker:focus-visible::after {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.region-map-key-note {
  margin: 14px auto 16px;
  color: var(--muted);
  text-align: center;
  font-size: .78rem;
}

.region-map-directory {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  max-width: 1080px;
  margin: 0 auto 18px;
}

.region-directory-item {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 62px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: rgba(255,255,255,.78);
  color: var(--forest);
  text-decoration: none;
  transition: transform .15s ease, border-color .15s ease, background .15s ease, box-shadow .15s ease;
}

.region-directory-item:hover,
.region-directory-item:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(184,135,59,.72);
  background: #fff;
  box-shadow: 0 7px 18px rgba(31,41,39,.08);
  outline: none;
}

.region-directory-number {
  width: 29px;
  height: 29px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #b8873b;
  border-radius: 50%;
  background: #fffdf8;
  font-size: .68rem;
  font-weight: 900;
}

.region-directory-copy {
  min-width: 0;
}

.region-directory-copy strong,
.region-directory-copy small {
  display: block;
}

.region-directory-copy strong {
  font-family: Georgia, "Times New Roman", serif;
  font-size: .9rem;
  line-height: 1.12;
}

.region-directory-copy small {
  margin-top: 3px;
  color: var(--muted);
  font-size: .68rem;
}

.region-directory-arrow {
  color: var(--gold);
  font-size: 1rem;
}

/*
 * The lower-left island-chain inset in the Portugal source map is the Azores.
 * The upper-left single-island inset is Madeira. R045 deliberately places
 * marker 6 on the lower archipelago and leaves Madeira unmarked.
 */
.true-map-label,
.true-map-context-label {
  display: none !important;
}

@media (max-width: 900px) {
  .region-map-directory {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .region-map-marker {
    width: 24px;
    height: 24px;
    font-size: .62rem;
  }

  .region-map-marker::after {
    display: none;
  }
}

@media (max-width: 620px) {
  .region-map-directory {
    grid-template-columns: 1fr;
  }

  .region-directory-item {
    min-height: 58px;
  }

  .region-map-marker {
    width: 21px;
    height: 21px;
    border-width: 1.5px;
    font-size: .56rem;
  }
}


/* R046: projection-based Spain map + region-centroid Portugal markers. */
.projected-spain-map {
  padding: 26px 28px 22px;
}

.spain-map-composite {
  position: relative;
  width: min(100%, 1040px);
  min-height: 585px;
  margin: 0 auto;
}

.spain-mainland-map {
  position: absolute;
  top: 0;
  right: 0;
  width: 78%;
}

.spain-mainland-map > img {
  display: block;
  width: 100%;
  height: auto;
  filter: saturate(.18) sepia(.05) contrast(.94) brightness(1.02);
  opacity: .92;
}

.spain-canary-inset {
  position: absolute;
  left: 1%;
  bottom: 8%;
  width: 20%;
  z-index: 5;
}

.spain-canary-inset-map {
  position: relative;
  padding: 10px;
  border: 1px solid rgba(23,63,53,.14);
  border-radius: 14px;
  background: rgba(255,253,248,.96);
  box-shadow: 0 8px 22px rgba(31,41,39,.08);
}

.spain-canary-inset-map img {
  display: block;
  width: 100%;
  height: auto;
  filter: grayscale(1) contrast(.92) brightness(1.05);
  opacity: .78;
}

.spain-inset-label {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  text-align: center;
  font-size: .7rem;
  font-weight: 800;
  letter-spacing: .04em;
}

.spain-canary-inset .region-map-marker {
  width: 25px;
  height: 25px;
}

.projected-portugal-map .true-map-canvas {
  width: min(100%, 650px);
}

/*
 * R046 markers are intentionally smaller than R045: once the positions are
 * accurate, the map should remain the dominant visual rather than the buttons.
 */
.projected-spain-map .region-map-marker,
.projected-portugal-map .region-map-marker {
  width: 24px;
  height: 24px;
  font-size: .62rem;
}

.projected-spain-map .region-map-marker-ceuta,
.projected-spain-map .region-map-marker-melilla {
  border-color: rgba(184,135,59,.78);
}

@media (max-width: 920px) {
  .spain-map-composite {
    min-height: 515px;
  }

  .spain-mainland-map {
    width: 80%;
  }

  .spain-canary-inset {
    width: 19%;
    bottom: 10%;
  }
}

@media (max-width: 700px) {
  .projected-spain-map {
    padding: 14px;
  }

  .spain-map-composite {
    min-height: 0;
    display: flex;
    flex-direction: column;
    gap: 14px;
  }

  .spain-mainland-map,
  .spain-canary-inset {
    position: relative;
    inset: auto;
    width: 100%;
  }

  .spain-mainland-map {
    order: 1;
  }

  .spain-canary-inset {
    order: 2;
    max-width: 280px;
    align-self: flex-start;
  }

  .spain-canary-inset-map {
    padding: 8px;
  }

  .projected-spain-map .region-map-marker,
  .projected-portugal-map .region-map-marker {
    width: 20px;
    height: 20px;
    font-size: .53rem;
  }
}


/* R047: final region-map alignment pass.
 * Spain now uses a stable 2-column composition:
 * left = Canary + North Africa context; right = projected mainland map.
 * Portugal is deliberately smaller to reflect its scale relative to Spain.
 */
.projected-spain-map {
  padding: 24px 26px 22px;
}

.projected-spain-map .spain-map-composite {
  position: relative;
  width: min(100%, 1080px);
  min-height: 0;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(180px, 22%) minmax(0, 1fr);
  gap: 22px;
  align-items: center;
}

.projected-spain-map .spain-mainland-map {
  position: relative;
  inset: auto;
  width: 100%;
  min-width: 0;
}

.projected-spain-map .spain-mainland-map > img {
  width: 100%;
  height: auto;
}

.spain-context-column {
  display: grid;
  gap: 22px;
  align-content: center;
}

.spain-context-inset {
  min-width: 0;
}

.spain-context-map {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(23,63,53,.14);
  border-radius: 14px;
  background: rgba(255,253,248,.96);
  box-shadow: 0 8px 22px rgba(31,41,39,.08);
  padding: 10px;
}

.spain-context-map img {
  display: block;
  width: 100%;
  height: auto;
  filter: grayscale(1) contrast(.92) brightness(1.05);
  opacity: .80;
}

.spain-morocco-context-map img {
  filter: saturate(.18) sepia(.04) contrast(.94) brightness(1.04);
  opacity: .84;
}

.spain-context-inset .spain-inset-label {
  display: block;
  margin-top: 7px;
  color: var(--muted);
  text-align: center;
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .035em;
}

/* Keep Canary marker centered on its dedicated Atlantic inset. */
.spain-canary-context-map .region-map-marker {
  width: 24px;
  height: 24px;
}

/* Ceuta/Melilla sit near Morocco's north coast; make those two easy to see. */
.spain-morocco-context-map .region-map-marker {
  width: 23px;
  height: 23px;
  border-color: rgba(184,135,59,.82);
  font-size: .59rem;
}

/* Portugal should not visually compete with Spain at the same physical size. */
.projected-portugal-map {
  width: min(100%, 760px);
  margin-inline: auto;
  padding: 20px 22px;
}

.projected-portugal-map .true-map-canvas {
  width: min(100%, 470px);
}

/* R047 fine-tuned Spain markers: Basque Country, La Rioja, Catalonia.
 * Their final positions are driven by adjusted geographic representative points,
 * not CSS pixel offsets.
 */

@media (max-width: 900px) {
  .projected-spain-map .spain-map-composite {
    grid-template-columns: minmax(150px, 23%) minmax(0, 1fr);
    gap: 16px;
  }

  .spain-context-column {
    gap: 16px;
  }

  .projected-portugal-map {
    width: min(100%, 680px);
  }

  .projected-portugal-map .true-map-canvas {
    width: min(100%, 430px);
  }
}

@media (max-width: 700px) {
  .projected-spain-map .spain-map-composite {
    display: flex;
    flex-direction: column;
    gap: 14px;
  }

  .projected-spain-map .spain-mainland-map {
    order: 1;
  }

  .spain-context-column {
    order: 2;
    width: 100%;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  .projected-portugal-map {
    width: 100%;
    padding: 14px;
  }

  .projected-portugal-map .true-map-canvas {
    width: min(100%, 390px);
  }
}

@media (max-width: 480px) {
  .spain-context-column {
    grid-template-columns: 1fr;
  }
}


/* R050: temporary HBX overview fallback for newly added native properties. */
.content-source-note {
  margin-top: 18px;
  color: var(--muted);
  font-size: .76rem;
  font-style: italic;
}


/* R052: destination-style individual region pages. */
.region-destination-hero {
  padding-bottom: 56px;
}

.region-breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 22px;
  color: rgba(255,255,255,.72);
  font-size: .78rem;
}

.region-breadcrumbs a {
  color: inherit;
  text-decoration: none;
}

.region-breadcrumbs a:hover {
  color: #fff;
}

.region-destination-hero .term-description,
.region-destination-hero > .ili-shell > p:not(.eyebrow) {
  max-width: 760px;
}

.region-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin-top: 28px;
}

.region-secondary-button {
  min-height: 46px;
  border: 1px solid rgba(255,255,255,.42);
  background: rgba(255,255,255,.08);
  color: #fff;
}

.region-secondary-button:hover {
  background: rgba(255,255,255,.14);
  color: #fff;
}

.region-back-link {
  color: rgba(255,255,255,.82);
  font-size: .84rem;
  font-weight: 760;
}

.region-properties-section {
  padding-top: 48px;
}

.region-results-heading {
  display: flex;
  justify-content: space-between;
  gap: 28px;
  align-items: end;
  margin-bottom: 24px;
}

.region-results-heading h2 {
  margin-bottom: 0;
}

.region-more-section {
  border-top: 1px solid var(--line);
}

.region-more-heading {
  margin-bottom: 24px;
}

.region-link-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.region-link-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas:
    "name arrow"
    "count arrow";
  gap: 4px 14px;
  align-items: center;
  min-height: 78px;
  padding: 15px 17px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255,255,255,.8);
  color: var(--forest);
  text-decoration: none;
  transition: transform .15s ease, border-color .15s ease, box-shadow .15s ease, background .15s ease;
}

.region-link-card:hover,
.region-link-card:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(184,135,59,.68);
  background: #fff;
  box-shadow: 0 8px 20px rgba(31,41,39,.08);
  outline: none;
}

.region-link-card strong {
  grid-area: name;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1rem;
}

.region-link-card span {
  grid-area: count;
  color: var(--muted);
  font-size: .72rem;
}

.region-link-card i {
  grid-area: arrow;
  color: var(--gold);
  font-size: 1.05rem;
  font-style: normal;
}

@media (max-width: 860px) {
  .region-link-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  .region-destination-hero {
    padding-bottom: 42px;
  }

  .region-hero-actions {
    align-items: stretch;
  }

  .region-hero-actions .button {
    width: 100%;
    justify-content: center;
  }

  .region-back-link {
    width: 100%;
    text-align: center;
    padding-top: 4px;
  }

  .region-link-grid {
    grid-template-columns: 1fr;
  }
}
