/**
 * Accordion Sticky Sections Widget Styles
 * 
 * Estilos para el widget de secciones tipo acordeón con efecto sticky.
 * Incluye animaciones de scroll y comportamiento responsivo.
 */

/* ========================================
   ESTRUCTURA PRINCIPAL
   ======================================== */

.wb-accordion-sticky-sections {
    position: relative;
}

.wb-accordion-sticky-sections__component {
    position: relative;
}

/* ========================================
   ANCHORS Y NAVEGACIÓN
   ======================================== */

.wb-accordion-sticky-sections__anchor {
    position: absolute;
    top: -100px; /* Offset para sticky positioning */
    visibility: hidden;
}

/* ========================================
   TÍTULOS STICKY
   ======================================== */

.wb-accordion-sticky-sections__sticky-top {
    z-index: 10;
    display: flex;
    align-items: center;
    padding: 1rem 0;
    transition: all 0.3s ease;
}

.wb-accordion-sticky-sections__sticky-number {
    font-weight: 600;
    color: var(--primary-color, #007cba);
    min-width: 2rem;
}

.wb-accordion-sticky-sections__sticky-title {
    font-weight: 500;
    color: var(--text-color, #333);
}

/* ========================================
   SECCIONES DE CONTENIDO
   ======================================== */

.wb-accordion-sticky-sections__content-item {
    /* position: sticky; */
    top: 0;
    transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid transparent; /* Default transparent border for Elementor control */
}

/* Efecto acordeón - las secciones se comprimen cuando no están activas */
.wb-accordion-sticky-sections__content-item:not(.active) {
    transform: translateY(0);
}

.wb-accordion-sticky-sections__content-item.collapsing {
    transform: translateY(-50px);
    opacity: 0.8;
}

/* ========================================
   LAYOUT DE CONTENIDO
   ======================================== */

.wb-accordion-sticky-sections__content-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}

.wb-accordion-sticky-sections__content-left {
    max-width: 100%;
}

/* ========================================
   BOTONES
   ======================================== */

.wb-accordion-sticky-sections__button-group {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.wb-accordion-sticky-sections__btn-primary,
.wb-accordion-sticky-sections__btn-secondary {
    transition: all 0.3s ease;
    text-decoration: none;
}

.wb-accordion-sticky-sections__btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.wb-accordion-sticky-sections__btn-secondary {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.wb-accordion-sticky-sections__btn-secondary:hover {
    transform: translateX(5px);
}

.wb-accordion-sticky-sections__btn-secondary .icon-embed-xxsmall {
    transition: transform 0.3s ease;
}

.wb-accordion-sticky-sections__btn-secondary:hover .icon-embed-xxsmall {
    transform: translateX(3px);
}

/* ========================================
   IMÁGENES
   ======================================== */

.wb-accordion-sticky-sections__image-wrapper {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.wb-accordion-sticky-sections__image-wrapper:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.wb-accordion-sticky-sections__image {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.3s ease;
}

.wb-accordion-sticky-sections__image-wrapper:hover .wb-accordion-sticky-sections__image {
    transform: scale(1.05);
}

/* ========================================
   ANIMACIONES DE SCROLL
   ======================================== */

@keyframes slideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes slideDown {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.wb-accordion-sticky-sections__content-item {
    animation: slideUp 0.6s ease-out;
}

/* ========================================
   ESTADOS RESPONSIVE
   ======================================== */

@media (max-width: 991px) {
    .wb-accordion-sticky-sections__content-layout {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .wb-accordion-sticky-sections__image-wrapper {
        order: -1; /* Imagen arriba en móvil */
    }
    
    .wb-accordion-sticky-sections__button-group {
        justify-content: center;
    }
}

@media (max-width: 767px) {
    
    .wb-accordion-sticky-sections__content-layout {
        gap: 1.5rem;
    }
    
    .wb-accordion-sticky-sections__button-group {
        align-items: stretch;
        gap: 0.75rem;
    }
    
    .wb-accordion-sticky-sections__btn-primary,
    .wb-accordion-sticky-sections__btn-secondary {
        text-align: center;
        justify-content: center;
    }
}

@media (max-width: 479px) {
    .wb-accordion-sticky-sections__sticky-top {
        align-items: flex-start;
        gap: 0.25rem;
    }
    
    .wb-accordion-sticky-sections__sticky-number {
        min-width: auto;
    }
}

/* ========================================
   INTERSECTION OBSERVER CLASSES
   ======================================== */

.wb-accordion-sticky-sections__content-item.in-view {
    animation: slideUp 0.6s ease-out;
}

.wb-accordion-sticky-sections__content-item.out-of-view {
    opacity: 0.7;
    transform: translateY(20px);
}

/* ========================================
   UTILIDADES
   ======================================== */

.wb-accordion-sticky-sections .margin-right.margin-small {
    margin-right: 0.75rem;
}

.wb-accordion-sticky-sections .margin-bottom.margin-xsmall {
    margin-bottom: 0.5rem;
}

.wb-accordion-sticky-sections .margin-bottom.margin-small {
    margin-bottom: 1rem;
}

.wb-accordion-sticky-sections .margin-top.margin-medium {
    margin-top: 1.5rem;
}

.wb-accordion-sticky-sections .padding-vertical.padding-large {
    padding-top: 3rem;
    padding-bottom: 3rem;
}

.wb-accordion-sticky-sections .padding-global {
    padding-left: 1rem;
    padding-right: 1rem;
}

@media (min-width: 768px) {
    .wb-accordion-sticky-sections .padding-global {
        padding-left: 2rem;
        padding-right: 2rem;
    }
}

@media (min-width: 1200px) {
    .wb-accordion-sticky-sections .padding-global {
        padding-left: 3rem;
        padding-right: 3rem;
    }
} 