/* Solutions Page Specific Styles */

/* Product Section Wrapper - Full Width */
.product-section {
    padding: 6rem 0;
    border-bottom: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
    isolation: isolate;
}

.product-section:last-child {
    border-bottom: none;
}

.product-section.alt-bg {
    background-color: white;
}

/* Product Header */
.header-carousel-wrapper {
    position: relative;
    margin-bottom: 4rem;
}

.product-header {
    text-align: center;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 1;
    pointer-events: none;
    margin-bottom: 3rem;
}

.product-label {
    display: inline-block;
    background: var(--accent-secondary);
    color: var(--accent-primary);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 1rem;
    letter-spacing: 1px;
}

.product-title {
    font-size: 3rem;
    margin-bottom: 1rem;
    background: linear-gradient(120deg, var(--text-primary), var(--text-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

.product-title.auto-contrast {
    background: none;
    -webkit-background-clip: unset;
    -webkit-text-fill-color: initial;
    color: #fff;
    mix-blend-mode: difference;
}

.product-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

.product-subtitle.auto-contrast {
    color: #fff;
    mix-blend-mode: difference;
}

/* Philosophy Cards */
.philosophy-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 4rem;
}

.philosophy-card {
    background: var(--surface-color);
    padding: 2rem;
    border: 2px solid var(--border-strong);
    border-radius: 0;
    box-shadow: var(--shadow-sharp);
    transition: all 0.2s ease;
    position: relative;
    top: 0;
    left: 0;
    z-index: 1;
}

.philosophy-card:hover {
    transform: translate(-4px, -4px);
    box-shadow: 8px 8px 0px 0px rgba(0,0,0,1);
    border-color: var(--accent-primary);
}

.philosophy-card h3 {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
    border-bottom: 3px solid var(--accent-secondary);
    display: inline-block;
}

.philosophy-card p {
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin-top: 0.5rem;
}

/* Features Grid */
.features-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

@media(min-width: 900px) {
    .features-container {
        grid-template-columns: 1fr 1fr;
    }
}

.feature-group {
    background: rgba(255, 255, 255, 0.5);
    padding: 2rem;
    border-radius: 1rem;
    border: 1px solid var(--border-color);
    position: relative;
    z-index: 1;
}

.feature-group h3 {
    border-bottom: 2px solid var(--accent-secondary);
    padding-bottom: 0.5rem;
    margin-bottom: 1.5rem;
    display: inline-block;
}

.feature-list {
    list-style: none;
}

.feature-list li {
    margin-bottom: 1.2rem;
    position: relative;
    padding-left: 1.5rem;
}

.feature-list li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--accent-pop);
    font-weight: bold;
}

.feature-list li strong {
    color: var(--text-primary);
    display: block;
    margin-bottom: 0.2rem;
}

.feature-list li span {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* Specific styling for Ecosystem/Stack section */
.stack-section {
    background: var(--text-primary);
    color: var(--surface-color);
    padding: 6rem 0;
}

.stack-section h2, .stack-section p {
    color: white;
}

.stack-section .product-subtitle {
    color: rgba(255, 255, 255, 0.8);
}

.stack-diagram {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-width: 800px;
    margin: 3rem auto;
    position: relative;
}

.stack-layer {
    padding: 2rem;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 1rem;
    text-align: center;
    transition: all 0.3s ease;
}

.stack-layer:hover {
    border-color: var(--accent-pop);
    background: rgba(255, 255, 255, 0.05);
}

.stack-layer h3 {
    color: var(--accent-secondary);
    margin-bottom: 0.5rem;
}

.stack-layer p {
    font-size: 0.9rem;
    margin: 0;
    opacity: 0.8;
}

.stack-arrow {
    display: flex;
    justify-content: center;
    color: rgba(255, 255, 255, 0.3);
    font-size: 1.5rem;
}

/* Pills */
.tech-pill {
    display: inline-block;
    background: rgba(37, 99, 235, 0.1);
    color: var(--accent-primary);
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 700;
    margin-right: 0.5rem;
    margin-top: 0.25rem;
}

/* CTA in sections */
.section-cta {
    text-align: center;
    margin-top: 3rem;
}

.fiscool-btn {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.fiscool-btn .btn-icon {
    width: 200px;
    height: auto;
    object-fit: contain;
}

/* Carousel Container */
.carousel-container {
    position: absolute;
    top: -10%;
    left: -10%;
    width: 120%;
    height: 120%;
    overflow: hidden;
    z-index: 0;
    opacity: 0;
    transition: opacity 1s ease-out;
}

/* White gradient overlays on left and right - Desktop only */
@media(min-width: 768px) {
    .carousel-container::before,
    .carousel-container::after {
        content: '';
        position: absolute;
        top: 0;
        height: 100%;
        width: 30%;
        z-index: 2;
        pointer-events: none;
    }

    .carousel-container::before {
        left: 0;
        background: linear-gradient(to right, var(--bg-color) 0%, rgba(245, 243, 255, 0) 100%);
    }

    .carousel-container::after {
        right: 0;
        background: linear-gradient(to left, var(--bg-color) 0%, rgba(245, 243, 255, 0) 100%);
    }
}

.carousel-container.visible {
    opacity: 1;
}

.carousel-container:hover .carousel-track {
    /* animation-play-state: paused; Handled by JS */
}

.carousel-track {
    display: flex;
    height: 100%;
    /* gap: 2rem; Removed gap to ensure seamless loop with margin logic */
    /* animation: scroll-carousel 600s linear infinite; Moved to JS */
    will-change: transform;
    width: max-content; /* Critical: Ensure track takes full width of all images */
}

.carousel-image {
    height: 100%;
    width: auto;
    min-width: 150px; /* Ensure images have width before loading for JS calculations */
    object-fit: contain;
    flex-shrink: 0;
    margin-right: 0; /* No gap between images */
    display: block; /* Remove default inline-block spacing */
    cursor: pointer;
    transition: transform 0.3s ease;
    pointer-events: auto;
}

.carousel-image.lazy-carousel {
    background: rgba(0, 0, 0, 0.05);
    min-width: 200px;
}

.carousel-image:hover {
    transform: scale(1.05);
}

@keyframes scroll-carousel {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

.product-section .container {
    position: relative;
}

/* Fullscreen Modal */
.carousel-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.95);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(5px);
}

.carousel-modal.active {
    display: flex;
}

.carousel-modal img {
    max-width: 90vw;
    max-height: 90vh;
    object-fit: contain;
    border: 3px solid var(--accent-secondary);
    box-shadow: 0 0 50px rgba(255, 255, 255, 0.1);
}

.carousel-modal-close {
    position: absolute;
    top: 2rem;
    right: 2rem;
    width: 50px;
    height: 50px;
    background: var(--surface-color);
    border: 2px solid var(--border-strong);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    box-shadow: var(--shadow-sharp);
}

.carousel-modal-close::before,
.carousel-modal-close::after {
    content: '';
    position: absolute;
    width: 60%;
    height: 3px;
    background: var(--text-primary);
    transition: background 0.2s ease;
}

.carousel-modal-close::before {
    transform: rotate(45deg);
}

.carousel-modal-close::after {
    transform: rotate(-45deg);
}

.carousel-modal-close:hover {
    background: var(--accent-pop);
    transform: rotate(90deg);
}

.carousel-modal-close:hover::before,
.carousel-modal-close:hover::after {
    background: white;
}
