/* ===== Reset básico ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Open Sans', Arial, sans-serif;
  color: #666;
  line-height: 1.6;
  background: #fff;
}

.card-propiedad {
  background: #fff;
}

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

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

ul {
  list-style: none;
}

h1, h2, h3 {
  font-family: 'Inter', Helvetica, Arial, sans-serif;
  color: #333;
}

h1 { font-size: 2.6rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.3rem; }

/* ─── SCROLL REVEAL (JS + GSAP ScrollTrigger togglean .is-visible) ─── */
[data-reveal] {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

[data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}

[data-reveal="fade"] {
  transform: none;
}

[data-reveal-group] > * {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

[data-reveal-group].is-visible > * {
  opacity: 1;
  transform: translateY(0);
}

[data-reveal-group].is-visible > *:nth-child(1) { transition-delay: 0.05s; }
[data-reveal-group].is-visible > *:nth-child(2) { transition-delay: 0.15s; }
[data-reveal-group].is-visible > *:nth-child(3) { transition-delay: 0.25s; }
[data-reveal-group].is-visible > *:nth-child(4) { transition-delay: 0.35s; }
[data-reveal-group].is-visible > *:nth-child(5) { transition-delay: 0.45s; }

@media (prefers-reduced-motion: reduce) {
  [data-reveal], [data-reveal-group] > * {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}

/* ===== Variables (colores tomados del sitio original) ===== */
:root {
  --color-primary: #5a9533;   /* verde institucional */
  --color-primary-dark: #4a7d2a;
  --color-accent: #f4c542;    /* amarillo del logo */
  --color-text: #666;
  --color-heading: #333;
  --color-bg: #f7f6f3;
  --container-width: 1140px;
}

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

/* ===== Topbar ===== */
.topbar {
  background: var(--color-primary);
  font-size: 0.85rem;
}

.topbar-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 36px;
}

.topbar-list {
  display: flex;
  gap: 18px;
}

.topbar-list a {
  color: #fff;
}

.topbar-list a:hover {
  color: var(--color-accent);
}

.btn-tasar {
  font-weight: 700;
}

/* ===== Header ===== */
.site-header {
  background: #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 90px;
}

.logo img {
  height: 60px;
  width: auto;
}

.nav-list {
  display: flex;
  align-items: center;
  gap: 24px;
}

.nav-list a {
  font-weight: 600;
  color: var(--color-heading);
  text-transform: uppercase;
  font-size: 0.9rem;
}

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

/* ===== Mega menú ===== */
.mega-trigger {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  background: none;
  border: none;
  font-family: inherit;
}

.mega-caret {
  font-size: 0.7rem;
  transition: transform 0.2s ease;
}

.has-mega.is-open .mega-caret,
.has-mega:hover .mega-caret {
  transform: rotate(180deg);
}

.mega-menu {
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  background: #fff;
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.12);
  border-top: 3px solid var(--color-primary);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
  z-index: 200;
}

.has-mega:hover .mega-menu,
.has-mega.is-open .mega-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.mega-menu-inner {
  display: grid;
  grid-template-columns: repeat(3, 1fr) 260px;
  gap: 40px;
  padding: 40px 20px;
}

.mega-menu-col h4 {
  font-family: 'Lato', sans-serif;
  color: var(--color-primary);
  text-transform: uppercase;
  font-size: 0.85rem;
  letter-spacing: 0.5px;
  margin-bottom: 16px;
}

.mega-menu-col a {
  display: block;
  padding: 6px 0;
  font-size: 0.9rem;
  font-weight: 400;
  text-transform: none;
  color: var(--color-text);
}

.mega-menu-col a:hover {
  color: var(--color-primary);
}

.mega-menu-featured {
  border-left: 1px solid #eee;
  padding-left: 30px;
}

.mega-menu-featured img {
  border-radius: 6px;
  height: 120px;
  object-fit: cover;
  margin-bottom: 12px;
}

.mega-menu-featured p {
  font-size: 0.85rem;
  margin-bottom: 14px;
}

.btn-sm {
  padding: 8px 18px;
  font-size: 0.75rem;
}

@media (max-width: 992px) {
  .mega-menu-inner {
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 20px;
  }

  .mega-menu-featured {
    border-left: none;
    border-top: 1px solid #eee;
    padding-left: 0;
    padding-top: 20px;
  }
}

@media (max-width: 768px) {
  .mega-menu {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    border-top: none;
    display: none;
  }

  .has-mega.is-open .mega-menu {
    display: block;
  }
}

.nav-toggle {
  display: none;
  position: relative;
  z-index: 1000;
  flex-direction: column;
  gap: 4px;
  background: none;
  border: none;
  cursor: pointer;
}

.nav-toggle span {
  width: 24px;
  height: 2px;
  background: var(--color-heading);
}

/* ===== Header transparente sobre el hero (home) ===== */
.header--home {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: transparent;
  box-shadow: none;
  transition: background 0.3s ease, box-shadow 0.3s ease;
}

.header--home .topbar {
  background: transparent;
  transition: background 0.3s ease;
}

.header--home .nav-list a {
  color: #fff;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
}

.header--home .nav-toggle span {
  background: #fff;
}

.header--home .logo img {
  filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.4));
}

