/*
Theme Name:  EpiCasa
Description: Tema inmobiliario profesional — compatible con Elementor
Version:     1.0.0
Text Domain: epicasa
Author:      EpiCasa Grupo Inmobiliario
Tags:        real-estate, elementor, custom
*/

/* ── Google Fonts ──────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Space+Grotesk:wght@400;500;600;700&display=swap');

/* ── Tokens de marca ───────────────────────────── */
:root {
  --ep-navy:   #052051;
  --ep-teal:   #88d7c2;
  --ep-cyan:   #27c3eb;
  --ep-white:  #ffffff;
  --ep-cream:  #f5f0e8;
  --ep-cream2: #ece7de;
  --ep-muted:  #6b7280;
  --ep-border: rgba(5,32,81,0.12);
  --ep-title:  'Space Grotesk', sans-serif;
  --ep-body:   'Inter', sans-serif;
  --ep-radius: 10px;
  --ep-shadow: 0 4px 24px rgba(5,32,81,0.10);
}

/* ── Reset & base ──────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--ep-body);
  font-weight: 400;
  background: var(--ep-cream);
  color: var(--ep-navy);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--ep-cyan); text-decoration: none; }
ul, ol { list-style: none; }

/* ── Tipografía ────────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--ep-title);
  color: var(--ep-navy);
  line-height: 1.2;
}

/* ── Elementor: quitar paddings por defecto ─────── */
.elementor-section.elementor-section-boxed > .elementor-container {
  max-width: 1200px;
}
.elementor-widget-wrap { padding: 0; }

/* ════════════════════════════════════════════════
   HEADER
   ════════════════════════════════════════════════ */
.ep-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 9999;
  background: var(--ep-white);
  border-bottom: 1px solid transparent;
  transition: box-shadow .3s, border-color .3s;
}
.ep-header.scrolled {
  box-shadow: 0 2px 20px rgba(5,32,81,0.10);
  border-color: var(--ep-border);
}
.ep-header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

/* Logo */
.ep-logo {
  display: flex;
  align-items: center;
  gap: .6rem;
  text-decoration: none;
  flex-shrink: 0;
}
.ep-logo-icon {
  width: 36px; height: 36px;
  background: var(--ep-navy);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
}
.ep-logo-name {
  font-family: var(--ep-title);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--ep-navy);
  letter-spacing: -.02em;
}
.ep-logo-sub {
  font-size: .6rem;
  font-weight: 500;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ep-muted);
  display: block;
  line-height: 1;
}

/* Nav */
.ep-nav {
  display: flex;
  align-items: center;
  gap: 2rem;
}
.ep-nav a {
  font-size: .875rem;
  font-weight: 500;
  color: var(--ep-navy);
  position: relative;
  padding-bottom: 2px;
}
.ep-nav a::after {
  content: '';
  position: absolute;
  bottom: -2px; left: 0;
  width: 0; height: 2px;
  background: var(--ep-cyan);
  border-radius: 2px;
  transition: width .3s;
}
.ep-nav a:hover::after, .ep-nav a.current::after { width: 100%; }

/* CTA nav */
.ep-header-cta a {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  background: var(--ep-navy);
  color: var(--ep-white);
  padding: .65rem 1.25rem;
  border-radius: 6px;
  font-size: .875rem;
  font-weight: 500;
  font-family: var(--ep-body);
  transition: background .25s;
}
.ep-header-cta a:hover { background: #071d45; }

/* Hamburger */
.ep-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.ep-hamburger span {
  display: block;
  width: 22px; height: 2px;
  background: var(--ep-navy);
  border-radius: 2px;
  transition: all .3s;
}

/* ════════════════════════════════════════════════
   FOOTER
   ════════════════════════════════════════════════ */
.ep-footer {
  background: var(--ep-navy);
  padding: 4rem 0 0;
}
.ep-footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}
.ep-footer-grid {
  display: grid;
  grid-template-columns: 1.8fr 1fr 1fr 1.2fr;
  gap: 3rem;
  padding-bottom: 3rem;
}
.ep-footer-logo-wrap {
  font-family: var(--ep-title);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--ep-white);
  margin-bottom: .75rem;
}
.ep-footer-desc {
  font-size: .85rem;
  color: rgba(255,255,255,.6);
  line-height: 1.75;
  margin-bottom: 1.5rem;
  max-width: 280px;
}
.ep-footer-social {
  display: flex;
  gap: .5rem;
}
.ep-footer-social a {
  width: 34px; height: 34px;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,.6);
  font-size: .9rem;
  transition: all .25s;
}
.ep-footer-social a:hover {
  border-color: var(--ep-teal);
  color: var(--ep-teal);
}
.ep-footer-col-title {
  font-size: .7rem;
  font-weight: 600;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: rgba(255,255,255,.4);
  margin-bottom: 1.25rem;
}
.ep-footer-links a {
  display: block;
  font-size: .875rem;
  color: rgba(255,255,255,.7);
  margin-bottom: .625rem;
  text-decoration: none;
  transition: color .25s;
}
.ep-footer-links a:hover { color: var(--ep-teal); }
.ep-footer-contact-item {
  display: flex;
  align-items: flex-start;
  gap: .625rem;
  font-size: .875rem;
  color: rgba(255,255,255,.7);
  margin-bottom: .625rem;
}
.ep-footer-contact-item svg { color: var(--ep-teal); flex-shrink: 0; margin-top: 2px; }
.ep-footer-bottom {
  border-top: 1px solid rgba(255,255,255,.08);
  padding: 1.5rem 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}
