/* Ocultar banderas del selector de idioma (Polylang) */
.lang-item a img {
	    display: none;
}
}

/* ============================================
   BRL CAROUSEL - Custom Hero Slider CSS
   ============================================ */

.brl-carousel {
  position: relative;
  width: 100%;
  height: 671px;
  min-height: 671px;
  overflow: hidden;
  font-family: inherit;
}
.brl-carousel-track {
  display: flex;
  width: 300%;
  height: 671px;
  min-height: 671px;
  transition: transform 0.8s cubic-bezier(0.77, 0, 0.175, 1);
}
.brl-slide {
  position: relative;
  width: 33.3333%;
  min-height: 671px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.brl-slide-bg {
  position: absolute;
  top: 0; right: 0; bottom: 0; left: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  transform: scale(1.05);
  transition: transform 6s ease;
}
.brl-slide.active .brl-slide-bg {
  transform: scale(1);
}
.brl-slide-overlay {
  position: absolute;
  top: 0; right: 0; bottom: 0; left: 0;
  background: rgba(0,0,0,0.45);
}
.brl-slide-content {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 60px 40px;
  max-width: 860px;
  color: #fff;
}
.brl-slide-logo {
  width: 80px;
  margin-bottom: 24px;
  opacity: 0.9;
}
.brl-slide-title {
  font-size: clamp(2rem, 5vw, 3.6rem);
  font-weight: 700;
  line-height: 1.1;
  margin: 0 0 20px;
  color: #fff;
}
.brl-slide-subtitle {
  font-size: clamp(1rem, 2.5vw, 1.3rem);
  font-weight: 300;
  line-height: 1.6;
  margin: 0 0 36px;
  color: rgba(255,255,255,0.88);
}
.brl-slide-btns {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}
.brl-btn {
  display: inline-block;
  padding: 14px 34px;
  border-radius: 4px;
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  letter-spacing: 0.04em;
  transition: background 0.3s, color 0.3s, transform 0.2s;
}
.brl-btn-primary {
  background: #00da5a;
  color: #002b14;
}
.brl-btn-primary:hover {
  background: #00f264;
  transform: translateY(-2px);
}
.brl-btn-outline {
  border: 2px solid rgba(255,255,255,0.7);
  color: #fff;
  background: transparent;
}
.brl-btn-outline:hover {
  background: rgba(255,255,255,0.15);
  transform: translateY(-2px);
}
.brl-nav {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
  z-index: 10;
}
.brl-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255,255,255,0.45);
  border: none;
  cursor: pointer;
  transition: background 0.3s;
}
.brl-dot.active {
  background: #00da5a;
}
.brl-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  background: rgba(255,255,255,0.15);
  border: none;
  color: #fff;
  font-size: 1.4rem;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.3s;
}
.brl-arrow:hover { background: rgba(255,255,255,0.3); }
.brl-arrow-prev { left: 20px; }
.brl-arrow-next { right: 20px; }

@media (max-width: 768px) {
  .brl-carousel,
  .brl-carousel-track,
  .brl-slide { min-height: 520px; }
  .brl-slide-content { padding: 40px 20px; }
  .brl-arrow { display: none; }
}



/* === FINAL SPACING FIX ===
   Header is position:fixed at 133px height.
   Remove extra whitespace above carousel by zeroing wp-site-blocks padding
   and setting entry-content margin to exactly header height (133px).
*/

/* Zero out the theme global padding that adds whitespace */
.wp-site-blocks {
    padding-top: 0 !important;
    padding-bottom: 0 !important;
}

/* Override WP auto-margin to exactly match fixed header height */
.wp-site-blocks > :not(header):first-of-type {
    margin-top: 163px !important;
}
.wp-site-blocks > .wp-block-post-content {
    margin-top: 163px !important;
}
.entry-content.wp-block-post-content {
    padding-top: 0 !important;
    margin-top: 163px !important;
}

/* Remove top margin on carousel for flush header-to-carousel layout */
.brl-carousel {
    margin-top: 0 !important;
}

/* Reduce spacer/gap after carousel for symmetry with top gap */
.brl-carousel ~ .wp-block-spacer {
    height: 30px !important;
    min-height: 30px !important;
    margin-top: 0 !important;
}

/* Reduce empty P tag margin after carousel */
.brl-carousel + p {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
}

/* Reduce H1 after spacer top margin */
.brl-carousel ~ .wp-block-spacer + h1,
.brl-carousel ~ .wp-block-spacer ~ h1:first-of-type {
    margin-top: 0 !important;
}

/* Primary button corporate color #0DA5A7 */
.brl-btn-primary {
    background-color: #0DA5A7 !important;
    border-color: #0DA5A7 !important;
}
.brl-btn-primary:hover {
    background-color: #0b8f91 !important;
    border-color: #0b8f91 !important;
}


/* ============================================
   CAROUSEL FIXES - All issues resolved
   ============================================ */

