/* ==========================================================================
   Paradise Realty Nicaragua — Sistema visual
   Mobile-first (base 375px) → 480 → 768 → 1024 → 1280
   Marca: dorado #B89B67 · navy carbon #1C2733 · tipografia Montserrat
   ========================================================================== */

:root {
  --gold: #B89B67;
  --gold-dark: #8C7343;
  --gold-light: #CDB182;
  --navy: #1C2733;
  --navy-soft: #2A3948;
  --cream: #FFFFFF;
  --sand: #F7F4EE;
  --sand-2: #FBF9F5;
  --ink: #1C2733;
  --ink-soft: #5A5147;
  --ink-mut: #8A7E6E;
  --white: #ffffff;
  --line: rgba(28, 39, 51, 0.10);
  --gold-line: rgba(184, 155, 103, 0.30);

  --shadow-sm: 0 1px 3px rgba(28,39,51,.05), 0 4px 14px rgba(28,39,51,.05);
  --shadow: 0 4px 10px rgba(28,39,51,.05), 0 14px 40px rgba(28,39,51,.09);
  --shadow-lg: 0 8px 20px rgba(28,39,51,.07), 0 28px 70px rgba(28,39,51,.14);
  --shadow-float: 0 10px 24px rgba(28,39,51,.08), 0 32px 80px rgba(28,39,51,.16);

  --radius: 14px;
  --radius-lg: 22px;

  --max: 1200px;
  --nav-h: 68px;
  --card-aspect: 4 / 3;      /* proporción uniforme de portadas (configurable) */
  --hero-pos: center 60%;    /* punto focal del banner (configurable) */
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  background: #fff;
  font-family: 'Montserrat', system-ui, -apple-system, 'Segoe UI', sans-serif;
  color: var(--ink);
  line-height: 1.6;
  font-size: 16px;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button, input, select { font-family: inherit; font-size: inherit; }

.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 20px; }

/* ---------- Tipografia ---------- */
h1, h2, h3 { line-height: 1.15; font-weight: 700; letter-spacing: -0.01em; }
h1 { font-size: 2rem; font-weight: 800; }
h2 { font-size: 1.6rem; }
h3 { font-size: 1.15rem; }

