/* ============================================================
   DHOGMA INMUEBLES — Styles
   Palette: Red #C8102E | Concrete #2C2C2C | Black #111 | White #F5F4F0
   ============================================================ */

:root {
  --red:      #C8102E;
  --red-dark: #A00D24;
  --concrete: #2C2C2C;
  --black:    #111111;
  --white:    #F5F4F0;
  --gray-mid: #6B6B6B;
  --gray-light: #E8E7E3;
  --font-heading: 'Montserrat', sans-serif;
  --font-body:    'Inter', sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--white);
  color: var(--black);
  line-height: 1.6;
  overflow-x: hidden;
}

img { display: block; max-width: 100%; }
a  { text-decoration: none; color: inherit; }

/* ── Typography ── */
h1, h2, h3, h4 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.section-label {
  display: inline-block;
  font-family: var(--font-heading);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 1rem;
}

/* ── Layout ── */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

section { padding: 6rem 0; }

/* ============================================================
   NAVBAR
   ============================================================ */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 1.25rem 0;
  transition: background 0.3s, box-shadow 0.3s;
}

.navbar.scrolled {
  background: var(--black);
  box-shadow: 0 2px 20px rgba(0,0,0,0.3);
}

.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.logo-name {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--white);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.logo-sub {
  font-family: var(--font-heading);
  font-size: 0.55rem;
  font-weight: 400;
  color: var(--red);
  letter-spacing: 0.25em;
  text-transform: uppercase;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
  list-style: none;
}

.nav-links a {
  font-family: var(--font-heading);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(245,244,240,0.75);
  transition: color 0.2s;
}

.nav-links a:hover { color: var(--white); }

.nav-cta {
  background: var(--red) !important;
  color: var(--white) !important;
  padding: 0.55rem 1.25rem;
  border-radius: 2px;
  transition: background 0.2s !important;
}

.nav-cta:hover { background: var(--red-dark) !important; }

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 4px;
}

.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--white);
  transition: transform 0.3s, opacity 0.3s;
}

/* ============================================================
   HERO
   ============================================================ */
#hero {
  position: relative;
  height: 100vh;
  min-height: 600px;
  display: flex;
  align-items: flex-end;
  padding-bottom: 5rem;
  background: var(--black);
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background: url('../assets/images/hero.jpg') center/cover no-repeat;
  opacity: 0.45;
  transform: scale(1.03);
  transition: transform 8s ease-out;
}

.hero-bg.loaded { transform: scale(1); }

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(17,17,17,0.92) 0%,
    rgba(17,17,17,0.3) 60%,
    transparent 100%
  );
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 800px;
}

.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-heading);
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--white);
  opacity: 0.7;
  margin-bottom: 1.25rem;
}

.hero-tag::before {
  content: '';
  display: block;
  width: 2rem;
  height: 1px;
  background: var(--red);
}

.hero-content h1 {
  font-size: clamp(2.5rem, 5vw, 4.5rem);
  color: var(--white);
  margin-bottom: 1.5rem;
}

.hero-content h1 em {
  font-style: normal;
  color: var(--red);
}

.hero-content p {
  font-size: 1.05rem;
  color: rgba(245,244,240,0.7);
  max-width: 520px;
  margin-bottom: 2.5rem;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--red);
  color: var(--white);
  font-family: var(--font-heading);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.9rem 2rem;
  border-radius: 2px;
  transition: background 0.2s, transform 0.2s;
}

.btn-primary:hover {
  background: var(--red-dark);
  transform: translateY(-1px);
}

.btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: transparent;
  color: var(--white);
  font-family: var(--font-heading);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.9rem 2rem;
  border: 1px solid rgba(245,244,240,0.3);
  border-radius: 2px;
  transition: border-color 0.2s, background 0.2s;
}

.btn-outline:hover {
  border-color: var(--white);
  background: rgba(245,244,240,0.05);
}

.hero-stats {
  position: absolute;
  right: 2rem;
  bottom: 5rem;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  align-items: flex-end;
}

.stat-item {
  text-align: right;
}

.stat-number {
  font-family: var(--font-heading);
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--white);
  line-height: 1;
}

