/*
Theme Name: Astra Child
Theme URI: https://wpastra.com/
Template: astra
Author: Brainstorm Force
Description: Astra Child Theme for Di Tieri & Rodriguez
Version: 1.0.0
*/

/* =========================================================
   1) BASE / VARIABLES
   ========================================================= */

:root {
  --dt-red: #d40000;
  --dt-red-dark: #a60000;
  --dt-yellow: #ffd200;
  --dt-white: #ffffff;
  --dt-black: #111111;
  --dt-gray: #4a4a4a;
  --dt-border: rgba(0, 0, 0, .10);
  --dt-radius: 14px;

  --dt-topbar-h: 62px;
  --dt-adminbar-h: 0px;
  --dt-header-h: 130px;

  --dt-max: 1500px;
  --dt-gap-lg: 40px;
  --dt-gap-md: 20px;

  --dt-card-bg: #ffffff;
  --dt-card-radius: 12px;
  --dt-card-shadow: 0 8px 25px rgba(0, 0, 0, 0.06);
  --dt-card-pad: 40px;
  --dt-card-pad-sm: 22px;

  --dt-field-pad: 14px;
  --dt-field-radius: 6px;
  --dt-field-border: 1px solid #ddd;
  --dt-field-font: 15px;

  --dt-text: #111827;
  --dt-text-soft: #374151;

  --dt-btn-bg: #a40000;
  --dt-btn-bg-hover: #820000;
  --dt-btn-pad-y: 14px;
  --dt-btn-pad-x: 26px;

  --dt-map-radius: 8px;
  --dt-map-h: 250px;

  --dt-muted: rgba(17, 17, 17, .62);
  --dt-wa: #25d366;
}

@media (max-width:1024px) {
  :root {
    --dt-header-h: 110px;
  }
}

html,
body {
  background-color: #f6ecee !important;
}

/* CORRECCIÓN: especificado para no pisar el admin bar */
body:not(.admin-bar) {
  padding-top: 0 !important;
}

a {
  color: inherit;
}

a:hover {
  color: var(--dt-red);
}

/* =========================================================
   2) LAYOUT (ASTRA WRAPPERS)
   ========================================================= */

.site-content,
#content,
.ast-container {
  background-color: transparent !important;
  box-shadow: inset 0 1px 0 rgba(0, 0, 0, .03);
}

/* =========================================================
   3) COMPONENTES
   ========================================================= */

/* -------------------------
   3.1 Topbar fija
   ------------------------- */

.dt-topbar {
  position: fixed;
  left: 0;
  right: 0;
  top: 0;
  z-index: 99999;
  background: var(--dt-red);
  color: var(--dt-white);
  font-size: 14px;
}

.dt-topbar a {
  color: var(--dt-white);
  opacity: .95;
}

.dt-topbar a:hover {
  opacity: 1;
}

.dt-topbar__inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
}

.dt-topbar__icon {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .25);
  color: var(--dt-white);
  text-decoration: none;
  opacity: .95;
  transition: transform .15s ease, opacity .15s ease, border-color .15s ease;
}

.dt-topbar__icon:hover {
  opacity: 1;
  border-color: rgba(255, 255, 255, .55);
  transform: translateY(-1px);
}

.dt-ico {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.dt-topbar__icon .dt-ico {
  display: block;
}

@media (max-width:600px) {
  .dt-topbar__inner {
    padding: 8px 12px;
    gap: 10px;
  }

  .dt-topbar__icon {
    width: 32px;
    height: 32px;
  }

  .dt-ico {
    width: 17px;
    height: 17px;
  }
}

/* Admin bar (WP) */

body.admin-bar {
  --dt-adminbar-h: 32px;
}

@media (max-width:782px) {
  body.admin-bar {
    --dt-adminbar-h: 46px;
  }
}

body.admin-bar .dt-topbar {
  top: var(--dt-adminbar-h);
}

/* -------------------------
   3.2 Header (Astra Masthead)
   ------------------------- */

.ast-header-break-point .main-header-bar {
  border-bottom: none !important;
}

.main-header-bar {
  padding-top: 4px !important;
  padding-bottom: 4px !important;
  border-bottom: none !important;
}

.ast-primary-header-bar,
.main-header-bar .ast-container {
  display: flex;
  align-items: center;
}

.main-header-bar .ast-container {
  max-width: 1200px;
  padding: 0 12px 0 0 !important;
  padding-left: 0 !important;
}

.site-title a {
  font-weight: 800;
  letter-spacing: .2px;
  text-decoration: none !important;
}

.main-header-menu .current-menu-item>a,
.main-header-menu .current_page_item>a {
  color: var(--dt-red) !important;
}

/* Masthead full width + centered inner */

#masthead {
  position: relative !important;
  z-index: 9999 !important;
  background: #fff !important;
  border-bottom: 2px solid var(--dt-red);
  padding-top: 10px !important;
  padding-bottom: 10px !important;
  overflow: visible !important;
}

