@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,500;9..144,700&family=Manrope:wght@300;400;500;600&display=swap');

:root {
  --ink: #1c1b16;
  --paper: #ffffff;
  --accent: #0A2342; /* Navy Blue */
  --accent-2: #5F9EA0; /* Cadet Blue */
  --sun: #f3c978;
  --deep: #0A2342; /* Navy Blue */
  --muted: #6c757d;
  --soft: #F0F8FF; /* AliceBlue */
  --radius: 22px;
  --shadow: 0 30px 60px rgba(10, 35, 66, 0.16);
  --shadow-soft: 0 20px 40px rgba(10, 35, 66, 0.12);
}

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

body {
  font-family: "Manrope", "Helvetica Neue", Arial, sans-serif;
  color: var(--ink);
  background: var(--paper);
  min-height: 100vh;
}

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

a {
  text-decoration: none;
  color: inherit;
}

ul {
  list-style: none;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 10px;
  background: var(--accent-2);
  color: white;
  padding: 10px 16px;
  border-radius: 999px;
  z-index: 10;
}

.skip-link:focus {
  left: 16px;
}

.site-header {
  /* reduced horizontal padding so logo and CTA can reach edges */
  padding: 28px 3vw;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--paper);
  border-bottom: 1px solid rgba(28, 27, 22, 0.08);
}

/* Asegura que el logo no se superponga al menú */
/* Aplica tanto a las clases nuevas (.header-logo) como a las existentes (.logo) */
.header-logo,
.logo {
  z-index: 2;
  position: relative;
  margin-right: auto;
  padding-left: 8px;
}

/* Menu toggle (three bars) — small, clickable control */
.menu-toggle,
.mobile-menu-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  font-size: 1.2rem;
  cursor: pointer;
  background: transparent;
  border: none;
  color: var(--ink);
  z-index: 96; /* above side menu but below logo (logo=95, menu-toggle 96 keeps clickable) */
}

/* Asegura que el botón de inicio y el menú hamburguesa estén por encima */
/* Aplica a .header-nav y .nav-links, y a .menu-toggle y .mobile-menu-toggle */
.header-nav,
.nav-links,
.menu-toggle,
.mobile-menu-toggle {
  z-index: 3;
  position: relative;
}

/* Push primary CTA to the far right when header has room */
.site-header .btn.primary {
  margin-left: auto;
  position: relative;
}

/* Ajuste responsivo para mostrar el menú hamburguesa antes del solapamiento */
@media (max-width: 920px) {
  .menu-toggle,
  .mobile-menu-toggle {
    display: block;
  }

  .header-nav,
  .nav-links {
    display: none;
  }

  .header-logo,
  .logo {
    font-size: 1.2em;
    padding-top: 12px;
  }
}

.logo {
  font-family: "Fraunces", "Times New Roman", serif;
  font-weight: 700;
  font-size: 1.4rem;
  letter-spacing: 0.5px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.logo-mark {
  width: 72px;
  height: 72px;
  border-radius: 10px;
  object-fit: cover;
  box-shadow: 0 8px 18px rgba(28, 27, 22, 0.18);
}

/* Center multi-line brand text (e.g. "Inmuebles\nMorán") */
.logo span {
  display: inline-block;
  text-align: center;
  line-height: 1;
}

.icon {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  stroke: currentColor;
}

.btn.icon-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.nav-links {
  display: flex;
  gap: 24px;
  align-items: center;
  font-size: 0.95rem;
}

.nav-links a {
  padding: 8px 12px;
  border-radius: 999px;
  transition: background 0.2s ease;
}

.nav-links a:hover,
.nav-links a:focus {
  background: rgba(95, 158, 160, 0.12);
}

/* Dropdown for Propiedades */
.nav-dropdown {
  position: relative;
}
.nav-trigger {
  background: transparent;
  border: none;
  padding: 8px 12px;
  border-radius: 999px;
  cursor: pointer;
  font: inherit;
  color: inherit;
}
.nav-trigger:focus {
  outline: 2px solid rgba(10,34,66,0.12);
}
.submenu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  min-width: 160px;
  background: white;
  border-radius: 12px;
  box-shadow: var(--shadow);
  display: none;
  flex-direction: column;
  padding: 6px;
  z-index: 30;
}
.submenu a {
  display: block;
  padding: 8px 12px;
  border-radius: 8px;
  color: var(--ink);
}
.submenu a:hover,
.submenu a:focus {
  background: rgba(95,158,160,0.08);
}
.nav-dropdown:hover .submenu,
.nav-dropdown:focus-within .submenu {
  display: flex;
}

