/* ===== Comparador Landing - Paneles Diagonales ===== */

.carousel-section {
    max-width: 1440px;
    margin: 0 auto 3rem;
    padding: 0 1.2rem;
    overflow: hidden;
}

.carousel-section h2 {
    font-size: 1.7rem;
    font-weight: 800;
    margin-bottom: 0.4rem;
    background: linear-gradient(135deg, #ffffff, var(--primary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-align: center;
}

.light-theme .carousel-section h2 {
    background: linear-gradient(135deg, #1a1a2e, var(--primary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.carousel-section > p {
    color: var(--text-secondary);
    text-align: center;
    margin-bottom: 1.8rem;
    font-size: 0.95rem;
}

/* --- Contenedor del carrusel --- */
.carousel-container {
    display: flex;
    align-items: stretch;
    justify-content: center;
    gap: 0;
    height: 560px;
    width: calc(100% + 60px);
    margin-left: -30px;
}

/* --- Cada panel/tarjeta (paralelogramo con clip-path) --- */
.carousel-card {
    position: relative;
    flex: 1;
    height: 100%;
    min-width: 0;
    cursor: pointer;
    text-decoration: none;
    color: #fff;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    padding: 0;
    margin: 0 -44px;
    clip-path: polygon(90px 0, 100% 0, calc(100% - 90px) 100%, 0% 100%);
    transition: flex 0.6s cubic-bezier(0.4, 0, 0.2, 1),
                filter 0.4s ease;
}

.carousel-card:first-child {
    clip-path: polygon(45px 0, 100% 0, calc(100% - 90px) 100%, 0% 100%);
}

.carousel-card:last-child {
    clip-path: polygon(90px 0, 100% 0, calc(100% - 45px) 100%, 0% 100%);
}

/* --- Background image (covers entire card) --- */
.carousel-card .card-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    z-index: 0;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1),
                filter 0.5s ease;
    filter: brightness(0.4) saturate(0.7);
}

.light-theme .carousel-card .card-bg {
    filter: brightness(0.6) saturate(0.8);
}

/* --- Gradient overlay --- */
.carousel-card .card-overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(
        to top,
        rgba(0, 0, 0, 0.88) 0%,
        rgba(0, 0, 0, 0.4) 40%,
        rgba(0, 0, 0, 0.15) 70%,
        transparent 100%
    );
    transition: background 0.5s ease;
}

.light-theme .carousel-card .card-overlay {
    background: linear-gradient(
        to top,
        rgba(255, 255, 255, 0.92) 0%,
        rgba(255, 255, 255, 0.45) 40%,
        rgba(255, 255, 255, 0.1) 70%,
        transparent 100%
    );
}

/* Estado: "soon" (deshabilitado) */
.carousel-card.card-soon {
    opacity: 0.5;
    cursor: default;
}

.carousel-card.card-soon .card-bg {
    filter: brightness(0.4) saturate(0.7);
}

.carousel-card.card-soon:hover {
    opacity: 0.65;
}

/* --- Hover: compress others, expand hovered --- */
.carousel-container:hover .carousel-card {
    flex: 0.7;
}

.carousel-container:hover .carousel-card .card-bg {
    filter: brightness(0.18) saturate(0.4);
}

.carousel-container:hover .carousel-card:hover {
    flex: 3;
}

.carousel-container:hover .carousel-card:hover .card-bg {
    transform: scale(1.08);
    filter: brightness(0.5) saturate(1);
}

.light-theme .carousel-container:hover .carousel-card:hover .card-bg {
    filter: brightness(0.65) saturate(1.1);
}

/* --- Shimmer efecto en hover --- */
.carousel-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 60%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.08), transparent);
    transform: skewX(-15deg);
    pointer-events: none;
    z-index: 5;
    transition: none;
}

.carousel-card:hover::after {
    animation: carouselShimmer 1.2s ease;
}

@keyframes carouselShimmer {
    0% { left: -100%; }
    100% { left: 200%; }
}

/* --- Icono --- */
.carousel-card .card-icon-wrap {
    position: relative;
    z-index: 3;
    width: 72px;
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    margin-bottom: auto;
    margin-top: auto;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    flex-shrink: 0;
}

