/* =====================================
   MARÍN MOYA INVERSIONES
   Inversiones con propósito
   Estilo corporativo premium
   ===================================== */

:root {
  --verde-oscuro: #0e2a2a;
  --azul-petroleo: #1f3a4a;
  --dorado: #c6a15b;
  --verde: #0e2a2a;
  --verde2: #162c2c;
  --dorado2: #e8c97a;
  --marfil: #f9f6f1;
  --warm: #f2ede6;
  --gris: #888;
  --borde: #e2ddd6;
  --negro: #0d0d0d;
  --gris-fondo: #f5f6f7;
  --gris-texto: #2f2f2f;
  --blanco: #ffffff;
}

@keyframes slideUp { from{opacity:0;transform:translateY(20px)} to{opacity:1;transform:translateY(0)} }
@keyframes fadeIn { from{opacity:0} to{opacity:1} }
@keyframes popIn { from{opacity:0;transform:scale(.88)} to{opacity:1;transform:scale(1)} }

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  background-color: var(--gris-fondo);
  color: var(--gris-texto);
}

/* =====================
   HEADER DE MARCA
   ===================== */
.header {
  background: linear-gradient(135deg, var(--verde-oscuro), var(--azul-petroleo));
  padding: 28px 0;
  text-align: center;
}

.header h1 {
  margin: 0;
  color: var(--blanco);
  font-size: 32px;
  letter-spacing: 2px;
}

.header span {
  display: block;
  margin-top: 6px;
  font-size: 14px;
  color: var(--dorado);
  letter-spacing: 1px;
}

.header-nav {
  margin-top: 15px;
}

.header-nav a, .header-nav span {
  color: var(--blanco);
  font-size: 14px;
  margin: 0 10px;
  font-weight: 500;
}

/* =====================
   CONTENEDOR GENERAL
   ===================== */
.container {
  max-width: 1100px;
  margin: 40px auto;
  background: var(--blanco);
  padding: 32px 36px;
  border-radius: 14px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.08);
}

/* =====================
   TÍTULOS
   ===================== */
h2 {
  margin-top: 0;
  color: var(--azul-petroleo);
  border-bottom: 2px solid var(--dorado);
  padding-bottom: 10px;
}

/* =====================
   ENLACES
   ===================== */
a {
  color: var(--azul-petroleo);
  text-decoration: none;
  font-weight: 500;
}

a:hover {
  color: var(--dorado);
}

/* =====================
   BOTÓN PRINCIPAL
   ===================== */
.btn {
  display: inline-block;
  background: var(--dorado);
  color: var(--blanco);
  padding: 12px 22px;
  border-radius: 10px;
  font-weight: 600;
  margin-bottom: 22px;
  transition: all 0.2s ease;
}

.btn:hover {
  background: #b08b45;
  color: var(--blanco);
}

/* =====================
   GRID DE INMUEBLES
   ===================== */
.inmuebles-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr); /* 3 columnas */
  gap: 30px;
  margin-top: 30px;
}

.card-inmueble {
  display: flex;
  flex-direction: column;
  background: var(--blanco);
  border-radius: 8px;
  border-bottom: 4px solid var(--azul-petroleo);
  box-shadow: 0 4px 15px rgba(0,0,0,0.05);
  overflow: hidden;
  transition: all 0.2s ease;
}

.card-inmueble:hover {
  transform: translateY(-5px);
  border-bottom-color: var(--dorado);
  box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

.card-photo {
  width: 100%;
  height: 200px;
  background: #eee;
  overflow: hidden;
}

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

.no-photo {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: #999;
  font-size: 14px;
}

.card-body {
  padding: 15px;
}

.card-body h3 {
  margin: 0 0 10px 0;
  font-size: 18px;
  color: var(--azul-petroleo);
}

/* =====================
   ACCIONES LISTADO
   ===================== */
.acciones-lista {
  display: flex;
  gap: 15px;
  align-items: center;
}

.btn-accion {
  font-size: 18px;
  transition: transform 0.2s;
  cursor: pointer;
}

.btn-accion:hover {
  transform: scale(1.2);
}

/* =====================
   FORMULARIOS
   ===================== */
label {
  font-weight: 600;
  color: var(--azul-petroleo);
}

input,
select,
textarea {
  width: 100%;
  max-width: 560px;
  padding: 10px 12px;
  margin-top: 6px;
  margin-bottom: 18px;
  border: 1px solid #ccc;
  border-radius: 8px;
  font-size: 14px;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--dorado);
}

