/* ===========================================================
   Natalia Randazzo — RE/MAX Premium II
   Página pública — hoja de estilos
   Paleta: neutros cálidos + RE/MAX rojo como acento principal,
   RE/MAX azul como detalle puntual (institucional).
=========================================================== */

@import url('https://fonts.googleapis.com/css2?family=Newsreader:ital,wght@0,400;0,500;0,600;1,400&family=Work+Sans:wght@400;500;600&display=swap');

:root{
  --bg:#FAF8F5;
  --bg-alt:#F1ECE6;
  --ink:#211E1B;
  --ink-soft:#5B564F;
  --muted:#8A8378;
  --line:#E4DED5;
  --white:#FFFFFF;

  /* ---- Tema del cliente (Keytrail) ----
     Estos son los valores del preset RE/MAX. tema.js los pisa cuando el
     cliente tiene otro tema (calcula los tonos a partir de sus 2 colores). */
  --primary:#DC1C2E;
  --primary-dark:#B4172A;
  --primary-soft:#FDECEE;
  --primary-soft-2:#FAD9DD;
  --primary-border:#F3C7CB;
  --primary-light:#F3A6AD;
  --primary-a00:rgba(220,28,46,0);
  --primary-a30:rgba(220,28,46,.3);
  --primary-a35:rgba(220,28,46,.35);
  --primary-a45:rgba(220,28,46,.45);
  --on-primary:#FFFFFF;
  --secondary:#003DA5;
  --secondary-dark:#00358F;
  --secondary-deep:#000A28;
  --secondary-soft:#EEF2FA;
  --secondary-soft-2:#E3EAF7;
  --secondary-light:#C9D6F0;
  --secondary-a15:rgba(0,61,165,.15);
  --secondary-a60:rgba(0,61,165,.6);
  --on-secondary:#FFFFFF;

  /* Estados: fijos para todos los clientes */
  --error:#A3241C;
  --error-bg:#FBE9E7;
  --error-border:#F2C4BE;

  /* Nombres viejos (compatibilidad) */
  --red: var(--primary);
  --red-dark: var(--primary-dark);
  --blue: var(--secondary);

  --font-display: 'Newsreader', Georgia, 'Times New Roman', serif;
  --font-body: 'Work Sans', system-ui, -apple-system, sans-serif;

  --wrap: 1280px;
}

*, *::before, *::after{ box-sizing: border-box; }

html{ scroll-behavior: smooth; scroll-padding-top: 96px; }  /* que el menú fijo no tape el título al ir a una sección */

