/* ============================================================
   INMOBILIARIA HUILANGO — style.css
   Tema: Refinado / Editorial · Cormorant + DM Sans
   ============================================================ */

/* ─── Variables ─────────────────────────────────────────────── */
:root {
  --cream:      #f7f4ef;
  --cream-deep: #ede8df;
  --ink:        #1a1714;
  --ink-soft:   #4a4540;
  --gold:       #b08d57;
  --gold-light: #d4aa72;
  --green-wa:   #25d366;
  --green-wa-dk:#1da851;
  --red:        #c0392b;
  --blue:       #2c5f8a;
  --teal:       #2a7a6f;

  --radius-sm:  6px;
  --radius-md:  12px;
  --radius-lg:  20px;

  --shadow-card: 0 2px 16px rgba(26,23,20,.09), 0 1px 4px rgba(26,23,20,.06);
  --shadow-hover:0 8px 32px rgba(26,23,20,.14), 0 2px 8px rgba(26,23,20,.08);

  --header-h: 68px;
  --nav-h:    52px;

  --font-serif: 'Cormorant Garamond', Georgia, serif;
  --font-sans:  'DM Sans', system-ui, sans-serif;
}

/* ─── Reset ──────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-sans);
  background: var(--cream);
  color: var(--ink);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }

/* ─── Header ─────────────────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--ink);
  height: var(--header-h);
  border-bottom: 1px solid rgba(176,141,87,.25);
}
.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.logo-block {
  display: flex;
  align-items: center;
  gap: 14px;
}
.logo-owl {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
}
.logo-text {
  display: flex;
  flex-direction: column;
}
.logo-name {
  font-family: var(--font-serif);
  font-size: 19px;
  font-weight: 600;
  color: #f5f0e8;
  letter-spacing: .3px;
  line-height: 1.2;
}
.logo-tagline {
  font-size: 11px;
  color: var(--gold-light);
  letter-spacing: 1.2px;
  text-transform: uppercase;
  font-weight: 300;
}
.header-wa {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--green-wa);
  color: #fff;
  font-size: 13px;
  font-weight: 500;
  padding: 9px 16px;
  border-radius: 100px;
  white-space: nowrap;
  transition: background .2s, transform .15s;
}
.header-wa svg { width: 18px; height: 18px; flex-shrink: 0; }
.header-wa:hover { background: var(--green-wa-dk); transform: scale(1.03); }

/* ─── Tab Navigation ─────────────────────────────────────────── */
.tab-nav {
  position: sticky;
  top: var(--header-h);
  z-index: 90;
  background: var(--cream-deep);
  border-bottom: 1px solid rgba(176,141,87,.2);
  display: flex;
  height: var(--nav-h);
  overflow-x: auto;
  scrollbar-width: none;
}
.tab-nav::-webkit-scrollbar { display: none; }
.tab-btn {
  flex: 1;
  min-width: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-soft);
  letter-spacing: .4px;
  border-bottom: 3px solid transparent;
  padding: 0 16px;
  transition: color .2s, border-color .2s, background .2s;
  white-space: nowrap;
}
.tab-btn .tab-icon { font-size: 16px; }
.tab-btn:hover { color: var(--ink); background: rgba(176,141,87,.08); }
.tab-btn.active {
  color: var(--gold);
  border-bottom-color: var(--gold);
  font-weight: 600;
}

/* ─── Section intro ──────────────────────────────────────────── */
.listings-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px 60px;
}
.tab-panel { display: none; }
.tab-panel.active { display: block; }

.section-intro {
  padding: 40px 0 28px;
  border-bottom: 1px solid var(--cream-deep);
  margin-bottom: 32px;
}
.section-intro h2 {
  font-family: var(--font-serif);
  font-size: clamp(28px, 5vw, 40px);
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 6px;
}
.section-intro p {
  font-size: 15px;
  color: var(--ink-soft);
}

/* ─── Cards Grid ─────────────────────────────────────────────── */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 28px;
}

/* ─── Property Card ──────────────────────────────────────────── */
.property-card {
  background: #fff;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: box-shadow .25s, transform .25s;
  border: 1px solid rgba(0,0,0,.04);
}
.property-card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-3px);
}

/* Gallery */
.card-gallery { position: relative; }
.gallery-main {
  position: relative;
  height: 220px;
  overflow: hidden;
  background: var(--cream-deep);
}
.gallery-main .main-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .4s ease;
}
.property-card:hover .main-photo { transform: scale(1.03); }

.badge {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 4px 12px;
  border-radius: 100px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .8px;
  text-transform: uppercase;
  color: #fff;
}
.badge-venta       { background: var(--red); }
.badge-renta       { background: var(--blue); }
.badge-estudiantes { background: var(--teal); }

.gallery-thumbs {
  display: flex;
  gap: 4px;
  padding: 6px 6px 0;
  background: #fff;
  overflow-x: auto;
  scrollbar-width: thin;
}
.gallery-thumbs img {
  width: 72px;
  height: 52px;
  flex-shrink: 0;
  object-fit: cover;
  border-radius: var(--radius-sm);
  cursor: pointer;
  opacity: .75;
  transition: opacity .2s, transform .2s;
  border: 2px solid transparent;
  background: var(--cream-deep);
}
.gallery-thumbs img:hover {
  opacity: 1;
  border-color: var(--gold);
  transform: scale(1.04);
}

