/* =========================================================
   SOLUTIONS SECTION (LIGHT/DARK ADAPTIVE - FULL FIT LAYOUT)
   ========================================================= */

.solutions-section {
    position: relative;
    width: 100%;
    color: var(--sn-text-primary, #0f172a);
    transition: background-color 300ms ease, color 300ms ease;
    z-index: 10;
    contain: layout style;
}

.solutions-section .container {
    width: 100%;
    max-width: var(--content-max-width, 1280px) !important;
    margin: 0 auto;
    padding-left: var(--content-padding, 24px);
    padding-right: var(--content-padding, 24px);
    box-sizing: border-box;
}

.solutions-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 40px;
    gap: 40px;
}

.header-left { max-width: 650px; }
.header-right { max-width: 380px; }

.solutions-header .eyebrow {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    color: var(--sn-accent-primary, #3d8bfd);
    text-transform: uppercase;
    display: block;
    margin-bottom: 12px;
    animation: none !important;
    opacity: 1 !important;
}

.solutions-header .section-title {
    font-size: clamp(1.8rem, 3.5vw, 2.6rem);
    font-weight: 800;
    line-height: 1.25;
    letter-spacing: -0.02em;
    margin: 0;
    color: var(--sn-text-primary, #ffffff);
    backface-visibility: hidden;
}

.solutions-header .section-desc {
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--sn-text-muted, #8d96a8);
    margin: 0;
}

/* =========================================================
   SCROLLABLE CARD CONTAINER (NO CUT-OFF CARDS FIX)
   ========================================================= */

.solutions-scroll-wrapper {
    position: relative;
    width: 100%;
    margin-bottom: 60px;
    z-index: 20;
}

.solutions-grid {
    display: flex;
    flex-wrap: nowrap;
    gap: 20px;
    overflow-x: auto;
    overflow-y: visible;
    padding: 12px 4px 20px 4px;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;

    /* Hide scrollbar across all browsers */
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.solutions-grid::-webkit-scrollbar {
    display: none;
}

/* =========================================================
   CARD BASE STYLES & DYNAMIC VIEWPORT SIZING
   ========================================================= */

.solution-card {
    position: relative;
    z-index: 30;
    /* Default (Desktops): Fits exactly 4 full cards without cut-off */
    flex: 0 0 calc((100% - (3 * 20px)) / 4);
    min-height: 195px;
    background: var(--sn-card-bg, rgba(255, 255, 255, 0.03));
    border: 1px solid var(--sn-border-subtle, rgba(255, 255, 255, 0.08));
    border-radius: 12px;
    padding: 20px 22px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    scroll-snap-align: start;
    box-sizing: border-box;
    transition: transform 300ms cubic-bezier(0.4, 0, 0.2, 1),
                border-color 300ms ease,
                box-shadow 300ms ease,
                background-color 300ms ease;
    cursor: pointer;
    will-change: transform;
}

.solution-card:hover {
    transform: translateY(-2px);
    border-color: var(--sn-accent-primary, #3d8bfd);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.3);
    z-index: 40;
}

.card-icon {
    width: 32px;
    height: 32px;
    color: var(--sn-accent-primary, #3d8bfd);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
}

.card-icon svg {
    width: 100%;
    height: 100%;
}

.card-title {
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1.25;
    margin: 0 0 6px 0;
    color: var(--sn-text-primary, #ffffff);
}

.card-desc {
    font-size: 0.82rem;
    line-height: 1.45;
    color: var(--sn-text-muted, #8d96a8);
    margin: 0 0 12px 0;
    flex-grow: 1;
}

.card-arrow {
    font-size: 1rem;
    color: var(--sn-text-muted, #8d96a8);
    transition: transform 300ms ease, color 300ms ease;
    align-self: flex-start;
}

.solution-card:hover .card-arrow {
    color: var(--sn-accent-primary, #3d8bfd);
    transform: translate(3px, -3px);
}

.solution-card-index { 
    display: none; 
}

/* =========================================================
   RESPONSIVE BREAKPOINTS (CARD COUNT ADJUSTMENTS)
   ========================================================= */

/* Extra Large Screens (1400px+): Show 5 full cards */
@media (min-width: 1400px) {
    .solution-card {
        flex: 0 0 calc((100% - (4 * 20px)) / 5);
    }
}

/* Medium Desktops (1024px - 1399px): Show 3 full cards */
@media (max-width: 1399px) and (min-width: 1024px) {
    .solution-card {
        flex: 0 0 calc((100% - (2 * 20px)) / 3);
    }
}

/* Tablets (640px - 1023px): Show 2 full cards */
@media (max-width: 1023px) and (min-width: 640px) {
    .solution-card {
        flex: 0 0 calc((100% - (1 * 20px)) / 2);
    }
}

/* Mobile Screens (< 640px): Show 1 full card */
@media (max-width: 639px) {
    .solutions-section {
        padding: 60px 0 40px 0;
    }

    .solutions-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }

    .solution-card {
        flex: 0 0 100%;
        min-height: 185px;
    }

    .marquee-track {
        animation-duration: 25s;
    }
}

/* =========================================================
   INFINITE MARQUEE BANNER
   ========================================================= */

.trusted-banner {
    text-align: center;
    border-top: 1px solid var(--sn-border-subtle, rgba(255, 255, 255, 0.08));
    padding-top: 40px;
    overflow: hidden;
}

.trusted-label {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    color: var(--sn-accent-primary, #3d8bfd);
    display: block;
    margin-bottom: 30px;
    text-transform: uppercase;
}

.marquee-viewport {
    width: 100%;
    overflow: hidden;
    position: relative;
    mask-image: linear-gradient(to right, transparent, #000 10%, #000 90%, transparent);
    -webkit-mask-image: linear-gradient(to right, transparent, #000 10%, #000 90%, transparent);
}

.marquee-track {
    display: flex;
    width: max-content;
    will-change: transform;
    animation: infiniteMarquee 35s linear infinite;
}

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

.logo-grid {
    display: flex;
    align-items: center;
    gap: 48px;
    padding-right: 48px;
}

.logo-item {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--sn-text-primary, #ffffff);
    font-weight: 800;
    font-size: 0.88rem;
    letter-spacing: 0.05em;
    white-space: nowrap;
    opacity: 0.75;
    transition: opacity 300ms ease;
}

.logo-item:hover {
    opacity: 1;
}

.logo-item small {
    display: block;
    font-size: 0.55rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    color: var(--sn-text-muted, #8d96a8);
}

@keyframes infiniteMarquee {
    0% { transform: translate3d(0, 0, 0); }
    100% { transform: translate3d(-50%, 0, 0); }
}

/* =========================================================
   LIGHT THEME OVERRIDES
   ========================================================= */

html[data-theme="light"] .solutions-header .section-title,
html[data-theme="light"] .card-title,
html[data-theme="light"] .logo-item {
    color: #0f172a !important;
}

html[data-theme="light"] .solutions-header .section-desc,
html[data-theme="light"] .card-desc,
html[data-theme="light"] .card-arrow,
html[data-theme="light"] .logo-item small {
    color: #475569 !important;
}

html[data-theme="light"] .solution-card {
    background: #f8fafc !important;
    border-color: #e2e8f0 !important;
}

html[data-theme="light"] .solution-card:hover {
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05) !important;
}

html[data-theme="light"] .trusted-banner {
    border-top-color: #e2e8f0 !important;
}

/* =========================================================
   SOLUTIONS CARD SKINS (v1–v10)
   ========================================================= */

/* v1 · Minimal Glass */
.card-style-v1 .solution-card {
    background: var(--sn-card-bg, rgba(255, 255, 255, 0.03));
    border: 1px solid var(--sn-border-subtle, rgba(255, 255, 255, 0.08));
    backdrop-filter: blur(12px);
}

/* v2 · Radial Spotlight Glow */
.card-style-v2 .solution-card {
    background: radial-gradient(160px 160px at 15% 15%, rgba(61, 139, 253, 0.18), transparent 70%), rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.08);
}
.card-style-v2 .solution-card:hover {
    background: radial-gradient(180px 180px at 15% 15%, rgba(61, 139, 253, 0.3), transparent 72%), rgba(15, 23, 42, 0.65);
}
html[data-theme="light"] .card-style-v2 .solution-card {
    background: radial-gradient(160px 160px at 15% 15%, rgba(61, 139, 253, 0.12), transparent 70%), #f8fafc !important;
}

/* v3 · Watermark Index Number */
.card-style-v3 .solution-card { position: relative; overflow: hidden; }
.card-style-v3 .solution-card-index {
    display: block; position: absolute; top: 12px; right: 16px;
    font-size: 1.8rem; font-weight: 800; color: rgba(255, 255, 255, 0.06); line-height: 1; pointer-events: none;
}
html[data-theme="light"] .card-style-v3 .solution-card-index { color: rgba(15, 23, 42, 0.06) !important; }

/* v4 · Top Border Accent Line */
.card-style-v4 .solution-card {
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-top: 4px solid #3d8bfd;
}
.card-style-v4 .solution-card:hover {
    box-shadow: 0 -4px 20px -6px rgba(61, 139, 253, 0.4), 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* v5 · Side Accent Line */
.card-style-v5 .solution-card {
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-left: 4px solid rgba(61, 139, 253, 0.75);
}
.card-style-v5 .solution-card:hover {
    border-left-color: #3d8bfd;
    box-shadow: -4px 0 20px -6px rgba(61, 139, 253, 0.5), 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* v6 · Gradient Wash Background */
.card-style-v6 .solution-card {
    background: linear-gradient(150deg, rgba(61, 139, 253, 0.16) 0%, rgba(15, 23, 42, 0.7) 50%, rgba(147, 51, 234, 0.14) 100%);
    border: 1px solid rgba(255, 255, 255, 0.08);
}
.card-style-v6 .solution-card:hover {
    background: linear-gradient(150deg, rgba(61, 139, 253, 0.26) 0%, rgba(15, 23, 42, 0.72) 50%, rgba(147, 51, 234, 0.22) 100%);
}

/* v7 · Tech Dot Matrix */
.card-style-v7 .solution-card {
    background-color: rgba(15, 23, 42, 0.6);
    background-image: radial-gradient(rgba(255, 255, 255, 0.14) 1px, transparent 1.4px);
    background-size: 14px 14px;
    border: 1px solid rgba(255, 255, 255, 0.09);
}
html[data-theme="light"] .card-style-v7 .solution-card {
    background-image: radial-gradient(rgba(15, 23, 42, 0.10) 1px, transparent 1.4px) !important;
}

/* v8 · Gradient Border Glow */
.card-style-v8 .solution-card {
    background: linear-gradient(rgba(15, 23, 42, 0.92), rgba(15, 23, 42, 0.92)) padding-box,
                linear-gradient(135deg, rgba(61, 139, 253, 0.65), rgba(147, 51, 234, 0.4)) border-box;
    border: 1.5px solid transparent;
}
.card-style-v8 .solution-card:hover {
    box-shadow: 0 0 24px rgba(61, 139, 253, 0.22);
}
html[data-theme="light"] .card-style-v8 .solution-card {
    background: linear-gradient(#f8fafc, #f8fafc) padding-box,
                linear-gradient(135deg, rgba(61, 139, 253, 0.5), rgba(147, 51, 234, 0.3)) border-box !important;
}

/* v9 · Purple Mesh Corner Glow */
.card-style-v9 .solution-card {
    background-color: rgba(15, 23, 42, 0.62);
    background-image: radial-gradient(100px 100px at 100% 0%, rgba(147, 51, 234, 0.28), transparent 70%),
                      radial-gradient(rgba(255, 255, 255, 0.08) 1px, transparent 1.4px);
    background-size: auto, 16px 16px;
    border: 1px solid rgba(255, 255, 255, 0.08);
}
.card-style-v9 .solution-card:hover {
    background-image: radial-gradient(120px 120px at 100% 0%, rgba(147, 51, 234, 0.4), transparent 72%),
                      radial-gradient(rgba(255, 255, 255, 0.08) 1px, transparent 1.4px);
}

/* v10 · Neon Focus Ring */
.card-style-v10 .solution-card {
    background: rgba(15, 23, 42, 0.85);
    border: 1px solid rgba(61, 139, 253, 0.3);
    box-shadow: 0 0 14px rgba(61, 139, 253, 0.12);
}
.card-style-v10 .solution-card:hover {
    border-color: rgba(61, 139, 253, 0.8);
    box-shadow: 0 0 24px rgba(61, 139, 253, 0.3);
}