/*
 * Edgar Molina - Asesoría Inmobiliaria y Jurídica
 * Estilos Modernos & Premium - Rediseño 2025
 */

:root {
  /* Paleta de Colores Premium */
  --primary-color: #0f2c59; /* Azul Marino Profundo */
  --primary-dark: #051a3d; /* Azul Noche */
  --secondary-color: #c4a462; /* Dorado Ocre */
  --secondary-light: #e0c586; /* Dorado Claro */
  --accent-color: #daa520; /* Goldenrod */

  --text-color: #2c3e50; /* Gris Oscuro Elegante */
  --text-light: #ecf0f1; /* Blanco Suave */
  --text-muted: #7f8c8d; /* Gris Muted */

  --bg-light: #fdfdfd; /* Casi Blanco */
  --bg-white: #ffffff;
  --bg-warm: #f9f7f2; /* Beige muy sutil */

  --shadow-soft: 0 10px 30px rgba(0, 0, 0, 0.05);
  --shadow-hover: 0 20px 40px rgba(15, 44, 89, 0.15);

  --glass-bg: rgba(255, 255, 255, 0.85);
  --glass-border: 1px solid rgba(255, 255, 255, 0.3);

  --transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
  --border-radius: 12px;
  --container-padding: 1.5rem;
}

/* Reset y estilos base modernos */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: "Poppins", sans-serif;
  line-height: 1.7;
  color: var(--text-color);
  background-color: var(--bg-warm);
  overflow-x: hidden;
}

/* Tipografía elegante */
h1,
h2,
h3,
h4 {
  font-family: "Montserrat", sans-serif;
  font-weight: 700;
  line-height: 1.2;
  color: var(--primary-color);
  letter-spacing: -0.5px;
}

h1 {
  font-size: 3rem;
  margin-bottom: 1.5rem;
}
h2 {
  font-size: 2.25rem;
  margin-bottom: 1rem;
}
h3 {
  font-size: 1.5rem;
  margin-bottom: 0.75rem;
}

p {
  margin-bottom: 1rem;
}

a {
  text-decoration: none;
  color: inherit;
  transition: var(--transition);
}

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

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

/* Glassmorphism Utilities */
.glass {
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: var(--glass-border);
}

/* Animaciones de Entrada (Scroll Reveal) */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s ease-out;
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

/* Loader Styles */
#preloader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: var(--primary-color);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  transition: opacity 0.5s ease-out, visibility 0.5s ease-out;
}

.loader-content img {
  width: 120px;
    width: 120px;
    animation: pulse-logo 2s infinite ease-in-out;
}

.loader-bar {
    width: 200px;
    height: 3px;
    background: rgba(255,255,255,0.1);
    margin-top: 20px;
    border-radius: 3px;
    overflow: hidden;
}

.loader-progress {
    width: 0%;
    height: 100%;
    background: var(--secondary-color);
    animation: load-progress 1.5s ease-out forwards;
}

@keyframes pulse-logo {
    0% { transform: scale(1); opacity: 0.8; }
    50% { transform: scale(1.05); opacity: 1; }
    100% { transform: scale(1); opacity: 0.8; }
}

@keyframes load-progress {
    0% { width: 0%; }
    100% { width: 100%; }
}

/* Botones Premium */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 2rem;
    border-radius: 50px; /* Pill shape is more modern */
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 1px;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    font-family: 'Montserrat', sans-serif;
    gap: 0.5rem;
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: linear-gradient(135deg, var(--secondary-color), var(--accent-color));
    color: #fff;
    box-shadow: 0 4px 15px rgba(196, 164, 98, 0.4);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(196, 164, 98, 0.6);
    background: linear-gradient(135deg, var(--accent-color), var(--secondary-color));
}

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

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

.section-title {
  text-align: center;
  margin-bottom: 0.5rem;
  color: var(--primary-color);
  position: relative;
}

.section-title::after {
  content: "";
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 3px;
  background-color: var(--secondary-color);
}

.section-subtitle {
  text-align: center;
  color: var(--light-color);
  margin-bottom: 2.5rem;
  font-size: 1.1rem;
}

/* Navegación */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background-color: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 1000;
  padding: 0;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--text-light);
}

