/* 
 * Enterprise SaaS Portfolio Marquee Styles
 * Inspired by Toptal client success stories
 */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700&display=swap');

.enterprise-marquee-section {
    width: 100vw;
    margin-left: calc(50% - 50vw);
    /* background: linear-gradient(135deg, #04122A 0%, #071B3B 100%); */
    padding: 60px 0;
    overflow: hidden;
    position: relative;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

.enterprise-marquee-track {
    display: flex;
    width: max-content;
    animation: enterprise-marquee var(--marquee-duration, 60s) linear infinite;
    gap: 16px;
}

.enterprise-marquee-header {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto 40px;
    padding: 0 20px;
    box-sizing: border-box;
    position: relative;
    z-index: 1000;
}

.wpp-ent-search-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
}

.wpp-ent-search-label {
    font-size: 15px;
    color: #64748b;
    font-weight: 500;
    flex-shrink: 0;
}

.wpp-ent-search-input-wrapper {
    position: relative;
    flex: 1;
    max-width: 600px;
    min-width: 250px;
    display: flex;
    align-items: center;
}

.wpp-ent-search-input-wrapper form {
    width: 100%;
    position: relative;
    display: flex;
    align-items: center;
}

.wpp-ent-search-icon {
    position: absolute !important;
    left: 12px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    color: #94a3b8 !important;
    width: 16px !important;
    height: 16px !important;
    pointer-events: none;
    z-index: 2;
    display: block !important;
    margin: 0 !important;
    padding: 0 !important;
}

.wpp-ent-search-input {
    width: 100%;
    padding: 12px 12px 12px 38px !important;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    font-size: 14px;
    color: #334155;
    outline: none;
    box-sizing: border-box;
    transition: border-color 0.2s;
    font-family: inherit;
    margin: 0 !important;
    display: block !important;
}

.wpp-ent-search-input::placeholder {
    color: #94a3b8;
}

.wpp-ent-search-input:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.1);
}

@media screen and (max-width: 768px) {
    .wpp-ent-search-container {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    .wpp-ent-search-input-wrapper {
        width: 100%;
    }
}


.enterprise-marquee-track:hover {
    animation-play-state: paused;
}

.enterprise-marquee-list {
    display: flex;
    gap: 16px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.enterprise-marquee-column {
    display: flex;
    flex-direction: column;
    gap: 16px;
    width: 280px;
    /* Base width to allow ~7 columns on wide screens */
}

/* Alternate Heights for Masonry Effect */
.enterprise-card-tall {
    height: 460px;
}

.enterprise-card-short {
    height: 300px;
}

.enterprise-card {
    position: relative;
    display: block;
    width: 100%;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    overflow: hidden;
    text-decoration: none;
    box-sizing: border-box;
    transform: translateZ(0);
    /* GPU Acceleration */
    will-change: transform;
    transition: transform 0.4s ease, box-shadow 0.4s ease, border-color 0.4s ease;
}

.enterprise-card-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.75);
    transition: transform 0.4s ease;
}

.enterprise-card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.35) 0%, rgba(0, 0, 0, 0.75) 100%);
    transition: background 0.4s ease;
    z-index: 1;
}

.enterprise-card-content {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
    padding: 32px;
    box-sizing: border-box;
}

.enterprise-card-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    width: 100%;
}

.enterprise-card-logo {
    color: white;
    font-size: 20px;
    font-weight: 700;
    max-width: 150px;
}

