/* ==========================================
   COMPONENTES GLOBALES Y REUTILIZABLES (UI)
   ========================================== */

/* 1. HERO PRINCIPAL */
.ui-hero {
  position: relative;
  height: 75vh;
  min-height: 500px;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  text-align: center;
  background-color: #163A43; /* Color de respaldo si no hay foto */
}

.ui-hero-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1;
}

.ui-hero-content {
  position: relative;
  z-index: 2;
  max-width: 900px;
  margin: 0 auto;
  padding: 0 20px;
}


.ui-hero-title {
  font-size: 2.8rem;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 18px;
  color: #ffffff;
}

.ui-hero-subtitle {
  font-size: 1.15rem;
  line-height: 1.6;
  margin: 0 auto 30px auto;
  color: rgba(255, 255, 255, 0.9);
}

.ui-hero-actions {
  display: flex;
  justify-content: center;
  gap: 15px;
  flex-wrap: wrap;
}

/* 2. BOTONES */
.btn-primary {
  background-color: var(--color-yellow, #CDAA67);
  color: var(--color-blue, #163A43);
  padding: 12px 28px;
  border-radius: 6px;
  font-weight: 700;
  text-decoration: none;
  transition: transform 0.2s ease, opacity 0.2s ease;
  display: inline-block;
}

.btn-primary:hover {
  opacity: 0.9;
  transform: translateY(-2px);
}

.btn-whatsapp {
  background-color: #1B5E4F;
  color: #ffffff;
  padding: 12px 28px;
  border-radius: 6px;
  font-weight: 700;
  text-decoration: none;
  transition: transform 0.2s ease, background-color 0.2s ease;
  display: inline-block;
}

.btn-whatsapp:hover {
  background-color: #20ba5a;
  transform: translateY(-2px);
}

/* RESPONSIVO */
@media (max-width: 768px) {
  .ui-hero-title {
    font-size: 2rem;
  }
  .ui-hero-subtitle {
    font-size: 1rem;
  }
}

/* Estilos para page.php */
.section-intro {
    margin-top: 50px;
    margin-bottom: 30px;
}
.intro-wrapper {
    max-width: 850px;
    margin: 0 auto;
}
.intro-text {
    font-size: 1.15rem;
    line-height: 1.7;
    color: var(--color-text-dark, #334155);
}

.card-info {
    margin-top: 40px;
    margin-bottom: 60px;
}

.ui-hero-secondary {
    background-color: var(--color-blue, #163A43);
    color: #fff;
    padding: 60px 20px;
    margin: 40px 0;
}
.hero-secondary-content {
    max-width: 900px;
    margin: 0 auto;
}
.hero-secondary-title {
    font-size: 2rem;
    color: #fff;
    margin-bottom: 15px;
}
.hero-secondary-subtitle {
    font-size: 1.1rem;
    opacity: 0.9;
    margin: 0;
}

.section-properties {
    margin-top: 40px;
    margin-bottom: 60px;
}
.section-properties .section-header {
    margin-bottom: 30px;
}
.btn-property-link {
    display: inline-block;
    margin-top: 10px;
    font-size: 0.9rem;
    padding: 8px 16px;
}
.action-wrapper {
    margin-top: 40px;
}

.ui-gutenberg-content {
    padding: 20px 0;
}

/* ESTILOS PÁGINA DESARROLLOS (PAGE-DESARROLLOS) */

.desarrollos-page-wrapper {
    padding-bottom: 60px;
}

/* Hero */
.desarrollos-hero {
    background-color: var(--color-blue);
    color: var(--color-white);
    padding: 80px 20px;
    margin-bottom: 60px;
}

.hero-actions {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.btn-primary {
    background-color: var(--color-yellow);
    color: var(--color-blue);
    padding: 12px 25px;
    border-radius: 6px;
    font-weight: bold;
    text-decoration: none;
}

.btn-whatsapp {
    background-color: var(--color-whatsapp);
    color: var(--color-white);
    padding: 12px 25px;
    border-radius: 6px;
    font-weight: bold;
    text-decoration: none;
}

/* Grilla de 6 Servicios B2B */
.card-info {
    margin-bottom: 80px;
}

.section-header {
    margin-bottom: 40px;
}

.section-header h2 {
    font-size: 2rem;
    color: var(--color-blue);
    margin-bottom: 10px;
    text-align: center;
}

.card-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 25px;
}

.card-info-article {
    background: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    padding: 30px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card-info-article:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.06);
    border-color: var(--color-yellow);
}

.card-info-icon {
    font-size: 2.2rem;
    margin-bottom: 15px;
}

.card-info-article h3 {
    font-size: 1.25rem;
    color: var(--color-blue);
    margin-bottom: 10px;
}

.card-info-article p {
    color: var(--color-text-dark);
    font-size: 0.95rem;
    line-height: 1.6;
    margin: 0;
}

/* 1. ESTRUCTURA DE CONTENEDORES (RESPETA TEXTO ARRIBA Y FOOTER ABAJO) */

/* Asegurar que las secciones respeten su propio espacio vertical */
.desarrollos-marcas,
.seccion-equipo {
    display: block;
    width: 100%;
    margin-top: 40px !important;
    margin-bottom: 40px !important;
    clear: both;
}

/* 2. GRILLA CENTRADA PARA LOGOS DE ALIANZAS / DESARROLLOS */

.grid-marcas-desarrollos {
    display: flex;
    flex-wrap: wrap;
    justify-content: center; /* Centra horizontalmente: 1 o varios */
    align-items: center;
    gap: 20px;
    width: 100%;
    max-width: 1200px;
    margin: 25px auto 0 auto; /* Empuja hacia abajo respetando la cabecera */
}

.grid-marcas-desarrollos .card-marca {
    flex: 0 1 200px; /* Ancho base de cada caja */
    max-width: 220px;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 15px;
    background: var(--color-white);
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.grid-marcas-desarrollos .card-marca img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
}

/* 3. GRILLA CENTRADA PARA ASESORES Y EQUIPO */

.grid-equipo,
.grid-equipo-socios,
.grid-equipo-compacto,
.grid-equipo-alianzas {
    display: flex;
    flex-wrap: wrap;
    justify-content: center; /* Centra 1 sola tarjeta o varias */
    gap: 30px;
    width: 100%;
    max-width: 1200px;
    margin: 25px auto 0 auto;
}

.card-asesor {
    flex: 0 1 300px; /* Ancho cómodo por tarjeta */
    max-width: 320px;
    width: 100%;
    margin: 0; /* Evita que márgenes antiguos desalineen el centro */
}

/* Imagen con alto parejo y recorte limpio */
.card-asesor-media {
    width: 100%;
    height: 260px;
    overflow: hidden;
    background-color: var(--color-blue);
}

.card-asesor-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}


/* Corrección para que el contenedor de Gutenberg expanda los bloques invisibles */
.editor-styles-wrapper .block-editor-block-list__layout {
    min-height: 100vh !important;
    display: block !important;
}

/* Evitar que bloques o sliders colapsen a 0px de alto en el editor */
.editor-styles-wrapper .wp-block {
    max-width: 100% !important;
    visibility: visible !important;
    opacity: 1 !important;
}