.eyebrow {
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--gold-dark);
}
.section-title { margin-top: 8px; }
.section-lead { color: var(--ink-soft); margin-top: 12px; max-width: 620px; }
.text-gold { color: var(--gold-dark); }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px 24px; border-radius: 999px; border: none; cursor: pointer;
  font-weight: 600; font-size: 0.95rem; transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
  white-space: nowrap;
}
.btn-primary { background: linear-gradient(135deg, var(--gold), var(--gold-dark)); color: #fff; box-shadow: var(--shadow); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 12px 32px rgba(140,115,67,.28); }
.btn-ghost { background: transparent; color: var(--white); border: 1.5px solid rgba(255,255,255,.6); }
.btn-ghost:hover { background: rgba(255,255,255,.12); }
.btn-outline { background: transparent; color: var(--gold-dark); border: 1.5px solid var(--gold); }
.btn-outline:hover { background: rgba(184,155,103,.10); }
.btn-block { width: 100%; }

/* ---------- Navbar ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; height: var(--nav-h); z-index: 100;
  display: flex; align-items: center;
  background: rgba(255,255,255,.94);
  backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid transparent;
  transition: box-shadow .25s ease, border-color .25s ease, background .25s ease;
}
.nav.scrolled { box-shadow: 0 2px 20px rgba(28,39,51,.07); border-bottom-color: var(--gold-line); }
.nav-inner { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 20px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.nav-logo { display: flex; align-items: center; gap: 10px; }
.nav-logo img { height: 42px; width: auto; }
.nav-links { display: none; gap: 28px; align-items: center; }
.nav-links a { font-size: 0.9rem; font-weight: 500; color: var(--ink-soft); transition: color .18s; }
.nav-links a:hover { color: var(--gold-dark); }
.nav-cta { display: flex; align-items: center; gap: 10px; }
.nav-cta .btn { padding: 10px 18px; font-size: 0.85rem; }
.nav-admin { display: none; font-size: 0.8rem; font-weight: 600; color: var(--ink-mut); }
.nav-admin:hover { color: var(--gold-dark); }

.burger { display: flex; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 8px; }
.burger span { width: 22px; height: 2px; background: var(--navy); border-radius: 2px; transition: .25s; }

.mobile-menu {
  position: fixed; inset: var(--nav-h) 0 auto 0; background: #fff;
  border-bottom: 1px solid var(--gold-line); padding: 20px; z-index: 99;
  display: none; flex-direction: column; gap: 4px; box-shadow: var(--shadow);
}
.mobile-menu.open { display: flex; }
.mobile-menu a { padding: 13px 4px; font-weight: 500; border-bottom: 1px solid var(--line); }
.mobile-menu a:last-of-type { border-bottom: none; }

/* ---------- Hero ---------- */
.hero {
  position: relative; min-height: 92vh; display: flex; align-items: center;
  padding: calc(var(--nav-h) + 40px) 0 48px;
  background-image:
    linear-gradient(180deg, rgba(20,28,38,.52) 0%, rgba(20,28,38,.34) 45%, rgba(20,28,38,.62) 100%),
    url('/img/hero.jpg');
  background-size: cover; background-position: var(--hero-pos); background-repeat: no-repeat;
  color: #fff; overflow: hidden;
}
.hero::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(760px 520px at 78% 22%, rgba(184,155,103,.16), transparent 64%);
}
.hero-inner { position: relative; z-index: 2; width: 100%; }
.hero .eyebrow { color: var(--gold-light); }
.hero h1 { font-size: 2.1rem; margin-top: 12px; color: #fff; }
.hero h1 .accent {
  background: linear-gradient(120deg, var(--gold-light), var(--gold));
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.hero p.lead { margin-top: 16px; color: rgba(255,255,255,.86); font-size: 1rem; max-width: 560px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }

/* Buscador del hero */
.search-card {
  background: #fff; border-radius: var(--radius-lg);
  padding: 20px; box-shadow: var(--shadow-float); color: var(--ink);
  position: relative; z-index: 5; margin-top: -96px;
}
.search-float { position: relative; z-index: 5; }
.search-tabs { display: flex; gap: 4px; margin-bottom: 16px; background: var(--sand); padding: 5px; border-radius: 999px; }
.search-tab {
  flex: 1; padding: 10px 8px; border: none; background: transparent; border-radius: 999px;
  font-weight: 600; font-size: 0.82rem; color: var(--ink-soft); cursor: pointer; transition: .2s;
}
.search-tab.active { background: var(--navy); color: #fff; box-shadow: 0 4px 12px rgba(28,39,51,.22); }
.search-grid { display: grid; gap: 10px; }
.field label { display: block; font-size: 0.72rem; font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase; color: var(--ink-mut); margin-bottom: 6px; }
.field select, .field input {
  width: 100%; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: var(--radius);
  background: var(--white); color: var(--ink); outline: none; transition: border-color .18s;
}
.field select:focus, .field input:focus { border-color: var(--gold); }

/* Buscador en lenguaje natural */
.nl-search { margin-top: 12px; padding-top: 14px; border-top: 1px dashed var(--gold-line); }
.nl-row { display: flex; gap: 8px; }
.nl-row input { flex: 1 1 auto; min-width: 0; padding: 13px 16px;
  border: 1.5px solid var(--gold-line); border-radius: 999px;
  background: #fffdf8; outline: none; }
.nl-row input:focus { border-color: var(--gold); }
.nl-row button { border-radius: 999px; padding: 13px 18px; flex: 0 0 auto; }
.nl-hint { font-size: 0.75rem; color: var(--ink-mut); margin-top: 8px; }
.nl-hint b { color: var(--gold-dark); font-weight: 600; }

/* ---------- Stats ---------- */
.stats { background: #fff; color: var(--ink); padding: 40px 0 18px; }
.stats-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 26px 12px; text-align: center; }
.stat-num { font-size: 2rem; font-weight: 800;
  background: linear-gradient(120deg, var(--gold-light), var(--gold));
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.stat-lab { font-size: .78rem; color: var(--ink-mut); margin-top: 4px; letter-spacing: .03em; }

/* ---------- Secciones ---------- */
section { padding: 62px 0; }
.sec-soft { background: var(--sand-2); }
.section-head { margin-bottom: 28px; }

/* ---------- Filtros de propiedades ---------- */
.chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; margin-bottom: 22px;
  scrollbar-width: none; -ms-overflow-style: none; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex-shrink: 0; padding: 9px 18px; border-radius: 999px; border: 1.5px solid var(--gold-line);
  background: transparent; color: var(--ink-soft); font-weight: 600; font-size: 0.84rem; cursor: pointer;
  transition: .2s;
}
.chip.active { background: var(--navy); color: var(--gold-light); border-color: var(--navy); }

/* ---------- Grid de propiedades ---------- */
.props-grid { display: grid; gap: 20px; }
.prop-card {
  background: #fff; border-radius: var(--radius-lg); overflow: hidden;
  border: 1px solid rgba(28,39,51,.06); box-shadow: var(--shadow);
  transition: transform .26s cubic-bezier(.2,.7,.3,1), box-shadow .26s ease;
}
.prop-card:hover { transform: translateY(-8px); box-shadow: var(--shadow-float); }
.prop-photo {
  position: relative; aspect-ratio: var(--card-aspect);
  background: linear-gradient(135deg, #dfd6c4, #cbbfa8);
  background-size: cover; background-position: center; display: flex; align-items: center; justify-content: center;
}
.prop-photo .ph-icon { opacity: .55; color: var(--gold-dark); }
.prop-badges { position: absolute; top: 12px; left: 12px; display: flex; gap: 6px; flex-wrap: wrap; }
.badge {
  font-size: 0.68rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  padding: 6px 11px; border-radius: 8px; background: rgba(255,255,255,.94); color: var(--navy);
}
.badge-op { background: linear-gradient(135deg, var(--gold), var(--gold-dark)); color: #fff; }
.badge-star { background: var(--navy); color: var(--gold-light); }
.prop-body { padding: 16px 16px 18px; }
.prop-price { font-size: 1.3rem; font-weight: 800; color: var(--gold-dark); }
.prop-title { font-size: 1rem; font-weight: 700; margin-top: 4px; }
.prop-loc { display: flex; align-items: center; gap: 6px; font-size: 0.84rem; color: var(--ink-mut); margin-top: 6px; }
.prop-loc svg { width: 15px; height: 15px; color: var(--gold); flex-shrink: 0; }
.prop-specs {
  display: flex; gap: 14px; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line);
  font-size: 0.82rem; color: var(--ink-soft); flex-wrap: wrap;
}
.prop-spec { display: flex; align-items: center; gap: 5px; }
.prop-spec svg { width: 16px; height: 16px; color: var(--gold); }
.prop-actions { display: flex; gap: 8px; margin-top: 14px; }
.prop-actions .btn { flex: 1; padding: 11px 14px; font-size: 0.85rem; }

/* ---------- Servicios ---------- */
.services-grid { display: grid; gap: 18px; }
.service-card {
  background: #fff; border: 1px solid rgba(28,39,51,.06); border-top: 3px solid var(--gold);
  border-radius: var(--radius-lg); padding: 28px 24px; box-shadow: var(--shadow);
  transition: transform .26s cubic-bezier(.2,.7,.3,1), box-shadow .26s ease;
}
.service-card:hover { transform: translateY(-8px); box-shadow: var(--shadow-float); }
.service-ic {
  width: 52px; height: 52px; border-radius: 14px; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, rgba(184,155,103,.16), rgba(140,115,67,.10));
  color: var(--gold-dark); margin-bottom: 16px;
}
.service-ic svg { width: 26px; height: 26px; }
.service-card p { color: var(--ink-soft); font-size: 0.92rem; margin-top: 8px; }

/* ---------- Franja CTA ---------- */
.cta-band {
  background: linear-gradient(150deg, var(--navy), var(--navy-soft));
  color: #fff; border-radius: var(--radius-lg); padding: 36px 24px; text-align: center;
  position: relative; overflow: hidden;
}
.cta-band::after {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(420px 300px at 85% 10%, rgba(184,155,103,.26), transparent 60%);
}
.cta-band > * { position: relative; z-index: 2; }
.cta-band h2 { color: #fff; }
.cta-band p { color: rgba(255,255,255,.8); margin-top: 10px; }
.cta-band .btn { margin-top: 22px; }

/* ---------- Contacto ---------- */
.contact-wrap { display: grid; gap: 26px; }
.form-card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 24px; box-shadow: var(--shadow-sm); }
.form-grid { display: grid; gap: 14px; }
.form-grid textarea {
  width: 100%; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: var(--radius);
  font-family: inherit; resize: vertical; min-height: 110px; outline: none;
}
.form-grid textarea:focus { border-color: var(--gold); }
.form-note { font-size: 0.78rem; color: var(--ink-mut); }
.contact-info { display: grid; gap: 14px; }
.contact-item { display: flex; gap: 12px; align-items: flex-start; }
.contact-item svg { width: 20px; height: 20px; color: var(--gold); flex-shrink: 0; margin-top: 3px; }
.contact-item b { display: block; font-size: 0.9rem; }
.contact-item span { font-size: 0.88rem; color: var(--ink-soft); }

/* ---------- Footer ---------- */
.footer { background: var(--navy); color: rgba(255,255,255,.72); padding: 42px 0 90px; }
.footer-grid { display: grid; gap: 26px; }
.footer img { height: 58px; margin-bottom: 12px; }
.footer h4 { color: #fff; font-size: 0.86rem; letter-spacing: .1em; text-transform: uppercase; margin-bottom: 12px; }
.footer a { display: block; padding: 5px 0; font-size: 0.9rem; transition: color .18s; }
.footer a:hover { color: var(--gold-light); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.12); margin-top: 30px; padding-top: 20px;
  display: flex; flex-direction: column; gap: 8px; font-size: 0.8rem;
}
.footer-bottom .powered { color: var(--gold-light); }

/* ---------- WhatsApp flotante ---------- */
.wa-float {
  position: fixed; right: 16px; bottom: 84px; z-index: 90;
  border: none; cursor: pointer; padding: 0;
  width: 54px; height: 54px; border-radius: 50%; background: #25D366; color: #fff;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 8px 24px rgba(37,211,102,.4); transition: transform .2s;
}
.wa-float:hover { transform: scale(1.07); }
.wa-float svg { width: 28px; height: 28px; }

/* ---------- Barra inferior movil (app-like) ---------- */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 95;
  background: rgba(255,255,255,.97); backdrop-filter: blur(10px);
  border-top: 1px solid var(--line); display: flex; padding: 8px 4px 10px;
}
.tabbar a {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px;
  font-size: 0.66rem; font-weight: 600; color: var(--ink-mut); padding: 4px 0;
}
.tabbar a.active { color: var(--gold-dark); }
.tabbar svg { width: 21px; height: 21px; }

/* ---------- Modal contactar asesor ---------- */
.modal-backdrop {
  position: fixed; inset: 0; background: rgba(18, 26, 34, .62); backdrop-filter: blur(3px);
  z-index: 200; display: none; align-items: flex-end; justify-content: center; padding: 0;
}
.modal-backdrop.open { display: flex; }
.modal {
  background: var(--white); width: 100%; max-width: 460px;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0; padding: 24px 20px 28px;
  box-shadow: var(--shadow-lg); animation: slideUp .28s ease;
}
@keyframes slideUp { from { transform: translateY(24px); opacity: .6; } to { transform: translateY(0); opacity: 1; } }
.modal-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 6px; }
.modal-close { background: none; border: none; font-size: 1.5rem; line-height: 1; color: var(--ink-mut); cursor: pointer; }
.modal-prop { font-size: 0.85rem; color: var(--ink-soft); background: var(--sand);
  padding: 10px 14px; border-radius: var(--radius); margin: 12px 0 18px; }
.modal-prop b { color: var(--gold-dark); }
.modal .form-grid { gap: 12px; }
.modal-msg { font-size: 0.85rem; margin-top: 12px; padding: 10px 14px; border-radius: var(--radius); display: none; }
.modal-msg.error { display: block; background: #fdecec; color: #a02020; }
.modal-msg.success { display: block; background: #eaf7ee; color: #1d6b34; }

/* ==========================================================================
   Breakpoints
   ========================================================================== */
@media (min-width: 480px) {
  h1 { font-size: 2.3rem; }
  .hero h1 { font-size: 2.5rem; }
  .search-grid { grid-template-columns: 1fr 1fr; }
  .stats-grid { gap: 26px 18px; }
}

@media (min-width: 768px) {
  .container { padding: 0 32px; }
  h1 { font-size: 2.8rem; }
  h2 { font-size: 2rem; }
  section { padding: 76px 0; }
  .hero h1 { font-size: 3.1rem; }
  .hero p.lead { font-size: 1.08rem; }
  .search-grid { grid-template-columns: repeat(3, 1fr); }
  .stats-grid { grid-template-columns: repeat(4, 1fr); }
  .props-grid { grid-template-columns: repeat(2, 1fr); }
  .services-grid { grid-template-columns: repeat(3, 1fr); }
  .contact-wrap { grid-template-columns: 1.4fr 1fr; }
  .footer-grid { grid-template-columns: 2fr 1fr 1fr; }
  .footer-bottom { flex-direction: row; justify-content: space-between; align-items: center; }
  .cta-band { padding: 52px 40px; }
  .modal-backdrop { align-items: center; padding: 20px; }
  .modal { border-radius: var(--radius-lg); }
  .tabbar { display: none; }
  .footer { padding-bottom: 42px; }
  .wa-float { bottom: 24px; right: 24px; width: 58px; height: 58px; }
}

@media (min-width: 1024px) {
  .nav-links { display: flex; }
  .nav-admin { display: inline-block; }
  .burger { display: none; }
  .hero h1 { font-size: 3.5rem; }
  .props-grid { grid-template-columns: repeat(3, 1fr); }
  .search-grid { grid-template-columns: repeat(4, 1fr); }
}

/* ==========================================================================
   PORTAL ADMIN (admin.html)
   ========================================================================== */
.login-wrap {
  min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px;
  background:
    radial-gradient(620px 520px at 15% 10%, rgba(184,155,103,.20), transparent 60%),
    linear-gradient(160deg, #1C2733, #121a22);
}
.login-card {
  width: 100%; max-width: 420px; background: var(--white); border-radius: var(--radius-lg);
  padding: 34px 26px; box-shadow: var(--shadow-lg); text-align: center;
}
.login-card img { height: 76px; margin: 0 auto 18px; }
.login-card h1 { font-size: 1.35rem; }
.login-card p.sub { color: var(--ink-mut); font-size: 0.88rem; margin-top: 6px; margin-bottom: 24px; }
.login-card .form-grid { text-align: left; }
.login-msg { font-size: 0.85rem; margin-top: 14px; padding: 11px 14px; border-radius: var(--radius); display: none; }
.login-msg.error { display: block; background: #fdecec; color: #a02020; }
.login-msg.info { display: block; background: #fff6e5; color: #8a6116; }
.login-back { display: inline-block; margin-top: 18px; font-size: 0.82rem; color: var(--ink-mut); }
.login-back:hover { color: var(--gold-dark); }

/* Shell del portal */
.portal { display: none; min-height: 100vh; background: var(--cream); }
.portal.active { display: block; }
.portal-top {
  position: sticky; top: 0; z-index: 50; background: var(--navy); color: #fff;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 18px;
}
.portal-top img { height: 36px; }
.portal-user { display: flex; align-items: center; gap: 10px; font-size: 0.85rem; }
.portal-user .avatar {
  width: 34px; height: 34px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--gold), var(--gold-dark)); font-weight: 700; font-size: 0.8rem;
}
.portal-user .role { font-size: 0.7rem; color: var(--gold-light); text-transform: uppercase; letter-spacing: .06em; }
.btn-logout { background: rgba(255,255,255,.12); border: none; color: #fff; padding: 8px 14px;
  border-radius: 999px; font-size: 0.78rem; cursor: pointer; }
.btn-logout:hover { background: rgba(255,255,255,.2); }

.portal-nav { display: flex; gap: 4px; overflow-x: auto; background: var(--white);
  border-bottom: 1px solid var(--line); padding: 0 12px; scrollbar-width: none; }
.portal-nav::-webkit-scrollbar { display: none; }
.portal-nav button {
  flex-shrink: 0; background: none; border: none; padding: 15px 14px; font-weight: 600;
  font-size: 0.85rem; color: var(--ink-mut); cursor: pointer; border-bottom: 2.5px solid transparent;
}
.portal-nav button.active { color: var(--gold-dark); border-bottom-color: var(--gold); }

.portal-body { padding: 22px 18px 40px; max-width: var(--max); margin: 0 auto; }
.kpi-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-bottom: 24px; }
.kpi {
  background: var(--white); border: 1px solid var(--line); border-left: 3px solid var(--gold);
  border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow-sm);
}
.kpi .n { font-size: 1.7rem; font-weight: 800; color: var(--navy); }
.kpi .l { font-size: 0.75rem; color: var(--ink-mut); margin-top: 2px; }
.panel {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 22px; box-shadow: var(--shadow-sm);
}
.panel h3 { margin-bottom: 6px; }
.panel p { color: var(--ink-soft); font-size: 0.92rem; }
.empty-state { text-align: center; padding: 34px 18px; color: var(--ink-mut); }
.empty-state svg { width: 46px; height: 46px; color: var(--gold-line); margin: 0 auto 12px; }
.view { display: none; }
.view.active { display: block; }

.notice {
  background: #fff6e5; border: 1px solid #f0d9a8; color: #7a5a12;
  border-radius: var(--radius); padding: 14px 16px; font-size: 0.86rem; margin-bottom: 20px;
}
.notice b { display: block; margin-bottom: 3px; }

@media (min-width: 768px) {
  .kpi-grid { grid-template-columns: repeat(4, 1fr); }
  .portal-body { padding: 28px 32px 48px; }
  .portal-top { padding: 14px 32px; }
  .portal-nav { padding: 0 26px; }
}

/* ==========================================================================
   PÁGINA DE DETALLE DE PROPIEDAD (propiedad.html)
   ========================================================================== */
.detail { padding-top: calc(var(--nav-h) + 18px); padding-bottom: 60px; }
.back-link { display: inline-block; font-size: .88rem; font-weight: 600; color: var(--ink-mut);
  margin-bottom: 16px; transition: color .18s; }
.back-link:hover { color: var(--gold-dark); }

/* Skeleton de carga */
.skeleton { background: linear-gradient(90deg,#eee7d9 25%,#f6f1e6 50%,#eee7d9 75%);
  background-size: 200% 100%; animation: sk 1.4s infinite; border-radius: var(--radius); }
@keyframes sk { 0%{background-position:200% 0} 100%{background-position:-200% 0} }
.sk-gallery { aspect-ratio: 4/3; margin-bottom: 18px; }
.sk-line { height: 22px; margin-bottom: 12px; }

/* Galería */
.gallery-wrap { margin-bottom: 26px; }
.gal-main {
  position: relative; aspect-ratio: var(--card-aspect); border-radius: var(--radius-lg);
  background-size: cover; background-position: center; background-color: #ddd4c2;
  box-shadow: var(--shadow); overflow: hidden;
}
.gal-main.gal-empty { display: flex; align-items: center; justify-content: center; }
.gal-nav {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 3;
  width: 42px; height: 42px; border-radius: 50%; border: none; cursor: pointer;
  background: rgba(255,255,255,.90); color: var(--navy); font-size: 1.7rem; line-height: 1;
  display: flex; align-items: center; justify-content: center; box-shadow: var(--shadow-sm);
  transition: background .18s;
}
.gal-nav:hover { background: #fff; }
.gal-nav.prev { left: 12px; }
.gal-nav.next { right: 12px; }
.gal-count {
  position: absolute; right: 14px; bottom: 14px; z-index: 3;
  background: rgba(28,39,51,.78); color: #fff; font-size: .78rem; font-weight: 600;
  padding: 6px 12px; border-radius: 999px;
}
.gal-thumbs { display: flex; gap: 10px; margin-top: 12px; overflow-x: auto; padding-bottom: 4px;
  scrollbar-width: none; }
.gal-thumbs::-webkit-scrollbar { display: none; }
.gal-thumb {
  flex-shrink: 0; width: 92px; height: 68px; border-radius: 10px; cursor: pointer;
  background-size: cover; background-position: center; border: 2.5px solid transparent;
  opacity: .68; transition: opacity .18s, border-color .18s; padding: 0;
}
.gal-thumb.active, .gal-thumb:hover { opacity: 1; border-color: var(--gold); }

/* Layout del detalle */
.detail-grid { display: grid; gap: 30px; }
.detail-main h1 { font-size: 1.75rem; margin-top: 8px; }
.detail-price {
  font-size: 2rem; font-weight: 800; margin-top: 14px;
  background: linear-gradient(135deg, var(--gold-dark), var(--gold));
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}

.spec-cards { display: grid; grid-template-columns: repeat(2,1fr); gap: 12px; margin-top: 22px; }
.spec-card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px 12px; text-align: center; box-shadow: var(--shadow-sm); }
.spec-ic { color: var(--gold); margin-bottom: 8px; }
.spec-ic svg { width: 26px; height: 26px; margin: 0 auto; }
.spec-v { font-size: 1.15rem; font-weight: 800; color: var(--navy); }
.spec-l { font-size: .74rem; color: var(--ink-mut); margin-top: 1px; }

.detail-block { margin-top: 34px; }
.detail-block h2 { font-size: 1.2rem; padding-bottom: 10px; border-bottom: 2px solid var(--gold-line); margin-bottom: 14px; }
.detail-block p { color: var(--ink-soft); line-height: 1.75; }

.map-box { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); }
.map-box iframe { width: 100%; height: 280px; border: 0; display: block; }
.map-link { display: block; padding: 12px 14px; font-size: .86rem; font-weight: 600;
  color: var(--gold-dark); background: var(--white); border-top: 1px solid var(--line); }
.map-empty { padding: 40px 20px; text-align: center; color: var(--ink-mut); background: var(--sand); }

/* Tarjeta del asesor */
.detail-side { position: relative; }
.advisor-card {
  background: var(--white); border: 1px solid var(--line); border-top: 3px solid var(--gold);
  border-radius: var(--radius-lg); padding: 22px; box-shadow: var(--shadow);
}
.advisor-top { display: flex; align-items: center; gap: 13px; margin-bottom: 18px; }
.advisor-avatar {
  width: 50px; height: 50px; border-radius: 50%; flex-shrink: 0;
  background: linear-gradient(135deg, var(--gold), var(--gold-dark)); color: #fff;
  display: flex; align-items: center; justify-content: center; font-weight: 700;
}
.advisor-label { font-size: .7rem; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-mut); }
.advisor-name { font-size: 1.05rem; font-weight: 700; }
.share-row { display: flex; gap: 8px; margin-top: 10px; }
.share-row .btn { flex: 1; padding: 11px 8px; font-size: .82rem; }
.share-note { font-size: .78rem; color: var(--gold-dark); margin-top: 10px; min-height: 18px; font-weight: 600; }
.ref-badge { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line);
  font-size: .8rem; color: var(--ink-mut); }
.ref-badge b { color: var(--ink); }

@media (min-width: 768px) {
  .detail-main h1 { font-size: 2.2rem; }
  .detail-price { font-size: 2.4rem; }
  .spec-cards { grid-template-columns: repeat(4,1fr); }
  .gal-thumb { width: 110px; height: 80px; }
}
@media (min-width: 1024px) {
  .detail-grid { grid-template-columns: 1fr 340px; align-items: start; }
  .advisor-card { position: sticky; top: calc(var(--nav-h) + 20px); }
  .gal-main { aspect-ratio: var(--card-aspect); }
}

/* Tarjeta de propiedad enlazada a su página de detalle */
.prop-link { display: block; color: inherit; }
.prop-card .prop-body { padding-bottom: 8px; }
.prop-body-actions { padding: 0 16px 16px; }
.prop-body-actions .prop-actions { margin-top: 0; }

/* ==========================================================================
   v5 — Selector de idioma, sección Únete al equipo, ficha estilo listado
   ========================================================================== */

/* Selector de idioma */
.lang-switch { display: flex; gap: 2px; background: var(--sand); border-radius: 999px; padding: 3px; }
.lang-switch button {
  border: none; background: transparent; cursor: pointer; padding: 6px 11px;
  border-radius: 999px; font-size: .74rem; font-weight: 700; letter-spacing: .04em;
  color: var(--ink-mut); transition: .18s; font-family: inherit;
}
.lang-switch button.active { background: #fff; color: var(--navy); box-shadow: var(--shadow-sm); }

/* Sección Únete al equipo */
.team-grid { display: grid; gap: 26px; }
.team-benefits { display: grid; gap: 14px; }
.benefit {
  display: flex; gap: 14px; align-items: flex-start;
  background: #fff; border: 1px solid rgba(28,39,51,.06); border-radius: var(--radius);
  padding: 16px 18px; box-shadow: var(--shadow-sm);
  transition: transform .24s cubic-bezier(.2,.7,.3,1), box-shadow .24s ease;
}
.benefit:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.benefit-ic {
  width: 40px; height: 40px; flex-shrink: 0; border-radius: 11px;
  background: linear-gradient(135deg, rgba(184,155,103,.18), rgba(140,115,67,.10));
  color: var(--gold-dark); display: flex; align-items: center; justify-content: center;
}
.benefit-ic svg { width: 21px; height: 21px; }
.benefit b { display: block; font-size: .95rem; margin-bottom: 2px; }
.benefit span { font-size: .86rem; color: var(--ink-soft); }

/* Ficha: breadcrumb y franja de specs */
.crumbs { display: flex; flex-wrap: wrap; gap: 6px; align-items: center;
  font-size: .8rem; color: var(--ink-mut); margin-bottom: 14px; }
.crumbs a { color: var(--ink-mut); }
.crumbs a:hover { color: var(--gold-dark); }
.crumbs .sep { opacity: .5; }
.crumbs .cur { color: var(--ink); font-weight: 600; }

.spec-strip {
  display: flex; flex-wrap: wrap; gap: 8px 22px; align-items: center;
  background: #fff; border: 1px solid rgba(28,39,51,.06); border-radius: var(--radius);
  padding: 14px 18px; margin-top: 18px; box-shadow: var(--shadow-sm);
}
.strip-item { display: flex; align-items: center; gap: 7px; font-size: .9rem; color: var(--ink-soft); }
.strip-item svg { width: 18px; height: 18px; color: var(--gold); flex-shrink: 0; }
.strip-item b { color: var(--ink); font-weight: 700; }

/* Lista de características tipo tabla */
.feature-list { display: grid; gap: 0; border: 1px solid rgba(28,39,51,.07);
  border-radius: var(--radius); overflow: hidden; }
.feature-row { display: flex; justify-content: space-between; gap: 16px;
  padding: 12px 16px; font-size: .9rem; }
.feature-row:nth-child(odd) { background: var(--sand-2); }
.feature-row span { color: var(--ink-mut); }
.feature-row b { color: var(--ink); font-weight: 600; text-align: right; }

@media (min-width: 768px) {
  .team-grid { grid-template-columns: 1fr 1fr; align-items: start; }
  .team-benefits { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 1024px) {
  .team-grid { grid-template-columns: 1.05fr .95fr; gap: 40px; }
}

/* Postulaciones en el portal admin */
.applicant-filters { display: flex; gap: 8px; overflow-x: auto; margin: 18px 0; padding-bottom: 4px; scrollbar-width: none; }
.applicant-filters::-webkit-scrollbar { display: none; }
.ap-card { background: #fff; border: 1px solid rgba(28,39,51,.08); border-left: 3px solid var(--gold);
  border-radius: var(--radius); padding: 16px 18px; margin-bottom: 12px; box-shadow: var(--shadow-sm); }
.ap-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.ap-head b { font-size: 1rem; }
.ap-meta { font-size: .78rem; color: var(--ink-mut); margin-top: 3px; }
.ap-estado { font-size: .7rem; font-weight: 700; padding: 5px 11px; border-radius: 999px;
  white-space: nowrap; background: var(--sand); color: var(--ink-soft); }
.est-nuevo { background: #e8f0fb; color: #1e5fa8; }
.est-contactado { background: #fdf3e0; color: #96660d; }
.est-entrevista { background: #ece6f8; color: #5b3ca8; }
.est-aceptado { background: #e7f6ec; color: #1d6b34; }
.est-descartado { background: #f4f4f4; color: #777; }
.ap-contact { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 10px; font-size: .86rem; }
.ap-contact a { color: var(--gold-dark); font-weight: 600; }
.ap-msg { margin-top: 10px; font-size: .88rem; color: var(--ink-soft);
  background: var(--sand-2); padding: 10px 12px; border-radius: 10px; }
.ap-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px;
  padding-top: 12px; border-top: 1px solid var(--line); }
.ap-btn { border: 1px solid var(--gold-line); background: #fff; color: var(--ink-soft);
  font-size: .75rem; font-weight: 600; padding: 6px 12px; border-radius: 999px;
  cursor: pointer; font-family: inherit; transition: .16s; }
.ap-btn:hover { border-color: var(--gold); color: var(--gold-dark); }
.ap-btn.on { background: var(--navy); color: #fff; border-color: var(--navy); }

/* Configuración del portal */
.cfg-block { margin-top: 20px; }
.cfg-label { display: block; font-size: .78rem; font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase; color: var(--ink-mut); margin-bottom: 5px; }
.cfg-help { font-size: .84rem; color: var(--ink-soft); margin-bottom: 10px; }
.cfg-block input[type=text], .cfg-block input[type=email] {
  width: 100%; padding: 12px 14px; border: 1.5px solid var(--line);
  border-radius: var(--radius); outline: none; font-family: inherit; }
.cfg-block input:focus { border-color: var(--gold); }
.cfg-range { width: 100%; accent-color: var(--gold-dark); }
.cfg-range-val { font-size: .82rem; color: var(--ink-mut); margin-top: 4px; }

.aspect-picker { display: flex; gap: 10px; flex-wrap: wrap; }
.aspect-picker button {
  flex: 1; min-width: 92px; background: #fff; border: 2px solid var(--line);
  border-radius: var(--radius); padding: 14px 10px; cursor: pointer; font-family: inherit;
  font-size: .84rem; font-weight: 600; color: var(--ink-soft);
  display: flex; flex-direction: column; align-items: center; gap: 7px; transition: .18s;
}
.aspect-picker button:hover { border-color: var(--gold-line); }
.aspect-picker button.on { border-color: var(--gold); background: #fffdf7; color: var(--gold-dark); }
.aspect-picker small { font-size: .72rem; color: var(--ink-mut); font-weight: 500; }
.ap-box { display: block; background: linear-gradient(135deg, var(--gold-light), var(--gold));
  border-radius: 4px; }
.ar-1-1 { width: 40px; height: 40px; }
.ar-4-3 { width: 48px; height: 36px; }
.ar-16-9 { width: 56px; height: 31px; }

.hero-preview {
  margin-top: 12px; height: 150px; border-radius: var(--radius);
  background-size: cover; background-color: var(--sand);
  border: 1px solid var(--line); position: relative; overflow: hidden;
}
.hero-preview::after {
  content: 'Vista previa del banner'; position: absolute; left: 14px; bottom: 12px;
  color: #fff; font-size: .78rem; font-weight: 700; text-shadow: 0 1px 6px rgba(0,0,0,.7);
}
.cfg-actions { display: flex; align-items: center; gap: 14px; margin-top: 20px; flex-wrap: wrap; }
.cfg-msg { font-size: .86rem; font-weight: 600; }
.cfg-msg.ok { color: #1d6b34; }
.cfg-msg.error { color: #a02020; }

/* ==========================================================================
   PORTAL — Tablas, modal de formularios, controles
   ========================================================================== */
.panel-head { display: flex; justify-content: space-between; align-items: flex-start;
  gap: 16px; flex-wrap: wrap; margin-bottom: 6px; }
.panel-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.panel-actions .btn { padding: 10px 16px; font-size: .84rem; }
.loading-txt { padding: 24px 0; color: var(--ink-mut); }

/* Tabla */
.tbl { border: 1px solid rgba(28,39,51,.08); border-radius: var(--radius); overflow: hidden; margin-top: 16px; }
.tbl-head, .tbl-row { display: grid; grid-template-columns: 2.2fr .9fr 1.1fr .7fr 1.3fr;
  gap: 12px; align-items: center; padding: 12px 14px; }
.tbl-head { background: var(--navy); color: #fff; font-size: .74rem; font-weight: 700;
  letter-spacing: .06em; text-transform: uppercase; }
.tbl-row { border-top: 1px solid var(--line); font-size: .88rem; }
.tbl-row:nth-child(even) { background: var(--sand-2); }
.tbl-sub { font-size: .76rem; color: var(--ink-mut); margin-top: 2px; }
.row-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.mini-btn { border: 1px solid var(--gold-line); background: #fff; color: var(--ink-soft);
  font-size: .76rem; font-weight: 600; padding: 6px 11px; border-radius: 8px;
  cursor: pointer; font-family: inherit; transition: .16s; }
.mini-btn:hover { border-color: var(--gold); color: var(--gold-dark); }
.mini-btn.danger:hover { border-color: #d46a6a; color: #a02020; }
.mini-sel { padding: 6px 8px; border: 1px solid var(--line); border-radius: 8px;
  font-family: inherit; font-size: .8rem; background: #fff; }
.star-btn { border: none; background: none; cursor: pointer; font-size: 1.2rem;
  color: #d8d2c6; padding: 2px 6px; transition: .16s; }
.star-btn.on { color: var(--gold); }
.role-tag { font-size: .7rem; font-weight: 700; padding: 4px 10px; border-radius: 999px; }
.role-tag.adm { background: var(--navy); color: var(--gold-light); }
.role-tag.agt { background: var(--sand); color: var(--ink-soft); }

/* Modal de formularios del portal */
.pmodal-backdrop { position: fixed; inset: 0; background: rgba(18,26,34,.6);
  backdrop-filter: blur(3px); z-index: 300; display: none;
  align-items: center; justify-content: center; padding: 16px; }
.pmodal-backdrop.open { display: flex; }
.pmodal { background: #fff; width: 100%; max-width: 720px; max-height: 92vh;
  border-radius: var(--radius-lg); box-shadow: var(--shadow-lg);
  display: flex; flex-direction: column; overflow: hidden; }
.pmodal-head { display: flex; justify-content: space-between; align-items: center;
  padding: 18px 22px; border-bottom: 1px solid var(--line); }
.pmodal-head h3 { font-size: 1.1rem; }
.pmodal-body { padding: 20px 22px; overflow-y: auto; flex: 1; }
.pmodal-foot { display: flex; justify-content: flex-end; align-items: center; gap: 10px;
  padding: 14px 22px; border-top: 1px solid var(--line); background: var(--sand-2); flex-wrap: wrap; }
.pmodal-foot .cfg-msg { margin-right: auto; }
.pmodal-foot .btn { padding: 10px 18px; font-size: .88rem; }

.fgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.fgrid .span2 { grid-column: 1 / -1; }
.fgrid .field input, .fgrid .field select, .fgrid .field textarea {
  width: 100%; padding: 10px 12px; border: 1.5px solid var(--line);
  border-radius: 10px; font-family: inherit; font-size: .9rem; outline: none; }
.fgrid .field input:focus, .fgrid .field select:focus, .fgrid .field textarea:focus { border-color: var(--gold); }
.fgrid .field input:disabled { background: var(--sand-2); color: var(--ink-mut); }
.fgrid label { display: block; font-size: .74rem; font-weight: 700; letter-spacing: .05em;
  text-transform: uppercase; color: var(--ink-mut); margin-bottom: 5px; }
.chk { display: flex !important; align-items: center; gap: 9px; text-transform: none !important;
  font-size: .88rem !important; letter-spacing: 0 !important; color: var(--ink) !important; font-weight: 600 !important; }
.chk input { width: auto !important; }

@media (max-width: 767px) {
  .tbl-head { display: none; }
  .tbl-row { grid-template-columns: 1fr; gap: 8px; padding: 14px; }
  .fgrid { grid-template-columns: 1fr; }
}

/* Logo: marca compacta en móvil, logo completo desde tablet */
.nav-logo { flex-shrink: 0; }          /* evita que el flex lo comprima */
.nav-logo img { flex-shrink: 0; }
.nav-logo .logo-mark { height: 38px; width: auto; display: block; }
.nav-logo .logo-full { display: none; }
.nav-cta { flex-shrink: 0; }
.nav-links { flex-shrink: 1; min-width: 0; }

@media (min-width: 768px) {
  .nav-logo .logo-mark { display: none; }
  .nav-logo .logo-full { display: block; height: 46px; width: auto; }
}

/* ==========================================================================
   HERO — texto más arriba en móvil + aparición deslizante
   ========================================================================== */

/* En móvil el texto se alinea arriba en vez de al centro */
.hero { align-items: flex-start; padding-top: calc(var(--nav-h) + 108px); }

/* Aparición deslizante de izquierda a derecha (escalonada) */
.hero .reveal {
  display: inline-block;
  opacity: 0;
  transform: translateX(-44px);
  transition: opacity .70s cubic-bezier(.22,.7,.28,1),
              transform .70s cubic-bezier(.22,.7,.28,1);
}
.hero .lead.reveal { display: block; }
.hero.in-view .reveal { opacity: 1; transform: translateX(0); }

/* Escalonado: cada línea entra un poco después que la anterior */
.hero.in-view .eyebrow.reveal      { transition-delay: .05s; }
.hero.in-view h1 span.reveal:first-child { transition-delay: .18s; }
.hero.in-view h1 span.accent.reveal      { transition-delay: .31s; }
.hero.in-view .lead.reveal         { transition-delay: .44s; }

/* Accesibilidad: sin animación si el usuario la desactivó en su sistema */
@media (prefers-reduced-motion: reduce) {
  .hero .reveal { opacity: 1; transform: none; transition: none; }
}

@media (min-width: 768px) {
  .hero { align-items: center; padding-top: calc(var(--nav-h) + 46px); }
}

/* Badge de versión — exclusivo del Portal Admin */
.version-badge {
  position: fixed; right: 14px; bottom: 12px; z-index: 60;
  display: flex; align-items: center; gap: 6px;
  background: rgba(28,39,51,.86); color: rgba(255,255,255,.72);
  font-size: .68rem; font-weight: 600; letter-spacing: .04em;
  padding: 5px 11px; border-radius: 999px;
  backdrop-filter: blur(6px); pointer-events: none;
  opacity: .55; transition: opacity .2s;
  font-variant-numeric: tabular-nums;
}
.version-badge:hover { opacity: 1; }
.vb-env { font-size: .62rem; font-weight: 800; letter-spacing: .08em;
  padding: 2px 6px; border-radius: 999px; background: var(--gold); color: #1C2733; }
.vb-env:empty { display: none; }

/* Zona de subida y miniaturas */
.dropzone {
  border: 2px dashed var(--gold-line); border-radius: var(--radius);
  background: var(--sand-2); padding: 26px 18px; text-align: center;
  cursor: pointer; transition: .18s; color: var(--gold-dark);
  display: flex; flex-direction: column; align-items: center; gap: 7px;
}
.dropzone:hover, .dropzone.over { border-color: var(--gold); background: #fffdf6; }
.dropzone.over { transform: scale(1.01); }
.dropzone svg { width: 30px; height: 30px; }
.dropzone b { font-size: .92rem; color: var(--ink); }
.dropzone span { font-size: .8rem; color: var(--ink-mut); }
.dropzone.small { padding: 16px; }
.dropzone.small svg { width: 22px; height: 22px; }

.thumbs { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.thumb {
  position: relative; width: 108px; height: 81px; border-radius: 10px;
  background-size: cover; background-position: center;
  border: 1px solid rgba(28,39,51,.12); overflow: hidden;
}
.thumb-cover {
  position: absolute; left: 5px; top: 5px; background: var(--navy); color: var(--gold-light);
  font-size: .6rem; font-weight: 800; letter-spacing: .05em; padding: 3px 7px; border-radius: 5px;
}
.thumb-acts { position: absolute; right: 4px; bottom: 4px; display: flex; gap: 3px; }
.thumb-acts button {
  width: 22px; height: 22px; border: none; border-radius: 5px; cursor: pointer;
  background: rgba(255,255,255,.92); color: var(--navy); font-size: .9rem; line-height: 1;
  display: flex; align-items: center; justify-content: center; font-family: inherit;
}
.thumb-acts button:hover { background: #fff; }
.thumb-acts .del { background: rgba(190,60,60,.92); color: #fff; }

.up-status { font-size: .82rem; font-weight: 600; margin-top: 8px; min-height: 18px; }
.up-status.working { color: var(--gold-dark); }
.up-status.ok { color: #1d6b34; }
.up-status.error { color: #a02020; }

/* Etiqueta superior del hero: más presente que las de sección */
.hero .eyebrow { font-size: .95rem; letter-spacing: .14em; }
@media (min-width: 768px) { .hero .eyebrow { font-size: 1.05rem; } }

/* ==========================================================================
   PÁGINAS LEGALES (Términos y Condiciones)
   ========================================================================== */
.legal { padding: calc(var(--nav-h) + 40px) 0 70px; background: var(--sand-2); }
.legal .container { max-width: 880px; }

.legal-head { text-align: center; padding: 34px 20px 30px; background: #fff;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  border: 1px solid rgba(28,39,51,.07); border-bottom: none; }
.legal-logo { height: 96px; width: auto; margin: 0 auto 20px; }
.legal-head h1 { font-size: 1.9rem; letter-spacing: -.01em; }
.legal-sub { color: var(--ink-soft); font-size: .95rem; margin-top: 10px; line-height: 1.6; }
.legal-meta { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 26px;
  margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--gold-line);
  font-size: .8rem; color: var(--ink-mut); }
.legal-meta b { color: var(--ink); font-weight: 600; }

.legal-body { background: #fff; padding: 34px 26px 40px;
  border: 1px solid rgba(28,39,51,.07); border-top: none;
  border-radius: 0 0 var(--radius-lg) var(--radius-lg); box-shadow: var(--shadow); }

.legal-note { background: #fffaf0; border: 1px solid #efdcb4; border-left: 4px solid var(--gold);
  border-radius: var(--radius); padding: 14px 18px; margin-bottom: 30px; font-size: .88rem;
  color: #6b5620; line-height: 1.65; }
.legal-note b { display: block; margin-bottom: 4px; color: var(--gold-dark); }

.legal-sec { margin-bottom: 32px; scroll-margin-top: 90px; }
.legal-sec h2 { font-size: 1.12rem; color: var(--navy); margin-bottom: 12px;
  padding-bottom: 9px; border-bottom: 1px solid var(--gold-line);
  display: flex; align-items: baseline; gap: 10px; }
.legal-sec h2 span { color: var(--gold); font-weight: 800; font-size: 1rem; flex-shrink: 0; }
.legal-sec p { color: var(--ink-soft); font-size: .93rem; line-height: 1.78; margin-bottom: 12px; }
.legal-sec b { color: var(--ink); font-weight: 600; }
.legal-sec ul { margin: 0 0 14px; padding-left: 4px; list-style: none; }
.legal-sec li { position: relative; padding-left: 22px; margin-bottom: 9px;
  color: var(--ink-soft); font-size: .93rem; line-height: 1.72; }
.legal-sec li::before { content: ''; position: absolute; left: 4px; top: 10px;
  width: 6px; height: 6px; border-radius: 50%; background: var(--gold); }

/* Secciones de exoneración: se destacan por su importancia */
.legal-sec.destacada { background: var(--sand-2); border-left: 3px solid var(--gold);
  border-radius: var(--radius); padding: 20px 22px 8px; }
.legal-sec.destacada h2 { border-bottom-color: rgba(184,155,103,.45); }

.legal-data { display: grid; gap: 1px; background: rgba(28,39,51,.08);
  border: 1px solid rgba(28,39,51,.08); border-radius: var(--radius); overflow: hidden; margin-top: 6px; }
.legal-data div { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px;
  background: #fff; padding: 11px 15px; font-size: .89rem; }
.legal-data span { color: var(--ink-mut); }
.legal-data b { color: var(--ink); font-weight: 600; text-align: right; }

.legal-foot { margin-top: 40px; padding-top: 26px; border-top: 2px solid var(--gold-line);
  text-align: center; }
.legal-foot p { color: var(--ink-soft); font-size: .92rem; line-height: 1.75; margin-bottom: 20px; }

@media (min-width: 768px) {
  .legal-head { padding: 46px 40px 36px; }
  .legal-head h1 { font-size: 2.3rem; }
  .legal-body { padding: 44px 52px 52px; }
  .legal-sec h2 { font-size: 1.22rem; }
}

/* Impresión limpia */
@media print {
  .nav, .footer, .wa-float, .legal-foot .btn { display: none !important; }
  .legal { padding: 0; background: #fff; }
  .legal-body, .legal-head { box-shadow: none; border: none; }
  .legal-sec { page-break-inside: avoid; }
}

/* ---------------------------------------------------------------------------
   Fotos de perfil de asesores (v7.9)
   Los circulos ya existian con iniciales; estas reglas los preparan para
   contener una imagen sin deformarla. object-fit:cover recorta al centro.
--------------------------------------------------------------------------- */
.advisor-avatar.has-photo,
.portal-user .avatar.has-photo { background: var(--line); padding: 0; overflow: hidden; }
.advisor-avatar img,
.portal-user .avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Pantalla "Mi perfil" */
.perfil-grid { display: grid; grid-template-columns: 160px 1fr; gap: 24px; align-items: start; }
.perfil-foto { text-align: center; }
.perfil-foto .circulo {
  width: 140px; height: 140px; border-radius: 50%; margin: 0 auto 12px;
  background: linear-gradient(135deg, var(--gold), var(--gold-dark));
  color: #fff; font-weight: 700; font-size: 2.4rem; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
}
.perfil-foto .circulo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.perfil-foto .drop {
  border: 2px dashed var(--line); border-radius: 12px; padding: 12px 8px;
  font-size: .78rem; color: var(--ink-mut); cursor: pointer; transition: .15s;
}
.perfil-foto .drop:hover, .perfil-foto .drop.over { border-color: var(--gold); background: #fdfbf7; }
@media (max-width: 640px) {
  .perfil-grid { grid-template-columns: 1fr; }
}
