/* 
 * Guru Facility Widgets — GSAP Infinite Marquee
 * Professional-grade, GPU-accelerated ribbons.
 */

.gfw-marquee-wrapper {
    overflow: hidden;
    width: 100%;
    position: relative;
    padding: 20px 0;
    user-select: none;
    display: flex;
    transform-style: preserve-3d;
}

/* Orientation: Vertical */
.gfw-marquee-orientation-vertical {
    flex-direction: column;
    height: 400px; /* Default height for vertical */
    width: auto;
    display: inline-flex;
    padding: 0 20px;
}

.gfw-marquee-track {
    display: flex;
    white-space: nowrap;
    width: fit-content;
    backface-visibility: hidden;
    perspective: 1000px;
    will-change: transform;
    transform-style: preserve-3d;
}

.gfw-marquee-orientation-vertical .gfw-marquee-track {
    flex-direction: column;
    width: 100%;
    height: fit-content;
}

.gfw-marquee-list {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.gfw-marquee-orientation-vertical .gfw-marquee-list {
    flex-direction: column;
}

.gfw-marquee-item {
    display: flex;
    align-items: center;
    margin-right: 50px; /* Default spacing */
    gap: 15px;
    transition: background-color 0.3s ease;
    backface-visibility: hidden;
}

.gfw-marquee-orientation-vertical .gfw-marquee-item {
    margin-right: 0;
    margin-bottom: 50px;
}

.gfw-marquee-icon {
    display: flex;
    align-items: center;
    line-height: 1;
}

.gfw-marquee-text {
    font-size: clamp(24px, 4vw, 60px);
    font-weight: 800;
    text-transform: uppercase;
    color: #333;
}

.gfw-marquee-img {
    height: 60px;
    width: auto;
    object-fit: contain;
    visibility: visible !important;
    opacity: 1 !important;
}

/* Edge Masking Refactored */
.gfw-marquee-wrapper.gfw-marquee-mask-yes {
    position: relative;
}

.gfw-marquee-wrapper.gfw-marquee-mask-yes::before,
.gfw-marquee-wrapper.gfw-marquee-mask-yes::after {
    content: '';
    position: absolute;
    z-index: 5;
    pointer-events: none;
    display: none;
}

/* Horizontal Masks */
.gfw-marquee-wrapper.gfw-marquee-orientation-horizontal.gfw-marquee-mask-start::before {
    display: block;
    left: 0; top: 0; bottom: 0;
    width: var(--gfw-marquee-mask-size, 20%);
    background: linear-gradient(to right, var(--gfw-marquee-mask-color, #ffffff), transparent);
}

.gfw-marquee-wrapper.gfw-marquee-orientation-horizontal.gfw-marquee-mask-end::after {
    display: block;
    right: 0; top: 0; bottom: 0;
    width: var(--gfw-marquee-mask-size, 20%);
    background: linear-gradient(to left, var(--gfw-marquee-mask-color, #ffffff), transparent);
}

/* Vertical Masks */
.gfw-marquee-wrapper.gfw-marquee-orientation-vertical.gfw-marquee-mask-start::before {
    display: block;
    top: 0; left: 0; right: 0;
    height: var(--gfw-marquee-mask-size, 20%);
    background: linear-gradient(to bottom, var(--gfw-marquee-mask-color, #ffffff), transparent);
}

.gfw-marquee-wrapper.gfw-marquee-orientation-vertical.gfw-marquee-mask-end::after {
    display: block;
    bottom: 0; left: 0; right: 0;
    height: var(--gfw-marquee-mask-size, 20%);
    background: linear-gradient(to top, var(--gfw-marquee-mask-color, #ffffff), transparent);
}

/* Image Labels Support */
.gfw-marquee-img-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    max-width: fit-content;
}

.gfw-marquee-img-label {
    display: block;
    width: 100%;
    z-index: 2;
    transition: opacity 0.3s ease;
}

/* Position: Above */
.gfw-marquee-img-label-pos-above .gfw-marquee-img-wrap {
    flex-direction: column-reverse;
}

/* Position: Overlay */
.gfw-marquee-img-label-pos-overlay .gfw-marquee-img-label {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
}

.gfw-marquee-orientation-vertical .gfw-marquee-img-wrap {
    width: 100%;
}
