/* ==========================================================================
   InmoCapMed · Portal público de inmuebles
   --------------------------------------------------------------------------
   Hoja aislada: todas las reglas usan el prefijo portal- o se aplican bajo
   .portal-page. Reutiliza los tokens y componentes de landing.css (home-*)
   para que el portal parezca parte del producto desde el primer día.
   No modifica app.css ni landing.css.
   ========================================================================== */

.portal-page {
    --portal-gap: 26px;
    --portal-side: 296px;
    --portal-card-radius: 20px;
    --home-header: 70px;

    background: var(--home-surface);
}

/* La cabecera del portal es siempre sólida: las páginas interiores tienen
   fondo claro y el texto blanco debe mantener contraste desde el scroll 0. */
.portal-page .home-header,
.portal-page .home-header.is-scrolled {
    height: 70px;
    background: rgba(7, 26, 47, .95);
    border-bottom-color: rgba(255, 255, 255, .12);
    box-shadow: 0 10px 30px rgba(4, 16, 29, .17);
    backdrop-filter: blur(16px) saturate(130%);
    -webkit-backdrop-filter: blur(16px) saturate(130%);
}

.portal-page .home-nav a[aria-current="page"] { color: #fff; }
.portal-page .home-nav a[aria-current="page"]::after { scale: 1 1; transform-origin: left; }

/* --------------------------------------------------------------------------
   Botones auxiliares
   -------------------------------------------------------------------------- */
.portal-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 40px;
    padding: 9px 16px;
    border: 1px solid var(--home-line);
    border-radius: 11px;
    background: var(--home-white);
    color: var(--home-ink);
    font-size: 12.5px;
    font-weight: 650;
    text-decoration: none;
    cursor: pointer;
    transition: border-color .2s ease, background .2s ease, color .2s ease, transform .2s ease;
}
.portal-btn:hover {
    border-color: var(--home-gold);
    color: var(--home-navy);
    transform: translateY(-1px);
}
.portal-btn--ghost { background: var(--home-white); }
.portal-btn .icon { flex: 0 0 auto; }

/* --------------------------------------------------------------------------
   Migas de pan
   -------------------------------------------------------------------------- */
.portal-breadcrumb {
    display: flex;
    align-items: center;
    gap: 9px;
    flex-wrap: wrap;
    margin-bottom: 26px;
    color: rgba(255, 255, 255, .62);
    font-size: 12px;
    font-weight: 600;
}
.portal-breadcrumb a { color: rgba(255, 255, 255, .82); text-decoration: none; }
.portal-breadcrumb a:hover { color: #fff; text-decoration: underline; }
.portal-breadcrumb strong {
    max-width: 380px;
    overflow: hidden;
    color: #fff;
    font-weight: 680;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.portal-breadcrumb--dark { color: var(--home-muted); }
.portal-breadcrumb--dark a { color: var(--home-muted); }
.portal-breadcrumb--dark a:hover { color: var(--home-navy); }
.portal-breadcrumb--dark strong { color: var(--home-ink); }

/* --------------------------------------------------------------------------
   HERO del listado
   -------------------------------------------------------------------------- */
.portal-hero {
    position: relative;
    isolation: isolate;
    padding: calc(var(--home-header) + 46px) 0 54px;
    background:
        radial-gradient(120% 120% at 12% 0%, var(--home-navy-3) 0%, transparent 58%),
        linear-gradient(160deg, var(--home-navy) 0%, var(--home-navy-2) 58%, #061526 100%);
    color: #fff;
    overflow: hidden;
}
.portal-hero__ambient { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.portal-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: .5;
}
.portal-orb--one {
    top: -130px;
    left: -90px;
    width: 420px;
    height: 420px;
    background: radial-gradient(circle, rgba(78, 155, 255, .42), transparent 68%);
}
.portal-orb--two {
    right: -120px;
    bottom: -180px;
    width: 460px;
    height: 460px;
    background: radial-gradient(circle, rgba(200, 162, 75, .34), transparent 68%);
}
.portal-hero__grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, .045) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, .045) 1px, transparent 1px);
    background-size: 62px 62px;
    mask-image: linear-gradient(180deg, rgba(0, 0, 0, .8), transparent 78%);
    -webkit-mask-image: linear-gradient(180deg, rgba(0, 0, 0, .8), transparent 78%);
}
.portal-hero__copy { max-width: 720px; }
.portal-hero__copy h1 {
    margin: 12px 0 14px;
    color: #fff;
    font-size: clamp(30px, 4vw, 50px);
    font-weight: 760;
    letter-spacing: -.035em;
    line-height: 1.05;
    text-wrap: balance;
}
.portal-hero__copy h1 span {
    display: block;
    background: linear-gradient(100deg, var(--home-gold-bright), #f6e4bb 55%, var(--home-gold));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.portal-hero__copy p {
    max-width: 620px;
    margin: 0;
    color: rgba(255, 255, 255, .76);
    font-size: 15.5px;
    line-height: 1.65;
}

/* Buscador principal */
.portal-search {
    display: grid;
    grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr) minmax(0, 1fr) auto;
    gap: 14px;
    align-items: end;
    margin-top: 30px;
    padding: 18px;
    border: 1px solid rgba(255, 255, 255, .14);
    border-radius: var(--home-radius-sm);
    background: rgba(255, 255, 255, .08);
    box-shadow: 0 22px 54px rgba(4, 16, 29, .3);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}
.portal-search__field { position: relative; display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.portal-search__field label {
    color: rgba(255, 255, 255, .62);
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
}
.portal-search__field input,
.portal-search__field select {
    width: 100%;
    min-height: 46px;
    padding: 10px 13px;
    border: 1px solid rgba(255, 255, 255, .16);
    border-radius: 11px;
    background: rgba(7, 26, 47, .52);
    color: #fff;
    font-size: 13.5px;
    font-weight: 560;
    appearance: none;
    -webkit-appearance: none;
}
.portal-search__field--text input { padding-left: 40px; }
.portal-search__icon {
    position: absolute;
    bottom: 14px;
    left: 13px;
    color: rgba(255, 255, 255, .55);
    pointer-events: none;
}
.portal-search__field select {
    padding-right: 34px;
    background-image: linear-gradient(45deg, transparent 50%, rgba(255, 255, 255, .6) 50%),
        linear-gradient(135deg, rgba(255, 255, 255, .6) 50%, transparent 50%);
    background-position: calc(100% - 18px) 21px, calc(100% - 13px) 21px;
    background-size: 5px 5px, 5px 5px;
    background-repeat: no-repeat;
}
.portal-search__field input::placeholder { color: rgba(255, 255, 255, .45); }
.portal-search__field input:focus,
.portal-search__field select:focus {
    border-color: var(--home-gold-bright);
    outline: none;
}
.portal-search__field select option { color: #10202f; background: #fff; }
.portal-search__submit { min-height: 46px; white-space: nowrap; }

/* Cifras reales del portal */
.portal-hero__stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, auto));
    justify-content: start;
    gap: 34px;
    margin: 28px 0 0;
}
.portal-hero__stats dt {
    color: rgba(255, 255, 255, .55);
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: .09em;
    text-transform: uppercase;
}
.portal-hero__stats dd {
    margin: 4px 0 0;
    color: #fff;
    font-size: 26px;
    font-weight: 740;
    letter-spacing: -.025em;
}

/* --------------------------------------------------------------------------
   Mensajes del sistema
   -------------------------------------------------------------------------- */
