/* MEGAWATT 2000 - Tu Socio en Gestión Integral e Inversiones Inmobiliarias */
:root {
  --azul: #143a66;
  --azul-osc: #0b2442;
  --verde: #147a5c;
  --verde-osc: #0d5942;
  --dorado: #c89d3c;
  --wsp: #1faa53;
  --rojo: #c1272d;
  --fondo: #ffffff;
  --fondo-alt: #f2f6f9;
  --texto: #1e2d3b;
  --suave: #526377;
  --borde: #d6e0ea;
  --radio: 12px;
  --ancho: 1120px;
}

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

body {
  font-family: 'Lato', -apple-system, 'Segoe UI', Roboto, sans-serif;
  background: var(--fondo);
  color: var(--texto);
  line-height: 1.65;
}

h1, h2, h3 {
  font-family: 'Playfair Display', Georgia, serif;
  line-height: 1.25;
  color: var(--azul-osc);
}

a { color: var(--azul); }
img { max-width: 100%; }

.container {
  width: 100%;
  max-width: var(--ancho);
  margin: 0 auto;
  padding: 0 1.2rem;
}

/* Header */
header.site {
  background: var(--fondo);
  border-bottom: 2px solid var(--borde);
  position: sticky;
  top: 0;
  z-index: 30;
  box-shadow: 0 2px 10px rgba(11, 36, 66, .05);
}
header.site .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-top: .8rem;
  padding-bottom: .8rem;
  flex-wrap: wrap;
}
.brand {
  display: flex;
  align-items: center;
  gap: .85rem;
  text-decoration: none;
}
.brand .logo {
  height: 60px;
  width: auto;
  object-fit: contain;
  border-radius: 8px;
}
.brand-texto {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--azul-osc);
  line-height: 1.1;
  letter-spacing: .5px;
}
.brand-texto small {
  display: block;
  font-family: 'Lato', sans-serif;
  font-size: .85rem;
  font-weight: 700;
  color: var(--verde);
  letter-spacing: 0;
  margin-top: .15rem;
}
nav.main { display: flex; gap: 1.3rem; flex-wrap: wrap; align-items: center; }
nav.main a {
  text-decoration: none;
  font-weight: 700;
  color: var(--azul);
}
nav.main a:hover { color: var(--verde); }