/* 1. Force position:relative on carousel so arrows position correctly */
.brl-carousel {
    position: relative !important;
    overflow: hidden !important;
}

/* 2. Fix arrows positioning - they may be inside P tags (WP wraps them) */
/* Arrow parent fix - arrows use absolute positioning relative to carousel */

/* 3. Nav dots - WP uses .brl-dots (not .brl-nav) */
.brl-dots {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 10;
    align-items: center;
}

/* Hide BR tags inside brl-dots */
.brl-dots br {
    display: none;
}

/* 4. Fix .brl-nav rule to also cover .brl-dots (legacy support) */
.brl-nav {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 10;
}

/* 5. White text on primary button */
.brl-btn-primary {
    color: #ffffff !important;
}
.brl-btn-primary:hover {
    color: #ffffff !important;
}

/* 6. CINE SLIDE - custom classes CSS */
.brl-slide-overlay-dark {
    position: absolute;
    top: 0; right: 0; bottom: 0; left: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 1;
}

.brl-slide-content.left-aligned {
    align-items: flex-start;
    text-align: left;
    padding-left: 8%;
    padding-right: 40%;
}

.brl-slide-label {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #0DA5A7;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    margin-bottom: 16px;
    z-index: 2;
    position: relative;
}

.brl-slide-label svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.brl-slide-label br {
    display: none;
}

.brl-slide-title-left {
    font-size: 3.2rem;
    font-weight: 800;
    color: #ffffff;
    line-height: 1.2;
    margin: 0 0 16px 0;
    z-index: 2;
    position: relative;
}

.brl-slide-title-left .accent {
    color: #0DA5A7;
}

.brl-slide-desc {
    font-size: 1rem;
    color: rgba(255,255,255,0.88);
    line-height: 1.6;
    margin: 0 0 28px 0;
    z-index: 2;
    position: relative;
    max-width: 480px;
}

/* 7. Mobile: center and resize aurora/pines image (pexels-photo-2024881-1) */
@media (max-width: 768px) {
    img.wp-image-63 {
        width: 90% !important;
        max-width: 320px !important;
        height: auto !important;
        display: block;
        margin-left: auto !important;
        margin-right: auto !important;
    }
}


/* ============================================
   CINE SLIDE - Mobile responsive fixes
   ============================================ */

@media (max-width: 768px) {

    /* Fix left-aligned content on mobile: remove the large right padding
       and add proper horizontal padding so text doesn't touch edges */
    .brl-slide-content.left-aligned {
        padding-left: 5% !important;
        padding-right: 5% !important;
        align-items: flex-start !important;
        text-align: left !important;
        justify-content: flex-end !important;
        padding-bottom: 24px !important;
    }

    /* Reduce the huge title font size on mobile */
    .brl-slide-title-left {
        font-size: 1.6rem !important;
        line-height: 1.25 !important;
        margin-bottom: 10px !important;
    }

    /* Reduce description text size and limit lines */
    .brl-slide-desc {
        font-size: 0.85rem !important;
        line-height: 1.5 !important;
        margin-bottom: 16px !important;
        max-width: 100% !important;
        display: -webkit-box;
        -webkit-line-clamp: 3;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    /* Label font size reduction on mobile */
    .brl-slide-label {
        font-size: 0.7rem !important;
        letter-spacing: 0.08em !important;
        margin-bottom: 10px !important;
    }

    /* Make the CTA buttons smaller on mobile */
    .brl-slide-content.left-aligned .brl-slide-btns {
        flex-direction: column !important;
        gap: 8px !important;
        align-items: flex-start !important;
    }

    .brl-slide-content.left-aligned .brl-btn {
        font-size: 0.85rem !important;
        padding: 10px 20px !important;
    }
}



/* ============================
   ANIMACIÓN NÚMEROS PROCESO
   Aparición escalonada al scroll
   ============================ */

/* Keyframe de entrada con efecto bounce suave */
@keyframes boreal-num-pop {
  0%   { opacity: 0; transform: translateY(28px) scale(0.80); }
  60%  { opacity: 1; transform: translateY(-4px) scale(1.04); }
  100% { opacity: 1; transform: translateY(0)    scale(1);    }
}

/* 1. Anular la animación global del tema en los números del proceso
      y ponerlos invisibles hasta que el scroll los active */
.process-step-number .wp-block-cover {
  animation: none !important;
  opacity: 0;
  transform: translateY(28px) scale(0.80);
  will-change: opacity, transform;
}

/* 2. Cuando el row padre recibe la clase is-visible (por el IntersectionObserver),
      disparar la animación de entrada */
.process-step-row.is-visible .process-step-number .wp-block-cover {
  animation: boreal-num-pop 0.55s cubic-bezier(0.34, 1.56, 0.64, 1) forwards !important;
}

/* 3. El delay de cada número viene del JS (stepIndex * 120ms),
      aquí solo añadimos seguridad visual */
.process-step-row.is-visible .process-step-number .wp-block-cover {
  opacity: 1;
}
