/**
 * Hover Columns Widget Styles
 * @package Farways
 */

.hover-columns-wrapper {
    position: relative;
    width: 100%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
}

/* Background Layer */
.hover-columns-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    transition: none;
    z-index: 1;
}

/* Transition Background Layer - for smooth crossfade */
.hover-columns-background-layer {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: 2;
    transition: opacity 0.4s ease;
    pointer-events: none;
}

/* Overlay Layer */
.hover-columns-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    transition: background-color 0.3s ease;
    z-index: 2;
}

/* Default Center Content */
.default-center-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 3;
    text-align: center;
    max-width: 800px;
    padding: 40px;
    opacity: 1;
    visibility: visible;
    transition: opacity 0.4s ease, visibility 0.4s ease;
    pointer-events: none;
}

.default-title {
    font-size: 48px;
    font-weight: 700;
    color: #ffffff;
    margin: 0 0 20px 0;
    line-height: 1.2;
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.5);
}

.default-description {
    font-size: 20px;
    color: #ffffff;
    margin: 0;
    line-height: 1.6;
    text-shadow: 0 1px 10px rgba(0, 0, 0, 0.5);
}

/* Hide default content when hovering any column */
.hover-columns-wrapper:has(.hover-column:hover) .default-center-content {
    opacity: 0;
    visibility: hidden;
}

/* Columns Container */
.hover-columns-container {
    position: relative;
    z-index: 3;
    display: flex;
    width: 100%;
    height: 100%;
}

/* Individual Column */
.hover-column {
    flex: 1;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 30px;
    cursor: pointer;
    transition: all 0.3s ease;
}


.hover-column .column-link {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: inherit;
}

/* Column Content */
.column-content {
    text-align: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.5s ease;
    max-width: 400px;
}

.hover-column:hover .column-content {
    opacity: 1;
    visibility: visible;
}

/* Column Title */
.column-title {
    font-size: 36px;
    font-weight: 700;
    line-height: 1.2;
    margin: 0;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

/* Column Description */
.column-description {
    font-size: 16px;
    line-height: 1.6;
    margin: 0;
    text-shadow: 0 1px 5px rgba(0, 0, 0, 0.3);
}

/* Column Button */
.column-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    cursor: pointer;
    border: 1px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.column-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
}

.column-button .button-icon {
    display: inline-flex;
    align-items: center;
    transition: transform 0.3s ease;
}

.column-button:hover .button-icon {
    transform: translateX(5px);
}

/* Hover Effects */
.hover-column:hover {
    background-color: rgba(255, 255, 255, 0.05);
}

/* Column Borders (optional visual separators) */
.hover-column:not(:last-child)::after {
    content: '';
    position: absolute;
    right: 0;
    top: 20%;
    height: 60%;
    width: 1px;
    background: rgba(255, 255, 255, 0.2);
    opacity: 1;
    transition: opacity 0.3s ease;
}

.hover-column:hover::after,
.hover-column:hover + .hover-column::before {
    opacity: 0;
}

/* Responsive Styles */
@media (max-width: 1024px) {
    .column-title {
        font-size: 28px;
    }
    
    .column-description {
        font-size: 15px;
    }
    
    .hover-column {
        padding: 25px;
    }
}

@media (max-width: 768px) {
    .hover-columns-container {
        flex-direction: column;
    }
    
    .hover-column {
        min-height: 200px;
        padding: 30px 20px;
    }
    
    .hover-column:not(:last-child)::after {
        right: auto;
        top: auto;
        bottom: 0;
        left: 20%;
        width: 60%;
        height: 1px;
    }
    
    .column-title {
        font-size: 24px;
    }
    
    .column-description {
        font-size: 14px;
    }
    
    /* On mobile, hide content by default - show on tap */
    .column-content {
        opacity: 0;
        visibility: hidden;
        transform: translateY(20px) !important;
    }
    
    /* Show content when column is active (tapped) */
    .hover-column.active .column-content,
    .hover-column:hover .column-content {
        opacity: 1;
        visibility: visible;
        transform: translateY(0) !important;
    }
    
    /* Override for "always show" mobile behavior */
    .hover-columns-wrapper[data-mobile-behavior="always_show"] .column-content {
        opacity: 0.8 !important;
        visibility: visible !important;
        transform: translateY(0) !important;
    }
    
    .hover-columns-wrapper[data-mobile-behavior="always_show"] .hover-column:hover .column-content {
        opacity: 1 !important;
    }
    
    /* Default center content on mobile */
    .default-center-content {
        padding: 30px 20px;
        max-width: 90%;
    }
    
    .default-title {
        font-size: 32px;
        margin-bottom: 15px;
    }
    
    .default-description {
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .column-title {
        font-size: 20px;
    }
    
    .column-description {
        font-size: 13px;
    }
    
    .hover-column {
        min-height: 180px;
        padding: 20px 15px;
    }
    
    /* Default center content on small mobile */
    .default-title {
        font-size: 24px;
        margin-bottom: 10px;
    }
    
    .default-description {
        font-size: 14px;
    }
}

/* Animation Classes for JavaScript */
.hover-columns-background.fade-in {
    opacity: 1;
}

.hover-columns-background.fade-out {
    opacity: 0;
}

/* Loading State */
.hover-columns-wrapper:not(.loaded) .hover-columns-background {
    opacity: 0;
}

.hover-columns-wrapper.loaded .hover-columns-background {
    opacity: 1;
}

/* Accessibility - Focus States */
.hover-column:focus-within {
    outline: 2px solid rgba(255, 255, 255, 0.5);
    outline-offset: -2px;
}

.hover-column:focus-within .column-content {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

