/* Interactive Banners - Frontend Styles */

.ib-banner-wrapper {
    position: relative;
    width: 100%;
    margin: 0 auto;
    overflow: hidden;
}

.ib-banner-container {
    position: relative;
    width: 100%;
}

/* Single Banner */
.ib-single-banner {
    position: relative;
    width: 100%;
}

.ib-image-container {
    position: relative;
    width: 100%;
    line-height: 0;
}

.ib-banner-image {
    display: block;
    width: 100%;
    height: auto;
    max-width: 100%;
}

/* Slider */
.ib-slider {
    position: relative;
    width: 100%;
    overflow: hidden;
}

.ib-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.5s ease, visibility 0.5s ease;
    z-index: 1;
}

.ib-slide.active {
    position: relative;
    opacity: 1;
    visibility: visible;
    z-index: 2;
}

.ib-slide.fade-out {
    opacity: 0;
    z-index: 1;
}

.ib-slide.fade-in {
    opacity: 1;
    z-index: 2;
}

/* Slide transition */
.ib-slider.slide-transition .ib-slide {
    transition: transform 0.5s ease, opacity 0.5s ease, visibility 0.5s ease;
}

.ib-slider.slide-transition .ib-slide.slide-left {
    transform: translateX(-100%);
}

.ib-slider.slide-transition .ib-slide.slide-right {
    transform: translateX(100%);
}

.ib-slider.slide-transition .ib-slide.active {
    transform: translateX(0);
}

/* SVG Overlay */
.ib-shapes-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 5;
}

/* Enlaces de formas - permitir clics */
.ib-shape-link {
    pointer-events: all;
    cursor: pointer;
    outline: none;
}

/* Formas clicables */
.ib-clickable-shape {
    transition: all 0.3s ease;
    pointer-events: all;
}

/* Efecto Brillo (Glow) - Por defecto */
.ib-hover-glow:hover,
.ib-hover-glow.active-touch {
    filter: drop-shadow(0 0 8px currentColor) brightness(1.3);
}

/* Efecto Foco de Teatro (Spotlight) */
.ib-hover-spotlight:hover,
.ib-hover-spotlight.active-touch {
    filter: drop-shadow(0 0 20px rgba(255, 255, 255, 0.8)) 
            drop-shadow(0 0 40px rgba(255, 255, 255, 0.6))
            brightness(1.5);
}

/* Efecto Pulso (Pulse) */
@keyframes shape-pulse {
    0%, 100% {
        transform: scale(1);
        filter: brightness(1);
    }
    50% {
        transform: scale(1.05);
        filter: brightness(1.3) drop-shadow(0 0 10px currentColor);
    }
}

.ib-hover-pulse:hover,
.ib-hover-pulse.active-touch {
    animation: shape-pulse 1s ease-in-out infinite;
}

/* Efecto Elevación (Lift) */
.ib-hover-lift:hover,
.ib-hover-lift.active-touch {
    filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.3)) brightness(1.2);
    transform: translateY(-3px);
}

/* Efecto Ninguno */
.ib-hover-none:hover,
.ib-hover-none.active-touch {
    opacity: 0.7;
}

/* Asegurar que las formas sean clicables en toda su área */
.ib-rect-shape,
.ib-circle-shape,
.ib-polygon-shape,
.ib-path-shape {
    cursor: pointer;
}

/* Para formas sin enlace, no mostrar cursor pointer */
.ib-shapes-overlay rect:not([style*="cursor"]),
.ib-shapes-overlay circle:not([style*="cursor"]),
.ib-shapes-overlay polygon:not([style*="cursor"]),
.ib-shapes-overlay path:not([style*="cursor"]) {
    cursor: default;
}

/* Efecto de enfoque para accesibilidad */
.ib-shape-link:focus {
    outline: 2px solid #0073aa;
    outline-offset: 2px;
}

.ib-shape-link:focus .ib-clickable-shape {
    opacity: 0.7 !important;
}

/* Prevenir selección de texto en las formas */
.ib-shapes-overlay,
.ib-shape-link,
.ib-clickable-shape {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

/* Navigation Arrows */
.ib-nav-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    color: #fff;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    font-size: 0;
}

.ib-nav-arrow:hover {
    background: rgba(0, 0, 0, 0.8);
    transform: translateY(-50%) scale(1.1);
}

.ib-nav-arrow:focus {
    outline: 2px solid #fff;
    outline-offset: 2px;
}

.ib-nav-prev {
    left: 20px;
}

.ib-nav-next {
    right: 20px;
}

.ib-arrow-icon {
    font-size: 32px;
    line-height: 1;
    font-weight: bold;
}

/* Dots Navigation */
.ib-dots-container {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 10;
}

.ib-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    border: 2px solid rgba(255, 255, 255, 0.8);
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0;
    font-size: 0;
}

.ib-dot:hover {
    background: rgba(255, 255, 255, 0.8);
    transform: scale(1.2);
}

.ib-dot.active {
    background: #fff;
    transform: scale(1.3);
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .ib-nav-arrow {
        width: 40px;
        height: 40px;
    }
    
    .ib-arrow-icon {
        font-size: 24px;
    }
    
    .ib-nav-prev {
        left: 10px;
    }
    
    .ib-nav-next {
        right: 10px;
    }
    
    .ib-dots-container {
        bottom: 10px;
    }
    
    .ib-dot {
        width: 10px;
        height: 10px;
    }
}

@media (max-width: 480px) {
    .ib-nav-arrow {
        width: 35px;
        height: 35px;
    }
    
    .ib-arrow-icon {
        font-size: 20px;
    }
    
    .ib-dot {
        width: 8px;
        height: 8px;
        gap: 8px;
    }
}

/* Touch device optimizations */
@media (hover: none) {
    .ib-clickable-shape:active {
        opacity: 0.6 !important;
    }
    
    .ib-nav-arrow {
        background: rgba(0, 0, 0, 0.7);
    }
}

/* Accessibility */
.ib-banner-wrapper:focus-within .ib-nav-arrow {
    opacity: 1;
}

.screen-reader-text {
    clip: rect(1px, 1px, 1px, 1px);
    clip-path: inset(50%);
    height: 1px;
    width: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
}

/* Loading state */
.ib-banner-wrapper.loading {
    min-height: 400px;
    background: #f0f0f1;
}

.ib-banner-wrapper.loading::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}