.ep-footer-copy { font-size: .8rem; color: rgba(255,255,255,.35); }
.ep-footer-legal { display: flex; gap: 1.5rem; }
.ep-footer-legal a { font-size: .8rem; color: rgba(255,255,255,.35); text-decoration: none; transition: color .25s; }
.ep-footer-legal a:hover { color: var(--ep-teal); }

/* ════════════════════════════════════════════════
   BOTONES ELEMENTOR (clases CSS para usar en Elementor)
   ════════════════════════════════════════════════ */
.elementor-button.ep-teal,
a.ep-teal {
  background: var(--ep-teal) !important;
  color: var(--ep-navy) !important;
  border: none !important;
  border-radius: 6px !important;
  font-family: var(--ep-body) !important;
  font-weight: 500 !important;
  transition: background .25s, transform .25s !important;
}
.elementor-button.ep-teal:hover { background: var(--ep-cyan) !important; transform: translateY(-1px) !important; }

.elementor-button.ep-dark, a.ep-dark {
  background: var(--ep-navy) !important;
  color: var(--ep-white) !important;
  border: none !important;
  border-radius: 6px !important;
  font-weight: 500 !important;
}
.elementor-button.ep-dark:hover { background: #071d45 !important; }

.elementor-button.ep-outline-white, a.ep-outline-white {
  background: transparent !important;
  color: var(--ep-white) !important;
  border: 1.5px solid rgba(255,255,255,.5) !important;
  border-radius: 6px !important;
}
.elementor-button.ep-ghost, a.ep-ghost {
  background: transparent !important;
  color: var(--ep-navy) !important;
  border: 1.5px solid var(--ep-border) !important;
  border-radius: 6px !important;
}

/* ════════════════════════════════════════════════
   PROPERTY CARDS (shortcode [epicasa_propiedades])
   ════════════════════════════════════════════════ */
.ep-props-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}
.ep-prop-card {
  background: var(--ep-white);
  border: 1px solid var(--ep-border);
  border-radius: var(--ep-radius);
  overflow: hidden;
  transition: transform .3s, box-shadow .3s;
}
.ep-prop-card:hover { transform: translateY(-4px); box-shadow: var(--ep-shadow); }
.ep-prop-img { position: relative; aspect-ratio: 4/3; overflow: hidden; background: var(--ep-cream2); }
.ep-prop-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.ep-prop-card:hover .ep-prop-img img { transform: scale(1.05); }
.ep-badge { position: absolute; top: .75rem; left: .75rem; font-size: .72rem; font-weight: 600; padding: .2rem .6rem; border-radius: 4px; text-transform: uppercase; }
.ep-badge.venta    { background: var(--ep-teal); color: var(--ep-navy); }
.ep-badge.arriendo { background: var(--ep-cyan); color: var(--ep-navy); }
.ep-prop-body  { padding: 1.25rem; }
.ep-prop-title { font-family: var(--ep-title); font-size: .98rem; font-weight: 600; color: var(--ep-navy); margin-bottom: .5rem; line-height: 1.35; }
.ep-prop-title a { color: inherit; }
.ep-prop-title a:hover { color: var(--ep-cyan); }
.ep-prop-location { display: flex; align-items: center; gap: .3rem; font-size: .78rem; color: var(--ep-muted); margin-bottom: .875rem; }
.ep-prop-location svg { color: var(--ep-teal); flex-shrink: 0; }
.ep-prop-feats { display: flex; gap: 1rem; padding: .75rem 0; border-top: 1px solid var(--ep-border); border-bottom: 1px solid var(--ep-border); margin-bottom: .875rem; }
.ep-prop-feat { display: flex; align-items: center; gap: .3rem; font-size: .78rem; color: var(--ep-muted); }
.ep-prop-feat svg { opacity: .6; }
.ep-prop-price-row { display: flex; align-items: flex-end; justify-content: space-between; }
.ep-prop-price-label { font-size: .7rem; color: var(--ep-muted); text-transform: uppercase; letter-spacing: .08em; margin-bottom: .15rem; }
.ep-prop-price { font-family: var(--ep-title); font-size: 1.1rem; font-weight: 700; color: var(--ep-navy); }
.ep-prop-link { font-size: .8rem; font-weight: 500; color: var(--ep-cyan); display: flex; align-items: center; gap: .25rem; }

