:root {
  --azul: #243D73;
  --rosado: #C03768;
  --blanco: #FFFFFF;
  --gris-fondo: #F6F7FA;
  --gris-borde: #E5E7EB;
  --texto: #1F2937;
  --texto-suave: #6B7280;
  --sombra: 0 18px 45px rgba(31, 41, 55, 0.10);
  --radio: 22px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: "Roboto Condensed", "Arial Narrow", Arial, sans-serif;
  color: var(--texto);
  background: var(--blanco);
  line-height: 1.5;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
.container { width: min(1160px, calc(100% - 36px)); margin: 0 auto; }

.topbar { background: var(--azul); color: var(--blanco); font-size: 0.95rem; }
.topbar .container { display: flex; justify-content: space-between; gap: 18px; padding: 9px 0; flex-wrap: wrap; }

.header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,0.94);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(229,231,235,0.8);
}
.nav { min-height: 78px; display: flex; align-items: center; justify-content: space-between; gap: 22px; }
.brand { display: flex; align-items: center; gap: 12px; font-weight: 700; letter-spacing: -0.02em; color: var(--azul); font-size: 1.2rem; }
.brand img { width: 54px; height: 54px; object-fit: contain; }
.menu { display: flex; align-items: center; gap: 22px; color: var(--azul); font-weight: 600; }
.menu a { position: relative; padding: 8px 0; }
.menu a::after {
  content: ""; position: absolute; height: 2px; width: 0; left: 0; bottom: 2px;
  background: var(--rosado); transition: width 0.25s ease;
}
.menu a:hover::after, .menu a.active::after { width: 100%; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 0; border-radius: 999px; padding: 13px 22px;
  font-family: inherit; font-weight: 700; cursor: pointer;
  transition: transform .22s ease, box-shadow .22s ease, background .22s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { color: var(--blanco); background: var(--rosado); box-shadow: 0 12px 26px rgba(192, 55, 104, 0.28); }
.btn-primary:hover { box-shadow: 0 16px 34px rgba(192, 55, 104, 0.34); }
.btn-outline { color: var(--azul); border: 1px solid rgba(36, 61, 115, 0.22); background: var(--blanco); }
.btn-outline:hover { border-color: var(--rosado); color: var(--rosado); }

.mobile-toggle {
  display: none; border: 0; background: var(--gris-fondo); color: var(--azul);
  border-radius: 14px; font-size: 1.3rem; padding: 10px 13px; cursor: pointer;
}

.hero {
  position: relative; overflow: hidden;
  background: linear-gradient(105deg, rgba(36,61,115,.95), rgba(36,61,115,.72)),
    url("https://images.unsplash.com/photo-1600607687939-ce8a6c25118c?auto=format&fit=crop&w=1800&q=80") center/cover;
  color: var(--blanco);
}
.hero::after {
  content: ""; position: absolute; width: 420px; height: 420px; right: -120px; bottom: -180px;
  border-radius: 50%; background: rgba(192,55,104,.24);
}
.hero-content {
  position: relative; z-index: 2; min-height: 620px; display: grid; align-items: center;
  grid-template-columns: 1.08fr .92fr; gap: 38px; padding: 76px 0;
}
.kicker {
  display: inline-flex; align-items: center; gap: 8px; background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.20); padding: 8px 14px; border-radius: 999px;
  font-weight: 700; margin-bottom: 18px;
}
.hero h1 { font-size: clamp(3rem, 7vw, 6.8rem); line-height: .9; letter-spacing: -0.06em; max-width: 780px; text-transform: uppercase; }
.hero p { max-width: 610px; margin: 24px 0 28px; font-size: 1.25rem; color: rgba(255,255,255,.88); }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }

.search-card { background: rgba(255,255,255,.96); color: var(--texto); padding: 24px; border-radius: 30px; box-shadow: var(--sombra); }
.search-card h2 { color: var(--azul); font-size: 1.8rem; margin-bottom: 8px; }
.search-card p { color: var(--texto-suave); margin: 0 0 18px; font-size: 1rem; }
.search-grid { display: grid; gap: 12px; }

