/* ============================================================
   REDISEÑO 2026 — Realtor Fabi Campos
   Menú lateral izquierdo + componentes nuevos (reels, redes).
   Se carga DESPUÉS de css/style.css, así que sus reglas mandan.
   ============================================================ */

:root {
  --azul: #013765;
  --azul-oscuro: #012133;
  --naranja: #e05304;
  --naranja-hover: #c44a04;
  --tinta: #183447;
  --texto: #4a5d6b;
  --gris-claro: #f4f8fa;
  --linea: #dce6ee;

  --sb-w: 272px;          /* ancho del menú lateral en escritorio */
  --sb-topbar: 60px;      /* alto de la barra superior en móvil */
}

/* ============================================================
   1. DESPLAZAMIENTO DEL CONTENIDO
   ============================================================ */
html { scroll-behavior: smooth; }

body.sb-on {
  padding-left: var(--sb-w);
  overflow-x: hidden;
}

/* ============================================================
   2. MENÚ LATERAL
   ============================================================ */
.sb {
  position: fixed;
  top: 0;
  left: 0;
  width: var(--sb-w);
  height: 100vh;
  z-index: 900;
  display: flex;
  flex-direction: column;
  background: linear-gradient(180deg, var(--azul) 0%, var(--azul-oscuro) 100%);
  border-right: 1px solid rgba(255, 255, 255, .07);
  font-family: 'League Spartan', 'Montserrat', sans-serif;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.sb::-webkit-scrollbar { width: 6px; }
.sb::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, .16); border-radius: 3px; }

/* --- Marca --- */
.sb-brand {
  display: block;
  padding: 30px 24px 26px;
  text-decoration: none;
  border-bottom: 1px solid rgba(255, 255, 255, .08);
}

.sb-brand b {
  display: block;
  color: #fff;
  font-size: 21px;
  font-weight: 900;
  letter-spacing: .4px;
  line-height: 1.1;
}

.sb-brand b em {
  font-style: normal;
  color: var(--naranja);
}

.sb-brand small {
  display: block;
  margin-top: 7px;
  color: rgba(255, 255, 255, .55);
  font-family: 'Montserrat', sans-serif;
  font-size: 11px;
  font-weight: 500;
  line-height: 1.5;
}

/* --- Lista de navegación --- */
.sb-nav {
  list-style: none;
  margin: 0;
  padding: 16px 12px 8px;
  flex: 1 1 auto;
}

.sb-nav li { margin: 1px 0; }

.sb-nav a,
.sb-group > button {
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  padding: 11px 13px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: rgba(255, 255, 255, .74);
  font-family: 'League Spartan', sans-serif;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: .2px;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
  transition: background .18s ease, color .18s ease;
}

.sb-nav a:hover,
.sb-group > button:hover {
  background: rgba(255, 255, 255, .08);
  color: #fff;
}

.sb-nav a:focus-visible,
.sb-group > button:focus-visible,
.sb-lang:focus-visible,
.sb-cta:focus-visible {
  outline: 2px solid var(--naranja);
  outline-offset: 2px;
}

.sb-ico {
  width: 17px;
  height: 17px;
  flex: 0 0 17px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: .85;
}

/* Página activa: barra naranja + texto blanco */
.sb-nav a.is-active {
  position: relative;
  background: rgba(224, 83, 4, .16);
  color: #fff;
  font-weight: 700;
}

.sb-nav a.is-active::before {
  content: '';
  position: absolute;
  left: -12px;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 22px;
  border-radius: 0 3px 3px 0;
  background: var(--naranja);
}

.sb-nav a.is-active .sb-ico { opacity: 1; color: var(--naranja); }

.sb-ext {
  margin-left: auto;
  font-size: 11px;
  opacity: .45;
}

/* --- Grupo desplegable --- */
.sb-caret {
  margin-left: auto;
  width: 13px;
  height: 13px;
  flex: 0 0 13px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform .22s ease;
}