.logo-img {
  height: 80px;
  width: auto;
  object-fit: contain;
}

.nav-menu {
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 70px;
  left: -100%;
  width: 100%;
  background-color: #ffffff;
  text-align: center;
  transition: var(--transition);
  box-shadow: 0 10px 27px rgba(0, 0, 0, 0.05);
  z-index: 999;
  padding: 2rem 0;
  border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.nav-menu.active {
  left: 0;
}

.nav-menu .nav-link {
  color: var(--primary-color);
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.nav-link {
  color: var(--dark-color);
  padding: 1rem;
  display: block;
  font-size: 1.1rem;
  transition: var(--transition);
  position: relative;
}

.mobile-social-icons {
  display: none;
  justify-content: center;
  gap: 1.5rem;
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.mobile-social-icons a {
  color: var(--primary-color);
  font-size: 1.5rem;
  transition: var(--transition);
}

.mobile-social-icons a:hover {
  color: var(--secondary-color);
}

@media (max-width: 768px) {
  .mobile-social-icons {
    display: flex;
    width: 100%;
  }
}

.nav-link:hover,
.nav-link.active {
  color: var(--secondary-color);
}

.nav-link.active::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 30px;
  height: 2px;
  background-color: var(--secondary-color);
}

.admin-login {
  background-color: rgba(196, 164, 98, 0.2);
  border-radius: var(--border-radius);
  margin: 0.5rem 1rem;
}

.admin-login:hover {
  background-color: rgba(196, 164, 98, 0.3);
}

.menu-toggle {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 30px;
  height: 21px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
}

.bar {
  height: 3px;
  width: 100%;
  background-color: var(--primary-color);
  border-radius: 10px;
  transition: var(--transition);
}

.menu-toggle.active .bar:nth-child(1) {
  transform: rotate(-45deg) translate(-5px, 6px);
}

.menu-toggle.active .bar:nth-child(2) {
  opacity: 0;
}

.menu-toggle.active .bar:nth-child(3) {
  transform: rotate(45deg) translate(-5px, -6px);
}

/* Sección Hero */
.hero {
  position: relative;
  height: 100vh;
  min-height: 600px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--text-light);
  overflow: hidden;
}

.bg-video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -2;
}

.video-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(15, 44, 89, 0.7);
  z-index: -1;
}

.hero-content {
  position: relative;
  z-index: 1;
  padding: 2rem;
  max-width: 800px;
}

.hero-title {
  font-size: 2.2rem;
  margin-bottom: 1.5rem;
  line-height: 1.3;
}

.highlight {
  color: var(--secondary-color);
  display: block;
}

.subtitle {
  display: block;
  font-size: 1.5rem;
  font-weight: 400;
  margin-top: 0.5rem;
}

.hero-text {
  font-size: 1.1rem;
  margin-bottom: 2rem;
  opacity: 0.9;
  line-height: 1.6;
}

.hero-buttons {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: center;
}

.scroll-indicator {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  color: var(--text-light);
  font-size: 1.5rem;
  animation: bounce 2s infinite;
}

@keyframes bounce {
  0%,
  20%,
  50%,
  80%,
  100% {
    transform: translateY(0) translateX(-50%);
  }
  40% {
    transform: translateY(-10px) translateX(-50%);
  }
  60% {
    transform: translateY(-5px) translateX(-50%);
  }
}

/* Sección Catálogo */
.catalog-section {
  padding: 5rem 0;
  background-color: var(--bg-light);
}

.properties-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  margin-top: 2rem;
}

.property-card {
  background-color: white;
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: var(--transition);
}

.property-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.property-image {
  height: 200px;
  width: 100%;
  object-fit: cover;
}

.property-content {
  padding: 1.5rem;
}

.property-title {
  font-size: 1.3rem;
  color: var(--primary-color);
  margin-bottom: 0.5rem;
}

.property-neighborhood {
  color: var(--secondary-color);
  font-weight: 500;
  margin-bottom: 0.5rem;
}

.property-price {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--primary-color);
  margin-bottom: 1rem;
}

.property-description {
  color: #666;
  font-size: 0.9rem;
  line-height: 1.5;
  margin-bottom: 1rem;
}

