/*
Theme Name: RealHomes Child
Theme URI: https://casasnicas.com
Description: Child theme para mejorar conversion, estilos y CTAs.
Author: Copilot
Template: realhomes
Version: 1.1.0
*/

:root {
  --brand: #d62828;
  --brand-dark: #991b1b;
  --brand-soft: #ffe9e9;
  --accent: #1f9d55;
  --ink: #1b1d2a;
  --muted: #5d6170;
  --line: #e6e8ef;
  --surface: #ffffff;
  --surface-soft: #f6f7fb;
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --shadow-md: 0 16px 40px rgba(27, 29, 42, 0.1);
}

html,
body {
  background: radial-gradient(circle at 0% 0%, #fff7f2 0%, #ffffff 40%), #ffffff;
  color: var(--ink);
}

body {
  font-family: "Manrope", "Segoe UI", Tahoma, sans-serif;
  line-height: 1.65;
}

h1,
h2,
h3,
h4,
h5,
h6,
.narrative h3,
.rh_page__title,
.rh_section__head {
  font-family: "Sora", "Trebuchet MS", sans-serif;
  letter-spacing: -0.01em;
  color: #0f172a;
}

a {
  color: var(--brand-dark);
}

a:hover,
a:focus {
  color: var(--brand);
}

/* Header */
.header-wrapper {
  position: sticky;
  top: 0;
  z-index: 9999;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--line);
}

#header-top {
  background: linear-gradient(90deg, #1f2937, #111827);
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
}

#contact-email,
.user-nav a {
  color: #f8fafc !important;
}

.contact-number a {
  color: var(--brand-dark);
  font-weight: 800;
}

.main-menu {
  border-top: 1px solid var(--line);
}

/* Main sections */
.main-wrapper.contents .main {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: 24px;
}

.inner-wrapper {
  border-top: 1px dashed var(--line);
  margin-top: 18px;
  padding-top: 18px;
}

/* Search card */
.as-form-wrap {
  background: linear-gradient(135deg, #fff8f8, #fff);
  border: 1px solid #ffd9d9;
  border-radius: var(--radius-md);
  padding: 18px;
}

.advance-search-form input,
.advance-search-form select,
.advance-search-form .select2-selection {
  border-radius: 12px !important;
  border-color: #e4e6ee !important;
  min-height: 44px;
}

.advance-search-form .search-btn,
.button,
.btn,
a.button,
button,
input[type=submit],
.rh_btn {
  background: linear-gradient(135deg, var(--brand), #f04b4b) !important;
  border: none !important;
  color: #fff !important;
  border-radius: 12px;
  font-weight: 800;
  box-shadow: 0 10px 20px rgba(214, 40, 40, 0.25);
}

.advance-search-form .search-btn:hover,
.button:hover,
.btn:hover,
a.button:hover,
button:hover,
input[type=submit]:hover,
.rh_btn:hover {
  transform: translateY(-1px);
  filter: brightness(0.98);
}

/* Property cards */
.rh_prop_card,
.rh_list_card,
.property-card,
.rh_property {
  background: var(--surface);
  border: 1px solid #ebeef5;
  border-radius: var(--radius-md);
  box-shadow: 0 14px 28px rgba(17, 24, 39, 0.08);
  overflow: hidden;
}

.rh_prop_card__price,
.rh_list_card__price,
.price {
  color: var(--brand-dark);
  font-weight: 800;
}

.statuses a,
.rh_prop_statuses a,
.property-status {
  background: var(--brand-soft);
  color: var(--brand-dark) !important;
  border: 1px solid #ffc9c9;
  border-radius: 999px;
  padding: 4px 10px;
  font-weight: 700;
}

/* Featured block */
.featured-properties-carousel,
#rh_featured_properties {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, #ffffff, #fff6f4);
  box-shadow: var(--shadow-md);
  padding: 20px;
}

.featured-properties-carousel .narrative h3,
#rh_featured_properties .narrative h3 {
  font-size: clamp(1.4rem, 2vw, 2rem);
}

/* Home mini CTA */
.home-mini-cta {
  display: block;
  background: linear-gradient(135deg, #111827, #1f2937);
  color: #fff;
  padding: 10px 12px;
}

.hm-wrap {
  max-width: 1080px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: space-between;
}

.hm-text {
  font-weight: 800;
}

.hm-actions {
  display: flex;
  gap: 8px;
}

.hm-btn {
  display: inline-block;
  padding: 10px 12px;
  border-radius: 10px;
  text-decoration: none;
  font-weight: 800;
}

.hm-wa {
  background: #22c55e;
  color: #fff;
}

.hm-call {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.35);
}

@media (min-width: 992px) {
  .home-mini-cta {
    display: none;
  }
}

/* Conversion blocks */
.cb-leads {
  margin: 26px 0;
  border: 1px solid #ffcfbf;
  border-radius: var(--radius-lg);
  box-shadow: 0 18px 40px rgba(17, 24, 39, 0.1);
}