.sb-group.is-open > button .sb-caret { transform: rotate(90deg); }
.sb-group.is-open > button { color: #fff; }

.sb-sub {
  list-style: none;
  margin: 2px 0 6px;
  padding: 0 0 0 28px;
  max-height: 0;
  overflow: hidden;
  transition: max-height .26s ease;
}

.sb-group.is-open .sb-sub { max-height: 320px; }

.sb-sub a {
  padding: 8px 12px;
  font-size: 14px;
  font-weight: 500;
  color: rgba(255, 255, 255, .6);
}

.sb-sub a.is-active::before { display: none; }
.sb-sub a.is-active { background: rgba(224, 83, 4, .2); }

/* --- Pie del menú: licencia, idioma, WhatsApp --- */
.sb-foot {
  padding: 18px 20px 24px;
  border-top: 1px solid rgba(255, 255, 255, .08);
}

.sb-seal {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 16px;
}

.sb-seal svg {
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
  margin-top: 1px;
  stroke: var(--naranja);
  fill: none;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.sb-seal div {
  font-family: 'Montserrat', sans-serif;
  font-size: 10.5px;
  line-height: 1.55;
  color: rgba(255, 255, 255, .5);
}

.sb-seal strong {
  display: block;
  font-family: 'League Spartan', sans-serif;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .3px;
  color: #fff;
}

.sb-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 14px;
  border-radius: 10px;
  background: var(--naranja);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .3px;
  text-decoration: none;
  transition: background .18s ease;
}

.sb-cta:hover { background: var(--naranja-hover); }
.sb-cta svg { width: 16px; height: 16px; fill: currentColor; }

.sb-lang {
  display: block;
  margin-bottom: 10px;
  padding: 9px 14px;
  border: 1px solid rgba(255, 255, 255, .22);
  border-radius: 10px;
  color: rgba(255, 255, 255, .85) !important;
  background: transparent;
  font-family: 'League Spartan', sans-serif;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: .8px;
  text-align: center;
  text-decoration: none;
  transition: background .18s ease;
}

.sb-lang:hover { background: rgba(255, 255, 255, .1); }

/* ============================================================
   3. BARRA SUPERIOR Y CAJÓN EN MÓVIL
   ============================================================ */
.sb-topbar {
  display: none;
  position: sticky;
  top: 0;
  z-index: 880;
  align-items: center;
  gap: 12px;
  height: var(--sb-topbar);
  padding: 0 16px;
  background: var(--azul);
  box-shadow: 0 2px 14px rgba(1, 42, 77, .3);
}

.sb-burger {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  padding: 0 7px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  cursor: pointer;
}

.sb-burger span {
  display: block;
  height: 2px;
  border-radius: 2px;
  background: #fff;
  transition: transform .24s ease, opacity .2s ease;
}

.sb-burger:focus-visible { outline: 2px solid var(--naranja); outline-offset: 1px; }

body.sb-open .sb-burger span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
body.sb-open .sb-burger span:nth-child(2) { opacity: 0; }
body.sb-open .sb-burger span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.sb-topbar-brand {
  color: #fff;
  font-family: 'League Spartan', sans-serif;
  font-size: 16px;
  font-weight: 900;
  letter-spacing: .4px;
  text-decoration: none;
}

.sb-topbar-brand em { font-style: normal; color: var(--naranja); }

.sb-scrim {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 890;
  background: rgba(1, 33, 51, .55);
  opacity: 0;
  transition: opacity .24s ease;
}

@media (max-width: 1080px) {
  body.sb-on { padding-left: 0; }

  .sb-topbar { display: flex; }

  .sb {
    transform: translateX(-100%);
    transition: transform .28s ease;
    box-shadow: 0 0 40px rgba(1, 33, 51, .4);
    width: min(300px, 84vw);
  }

  body.sb-open .sb { transform: translateX(0); }
  body.sb-open .sb-scrim { display: block; opacity: 1; }
  body.sb-open { overflow: hidden; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .sb, .sb-scrim, .sb-sub, .sb-caret, .sb-burger span { transition: none; }
}

/* ============================================================
   4. GALERÍA DE REELS (3 columnas × 2 filas)
   ============================================================ */
.reels {
  margin-top: 34px;
}

.reels-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding-bottom: 14px;
  margin-bottom: 22px;
  border-bottom: 1px solid var(--linea);
}

.reels-head h3 {
  margin: 0;
  font-family: 'League Spartan', sans-serif;
  font-size: 22px;
  font-weight: 800;
  color: var(--azul);
}

.reels-head p {
  margin: 0;
  font-family: 'Montserrat', sans-serif;
  font-size: 13.5px;
  color: var(--texto);
}

.reels-head a {
  font-family: 'League Spartan', sans-serif;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--naranja);
  text-decoration: none;
  white-space: nowrap;
}

