/* --- SLIDER FIXED TRANSITIONS (LOOP-SAFE) --- */

/* Móviles (hasta 767px) - SE MANTIENE IGUAL */
@media (max-width: 767px) {
  .buddies-slideshow-container {
    position: relative;
    width: 100%;
    height: 407px; /* Altura fija móvil */
    overflow: hidden;
  }
}

/* Escritorio (desde 768px en adelante) - MODIFICADO */
@media (min-width: 768px) {
  .buddies-slideshow-container {
    margin-top: 46px;
    position: relative;
    width: 100%;
    
    /* MODIFICACIÓN: */
    /* 1. Quitamos height: 460px fijo */
    height: auto; 
    
    /* 2. Añadimos aspect-ratio exacto de tu imagen (2560 / 781) */
    /* Esto obliga al contenedor a tener siempre la altura perfecta para que la imagen se vea completa */
    aspect-ratio: 2560 / 781;
    
    overflow: hidden;
  }
}

/* Slides superpuestos */
.buddies-slide {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: scale(0.96);
    transition: opacity 600ms ease-in-out, transform 600ms ease-in-out;
}

/* Slide activo */
.buddies-slide.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: scale(1);
}

/* Imágenes */
.buddies-slide picture,
.buddies-slide img {
    width: 100% !important;
    height: 100% !important;
    
    display: block !important;
    object-fit: cover; /* 1.8.0: never distort — crop to fill the reserved box */
}

/* Smoke animation */
.buddies-smoke { 
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: 0;
    background-image: var(--buddies-smoke-url);
    background-repeat: no-repeat;
    background-position: center;
    background-size: 100% 100%;
    transform: translateY(0px) scale(1);
    transition: opacity 650ms ease-out, transform 650ms ease-out;
    z-index: 20;
}

.buddies-smoke.smoke-anim {
    opacity: 0.09;
    transform: translateY(-6px);
}

/* Dots */
.buddies-dots-container {
    text-align: center;
    margin-top: 16px;
    min-height: 20px; /* 1.8.0: reserve space so dots never shift the page */
}

.buddies-dot {
    width: 12px;
    height: 12px;
    background: #bbb;
    display: inline-block;
    border-radius: 50%;
    margin: 0 4px;
    cursor: pointer;
    border: none;   /* 1.8.0: dots are real <button>s now (keyboard accessible) */
    padding: 0;
}
.buddies-dot.active {
    background: #333;
}

/* Flechas */
.buddies-prev, .buddies-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    padding: 12px;
    font-size: 26px;
    background: rgba(0,0,0,0.25);
    color: #fff;
    border: none;
    cursor: pointer;
    z-index: 10;
}
.buddies-prev { left: 10px; }
.buddies-next { right: 10px; }

/* Botón Play/Pause */
.buddies-playpause {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: rgba(0,0,0,0.35);
    color: #fff;
    padding: 8px 14px;
    font-size: 14px;
    cursor: pointer;
    border: none;
    border-radius: 4px;
    z-index: 20;
}

/* ================================
   OVERLAY & CTA (LAYOUT UPDATE)
   ================================ */
.buddies-overlay {
    position: absolute;
    inset: 0;
    z-index: 30;
    pointer-events: none; /* Permite clics a través salvo en el CTA */
}

/* CTA CONTENEDOR PRINCIPAL 
   Usa variables CSS inyectadas por PHP para posicionarse
*/
.buddies-cta {
    position: absolute;
    transform: translate(-50%, -50%); /* Centrado sobre el punto X/Y */
    pointer-events: auto; /* Reactivar clics */
    text-align: center;
    z-index: 35;

    /* DESKTOP VARIABLES (Defecto) */
    left: var(--d-left, 50%);
    top: var(--d-top, 50%);
    width: var(--d-width, 20%);
    height: var(--d-height, auto); /* Auto si es texto, % si es invisible */
    
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

/* MODO INVISIBLE (HOTSPOT) */
.buddies-cta.buddies-cta-invisible {
    background: transparent;
    /* Para debug puedes descomentar esto: border: 1px dashed red; */
}

/* Enlace que llena todo el área (para modo invisible) */
.buddies-hotspot-link {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 100%; /* Asegura que llene la altura definida */
    cursor: pointer;
}

/* Estilos de Texto (Solo visible en modo normal) */
.buddies-cta h2.buddies-cta-title {
    margin-top: 0;
    color: var(--cta-title-color, #fff);
    line-height: 1.2;
    /* Fuente responsive y estilos originales conservados */
    font-size: clamp(2.5rem, 1.875rem + 3vw, 4.25rem);
    margin-bottom: 20px;
    font-family: sans-serif; /* Ajusta a tu fuente si tienes 'lazer84' cargada */
    font-weight: 700;
    text-shadow: 2px 1px 2px rgba(0,0,0,0.5);
}

.buddies-cta p.buddies-cta-subtitle {
    font-size: 1.5rem;
    margin: 0 0 20px;
    font-weight: 600;
    color: var(--cta-subtitle-color, #fff);
    text-shadow: 0px 1px 2px rgba(0,0,0,0.5);
}

/* Botones Visibles */
.buddies-btn {
    display: inline-block;
    padding: 12px 28px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    transition: 0.3s ease;
    
    /* Variables de color */
    background-color: var(--cta-btn-color, #ff6600);
    color: var(--cta-text-color, #fff);
    border: 2px solid var(--cta-btn-color, #ff6600);
}

.buddies-btn-ghost {
    background: transparent;
    color: var(--cta-btn-color, #ff6600);
}

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

/* ================================
   RESPONSIVE (MOBILE LAYOUT)
   ================================ */
@media (max-width: 768px) {
    .buddies-cta {
        /* Cambio a variables MÓVILES */
        left: var(--m-left, 50%);
        top: var(--m-top, 50%);
        width: var(--m-width, 20%);
        height: var(--m-height, auto);
    }

    /* Ajuste de textos en móvil */
    .buddies-cta h2.buddies-cta-title {
        font-size: 2rem; 
        margin-bottom: 10px;
    }
    .buddies-cta p.buddies-cta-subtitle {
        font-size: 1rem;
    }
    .buddies-btn {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
}