#masthead,
#masthead .ast-container,
#masthead .ast-builder-grid-row-container,
#masthead .ast-builder-grid-row,
#masthead .site-primary-header-wrap,
#masthead .ast-primary-header-bar,
#masthead .ast-desktop-header,
#masthead .ast-desktop-header .ast-container {
  max-width: none !important;
  width: 100% !important;
}

#masthead .ast-builder-grid-row-container,
#masthead .ast-container,
#masthead .ast-builder-grid-row {
  max-width: 1500px !important;
}

#masthead .ast-container,
#masthead .ast-builder-grid-row-container {
  margin-left: auto !important;
  margin-right: auto !important;
  padding-left: 24px !important;
  padding-right: 24px !important;
  overflow: visible !important;
}

#masthead .ast-builder-grid-row {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  min-height: 200px;
  height: auto !important;
  overflow: visible !important;
}

#masthead .site-header-primary-section-right {
  align-items: center !important;
  justify-content: flex-end !important;
  margin-left: auto !important;
  padding: 0 !important;
}

/* Ajuste desktop */
@media (min-width:1025px) {
  #masthead .ast-site-identity {
    margin-left: -200px !important;
  }
}

/* Fix: en laptops/anchos chicos NO usar margin-left negativo */
@media (max-width:1400px) {
  #masthead .ast-site-identity {
    margin-left: 0 !important;
  }
}

/* Bajar levemente el logo */
#masthead .ast-site-identity {
  margin-top: 32px !important;
}

/* Logo: responsive sin deformación
   CORRECCIÓN: selector unificado en una sola regla con clamp() que cubre todos los rangos */
#masthead .custom-logo-link img,
#masthead .custom-logo-link .custom-logo,
#masthead .site-logo-img img,
#masthead .ast-site-logo-img img,
#masthead img.custom-logo {
  width: auto !important;
  height: auto !important;
  max-width: 100% !important;
  object-fit: contain !important;
  display: block;
  max-height: clamp(92px, 9vw, 175px) !important;
}

/* Asegurar que el bloque del logo sea visible */
@media (max-width:1400px) {

  #masthead .site-branding,
  #masthead .ast-site-identity,
  #masthead .site-logo-img,
  #masthead .custom-logo-link {
    display: flex !important;
    align-items: center !important;
    visibility: visible !important;
    opacity: 1 !important;
  }
}

/* Menú */

#masthead .main-header-menu,
#masthead .main-header-menu ul {
  margin: 0 !important;
  padding: 0 !important;
}

#masthead .main-header-menu {
  gap: 34px;
  margin-top: 25px !important;
  margin-left: 60px !important;
}

#masthead .main-header-menu a {
  position: relative;
  padding: 29px 0 !important;
  text-transform: uppercase;
  font-size: 22px;
  font-weight: 500;
  letter-spacing: 1.2px;
  color: #6b6b6b;
}

#masthead .main-header-menu a:hover {
  color: var(--dt-red) !important;
}

#masthead .main-header-menu a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 50px !important;
  width: 0;
  height: 2px;
  background: var(--dt-red);
  opacity: .9;
  transition: width .25s ease;
}

#masthead .main-header-menu a:hover::after {
  width: 100%;
}

/* Offset del contenido (topbar + header) */
body.single-propiedades .site-content,
body.page .site-content,
body.home .site-content {
  padding-top: calc(var(--dt-topbar-h) + var(--dt-header-h)) !important;
}