/* Avisos */
.flash {
  border-radius: var(--radio);
  padding: .8rem 1.1rem;
  margin: 1rem auto;
  max-width: var(--ancho);
}
.flash.ok { background: #e3f4ec; color: #0a5f52; border: 1px solid #9fd8c3; }
.flash.error { background: #fbe7e7; color: #8f1d22; border: 1px solid #eeb3b6; }

/* Hero */
.hero {
  position: relative;
  background-image: var(--hero-img);
  background-size: cover;
  background-position: center;
  color: #fff;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(125deg, rgba(11, 36, 66, .88) 0%, rgba(20, 122, 92, .72) 100%);
}
.hero-int {
  position: relative;
  max-width: var(--ancho);
  margin: 0 auto;
  padding: 5.2rem 1.2rem;
  text-shadow: 0 2px 10px rgba(10, 25, 45, .45);
}
.hero-badge {
  display: inline-block;
  background: rgba(255, 255, 255, .15);
  border: 1px solid rgba(255, 255, 255, .35);
  color: #e9f7f2;
  padding: .35rem .9rem;
  border-radius: 999px;
  font-size: .88rem;
  font-weight: 700;
  letter-spacing: .5px;
  text-transform: uppercase;
  margin-bottom: 1rem;
}
.hero h1 { color: #fff; font-size: 3.1rem; letter-spacing: .5px; }
.hero .lema { font-size: 1.5rem; font-weight: 700; margin-top: .35rem; color: #a7f0d6; }
.hero .bienvenida { font-style: italic; font-size: 1.15rem; margin-top: .6rem; color: #f0f6fa; }
.hero .sub { max-width: 720px; margin-top: 1rem; font-size: 1.06rem; }
.hero-botones {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 1.8rem;
}

/* Botones */
.btn {
  display: inline-block;
  background: var(--azul);
  color: #fff;
  font-weight: 700;
  text-decoration: none;
  border: none;
  cursor: pointer;
  padding: .8rem 1.5rem;
  border-radius: var(--radio);
  font-size: 1rem;
  transition: all .2s ease;
}
.btn:hover { background: var(--azul-osc); color: #fff; transform: translateY(-1px); }
.btn.wsp { background: var(--wsp); }
.btn.wsp:hover { background: #178741; color: #fff; }
.btn.claro {
  background: rgba(255, 255, 255, .16);
  color: #fff;
  border: 2px solid #fff;
}
.btn.claro:hover { background: #fff; color: var(--azul-osc); }
.btn.sec {
  background: transparent;
  color: var(--azul);
  border: 2px solid var(--azul);
}
.btn.sec:hover { background: var(--azul); color: #fff; }
.btn.chico { padding: .45rem .9rem; font-size: .9rem; }
.btn.peligro { background: var(--rojo); }
.btn.peligro:hover { background: #8f1d22; }

/* Franjas */
.franja { padding: 3.6rem 0; }
.franja.alt { background: var(--fondo-alt); }
.titulo-seccion {
  font-size: 2.1rem;
  text-align: center;
  margin-bottom: .6rem;
}
.subtitulo-seccion {
  text-align: center;
  color: var(--suave);
  max-width: 740px;
  margin: 0 auto 2.4rem;
  font-size: 1.05rem;
}

/* Confianza / Pilares */
.confianza {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.8rem;
}
.confianza .item {
  background: #fff;
  padding: 1.6rem;
  border-radius: var(--radio);
  border: 1px solid var(--borde);
  border-top: 4px solid var(--verde);
  box-shadow: 0 4px 14px rgba(11, 36, 66, .04);
}
.confianza .item h3 { font-size: 1.25rem; margin-bottom: .5rem; }
.confianza .item p { color: var(--suave); font-size: .97rem; }

/* Servicios y Pilares del Volante */
.servicios-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1.5rem;
}
.servicios-grid-4 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.8rem;
}
.card {
  background: #fff;
  border: 1px solid var(--borde);
  border-radius: var(--radio);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 6px 18px rgba(11, 36, 66, .05);
}
.card .foto {
  height: 240px;
  background-color: #f7fafc;
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center;
  border-bottom: 1px solid var(--borde);
}
.card .cuerpo {
  padding: 1.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.card .cuerpo h3 { font-size: 1.3rem; margin-bottom: .6rem; color: var(--azul-osc); }
.card .cuerpo p { color: var(--suave); font-size: .97rem; margin-bottom: .9rem; }
.lista-items {
  list-style: none;
  margin: .4rem 0 1.1rem;
  padding: 0;
}
.lista-items li {
  position: relative;
  padding-left: 1.35rem;
  margin-bottom: .4rem;
  font-size: .95rem;
  color: var(--texto);
}
.lista-items li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--verde);
  font-weight: 700;
}
.card .mas {
  margin-top: auto;
  display: inline-block;
  font-weight: 700;
  color: var(--verde);
  text-decoration: none;
}
.card .mas:hover { color: var(--verde-osc); }

/* Quienes somos y Equipo Directivo */
.sobre {
  display: grid;
  grid-template-columns: 380px 1fr;
  gap: 2.5rem;
  align-items: center;
  margin-bottom: 2.8rem;
}
.retrato {
  width: 100%;
  max-height: 480px;
  border-radius: var(--radio);
  object-fit: cover;
  background: #ffffff;
  border: 3px solid #fff;
  box-shadow: 0 10px 26px rgba(11, 36, 66, .14);
}
.sobre h2 { font-size: 1.85rem; margin-bottom: 1rem; }
.sobre p { margin-bottom: .95rem; color: var(--texto); }
.sobre .destacado {
  font-weight: 700;
  color: var(--verde-osc);
  font-size: 1.12rem;
  border-left: 4px solid var(--verde);
  padding-left: .9rem;
  margin-top: 1rem;
}

.directivos-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
  margin-top: 1.5rem;
}
.directivo-card {
  background: #fff;
  border: 1px solid var(--borde);
  border-radius: var(--radio);
  padding: 1.6rem;
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 1.4rem;
  align-items: center;
  box-shadow: 0 6px 18px rgba(11, 36, 66, .06);
}
.directivo-foto {
  width: 150px;
  height: 185px;
  object-fit: cover;
  object-position: top center;
  border-radius: 10px;
  border: 2px solid var(--verde);
}
.directivo-info h3 { font-size: 1.3rem; margin-bottom: .25rem; }
.directivo-cargo {
  display: block;
  font-weight: 700;
  color: var(--verde);
  font-size: .9rem;
  margin-bottom: .65rem;
}
.directivo-info p {
  font-size: .94rem;
  color: var(--suave);
  margin-bottom: .85rem;
}

/* Tarifas y cotizacion */
.tarifas-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
}
.tarifa-card {
  background: #fff;
  border: 1px solid var(--borde);
  border-radius: var(--radio);
  padding: 1.4rem;
}
.tarifa-card h3 { font-size: 1.2rem; margin-bottom: .8rem; }
.tarifa-card ul { list-style: none; }
.tarifa-card li {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: .45rem 0;
  border-bottom: 1px dotted var(--borde);
}
.tarifa-card .precio { font-weight: 700; color: var(--azul); white-space: nowrap; }
.cotiza-box {
  background: #fff;
  border: 2px solid var(--verde);
  border-radius: var(--radio);
  padding: 2.2rem;
  max-width: 720px;
  margin: 0 auto;
  text-align: center;
  box-shadow: 0 6px 20px rgba(20, 122, 92, .08);
}
.cotiza-box h3 { font-size: 1.55rem; margin-bottom: .6rem; }
.cotiza-box p { color: var(--suave); margin-bottom: 1.4rem; }
.nota-pago {
  text-align: center;
  color: var(--suave);
  margin-top: 1.6rem;
  font-weight: 700;
}

/* Galeria */
.galeria {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1.3rem;
}
.galeria figure {
  border: 1px solid var(--borde);
  border-radius: var(--radio);
  overflow: hidden;
  cursor: pointer;
  background: #fff;
  margin: 0;
  box-shadow: 0 4px 12px rgba(11, 36, 66, .05);
}
.galeria img, .galeria video {
  width: 100%;
  height: 250px;
  object-fit: cover;
  background: #ffffff;
  border-bottom: 1px solid var(--borde);
  display: block;
}
.galeria figcaption {
  padding: .75rem .9rem;
  font-size: .9rem;
  color: var(--suave);
}
.galeria figcaption strong { display: block; color: var(--texto); margin-bottom: .2rem; }
.grupo-titulo { margin: 1.8rem 0 1rem; font-size: 1.4rem; }

/* Filtros */
.filtros {
  display: flex;
  flex-wrap: wrap;
  gap: .6rem;
  margin-bottom: 1.5rem;
}
.filtros a {
  text-decoration: none;
  border: 1px solid var(--azul);
  color: var(--azul);
  border-radius: 999px;
  padding: .4rem 1.05rem;
  font-size: .92rem;
  font-weight: 700;
}
.filtros a.activo, .filtros a:hover {
  background: var(--azul);
  color: #fff;
}

/* Contacto */
.contacto-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.2rem;
}
.dato { display: flex; gap: .8rem; margin-bottom: .75rem; align-items: baseline; }
.etiqueta {
  font-weight: 700;
  color: var(--azul-osc);
  min-width: 120px;
}
.redes { margin-top: .6rem; }
.redes a { margin-right: .8rem; text-decoration: none; }
.redes svg {
  width: 26px;
  height: 26px;
  fill: var(--azul);
  vertical-align: middle;
}
.redes a:hover svg { fill: var(--verde); }
.mapa { margin-top: 1.5rem; }
.mapa iframe {
  width: 100%;
  height: 300px;
  border: 0;
  border-radius: var(--radio);
}
.mapa-link { display: inline-block; margin-top: .5rem; font-weight: 700; }

/* Panel y formularios */
.panel {
  background: #fff;
  border: 1px solid var(--borde);
  border-radius: var(--radio);
  padding: 2rem;
  margin: 2rem 0;
}
.panel h1 { font-size: 1.8rem; margin-bottom: .6rem; }
.limpia label { display: block; font-weight: 700; margin-top: 1rem; }
.limpia input, .limpia textarea, .limpia select {
  width: 100%;
  padding: .65rem .8rem;
  margin-top: .3rem;
  border: 1px solid var(--borde);
  border-radius: 8px;
  font-size: 1rem;
  font-family: inherit;
}
.limpia button.btn { margin-top: 1.3rem; }
.login-caja { max-width: 430px; margin-left: auto; margin-right: auto; }
.tabla { width: 100%; border-collapse: collapse; margin: 1rem 0; }
.tabla th, .tabla td {
  padding: .6rem .7rem;
  border-top: 1px solid var(--borde);
  text-align: left;
  vertical-align: middle;
}
.tabla th { background: var(--fondo-alt); }
.mini { height: 48px; border-radius: 6px; }
.acciones { display: flex; gap: .5rem; align-items: center; }

/* Visitas */
.visitas-tiles {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin: 1.2rem 0 1.8rem;
}
.vtile {
  border: 1px solid var(--borde);
  border-radius: var(--radio);
  padding: 1rem;
  text-align: center;
}
.vtile .n { font-size: 2rem; font-weight: 700; color: var(--azul-osc); }
.vtile .t { color: var(--suave); font-size: .9rem; }
.vtile.real .n { color: var(--verde-osc); }
.vtile.wsp .n { color: var(--wsp); }

/* Footer */
footer.site {
  background: var(--azul-osc);
  color: #dce6f0;
  padding: 2.4rem 0;
  margin-top: 2rem;
}
footer.site .brand {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.35rem;
  color: #fff;
}
footer.site p { margin-top: .45rem; }
footer.site a { color: #9fd8c3; }
footer.site .redes svg { fill: #dce6f0; }
.admin-link { font-size: .9rem; }
.credito { font-size: .85rem; color: #9db0c4; margin-top: .8rem; }

/* WhatsApp flotante */
.wsp-flotante {
  position: fixed;
  right: 1.2rem;
  bottom: 1.2rem;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: var(--wsp);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, .25);
  z-index: 40;
}
.wsp-flotante svg { width: 32px; height: 32px; fill: #fff; }

/* Lightbox */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(10, 25, 45, .88);
  z-index: 50;
  align-items: center;
  justify-content: center;
}
.lightbox.abierto { display: flex; }
.lightbox img, .lightbox video { max-width: 92vw; max-height: 88vh; }
.lightbox .cerrar {
  position: absolute;
  top: 1rem;
  right: 1.4rem;
  background: none;
  border: none;
  color: #fff;
  font-size: 2.4rem;
  cursor: pointer;
}

@media (max-width: 820px) {
  .hero-int { padding: 3.2rem 1.2rem; }
  .hero h1 { font-size: 2.2rem; }
  .confianza { grid-template-columns: 1fr; }
  .servicios-grid-4 { grid-template-columns: 1fr; }
  .sobre { grid-template-columns: 1fr; }
  .directivos-grid { grid-template-columns: 1fr; }
  .directivo-card { grid-template-columns: 1fr; text-align: center; justify-items: center; }
  .contacto-grid { grid-template-columns: 1fr; }
  .visitas-tiles { grid-template-columns: 1fr 1fr; }
  header.site .container { flex-direction: column; align-items: flex-start; }
}