.stat-label {
  font-size: 0.65rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: rgba(245,244,240,0.5);
  margin-top: 0.2rem;
}

.stat-divider {
  width: 1px;
  height: 2rem;
  background: rgba(245,244,240,0.15);
  align-self: flex-end;
}

/* ============================================================
   NOSOTROS
   ============================================================ */
#nosotros {
  background: var(--white);
}

.nosotros-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5rem;
  align-items: center;
}

.nosotros-image {
  position: relative;
}

.nosotros-image img {
  width: 100%;
  height: 520px;
  object-fit: cover;
  border-radius: 2px;
}

.nosotros-image-badge {
  position: absolute;
  bottom: -1.5rem;
  right: -1.5rem;
  background: var(--red);
  color: var(--white);
  padding: 1.5rem;
  border-radius: 2px;
  text-align: center;
  font-family: var(--font-heading);
}

.nosotros-image-badge .num {
  font-size: 2.5rem;
  font-weight: 800;
  line-height: 1;
}

.nosotros-image-badge .text {
  font-size: 0.6rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  opacity: 0.85;
  margin-top: 0.25rem;
}

.nosotros-content h2 {
  font-size: clamp(1.8rem, 3vw, 2.8rem);
  color: var(--black);
  margin-bottom: 1.5rem;
}

.nosotros-content p {
  color: var(--gray-mid);
  font-size: 1rem;
  margin-bottom: 1.5rem;
}

.nosotros-promise {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  background: var(--gray-light);
  padding: 1.25rem;
  border-left: 3px solid var(--red);
  border-radius: 0 2px 2px 0;
  margin: 2rem 0;
}

.nosotros-promise p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--concrete);
  font-weight: 500;
}

.certifications {
  display: flex;
  gap: 1.5rem;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 2rem;
}

.cert-tag {
  font-family: var(--font-heading);
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gray-mid);
  border: 1px solid var(--gray-light);
  padding: 0.4rem 0.8rem;
  border-radius: 2px;
}

/* ============================================================
   SERVICIOS
   ============================================================ */
#servicios {
  background: var(--concrete);
}

#servicios .section-label { color: var(--red); }

#servicios h2 {
  font-size: clamp(1.8rem, 3vw, 2.8rem);
  color: var(--white);
  margin-bottom: 3.5rem;
  max-width: 600px;
}

.servicios-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5px;
  background: rgba(245,244,240,0.08);
}

.servicio-card {
  background: var(--concrete);
  padding: 2.5rem;
  transition: background 0.2s;
  cursor: default;
}

.servicio-card:hover { background: #333; }

.servicio-icon {
  width: 2.5rem;
  height: 2.5rem;
  margin-bottom: 1.5rem;
  color: var(--red);
}

.servicio-card h3 {
  font-size: 1rem;
  color: var(--white);
  margin-bottom: 0.75rem;
  font-family: var(--font-heading);
}

.servicio-card p {
  font-size: 0.85rem;
  color: rgba(245,244,240,0.5);
  line-height: 1.7;
}

.servicio-card.featured {
  background: var(--red);
  grid-row: span 2;
}

.servicio-card.featured:hover { background: var(--red-dark); }

.servicio-card.featured h3 {
  font-size: 1.4rem;
  margin-bottom: 1rem;
}

.servicio-card.featured p { color: rgba(245,244,240,0.8); }

.servicio-card.featured .servicio-icon { color: var(--white); }

/* ============================================================
   PROYECTOS
   ============================================================ */
#proyectos {
  background: var(--white);
}

.proyectos-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 3rem;
}

.proyectos-header h2 {
  font-size: clamp(1.8rem, 3vw, 2.8rem);
  max-width: 400px;
}

.proyectos-header a {
  font-family: var(--font-heading);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--red);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: gap 0.2s;
}

.proyectos-header a:hover { gap: 0.75rem; }

.proyectos-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  grid-template-rows: auto auto;
  gap: 1rem;
}

.proyecto-card {
  position: relative;
  overflow: hidden;
  border-radius: 2px;
  background: var(--gray-light);
  cursor: pointer;
}