.field label { display: block; color: var(--azul); font-weight: 700; margin-bottom: 6px; }
.field select, .field input, .field textarea {
  width: 100%; border: 1px solid var(--gris-borde); border-radius: 16px; padding: 13px 14px;
  font-family: inherit; font-size: 1rem; outline: none; background: #fff;
}
.field textarea { min-height: 130px; resize: vertical; }
.field select:focus, .field input:focus, .field textarea:focus {
  border-color: var(--rosado); box-shadow: 0 0 0 4px rgba(192,55,104,.12);
}

.section { padding: 86px 0; }
.section-soft { background: var(--gris-fondo); }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 22px; margin-bottom: 34px; }
.eyebrow { color: var(--rosado); font-weight: 700; text-transform: uppercase; letter-spacing: .08em; margin-bottom: 8px; }
.section h2 { color: var(--azul); font-size: clamp(2.1rem, 4vw, 3.8rem); line-height: .95; letter-spacing: -0.05em; text-transform: uppercase; }
.section-description { color: var(--texto-suave); max-width: 560px; font-size: 1.06rem; }

.property-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.property-card {
  background: var(--blanco); border: 1px solid rgba(229,231,235,.85); border-radius: var(--radio);
  overflow: hidden; box-shadow: 0 14px 34px rgba(31,41,55,.07);
  transition: transform .25s ease, box-shadow .25s ease;
}
.property-card:hover { transform: translateY(-6px); box-shadow: var(--sombra); }
.property-image { position: relative; height: 235px; overflow: hidden; background: var(--gris-fondo); }
.property-image img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.property-card:hover .property-image img { transform: scale(1.06); }
.badges { position: absolute; top: 14px; left: 14px; right: 14px; display: flex; justify-content: space-between; gap: 8px; }
.badge { background: var(--blanco); color: var(--azul); padding: 7px 11px; border-radius: 999px; font-size: .9rem; font-weight: 700; }
.badge-accent { background: var(--rosado); color: var(--blanco); }
.property-body { padding: 20px; }
.property-price { color: var(--rosado); font-size: 1.75rem; font-weight: 700; margin-bottom: 6px; }
.property-title { color: var(--azul); font-size: 1.35rem; line-height: 1.1; margin-bottom: 8px; }
.property-location { color: var(--texto-suave); margin-bottom: 16px; }
.features {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; border-top: 1px solid var(--gris-borde);
  padding-top: 14px; margin-top: 14px; color: var(--texto); font-weight: 700;
}
.features span { background: var(--gris-fondo); padding: 9px 8px; border-radius: 12px; text-align: center; font-size: .95rem; }
.property-actions { display: flex; gap: 10px; margin-top: 18px; }
.property-actions .btn { flex: 1; padding: 11px 14px; }

.empty-state {
  background: #fff; border: 1px dashed var(--gris-borde); color: var(--texto-suave);
  border-radius: var(--radio); padding: 32px; text-align: center; grid-column: 1 / -1;
}

.about-grid { display: grid; grid-template-columns: .95fr 1.05fr; gap: 34px; align-items: center; }
.about-image { border-radius: 34px; overflow: hidden; box-shadow: var(--sombra); }
.about-image img { width: 100%; height: 480px; object-fit: cover; }
.about-panel { background: var(--blanco); border: 1px solid var(--gris-borde); border-radius: 34px; padding: 34px; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 26px; }
.stat { background: var(--gris-fondo); border-radius: 20px; padding: 18px; }
.stat strong { display: block; color: var(--azul); font-size: 2rem; line-height: 1; }
.stat span { color: var(--texto-suave); font-weight: 600; }