.portal-flash { display: grid; gap: 10px; margin: 0 0 22px; }
.portal-flash__item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 0;
    padding: 13px 16px;
    border: 1px solid var(--home-line);
    border-left-width: 3px;
    border-radius: 13px;
    background: var(--home-white);
    color: var(--home-ink);
    font-size: 13.5px;
    font-weight: 570;
    box-shadow: var(--home-shadow-soft);
}
.portal-flash__item .icon { flex: 0 0 auto; margin-top: 1px; }
.portal-flash__item--success { border-left-color: var(--home-green); color: #14603f; }
.portal-flash__item--error { border-left-color: #d1495b; color: #8d2334; }
.portal-flash__item--warning { border-left-color: var(--home-gold); color: #7a5c14; }
.portal-flash__item--info { border-left-color: var(--home-blue); color: #14406f; }

/* --------------------------------------------------------------------------
   Barra de resultados
   -------------------------------------------------------------------------- */
.portal-results { padding: 36px 0 92px; }

.portal-toolbar {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 18px;
    flex-wrap: wrap;
    margin-bottom: 24px;
}
.portal-toolbar__count { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.portal-toolbar__count h2 {
    margin: 0;
    color: var(--home-ink);
    font-size: clamp(19px, 2.2vw, 25px);
    font-weight: 730;
    letter-spacing: -.028em;
}
.portal-toolbar__clear {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 6px 12px;
    border: 1px solid var(--home-line);
    border-radius: 999px;
    background: var(--home-white);
    color: var(--home-muted);
    font-size: 12px;
    font-weight: 640;
    text-decoration: none;
}
.portal-toolbar__clear:hover { border-color: #d1495b; color: #b03648; }
.portal-toolbar__badge {
    display: inline-grid;
    place-items: center;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 999px;
    background: var(--home-navy);
    color: #fff;
    font-size: 10.5px;
    font-weight: 720;
}
.portal-toolbar__tools { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

.portal-toolbar__toggle {
    display: none;
    align-items: center;
    gap: 8px;
    min-height: 40px;
    padding: 9px 15px;
    border: 1px solid var(--home-line);
    border-radius: 11px;
    background: var(--home-white);
    color: var(--home-ink);
    font-size: 12.5px;
    font-weight: 650;
    cursor: pointer;
}
.portal-toolbar__toggle i {
    display: inline-grid;
    place-items: center;
    min-width: 18px;
    height: 18px;
    border-radius: 999px;
    background: var(--home-gold);
    color: var(--home-navy);
    font-size: 10.5px;
    font-style: normal;
    font-weight: 730;
}

.portal-toolbar__favlink {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 40px;
    padding: 9px 15px;
    border: 1px solid var(--home-line);
    border-radius: 11px;
    background: var(--home-white);
    color: var(--home-ink);
    font-size: 12.5px;
    font-weight: 650;
    text-decoration: none;
}
.portal-toolbar__favlink:hover { border-color: var(--home-gold); }
.portal-toolbar__favlink i {
    display: inline-grid;
    place-items: center;
    min-width: 18px;
    height: 18px;
    border-radius: 999px;
    background: var(--home-navy);
    color: #fff;
    font-size: 10.5px;
    font-style: normal;
    font-weight: 720;
}
.portal-toolbar__favlink i[hidden] { display: none; }
.portal-toolbar__favlink[aria-disabled="true"] { opacity: .55; pointer-events: none; }

.portal-toolbar__sort {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    padding: 5px 12px 5px 14px;
    border: 1px solid var(--home-line);
    border-radius: 11px;
    background: var(--home-white);
}
.portal-toolbar__sort label {
    color: var(--home-muted);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .05em;
    text-transform: uppercase;
}
.portal-toolbar__sort select {
    min-height: 30px;
    max-width: 190px;
    padding: 3px 6px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--home-ink);
    font-size: 12.5px;
    font-weight: 640;
}
.portal-toolbar__sort select:focus-visible { outline: 2px solid var(--home-gold-bright); }

/* --------------------------------------------------------------------------
   Estructura listado + filtros
   -------------------------------------------------------------------------- */
.portal-layout {
    display: grid;
    grid-template-columns: var(--portal-side) minmax(0, 1fr);
    gap: var(--portal-gap);
    align-items: start;
}
.portal-results__main { min-width: 0; }

.portal-filters {
    position: sticky;
    top: calc(var(--home-header) + 18px);
    display: flex;
    flex-direction: column;
    max-height: calc(100vh - var(--home-header) - 40px);
    overflow-y: auto;
    padding: 20px;
    border: 1px solid var(--home-line);
    border-radius: var(--home-radius-sm);
    background: var(--home-white);
    box-shadow: var(--home-shadow-soft);
    overscroll-behavior: contain;
}
.portal-filters__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
    padding-bottom: 13px;
    border-bottom: 1px solid var(--home-line);
}
.portal-filters__head strong {
    color: var(--home-ink);
    font-size: 13px;
    font-weight: 730;
    letter-spacing: .04em;
    text-transform: uppercase;
}
.portal-filters__close {
    display: none;
    width: 34px;
    height: 34px;
    padding: 0;
    place-items: center;
    border: 1px solid var(--home-line);
    border-radius: 10px;
    background: var(--home-white);
    color: var(--home-ink);
    cursor: pointer;
}
.portal-filters__form { display: grid; gap: 15px; }
.portal-filters__group { display: grid; gap: 7px; margin: 0; padding: 0; border: 0; }
.portal-filters__group > label,
.portal-filters__group > legend {
    padding: 0;
    color: var(--home-muted);
    font-size: 11px;
    font-weight: 720;
    letter-spacing: .06em;
    text-transform: uppercase;
}
.portal-filters__group--pair {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}
.portal-filters__group--pair > legend { grid-column: 1 / -1; }
.portal-filters__group--pair > div { display: grid; gap: 5px; min-width: 0; }
.portal-filters__mini {
    color: var(--home-muted);
    font-size: 10.5px;
    font-weight: 620;
    letter-spacing: .03em;
}
.portal-filters input[type="text"],
.portal-filters input[type="number"],
.portal-filters select {
    width: 100%;
    min-height: 42px;
    padding: 9px 12px;
    border: 1px solid var(--home-line);
    border-radius: 11px;
    background: var(--home-white);
    color: var(--home-ink);
    font-size: 13px;
    font-weight: 570;
}
.portal-filters input:focus,
.portal-filters select:focus { border-color: var(--home-blue); outline: none; }
.portal-filters__chars { display: grid; gap: 9px; }
.portal-filters__chars-list {
    display: grid;
    gap: 7px;
    max-height: 208px;
    overflow-y: auto;
    padding-right: 4px;
    overscroll-behavior: contain;
}
.portal-filters__actions {
    position: sticky;
    bottom: -20px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 9px;
    align-items: center;
    margin-top: 4px;
    padding: 13px 0 2px;
    background: linear-gradient(180deg, rgba(255, 255, 255, .4), var(--home-white) 40%);
}
.portal-filters__actions .home-button { width: 100%; }

.portal-check {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    color: var(--home-ink);
    font-size: 13px;
    font-weight: 560;
    cursor: pointer;
}
.portal-check input {
    flex: 0 0 auto;
    width: 17px;
    height: 17px;
    min-height: 0;
    margin: 1px 0 0;
    padding: 0;
    accent-color: var(--home-blue);
}
.portal-check > span { min-width: 0; }
.portal-check--standalone {
    padding: 12px 13px;
    border: 1px solid var(--home-line);
    border-radius: 12px;
    background: var(--home-surface);
}
.portal-check--privacy { font-size: 12px; line-height: 1.5; color: var(--home-muted); }

.portal-radio {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 13px;
    border: 1px solid var(--home-line);
    border-radius: 11px;
    background: var(--home-white);
    color: var(--home-ink);
    font-size: 12.5px;
    font-weight: 620;
    cursor: pointer;
}
.portal-radio input {
    flex: 0 0 auto;
    width: 16px;
    height: 16px;
    min-height: 0;
    margin: 0;
    padding: 0;
    accent-color: var(--home-blue);
}
.portal-radio:has(input:checked) {
    border-color: var(--home-navy);
    background: var(--home-navy);
    color: #fff;
}

.portal-filters__backdrop {
    position: fixed;
    inset: 0;
    z-index: 105;
    background: rgba(6, 20, 36, .55);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
}
.portal-filters__backdrop[hidden] { display: none; }

/* --------------------------------------------------------------------------
   Rejilla y tarjetas
   -------------------------------------------------------------------------- */
.portal-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px;
}

.portal-card {
    position: relative;
    display: flex;
    flex-direction: column;
    min-width: 0;
    overflow: hidden;
    border: 1px solid var(--home-line);
    border-radius: var(--portal-card-radius);
    background: var(--home-white);
    box-shadow: var(--home-shadow-soft);
    transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.portal-card:hover {
    transform: translateY(-4px);
    border-color: rgba(200, 162, 75, .55);
    box-shadow: var(--home-shadow);
}
.portal-card__media {
    position: relative;
    display: block;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: linear-gradient(150deg, var(--home-navy-2), var(--home-navy-3));
}
.portal-card__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .5s cubic-bezier(.2, .75, .25, 1);
}
.portal-card:hover .portal-card__media img { transform: scale(1.05); }
.portal-card__placeholder {
    display: grid;
    place-items: center;
    width: 100%;
    height: 100%;
    color: rgba(255, 255, 255, .42);
}
.portal-card__badges {
    position: absolute;
    top: 12px;
    left: 12px;
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    max-width: calc(100% - 66px);
}
.portal-chip {
    display: inline-flex;
    align-items: center;
    padding: 5px 10px;
    border-radius: 999px;
    background: rgba(7, 26, 47, .86);
    color: #fff;
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: .05em;
    text-transform: uppercase;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}
.portal-chip--gold {
    background: linear-gradient(135deg, var(--home-gold-bright), var(--home-gold));
    color: var(--home-navy);
}

.portal-fav {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 2;
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, .34);
    border-radius: 50%;
    background: rgba(7, 26, 47, .68);
    color: #fff;
    cursor: pointer;
    transition: background .2s ease, color .2s ease, transform .2s ease, border-color .2s ease;
}
.portal-fav:hover { transform: scale(1.08); border-color: var(--home-gold-bright); }
.portal-fav[aria-pressed="true"] {
    background: linear-gradient(135deg, var(--home-gold-bright), var(--home-gold));
    border-color: var(--home-gold);
    color: var(--home-navy);
}
.portal-fav[aria-pressed="true"] svg { fill: currentColor; }
.portal-fav--inline {
    position: static;
    width: auto;
    height: auto;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border-radius: 11px;
    background: var(--home-white);
    border-color: var(--home-line);
    color: var(--home-ink);
}
.portal-fav--inline:hover { transform: translateY(-1px); }

.portal-card__body {
    display: flex;
    flex-direction: column;
    gap: 9px;
    flex: 1 1 auto;
    padding: 16px 17px 17px;
}
.portal-card__type {
    color: var(--home-gold);
    font-size: 10.5px;
    font-weight: 740;
    letter-spacing: .1em;
    text-transform: uppercase;
}
.portal-card__title {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: -.02em;
    line-height: 1.35;
}
.portal-card__title a { color: var(--home-ink); text-decoration: none; }
.portal-card__title a:hover { color: var(--home-blue); }
.portal-card__place {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 0;
    color: var(--home-muted);
    font-size: 12.5px;
    font-weight: 560;
}
.portal-card__place .icon { flex: 0 0 auto; color: var(--home-gold); }
.portal-card__place span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.portal-card__specs { display: flex; gap: 7px; flex-wrap: wrap; }
.portal-card__specs span {
    padding: 4px 9px;
    border: 1px solid var(--home-line);
    border-radius: 8px;
    background: var(--home-surface);
    color: var(--home-ink);
    font-size: 11.5px;
    font-weight: 620;
    white-space: nowrap;
}
.portal-card__foot {
    display: flex;
    align-items: baseline;
    gap: 9px;
    flex-wrap: wrap;
    margin-top: auto;
    padding-top: 4px;
}
.portal-card__price {
    color: var(--home-navy);
    font-size: 19px;
    font-weight: 760;
    letter-spacing: -.03em;
}
.portal-card__price-alt { color: var(--home-muted); font-size: 12.5px; font-weight: 600; }
.portal-card__meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding-top: 11px;
    border-top: 1px solid var(--home-line);
    color: var(--home-muted);
    font-size: 11px;
    font-weight: 600;
}
.portal-card__agency {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.portal-card__ref { flex: 0 0 auto; letter-spacing: .04em; }
.portal-card__cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-height: 42px;
    border: 1px solid var(--home-navy);
    border-radius: 11px;
    background: var(--home-navy);
    color: #fff;
    font-size: 12.5px;
    font-weight: 680;
    text-decoration: none;
    transition: background .2s ease, transform .2s ease;
}
.portal-card__cta:hover { background: var(--home-navy-3); transform: translateY(-1px); }
.portal-card__cta .icon { transform: rotate(180deg); }

/* Paginación dentro del portal */
.portal-page .pagination {
    margin-top: 30px;
    padding: 16px 18px;
    border: 1px solid var(--home-line);
    border-radius: var(--home-radius-sm);
    background: var(--home-white);
    box-shadow: var(--home-shadow-soft);
}

/* --------------------------------------------------------------------------
   Estados vacíos
   -------------------------------------------------------------------------- */
.portal-empty {
    display: grid;
    justify-items: center;
    gap: 13px;
    padding: 64px 28px;
    border: 1px dashed var(--home-line);
    border-radius: var(--home-radius);
    background: var(--home-white);
    text-align: center;
}
.portal-empty__icon {
    display: grid;
    place-items: center;
    width: 72px;
    height: 72px;
    border-radius: 24px;
    background: var(--home-surface);
    color: var(--home-navy);
}
.portal-empty h3 {
    margin: 0;
    color: var(--home-ink);
    font-size: 21px;
    font-weight: 730;
    letter-spacing: -.026em;
}
.portal-empty p {
    max-width: 480px;
    margin: 0;
    color: var(--home-muted);
    font-size: 14px;
    line-height: 1.62;
}
.portal-empty__suggestions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 6px;
    padding-top: 18px;
    border-top: 1px solid var(--home-line);
    width: min(100%, 560px);
}
.portal-empty__suggestions > span {
    width: 100%;
    color: var(--home-muted);
    font-size: 11.5px;
    font-weight: 680;
    letter-spacing: .05em;
    text-transform: uppercase;
}
.portal-empty__suggestions a {
    padding: 6px 13px;
    border: 1px solid var(--home-line);
    border-radius: 999px;
    color: var(--home-ink);
    font-size: 12.5px;
    font-weight: 620;
    text-decoration: none;
}
.portal-empty__suggestions a:hover { border-color: var(--home-gold); color: var(--home-navy); }

/* --------------------------------------------------------------------------
   Llamada final del listado
   -------------------------------------------------------------------------- */
.portal-cta {
    position: relative;
    padding: 72px 0;
    background: linear-gradient(150deg, var(--home-navy) 0%, var(--home-navy-2) 60%, #061526 100%);
    color: #fff;
}
.portal-cta__inner {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
    gap: 32px;
    align-items: center;
}
.portal-cta__inner h2 {
    margin: 12px 0 10px;
    color: #fff;
    font-size: clamp(23px, 2.9vw, 34px);
    font-weight: 740;
    letter-spacing: -.032em;
    line-height: 1.16;
}
.portal-cta__inner p { margin: 0; color: rgba(255, 255, 255, .74); font-size: 14.5px; line-height: 1.62; }
.portal-cta__actions { display: flex; gap: 12px; flex-wrap: wrap; justify-content: flex-end; }

/* --------------------------------------------------------------------------
   FICHA: galería
   -------------------------------------------------------------------------- */
.portal-detail { padding: calc(var(--home-header) + 26px) 0 92px; }

.portal-gallery { margin-bottom: 30px; }
.portal-gallery__stage {
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border: 1px solid var(--home-line);
    border-radius: var(--home-radius);
    background: linear-gradient(150deg, var(--home-navy-2), var(--home-navy-3));
    box-shadow: var(--home-shadow);
}
.portal-gallery__slide { margin: 0; width: 100%; height: 100%; }
.portal-gallery__slide img { width: 100%; height: 100%; object-fit: cover; }
.portal-gallery__slide:not(.is-active),
.portal-gallery__slide[hidden] { display: none; }
.portal-gallery__badges {
    position: absolute;
    top: 16px;
    left: 16px;
    display: flex;
    gap: 7px;
    flex-wrap: wrap;
}
.portal-gallery__nav,
.portal-gallery__zoom {
    position: absolute;
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, .3);
    border-radius: 50%;
    background: rgba(7, 26, 47, .62);
    color: #fff;
    cursor: pointer;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    transition: background .2s ease, transform .2s ease;
}
.portal-gallery__nav:hover,
.portal-gallery__zoom:hover { background: rgba(7, 26, 47, .85); transform: scale(1.06); }
.portal-gallery__nav--prev { top: 50%; left: 16px; translate: 0 -50%; }
.portal-gallery__nav--next { top: 50%; right: 16px; translate: 0 -50%; }
.portal-gallery__nav--next .icon { transform: rotate(180deg); }
.portal-gallery__zoom { right: 16px; bottom: 16px; }
.portal-gallery__counter {
    position: absolute;
    bottom: 18px;
    left: 16px;
    padding: 6px 13px;
    border-radius: 999px;
    background: rgba(7, 26, 47, .74);
    color: #fff;
    font-size: 11.5px;
    font-weight: 660;
    letter-spacing: .04em;
}
.portal-gallery__thumbs {
    display: flex;
    gap: 10px;
    margin-top: 12px;
    padding-bottom: 4px;
    overflow-x: auto;
    scrollbar-width: thin;
    overscroll-behavior-x: contain;
}
.portal-gallery__thumb {
    flex: 0 0 auto;
    width: 104px;
    height: 72px;
    padding: 0;
    overflow: hidden;
    border: 2px solid transparent;
    border-radius: 12px;
    background: var(--home-surface);
    cursor: pointer;
    opacity: .68;
    transition: opacity .2s ease, border-color .2s ease;
}
.portal-gallery__thumb img { width: 100%; height: 100%; object-fit: cover; }
.portal-gallery__thumb:hover { opacity: 1; }
.portal-gallery__thumb.is-active { border-color: var(--home-gold); opacity: 1; }
.portal-gallery__empty {
    display: grid;
    place-items: center;
    gap: 10px;
    aspect-ratio: 16 / 7;
    border: 1px dashed var(--home-line);
    border-radius: var(--home-radius);
    background: var(--home-white);
    color: var(--home-muted);
    text-align: center;
}
.portal-gallery__empty p { margin: 0; font-size: 13.5px; font-weight: 580; }

/* --------------------------------------------------------------------------
   FICHA: cuerpo
   -------------------------------------------------------------------------- */
.portal-detail__grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 372px;
    gap: 30px;
    align-items: start;
}
.portal-detail__main { min-width: 0; display: grid; gap: 22px; }

