/**
 * Image Hover Box Widget Styles
 * Version: 1.0.0
 */

/* ============================================
   Main Wrapper
   ============================================ */
.ihb-wrapper {
    position: relative;
    width: 100%;
    height: 300px;
    overflow: hidden;
    cursor: pointer;
}

.ihb-link {
    display: block;
    width: 100%;
    height: 100%;
    text-decoration: none;
}

/* ============================================
   Background Image
   ============================================ */
.ihb-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    transition: transform 0.3s ease;
}

.ihb-wrapper.ihb-zoom-enabled:hover .ihb-image {
    transform: scale(1.1);
}

/* ============================================
   Overlay
   ============================================ */
.ihb-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    z-index: 1;
}

.ihb-wrapper:hover .ihb-overlay {
    opacity: 1;
    visibility: visible;
}

/* ============================================
   Content (Icon + Title)
   ============================================ */
.ihb-content {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 2;
    padding: 20px;
    box-sizing: border-box;
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.ihb-wrapper:hover .ihb-content {
    opacity: 1;
}

/* ============================================
   Icon
   ============================================ */
.ihb-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 50px;
    color: #ffffff;
    margin-bottom: 15px;
}

.ihb-icon svg {
    width: 50px;
    height: 50px;
    fill: #ffffff;
}

.ihb-icon i {
    line-height: 1;
}

/* Icon Box */
.ihb-icon-box {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 80px;
    border: 2px solid #ffffff;
    border-radius: 5px;
    margin-bottom: 15px;
    background: transparent;
}

.ihb-icon-box .ihb-icon {
    margin-bottom: 0;
}

/* ============================================
   Title
   ============================================ */
.ihb-title {
    margin: 0;
    padding: 0;
    font-size: 18px;
    font-weight: 600;
    color: #ffffff;
    text-transform: uppercase;
    letter-spacing: 2px;
    text-align: center;
}

/* ============================================
   Animation: Fade
   ============================================ */
.ihb-animation-fade .ihb-content {
    opacity: 0;
}

.ihb-animation-fade:hover .ihb-content {
    opacity: 1;
}

/* ============================================
   Animation: Fade Up
   ============================================ */
.ihb-animation-fade-up .ihb-content {
    opacity: 0;
    transform: translateY(30px);
}

.ihb-animation-fade-up:hover .ihb-content {
    opacity: 1;
    transform: translateY(0);
}

/* ============================================
   Animation: Fade Down
   ============================================ */
.ihb-animation-fade-down .ihb-content {
    opacity: 0;
    transform: translateY(-30px);
}

.ihb-animation-fade-down:hover .ihb-content {
    opacity: 1;
    transform: translateY(0);
}

/* ============================================
   Animation: Zoom
   ============================================ */
.ihb-animation-zoom .ihb-content {
    opacity: 0;
    transform: scale(0.8);
}

.ihb-animation-zoom:hover .ihb-content {
    opacity: 1;
    transform: scale(1);
}

/* ============================================
   RTL Support
   ============================================ */
[dir="rtl"] .ihb-title {
    letter-spacing: 0;
}

/* ============================================
   Editor Preview - Show on hover simulation
   ============================================ */
.elementor-editor-active .ihb-wrapper:hover .ihb-content {
    opacity: 1;
    transform: none;
}

.elementor-editor-active .ihb-wrapper:hover .ihb-overlay {
    opacity: 1;
    visibility: visible;
}