.cb-banner {
  padding: 40px 20px;
  background: linear-gradient(155deg, #fff5ef 0%, #fff 55%, #f0fff6 100%);
  text-align: center;
}

.cb-aldo {
  padding: 24px 20px;
  background:
    radial-gradient(circle at top left, rgba(214, 40, 40, 0.08), transparent 32%),
    linear-gradient(135deg, #ffffff 0%, #fff8f5 55%, #fff1eb 100%);
}

.cb-aldo-wrap {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  align-items: center;
}

.cb-aldo-media {
  position: relative;
}

.cb-aldo-media img {
  display: block;
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  border-radius: 28px;
  border: 1px solid rgba(214, 40, 40, 0.14);
  box-shadow: 0 22px 48px rgba(27, 29, 42, 0.16);
}

.cb-aldo-copy {
  text-align: left;
}

.cb-eyebrow {
  display: inline-block;
  margin-bottom: 12px;
  padding: 7px 12px;
  border-radius: 999px;
  background: #fff0ea;
  color: var(--brand-dark);
  font-size: 0.84rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.cb-aldo-copy p {
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 1.04rem;
}

.cb-aldo-points {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 18px;
}

.cb-aldo-points span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid #ffd9d9;
  color: #1f2937;
  font-weight: 700;
}

.cb-aldo-points span::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--brand);
}

.cb-wrap {
  max-width: 1080px;
  margin: 0 auto;
}

.cb-leads h2 {
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  line-height: 1.2;
  margin: 0 0 16px;
}

.cb-benefits {
  list-style: none;
  padding: 0;
  margin: 0 0 18px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 9px;
}

.cb-benefits li {
  margin: 0;
  display: flex;
  gap: 10px;
  align-items: flex-start;
  justify-content: center;
  color: #1f2937;
  font-weight: 600;
}

.cb-benefits li::before {
  content: "✓";
  width: 24px;
  height: 24px;
  line-height: 24px;
  text-align: center;
  background: #dcfce7;
  color: #166534;
  border-radius: 50%;
  font-weight: 900;
}

.cb-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
}

.cb-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 18px;
  border-radius: 12px;
  text-decoration: none;
  font-weight: 800;
  color: #fff !important;
  min-width: 172px;
}

.cb-btn .cb-ico {
  width: 18px;
  height: 18px;
  display: inline-block;
}

.cb-primary,
.cb-call {
  background: linear-gradient(135deg, var(--brand), #f04b4b);
}

.cb-wa {
  background: linear-gradient(135deg, #1fa855, #22c55e);
}

.cb-property-cta {
  margin-top: 28px;
  padding: 28px 18px;
  background: linear-gradient(180deg, #fff, #fff8f8);
  border: 1px solid #ffd9d9;
  border-radius: var(--radius-md);
}

.cb-property-cta h3 {
  margin: 0 0 8px;
}

.cb-property-cta .cb-actions {
  margin: 12px 0;
}

.cb-trust {
  display: block;
  color: var(--muted);
}

/* Injected WA button on cards */
.wa-cta-card {
  display: inline-block;
  background: linear-gradient(135deg, #1fa855, #22c55e);
  color: #fff !important;
  padding: 10px 14px;
  border-radius: 10px;
  text-decoration: none;
  font-weight: 700;
  margin-top: 10px;
}

.wa-cta-card:hover {
  filter: brightness(0.96);
}

/* Mobile sticky CTA */
.wa-cta-sticky {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  gap: 10px;
  justify-content: space-between;
  padding: 10px;
  background: rgba(255, 255, 255, 0.98);
  border-top: 1px solid var(--line);
  box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.12);
  z-index: 99990;
}

.wa-cta-sticky .wa-btn,
.wa-cta-sticky .call-btn {
  flex: 1;
  text-align: center;
  padding: 12px 14px;
  border-radius: 10px;
  font-weight: 800;
  text-decoration: none;
  color: #fff;
}

.wa-cta-sticky .wa-btn {
  background: linear-gradient(135deg, #1fa855, #22c55e);
}

.wa-cta-sticky .call-btn {
  background: linear-gradient(135deg, var(--brand), #f04b4b);
}

@media (min-width: 992px) {
  .wa-cta-sticky {
    display: none;
  }
}

/* Footer */
#footer-wrapper {
  background: #0f172a;
  margin-top: 24px;
}

#footer,
#footer a,
#footer p,
#footer li,
#footer-bottom,
#footer-bottom a,
#footer-bottom p {
  color: #e2e8f0;
}

#footer .widget h3,
#footer .title {
  color: #fff;
}

/* Responsive polish */
@media (min-width: 768px) {
  .cb-benefits {
    grid-template-columns: 1fr 1fr;
  }

  .cb-aldo-wrap {
    grid-template-columns: minmax(280px, 420px) 1fr;
    gap: 34px;
  }
}

@media (max-width: 576px) {
  .main-wrapper.contents .main {
    padding: 14px;
    border-radius: var(--radius-md);
  }

  .cb-actions {
    flex-direction: column;
  }

  .cb-actions .cb-btn {
    width: 100%;
  }
}