/* Allow JS to keep the submenu open by adding the `open` class */
.nav-dropdown.open .submenu {
  display: flex;
}

/* On pages where header becomes compact, ensure contact quick-actions stack vertically
   so each contact method is on its own line (used on contacto.html). */
.site-header.compact ~ .main .contact-aside .hero-actions,
.site-header.compact .contact-aside .hero-actions {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
}
.site-header.compact ~ .main .contact-aside .hero-actions .btn,
.site-header.compact .contact-aside .hero-actions .btn {
  width: 100%;
  box-sizing: border-box;
  justify-content: center;
  padding-left: 14px;
  padding-right: 14px;
}
.site-header.compact ~ .main .contact-aside .hero-actions .btn.icon-link,
.site-header.compact .contact-aside .hero-actions .btn.icon-link {
  justify-content: flex-start;
}

@media (max-width: 920px) {
  .submenu {
    position: static;
    display: none;
    box-shadow: none;
    background: transparent;
    padding: 0;
  }
  .nav-dropdown.open .submenu {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 8px 0 0 0;
  }
  .nav-trigger {
    width: 100%;
    text-align: left;
  }
}

.main {
  padding: 40px 6vw 80px;
}

.hero-banner {
  margin-bottom: 32px;
}

.hero-banner figure {
  margin: 0 auto;
  max-width: 980px;
  height: clamp(140px, 18vw, 200px);
  overflow: hidden;
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  background-image: url('assets/skyline-tarjeta.png');
  background-size: cover;
  background-position: 70% 100%;
  background-repeat: no-repeat;
}

.hero-banner img {
  /* keep the img element for accessibility but hide the visual img
     because the figure now uses a background-image to avoid distortion */
  display: none;
}

.hero-banner figcaption {
  margin-top: 8px;
  text-align: right;
  font-size: 0.75rem;
  color: var(--muted);
}

.hero-banner figcaption a {
  color: inherit;
}

.hero {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 36px;
  align-items: center;
  margin-bottom: 60px;
}

.eyebrow {
  text-transform: uppercase;
  font-size: 0.8rem;
  letter-spacing: 2px;
  color: var(--accent-2);
  font-weight: 600;
}

.hero h1 {
  font-family: "Fraunces", "Times New Roman", serif;
  font-size: clamp(2.4rem, 3vw, 3.6rem);
  margin: 16px 0;
  line-height: 1.1;
}

.hero p {
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.6;
  margin-bottom: 20px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin: 20px 0 28px;
}

.btn {
  padding: 12px 22px;
  border-radius: 999px;
  font-weight: 600;
  border: 1px solid transparent;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn.primary {
  background: var(--accent);
  color: white;
  box-shadow: var(--shadow-soft);
}

.btn.ghost {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(255, 255, 255, 0.6);
}

.btn:hover,
.btn:focus {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 16px;
}

.stat {
  background: white;
  padding: 16px 18px;
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
}

.stat h3 {
  font-family: "Fraunces", "Times New Roman", serif;
  font-size: 1.4rem;
  margin-bottom: 6px;
}

.hero-card {
  background: var(--deep);
  color: white;
  padding: 28px;
  border-radius: 26px;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.hero-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.2), transparent 55%);
  opacity: 0.6;
}

.hero-card > * {
  position: relative;
  z-index: 1;
}

.hero-card h2 {
  font-family: "Fraunces", "Times New Roman", serif;
  font-size: 1.8rem;
  margin-bottom: 14px;
}

.feature-list li {
  padding: 10px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  display: flex;
  justify-content: space-between;
  font-size: 0.95rem;
}

.section {
  margin-bottom: 64px;
}

.section-title {
  font-family: "Fraunces", "Times New Roman", serif;
  font-size: 2rem;
  margin-bottom: 16px;
}

.section-subtitle {
  color: var(--muted);
  max-width: 620px;
  margin-bottom: 28px;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 22px;
}

.listing-card {
  background: white;
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow-soft);
  display: grid;
  gap: 12px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.listing-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow);
}

