/* ============================================================
   COMPONENTE - SOLUTIONS / TIPOS DE NEGOCIO
   ============================================================ */

.solutions {
    padding: clamp(4rem, 8vw, 6rem) 0 0;
    background: transparent;
    overflow: hidden;
}

.solutions__container {
    display: flex;
    flex-direction: column;
    gap: clamp(1.25rem, 2vw, 2rem);
}

.solutions__header {
    text-align: center;
    max-width: 58rem;
    margin: 0 auto;
}

.solutions__title {
    font-family: var(--font-family-primary);
    font-size: clamp(1.5rem, 5vw, 3.4rem);
    line-height: 1.1;
    letter-spacing: -0.04em;
    font-weight: var(--font-weight-extrabold);
    color: var(--color-text-dark);
    hyphens: none;
    word-break: keep-all;
    overflow-wrap: normal;
}

.solutions__title--accent {
    color: var(--color-primary-600);
}

.solutions__subtitle {
    margin-top: 0.65rem;
    font-family: var(--font-family-primary);
    font-size: clamp(0.95rem, 1.6vw, 1.1rem);
    line-height: 1.35;
    color: var(--color-text-secondary);
}

/* Carousel Wrapper */
.solutions__carousel-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

/* Flechas de navegación */
.solutions__arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-80%);
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    background: #FFFFFF;
    border: 1px solid #E2E8F0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    z-index: 100;
    transition: all 0.2s ease;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
}

.solutions__arrow:hover {
    background: #F8FAFC;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.solutions__arrow svg {
    width: 1.25rem;
    height: 1.25rem;
    stroke: #64748B;
}

.solutions__arrow--prev {
    left: 0;
}

.solutions__arrow--next {
    right: 0;
}

/* Carousel container */
.solutions__carousel {
    width: 100%;
    overflow: hidden;
    padding: 0 2rem;
    contain: layout style paint;
}

/* Track */
.solutions__track {
    display: flex;
    gap: 1rem;
    padding: 0.5rem 0;
    padding-left: 1rem;
    will-change: transform;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
}

/* Card */
.solutions__card {
    flex-shrink: 0;
    width: 75vw;
    max-width: 280px;
    background: #FFFFFF;
    border-radius: 1rem;
    overflow: visible;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    border: 1px solid #F1F5F9;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
}