.proyecto-card:nth-child(1) { grid-column: span 7; grid-row: span 2; }
.proyecto-card:nth-child(2) { grid-column: span 5; }
.proyecto-card:nth-child(3) { grid-column: span 5; }

.proyecto-card img {
  width: 100%;
  height: 100%;
  min-height: 220px;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.proyecto-card:nth-child(1) img { min-height: 480px; }

.proyecto-card:hover img { transform: scale(1.04); }

.proyecto-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(17,17,17,0.85) 0%, transparent 55%);
  opacity: 0;
  transition: opacity 0.3s;
  display: flex;
  align-items: flex-end;
  padding: 1.5rem;
}

.proyecto-card:hover .proyecto-overlay { opacity: 1; }

.proyecto-info h4 {
  font-family: var(--font-heading);
  font-size: 0.9rem;
  color: var(--white);
}

.proyecto-info span {
  font-size: 0.7rem;
  color: rgba(245,244,240,0.6);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* Placeholder when no image */
.proyecto-placeholder {
  width: 100%;
  height: 100%;
  min-height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gray-light);
  color: var(--gray-mid);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* ============================================================
   PROPIEDADES (Tokko Widget)
   ============================================================ */
#propiedades {
  background: var(--gray-light);
}

#propiedades h2 {
  font-size: clamp(1.8rem, 3vw, 2.8rem);
  margin-bottom: 0.75rem;
}

#propiedades .section-intro {
  color: var(--gray-mid);
  font-size: 1rem;
  max-width: 520px;
  margin-bottom: 3rem;
}

.tokko-embed-wrapper {
  width: 100%;
  min-height: 500px;
  background: var(--white);
  border-radius: 2px;
  overflow: hidden;
  position: relative;
}

.tokko-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 400px;
  gap: 1rem;
  color: var(--gray-mid);
  text-align: center;
  padding: 2rem;
  border: 2px dashed var(--gray-mid);
  border-radius: 2px;
}

.tokko-placeholder p {
  font-size: 0.85rem;
  max-width: 300px;
}

/* ============================================================
   INVERSIONISTAS
   ============================================================ */
#inversionistas {
  background: var(--black);
  position: relative;
  overflow: hidden;
}

#inversionistas::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 40%;
  height: 100%;
  background: url('../assets/images/inversionistas.jpg') center/cover no-repeat;
  opacity: 0.25;
}

.inversionistas-content {
  position: relative;
  z-index: 1;
  max-width: 600px;
  margin-left: auto;
}

#inversionistas .section-label { color: var(--red); }

#inversionistas h2 {
  font-size: clamp(1.8rem, 3vw, 2.8rem);
  color: var(--white);
  margin-bottom: 1.5rem;
}

#inversionistas p {
  color: rgba(245,244,240,0.65);
  margin-bottom: 1.25rem;
}

.proceso-steps {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin: 2.5rem 0;
  border-left: 1px solid rgba(245,244,240,0.15);
  padding-left: 1.5rem;
}

.paso {
  position: relative;
  padding: 0 0 1.75rem 0;
}

.paso::before {
  content: '';
  position: absolute;
  left: -1.5rem;
  top: 0.35rem;
  width: 8px;
  height: 8px;
  background: var(--red);
  border-radius: 50%;
  transform: translateX(-4px);
}

.paso:last-child { padding-bottom: 0; }

.paso-num {
  font-family: var(--font-heading);
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  color: var(--red);
  text-transform: uppercase;
  margin-bottom: 0.25rem;
}

.paso h4 {
  font-family: var(--font-heading);
  font-size: 0.95rem;
  color: var(--white);
  margin-bottom: 0.3rem;
}

.paso p {
  font-size: 0.82rem;
  color: rgba(245,244,240,0.5);
  margin: 0;
}

/* ============================================================
   CONTACTO
   ============================================================ */
#contacto {
  background: var(--white);
}

.contacto-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 5rem;
  align-items: start;
}

.contacto-info h2 {
  font-size: clamp(1.8rem, 3vw, 2.5rem);
  margin-bottom: 1rem;
}

.contacto-info p {
  color: var(--gray-mid);
  font-size: 0.95rem;
  margin-bottom: 2rem;
}