.portal-detail__head {
    padding: 24px 26px;
    border: 1px solid var(--home-line);
    border-radius: var(--home-radius-sm);
    background: var(--home-white);
    box-shadow: var(--home-shadow-soft);
}
.portal-detail__type {
    color: var(--home-gold);
    font-size: 11px;
    font-weight: 740;
    letter-spacing: .11em;
    text-transform: uppercase;
}
.portal-detail__head h1 {
    margin: 9px 0 11px;
    color: var(--home-ink);
    font-size: clamp(22px, 2.9vw, 33px);
    font-weight: 750;
    letter-spacing: -.034em;
    line-height: 1.18;
    text-wrap: balance;
}
.portal-detail__place {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin: 0 0 16px;
    color: var(--home-muted);
    font-size: 13.5px;
    font-weight: 560;
}
.portal-detail__place .icon { color: var(--home-gold); }
.portal-detail__place span:not(:last-child)::after { content: " ·"; color: var(--home-line); }
.portal-detail__pricing {
    display: flex;
    align-items: baseline;
    gap: 12px;
    flex-wrap: wrap;
    padding: 15px 0;
    border-top: 1px solid var(--home-line);
    border-bottom: 1px solid var(--home-line);
}
.portal-detail__pricing strong {
    color: var(--home-navy);
    font-size: clamp(24px, 3.1vw, 32px);
    font-weight: 780;
    letter-spacing: -.035em;
}
.portal-detail__pricing span { color: var(--home-muted); font-size: 14px; font-weight: 620; }
.portal-detail__tools {
    display: flex;
    align-items: center;
    gap: 9px;
    flex-wrap: wrap;
    margin-top: 16px;
}
.portal-detail__views {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-left: auto;
    color: var(--home-muted);
    font-size: 11.5px;
    font-weight: 600;
}

.portal-block {
    padding: 24px 26px;
    border: 1px solid var(--home-line);
    border-radius: var(--home-radius-sm);
    background: var(--home-white);
    box-shadow: var(--home-shadow-soft);
}
.portal-block h2 {
    margin: 0 0 17px;
    color: var(--home-ink);
    font-size: 17px;
    font-weight: 730;
    letter-spacing: -.024em;
}

