/**
 * Vivaia Banner Inset Styles
 */

/* Base wrapper */
.vivaia-vbi-wrapper {
    position: relative;
    width: 100%;
    overflow: hidden;
}

.vivaia-vbi-wrapper * {
    box-sizing: border-box;
}

/* Link wrapper */
.vivaia-vbi-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

/* Main image */
.vivaia-vbi-main-image {
    position: relative;
    width: 100%;
}

.vivaia-vbi-bg {
    width: 100%;
    height: auto;
    display: block;
    vertical-align: bottom;
}

/* Inset container - absolute positioned */
.vivaia-vbi-inset {
    position: absolute;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* White frame */
.vivaia-vbi-inset-frame {
    background: #fff;
    padding: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.vivaia-vbi-inset-img {
    display: block;
    width: 100%;
    height: auto;
}

/* Caption - inside white frame */
.vivaia-vbi-caption {
    display: block;
    width: 100%;
    padding-top: 8px;
    font-size: 14px;
    font-style: italic;
    color: #333;
    text-align: center;
}

/* Title overlay - Desktop */
.vivaia-vbi-desktop .vivaia-vbi-content {
    position: absolute;
    bottom: 10%;
    left: 5%;
}

.vivaia-vbi-title {
    font-size: clamp(24px, 3vw, 48px);
    margin: 0;
    font-weight: 300;
    line-height: 1.2;
}

.vivaia-vbi-desktop .vivaia-vbi-title {
    color: #fff;
}

/* Desktop: inset default positioning */
.vivaia-vbi-desktop .vivaia-vbi-inset {
    top: 10%;
    right: 5%;
    width: 25%;
}

/* Mobile: title below image with background */
.vivaia-vbi-mobile .vivaia-vbi-content {
    position: relative;
    bottom: auto;
    left: auto;
    padding: 20px;
    background: #fff;
}

.vivaia-vbi-mobile .vivaia-vbi-title {
    color: #000;
    font-size: 24px;
}

/* Mobile: inset positioning */
.vivaia-vbi-mobile .vivaia-vbi-inset {
    top: 5%;
    right: 3%;
    width: 35%;
}

/* Responsive: Show/Hide based on device */
/* Desktop and Tablet (768px and up) */
@media (min-width: 768px) {
    .vivaia-vbi-mobile {
        display: none !important;
    }
    .vivaia-vbi-desktop {
        display: block;
    }
}

/* Mobile (below 768px) */
@media (max-width: 767px) {
    .vivaia-vbi-desktop {
        display: none !important;
    }
    .vivaia-vbi-mobile {
        display: block;
    }
    
    .vivaia-vbi-caption {
        font-size: 12px;
    }
}

/* Hover effects */
.vivaia-vbi-link:hover .vivaia-vbi-bg {
    opacity: 0.95;
    transition: opacity 0.3s ease;
}

.vivaia-vbi-link:hover .vivaia-vbi-inset-frame {
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.15);
    transition: box-shadow 0.3s ease;
}

/* Elementor Editor specific styles */
.elementor-editor-active .vivaia-vbi-desktop,
.elementor-editor-active .vivaia-vbi-mobile {
    display: block !important;
    margin-bottom: 20px;
}

.elementor-editor-active .vivaia-vbi-mobile::before {
    content: 'Mobile Preview';
    display: block;
    background: #93003c;
    color: #fff;
    padding: 5px 10px;
    font-size: 12px;
    text-align: center;
}

.elementor-editor-active .vivaia-vbi-desktop::before {
    content: 'Desktop Preview';
    display: block;
    background: #0073aa;
    color: #fff;
    padding: 5px 10px;
    font-size: 12px;
    text-align: center;
}

/* Ensure insets stay contained within their wrappers in editor */
.elementor-editor-active .vivaia-vbi-wrapper {
    position: relative;
    overflow: hidden;
}

.elementor-editor-active .vivaia-vbi-main-image {
    position: relative;
    overflow: hidden;
}