/* Header en mobile: evitar recortes */
@media (max-width:980px) {

  #masthead .ast-builder-grid-row-container,
  #masthead .ast-container {
    padding-top: 14px !important;
    padding-bottom: 14px !important;
    overflow: visible !important;
  }

  #masthead .ast-builder-grid-row {
    min-height: 0 !important;
    height: auto !important;
    align-items: center !important;
    padding-top: 10px !important;
    padding-bottom: 10px !important;
  }

  #masthead .ast-container,
  #masthead .ast-builder-grid-row-container {
    padding-left: 14px !important;
    padding-right: 14px !important;
  }
}

@media (max-width:768px) {

  #masthead,
  #masthead .ast-primary-header-bar,
  #masthead .ast-builder-grid-row,
  #masthead .ast-builder-grid-row-container {
    height: auto !important;
    min-height: 0 !important;
    overflow: visible !important;
  }

  #masthead .ast-primary-header-bar {
    padding-top: 10px !important;
    padding-bottom: 10px !important;
  }

  #masthead .custom-logo-link img,
  #masthead .custom-logo-link .custom-logo,
  #masthead .site-logo-img img,
  #masthead .ast-site-logo-img img,
  #masthead img.custom-logo {
    max-height: 92px !important;
    max-width: 70vw !important;
  }
}

/* -------------------------
   3.3 Footer
   ------------------------- */

#colophon,
.site-footer,
#colophon .ast-container,
.site-footer .ast-container {
  max-width: none !important;
  width: 100% !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
}