.reels-head a:hover { text-decoration: underline; }

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

.reel {
  position: relative;
  overflow: hidden;
  border-radius: 14px;
  background: #eef3f7;
  border: 1px solid var(--linea);
  box-shadow: 0 8px 22px rgba(1, 55, 101, .07);
}

/* Proporción vertical propia de un reel */
.reel-frame {
  position: relative;
  width: 100%;
  padding-top: 158%;
}

.reel-frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

/* Variante horizontal para YouTube */
.reel--wide .reel-frame { padding-top: 56.25%; }
.reel--wide { border-radius: 14px; }

.reel-link {
  display: block;
  padding: 11px 14px;
  border-top: 1px solid var(--linea);
  background: #fff;
  font-family: 'Montserrat', sans-serif;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--azul);
  text-decoration: none;
}

.reel-link:hover { color: var(--naranja); }

@media (max-width: 900px) {
  .reels-grid { grid-template-columns: repeat(2, 1fr); gap: 16px; }
}

@media (max-width: 560px) {
  .reels-grid { grid-template-columns: 1fr; }
  .reel-frame { padding-top: 128%; }
}

/* ============================================================
   5. PÁGINA DE REDES SOCIALES
   ============================================================ */
.sm-block {
  padding: 62px 0;
  border-bottom: 1px solid var(--linea);
}

.sm-block:last-of-type { border-bottom: 0; }

.sm-head {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.sm-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 54px;
  height: 54px;
  flex: 0 0 54px;
  border-radius: 15px;
  color: #fff;
}

.sm-badge svg { width: 27px; height: 27px; fill: currentColor; }