.solutions__card:hover {
    transform: translateY(-4px) translateZ(0);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

/* Card Image */
.solutions__card-image {
    width: 100%;
    height: 220px;
    overflow: hidden;
    /* Placeholder mientras carga */
    background: linear-gradient(135deg, #e2e8f0 0%, #cbd5e1 100%);
    position: relative;
    z-index: 1;
    border-radius: 1rem 1rem 0 0;
}

.solutions__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Card Content */
.solutions__card-content {
    padding: 1.25rem 1rem 1rem;
    position: relative;
    z-index: 5;
    background: #FFFFFF;
    border-radius: 0 0 1rem 1rem;
}

/* Card Icon */
.solutions__card-icon {
    position: absolute;
    top: -1.75rem;
    left: 1rem;
    width: 3.5rem;
    height: 3.5rem;
    background: #FFFFFF;
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    z-index: 10;
}

.solutions__icon-img {
    width: 2.25rem;
    height: 2.25rem;
    object-fit: contain;
    filter: brightness(0) saturate(100%) invert(15%) sepia(50%) saturate(2500%) hue-rotate(265deg) brightness(85%) contrast(95%);
}

/* Card Title */
.solutions__card-title {
    margin: 1.5rem 0 0.75rem;
    font-size: 1rem;
    font-weight: var(--font-weight-bold);
    color: var(--color-text-dark);
}

/* Card Description */
.solutions__card-desc {
    margin: 0;
    font-size: 0.8125rem;
    line-height: 1.5;
    color: var(--color-text-secondary);
}

/* ============================================================
   MÓVIL PEQUEÑO (hasta 480px) - Espacio de seguridad
   ============================================================ */
@media (max-width: 480px) {
    .solutions__carousel {
        padding: 0 0.5rem;
    }

    .solutions__track {
        padding-left: 1rem;
        padding-right: 1rem;
        gap: 0.875rem;
    }

    .solutions__card {
        width: 70vw;
        max-width: 260px;
    }

    .solutions__arrow {
        display: none;
    }
}

/* ============================================================
   MÓVIL MEDIANO (481px - 554px) - Espacio de seguridad
   ============================================================ */
@media (min-width: 481px) and (max-width: 554px) {
    .solutions__carousel {
        padding: 0 1rem;
    }

    .solutions__track {
        padding-left: 0.75rem;
        gap: 1rem;
    }

    .solutions__card {
        width: 55vw;
        max-width: 280px;
    }
}

/* ============================================================
   TABLET (555px+)
   ============================================================ */
@media (min-width: 555px) {
    .solutions {
        margin-top: clamp(3rem, 5vw, 5rem);
        padding: clamp(4rem, 6vw, 5rem) 0 2.5rem;
    }

    .solutions__carousel {
        padding: 0 3rem;
    }

    .solutions__track {
        gap: 1.25rem;
    }

    .solutions__card {
        width: 45vw;
        max-width: 240px;
    }

    .solutions__card-image {
        height: 240px;
    }

    .solutions__arrow {
        width: 2.75rem;
        height: 2.75rem;
    }

    .solutions__arrow svg {
        width: 1.5rem;
        height: 1.5rem;
    }
}

/* ============================================================
   DESKTOP (1025px+)
   ============================================================ */
@media (min-width: 1025px) {
    .solutions {
        padding: clamp(5rem, 7vw, 7rem) 0 3.25rem;
    }

    .solutions__container {
        gap: 2rem;
    }

    .solutions__header {
        max-width: 70rem;
    }

    .solutions__title {
        font-size: clamp(2.2rem, 3.15vw, 2.85rem);
        line-height: 1.1;
    }

    .solutions__carousel-wrapper {
        padding: 0 1rem;
    }

    .solutions__carousel {
        padding: 0 2rem;
        overflow: hidden;
    }

    .solutions__track {
        justify-content: flex-start;
    }

    .solutions__card {
        width: 200px;
        min-width: 200px;
        max-width: 200px;
    }

    .solutions__card-image {
        height: 220px;
    }

    .solutions__card-content {
        padding: 1rem 0.875rem 0.875rem;
    }

    .solutions__card-icon {
        width: 3.25rem;
        height: 3.25rem;
        top: -1.625rem;
        left: 0.875rem;
    }

    .solutions__icon-img {
        width: 2rem;
        height: 2rem;
    }

    .solutions__card-title {
        font-size: 0.9375rem;
        margin: 1.25rem 0 0.5rem;
    }

    .solutions__card-desc {
        font-size: 0.75rem;
        line-height: 1.45;
    }

    .solutions__arrow {
        width: 3rem;
        height: 3rem;
    }

    .solutions__arrow--prev {
        left: -1rem;
    }

    .solutions__arrow--next {
        right: -1rem;
    }

    .solutions__arrow svg {
        width: 1.5rem;
        height: 1.5rem;
    }
}

/* ============================================================
   LARGE DESKTOP (1366px+)
   ============================================================ */
@media (min-width: 1366px) {
    .solutions {
        margin-top: clamp(3rem, 5vw, 5rem);
        padding-top: clamp(5rem, 8vw, 8rem);
    }

    .solutions__header {
        max-width: 74rem;
    }

    .solutions__title {
        font-size: 50px;
    }

    .solutions__card {
        width: 220px;
        min-width: 220px;
        max-width: 220px;
    }

    .solutions__card-image {
        height: 240px;
    }
}

/* ============================================================
   EXTRA LARGE (1440px+)
   ============================================================ */
@media (min-width: 1440px) {
    .solutions {
        margin-top: clamp(3rem, 5vw, 5rem);
        padding-top: clamp(6rem, 9vw, 9rem);
    }

    .solutions__card-image {
        height: 260px;
    }
}

/* ============================================================
   MARQUEE AUTO ANIMATION - Carrusel infinito automático
   ============================================================ */
.solutions--trial-desktop {
    width: 100vw;
    margin-left: calc(-50vw + 50%);
    overflow: hidden;
}

/* Estilos específicos para el marquee en index.html */
.solutions--marquee {
    padding: clamp(3rem, 6vw, 5rem) 0;
    margin-top: 0;
}

@media (min-width: 555px) {
    .solutions--marquee {
        padding: clamp(4rem, 7vw, 6rem) 0;
    }
}

@media (min-width: 1025px) {
    .solutions--marquee {
        padding: clamp(5rem, 8vw, 7rem) 0;
    }
}

@media (min-width: 1366px) {
    .solutions--marquee {
        padding: clamp(5rem, 8vw, 7rem) 0;
        margin-top: 0;
    }
}

@media (min-width: 1440px) {
    .solutions--marquee {
        padding: clamp(5rem, 8vw, 7rem) 0;
        margin-top: 0;
    }
}

.solutions--trial-desktop .solutions__container {
    max-width: 100%;
    padding: 0;
}

.solutions--trial-desktop .solutions__carousel-wrapper {
    width: 100%;
    padding: 0;
}

.solutions--trial-desktop .solutions__carousel {
    width: 100%;
    overflow: hidden;
    padding: 0;
}

/* Track del marquee con animación optimizada */
.solutions--trial-desktop .solutions__track {
    display: flex;
    gap: 1rem;
    flex-wrap: nowrap;
    animation: marqueeScroll 25s linear infinite;
}

@keyframes marqueeScroll {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-1180px);
    }
}

