﻿/* --------------------------
   Reset de márgenes y padding
---------------------------*/
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* --------------------------
   Tipografía base
---------------------------*/
body {
  font-family: 'Poppins', sans-serif; /* Fuente moderna, limpia y legible */
  line-height: 1.6;
  background-color: #f9f9f9;
  color: #333;
  padding: 0 20px;
}

/* --------------------------
   Colores base (para la identidad de CasasMex)
---------------------------*/
:root {
  --primary-color: #F16C35; /* Color primario, un naranja vibrante */
  --secondary-color: #005f73; /* Color secundario, un azul oscuro */
  --background-color: #ffffff; /* Fondo blanco para el contenido */
  --text-color: #333333; /* Texto principal en gris oscuro */
  --link-color: #F16C35; /* Color de los enlaces (igual que el primario) */
  --hover-color: #003e4d; /* Hover color para enlaces */
  --button-color: #ff5733; /* Color de los botones */
  --footer-color: #222222; /* Color de fondo del footer */
  --card-shadow: rgba(0, 0, 0, 0.1); /* Sombra suave para tarjetas */
}

/* --------------------------
   Estilos generales
---------------------------*/
a {
  text-decoration: none;
  color: var(--link-color);
}

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

/* --------------------------
   Estilos de Header
---------------------------*/
header {
  background-color: var(--primary-color);
  color: white;
  text-align: center;
  padding: 20px 0;
}

header h1 {
  font-size: 2.8rem;
  font-weight: 700;
  margin-bottom: 10px;
}

header p {
  font-size: 1.2rem;
  margin-top: 5px;
}

/* --------------------------
   Estilos de Footer
---------------------------*/
footer {
  background-color: var(--footer-color);
  color: white;
  text-align: center;
  padding: 30px 0;
}

footer p {
  margin: 10px 0;
}

footer a {
  color: white;
  font-weight: bold;
}

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

/* --------------------------
   Estilos del Contenedor Principal
---------------------------*/
.container {
  width: 90%;
  margin: 0 auto;
  padding: 20px;
  background-color: var(--background-color);
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

/* --------------------------
   Estilos de las tarjetas de propiedades
---------------------------*/
.estados-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
  margin-top: 40px;
}

article {
  background-color: var(--background-color);
  box-shadow: 0 4px 10px var(--card-shadow);
  border-radius: 8px;
  overflow: hidden;
  transition: transform 0.3s ease-in-out;
}

article:hover {
  transform: translateY(-5px);
}

article img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  border-bottom: 2px solid #ddd;
}

article h2 {
  font-size: 1.6rem;
  color: var(--primary-color);
  margin: 15px;
}

article p {
  font-size: 1rem;
  color: #555;
  padding: 0 15px;
  margin-bottom: 20px;
}

.detalle-link {
  display: inline-block;
  font-weight: bold;
  color: var(--secondary-color);
  padding: 10px;
  margin-left: 15px;
  border: 2px solid var(--secondary-color);
  border-radius: 5px;
  transition: background-color 0.3s ease;
}

.detalle-link:hover {
  background-color: var(--secondary-color);
  color: white;
}

/* --------------------------
   Estilos de los botones
---------------------------*/
.btn {
  background-color: var(--button-color);
  color: white;
  padding: 12px 24px;
  font-size: 1.2rem;
  text-align: center;
  border-radius: 5px;
  display: inline-block;
  margin-top: 20px;
  transition: background-color 0.3s ease, transform 0.2s ease;
}

.btn:hover {
  background-color: #d74c1c;
  transform: translateY(-3px);
}

.btn:active {
  transform: translateY(0);
}

/* --------------------------
   Estilos para el contenedor de video
---------------------------*/
.video-container {
  position: relative;
  width: 100%;
  max-width: 640px;
  margin: 40px auto;
}

.video-container img {
  width: 100%;
  border-radius: 8px;
  transition: opacity 0.3s ease;
}

.video-container:hover img {
  opacity: 0.7;
}

.video-container .play-button {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background-color: rgba(0, 87, 115, 0.8);
  color: white;
  font-size: 3rem;
  padding: 10px;
  border-radius: 50%;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.video-container:hover .play-button {
  background-color: rgba(0, 87, 115, 1);
}

/* --------------------------
   Estilos de secciones de texto
---------------------------*/
section {
  margin-top: 30px;
}

section h3 {
  font-size: 2rem;
  color: var(--primary-color);
  margin-bottom: 20px;
}

section p {
  font-size: 1.1rem;
  line-height: 1.6;
  color: #666;
  margin-bottom: 20px;
}

section ul {
  list-style: none;
  padding-left: 20px;
}

section li {
  font-size: 1rem;
  color: #555;
}

/* --------------------------
   Media Queries para dispositivos móviles
---------------------------*/
@media (max-width: 768px) {
  header h1 {
    font-size: 2rem;
  }

  .container {
    width: 100%;
    padding: 10px;
  }

  .estados-grid {
    grid-template-columns: 1fr 1fr;
  }

  article h2 {
    font-size: 1.4rem;
  }

  .btn {
    font-size: 1rem;
    padding: 10px 20px;
  }

  .video-container img {
    height: 300px;
  }
}

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

  header h1 {
    font-size: 1.8rem;
  }

  .btn {
    font-size: 1rem;
    padding: 8px 16px;
  }
}