.light-theme .carousel-card .card-icon-wrap {
    background: rgba(0, 0, 0, 0.06);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.carousel-card .card-icon-wrap i {
    font-size: 2rem;
    color: rgba(255, 255, 255, 0.6);
    transition: all 0.4s ease;
}

.light-theme .carousel-card .card-icon-wrap i {
    color: rgba(0, 0, 0, 0.5);
}

.carousel-container:hover .carousel-card:hover .card-icon-wrap {
    width: 84px;
    height: 84px;
    border-color: rgba(255, 107, 53, 0.45);
    box-shadow: 0 0 28px rgba(255, 107, 53, 0.2);
    background: rgba(255, 107, 53, 0.12);
}

.carousel-container:hover .carousel-card:hover .card-icon-wrap i {
    font-size: 2.5rem;
    color: var(--primary-color);
}

/* --- Texto inferior --- */
.carousel-card .card-info {
    position: relative;
    z-index: 3;
    text-align: center;
    padding: 0 2rem 2rem;
    opacity: 0;
    max-height: 0;
    overflow: hidden;
    transition: opacity 0.4s ease 0.12s, max-height 0.5s ease;
    flex-shrink: 0;
}

.carousel-container:hover .carousel-card:hover .card-info {
    opacity: 1;
    max-height: 160px;
}

.carousel-card .card-info .card-title {
    font-size: 1.3rem;
    font-weight: 800;
    color: #fff;
    margin: 0 0 0.35rem;
    white-space: nowrap;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.light-theme .carousel-card .card-info .card-title {
    color: #1a1a2e;
    text-shadow: none;
}

.carousel-card .card-info .card-desc {
    display: block;
    font-size: 0.8rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.55);
    line-height: 1.4;
    margin-bottom: 0.7rem;
}

.light-theme .carousel-card .card-info .card-desc {
    color: rgba(0, 0, 0, 0.45);
}

.carousel-card .card-info .card-cta {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: var(--primary-color, #ff6b35);
    padding: 6px 16px;
    border: 1px solid rgba(255, 107, 53, 0.35);
    border-radius: 20px;
    background: rgba(255, 107, 53, 0.08);
    transition: all 0.3s ease;
}

.carousel-card:hover .card-info .card-cta:hover {
    background: rgba(255, 107, 53, 0.2);
    border-color: rgba(255, 107, 53, 0.6);
}

/* --- Label rotado visible cuando la card está estrecha --- */
.carousel-card .card-label {
    position: absolute;
    z-index: 3;
    bottom: 32px;
    left: 50%;
    transform: translateX(-50%) rotate(-90deg);
    white-space: nowrap;
    font-size: 0.72rem;
    font-weight: 800;
    color: rgba(255, 255, 255, 0.7);
    letter-spacing: 2px;
    text-transform: uppercase;
    opacity: 1;
    transition: opacity 0.3s ease;
    pointer-events: none;
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.5);
}

.light-theme .carousel-card .card-label {
    color: rgba(0, 0, 0, 0.5);
    text-shadow: 0 1px 4px rgba(255, 255, 255, 0.6);
}

.carousel-container:hover .carousel-card:hover .card-label {
    opacity: 0;
}

/* --- Badge de estado --- */
.carousel-card .card-badge {
    position: absolute;
    top: 0;
    right: 18%;
    font-size: 0.58rem;
    font-weight: 800;
    padding: 4px 10px;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    z-index: 4;
    clip-path: polygon(0 0, 100% 0, 100% calc(100% - 4px), calc(100% - 4px) 100%, 0 100%);
    transition: opacity 0.3s ease;
}

.carousel-card .card-badge.badge-available {
    background: linear-gradient(135deg, var(--primary-color), #ff8c5a);
    color: #fff;
    box-shadow: 0 3px 12px rgba(255, 107, 53, 0.4);
}

.carousel-card .card-badge.badge-soon {
    background: linear-gradient(135deg, #444, #555);
    color: #fff;
}

.carousel-container:hover .carousel-card .card-badge {
    opacity: 0;
}

.carousel-container:hover .carousel-card:hover .card-badge {
    opacity: 1;
}

/* ===== Glow decorativo sutil ===== */
.carousel-card::before {
    content: '';
    position: absolute;
    bottom: -40%;
    left: 50%;
    transform: translateX(-50%);
    width: 80%;
    height: 60%;
    background: radial-gradient(ellipse, rgba(255, 107, 53, 0.1), transparent 70%);
    pointer-events: none;
    opacity: 0;
    z-index: 2;
    transition: opacity 0.4s ease;
}

.carousel-container:hover .carousel-card:hover::before {
    opacity: 1;
}

/* ===== Responsive ===== */
@media (max-width: 900px) {
    .carousel-container {
        height: 440px;
        width: calc(100% + 40px);
        margin-left: -20px;
    }

    .carousel-card {
        clip-path: polygon(60px 0, 100% 0, calc(100% - 60px) 100%, 0% 100%);
        margin: 0 -30px;
    }

    .carousel-card:first-child {
        clip-path: polygon(30px 0, 100% 0, calc(100% - 60px) 100%, 0% 100%);
    }

    .carousel-card:last-child {
        clip-path: polygon(60px 0, 100% 0, calc(100% - 30px) 100%, 0% 100%);
    }

    .carousel-card .card-icon-wrap {
        width: 56px;
        height: 56px;
    }

    .carousel-card .card-icon-wrap i {
        font-size: 1.6rem;
    }

    .carousel-container:hover .carousel-card:hover {
        flex: 4;
    }

    .carousel-card .card-label {
        font-size: 0.65rem;
        bottom: 24px;
    }

    .carousel-card .card-info .card-title {
        font-size: 1.05rem;
    }
}

@media (max-width: 600px) {
    .carousel-container {
        flex-wrap: wrap;
        height: auto;
        gap: 10px;
        width: 100%;
        margin-left: 0;
    }

    .carousel-card {
        flex: 1 1 calc(50% - 10px);
        height: 220px;
        min-width: 140px;
        margin: 0;
        clip-path: none;
        border-radius: 16px;
        overflow: hidden;
    }

    .carousel-card:first-child,
    .carousel-card:last-child {
        clip-path: none;
    }

    .carousel-card .card-bg {
        filter: brightness(0.35) saturate(0.8);
    }

    .carousel-container:hover .carousel-card {
        flex: 1 1 calc(50% - 10px);
    }

    .carousel-container:hover .carousel-card:hover {
        flex: 1 1 calc(100% - 10px);
        height: 280px;
    }

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

    .carousel-card .card-label {
        transform: translateX(-50%) rotate(0deg);
        bottom: 14px;
        font-size: 0.62rem;
    }

    .carousel-card .card-info .card-title {
        font-size: 1rem;
    }

    .carousel-card .card-info .card-desc {
        font-size: 0.7rem;
    }

    .carousel-card .card-badge {
        right: 14px;
    }
}