/* =====================
   BOTONES FORM
   ===================== */
button {
  background: var(--azul-petroleo);
  color: var(--blanco);
  padding: 12px 22px;
  border: none;
  border-radius: 10px;
  font-weight: 600;
  cursor: pointer;
}

button:hover {
  opacity: 0.9;
}

/* =====================
   DETALLE INMUEBLE
   ===================== */
.detalle-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 25px;
}

.precio-tag {
  font-size: 28px;
  color: var(--verde-oscuro);
  font-weight: 700;
}

.detalle-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin: 30px 0;
  padding: 20px;
  background: #fcfcfc;
  border-radius: 12px;
  border: 1px solid #eee;
}

.info-item {
  display: flex;
  flex-direction: row;
  gap: 15px; /* Aumentamos el espacio para que no se vea pegado */
  align-items: baseline;
  margin-bottom: 5px;
}

.info-label {
  font-size: 12px;
  text-transform: uppercase;
  color: #7f8c8d;
  letter-spacing: 1px;
  margin-bottom: 4px;
  min-width: 100px; /* Asegura que las etiquetas tengan un ancho base */
}

.info-value {
  font-size: 16px;
  font-weight: 600;
  color: var(--azul-petroleo);
}

/* =====================
   CARRUSEL
   ===================== */
.carousel-container {
  position: relative;
  width: 100%;
  height: 500px;
  overflow: hidden;
  border-radius: 15px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.15);
  margin-bottom: 30px;
  background-color: #000; /* Fondo negro por si la imagen carga o es pequeña */
}

.carousel-slide {
  display: none; /* Asegura que no se vean inicialmente */
  width: 100%;
  height: 500px; /* Tamaño fijo para el contenedor del slide */
}

/* Esta es la regla que faltaba para mostrar la imagen */
.carousel-slide.active {
  display: block;
}

.carousel-slide img {
  width: 100%;
  height: 500px; /* Fuerza a todas las imágenes a medir 500px de alto */
  object-fit: cover; /* Adapta la imagen: recorta los bordes sobrantes para llenar el espacio sin deformarse */
}

.carousel-nav {
  position: absolute;
  top: 50%;
  width: 100%;
  display: flex;
  justify-content: space-between;
  transform: translateY(-50%);
  padding: 0 20px;
}

.nav-btn {
  background: rgba(255, 255, 255, 0.8);
  color: var(--azul-petroleo);
  border: none;
  width: 45px;
  height: 45px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 20px;
  transition: 0.3s;
}

.nav-btn:hover {
  background: var(--dorado);
  color: white;
}

/* =====================
   ICONO VER CONTRASEÑA
   ===================== */
.toggle-password {
  margin-left: -35px;
  cursor: pointer;
  position: relative;
  z-index: 10;
  user-select: none;
  color: var(--azul-petroleo);
}

/* =====================
   TEXTOS DE AYUDA (HELP TEXT)
   ===================== */
/* Ocultar por defecto */
.helptext {
  display: none;
  font-size: 12px;
  color: #7f8c8d;
  margin-top: -10px;
  margin-bottom: 15px;
}

/* Mostrar solo cuando el campo tiene el foco */
input:focus ~ .helptext {
  display: block;
}

/* ─── CURSOR ─── */
#cursor {
  width: 10px; height: 10px;
  background: var(--dorado); border-radius: 50%;
  position: fixed; top: 0; left: 0;
  pointer-events: none; z-index: 99999;
  transform: translate(-50%,-50%);
  display: none;
  transition: width .25s, height .25s, background .25s;
}
#cursor.grow { width: 36px; height: 36px; background: transparent; border: 1px solid var(--dorado); }
@media (hover:hover) and (pointer:fine) { #cursor { display: block; } }