.listing-thumb {
  height: 160px;
  border-radius: 18px;
  background: linear-gradient(140deg, #B0C4DE, #89CFF0);
  position: relative;
  overflow: hidden;
}

.listing-thumb::after {
  content: "";
  position: absolute;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.35);
  top: -60px;
  right: -40px;
}

.listing-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.9rem;
  color: var(--muted);
}

.tag {
  background: rgba(95, 158, 160, 0.15);
  color: var(--accent-2);
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
}

.service-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
}

.service-item {
  background: var(--soft);
  padding: 20px;
  border-radius: 18px;
  display: grid;
  gap: 10px;
}

.neighborhoods {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.neighborhoods span {
  background: white;
  padding: 10px 16px;
  border-radius: 999px;
  border: 1px solid rgba(28, 27, 22, 0.1);
}

.cta {
  background: linear-gradient(120deg, var(--deep), var(--accent-2));
  color: white;
  padding: 32px;
  border-radius: 26px;
  display: grid;
  gap: 18px;
  box-shadow: var(--shadow);
}

.cta h2 {
  font-family: "Fraunces", "Times New Roman", serif;
  font-size: 2rem;
}

.cta .cta-schedule {
  margin-top: 12px;
  color: rgba(255,255,255,0.92);
  font-size: 0.95rem;
  font-weight: 500;
}

.site-footer {
  padding: 28px 6vw 40px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  background: var(--deep);
  color: rgba(255, 255, 255, 0.8);
}

/* Make legal links smaller and pinned centered at the bottom of the footer */
.site-footer .legal-links {
  order: 99;
  width: 100%;
  text-align: center;
  margin-top: 12px;
}

.site-footer .legal-links p {
  margin: 0;
  font-size: 0.9rem;
}

.site-footer .legal-links .footer-link {
  font-size: 0.9rem;
  opacity: 0.95;
}

/* underline on hover/focus so each link reads as separate */
.site-footer .legal-links .footer-link {
  text-decoration: none;
}

.site-footer .legal-links .footer-link:hover,
.site-footer .legal-links .footer-link:focus {
  text-decoration: underline;
  outline: none;
}

.contact-layout {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 32px;
  align-items: start;
}

.form-card {
  background: white;
  padding: 26px;
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  display: grid;
  gap: 16px;
}

.form-card label {
  font-weight: 600;
  font-size: 0.85rem;
  margin-bottom: 6px;
  display: block;
}

.form-card input,
.form-card select,
.form-card textarea {
  width: 100%;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(10, 35, 66, 0.15);
  background: var(--soft);
  font-family: inherit;
}

.form-card textarea {
  min-height: 120px;
  resize: vertical;
}

.contact-aside {
  background: var(--deep);
  color: white;
  padding: 26px;
  border-radius: 22px;
  box-shadow: var(--shadow);
  display: grid;
  gap: 16px;
}

.contact-detail {
  display: grid;
  gap: 6px;
  font-size: 0.95rem;
}

.contact-link, .contact-link:visited {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: rgba(255, 255, 255, 0.7);
}

.contact-banner {
  background: linear-gradient(160deg, #23404a, #2c6b63);
  padding: 24px;
  border-radius: 18px;
}

/* Cookie banner styles */
.cookie-banner {
  display: none;
  position: fixed;
  left: 1rem;
  right: 1rem;
  bottom: 1rem;
  background: #fff;
  border: 1px solid rgba(0,0,0,0.08);
  padding: 1rem;
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.08);
  z-index: 1000;
}
.cookie-banner__inner {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:1rem;
  flex-wrap:wrap;
}
.cookie-banner__message{flex:1;min-width:200px;color:var(--ink);}

/* Muted text used for small annotations in footer */
.site-footer .muted {
  color: rgba(255,255,255,0.75);
  font-size: 0.9rem;
  font-weight: 400;
  margin-left: 0.35rem;
}

.site-footer strong .muted {
  font-weight: 400;
}
.cookie-banner__actions{white-space:nowrap;margin-left:1rem}
.cookie-btn{padding:0.5rem 1rem;border-radius:6px;border:1px solid transparent;cursor:pointer;font-weight:600}
.cookie-btn--accept{background:#0b5fff;color:#fff;border-color:#0b5fff}
.cookie-btn--close{background:transparent;border-color:#ccc;color:var(--ink)}

.footer-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: inherit;
}

.animate-in {
  opacity: 0;
  transform: translateY(20px);
  animation: reveal 0.8s ease forwards;
}

.animate-in.delay-1 {
  animation-delay: 0.15s;
}

.animate-in.delay-2 {
  animation-delay: 0.3s;
}

@keyframes reveal {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 920px) {
  .nav-links {
    display: none;
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

  /* Contact aside: stack contact methods vertically on narrow screens */
  .contact-aside .hero-actions {
    display: flex;
    flex-direction: column !important;
    align-items: stretch;
    gap: 10px;
  }
  .contact-aside .hero-actions .btn {
    display: flex !important;
    width: 100% !important;
    box-sizing: border-box;
    justify-content: center;
    padding-left: 14px;
    padding-right: 14px;
  }
  .contact-aside .hero-actions .btn.icon-link {
    justify-content: flex-start !important;
    gap: 12px;
  }

  .cta {
    text-align: center;
  }

  /* Ensure mobile menu toggle (hamburger/three dots) is visible on all pages */
  .mobile-menu-toggle {
    display: block !important;
    position: absolute;
    left: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    z-index: 80;
  }

  /* Simple left side menu (for the snippet the user provided) */
  .side-menu {
    position: fixed;
    left: 0;
    top: 0;
    height: 100vh;
    width: 280px;
    max-width: 85vw;
    background: var(--deep);
    color: white;
    transform: translateX(-110%);
    transition: transform 0.28s ease;
    z-index: 75;
    padding-top: 72px;
  }
  .side-menu ul { list-style: none; padding: 0 16px; margin: 0; }
  .side-menu li { margin-bottom: 8px; }
  .side-menu a { color: white; display: block; padding: 10px 12px; border-radius: 8px; text-decoration: none; }
  .side-menu a:hover { background: rgba(255,255,255,0.06); }

  /* Toggle visible: when body has .menu-open, slide menu in */
  body.menu-open .side-menu { transform: translateX(0); }

  /* Keep logo visually above the side menu */
  .logo { position: relative; z-index: 200; }

  /* Add spacing on the header so the absolute buttons don't overlap the logo */
  .site-header {
    padding-left: 56px;
    padding-right: 56px;
  }

  /* Ensure the primary header CTA (Te llamamos) is pinned right on all pages */
  .site-header .btn.primary {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    padding: 8px 14px;
    font-size: 0.95rem;
    z-index: 80;
  }
  /* When menu is open, show nav links stacked */
  .site-header.menu-open .nav-links {
    display: flex !important;
    flex-direction: column;
    gap: 1rem;
    padding: 1rem 0;
    width: 100%;
    background: transparent;
    margin-top: 8px;
  }

  /* Compact header: show hamburger when nav doesn't fit */
  .site-header.compact .mobile-menu-toggle {
    display: block !important;
  }

  .site-header.compact .nav-links {
    display: none !important;
  }

  /* When compact and menu-open, reveal stacked nav */
  .site-header.compact.menu-open .nav-links {
    display: flex !important;
    flex-direction: column;
    gap: 1rem;
    padding: 1rem 0;
    width: 100%;
    background: transparent;
    margin-top: 8px;
  }

/* DEBUG: visual indicator when header is in compact mode (remove when stable) */
.site-header.compact { outline: 3px solid magenta; }
  .site-header.menu-open .btn.ghost {
    display: inline-flex !important;
    justify-content: center;
    margin-bottom: 1rem;
  }
  
/* Always show the hamburger when compact mode is active (helpful for testing) */
.site-header.compact .mobile-menu-toggle { display: block !important; }

/* Visible textual indicator to help test detection without DevTools */
.site-header.compact::after {
  content: "COMPACT";
  position: absolute;
  right: 12px;
  top: calc(100% + 6px);
  background: #c2185b;
  color: white;
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 700;
  z-index: 120;
}

/* Also apply stacking behavior on narrow desktop windows */
@media (max-width: 920px) {
  .contact-aside .hero-actions {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 10px;
  }
  .contact-aside .hero-actions .btn {
    width: 100% !important;
    justify-content: center !important;
    padding-left: 14px;
    padding-right: 14px;
  }
  .contact-aside .hero-actions .btn.icon-link {
    justify-content: flex-start !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .animate-in {
    animation: none;
    opacity: 1;
    transform: none;
  }

  .btn:hover,
  .btn:focus,
  .listing-card:hover {
    transform: none;
  }
}