.contacto-links {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.contacto-link {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.25rem;
  background: var(--gray-light);
  border-radius: 2px;
  transition: background 0.2s;
  font-size: 0.9rem;
  font-weight: 500;
}

.contacto-link:hover { background: var(--gray-light); }

.contacto-link svg {
  width: 1.25rem;
  height: 1.25rem;
  flex-shrink: 0;
  color: var(--red);
}

.contacto-link.whatsapp {
  background: #25D366;
  color: var(--white);
}

.contacto-link.whatsapp svg { color: var(--white); }
.contacto-link.whatsapp:hover { background: #1ebe5d; }

.zona-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--font-heading);
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gray-mid);
  margin-top: 2rem;
}

.zona-badge::before {
  content: '';
  display: block;
  width: 6px;
  height: 6px;
  background: var(--red);
  border-radius: 50%;
}

/* Form */
.contacto-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.form-group label {
  font-family: var(--font-heading);
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--concrete);
}

.form-group input,
.form-group select,
.form-group textarea {
  background: var(--gray-light);
  border: 1px solid transparent;
  border-radius: 2px;
  padding: 0.75rem 1rem;
  font-family: var(--font-body);
  font-size: 0.9rem;
  color: var(--black);
  transition: border-color 0.2s;
  width: 100%;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--red);
}

.form-group textarea { resize: vertical; min-height: 100px; }

.form-success {
  display: none;
  padding: 1rem 1.25rem;
  background: #f0fff4;
  border: 1px solid #9ae6b4;
  border-radius: 2px;
  color: #276749;
  font-size: 0.9rem;
}

/* ============================================================
   FOOTER
   ============================================================ */
footer {
  background: var(--black);
  padding: 3rem 0;
  border-top: 1px solid rgba(245,244,240,0.06);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 2rem;
  flex-wrap: wrap;
}

.footer-copy {
  font-size: 0.75rem;
  color: rgba(245,244,240,0.35);
}

.footer-links {
  display: flex;
  gap: 2rem;
  list-style: none;
}

.footer-links a {
  font-family: var(--font-heading);
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(245,244,240,0.4);
  transition: color 0.2s;
}

.footer-links a:hover { color: var(--white); }

/* ============================================================
   WHATSAPP FLOAT
   ============================================================ */
.wa-float {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 200;
  width: 3.5rem;
  height: 3.5rem;
  background: #25D366;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(37,211,102,0.4);
  transition: transform 0.2s, box-shadow 0.2s;
}

.wa-float:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 28px rgba(37,211,102,0.55);
}

.wa-float svg {
  width: 1.75rem;
  height: 1.75rem;
  color: var(--white);
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 900px) {
  section { padding: 4rem 0; }

  .nav-links { display: none; }
  .hamburger { display: flex; }

  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: fixed;
    inset: 0;
    background: var(--black);
    align-items: center;
    justify-content: center;
    gap: 2.5rem;
    z-index: 99;
  }

  .nav-links.open a { font-size: 1.2rem; }

  .hero-stats { display: none; }

  .nosotros-grid { grid-template-columns: 1fr; gap: 3rem; }
  .nosotros-image-badge { right: 1rem; }

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

  .servicio-card.featured { grid-row: span 1; }

  .proyectos-grid {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
  }

  .proyecto-card:nth-child(1),
  .proyecto-card:nth-child(2),
  .proyecto-card:nth-child(3) {
    grid-column: span 1;
    grid-row: span 1;
  }

  .proyecto-overlay { opacity: 1; }

  #inversionistas::before { width: 100%; }

  .inversionistas-content { margin-left: 0; }

  .contacto-grid { grid-template-columns: 1fr; gap: 3rem; }

  .form-row { grid-template-columns: 1fr; }

  .proyectos-header { flex-direction: column; align-items: flex-start; gap: 1rem; }
}

@media (max-width: 480px) {
  .container { padding: 0 1.25rem; }
  .hero-content h1 { font-size: 2.2rem; }
  .hero-actions { flex-direction: column; }
  .btn-primary, .btn-outline { width: 100%; justify-content: center; }
}