.enterprise-card-index {
    color: rgba(255, 255, 255, 0.4);
    font-size: 16px;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

.enterprise-card-logo img {
    max-width: 100%;
    height: auto;
}

.enterprise-card-bottom {
    margin-top: auto;
}

.enterprise-card-title {
    color: #ffffff;
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 10px 0;
    line-height: 1.3;
}

.enterprise-card-cta {
    opacity: 0;
    transform: translateY(15px);
    transition: all 0.4s ease;
    font-size: 16px;
    font-weight: 700;
    color: white;
    display: flex;
    align-items: center;
    gap: 8px;
}

.cta-icon {
    font-size: 12px;
}

/* Hover Interactions */
.enterprise-card:hover {
    border-color: rgba(32, 78, 207, 0.5);
    box-shadow: 0 0 30px rgba(32, 78, 207, 0.35);
}

.enterprise-card:hover .enterprise-card-bg {
    transform: scale(1.05);
}

.enterprise-card:hover .enterprise-card-overlay {
    background: linear-gradient(135deg, rgba(32, 78, 207, 0.85) 0%, rgba(0, 0, 0, 0.75) 100%);
}

.enterprise-card:hover .enterprise-card-cta {
    opacity: 1;
    transform: translateY(0);
}

/* Keyframes */
@keyframes enterprise-marquee {
    from {
        transform: translateX(0);
    }

    to {
        transform: translateX(-50%);
    }
}

/* Responsive Behavior */
@media screen and (max-width: 1440px) {
    .enterprise-marquee-column {
        width: 250px;
    }
    .enterprise-card-tall {
        height: 420px;
    }
    .enterprise-card-short {
        height: 280px;
    }
}

@media screen and (max-width: 1200px) {
    .enterprise-marquee-column {
        width: 220px;
        /* Tablet Landscape */
    }

    .enterprise-card-tall {
        height: 380px;
    }

    .enterprise-card-short {
        height: 260px;
    }
}

@media screen and (max-width: 992px) {
    .enterprise-marquee-column {
        width: 190px;
        /* Tablet Portrait */
    }

    .enterprise-card-tall {
        height: 320px;
    }

    .enterprise-card-short {
        height: 220px;
    }
    
    .enterprise-card-logo {
        font-size: 18px;
        max-width: 120px;
    }
}

@media screen and (max-width: 768px) {
    .enterprise-marquee-column {
        width: 160px;
        /* Mobile */
    }

    .enterprise-card-tall {
        height: 280px;
    }

    .enterprise-card-short {
        height: 180px;
    }

    .enterprise-card-content {
        padding: 16px;
    }

    .enterprise-card-title {
        font-size: 14px;
    }

    .enterprise-card-cta {
        font-size: 12px;
    }

    .enterprise-marquee-section {
        padding: 40px 0;
    }
}

@media screen and (max-width: 480px) {
    .enterprise-marquee-column {
        width: 130px;
        /* Small Mobile */
    }

    .enterprise-card-tall {
        height: 220px;
    }

    .enterprise-card-short {
        height: 140px;
    }

    .enterprise-card-content {
        padding: 12px;
    }

    .enterprise-card-title {
        font-size: 12px;
        margin-bottom: 6px;
    }

    .enterprise-card-cta {
        font-size: 11px;
    }
    
    .enterprise-card-logo {
        font-size: 14px;
        max-width: 90px;
    }
    
    .enterprise-card-index {
        font-size: 12px;
    }

    .enterprise-marquee-section {
        padding: 30px 0;
    }
}

@media screen and (max-width: 360px) {
    .enterprise-marquee-column {
        width: 110px;
        /* Extra Small Mobile */
    }

    .enterprise-card-tall {
        height: 180px;
    }

    .enterprise-card-short {
        height: 120px;
    }

    .enterprise-card-title {
        font-size: 11px;
    }
}

/* Autocomplete Dropdown Styles */
.wpp-ent-search-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    margin-top: 4px;
    z-index: 9999;
    max-height: 300px;
    overflow-y: auto;
}

.wpp-ent-autocomplete-list {
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

.wpp-ent-autocomplete-list li {
    border-bottom: 1px solid #f1f5f9;
    margin: 0 !important;
    padding: 0 !important;
}

.wpp-ent-autocomplete-list li:last-child {
    border-bottom: none;
}

.wpp-ent-autocomplete-list a {
    display: block;
    padding: 12px 16px;
    color: #334155;
    text-decoration: none;
    font-size: 14px;
    transition: background-color 0.2s;
}

.wpp-ent-autocomplete-list a:hover {
    background-color: #f8fafc;
    color: #0f172a;
}

.wpp-ent-autocomplete-no-results {
    padding: 12px 16px;
    color: #64748b;
    font-size: 14px;
    text-align: center;
}