.property-status {
  display: inline-block;
  padding: 0.3rem 0.8rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 500;
  text-transform: uppercase;
}

.status-disponible {
  background-color: #e8f5e9;
  color: #2e7d32;
}

.status-vendido {
  background-color: #ffebee;
  color: #c62828;
}

.status-reservado {
  background-color: #fff3e0;
  color: #ef6c00;
}

.loading-spinner {
  grid-column: 1 / -1;
  text-align: center;
  padding: 3rem;
}

.spinner {
  border: 4px solid rgba(15, 44, 89, 0.1);
  border-left-color: var(--primary-color);
  border-radius: 50%;
  width: 50px;
  height: 50px;
  animation: spin 1s linear infinite;
  margin: 0 auto 1rem;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Sección Galería */
.gallery-section {
  padding: 5rem 0;
  background-color: var(--primary-color);
  color: var(--text-light);
}

.gallery-section .section-title {
  color: var(--text-light);
}

.gallery-section .section-subtitle {
  color: var(--light-color);
}

/* Carrusel */
.carousel-container {
  position: relative;
  width: 100%;
  height: 400px;
  margin: 0 auto 3rem;
  overflow: hidden;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
}

.carousel {
  display: flex;
  height: 100%;
  transition: transform 0.5s ease;
}

.carousel-slide {
  min-width: 100%;
  height: 100%;
  position: relative;
}

.carousel-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.carousel-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: 1.5rem;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
  color: white;
}

.carousel-caption h3 {
  font-size: 1.3rem;
  margin-bottom: 0.5rem;
}

.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background-color: rgba(255, 255, 255, 0.2);
  color: white;
  border: none;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  font-size: 1.2rem;
  cursor: pointer;
  transition: var(--transition);
  backdrop-filter: blur(5px);
  display: flex;
  align-items: center;
  justify-content: center;
}

.carousel-btn:hover {
  background-color: rgba(255, 255, 255, 0.3);
}

.prev {
  left: 20px;
}

.next {
  right: 20px;
}

.carousel-dots {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
}

.dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  transition: var(--transition);
}

.dot.active {
  background-color: var(--secondary-color);
  transform: scale(1.2);
}

/* Grid de Galería */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1rem;
  margin-top: 2rem;
}

.gallery-item {
  position: relative;
  border-radius: var(--border-radius);
  overflow: hidden;
  height: 250px;
  cursor: pointer;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition);
}

.gallery-item:hover img {
  transform: scale(1.05);
}

.gallery-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: 1rem;
  background: linear-gradient(to top, rgba(15, 44, 89, 0.8), transparent);
  color: white;
  transform: translateY(100%);
  transition: var(--transition);
}

.gallery-item:hover .gallery-overlay {
  transform: translateY(0);
}

/* Sección Contacto */
.contact-section {
  padding: 5rem 0;
  background-color: var(--bg-light);
}

.contact-container {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
}

.contact-info {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

.contact-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

.contact-item i {
  color: var(--secondary-color);
  font-size: 1.5rem;
  margin-top: 0.3rem;
}

.contact-item h3 {
  font-size: 1.2rem;
  margin-bottom: 0.3rem;
  color: var(--primary-color);
}

.contact-item p {
  margin-bottom: 0.3rem;
  color: #666;
  font-size: 0.95rem;
}

.contact-form {
  background-color: white;
  padding: 2rem;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.8rem 1rem;
  border: 1px solid #ddd;
  border-radius: var(--border-radius);
  font-family: "Poppins", sans-serif;
  font-size: 1rem;
  transition: var(--transition);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--secondary-color);
  box-shadow: 0 0 0 3px rgba(196, 164, 98, 0.2);
}

.form-group textarea {
  resize: vertical;
}