.sm-badge--ig { background: linear-gradient(135deg, #f9ce34 0%, #ee2a7b 48%, #6228d7 100%); }
.sm-badge--fb { background: #1877f2; }
.sm-badge--yt { background: #ff0000; }
.sm-badge--tt { background: #010101; }

.sm-titles h2 {
  margin: 0;
  font-family: 'League Spartan', sans-serif;
  font-size: 27px;
  font-weight: 800;
  color: var(--azul);
  line-height: 1.15;
}

.sm-titles a {
  font-family: 'Montserrat', sans-serif;
  font-size: 14px;
  font-weight: 600;
  color: var(--naranja);
  text-decoration: none;
}

.sm-titles a:hover { text-decoration: underline; }

.sm-follow {
  margin-left: auto;
  padding: 11px 22px;
  border-radius: 999px;
  background: var(--azul);
  color: #fff;
  font-family: 'League Spartan', sans-serif;
  font-size: 13.5px;
  font-weight: 700;
  letter-spacing: .4px;
  text-decoration: none;
  white-space: nowrap;
  transition: background .18s ease;
}

.sm-follow:hover { background: var(--naranja); }

.sm-desc {
  max-width: 68ch;
  margin: 0 0 26px;
  font-family: 'Montserrat', sans-serif;
  font-size: 15px;
  line-height: 1.75;
  color: var(--texto);
}

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

.sm-grid--two { grid-template-columns: repeat(2, 1fr); max-width: 860px; }

@media (max-width: 900px) {
  .sm-grid, .sm-grid--two { grid-template-columns: repeat(2, 1fr); gap: 16px; }
  .sm-follow { margin-left: 0; }
}

@media (max-width: 560px) {
  .sm-grid, .sm-grid--two { grid-template-columns: 1fr; }
}

/* --- Bloque de contacto al pie de la página de redes --- */
.sm-contact {
  padding: 66px 0 72px;
  background: linear-gradient(150deg, var(--azul) 0%, var(--azul-oscuro) 100%);
  color: #fff;
}

.sm-contact-in {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
}

.sm-contact h2 {
  margin: 0 0 10px;
  font-family: 'League Spartan', sans-serif;
  font-size: clamp(26px, 3.4vw, 38px);
  font-weight: 900;
  line-height: 1.12;
}

.sm-contact > .sm-contact-in > p {
  max-width: 62ch;
  margin: 0 0 34px;
  font-family: 'Montserrat', sans-serif;
  font-size: 16px;
  line-height: 1.75;
  color: rgba(255, 255, 255, .78);
}

.sm-contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 18px;
}

.sm-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 24px 26px;
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 16px;
  background: rgba(255, 255, 255, .06);
  text-decoration: none;
  transition: background .18s ease, border-color .18s ease;
}

.sm-card:hover {
  background: rgba(255, 255, 255, .11);
  border-color: rgba(224, 83, 4, .6);
}

.sm-card svg {
  width: 26px;
  height: 26px;
  flex: 0 0 26px;
  stroke: var(--naranja);
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.sm-card span {
  display: block;
  font-family: 'Montserrat', sans-serif;
  font-size: 12px;
  color: rgba(255, 255, 255, .6);
  margin-bottom: 3px;
}

.sm-card strong {
  font-family: 'League Spartan', sans-serif;
  font-size: 17px;
  font-weight: 700;
  color: #fff;
  letter-spacing: .2px;
  word-break: break-word;
}

/* ============================================================
   6. AJUSTES FINOS SOBRE EL DISEÑO EXISTENTE
   ============================================================ */
.pg-card { transition: transform .2s ease, box-shadow .2s ease; }
.pg-card:hover { transform: translateY(-3px); box-shadow: 0 16px 38px rgba(1, 55, 101, .12); }

.pg-btn { border: 0; cursor: pointer; }

/* El burbujeo de WhatsApp no debe quedar debajo del cajón móvil */
.wa-bubble { z-index: 860; }

/* ============================================================
   7. MINIATURAS DE YOUTUBE
   ============================================================ */
.sm-thumb {
  display: block;
  text-decoration: none;
  overflow: hidden;
  border-radius: 14px;
  border: 1px solid var(--linea);
  background: #fff;
  box-shadow: 0 8px 22px rgba(1, 55, 101, .07);
  transition: transform .2s ease, box-shadow .2s ease;
}

.sm-thumb:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 34px rgba(1, 55, 101, .14);
}

.sm-thumb-img {
  position: relative;
  display: block;
  padding-top: 56.25%;
  background: #0d1b26;
}

.sm-thumb-img img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.sm-play {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 62px;
  height: 44px;
  border-radius: 11px;
  background: rgba(255, 0, 0, .92);
  box-shadow: 0 6px 18px rgba(0, 0, 0, .3);
  transition: background .18s ease, transform .18s ease;
}

.sm-play::after {
  content: '';
  border-style: solid;
  border-width: 9px 0 9px 15px;
  border-color: transparent transparent transparent #fff;
  margin-left: 3px;
}

.sm-thumb:hover .sm-play {
  background: #ff0000;
  transform: translate(-50%, -50%) scale(1.06);
}

.sm-thumb-cap {
  display: block;
  padding: 14px 16px 16px;
  font-family: 'Montserrat', sans-serif;
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.5;
  color: var(--azul);
}

.sm-thumb:hover .sm-thumb-cap { color: var(--naranja); }

/* ============================================================
   8. CABECERA Y PIE DE LA PÁGINA DE REDES
   ============================================================ */
.sm-hero {
  background: linear-gradient(135deg, var(--azul) 0%, #012a4a 100%);
  color: #fff;
  text-align: center;
  padding: 76px 20px 68px;
}

.sm-hero span.pg-eyebrow {
  display: block;
  margin-bottom: 14px;
  font-family: 'League Spartan', sans-serif;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--naranja);
}

.sm-hero h1 {
  max-width: 840px;
  margin: 0 auto 16px;
  font-family: 'League Spartan', sans-serif;
  font-size: clamp(30px, 4.2vw, 50px);
  font-weight: 900;
  line-height: 1.12;
}

.sm-hero h1 em { font-style: normal; color: var(--naranja); }

.sm-hero p {
  max-width: 720px;
  margin: 0 auto;
  font-family: 'Montserrat', sans-serif;
  font-size: 16px;
  line-height: 1.7;
  color: #dbe4ee;
}

.sm-wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
}