body{
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3{
  font-family: var(--font-display);
  font-weight: 500;
  margin: 0;
}

p{ margin: 0; }

a{ color: var(--primary); text-decoration: none; }
a:hover{ color: var(--primary-dark); }

img{ max-width: 100%; display: block; }

ul{ margin: 0; padding: 0; list-style: none; }

button{ font-family: inherit; border: none; background: none; cursor: pointer; }

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

.eyebrow{
  font-size: 12px;
  letter-spacing: .16em;
  text-transform: uppercase;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 10px;
}

.eyebrow::before{
  content: "";
  display: inline-block;
  width: 20px;
  height: 2px;
  background: var(--primary);
}

.btn{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 48px;
  padding: 0 24px;
  border-radius: 2px;
  font-weight: 600;
  font-size: 14.5px;
  letter-spacing: .01em;
  cursor: pointer;
  transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}

.btn-primary{ background: var(--primary); color: var(--on-primary); }
.btn-primary:hover{ background: var(--primary-dark); color: var(--on-primary); }

.btn-outline{ background: transparent; border: 1px solid var(--ink); color: var(--ink); }
.btn-outline:hover{ background: var(--ink); color: var(--white); }

.btn-light{ background: var(--white); color: var(--primary); }
.btn-light:hover{ background: var(--bg-alt); }

.btn-sm{ height: 40px; padding: 0 18px; font-size: 13.5px; }
.nav-links .btn-outline{ color: var(--ink); }
.nav-links .btn-outline:hover{ color: var(--white); }

.card{ border: 1px solid var(--line); background: var(--white); }

/* ---------- Slash mark (echo of the RE/MAX icon) ---------- */
.slash-mark{
  display: inline-block;
  width: 3px;
  height: 20px;
  background: linear-gradient(180deg, var(--primary) 0 50%, var(--secondary) 50% 100%);
  transform: skewX(-14deg);
  flex-shrink: 0;
}

/* ---------------------------- NAV ---------------------------- */
.nav{
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(250, 248, 245, .92);
  backdrop-filter: saturate(140%) blur(6px);
  border-bottom: 1px solid var(--line);
}

.nav .wrap{
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
}

.nav-brand{
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-size: 19px;
}

.nav-links{
  display: none;
  align-items: center;
  gap: 36px;
}

.nav-links a{
  color: var(--ink);
  font-size: 14px;
}

.nav-links a:hover{ color: var(--primary); }

.nav-office-logo{ height: 30px; width: auto; }

.nav-right{ display: flex; align-items: center; gap: 28px; }

.nav-toggle{
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
}

.nav-toggle svg{ display: block; }

.mobile-menu{
  display: none;
  flex-direction: column;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}

.mobile-menu.is-open{ display: flex; }

.mobile-menu a{
  padding: 16px 20px;
  border-top: 1px solid var(--line);
  color: var(--ink);
  font-size: 15px;
}

.mobile-menu .btn{ margin: 16px 20px 20px; }

/* ---------------------------- HERO ---------------------------- */
.hero .wrap{
  display: flex;
  flex-direction: column;
  padding-top: 8px;
  padding-bottom: 44px;
}

.hero-photo{
  width: 100%;
  aspect-ratio: 4 / 5;
  border-radius: 2px;
  background: linear-gradient(160deg, #EFE9E1 0%, #DCD3C6 100%);
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}

.hero-photo img{ width: 100%; height: 100%; object-fit: cover; }

.hero-photo .placeholder-label{
  padding: 14px 16px;
  font-size: 12px;
  color: var(--muted);
}

.hero-photo img{ width: 100%; height: 100%; object-fit: cover; }

.hero-copy{ margin-top: 26px; }

.hero-copy .eyebrow{ color: var(--primary); margin-bottom: 12px; }

.hero-copy h1{
  font-size: 36px;
  line-height: 1.12;
}

.hero-copy p{
  margin-top: 16px;
  font-size: 16px;
  line-height: 1.65;
  color: var(--ink-soft);
  max-width: 46ch;
}

.hero-actions{
  display: flex;
  gap: 12px;
  margin-top: 26px;
  flex-wrap: wrap;
}

/* ---------------------------- STATS ---------------------------- */
.stats{ background: var(--ink); padding: 44px 0 40px; }

.stats .eyebrow{ color: #C9C2B6; margin-bottom: 24px; }
.stats .eyebrow::before{ background: var(--primary); }

.stats-grid{
  display: grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: 30px 16px;
}

.stat-item{ display: flex; flex-direction: column; gap: 8px; }

.stat-line{ width: 28px; height: 2px; background: var(--primary); }
.stat-item:nth-child(2n) .stat-line{ background: var(--secondary); }

.stat-number{ font-family: var(--font-display); font-size: 34px; color: var(--white); }

.stat-label{ font-size: 13px; color: #C9C2B6; line-height: 1.4; }

/* ---------------------------- SECTION HEADERS ---------------------------- */
.section{ padding: 52px 0 48px; }
.section h2{ font-size: 26px; }
.section > .wrap > p{
  margin-top: 14px;
  font-size: 15px;
  line-height: 1.7;
  color: var(--ink-soft);
  max-width: 60ch;
}

.section-alt{ background: var(--bg-alt); }
.section-dark{ background: var(--ink); color: var(--white); }
.section-dark h2{ color: var(--white); }
.section-dark > .wrap > p{ color: #C9C2B6; }

/* ---------------------------- TRAYECTORIA / PREMIOS ---------------------------- */
.intro p{
  margin-top: 14px;
  font-size: 15px;
  line-height: 1.7;
  color: var(--ink-soft);
}

.awards-list{
  display: flex;
  flex-direction: column;
  gap: 1px;
  margin-top: 28px;
  background: var(--line);
}

.award-item{
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 16px;
}

.award-item svg{ flex-shrink: 0; }

.award-title{ font-size: 14.5px; font-weight: 600; }

.award-year{
  font-size: 13px;
  color: var(--muted);
  margin-top: 2px;
  padding-left: 8px;
  border-left: 2px solid var(--secondary);
}

/* ---------------------------- EQUIPO ---------------------------- */
.team-intro-row{
  display: flex;
  flex-direction: column;
  gap: 40px;
  margin-top: 20px;
}

.team-intro-left{
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.team-intro-text p{
  font-size: 15px;
  line-height: 1.7;
  color: var(--ink-soft);
}

.team-intro-photo{
  width: 100%;
  max-width: 420px;
  aspect-ratio: 4 / 5;
  border-radius: 2px;
  overflow: hidden;
  background: #DCD3C6;
}

.team-intro-photo img{ width: 100%; height: 100%; object-fit: cover; }

.team-avatars-row{
  display: flex;
  justify-content: center;
  gap: 18px;
  flex-wrap: wrap;
}

.team-avatar-item{
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.team-avatar-circle{
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: #DCD3C6;
  overflow: hidden;
}

.team-avatar-circle img{ width: 100%; height: 100%; object-fit: cover; display: block; transition: opacity .15s ease; }

.team-avatar-name{ font-size: 16px; font-weight: 600; color: var(--ink); }

a.team-avatar-item:hover .team-avatar-name{ color: var(--primary); }
a.team-avatar-item:hover .team-avatar-circle img{ opacity: .85; }

/* ---------------------------- INFORMACIÓN ÚTIL / MERCADO ---------------------------- */
.info-accordion{
  display: flex;
  flex-direction: column;
  gap: 1px;
  margin-top: 28px;
  background: var(--line);
}

.info-item{ padding: 0; }

.info-item summary{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px;
  cursor: pointer;
  font-family: var(--font-display);
  font-size: 17px;
  color: var(--ink);
  list-style: none;
}

.info-item summary::-webkit-details-marker{ display: none; }

.info-item .chevron{ flex-shrink: 0; color: var(--primary); transition: transform .2s ease; }
.info-item[open] .chevron{ transform: rotate(180deg); }

.info-panel{ padding: 0 20px 24px; }

.info-panel p{
  margin-top: 14px;
  font-size: 14.5px;
  line-height: 1.7;
  color: var(--ink-soft);
}
.info-panel p:first-child{ margin-top: 0; }

.info-panel h4{
  font-family: var(--font-body);
  font-size: 14.5px;
  font-weight: 600;
  color: var(--ink);
  margin-top: 22px;
}

.info-panel ul{ margin-top: 10px; }
.info-panel ul li{
  position: relative;
  padding-left: 16px;
  margin-top: 8px;
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--ink-soft);
}
.info-panel ul li::before{
  content: "";
  position: absolute;
  left: 0; top: 8px;
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--primary);
}

.info-source{
  font-size: 12px;
  color: var(--muted);
  font-style: italic;
  margin-top: 16px;
}

.table-scroll{
  margin-top: 16px;
  max-height: 420px;
  overflow: auto;
  border: 1px solid var(--line);
}

.table-scroll table{
  width: 100%;
  min-width: 640px;
  border-collapse: collapse;
  font-size: 13px;
}

.table-scroll th, .table-scroll td{
  padding: 9px 12px;
  text-align: right;
  white-space: nowrap;
  border-bottom: 1px solid var(--line);
}

.table-scroll th:first-child, .table-scroll td:first-child{
  text-align: left;
  white-space: normal;
}

.table-scroll thead th{
  position: sticky;
  top: 0;
  background: var(--bg-alt);
  font-weight: 600;
  font-size: 12px;
  color: var(--ink-soft);
}

.table-scroll tbody tr:nth-child(even){ background: var(--bg); }

.tasacion-cta{
  margin-top: 32px;
  padding: 36px 24px;
  text-align: center;
  background: var(--ink);
  border-color: var(--ink);
  color: var(--white);
}

.tasacion-cta .label{
  font-family: var(--font-display);
  font-size: 22px;
}

.tasacion-cta .desc{
  font-size: 14.5px;
  margin-top: 10px;
  color: #C9C2B6;
  line-height: 1.65;
  max-width: 46ch;
  margin-left: auto;
  margin-right: auto;
}

.tasacion-cta .btn{ margin-top: 22px; height: 52px; padding: 0 36px; font-size: 15.5px; }

/* ---------------------------- TESTIMONIOS ---------------------------- */
.testimonials-track-wrap{
  margin-top: 32px;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 40px, #000 calc(100% - 40px), transparent 100%);
  mask-image: linear-gradient(90deg, transparent 0, #000 40px, #000 calc(100% - 40px), transparent 100%);
}

.testimonials-track{
  display: flex;
  gap: 16px;
  width: max-content;
  padding: 0 20px;
}

/* Loop infinito: distancia y duración las calcula testimonios.js
   según el ancho real de las tarjetas (velocidad constante en px/seg). */
.testimonials-track.is-scrolling{
  animation: testimonials-scroll var(--loop-duration, 60s) linear infinite;
  will-change: transform;
}

.testimonials-track-wrap:hover .testimonials-track.is-scrolling,
.testimonials-track-wrap.is-paused .testimonials-track.is-scrolling{
  animation-play-state: paused;
}

@keyframes testimonials-scroll{
  from{ transform: translate3d(0, 0, 0); }
  to{ transform: translate3d(var(--loop-distance, -50%), 0, 0); }
}

/* Si la persona tiene activado "reducir movimiento": se desliza con el dedo */
.testimonials-track-wrap.is-manual{
  overflow-x: auto; -webkit-mask-image: none; mask-image: none;
  scroll-snap-type: x mandatory;
}
.testimonials-track-wrap.is-manual .testimonial-card{ scroll-snap-align: start; }

.testimonial-card{
  flex: 0 0 260px;
  padding: 22px;
}

.testimonial-empty{
  flex: 0 0 auto;
  padding: 22px 0;
  color: var(--muted);
  font-size: 14px;
}

.testimonial-stars{
  color: var(--primary);
  font-size: 15px;
  letter-spacing: 2px;
}

.testimonial-text{
  margin-top: 12px;
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--ink-soft);
}

.testimonial-name{
  margin-top: 16px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
}

.testimonial-cta{ margin-top: 32px; display: flex; justify-content: center; }

/* Pop-up del formulario (elemento nativo <dialog>) */
.testimonial-dialog{
  padding: 0; border: none; background: transparent;
  width: calc(100% - 32px); max-width: 560px;
  max-height: calc(100dvh - 32px);
}
.testimonial-dialog::backdrop{ background: rgba(33, 30, 27, .55); backdrop-filter: blur(2px); }
.testimonial-dialog[open]{ animation: dialog-in .2s ease-out; }
@keyframes dialog-in{ from{ opacity: 0; transform: translateY(12px); } to{ opacity: 1; transform: none; } }

.testimonial-form-card{
  position: relative;
  padding: 28px 24px;
}
.testimonial-form-card h3{ padding-right: 36px; }

.dialog-close{
  position: absolute; top: 12px; right: 12px;
  width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  color: var(--ink-soft); border-radius: 2px;
}
.dialog-close:hover{ background: var(--bg-alt); color: var(--ink); }

.testimonial-form-card h3{
  font-family: var(--font-display);
  font-size: 20px;
}

.testimonial-form-card .field{
  display: block;
  margin-top: 20px;
}

.testimonial-form-card .field span{
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 8px;
}

.testimonial-form-card input,
.testimonial-form-card textarea{
  width: 100%;
  border: 1px solid var(--line);
  background: var(--bg);
  padding: 12px 14px;
  font-family: var(--font-body);
  font-size: 14.5px;
  color: var(--ink);
  border-radius: 2px;
  resize: vertical;
}

.testimonial-form-card input:focus,
.testimonial-form-card textarea:focus{
  outline: none;
  border-color: var(--primary);
}

.star-input{
  display: flex;
  gap: 6px;
}

.star-input button{
  font-size: 28px;
  line-height: 1;
  color: var(--line);
  padding: 0;
  transition: color .1s ease;
}

.star-input button.is-filled{ color: var(--primary); }

.testimonial-form-card .btn{ margin-top: 24px; }

.testimonial-note{
  margin-top: 12px;
  font-size: 12.5px;
  color: var(--muted);
}

.testimonial-thankyou p{
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--ink-soft);
  margin-top: 10px;
}
.testimonial-thankyou p:first-child{ margin-top: 0; }
.testimonial-thankyou .btn{ margin-top: 16px; }

/* ---------------------------- REFERIDOS CTA ---------------------------- */
.referidos{
  padding: 52px 0;
  text-align: center;
  background: var(--primary);
}

.referidos .wrap{ display: flex; flex-direction: column; align-items: center; }
.referidos h2{ font-size: 25px; color: var(--on-primary); }
.referidos p{
  color: rgba(255,255,255,.9);
  margin-top: 12px;
  font-size: 14.5px;
  line-height: 1.65;
  max-width: 46ch;
}
.referidos .btn{ margin-top: 22px; }

/* ---------------------------- CONTACTO / FOOTER ---------------------------- */
.contact-list{
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin-top: 26px;
}

.contact-row{ display: flex; align-items: center; gap: 14px; }
.contact-row.align-top{ align-items: flex-start; }
.contact-row svg{ flex-shrink: 0; color: var(--primary); }
.contact-row .muted{ color: var(--muted); }

footer{ padding: 40px 0 32px; }

.footer-bottom{
  margin-top: 36px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.footer-logo{ height: 34px; width: auto; opacity: .9; }
.footer-copy{ font-size: 12px; color: var(--muted); }
a.footer-copy{ text-decoration: none; }
a.footer-copy:hover{ color: var(--ink); text-decoration: underline; }
.footer-tagline{ font-size: 12px; color: var(--primary); }

/* ===========================================================
   Desktop (>= 900px)
=========================================================== */
@media (min-width: 900px){

  .nav-links{ display: flex; }
  .nav-toggle{ display: none; }

  .hero .wrap{
    flex-direction: row-reverse;
    align-items: center;
    gap: 80px;
    padding-top: 20px;
    padding-bottom: 70px;
  }

  .hero-photo{ width: 440px; flex-shrink: 0; aspect-ratio: 4/5; }
  .hero-copy{ margin-top: 0; flex: 1; }
  .hero-copy h1{ font-size: 56px; }
  .hero-copy p{ font-size: 17px; }

  .stats-grid{ grid-template-columns: repeat(4, minmax(0,1fr)); gap: 40px; }
  .stat-number{ font-size: 44px; }

  .section{ padding: 72px 0 64px; }
  .section h2{ font-size: 32px; }

  .trayectoria .wrap > .flex-desktop{
    display: grid;
    grid-template-columns: 1.6fr 1fr;
    gap: 64px;
    align-items: start;
  }
  .trayectoria .awards-list{ margin-top: 0; }

  .team-intro-row{ flex-direction: row; align-items: flex-start; gap: 64px; margin-top: 28px; }
  .team-intro-left{ flex: 1; gap: 40px; }
  .team-intro-photo{ flex: 0 0 420px; }

  .team-avatars-row{ justify-content: center; gap: 30px; }
  .team-avatar-circle{ width: 130px; height: 130px; }
  .team-avatar-name{ font-size: 17px; }

  .info-item summary{ padding: 24px 28px; font-size: 18px; }
  .info-panel{ padding: 0 28px 30px; }

  .tasacion-cta{ padding: 48px 40px; }
  .tasacion-cta .label{ font-size: 26px; }

  .testimonial-card{ flex: 0 0 320px; padding: 28px; }
  .testimonial-form-card{ padding: 36px 40px; }

  footer .wrap{ display: flex; justify-content: space-between; gap: 80px; }
  footer .footer-intro{ flex: 0 0 380px; }
  .contact-list{ flex: 1; display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 24px; margin-top: 0; }
}

/* Menú mobile: "Contactar" + "Iniciar sesión" apilados */
.mobile-menu .btn + .btn{ margin-top: 0; }
.mobile-menu .btn-outline{ border-top-color: var(--ink); }

#testimonios h2{ max-width: none; }

/* Trayectoria sin columna de premios (páginas de Daiana y Melina) */
@media (min-width: 900px){
  .trayectoria .wrap > .flex-desktop.solo{ display: block; max-width: 72ch; }
}
.mobile-menu .btn-primary{ color: var(--on-primary); }


/* ---------- Pop-up "Solicitar tasación" (assets/js/tasacion.js) ---------- */
.tas-eyebrow{ font-size: 12px; letter-spacing: .14em; font-weight: 600; text-transform: uppercase; color: var(--primary); margin-bottom: 8px; }
.tasacion-dialog h3{ font-size: 26px; font-weight: 400; line-height: 1.15; }
.tas-lead{ margin-top: 8px; font-size: 14.5px; line-height: 1.5; color: var(--ink-soft); }
.tasacion-dialog .field span em{ font-style: normal; font-weight: 400; color: var(--muted); }
.tas-chips{ display: flex; flex-wrap: wrap; gap: 6px; }
.tas-chips label{ position: relative; }
.tas-chips input{ position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.tas-chips b{ display: inline-flex; align-items: center; height: 40px; padding: 0 16px; border: 1px solid var(--line); border-radius: 20px; font-size: 14px; font-weight: 400; background: var(--bg); }
.tas-chips input:checked + b{ background: var(--ink); border-color: var(--ink); color: var(--white); }
.tas-chips input:focus-visible + b{ outline: 2px solid var(--secondary); outline-offset: 2px; }
.tas-err{ margin-top: 16px; padding: 12px 14px; background: var(--error-bg); color: var(--error); font-size: 14px; line-height: 1.45; }
.tas-err a{ color: var(--error); text-decoration: underline; }
.tas-err[hidden], .tas-ok[hidden], #tasForm[hidden]{ display: none; }
.tasacion-dialog .btn-primary{ width: 100%; }
.tas-ok{ text-align: center; padding: 8px 0; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.tas-ok p{ font-size: 15px; line-height: 1.55; color: var(--ink-soft); max-width: 34ch; }
.tas-ok .btn{ margin-top: 8px; }
.tas-tick{ width: 56px; height: 56px; border-radius: 50%; background: #E8F4EC; color: #1F6B3A; display: flex; align-items: center; justify-content: center; }
