/* =========================================================
   COLMENA REAL STATE - MASTER CSS (DARK THEME)
========================================================= */
:root {
  --primary: #F6D44D;
  --bg: #0F172A;
  --surface: #1E293B;
  --text: #F8FAFC;
  --muted: #94A3B8;
  --border: rgba(255, 255, 255, 0.1);
  --radius: 16px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: 'Manrope', sans-serif; background: var(--bg); color: var(--text); overflow-x: hidden; line-height: 1.5; }
a { text-decoration: none; color: inherit; transition: 0.3s; }
img { max-width: 100%; display: block; border: 0; }
.container { width: min(1240px, 92%); margin: 0 auto; }

/* TOPBAR */
.topbar { background: #000; padding: 8px 0; border-bottom: 1px solid var(--border); font-size: 13px; color: var(--muted); }
.topbar__wrap { display: flex; justify-content: space-between; align-items: center; }
.topbar__left { display: flex; gap: 20px; }
.topbar__left span { display: flex; align-items: center; gap: 8px; }
.topbar__left i { color: var(--primary); }
.topbar__right { display: flex; align-items: center; gap: 15px; }

.currency-toggle { display: flex; background: rgba(255,255,255,0.05); border-radius: 99px; padding: 3px; border: 1px solid var(--border); }
.cur-btn { background: transparent; border: none; color: #fff; font-size: 11px; font-weight: 800; padding: 5px 12px; border-radius: 99px; cursor: pointer; opacity: 0.6; }
.cur-btn.is-active { background: var(--primary); color: #000; opacity: 1; }

.icon-btn { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: rgba(255,255,255,0.05); border: 1px solid var(--border); }

/* HEADER */
.header { position: sticky; top: 0; z-index: 1000; background: #000; backdrop-filter: blur(10px); border-bottom: 1px solid var(--border); }
.header__wrap { display: flex; justify-content: space-between; align-items: center; padding: 12px 0; }
.brand { z-index: 8000; position: relative; }
.brand img { height: 50px; }

.nav { display: flex; gap: 10px; align-items: center; }
.nav__link { padding: 8px 14px; border-radius: 12px; font-size: 14px; font-weight: 600; opacity: 0.8; }
.nav__link:hover, .nav__link.active { opacity: 1; color: var(--primary); background: rgba(255,255,255,0.05); }
.nav__cta { background: var(--primary); color: #000; font-weight: 800; }

/* MOBILE NAVIGATION */
.hamburger { 
  display: none; width: 30px; height: 22px; cursor: pointer; background: transparent; border: none; 
  position: relative; z-index: 9000; 
}
.hamburger span { display: block; position: absolute; height: 3px; width: 100%; background: var(--primary); border-radius: 9px; transition: .25s ease-in-out; }
.hamburger span:nth-child(1) { top: 0; }
.hamburger span:nth-child(2) { top: 9px; }
.hamburger span:nth-child(3) { top: 18px; }
.hamburger.is-open span:nth-child(1) { top: 9px; transform: rotate(135deg); }
.hamburger.is-open span:nth-child(2) { opacity: 0; left: -40px; }
.hamburger.is-open span:nth-child(3) { top: 9px; transform: rotate(-135deg); }

#mobileMenu { position: fixed; inset: 0; background: #000 !important; z-index: 8500; display: none; padding-top: 100px; overflow-y: auto; }
#mobileMenu.is-open { display: block !important; }
.mobile-menu__inner { width: 90%; margin: 0 auto; display: flex; flex-direction: column; gap: 10px; padding-bottom: 40px; }
.mobile-link { background: rgba(255,255,255,0.05); padding: 12px; border-radius: 10px; text-align: center; font-weight: 700; border: 1px solid var(--border); font-size: 15px; }
.mobile-link.active { background: var(--primary); color: #000; }
.mobile-link--cta { background: var(--primary); color: #000; }

/* HERO & SEARCH */
.hero { position: relative; min-height: 600px; display: flex; align-items: center; overflow: hidden; }
.hero__bg { position: absolute; inset: 0; background: url('https://images.unsplash.com/photo-1505691938895-1758d7feb511?auto=format&fit=crop&w=2400&q=70') center/cover; filter: brightness(0.5); }
.hero__overlay { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(15,23,42,0.9), transparent); }
.hero__content { position: relative; z-index: 10; padding: 60px 0; }
.hero__grid { display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 40px; align-items: center; }

.hero h1 { font-size: clamp(32px, 5vw, 60px); font-weight: 800; line-height: 1.1; margin-bottom: 20px; }
.hero h1 .gold { background: linear-gradient(135deg, var(--primary), #F97316); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p { font-size: 18px; color: var(--muted); max-width: 500px; margin-bottom: 30px; }

.hero__card { background: rgba(30,41,59,0.8); backdrop-filter: blur(15px); border-radius: 24px; padding: 30px; border: 1px solid var(--border); box-shadow: 0 10px 30px rgba(0,0,0,0.5); }
.mini-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; margin-bottom: 30px; }
.stat { background: rgba(255,255,255,0.05); padding: 15px; border-radius: 16px; border: 1px solid var(--border); }
.stat strong { display: block; font-size: 20px; color: var(--primary); }

.qs-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 15px; }
.qs-field select { width: 100%; background: var(--bg); border: 1px solid var(--border); color: #fff; padding: 12px; border-radius: 10px; outline: none; }
#qsBtn { margin-top: 20px; width: 100%; }

/* GRID & CARDS */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; padding: 25px 0; }
.card { background: var(--surface); border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); transition: 0.3s; height: 100%; display: flex; flex-direction: column; position: relative; }
.card:hover { transform: translateY(-8px); border-color: var(--primary); box-shadow: 0 15px 40px rgba(0,0,0,0.5); }
.card__media { height: 220px; background-size: cover; background-position: center; position: relative; }
.badge { position: absolute; top: 12px; left: 12px; background: rgba(0,0,0,0.7); padding: 4px 10px; border-radius: 6px; font-size: 10px; font-weight: 800; z-index: 5; color: #fff; border: 1px solid var(--border); }
.badge--sale { background: #facc15; color: #111827; border-color: rgba(250,204,21,0.5); }
.badge--rent { background: #facc15; color: #111827; border-color: rgba(250,204,21,0.5); }
.card__body { padding: 25px; flex-grow: 1; display: flex; flex-direction: column; }
.price-tag { font-size: 22px; font-weight: 900; color: var(--primary); margin-bottom: 12px; }
.card__actions { margin-top: auto; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 20px; border-radius: 12px; font-weight: 700; cursor: pointer; border: none; }
.btn--primary { background: var(--primary); color: #000; }
.btn--ghost { background: rgba(255,255,255,0.08); color: #fff; border: 1px solid var(--border); }

/* FOOTER */
.footer { background: #000; padding: 50px 0 0; border-top: 1px solid var(--border); }
.footer__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 40px; margin-bottom: 60px; }
.footer__grid > div { display: flex; flex-direction: column; }
.footer h4 { color: #fff; margin-bottom: 25px; font-size: 18px; }
.footer a { color: var(--muted); font-size: 14px; margin-bottom: 10px; display: block; }
.footer a:hover { color: var(--primary); }
.footer__info { font-size: 14px; color: var(--muted); margin-bottom: 15px; display: flex; align-items: center; gap: 10px; }
.footer__social { display: flex; gap: 15px; margin-top: 20px; }
.footer__social a { width: 35px; height: 35px; background: rgba(255,255,255,0.05); border-radius: 50%; display: grid; place-items: center; }

.newsletter { margin-top: 15px; }
.newsletter__input-group { display: flex; background: rgba(255,255,255,0.05); border-radius: 12px; overflow: hidden; border: 1px solid var(--border); }
.newsletter input { flex: 1; background: transparent; border: none; padding: 12px; color: #fff; outline: none; min-width: 0; }
.newsletter button { background: var(--primary); border: none; padding: 0 20px; font-weight: 800; cursor: pointer; color: #000; display: flex; align-items: center; gap: 8px; }

.footer__bottom { background: #000; padding: 25px 0; border-top: 1px solid var(--border); font-size: 13px; color: var(--muted); }
.footer__bottomWrap { display: flex; justify-content: space-between; align-items: center; }

/* RESPONSIVE */
@media (max-width: 1100px) {
  .footer__grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 980px) {
  .nav { display: none; }
  .hamburger { display: block; }
  .hero__grid { grid-template-columns: 1fr; text-align: center; }
  .hero p { margin: 0 auto 30px; }
  .hero__actions { justify-content: center; }
}

@media (max-width: 768px) {
  .grid-3 { grid-template-columns: 1fr; }
  .topbar { position: fixed; top: 10px; left: 50%; transform: translateX(-50%); width: auto; z-index: 10000; background: transparent; border: none; }
  .topbar__left, .topbar__right .icon-btn { display: none; }
  .currency-toggle { background: var(--surface) !important; border: 2px solid var(--primary) !important; box-shadow: 0 5px 15px rgba(0,0,0,0.5); }
  .brand img { height: 45px; }
  .newsletter__input-group { flex-direction: column; }
  .newsletter button { padding: 12px; justify-content: center; }
}

@media (max-width: 480px) {
  .footer__grid { grid-template-columns: 1fr; }
  .footer__bottomWrap { flex-direction: column; gap: 10px; text-align: center; }
}

.whatsapp-float { position: fixed; bottom: 20px; right: 20px; width: 60px; height: 60px; background: #25D366; color: #fff; border-radius: 50%; display: grid; place-items: center; font-size: 32px; z-index: 1000; box-shadow: 0 10px 25px rgba(0,0,0,0.3); }

/* EMERGENCY MOBILE MENU FIX */
#mobileMenu.is-open {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  background-color: #000 !important;
  height: 100vh !important;
  width: 100vw !important;
}

/* Estilos para la info de contacto en el men� m�vil */
.mobile-menu__meta {
  margin-top: 30px !important;
  padding-top: 20px !important;
  border-top: 1px solid rgba(255,255,255,0.1) !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  gap: 12px !important;
  color: var(--muted) !important;
  font-size: 14px !important;
}
.mobile-menu__meta div {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
}
.mobile-menu__meta i {
  color: var(--primary) !important;
}

/* =========================================================
   PROPERTY DETAIL PAGE STYLES
========================================================= */
.detail-page { background: #0F172A; }
.detail__header { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 30px; border-bottom: 1px solid var(--border); padding-bottom: 20px; }
.detail__header h1 { font-size: 32px; font-weight: 800; margin-bottom: 10px; }
.detail__price-box { text-align: right; }
.detail__price-box .price-tag { font-size: 36px; margin-bottom: 5px; }

.detail__main { display: grid; grid-template-columns: 1fr 350px; gap: 40px; }

.detail__gallery { 
  margin-bottom: 30px; border-radius: 24px; overflow: hidden; 
  border: 1px solid var(--border); background: #000;
  height: 450px;
}
.detailSwiper { height: 100%; }
.detailSwiper .swiper-slide img { width: 100%; height: 100%; object-fit: cover; }

.detail__card { background: var(--surface); padding: 30px; border-radius: 20px; border: 1px solid var(--border); margin-bottom: 30px; }
.detail__card h4 { margin-bottom: 15px; font-size: 18px; color: var(--primary); text-transform: uppercase; letter-spacing: 1px; }

.detail__specs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-bottom: 30px; }
.detail__specs .stat { 
  background: var(--surface); padding: 20px; border-radius: 16px; border: 1px solid var(--border); 
  display: flex; align-items: center; gap: 15px;
}
.detail__specs i { font-size: 24px; color: var(--primary); }
.detail__specs strong { display: block; font-size: 18px; }
.detail__specs span { font-size: 12px; color: var(--muted); }

.detail__map { width: 100%; height: 350px; border-radius: 16px; border: none; }

/* Sidebar */
.detail__sidebar { position: sticky; top: 100px; height: fit-content; }
.sidebar__card { background: var(--surface); padding: 25px; border-radius: 20px; border: 1px solid var(--border); margin-bottom: 20px; box-shadow: var(--shadow); }
.sidebar__card h4 { margin-bottom: 10px; font-size: 18px; }
.sidebar__divider { display: flex; align-items: center; gap: 10px; margin: 15px 0; color: var(--muted); font-size: 12px; text-transform: uppercase; }
.sidebar__divider::before, .sidebar__divider::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.sidebar__footer { margin-top: 20px; text-align: center; }

.promo-card { display: flex; align-items: center; gap: 15px; background: rgba(246, 212, 77, 0.05); border-color: rgba(246, 212, 77, 0.2); }
.promo-card i { font-size: 30px; color: var(--primary); }

.w-full { width: 100%; }

@media (max-width: 980px) {
  .detail__main { grid-template-columns: 1fr; }
  .detail__header { flex-direction: column; align-items: flex-start; gap: 15px; }
  .detail__price-box { text-align: left; }
  .detail__specs { grid-template-columns: repeat(2, 1fr); }
  .detail__gallery { height: 300px; }
}

/* FIXED PROPERTY DETAIL GALLERY */
.detail__gallery {
  position: relative !important;
  height: 500px !important;
  background: #111 !important;
  border-radius: 20px !important;
  margin-bottom: 30px !important;
  overflow: hidden !important;
}
.detailSwiper {
  width: 100% !important;
  height: 100% !important;
}
.detailSwiper .swiper-slide {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}
.detailSwiper .swiper-slide img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  display: block !important;
}

/* Swiper Buttons Gold */
.detailSwiper .swiper-button-next,
.detailSwiper .swiper-button-prev {
  color: var(--primary) !important;
}
.detailSwiper .swiper-pagination-bullet-active {
  background: var(--primary) !important;
}

@media (max-width: 768px) {
  .detail__gallery {
    height: 300px !important;
  }
}

/* =========================================================
   SEARCH PAGE STYLES
========================================================= */
.search-filters {
  background: var(--surface);
  padding: 30px;
  border-radius: 24px;
  border: 1px solid var(--border);
  margin-bottom: 40px;
  box-shadow: var(--shadow);
}
.filters-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  align-items: flex-end;
}
.filter-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.filter-label {
  font-size: 12px;
  font-weight: 800;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.filters-grid input, 
.filters-grid select {
  width: 100%;
  background: #0F172A;
  border: 1px solid var(--border);
  color: #fff;
  padding: 12px;
  border-radius: 10px;
  outline: none;
  font-size: 14px;
  transition: 0.3s;
}
.filters-grid input:focus, 
.filters-grid select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(246, 212, 77, 0.2);
}

.results-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
  padding: 15px 25px;
  background: rgba(255,255,255,0.03);
  border-radius: 12px;
  border: 1px solid var(--border);
}
#resultsCount {
  font-weight: 700;
  color: var(--muted);
}
.sort-select {
  background: transparent;
  border: none;
  color: var(--primary);
  font-weight: 700;
  outline: none;
  cursor: pointer;
}

@media (max-width: 1024px) {
  .filters-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .filters-grid { grid-template-columns: 1fr; }
  .results-head { flex-direction: column; gap: 15px; text-align: center; }
}

/* =========================================================
   BLOG STYLES
========================================================= */
.blog-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 40px;
  gap: 20px;
}
.blog-filters {
  display: flex;
  gap: 12px;
}
.blog-filters input, 
.blog-filters select {
  background: var(--surface);
  border: 1px solid var(--border);
  color: #fff;
  padding: 10px 15px;
  border-radius: 12px;
  outline: none;
  font-size: 14px;
}
.blog-filters input:focus, 
.blog-filters select:focus {
  border-color: var(--primary);
}

.card__meta-badges {
  display: flex;
  gap: 8px;
  margin-bottom: 15px;
}
.blog-badge {
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 6px;
  border: 1px solid rgba(255,255,255,0.1);
}
.blog-badge--cat { background: rgba(246, 212, 77, 0.1); color: var(--primary); border-color: rgba(246, 212, 77, 0.2); }
.blog-badge--date { background: rgba(255, 255, 255, 0.05); color: var(--muted); }

.card__title {
  font-size: 18px;
  font-weight: 800;
  line-height: 1.4;
  margin-bottom: 12px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card__excerpt {
  font-size: 14px;
  line-height: 1.6;
  color: var(--muted);
  margin-bottom: 20px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

@media (max-width: 850px) {
  .blog-header { flex-direction: column; align-items: flex-start; }
  .blog-filters { width: 100%; }
  .blog-filters input, .blog-filters select { flex: 1; }
}

/* =========================================================
   CONTACT PAGE STYLES
========================================================= */
.contact__grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 40px;
  align-items: start;
}
.contact-info-card {
  background: var(--surface);
  padding: 30px;
  border-radius: 20px;
  border: 1px solid var(--border);
  margin-bottom: 20px;
}
.contact-info-item {
  display: flex;
  gap: 15px;
  margin-bottom: 25px;
}
.contact-info-item i {
  width: 40px;
  height: 40px;
  background: rgba(246, 212, 77, 0.1);
  border: 1px solid rgba(246, 212, 77, 0.2);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  flex-shrink: 0;
}
.contact-info-item div strong { display: block; color: #fff; margin-bottom: 4px; }
.contact-info-item div span { color: var(--muted); font-size: 14px; }

.contact-map {
  width: 100%;
  height: 300px;
  border-radius: 20px;
  border: 1px solid var(--border);
  overflow: hidden;
}
.contact-map iframe { width: 100%; height: 100%; border: none; }

.quick-action-card {
  transition: 0.3s;
  cursor: pointer;
  border: 1px solid var(--border);
}
.quick-action-card:hover {
  transform: translateY(-5px);
  border-color: var(--primary);
  background: rgba(246, 212, 77, 0.03);
}

@media (max-width: 1024px) {
  .contact__grid { grid-template-columns: 1fr; gap: 20px; }
  .contact-info-sidebar { order: -1; }
}

@media (max-width: 768px) {
  .section { padding: 30px 0 !important; }
  .footer { padding-top: 30px; }
  .footer__grid { margin-bottom: 30px; }
}