/* Footer */
.footer {
  background-color: #ffffff;
  color: var(--primary-color);
  padding: 3rem 0 1.5rem;
  border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.footer-content {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-brand p {
  margin: 1rem 0;
  color: var(--dark-color);
  opacity: 0.8;
}

.social-icons {
  display: flex;
  gap: 1rem;
  margin-top: 1rem;
}

.social-icons a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background-color: var(--primary-color);
  border-radius: 50%;
  color: #ffffff;
  transition: var(--transition);
}

.social-icons a:hover {
  background-color: var(--secondary-color);
  color: var(--primary-color);
  transform: translateY(-3px);
}

.footer-links h3,
.footer-services h3 {
  font-size: 1.2rem;
  margin-bottom: 1rem;
  color: var(--secondary-color);
}

.footer-links ul,
.footer-services ul {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

.footer-links a,
.footer-services a {
  color: var(--black-color);
  opacity: 0.8;
  transition: var(--transition);
}

.footer-links a:hover,
.footer-services a:hover {
  color: var(--black-color);
  opacity: 1;
  padding-left: 5px;
}

.footer-bottom {
  text-align: center;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--black-color);
  opacity: 0.7;
  font-size: 0.9rem;
}

.footer-bottom p {
  margin-bottom: 0.5rem;
}

.footer-bottom .fa-heart {
  color: #ff4757;
}

/* Media Queries para Escritorio */
@media (min-width: 768px) {
  :root {
    --container-padding: 2rem;
  }

  h1 {
    font-size: 3.5rem;
  }

  h2 {
    font-size: 2.5rem;
  }

  /* Navegación */
  .menu-toggle {
    display: none;
  }

  .nav-menu {
    position: static;
    flex-direction: row;
    width: auto;
    background: transparent;
    padding: 0;
    border-top: none;
    box-shadow: none;
  }

  .nav-link {
    padding: 0.5rem 1rem;
    font-size: 1rem;
  }

  /* Hero */
  .hero-title {
    font-size: 3.5rem;
  }

  .subtitle {
    font-size: 2rem;
  }

  .hero-text {
    font-size: 1.2rem;
  }

  .hero-buttons {
    flex-direction: row;
    justify-content: center;
    gap: 1.5rem;
  }

  /* Catálogo */
  .properties-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Galería */
  .gallery-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  /* Contacto */
  .contact-container {
    grid-template-columns: 1fr 1fr;
  }

  .contact-info {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Footer */
  .footer-content {
    grid-template-columns: 2fr 1fr 1fr;
  }
}

@media (min-width: 1024px) {
  .properties-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .hero-title {
    font-size: 4rem;
  }
}

/* Estilos para el carrusel de propiedades destacadas */
.featured-carousel-container {
  margin-bottom: 4rem;
}

.featured-carousel-container .carousel-container {
  height: 500px;
  margin-bottom: 0;
}

.featured-carousel-container .carousel-slide {
  position: relative;
  cursor: pointer;
}

.featured-carousel-container .carousel-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.featured-slide-content {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to top, rgba(15, 44, 89, 0.9), transparent);
  padding: 2rem;
  color: white;
}

.featured-slide-content .property-title {
  color: white;
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

.featured-slide-content .property-neighborhood {
  color: var(--secondary-color);
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}

.featured-slide-content .property-price {
  color: white;
  font-size: 1.8rem;
  margin-bottom: 1rem;
}

.featured-slide-content .property-description {
  color: rgba(255, 255, 255, 0.9);
  font-size: 1rem;
  margin-bottom: 1rem;
}

.featured-badge {
  position: absolute;
  top: 20px;
  right: 20px;
  background-color: var(--secondary-color);
  color: var(--primary-color);
  padding: 0.5rem 1rem;
  border-radius: var(--border-radius);
  font-weight: 600;
  font-size: 0.9rem;
  text-transform: uppercase;
}

/* Para dispositivos móviles */
@media (max-width: 767px) {
  .featured-carousel-container .carousel-container {
    height: 400px;
  }

  .featured-slide-content {
    padding: 1.5rem;
  }

  .featured-slide-content .property-title {
    font-size: 1.3rem;
  }

  .featured-slide-content .property-price {
    font-size: 1.5rem;
  }
}

/* Para tablets */
@media (min-width: 768px) and (max-width: 1023px) {
  .featured-carousel-container .carousel-container {
    height: 450px;
  }
}

.all-properties-section .section-title {
  font-size: 1.8rem;
  margin-bottom: 2rem;
  text-align: center;
}

.all-properties-section .section-title::after {
  width: 60px;
}
