/* Explain: Styles for the 3D cylindrical coverflow carousel component. */
.cyl {
    position: relative;
    margin-top: clamp(2rem, 5vw, 3.5rem);
}

.cyl-stage {
    position: relative;
    height: 720px;
    overflow: hidden;
    perspective: 1200px;
    perspective-origin: 50% 50%;
    touch-action: pan-y;
}

.cyl-track {
    position: absolute;
    inset: 0;
    margin: 0;
    padding: 0;
    list-style: none;
    transform: scale(var(--cyl-scale, 1));
    transform-origin: 50% 50%;
    transform-style: preserve-3d;
}

.cyl-item {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 260px;
    height: 360px;
    margin-top: -180px;
    margin-left: -130px;
    opacity: 0;
    transform-style: preserve-3d;
    transition: transform 640ms cubic-bezier(0.24, 0.72, 0.26, 1), opacity 320ms ease;
    will-change: transform, opacity;
}

.cyl-item.is-active {
    opacity: 1;
}

.cyl-card {
    position: relative;
    display: flex;
    width: 100%;
    height: 100%;
    flex-direction: column;
    justify-content: flex-end;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 12px;
    background: var(--footer-bg);
    box-shadow: 0 20px 46px rgba(18, 38, 61, 0.3);
    text-decoration: none;
    transition: border-color 400ms ease, box-shadow 400ms ease;
}

.cyl-item.is-active .cyl-card {
    border-color: rgba(227, 203, 139, 0.55);
    box-shadow: 0 34px 84px rgba(18, 38, 61, 0.42);
}

.cyl-card:focus-visible {
    outline: 2px solid var(--accent-color);
    outline-offset: 4px;
}

.cyl-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cyl-scrim {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg,
            rgba(9, 20, 34, 0.58) 0%,
            rgba(9, 20, 34, 0.1) 26%,
            rgba(9, 20, 34, 0.14) 46%,
            rgba(9, 20, 34, 0.72) 70%,
            rgba(9, 20, 34, 0.96) 100%);
    pointer-events: none;
}

.cyl-top {
    position: absolute;
    top: 0.7rem;
    inset-inline-start: 0.7rem;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.cyl-num {
    display: inline-grid;
    min-width: 2rem;
    height: 1.65rem;
    place-items: center;
    border-radius: 6px;
    background: rgba(9, 20, 34, 0.86);
    color: #ffffff;
    font-family: var(--font-heading);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    backdrop-filter: blur(6px);
}

.cyl-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    border: 1px solid rgba(227, 203, 139, 0.32);
    border-radius: 6px;
    background: rgba(9, 20, 34, 0.86);
    padding: 0.3rem 0.55rem;
    color: var(--gold-light);
    font-size: 0.66rem;
    font-weight: 700;
    backdrop-filter: blur(6px);
}

.cyl-tag i {
    font-size: 0.62rem;
}

.cyl-body {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    padding: 1rem 0.9rem 1.15rem;
    text-align: start;
}

.cyl-title {
    color: #ffffff;
    font-family: var(--font-heading);
    font-size: 1.02rem;
    font-weight: 800;
    line-height: 1.35;
    text-shadow: 0 1px 10px rgba(9, 20, 34, 0.5);
}

.cyl-desc {
    display: -webkit-box;
    overflow: hidden;
    color: rgba(255, 255, 255, 0.88);
    font-size: 0.8rem;
    line-height: 1.6;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.cyl-arrow {
    position: absolute;
    top: 50%;
    z-index: 30;
    display: inline-flex;
    width: 2.75rem;
    height: 2.75rem;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    background: #ffffff;
    color: var(--primary-color);
    font-size: 0.85rem;
    box-shadow: 0 14px 30px rgba(18, 38, 61, 0.16);
    cursor: pointer;
    transform: translateY(-50%);
    transition: background-color 300ms ease, color 300ms ease, transform 300ms ease;
}

.cyl-arrow:hover {
    background: var(--accent-color);
    color: var(--primary-color);
    transform: translateY(-50%) scale(1.06);
}

.cyl-arrow:focus-visible {
    outline: 2px solid var(--accent-color);
    outline-offset: 3px;
}

.cyl-arrow--prev {
    inset-inline-start: clamp(0.25rem, 1.5vw, 1.5rem);
}

.cyl-arrow--next {
    inset-inline-end: clamp(0.25rem, 1.5vw, 1.5rem);
}

.cyl-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 1.5rem;
}

.cyl-play {
    display: inline-flex;
    width: 2.5rem;
    height: 2.5rem;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border-color);
    border-radius: 999px;
    background: #ffffff;
    color: var(--primary-color);
    font-size: 0.72rem;
    box-shadow: 0 10px 24px rgba(18, 38, 61, 0.12);
    cursor: pointer;
    transition: background-color 300ms ease, color 300ms ease, transform 300ms ease;
}

.cyl-play:hover {
    background: var(--accent-color);
    transform: scale(1.06);
}

.cyl-play:focus-visible {
    outline: 2px solid var(--accent-color);
    outline-offset: 3px;
}

@media (max-width: 1200px) {
    .cyl-stage {
        height: 620px;
    }

    .cyl-track {
        --cyl-scale: 0.86;
    }
}

@media (max-width: 1023px) {
    .cyl-stage {
        height: 540px;
    }

    .cyl-track {
        --cyl-scale: 0.73;
    }
}

@media (max-width: 767px) {
    .cyl-stage {
        height: 430px;
    }

    .cyl-track {
        --cyl-scale: 0.55;
    }

    .cyl-body {
        padding: 0.85rem 0.8rem 1rem;
    }
}

@media (max-width: 479px) {
    .cyl-stage {
        height: 400px;
    }

    .cyl-track {
        --cyl-scale: 0.5;
    }

    .cyl-arrow {
        width: 2.4rem;
        height: 2.4rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .cyl-item {
        transition: none;
    }
}