/* Card body */
.card-body {
  padding: 20px 22px 22px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  flex: 1;
}
.card-header-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}
.card-title {
  font-family: var(--font-serif);
  font-size: 21px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.2;
  margin-bottom: 5px;
}
.card-location {
  display: flex;
  align-items: flex-start;
  gap: 5px;
  font-size: 12.5px;
  color: var(--ink-soft);
  line-height: 1.4;
}
.card-location svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  margin-top: 1px;
  color: var(--gold);
}
.card-price {
  text-align: right;
  flex-shrink: 0;
}
.price-amount {
  display: block;
  font-family: var(--font-serif);
  font-size: 20px;
  font-weight: 700;
  color: var(--gold);
  white-space: nowrap;
}
.price-unit {
  display: block;
  font-size: 11px;
  color: var(--ink-soft);
  white-space: nowrap;
}

/* Specs list */
.card-specs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
}
.card-specs li {
  font-size: 13px;
  color: var(--ink-soft);
  display: flex;
  align-items: center;
  gap: 5px;
}
.spec-icon { font-size: 14px; }

/* Description */
.card-desc {
  font-size: 13.5px;
  color: var(--ink-soft);
  line-height: 1.65;
  flex: 1;
}

/* WhatsApp button */
.btn-whatsapp {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  background: var(--green-wa);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  padding: 13px 20px;
  border-radius: var(--radius-md);
  transition: background .2s, transform .15s, box-shadow .2s;
  margin-top: auto;
  box-shadow: 0 2px 8px rgba(37,211,102,.25);
}
.btn-whatsapp svg { width: 20px; height: 20px; flex-shrink: 0; }
.btn-whatsapp:hover {
  background: var(--green-wa-dk);
  transform: scale(1.02);
  box-shadow: 0 4px 16px rgba(37,211,102,.35);
}
.btn-whatsapp--outline {
  background: transparent;
  color: var(--green-wa-dk);
  border: 2px solid var(--green-wa);
  box-shadow: none;
}
.btn-whatsapp--outline:hover {
  background: var(--green-wa);
  color: #fff;
}

/* Empty card */
.card-empty {
  border: 2px dashed var(--cream-deep);
  box-shadow: none;
  background: transparent;
}
.card-empty:hover { transform: none; box-shadow: none; }
.empty-placeholder {
  padding: 52px 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 12px;
}
.empty-icon { font-size: 40px; }
.empty-placeholder > p { font-size: 15px; color: var(--ink-soft); }
.empty-sub { font-size: 13px; color: #9a9490; }

/* ─── Floating WhatsApp ──────────────────────────────────────── */
.wa-float {
  position: fixed;
  bottom: 24px;
  right: 22px;
  width: 58px;
  height: 58px;
  background: var(--green-wa);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(37,211,102,.4);
  z-index: 200;
  transition: transform .2s, box-shadow .2s;
}
.wa-float svg { width: 30px; height: 30px; color: #fff; }
.wa-float:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 28px rgba(37,211,102,.5);
}

/* ─── Footer ─────────────────────────────────────────────────── */
.site-footer {
  background: var(--ink);
  color: rgba(245,240,232,.6);
  padding: 32px 20px;
}
.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-align: center;
}
.footer-name {
  font-family: var(--font-serif);
  font-size: 18px;
  color: #f5f0e8;
  font-weight: 600;
}
.footer-copy { font-size: 12px; }
.footer-wa {
  font-size: 13px;
  color: var(--green-wa);
  transition: color .2s;
}
.footer-wa:hover { color: var(--gold-light); }

/* ─── Placeholder (when images missing) ──────────────────────── */
.gallery-main {
  background: linear-gradient(135deg, var(--cream-deep) 0%, #e8e2d8 100%);
}

/* ─── Responsive ─────────────────────────────────────────────── */
@media (max-width: 640px) {
  :root { --header-h: 60px; }

  .logo-tagline { display: none; }
  .logo-name { font-size: 16px; }
  .logo-owl { width: 36px; height: 36px; }
  .header-wa { font-size: 12px; padding: 8px 12px; gap: 6px; }
  .header-wa svg { width: 16px; height: 16px; }

  .tab-btn { font-size: 13px; min-width: 90px; }

  .cards-grid { grid-template-columns: 1fr; gap: 20px; }

  .card-header-row { flex-direction: column; gap: 8px; }
  .card-price { text-align: left; }

  .gallery-main { height: 200px; }

  .section-intro { padding: 28px 0 20px; }
  .section-intro h2 { font-size: 26px; }

  .wa-float { bottom: 16px; right: 14px; width: 52px; height: 52px; }
  .wa-float svg { width: 26px; height: 26px; }

  .listings-container { padding: 0 14px 50px; }
}

@media (min-width: 641px) and (max-width: 900px) {
  .cards-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ─── University block ───────────────────────────────────────── */
.unis-block {
  background: var(--cream);
  border: 1px solid var(--cream-deep);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.unis-title {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .8px;
  color: var(--ink-soft);
}
.unis-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.uni-link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 0;
  transition: opacity .15s;
}
.uni-link:hover { opacity: .75; }
.uni-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--teal);
  flex-shrink: 0;
}
.uni-name {
  font-size: 13px;
  color: var(--ink);
  font-weight: 500;
  flex: 1;
}
.uni-dist {
  font-size: 11.5px;
  color: var(--ink-soft);
  white-space: nowrap;
}
.uni-map-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 500;
  color: var(--teal);
  border: 1px solid var(--teal);
  border-radius: 100px;
  padding: 5px 12px;
  align-self: flex-start;
  transition: background .15s, color .15s;
}
.uni-map-btn:hover {
  background: var(--teal);
  color: #fff;
}

/* ─── Embedded map block ─────────────────────────────────────── */
.uni-map-block {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.map-embed {
  width: 100%;
  height: 220px;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--cream-deep);
}
.map-embed iframe {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}