.contact {
  background: linear-gradient(135deg, var(--azul), #162853); color: var(--blanco); border-radius: 38px;
  padding: 44px; display: grid; grid-template-columns: 1fr auto; gap: 28px; align-items: center;
  overflow: hidden; position: relative;
}
.contact::after {
  content: ""; position: absolute; width: 220px; height: 220px; right: -70px; top: -80px;
  border-radius: 50%; background: rgba(192,55,104,.45);
}
.contact > * { position: relative; z-index: 2; }
.contact h2 { color: var(--blanco); }
.contact p { color: rgba(255,255,255,.82); max-width: 640px; margin-top: 12px; font-size: 1.08rem; }

.footer { background: #101827; color: rgba(255,255,255,.72); padding: 46px 0 22px; }
.footer-grid { display: grid; grid-template-columns: 1.1fr .7fr .7fr; gap: 28px; margin-bottom: 32px; }
.footer h3, .footer h4 { color: var(--blanco); margin-bottom: 12px; }
.footer a { display: block; margin: 8px 0; }
.footer a:hover { color: var(--blanco); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.12); padding-top: 20px; font-size: .95rem; }

.whatsapp-float {
  position: fixed; right: 22px; bottom: 22px; z-index: 60; width: 58px; height: 58px; border-radius: 50%;
  background: #25D366; color: var(--blanco); display: grid; place-items: center; font-size: 1.65rem;
  box-shadow: 0 14px 30px rgba(37,211,102,.32); transition: transform .22s ease;
}
.whatsapp-float:hover { transform: translateY(-4px) scale(1.02); }

.reveal { opacity: 0; transform: translateY(22px); transition: opacity .65s ease, transform .65s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }

.page-hero { background: linear-gradient(135deg, var(--azul), #182d5d); color: var(--blanco); padding: 82px 0; }
.page-hero h1 { font-size: clamp(2.8rem, 6vw, 5.4rem); line-height: .9; letter-spacing: -0.06em; text-transform: uppercase; }
.page-hero p { max-width: 640px; color: rgba(255,255,255,.84); margin-top: 16px; font-size: 1.15rem; }

.filters {
  background: var(--blanco); border: 1px solid var(--gris-borde); box-shadow: var(--sombra); border-radius: 26px;
  padding: 18px; margin-top: -42px; position: relative; z-index: 5;
  display: grid; grid-template-columns: repeat(4, 1fr) auto; gap: 12px;
}

.detail-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 28px; }
.detail-gallery { display: grid; gap: 12px; }
.detail-main-img { height: 460px; border-radius: 30px; overflow: hidden; background: var(--gris-fondo); }
.detail-main-img img { width: 100%; height: 100%; object-fit: cover; }
.gallery-thumbs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.gallery-thumbs img { height: 110px; width: 100%; object-fit: cover; border-radius: 16px; cursor: pointer; }
.detail-side {
  background: var(--blanco); border: 1px solid var(--gris-borde); border-radius: 30px; padding: 28px; height: fit-content;
  box-shadow: 0 14px 34px rgba(31,41,55,.07);
}
.detail-side h1 { color: var(--azul); font-size: 2.4rem; line-height: .98; letter-spacing: -.04em; text-transform: uppercase; margin-bottom: 12px; }
.detail-price { color: var(--rosado); font-size: 2.2rem; font-weight: 700; margin: 16px 0; }
.detail-features { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin: 22px 0; }
.detail-features div, .amenities-list span { background: var(--gris-fondo); border-radius: 16px; padding: 12px; font-weight: 700; }
.amenities-list { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }

/* Admin */
.admin-body { background: var(--gris-fondo); min-height: 100vh; }
.admin-login {
  min-height: 100vh; display: grid; place-items: center; padding: 24px;
  background: linear-gradient(135deg, rgba(36,61,115,.98), rgba(36,61,115,.80));
}
.login-card {
  width: min(430px, 100%); background: #fff; border-radius: 28px; padding: 30px; box-shadow: var(--sombra);
}
.login-card img { width: 78px; margin: 0 auto 12px; }
.login-card h1 { color: var(--azul); text-align: center; text-transform: uppercase; line-height: .95; margin-bottom: 20px; }
.alert { padding: 12px 14px; border-radius: 14px; margin-bottom: 14px; font-weight: 700; }
.alert-error { background: #FEE2E2; color: #991B1B; }
.alert-ok { background: #DCFCE7; color: #166534; }

.admin-layout { display: grid; grid-template-columns: 250px 1fr; min-height: 100vh; }
.sidebar { background: #101827; color: rgba(255,255,255,.78); padding: 24px; }
.sidebar .brand-admin { display: flex; align-items: center; gap: 10px; color: #fff; margin-bottom: 28px; font-weight: 700; }
.sidebar .brand-admin img { width: 42px; background: #fff; border-radius: 12px; }
.sidebar a { display: block; padding: 12px 14px; border-radius: 14px; margin-bottom: 8px; }
.sidebar a:hover, .sidebar a.active { background: rgba(255,255,255,.10); color: #fff; }
.admin-main { padding: 28px; }
.admin-top { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 22px; }
.admin-top h1 { color: var(--azul); text-transform: uppercase; letter-spacing: -.04em; line-height: .95; }
.admin-card {
  background: #fff; border: 1px solid var(--gris-borde); border-radius: 24px; padding: 22px;
  box-shadow: 0 12px 28px rgba(31,41,55,.06); margin-bottom: 18px;
}
.admin-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.admin-stat { background: var(--gris-fondo); padding: 20px; border-radius: 20px; }
.admin-stat strong { color: var(--azul); font-size: 2rem; display: block; }
.admin-table { width: 100%; border-collapse: collapse; }
.admin-table th, .admin-table td { padding: 12px; border-bottom: 1px solid var(--gris-borde); text-align: left; vertical-align: top; }
.admin-table th { color: var(--azul); }
.actions { display: flex; flex-wrap: wrap; gap: 8px; }
.small-btn {
  display: inline-flex; border: 0; border-radius: 999px; padding: 8px 12px; font-family: inherit;
  font-weight: 700; cursor: pointer; background: var(--gris-fondo); color: var(--azul);
}
.small-btn.danger { color: #991B1B; background: #FEE2E2; }
.small-btn.ok { color: #166534; background: #DCFCE7; }
.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.form-grid .full { grid-column: 1 / -1; }
.checkbox-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.checkbox-grid label { background: var(--gris-fondo); padding: 10px 12px; border-radius: 14px; font-weight: 700; }
.preview-img { width: 92px; height: 70px; object-fit: cover; border-radius: 12px; }
.image-list { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.image-item { background: var(--gris-fondo); border-radius: 16px; padding: 10px; }
.image-item img { width: 100%; height: 120px; object-fit: cover; border-radius: 12px; margin-bottom: 8px; }

@media (max-width: 960px) {
  .hero-content, .about-grid, .contact, .detail-grid { grid-template-columns: 1fr; }
  .property-grid { grid-template-columns: repeat(2, 1fr); }
  .filters { grid-template-columns: repeat(2, 1fr); }
  .section-head { align-items: start; flex-direction: column; }
  .admin-layout { grid-template-columns: 1fr; }
  .admin-grid { grid-template-columns: repeat(2, 1fr); }
  .form-grid, .checkbox-grid, .image-list { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .topbar .container { font-size: .88rem; }
  .mobile-toggle { display: block; }
  .menu {
    position: absolute; left: 18px; right: 18px; top: 88px; background: var(--blanco);
    border: 1px solid var(--gris-borde); box-shadow: var(--sombra); border-radius: 22px; padding: 18px;
    display: none; flex-direction: column; align-items: stretch;
  }
  .menu.open { display: flex; }
  .nav .btn-primary { display: none; }
  .hero-content { min-height: auto; padding: 58px 0; }
  .property-grid { grid-template-columns: 1fr; }
  .filters { grid-template-columns: 1fr; }
  .footer-grid, .stats { grid-template-columns: 1fr; }
  .contact { padding: 30px; }
  .detail-main-img { height: 320px; }
  .admin-main { padding: 18px; }
  .admin-grid { grid-template-columns: 1fr; }
}
