/* Estilos globales — Fernando Álvarez Inmobiliario */

:root {
  --verde-900: #1C3A2E;
  --dorado-500: #C9A84C;
  --crema-100: #F5F0E8;
}

html { scroll-behavior: smooth; }
body { overflow-x: hidden; }

h1, h2, h3, h4 {
  font-family: 'Playfair Display', Georgia, serif;
  letter-spacing: -0.02em;
}

*:focus-visible {
  outline: 2px solid #C9A84C;
  outline-offset: 2px;
}

/* Botones */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border-radius: 2px;
  background-color: #1C3A2E;
  padding: 0.75rem 1.5rem;
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: #fff;
  transition: background-color 0.2s;
  text-decoration: none;
  border: none;
  cursor: pointer;
}
.btn-primary:hover { background-color: #1e5548; }
.btn-primary:focus { outline: 2px solid #C9A84C; outline-offset: 2px; }
.btn-primary:disabled { opacity: 0.6; cursor: not-allowed; }

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border-radius: 2px;
  border: 1px solid #1C3A2E;
  padding: 0.75rem 1.5rem;
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: #1C3A2E;
  transition: all 0.2s;
  text-decoration: none;
  background: transparent;
  cursor: pointer;
}
.btn-secondary:hover { background-color: #1C3A2E; color: #fff; }

.btn-dorado {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border-radius: 2px;
  background-color: #C9A84C;
  padding: 0.75rem 1.5rem;
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: #fff;
  transition: background-color 0.2s;
  text-decoration: none;
  border: none;
  cursor: pointer;
}
.btn-dorado:hover { background-color: #a8841f; }

/* Input */
.input-field {
  width: 100%;
  border-radius: 2px;
  border: 1px solid #e5e7eb;
  background-color: #fff;
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
  color: #111827;
  transition: border-color 0.2s;
  font-family: inherit;
}
.input-field::placeholder { color: #9ca3af; }
.input-field:focus {
  border-color: #1C3A2E;
  outline: none;
  box-shadow: 0 0 0 1px #1C3A2E;
}

/* Card anuncio */
.card-anuncio {
  overflow: hidden;
  border-radius: 2px;
  border: 1px solid #f3f4f6;
  background-color: #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,0.07);
  transition: transform 0.3s, box-shadow 0.3s;
  text-decoration: none;
  display: block;
}
.card-anuncio:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}
.card-anuncio .card-img {
  position: relative;
  aspect-ratio: 4/3;
  overflow: hidden;
  background-color: #F5F0E8;
}
.card-anuncio .card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s;
}
.card-anuncio:hover .card-img img { transform: scale(1.05); }

/* Divisor dorado */
.gold-divider {
  height: 2px;
  width: 4rem;
  background-color: #C9A84C;
  margin: 0 auto;
}
.gold-divider.ml-0 { margin-left: 0; }

/* Skeleton */
.skeleton { animation: pulse 1.5s ease-in-out infinite; border-radius: 4px; background-color: #e5e7eb; }
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:0.5} }

/* Galería */
.gallery-main { position: relative; aspect-ratio: 16/9; overflow: hidden; border-radius: 2px; background: #F5F0E8; }
.gallery-main img { width: 100%; height: 100%; object-fit: cover; }
.gallery-nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  background: rgba(0,0,0,0.5);
  color: #fff;
  border: none;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.2s;
}
.gallery-main:hover .gallery-nav-btn { opacity: 1; }
.gallery-nav-btn:hover { background: rgba(0,0,0,0.7); }
.gallery-counter {
  position: absolute;
  bottom: 0.75rem;
  right: 0.75rem;
  background: rgba(0,0,0,0.5);
  color: #fff;
  font-size: 0.75rem;
  padding: 0.25rem 0.5rem;
  border-radius: 999px;
}
.gallery-zoom-btn {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  background: rgba(0,0,0,0.5);
  color: #fff;
  border: none;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.2s;
}
.gallery-main:hover .gallery-zoom-btn { opacity: 1; }

/* Lightbox */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 50;
  background: rgba(0,0,0,0.95);
  align-items: center;
  justify-content: center;
}
.lightbox.open { display: flex; }
.lightbox img { max-height: 90vh; max-width: calc(100vw - 4rem); object-fit: contain; }

/* Admin layout */
.admin-sidebar {
  width: 240px;
  min-height: 100vh;
  background-color: #1C3A2E;
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
}
.admin-content {
  margin-left: 240px;
  min-height: 100vh;
  background-color: #f9fafb;
}
@media (max-width: 768px) {
  .admin-sidebar { display: none; }
  .admin-content { margin-left: 0; }
}

/* Badge tipo */
.badge-tipo {
  display: inline-block;
  border-radius: 2px;
  background-color: #1C3A2E;
  padding: 0.125rem 0.5rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: #fff;
}

/* Hero animaciones CSS */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(30px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes bounce {
  0%,100% { transform: translateX(-50%) translateY(0); }
  50%      { transform: translateX(-50%) translateY(8px); }
}
.hero-content { animation: fadeInUp 0.8s ease-out forwards; }
.scroll-indicator { animation: bounce 2s infinite; }