.portal-specs {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin: 0;
}
.portal-specs__item {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr);
    grid-template-rows: auto auto;
    gap: 0 11px;
    align-items: center;
    padding: 12px 13px;
    border: 1px solid var(--home-line);
    border-radius: 13px;
    background: var(--home-surface);
}
.portal-specs__icon {
    grid-row: 1 / 3;
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: var(--home-white);
    color: var(--home-navy);
}
.portal-specs dt {
    color: var(--home-muted);
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
}
.portal-specs dd {
    margin: 2px 0 0;
    color: var(--home-ink);
    font-size: 14px;
    font-weight: 700;
    overflow-wrap: anywhere;
}

.portal-prose {
    color: #33445a;
    font-size: 14.5px;
    line-height: 1.75;
    overflow-wrap: anywhere;
}

.portal-chars {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 9px 16px;
    margin: 0;
    padding: 0;
    list-style: none;
}
.portal-chars li {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--home-ink);
    font-size: 13.5px;
    font-weight: 570;
}
.portal-chars .icon { flex: 0 0 auto; color: var(--home-green); }

.portal-videos { display: grid; gap: 9px; margin: 0; padding: 0; list-style: none; }
.portal-videos a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 13px 15px;
    border: 1px solid var(--home-line);
    border-radius: 12px;
    background: var(--home-surface);
    color: var(--home-ink);
    font-size: 13.5px;
    font-weight: 630;
    text-decoration: none;
}
.portal-videos a:hover { border-color: var(--home-gold); }
.portal-videos a span { flex: 1 1 auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.portal-videos a .icon:last-child { transform: rotate(180deg); color: var(--home-muted); }

.portal-location { display: grid; gap: 9px; margin: 0 0 16px; padding: 0; list-style: none; }
.portal-location li {
    display: grid;
    grid-template-columns: 148px minmax(0, 1fr);
    gap: 12px;
    align-items: baseline;
    padding-bottom: 9px;
    border-bottom: 1px dashed var(--home-line);
}
.portal-location li:last-child { border-bottom: 0; padding-bottom: 0; }
.portal-location span {
    color: var(--home-muted);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
}
.portal-location strong { color: var(--home-ink); font-size: 13.5px; font-weight: 640; overflow-wrap: anywhere; }
.portal-location__map { margin-bottom: 14px; }

.portal-note {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin: 0;
    color: var(--home-muted);
    font-size: 12px;
    line-height: 1.55;
}
.portal-note .icon { flex: 0 0 auto; margin-top: 1px; color: var(--home-green); }

/* --------------------------------------------------------------------------
   FICHA: columna lateral
   -------------------------------------------------------------------------- */
.portal-detail__side { min-width: 0; }
.portal-sticky {
    position: sticky;
    top: calc(var(--home-header) + 18px);
    display: grid;
    gap: 18px;
}

.portal-agency {
    padding: 20px 21px;
    border: 1px solid var(--home-line);
    border-radius: var(--home-radius-sm);
    background: var(--home-white);
    box-shadow: var(--home-shadow-soft);
}
.portal-agency__label {
    margin: 0 0 13px;
    color: var(--home-muted);
    font-size: 10.5px;
    font-weight: 730;
    letter-spacing: .1em;
    text-transform: uppercase;
}
.portal-agency__head { display: flex; align-items: center; gap: 13px; }
.portal-agency__logo {
    display: grid;
    place-items: center;
    width: 52px;
    height: 52px;
    flex: 0 0 auto;
    overflow: hidden;
    border: 1px solid var(--home-line);
    border-radius: 14px;
    background: var(--home-white);
}
.portal-agency__logo img { width: 100%; height: 100%; object-fit: contain; }
.portal-agency__logo--fallback {
    background: linear-gradient(145deg, var(--home-gold-bright), var(--home-gold));
    color: var(--home-navy);
    border-color: transparent;
}
.portal-agency__head strong {
    display: block;
    color: var(--home-ink);
    font-size: 15px;
    font-weight: 730;
    letter-spacing: -.02em;
}
.portal-agency__head span { color: var(--home-muted); font-size: 12.5px; font-weight: 560; }
.portal-agency__contact { display: grid; gap: 8px; margin: 15px 0 0; padding: 0; list-style: none; }
.portal-agency__contact li {
    display: flex;
    align-items: center;
    gap: 9px;
    font-size: 13px;
    font-weight: 600;
}
.portal-agency__contact .icon { flex: 0 0 auto; color: var(--home-gold); }
.portal-agency__contact a { color: var(--home-ink); text-decoration: none; overflow-wrap: anywhere; }
.portal-agency__contact a:hover { color: var(--home-blue); text-decoration: underline; }
.portal-agency__all {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin-top: 15px;
    padding-top: 14px;
    border-top: 1px solid var(--home-line);
    width: 100%;
    color: var(--home-navy);
    font-size: 12.5px;
    font-weight: 680;
    text-decoration: none;
}
.portal-agency__all .icon { transform: rotate(180deg); }
.portal-agency__all:hover { color: var(--home-blue); }

.portal-form-card {
    padding: 22px 22px 24px;
    border: 1px solid var(--home-line);
    border-radius: var(--home-radius-sm);
    background: var(--home-white);
    box-shadow: var(--home-shadow);
}
.portal-form-card h2 {
    margin: 0 0 6px;
    color: var(--home-ink);
    font-size: 18px;
    font-weight: 740;
    letter-spacing: -.026em;
}
.portal-form-card__text { margin: 0 0 17px; color: var(--home-muted); font-size: 13px; line-height: 1.6; }

.portal-form { display: grid; gap: 13px; }
.portal-form__intent {
    display: flex;
    gap: 9px;
    flex-wrap: wrap;
    margin: 0;
    padding: 0;
    border: 0;
}
.portal-form__intent legend {
    width: 100%;
    padding: 0 0 8px;
    color: var(--home-muted);
    font-size: 11px;
    font-weight: 720;
    letter-spacing: .06em;
    text-transform: uppercase;
}
.portal-form__row { display: grid; gap: 6px; }
.portal-form__row label {
    color: var(--home-muted);
    font-size: 11px;
    font-weight: 720;
    letter-spacing: .06em;
    text-transform: uppercase;
}
.portal-form__row label i { color: #d1495b; font-style: normal; }
/* Solo los campos de texto ocupan el ancho: las casillas y los radios
   conservan su tamaño natural. */
.portal-form input:not([type="checkbox"]):not([type="radio"]),
.portal-form select,
.portal-form textarea {
    width: 100%;
    min-height: 44px;
    padding: 11px 13px;
    border: 1px solid var(--home-line);
    border-radius: 11px;
    background: var(--home-white);
    color: var(--home-ink);
    font-size: 13.5px;
    font-weight: 560;
}
.portal-form textarea { min-height: 104px; resize: vertical; line-height: 1.55; }
.portal-form input:focus,
.portal-form select:focus,
.portal-form textarea:focus { border-color: var(--home-blue); outline: none; }
.portal-form .portal-check input,
.portal-form .portal-radio input {
    width: 17px;
    min-height: 0;
    padding: 0;
    border-radius: 4px;
}
.portal-form__hint { margin: -4px 0 0; color: var(--home-muted); font-size: 11.5px; line-height: 1.5; }
.portal-form__visit {
    display: grid;
    gap: 12px;
    padding: 15px;
    border: 1px solid rgba(200, 162, 75, .45);
    border-radius: 13px;
    background: var(--home-gold-soft);
}
/* El atributo hidden debe ganar a la regla de display de arriba. */
.portal-form__visit[hidden] { display: none; }
.portal-form__visit .portal-form__hint { color: #7a5c14; }
.portal-form__submit { width: 100%; margin-top: 2px; }
.portal-form__legal { margin: 0; color: var(--home-muted); font-size: 11px; line-height: 1.5; }

/* Campo trampa anti-spam: fuera de la vista pero enviado por los robots */
.portal-hp {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

/* --------------------------------------------------------------------------
   FICHA: similares y 404
   -------------------------------------------------------------------------- */
.portal-similar { margin-top: 46px; }
.portal-similar__head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 18px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}
.portal-similar__head h2 {
    margin: 9px 0 0;
    color: var(--home-ink);
    font-size: clamp(20px, 2.4vw, 27px);
    font-weight: 740;
    letter-spacing: -.03em;
}
.portal-similar__head .portal-btn .icon { transform: rotate(180deg); }

.portal-missing { padding: calc(var(--home-header) + 70px) 0 110px; }
.portal-missing__inner {
    display: grid;
    justify-items: center;
    gap: 15px;
    text-align: center;
}
.portal-missing__inner > span {
    display: grid;
    place-items: center;
    width: 86px;
    height: 86px;
    border-radius: 28px;
    background: var(--home-white);
    color: var(--home-navy);
    box-shadow: var(--home-shadow-soft);
}
.portal-missing h1 {
    margin: 0;
    color: var(--home-ink);
    font-size: clamp(25px, 3.4vw, 36px);
    font-weight: 750;
    letter-spacing: -.033em;
}
.portal-missing p { max-width: 520px; margin: 0; color: var(--home-muted); font-size: 14.5px; line-height: 1.65; }

/* --------------------------------------------------------------------------
   Visor a pantalla completa
   -------------------------------------------------------------------------- */
.portal-lightbox {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: grid;
    grid-template-columns: 64px minmax(0, 1fr) 64px;
    align-items: center;
    padding: 20px;
    background: rgba(4, 13, 24, .94);
}
.portal-lightbox[hidden] { display: none; }
.portal-lightbox__figure {
    grid-column: 2;
    display: grid;
    justify-items: center;
    gap: 12px;
    margin: 0;
    min-width: 0;
}
.portal-lightbox__figure img {
    max-width: 100%;
    max-height: calc(100vh - 130px);
    border-radius: 14px;
    object-fit: contain;
}
.portal-lightbox__figure figcaption {
    color: rgba(255, 255, 255, .7);
    font-size: 12.5px;
    font-weight: 570;
    text-align: center;
}
.portal-lightbox__nav,
.portal-lightbox__close {
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, .25);
    border-radius: 50%;
    background: rgba(255, 255, 255, .1);
    color: #fff;
    cursor: pointer;
    transition: background .2s ease;
}
.portal-lightbox__nav:hover,
.portal-lightbox__close:hover { background: rgba(255, 255, 255, .22); }
.portal-lightbox__nav--prev { grid-column: 1; justify-self: start; }
.portal-lightbox__nav--next { grid-column: 3; justify-self: end; }
.portal-lightbox__nav--next .icon { transform: rotate(180deg); }
.portal-lightbox__close {
    position: absolute;
    top: 18px;
    right: 18px;
    z-index: 2;
}

/* --------------------------------------------------------------------------
   Color de los enlaces del portal
   --------------------------------------------------------------------------
   landing.css declara `.home-page a { color: inherit }`, que por especificidad
   (0,1,1) gana a una clase suelta (0,1,0). Los enlaces con aspecto de botón
   del portal fijan aquí su color con el prefijo .portal-page para garantizar
   el contraste sin tocar la hoja compartida.
   -------------------------------------------------------------------------- */
.portal-page a.portal-card__cta { color: #fff; }
.portal-page a.portal-card__cta:hover { color: #fff; }
.portal-page a.portal-btn,
.portal-page a.portal-toolbar__favlink { color: var(--home-ink); }
.portal-page a.portal-btn:hover { color: var(--home-navy); }
.portal-page a.portal-toolbar__clear { color: var(--home-muted); }
.portal-page a.portal-toolbar__clear:hover { color: #b03648; }
.portal-page a.portal-agency__all { color: var(--home-navy); }
.portal-page a.portal-agency__all:hover { color: var(--home-blue); }


/* ==========================================================================
   RESPONSIVE
   ========================================================================== */

/* 1600 / 1920: se aprovecha el ancho con una cuarta columna */
@media (min-width: 1560px) {
    .portal-page { --home-shell: 1460px; --portal-side: 312px; --portal-gap: 30px; }
    .portal-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .portal-grid--similar { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .portal-detail__grid { grid-template-columns: minmax(0, 1fr) 400px; }
}

/* 1441 · alineado con landing.css */
@media (min-width: 1441px) and (max-width: 1559px) {
    .portal-page { --home-shell: 1320px; }
}

/* 1280 */
@media (max-width: 1280px) {
    .portal-page { --home-shell: 1150px; --portal-side: 272px; --portal-gap: 22px; }
    .portal-detail__grid { grid-template-columns: minmax(0, 1fr) 340px; gap: 24px; }
    .portal-specs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .portal-chars { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* 1080 */
@media (max-width: 1080px) {
    .portal-page { --home-header: 70px; }
    .portal-hero { padding: calc(var(--home-header) + 38px) 0 46px; }
    .portal-search { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1fr); }
    .portal-search__submit { grid-column: 1 / -1; }
    .portal-detail__grid { grid-template-columns: minmax(0, 1fr); }
    .portal-sticky {
        position: static;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        align-items: start;
        gap: 18px;
    }
}

/* 1024: los filtros pasan a panel deslizante */
@media (max-width: 1024px) {
    .portal-layout { grid-template-columns: minmax(0, 1fr); }
    .portal-toolbar__toggle { display: inline-flex; }

    .portal-filters {
        position: fixed;
        z-index: 106;
        top: 0;
        left: 0;
        bottom: 0;
        width: min(368px, 90vw);
        max-height: none;
        padding: 18px 18px 22px;
        border: 0;
        border-right: 1px solid var(--home-line);
        border-radius: 0;
        box-shadow: 26px 0 70px rgba(4, 16, 29, .28);
        translate: -102% 0;
        visibility: hidden;
        transition: translate .3s cubic-bezier(.2, .75, .25, 1), visibility .3s step-end;
    }
    .portal-filters.is-open { translate: 0 0; visibility: visible; transition: translate .3s cubic-bezier(.2, .75, .25, 1), visibility 0s; }
    .portal-filters__close { display: grid; }
    .portal-filters__chars-list { max-height: none; }
    .portal-filters__actions { bottom: -22px; }
}

/* 900 */
@media (max-width: 900px) {
    .portal-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .portal-grid--similar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .portal-hero__copy h1 { font-size: clamp(28px, 5.4vw, 40px); }
    .portal-cta__inner { grid-template-columns: minmax(0, 1fr); }
    .portal-cta__actions { justify-content: flex-start; }
    .portal-detail__side { grid-template-columns: minmax(0, 1fr); }
    .portal-sticky { grid-template-columns: minmax(0, 1fr); }
    .portal-breadcrumb strong { max-width: 240px; }
}

/* 761 */
@media (max-width: 761px) {
    .portal-results { padding: 30px 0 72px; }
    .portal-search { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); padding: 15px; gap: 12px; }
    .portal-search__field--text { grid-column: 1 / -1; }
    .portal-hero__stats { gap: 22px; }
    .portal-hero__stats dd { font-size: 22px; }
    .portal-detail { padding: calc(var(--home-header) + 20px) 0 74px; }
    .portal-detail__head,
    .portal-block { padding: 20px 18px; }
    .portal-form-card { padding: 19px 18px 21px; }
    .portal-gallery__stage { border-radius: 20px; }
    .portal-location li { grid-template-columns: minmax(0, 1fr); gap: 3px; }
    .portal-toolbar { align-items: stretch; }
    .portal-toolbar__tools { width: 100%; }
    .portal-toolbar__sort { flex: 1 1 100%; justify-content: space-between; }
    .portal-similar { margin-top: 36px; }
}

/* 600 */
@media (max-width: 600px) {
    .portal-grid,
    .portal-grid--similar { grid-template-columns: minmax(0, 1fr); gap: 18px; }
    .portal-hero { padding: calc(var(--home-header) + 30px) 0 38px; }
    .portal-hero__copy h1 { font-size: clamp(26px, 8vw, 34px); }
    .portal-hero__copy p { font-size: 14.5px; }
    .portal-search { grid-template-columns: minmax(0, 1fr); }
    .portal-hero__stats { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
    .portal-hero__stats dd { font-size: 20px; }
    .portal-hero__stats dt { font-size: 9.5px; letter-spacing: .06em; }
    .portal-specs { grid-template-columns: minmax(0, 1fr); }
    .portal-chars { grid-template-columns: minmax(0, 1fr); }
    .portal-card__media { aspect-ratio: 16 / 11; }
    .portal-detail__views { margin-left: 0; width: 100%; }
    .portal-gallery__stage { border-radius: 17px; }
    .portal-gallery__nav { width: 38px; height: 38px; }
    .portal-gallery__nav--prev { left: 10px; }
    .portal-gallery__nav--next { right: 10px; }
    .portal-gallery__zoom { right: 10px; bottom: 10px; width: 38px; height: 38px; }
    .portal-gallery__thumb { width: 88px; height: 62px; }
    .portal-lightbox { grid-template-columns: minmax(0, 1fr); padding: 14px; }
    .portal-lightbox__figure { grid-column: 1; }
    .portal-lightbox__nav {
        position: absolute;
        bottom: 20px;
        grid-column: 1;
        width: 42px;
        height: 42px;
    }
    .portal-lightbox__nav--prev { left: 22%; justify-self: auto; }
    .portal-lightbox__nav--next { right: 22%; justify-self: auto; }
    .portal-lightbox__figure img { max-height: calc(100vh - 170px); }
    .portal-empty { padding: 48px 20px; }
}

/* 480 */
@media (max-width: 480px) {
    .portal-toolbar__count h2 { font-size: 18px; }
    .portal-toolbar__tools { gap: 8px; }
    .portal-toolbar__toggle,
    .portal-toolbar__favlink { flex: 1 1 calc(50% - 4px); justify-content: center; }
    .portal-toolbar__sort { padding: 8px 12px; gap: 6px; }
    .portal-toolbar__sort select { max-width: 150px; }
    .portal-detail__head { padding: 18px 15px; }
    .portal-block { padding: 18px 15px; }
    .portal-detail__pricing strong { font-size: 24px; }
    .portal-detail__tools .portal-btn { flex: 1 1 calc(50% - 5px); }
    .portal-hero__stats { gap: 9px; }
    .portal-hero__stats dd { font-size: 18px; }
    .portal-breadcrumb { margin-bottom: 18px; font-size: 11.5px; }
    .portal-breadcrumb strong { max-width: 150px; }
    .portal-empty h3 { font-size: 19px; }
    .portal-card__body { padding: 14px 15px 15px; }
    .portal-card__price { font-size: 18px; }
}

/* 400 */
@media (max-width: 400px) {
    .portal-hero__copy h1 { font-size: 26px; }
    .portal-search { padding: 13px; }
    .portal-hero__stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .portal-hero__stats dt { font-size: 9px; }
    .portal-hero__stats dd { font-size: 17px; }
    .portal-detail__head h1 { font-size: 21px; }
    .portal-detail__pricing strong { font-size: 22px; }
    .portal-toolbar__toggle,
    .portal-toolbar__favlink { flex: 1 1 100%; }
    .portal-detail__tools .portal-btn { flex: 1 1 100%; }
    .portal-filters { width: min(330px, 92vw); }
    .portal-specs__item { padding: 11px; }
    .portal-lightbox__nav--prev { left: 14%; }
    .portal-lightbox__nav--next { right: 14%; }
}

/* 360 */
@media (max-width: 360px) {
    .portal-hero__copy h1 { font-size: 24px; }
    .portal-hero__stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .portal-card__specs span { font-size: 11px; padding: 3px 7px; }
    .portal-card__meta { flex-direction: column; align-items: flex-start; gap: 4px; }
    .portal-gallery__thumb { width: 76px; height: 54px; }
    .portal-filters { width: 94vw; }
    .portal-empty { padding: 40px 15px; }
}

/* --------------------------------------------------------------------------
   Preferencias del usuario y dispositivos táctiles
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
    .portal-card,
    .portal-card__media img,
    .portal-filters,
    .portal-btn,
    .portal-fav {
        transition: none !important;
    }
    .portal-card:hover { transform: none; }
    .portal-card:hover .portal-card__media img { transform: none; }
}

@media (hover: none), (pointer: coarse) {
    .portal-card:hover { transform: none; box-shadow: var(--home-shadow-soft); }
    .portal-card:hover .portal-card__media img { transform: none; }
    .portal-gallery__thumb { opacity: 1; }
}

@media print {
    .portal-page .home-header,
    .home-progress,
    .portal-filters,
    .portal-filters__backdrop,
    .portal-toolbar__tools,
    .portal-detail__tools,
    .portal-form-card,
    .portal-lightbox,
    .portal-cta,
    .portal-footer { display: none !important; }
    .portal-detail { padding-top: 0; }
    .portal-hero { background: none; color: #000; }
}

/* ==========================================================================
   MAPA DE INMUEBLES (portal/map.php)
   Reutiliza las variables, radios, sombras y tipografía del portal para que
   la vista de mapa parezca parte nativa del sitio.
   ========================================================================== */

.portal-page--map { background: var(--home-surface); }

.portal-map {
    --map-bar: 128px;
    display: flex;
    flex-direction: column;
    margin-top: 2.0rem;
    padding: 22px clamp(14px, 3vw, 34px) 0;
}

/* --------------------------------------------------------------------------
   Barra superior: migas, título, búsqueda y accesos
   -------------------------------------------------------------------------- */
.portal-map__bar {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 18px;
    flex-wrap: wrap;
    margin-bottom: 18px;
}
.portal-map__bar-main { min-width: 0; }
.portal-breadcrumb--compact { margin-bottom: 8px; }

.portal-map__title {
    margin: 0;
    font-size: clamp(21px, 2.3vw, 29px);
    letter-spacing: -.01em;
    color: var(--home-ink);
}

.portal-map__search {
    display: flex;
    align-items: flex-end;
    gap: 10px;
    flex: 1 1 420px;
    max-width: 620px;
}
.portal-map__search-field { position: relative; flex: 1 1 auto; min-width: 0; }
.portal-map__search-field--select { flex: 0 1 190px; }
.portal-map__label {
    display: block;
    margin-bottom: 5px;
    color: var(--home-muted);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .07em;
    text-transform: uppercase;
}
.portal-map__search-icon {
    position: absolute;
    left: 13px;
    bottom: 12px;
    color: var(--home-muted);
    pointer-events: none;
}
.portal-map__search input[type="search"] {
    width: 100%;
    min-height: 44px;
    padding: 10px 14px 10px 38px;
    border: 1px solid var(--home-line);
    border-radius: 12px;
    background: var(--home-white);
    font: inherit;
    color: var(--home-ink);
}
.portal-map__search select {
    width: 100%;
    min-height: 44px;
    padding: 10px 12px;
    border: 1px solid var(--home-line);
    border-radius: 12px;
    background: var(--home-white);
    font: inherit;
    color: var(--home-ink);
}
.portal-map__search input:focus-visible,
.portal-map__search select:focus-visible {
    outline: 2px solid var(--home-blue);
    outline-offset: 1px;
}

.portal-map__tools { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }

.portal-toolbar__maplink {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 38px;
    padding: 8px 14px;
    border: 1px solid var(--home-line);
    border-radius: 999px;
    background: var(--home-white);
    color: var(--home-ink);
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
}
.portal-toolbar__maplink:hover { border-color: var(--home-blue); color: var(--home-blue); text-decoration: none; }

/* --------------------------------------------------------------------------
   Estructura: filtros + listado + mapa
   -------------------------------------------------------------------------- */
.portal-map__layout {
    display: grid;
    grid-template-columns: var(--portal-side) minmax(340px, 44fr) minmax(0, 56fr);
    gap: 18px;
    align-items: start;
    padding-bottom: 22px;
}

.portal-map__panel {
    display: flex;
    flex-direction: column;
    gap: 14px;
    min-width: 0;
    max-height: calc(100vh - var(--home-header) - var(--map-bar));
    overflow-y: auto;
    padding-right: 4px;
    scrollbar-width: thin;
}
.portal-map__panel-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}
.portal-map__count {
    margin: 0;
    font-size: 17px;
    font-weight: 700;
    color: var(--home-ink);
}
.portal-map__sort { display: flex; align-items: flex-end; gap: 8px; }
.portal-map__sort select {
    min-height: 38px;
    padding: 8px 11px;
    border: 1px solid var(--home-line);
    border-radius: 11px;
    background: var(--home-white);
    font: inherit;
    font-size: 13px;
    color: var(--home-ink);
}

.portal-map__notice {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin: 0;
    padding: 10px 13px;
    border: 1px solid var(--home-line);
    border-radius: 13px;
    background: var(--home-white);
    color: var(--home-muted);
    font-size: 12.5px;
}
.portal-map__notice svg { flex: 0 0 auto; margin-top: 2px; }

.portal-map__list { display: grid; gap: 14px; }

.portal-map__item { position: relative; border-radius: var(--portal-card-radius); }
.portal-map__item.is-active {
    box-shadow: 0 0 0 2px var(--home-blue), var(--home-shadow-soft);
}
.portal-map__item .portal-card { margin: 0; }
.portal-map__item-flag,
.portal-map__item-locate {
    position: absolute;
    right: 12px;
    bottom: 12px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 10px;
    border: 1px solid var(--home-line);
    border-radius: 999px;
    background: rgba(255, 255, 255, .95);
    color: var(--home-muted);
    font-size: 11.5px;
    font-weight: 600;
    cursor: pointer;
}
.portal-map__item-locate:hover { border-color: var(--home-blue); color: var(--home-blue); }
.portal-map__item-flag { cursor: default; }

.portal-map__more {
    margin: 0;
    padding: 12px 14px;
    border: 1px dashed var(--home-line);
    border-radius: 14px;
    color: var(--home-muted);
    font-size: 12.5px;
    text-align: center;
}

.portal-empty--compact { padding: 40px 20px; }

/* --------------------------------------------------------------------------
   Lienzo del mapa
   -------------------------------------------------------------------------- */
.portal-map__canvas { min-width: 0; }
.portal-map__canvas-inner {
    position: sticky;
    top: calc(var(--home-header) + 12px);
    position: -webkit-sticky;
    height: calc(100vh - var(--home-header) - var(--map-bar));
    min-height: 420px;
    border: 1px solid var(--home-line);
    border-radius: var(--home-radius-sm);
    overflow: hidden;
    background: var(--home-white);
    box-shadow: var(--home-shadow-soft);
}
.portal-map__view { width: 100%; height: 100%; background: #e9eef4; }

.portal-map__overlay {
    position: absolute;
    left: 12px;
    right: 12px;
    z-index: 500;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    pointer-events: none;
}
.portal-map__overlay--top { top: 12px; justify-content: flex-end; }
.portal-map__overlay--bottom { bottom: 12px; justify-content: flex-start; }
.portal-map__overlay > * { pointer-events: auto; }

.portal-map__pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border: 1px solid var(--home-line);
    border-radius: 999px;
    background: var(--home-white);
    color: var(--home-ink);
    font-size: 12.5px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: var(--home-shadow-soft);
}
.portal-map__pill:hover { border-color: var(--home-blue); color: var(--home-blue); }
.portal-map__pill--search { background: var(--home-gold); border-color: var(--home-gold); color: #2a2205; }
.portal-map__pill--search:hover { background: var(--home-gold-bright); border-color: var(--home-gold-bright); color: #2a2205; }
.portal-map__pill.is-denied { opacity: .55; }
.portal-map__pill[disabled] { opacity: .6; cursor: progress; }

.portal-map__loading,
.portal-map__legend {
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(16, 32, 51, .82);
    color: #fff;
    font-size: 11.5px;
    font-weight: 600;
}
.portal-map__legend { background: rgba(255, 255, 255, .94); color: var(--home-muted); border: 1px solid var(--home-line); }

.portal-map__error {
    display: grid;
    place-content: center;
    height: 100%;
    margin: 0;
    padding: 28px;
    color: var(--home-muted);
    font-size: 13.5px;
    text-align: center;
}

.portal-map__noscript {
    position: absolute;
    inset: 0;
    display: grid;
    place-content: center;
    gap: 12px;
    padding: 28px;
    text-align: center;
    background: var(--home-white);
    color: var(--home-muted);
}

/* --------------------------------------------------------------------------
   Marcadores de precio y grupos
   -------------------------------------------------------------------------- */
.map-pin {
    display: flex !important;
    flex-direction: column;
    align-items: center;
    width: auto !important;
    height: auto !important;
    margin: 0 !important;
    transform-origin: 50% 100%;
    transform: translate(-50%, -100%);
}
.map-pin__label {
    padding: 4px 9px;
    border: 1px solid var(--home-navy);
    border-radius: 999px;
    background: var(--home-navy);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
    box-shadow: 0 4px 12px rgba(7, 26, 47, .28);
}
.map-pin__tip {
    width: 2px;
    height: 7px;
    background: var(--home-navy);
}
.map-pin--featured .map-pin__label {
    border-color: var(--home-gold);
    background: var(--home-gold);
    color: #2a2205;
}
.map-pin--featured .map-pin__tip { background: var(--home-gold); }
.map-pin.is-active .map-pin__label,
.map-pin:hover .map-pin__label {
    border-color: var(--home-blue);
    background: var(--home-blue);
    color: #fff;
}
.map-pin.is-active { z-index: 700 !important; }

.map-cluster {
    display: flex !important;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1px;
    width: auto !important;
    height: auto !important;
    margin: 0 !important;
    transform: translate(-50%, -50%);
    border-radius: 999px;
    background: rgba(31, 111, 235, .92);
    color: #fff;
    text-align: center;
    box-shadow: 0 6px 18px rgba(7, 26, 47, .3);
    cursor: pointer;
}
.map-cluster--sm { min-width: 40px; padding: 8px 6px; }
.map-cluster--md { min-width: 52px; padding: 11px 8px; background: rgba(16, 46, 78, .93); }
.map-cluster--lg { min-width: 64px; padding: 14px 10px; background: rgba(7, 26, 47, .94); }
.map-cluster__count { font-size: 14px; font-weight: 800; line-height: 1; }
.map-cluster__range { font-size: 10px; font-weight: 600; opacity: .85; white-space: nowrap; }
.map-cluster:hover { background: var(--home-blue); }

/* --------------------------------------------------------------------------
   Ficha emergente del marcador
   -------------------------------------------------------------------------- */
.map-popup-wrap .leaflet-popup-content-wrapper {
    padding: 0;
    overflow: hidden;
    border-radius: 16px;
    box-shadow: var(--home-shadow);
}
.map-popup-wrap .leaflet-popup-content { margin: 0; width: 260px !important; }

.map-popup { display: flex; flex-direction: column; }
.map-popup__media {
    position: relative;
    display: block;
    aspect-ratio: 16 / 9;
    background: var(--home-surface);
}
.map-popup__media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.map-popup__placeholder {
    display: grid;
    place-content: center;
    height: 100%;
    color: var(--home-muted);
}
.map-popup__media .portal-chip { position: absolute; left: 9px; top: 9px; }

.map-popup__body { display: grid; gap: 4px; padding: 12px 13px 13px; }
.map-popup__price { font-size: 17px; font-weight: 800; color: var(--home-ink); }
.map-popup__price-alt { color: var(--home-muted); font-size: 12px; }
.map-popup__type { color: var(--home-blue); font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.map-popup__specs { color: var(--home-ink); font-size: 12.5px; }
.map-popup__place { display: flex; align-items: center; gap: 5px; color: var(--home-muted); font-size: 12px; }
.map-popup__cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: 6px;
    min-height: 36px;
    border-radius: 10px;
    background: var(--home-navy);
    color: #fff;
    font-size: 12.5px;
    font-weight: 700;
    text-decoration: none;
}
.map-popup__cta:hover { background: var(--home-blue); text-decoration: none; }
.map-popup__loading,
.map-popup__empty { margin: 0; padding: 18px; color: var(--home-muted); text-align: center; }

/* --------------------------------------------------------------------------
   Conmutador móvil listado / mapa
   -------------------------------------------------------------------------- */
.portal-map__switch {
    position: fixed;
    left: 50%;
    bottom: 16px;
    z-index: 120;
    display: none;
    transform: translateX(-50%);
    padding: 4px;
    border: 1px solid var(--home-line);
    border-radius: 999px;
    background: var(--home-white);
    box-shadow: var(--home-shadow);
}
.portal-map__switch-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 16px;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: var(--home-muted);
    font: inherit;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
}
.portal-map__switch-btn.is-active { background: var(--home-navy); color: #fff; }

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */
@media (min-width: 1560px) {
    .portal-map__layout { grid-template-columns: var(--portal-side) minmax(380px, 40fr) minmax(0, 60fr); }
}

@media (max-width: 1280px) {
    .portal-map__layout { grid-template-columns: 250px minmax(300px, 46fr) minmax(0, 54fr); gap: 14px; }
}

@media (max-width: 1080px) {
    .portal-map { --map-bar: 150px; }
    .portal-map__layout { grid-template-columns: minmax(300px, 1fr) minmax(0, 1fr); }
    /* El panel de filtros pasa a ser deslizante (regla general del portal). */
}

@media (max-width: 1024px) {
    .portal-map { --map-bar: 0px; padding-bottom: 76px; }
    .portal-map__layout { grid-template-columns: minmax(0, 1fr); }
    .portal-map__panel { max-height: none; overflow: visible; padding-right: 0; }
    .portal-map__canvas { display: none; }
    .portal-map__canvas-inner { position: static; height: auto; }
    .portal-map__switch { display: flex; }

    body.map-view-active .portal-map__panel { display: none; }
    body.map-view-active .portal-map__bar { margin-bottom: 12px; }
    body.map-view-active .portal-map__canvas { display: block; }
    body.map-view-active .portal-map__canvas-inner {
        height: calc(100vh - 210px);
        min-height: 360px;
    }
}

@media (max-width: 761px) {
    .portal-map { padding: 16px 14px 76px; }
    .portal-map__bar { align-items: stretch; }
    .portal-map__search { flex: 1 1 100%; flex-wrap: wrap; max-width: none; }
    .portal-map__search-field--select { flex: 1 1 100%; }
    .portal-map__search .home-button { flex: 1 1 100%; }
    .portal-map__tools { width: 100%; }
    .portal-map__tools > * { flex: 1 1 calc(50% - 5px); justify-content: center; }
    body.map-view-active .portal-map__canvas-inner { height: calc(100vh - 250px); }
}

@media (max-width: 600px) {
    .portal-map__title { font-size: 20px; }
    .portal-map__count { font-size: 15.5px; }
    .portal-map__sort { flex: 1 1 100%; justify-content: space-between; }
}

@media (max-width: 480px) {
    .portal-map { padding: 14px 12px 72px; }
    .portal-map__list { gap: 12px; }
    .map-popup-wrap .leaflet-popup-content { width: 220px !important; }
    .portal-map__switch-btn { padding: 8px 12px; font-size: 12.5px; }
}

@media (max-width: 400px) {
    .portal-map__tools > * { flex: 1 1 100%; }
    .map-pin__label { font-size: 11px; padding: 3px 8px; }
}

@media (max-width: 360px) {
    .portal-map__title { font-size: 18.5px; }
    .portal-map__switch-btn span { display: none; }
    .portal-map__switch-btn { padding: 9px 14px; }
}

@media (prefers-reduced-motion: reduce) {
    .portal-map__item { transition: none; }
}

/* ===============================================================
   NEWSLETTER PÚBLICA
   Banda de suscripción del portal y páginas de confirmación,
   baja y preferencias. Usa la misma paleta que el resto del portal.
   =============================================================== */

/* Botón secundario claro (la landing solo trae variantes oscuras) */
.home-button--ghost {
    border-color: var(--home-line);
    background: var(--home-white);
    color: var(--home-ink);
    box-shadow: var(--home-shadow-soft);
}
.home-button--ghost:hover { border-color: var(--home-gold); color: var(--home-navy); }

/* --- Banda "Reciba novedades" ---------------------------------- */
.portal-news {
    padding: 64px 0;
    background:
        radial-gradient(circle at 12% 18%, rgba(78, 155, 255, .16), transparent 55%),
        linear-gradient(135deg, var(--home-navy) 0%, var(--home-navy-3) 100%);
    color: #fff;
}
.portal-news__inner {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
    gap: 34px;
    align-items: center;
}
.portal-news__copy { min-width: 0; }
.portal-news__copy h2 {
    margin: 12px 0 10px;
    font-size: clamp(22px, 2.4vw, 31px);
    line-height: 1.2;
    letter-spacing: -.01em;
}
.portal-news__copy p {
    margin: 0;
    max-width: 44ch;
    font-size: 14.5px;
    line-height: 1.7;
    color: rgba(255, 255, 255, .78);
}

.portal-news__form {
    display: grid;
    gap: 13px;
    min-width: 0;
    padding: 24px;
    border: 1px solid rgba(255, 255, 255, .16);
    border-radius: var(--home-radius-sm);
    background: rgba(255, 255, 255, .07);
    backdrop-filter: blur(6px);
}
.portal-news__field { display: grid; gap: 6px; min-width: 0; }
.portal-news__field label {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .02em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, .72);
}
.portal-news__field input {
    width: 100%;
    min-height: 48px;
    padding: 11px 14px;
    border: 1px solid rgba(255, 255, 255, .22);
    border-radius: 12px;
    background: rgba(255, 255, 255, .95);
    color: var(--home-ink);
    font: inherit;
    font-size: 15px;
}
.portal-news__field input:focus-visible {
    outline: 3px solid var(--home-gold-bright);
    outline-offset: 2px;
}
.portal-news__consent {
    font-size: 12.5px;
    line-height: 1.55;
    color: rgba(255, 255, 255, .8);
}
.portal-news__consent input { accent-color: var(--home-gold); }
.portal-news__legal {
    margin: 0;
    font-size: 11.5px;
    line-height: 1.5;
    color: rgba(255, 255, 255, .62);
}
.portal-news__error {
    margin: 0;
    padding: 9px 12px;
    border-radius: 10px;
    background: rgba(209, 73, 91, .22);
    color: #ffd9de;
    font-size: 13px;
    line-height: 1.5;
}
.portal-news__done {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 20px 22px;
    border: 1px solid rgba(255, 255, 255, .18);
    border-radius: var(--home-radius-sm);
    background: rgba(51, 167, 118, .16);
}
.portal-news__done p { margin: 0; font-size: 14.5px; line-height: 1.6; }
.portal-news__done .icon { flex: 0 0 auto; }

/* --- Páginas de confirmación, baja y preferencias -------------- */
.portal-simple { padding: calc(var(--home-header) + 54px) 0 84px; }
.portal-simple__inner {
    display: grid;
    justify-items: center;
    gap: 14px;
    max-width: 620px;
    margin: 0 auto;
    padding: 34px 30px;
    border: 1px solid var(--home-line);
    border-radius: var(--home-radius);
    background: var(--home-white);
    box-shadow: var(--home-shadow-soft);
    text-align: center;
}
.portal-simple__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 62px;
    height: 62px;
    border-radius: 50%;
    background: var(--home-gold-soft);
    color: var(--home-navy);
}
.portal-simple h1 {
    margin: 0;
    font-size: clamp(20px, 2.2vw, 27px);
    line-height: 1.25;
    color: var(--home-ink);
}
.portal-simple p { margin: 0; font-size: 14.5px; line-height: 1.7; color: var(--home-muted); }
.portal-simple__mail {
    padding: 7px 14px;
    border-radius: 999px;
    background: var(--home-surface);
    font-size: 13.5px;
    font-weight: 600;
    color: var(--home-ink) !important;
    word-break: break-all;
}
.portal-simple__actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-top: 6px;
}
.portal-simple__form { margin: 0; }
.portal-simple__link {
    border: 0;
    padding: 4px 2px;
    background: none;
    color: var(--home-muted);
    font: inherit;
    font-size: 13px;
    text-decoration: underline;
    cursor: pointer;
}
.portal-simple__link:hover { color: #8d2334; }

/* --- Centro de preferencias ----------------------------------- */
.portal-prefs {
    display: grid;
    gap: 18px;
    width: 100%;
    margin-top: 8px;
    text-align: left;
}
.portal-prefs__group {
    display: grid;
    gap: 9px;
    min-width: 0;
    padding: 16px 18px;
    border: 1px solid var(--home-line);
    border-radius: var(--home-radius-sm);
    background: var(--home-surface);
}
.portal-prefs__group legend,
.portal-prefs__group > label {
    padding: 0;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .02em;
    text-transform: uppercase;
    color: var(--home-muted);
}
.portal-prefs__group select {
    width: 100%;
    min-height: 46px;
    padding: 10px 13px;
    border: 1px solid var(--home-line);
    border-radius: 12px;
    background: var(--home-white);
    color: var(--home-ink);
    font: inherit;
    font-size: 14.5px;
}
.portal-prefs__hint {
    margin: 2px 0 0;
    font-size: 12px !important;
    line-height: 1.5;
}
.portal-prefs .portal-check { font-size: 14px; }

/* --- Responsive ----------------------------------------------- */
@media (max-width: 1024px) {
    .portal-news__inner { grid-template-columns: minmax(0, 1fr); gap: 26px; }
}
@media (max-width: 900px) {
    .portal-news { padding: 52px 0; }
}
@media (max-width: 761px) {
    .portal-news__form { padding: 20px; }
    .portal-simple { padding: calc(var(--home-header) + 38px) 0 66px; }
    .portal-simple__inner { padding: 28px 22px; }
}
@media (max-width: 600px) {
    .portal-news { padding: 44px 0; }
    .portal-simple__actions .home-button { width: 100%; justify-content: center; }
}
@media (max-width: 480px) {
    .portal-news__form { padding: 17px; border-radius: 14px; }
    .portal-news__done { padding: 16px 17px; }
    .portal-simple__inner { padding: 24px 17px; border-radius: 20px; }
    .portal-simple__icon { width: 54px; height: 54px; }
    .portal-prefs__group { padding: 14px 15px; }
}
@media (max-width: 400px) {
    .portal-news__copy p, .portal-simple p { font-size: 13.5px; }
    .portal-news__field input { min-height: 46px; font-size: 14.5px; }
}
@media (max-width: 360px) {
    .portal-news__form { padding: 15px; }
    .portal-simple__inner { padding: 21px 14px; }
}

/* ===============================================================
   PÁGINAS LEGALES PÚBLICAS
   Política de privacidad y términos y condiciones. Comparten la
   cabecera y el pie del portal, así que solo se define el contenido.
   =============================================================== */

/* Enlaces legales del pie (portada y portal).
   En columna, uno debajo de otro, con el mismo estilo que el resto de
   enlaces del pie. La definición vive en landing.css; aquí solo se
   confirma la disposición para que el portal no la convierta en fila. */
.home-footer__legal {
    display: grid;
    justify-items: start;
    gap: 9px;
    margin-top: 14px;
}

.legal-page { padding: calc(var(--home-header) + 46px) 0 84px; }
.legal-page__inner {
    max-width: 840px;
    margin: 0 auto;
    padding: 38px 40px;
    border: 1px solid var(--home-line);
    border-radius: var(--home-radius);
    background: var(--home-white);
    box-shadow: var(--home-shadow-soft);
}

.legal-page__head { margin-bottom: 26px; }
.legal-page__head h1 {
    margin: 12px 0 8px;
    font-size: clamp(23px, 2.6vw, 33px);
    line-height: 1.2;
    letter-spacing: -.01em;
    color: var(--home-ink);
}
.legal-page__meta { margin: 0; font-size: 13px; color: var(--home-muted); }

.legal-page__notice {
    margin: 0 0 22px;
    padding: 11px 14px;
    border-left: 3px solid var(--home-gold);
    border-radius: 10px;
    background: var(--home-gold-soft);
    font-size: 13.5px;
    line-height: 1.55;
    color: #6d5518;
}

/* --- Tipografía del contenido legal --------------------------- */
.legal-page__content {
    color: var(--home-ink);
    font-size: 15px;
    line-height: 1.8;
}
.legal-page__content h2 {
    margin: 32px 0 12px;
    padding-top: 22px;
    border-top: 1px solid var(--home-line);
    font-size: clamp(17px, 1.7vw, 20px);
    line-height: 1.3;
    letter-spacing: -.005em;
}
.legal-page__content h3 { margin: 24px 0 9px; font-size: 16px; }
.legal-page__content h4 { margin: 20px 0 7px; font-size: 15px; }
.legal-page__content h2:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.legal-page__content h3:first-child,
.legal-page__content p:first-child { margin-top: 0; }
.legal-page__content p { margin: 0 0 14px; }
.legal-page__content ul,
.legal-page__content ol { margin: 0 0 16px; padding-left: 22px; }
.legal-page__content li { margin-bottom: 7px; }
.legal-page__content a { color: var(--home-blue); word-break: break-word; }
.legal-page__content strong { color: var(--home-navy); }
.legal-page__content hr { margin: 26px 0; border: 0; border-top: 1px solid var(--home-line); }
.legal-page__content blockquote {
    margin: 0 0 16px;
    padding: 12px 16px;
    border-left: 3px solid var(--home-line);
    border-radius: 10px;
    background: var(--home-surface);
    color: var(--home-muted);
}
.legal-page__content code {
    padding: 2px 6px;
    border-radius: 6px;
    background: var(--home-surface);
    font-size: 13px;
}
.legal-page__content table {
    width: 100%;
    margin: 0 0 18px;
    border-collapse: collapse;
    font-size: 14px;
}
.legal-page__content th,
.legal-page__content td {
    padding: 9px 12px;
    border: 1px solid var(--home-line);
    text-align: left;
    vertical-align: top;
}
.legal-page__content th { background: var(--home-surface); font-weight: 700; }

.legal-page__nav {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid var(--home-line);
}

/* --- Responsive ----------------------------------------------- */
@media (max-width: 1024px) {
    .legal-page__inner { padding: 34px 32px; }
}
@media (max-width: 900px) {
    .legal-page { padding: calc(var(--home-header) + 38px) 0 70px; }
}
@media (max-width: 761px) {
    .legal-page__inner { padding: 28px 22px; }
    .legal-page__content { font-size: 14.5px; line-height: 1.75; }
    /* Las tablas pasan a desplazarse en lugar de desbordar la pantalla. */
    .legal-page__content table { display: block; overflow-x: auto; white-space: nowrap; }
}
@media (max-width: 600px) {
    .legal-page__nav .btn { flex: 1 1 100%; justify-content: center; }
}
@media (max-width: 480px) {
    .legal-page { padding: calc(var(--home-header) + 28px) 0 58px; }
    .legal-page__inner { padding: 23px 16px; border-radius: 20px; }
    .legal-page__content ul,
    .legal-page__content ol { padding-left: 18px; }
    .legal-page__content h2 { margin-top: 26px; padding-top: 18px; }
}
@media (max-width: 400px) {
    .legal-page__inner { padding: 20px 13px; }
    .legal-page__content { font-size: 14px; }
    .legal-page__notice { font-size: 13px; }
}
@media (max-width: 360px) {
    .legal-page__inner { padding: 17px 11px; }
    .legal-page__content code { font-size: 12px; }
}