.header--home.is-scrolled {
  background: #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

.header--home.is-scrolled .topbar {
  background: var(--color-primary);
}

.header--home.is-scrolled .nav-list a {
  color: var(--color-heading);
  text-shadow: none;
}

.header--home.is-scrolled .nav-toggle span {
  background: var(--color-heading);
}

.header--home.is-scrolled .logo img {
  filter: none;
}

/* ===== Hero slider ===== */
.hero-slider {
  position: relative;
  height: 100vh;
  min-height: 480px;
  overflow: hidden;
}

.slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 0.8s ease;
}

.slide.active {
  opacity: 1;
}

.slide-overlay {
  height: 100%;
  display: flex;
  align-items: center;
  background: linear-gradient(rgba(0, 0, 0, 0.45), rgba(0, 0, 0, 0.45));
}

.slide-content {
  color: #fff;
  width: 100%;
}

.slide-content h1 {
  color: #fff;
  font-size: clamp(1.8rem, 5vw, 5rem);
  letter-spacing: 1.5px;
  white-space: nowrap;
  margin-bottom: 16px;
}

.slide-content p {
  max-width: 640px;
  margin-bottom: 24px;
  font-size: 1.1rem;
}

.slider-dots {
  position: absolute;
  bottom: 20px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  gap: 10px;
}

.dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid #fff;
  background: transparent;
  cursor: pointer;
}

.dot.active {
  background: #fff;
}

/* ===== Botones ===== */
.btn {
  display: inline-block;
  padding: 12px 28px;
  border-radius: 4px;
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.85rem;
  letter-spacing: 0.5px;
  transition: opacity 0.2s ease, background 0.2s ease;
}

.btn-primary {
  background: var(--color-primary);
  color: #fff;
}

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

.btn-secondary {
  background: transparent;
  border: 2px solid var(--color-primary);
  color: var(--color-primary);
}

.btn-secondary:hover {
  background: var(--color-primary);
  color: #fff;
}

/* ===== Secciones ===== */
section {
  padding: 70px 0;
}

.servicios {
  background: linear-gradient(#fff 0%, #e8eefc 100%);
  text-align: center;
}

.servicios h2 {
  font-size: 2.4rem;
  margin-bottom: 40px;
}

.servicios-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 32px;
  text-align: left;
}

.servicios-grid.two-col {
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}

.servicio-card h3 {
  color: var(--color-primary);
  font-size: 1.1rem;
  text-transform: uppercase;
  text-align: center;
  margin-bottom: 12px;
}

.servicios-cta {
  text-align: center;
  margin-top: 40px;
}

/* ===== Grid propiedades ===== */
.destacadas h2 {
  text-align: center;
  font-size: 2.4rem;
  margin-bottom: 40px;
}

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

/* ===== Carrusel de propiedades ===== */
.carousel {
  position: relative;
}

.carousel-track {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 24px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding-bottom: 4px;
}

.carousel-track::-webkit-scrollbar {
  display: none;
}

.carousel-slide {
  flex: 0 0 320px;
  scroll-snap-align: start;
}

@media (max-width: 560px) {
  .carousel-slide {
    flex-basis: 85%;
  }
}

.carousel-arrow {
  display: none;
}

.card-propiedad {
  border: 1px solid #eee;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  transition: box-shadow 0.25s ease, transform 0.25s ease;
}

.card-propiedad:hover {
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.15);
  transform: translateY(-4px);
}

.card-propiedad img {
  height: 220px;
  width: 100%;
  object-fit: cover;
}

.card-propiedad .info {
  padding: 20px;
}

.card-propiedad h3 {
  font-size: 1rem;
  margin-bottom: 10px;
}

.detalles {
  display: flex;
  gap: 16px;
  margin-bottom: 16px;
  font-size: 0.85rem;
}

.detalles li {
  display: flex;
  align-items: center;
  gap: 6px;
}

.detalles img {
  height: 18px;
  width: 18px;
}

.btn-ver {
  display: inline-block;
  font-weight: 700;
  font-size: 0.8rem;
  text-transform: uppercase;
  color: var(--color-primary);
  border-bottom: 2px solid var(--color-primary);
  padding-bottom: 2px;
}

/* ===== Tasaciones (banner con imagen) ===== */
.tasaciones {
  background-size: cover;
  background-position: center;
  position: relative;
}

.tasaciones-overlay {
  background: linear-gradient(321deg, rgba(90, 149, 51, 0.95) 0%, rgba(90, 149, 51, 0.85) 100%);
  padding: 60px 0;
}