/* Placeholder sin imagen */
.ep-prop-placeholder { display: flex; flex-direction: column; align-items: center; justify-content: center; aspect-ratio: 4/3; background: var(--ep-cream); gap: .5rem; }
.ep-prop-placeholder svg { color: var(--ep-border); }
.ep-prop-placeholder span { font-size: .75rem; color: var(--ep-muted); }

/* ════════════════════════════════════════════════
   FAQ
   ════════════════════════════════════════════════ */
.ep-faq-item { border: 1px solid var(--ep-border); border-radius: 6px; background: var(--ep-white); overflow: hidden; margin-bottom: .75rem; }
.ep-faq-q { display: flex; justify-content: space-between; align-items: center; padding: 1.1rem 1.5rem; cursor: pointer; font-size: .92rem; font-weight: 500; color: var(--ep-navy); width: 100%; background: none; border: none; font-family: var(--ep-body); text-align: left; transition: background .2s; }
.ep-faq-q:hover { background: var(--ep-cream); }
.ep-faq-chevron { width: 20px; height: 20px; border: 1.5px solid var(--ep-border); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: .7rem; color: var(--ep-muted); transition: transform .3s; flex-shrink: 0; }
.ep-faq-item.open .ep-faq-chevron { transform: rotate(180deg); border-color: var(--ep-teal); color: var(--ep-teal); }
.ep-faq-a { max-height: 0; overflow: hidden; transition: max-height .35s ease; }
.ep-faq-item.open .ep-faq-a { max-height: 200px; }
.ep-faq-a-inner { padding: 0 1.5rem 1.25rem; font-size: .87rem; color: var(--ep-muted); line-height: 1.7; }

/* ════════════════════════════════════════════════
   WHATSAPP FLOTANTE
   ════════════════════════════════════════════════ */
.ep-wa-float {
  position: fixed;
  bottom: 1.75rem; right: 1.75rem;
  width: 54px; height: 54px;
  background: #25D366;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 20px rgba(37,211,102,0.35);
  z-index: 9998;
  transition: transform .3s, box-shadow .3s;
  text-decoration: none;
}
.ep-wa-float:hover { transform: scale(1.1); box-shadow: 0 10px 28px rgba(37,211,102,0.5); }

/* ════════════════════════════════════════════════
   SCROLL ANIMATIONS
   ════════════════════════════════════════════════ */
.ep-anim { opacity: 0; transform: translateY(20px); transition: opacity .6s ease, transform .6s ease; }
.ep-anim.visible { opacity: 1; transform: none; }

/* ════════════════════════════════════════════════
   RESPONSIVE
   ════════════════════════════════════════════════ */
@media (max-width: 1024px) {
  .ep-props-grid { grid-template-columns: repeat(2,1fr); }
  .ep-footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 768px) {
  .ep-nav, .ep-header-cta { display: none; }
  .ep-hamburger { display: flex; }
  .ep-nav.open {
    display: flex;
    flex-direction: column;
    position: fixed;
    inset: 0; top: 68px;
    background: var(--ep-white);
    padding: 2rem;
    gap: 1.5rem;
    z-index: 9998;
    border-top: 1px solid var(--ep-border);
  }
  .ep-nav.open a { font-size: 1.1rem; }
  .ep-props-grid { grid-template-columns: 1fr; }
  .ep-footer-grid { grid-template-columns: 1fr; }
  .ep-footer-bottom { flex-direction: column; text-align: center; }
}