/* Cards en marquee - ancho fijo */
.solutions--trial-desktop .solutions__card {
    flex-shrink: 0;
    width: 220px;
    min-width: 220px;
    max-width: 220px;
}

/* Pausa en hover */
.solutions--trial-desktop:hover .solutions__track {
    animation-play-state: paused;
}


/* ============================================================
   CARD OVERLAY STYLE - Imagen con texto superpuesto
   ============================================================ */
a.solutions__card--overlay {
    text-decoration: none;
    cursor: pointer;
    display: block;
}

.solutions__card--overlay {
    position: relative;
    width: 200px;
    height: 280px;
    border-radius: 20px;
    overflow: hidden;
    flex-shrink: 0;
    /* Placeholder mientras carga la imagen */
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
}

.solutions__card--overlay .solutions__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.solutions__card--overlay:hover .solutions__img {
    transform: scale(1.05);
}

.solutions__card--overlay .solutions__card-title {
    position: absolute;
    bottom: 20px;
    left: 20px;
    right: 20px;
    margin: 0;
    font-size: 1.1rem;
    font-weight: 700;
    color: #FFFFFF;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
    z-index: 2;
}

/* Gradient overlay para legibilidad del texto */
.solutions__card--overlay::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 50%;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.6) 0%, transparent 100%);
    pointer-events: none;
    z-index: 1;
}

/* Tablet */
@media (min-width: 555px) {
    .solutions__card--overlay {
        width: 220px;
        height: 300px;
    }

    .solutions__card--overlay .solutions__card-title {
        font-size: 1.15rem;
    }
}

/* Desktop */
@media (min-width: 1025px) {
    .solutions__card--overlay {
        width: 240px;
        height: 320px;
    }

    .solutions__card--overlay .solutions__card-title {
        font-size: 1.25rem;
        bottom: 24px;
        left: 24px;
    }
}

/* Large Desktop */
@media (min-width: 1366px) {
    .solutions__card--overlay {
        width: 260px;
        height: 340px;
    }
}