.tasaciones-overlay {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}

.tasaciones-stat {
  color: #fff;
  text-align: center;
}

.tasaciones-stat .stat-num {
  font-family: 'Lato', sans-serif;
  font-weight: 900;
  font-size: 3.2rem;
  line-height: 1;
}

.tasaciones-stat .stat-label {
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.tasaciones-overlay p {
  color: #fff;
  font-size: 1.15rem;
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
}

.admin-alquileres {
  background: var(--color-bg);
}

/* ===== Page header (subpáginas) ===== */
.page-header {
  background: var(--color-bg);
  padding: 50px 0;
  text-align: center;
}

.page-header p {
  max-width: 700px;
  margin: 10px auto 0;
}

/* ===== Tasación ===== */
.tasacion-hero {
  background-size: cover;
  background-position: center;
  filter: grayscale(60%);
}

.tasacion-hero-overlay {
  background: rgba(0, 0, 0, 0.55);
  padding: 100px 0;
  text-align: center;
}

.tasacion-hero h1 {
  color: #fff;
  font-size: 2.2rem;
}

/* ===== Nosotros ===== */
.nosotros-hero {
  background: var(--color-heading);
  color: #fff;
  text-align: center;
  padding: 90px 0 60px;
}

.nosotros-hero h1 {
  color: #fff;
  font-size: 1.8rem;
  max-width: 800px;
  margin: 0 auto 24px;
}

.nosotros-firma {
  color: #ddd;
}

.nosotros-foto {
  max-width: 500px;
  margin: -40px auto 0;
  padding: 0 20px;
}

.nosotros-foto img {
  border-radius: 50%;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.testimonios {
  text-align: center;
}

.testimonios h2 {
  font-size: 1.6rem;
  margin-bottom: 40px;
}

.testimonios h2 span {
  display: block;
  font-size: 1rem;
  color: var(--color-primary);
  font-family: 'Open Sans', Arial, sans-serif;
  font-weight: 400;
}

.testimonios-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 32px;
  text-align: left;
}

.testimonio-card {
  background: var(--color-bg);
  border-radius: 8px;
  padding: 24px;
}

.testimonio-card p {
  font-style: italic;
  margin-bottom: 16px;
}

.testimonio-autor {
  font-weight: 700;
  color: var(--color-primary);
  font-style: normal !important;
  margin-bottom: 0 !important;
}

/* ===== Contacto ===== */
.contacto-grid {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 50px;
}

.contacto-datos {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.contacto-datos strong {
  color: var(--color-primary);
  display: block;
  margin-bottom: 4px;
}

.form-contacto h2 {
  font-size: 1.3rem;
  margin-bottom: 20px;
}

.form-contacto label {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--color-heading);
}

.form-check {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 400 !important;
}

.form-legal {
  font-size: 0.75rem;
  color: #999;
  margin-top: 10px;
}

@media (max-width: 768px) {
  .contacto-grid {
    grid-template-columns: 1fr;
  }
}

/* ===== Formulario contacto ===== */
.form-contacto {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 500px;
}

.form-contacto input,
.form-contacto textarea,
.form-contacto select {
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-family: inherit;
}

/* ===== Footer ===== */
.site-footer {
  background: #2b2b2b;
  color: #ccc;
  padding: 50px 0 30px;
}

.footer-inner {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 32px;
}

.footer-col ul {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-col a {
  color: #ccc;
}

.footer-col a:hover {
  color: var(--color-primary);
}

.footer-fb {
  display: inline-block;
  margin-top: 12px;
  color: var(--color-primary);
  font-weight: 700;
}

.footer-legal {
  font-size: 0.8rem;
  margin-bottom: 10px;
  color: #999;
}

.footer-credit {
  font-size: 0.8rem;
  color: #999;
}

.footer-credit a {
  color: #fff;
  font-weight: 700;
  letter-spacing: -0.2px;
}

.footer-credit .credit-dot {
  color: #ec1c7e;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .nav-toggle {
    display: flex;
  }

  .nav-list {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    height: 100vh;
    background: #fff;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 32px;
    padding: 40px 20px;
    overflow-y: auto;
    display: none;
    z-index: 999;
  }

  .nav-list.open {
    display: flex;
  }

  .nav-list a,
  .nav-list .mega-trigger {
    font-family: 'Inter', Helvetica, Arial, sans-serif;
    color: var(--color-primary) !important;
    text-shadow: none !important;
    font-size: 1.3rem;
  }

  .nav-list .mega-menu-col a {
    font-size: 1rem;
    color: var(--color-text) !important;
  }

  .nav-list .mega-menu-col a:hover {
    color: var(--color-primary) !important;
  }

  .nav-toggle[aria-expanded="true"] span {
    background: var(--color-primary) !important;
  }

  .topbar-inner {
    flex-wrap: wrap;
    height: auto;
    padding: 6px 0;
    gap: 6px;
  }
}
