/* Marquee Grid Widget Styles - Sample Code Compatible with Gradient */

.marquee-grid-outer {
    position: relative;
    width: 100%;
    height: 600px;
    overflow: hidden;
}

.gradient-overlay {
    position: absolute;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, #16314D 0.06%, rgba(22, 49, 77, 0) 18.58%, rgba(22, 49, 77, 0) 81.08%, #16314D 100.06%);
    z-index: 10;
    pointer-events: none;
}

.marquee-outer {
    --total-marquee-items: 6;
    height: 100%;
    width: calc(182px * var(--total-marquee-items));
    overflow: hidden;
    position: relative;
}

.marquee-inner {
    animation: marquee 20s linear infinite;
    display: flex;
    width: 200%;
    position: absolute;
    height: 100%;
}

.marquee-grid-wrapper {
    display: flex;
    flex-wrap: wrap;
    height: 600px;
    width: 50%;
}

.marquee-grid-column {
    display: flex;
    flex-direction: column;
}

.marquee-grid-column:nth-child(2n+1) {
    position: relative;
    top: 40px;
    margin-bottom: 43px;
}

.marquee-grid-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    text-align: center;
    font-weight: 300;
    background-color: #1e3a8a;
    border-radius: 8px;
    box-sizing: border-box;
    width: 170px;
    height: 170px;
    padding: 20px;
    margin: 6px;
}

.marquee-grid-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    flex: 1;
}

.marquee-grid-icon img {
    object-fit: contain;
    max-width: 100%;
    height: auto;
}

.marquee-grid-icon i {
    font-size: 40px;
    color: #ffffff;
}

.marquee-grid-icon svg {
    width: 40px;
    height: 40px;
    fill: #ffffff;
}

.marquee-grid-text {
    margin: 0;
    opacity: 0.7;
    font-weight: 300;
    color: #ffffff;
    font-size: 12px;
    line-height: 1.4;
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
}

/* Marquee Animation - Seamless Loop with Transform */
@keyframes marquee {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .marquee-grid-outer {
        height: 400px;
    }
    
    .marquee-outer {
        width: calc(145px * var(--total-marquee-items));
    }
    
    .marquee-grid-wrapper {
        height: 400px;
    }
    
    .marquee-inner {
        animation-duration: 15s;
    }
    
    .marquee-grid-box {
        width: 140px !important;
        height: 140px !important;
        padding: 15px !important;
        margin: 4px !important;
    }
    
    .marquee-grid-text {
        font-size: 10px;
    }
    
    .marquee-grid-icon i,
    .marquee-grid-icon svg,
    .marquee-grid-icon img {
        font-size: 30px !important;
        width: 30px !important;
        height: 30px !important;
    }
    
    .marquee-grid-column:nth-child(2n+1) {
        top: 30px;
        margin-bottom: 33px;
    }
}

@media (max-width: 480px) {
    .marquee-grid-outer {
        height: 350px;
    }
    
    .marquee-outer {
        width: calc(125px * var(--total-marquee-items));
    }
    
    .marquee-grid-wrapper {
        height: 350px;
    }
    
    .marquee-inner {
        animation-duration: 12s;
    }
    
    .marquee-grid-box {
        width: 120px !important;
        height: 120px !important;
        padding: 10px !important;
        margin: 3px !important;
    }
    
    .marquee-grid-text {
        font-size: 9px;
    }
    
    .marquee-grid-icon i,
    .marquee-grid-icon svg,
    .marquee-grid-icon img {
        font-size: 25px !important;
        width: 25px !important;
        height: 25px !important;
    }
    
    .marquee-grid-column:nth-child(2n+1) {
        top: 20px;
        margin-bottom: 23px;
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    .marquee-inner {
        animation: none;
        position: relative;
        transform: none;
    }
    
    .marquee-grid-outer {
        overflow: auto;
    }
}