.dt-footer {
  position: relative;
  left: 50%;
  right: 50%;
  margin-left: -50vw;
  margin-right: -50vw;
  width: 100vw !important;
  max-width: none !important;
  background: linear-gradient(to bottom, #ffffff 0%, #fbfbfb 100%);
  border-top: 2px solid var(--dt-red);
  padding: 36px 0 0;
}

.dt-footer__inner {
  max-width: 1500px !important;
  margin: 0 auto;
  padding-left: 24px;
  padding-right: 24px;
  display: grid !important;
  grid-auto-flow: row !important;
  grid-template-columns: repeat(4, 1fr) !important;
  gap: 48px !important;
  align-items: start !important;
  justify-items: start !important;
}

.dt-footer__col {
  width: auto !important;
  max-width: none !important;
  align-self: start !important;
  display: block !important;
  margin-top: 0 !important;
  padding-top: 0 !important;
}

.dt-footer__brand {
  grid-column: 1;
  display: block !important;
  margin-top: -6px;
}

/* CORRECCIÓN: era 2220px, claramente un typo */
.dt-footer__logo {
  max-width: 220px;
  height: auto;
  display: block;
  object-fit: contain;
}

.dt-footer__title {
  margin: 0 0 12px !important;
  font-size: 17px;
  font-weight: 800;
  letter-spacing: .2px;
  color: #111;
  line-height: 1.2;
  white-space: nowrap;
}

.dt-footer__list,
.dt-footer__links {
  list-style: none;
  margin: 0 !important;
  padding: 0 !important;
  display: grid;
  gap: 10px;
}

.dt-footer__list li,
.dt-footer__links li {
  font-size: 14.5px;
  color: #333;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.dt-footer a {
  color: inherit;
  text-decoration: none;
}

.dt-footer a:hover {
  color: var(--dt-red-dark);
  text-decoration: underline;
}

.dt-footer__links a {
  display: inline-block;
  padding: 2px 0;
  text-decoration: none;
}

.dt-footer__links a:hover {
  color: var(--dt-red);
  text-decoration: none;
  transform: translateX(2px);
  transition: transform .15s ease, color .15s ease;
}

.dt-footer__social {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 0 !important;
  padding: 0 !important;
  justify-content: flex-start !important;
}

.dt-footer__social .dt-social {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid rgba(0, 0, 0, .08);
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f3f3f3;
  transition: all .3s ease;
}

.dt-footer__social .dt-social:hover {
  background: #b91c1c;
  color: #fff;
  box-shadow: 0 6px 18px rgba(0, 0, 0, .12);
  transform: translateY(-1px);
}

.dt-footer__bottom {
  width: 100%;
  max-width: none;
  margin: 0;
  background: #f4f4f4;
  color: #666;
  font-size: 13px;
  padding: 14px 24px;
  text-align: center;
  border-top: 1px solid rgba(0, 0, 0, .08);
}

.dt-footer__inner>p {
  display: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

.dt-footer__inner>.dt-footer__col:empty {
  display: none !important;
}

@media (max-width:1024px) {
  .dt-footer__inner {
    grid-template-columns: 1fr 1fr !important;
  }
}

@media (max-width:640px) {
  .dt-footer__inner {
    grid-template-columns: 1fr !important;
  }
}

/* -------------------------
   3.4 WhatsApp flotante
   ------------------------- */

.whatsapp-float,
a[aria-label="WhatsApp"] {
  display: none !important;
}

.dt-wa-float {
  position: fixed !important;
  right: 22px !important;
  bottom: 22px !important;
  width: 60px !important;
  height: 60px !important;
  border-radius: 999px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  background: #25D366 !important;
  box-shadow: 0 12px 28px rgba(0, 0, 0, .22) !important;
  z-index: 999999 !important;
  text-decoration: none !important;
  overflow: visible !important;
  transform: translateZ(0) !important;
  transition: transform .18s ease, box-shadow .18s ease, filter .18s ease !important;
}

.dt-wa-float::before {
  content: "" !important;
  position: absolute !important;
  inset: -6px !important;
  border-radius: 999px !important;
  background: rgba(37, 211, 102, .22) !important;
  opacity: .75 !important;
  transform: scale(.85) !important;
  /* CORRECCIÓN: !important no tiene efecto dentro de @keyframes,
     pero sí es innecesario en la declaración inicial del estado base */
  animation: dtWaPulse 1.8s ease-out infinite;
  pointer-events: none !important;
}

/* CORRECCIÓN: eliminados los !important dentro de @keyframes, no tienen efecto */
@keyframes dtWaPulse {
  0% {
    transform: scale(.85);
    opacity: .55;
  }

  60% {
    transform: scale(1.15);
    opacity: .18;
  }

  100% {
    transform: scale(1.22);
    opacity: 0;
  }
}

.dt-wa-float:hover {
  transform: translateY(-3px) scale(1.05) !important;
  box-shadow: 0 16px 38px rgba(0, 0, 0, .28) !important;
  filter: brightness(1.03) saturate(1.05) !important;
}

.dt-wa-float .dt-wa-svg {
  width: 34px !important;
  height: 34px !important;
  display: block !important;
}

.dt-wa-float .dt-wa-svg,
.dt-wa-float .dt-wa-svg * {
  fill: #fff !important;
  color: #fff !important;
}

@media (max-width:480px) {
  .dt-wa-float {
    width: 62px !important;
    height: 62px !important;
    right: 18px !important;
    bottom: 18px !important;
  }

  .dt-wa-float .dt-wa-svg {
    width: 36px !important;
    height: 36px !important;
  }
}

/* =========================================================
   4) PÁGINAS / SECCIONES
   ========================================================= */

/* -------------------------
   4.1 Home hero
   ------------------------- */

.dt-hero {
  position: relative;
}

.dt-hero .dt-hero__bottom {
  position: absolute;
  left: 50%;
  bottom: 190px;
  transform: translateX(-50%);
  z-index: 20;
  text-align: center;
  width: min(920px, calc(100% - 40px));
}

.dt-hero .dt-hero__tagline,
.dt-hero .dt-hero__tagline strong,
.dt-hero .dt-hero__address {
  color: #fff !important;
  text-shadow: 0 2px 12px rgba(0, 0, 0, .55);
}

.dt-hero .dt-hero__tagline {
  font-size: 22px;
  line-height: 1.4;
  margin: 0;
}

.dt-hero .dt-hero__tagline strong {
  font-weight: 700;
}

.dt-hero .dt-hero__address {
  position: absolute;
  left: 0 !important;
  right: 0 !important;
  bottom: 10px !important;
  width: 100% !important;
  box-sizing: border-box;
  transform: none !important;
  padding: 0 18px;
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 13px;
  opacity: .8;
  z-index: 20;
}

/* =========================================================
   5) UTILIDADES
   ========================================================= */

.home .dt-menu-home {
  display: none !important;
}

.home .ast-mobile-popup-drawer .dt-menu-home,
.home .ast-mobile-header-content .dt-menu-home,
.home .ast-header-break-point .dt-menu-home {
  display: none !important;
}

/* Ocultar nombre y descripción del sitio en el header */
#masthead .ast-site-title-wrap,
#masthead .site-title,
#masthead .site-description {
  display: none !important;
}

#masthead .site-branding {
  gap: 0 !important;
}

/* TEST OK VS CODE */