/* Horizontal Auto-Scrolling Cards Section */
.horizontal-cards-section {
    width: 100%;
    overflow: hidden;
    padding: 60px 0;
    position: relative;
    margin-top: -15%;
}

.horizontal-cards-wrapper {
    display: flex;
    gap: 40px;
    animation: autoScroll 30s linear infinite;
    width: fit-content;
}

.horizontal-cards-wrapper:hover {
    animation-play-state: paused;
}

@keyframes autoScroll {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

/* Card Container with Zigzag Layout */
.card-item {
    position: relative;
    width: 300px;
    height: 200px;
    flex-shrink: 0;
    transition: transform 0.3s ease;
}

.card-item:hover {
    transform: scale(1.05);
    z-index: 10;
}

/* Alternating positions - Top and Bottom */
.card-item:nth-child(odd) {
    margin-top: 0;
}

.card-item:nth-child(even) {
    margin-top: 80px;
}

/* Card Inner Structure */
.card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    border-radius: 25px;
    overflow: hidden;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.25);
    background: #fff;
    border: 5px solid #63b3ed;
    box-sizing: border-box;
}

/* Card Image */
.hzcard-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}

/* Video Overlay - Bottom Positioned */
.video-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 35, 89, 0.95), rgba(0, 35, 89, 0.7));
    padding: 15px 20px;
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 0 0 25px 25px;
}

.card-item:hover .video-overlay {
    transform: translateY(0);
}

/* Overlay Content */
.overlay-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
}

.overlay-text {
    flex: 1;
}

.overlay-title {
    font-size: 16px;
    font-weight: 700;
    color: #FAD000;
    margin: 0 0 5px 0;
    font-family: 'Outfit', sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.overlay-subtitle {
    font-size: 13px;
    color: #ffffff;
    margin: 0;
    font-family: 'Quicksand', sans-serif;
    opacity: 0.9;
}

/* Play Button */
.play-button {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: linear-gradient(135deg, #FAD000, #FFC107);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(250, 208, 0, 0.4);
    flex-shrink: 0;
}

.play-button:hover {
    transform: scale(1.1);
    box-shadow: 0 8px 25px rgba(250, 208, 0, 0.6);
}

.play-button svg {
    width: 18px;
    height: 18px;
    fill: #002359;
    margin-left: 3px;
}

/* Border Styling */

.card-item:hover .card-inner::before {
    opacity: 1;
}

/* Responsive Design */

/* Tablet Landscape (1024px and below) */
@media (max-width: 1024px) {
    .horizontal-cards-section {
        padding: 50px 0;
    }

    .card-item {
        min-width: 320px;
        height: 260px;
    }

    .card-item:nth-child(even) {
        margin-top: 60px;
    }

    .horizontal-cards-wrapper {
        gap: 35px;
    }

    .overlay-title {
        font-size: 15px;
    }

    .overlay-subtitle {
        font-size: 12px;
    }

    .play-button {
        width: 42px;
        height: 42px;
    }
}

/* Tablet Portrait (768px and below) */
@media (max-width: 768px) {
    .horizontal-cards-section {
        padding: 40px 0;
    }

    .card-item {
        min-width: 280px;
        height: 230px;
    }

    .card-item:nth-child(even) {
        margin-top: 50px;
    }

    .horizontal-cards-wrapper {
        gap: 30px;
        animation: autoScroll 25s linear infinite;
    }

    .video-overlay {
        padding: 12px 15px;
    }

    .overlay-title {
        font-size: 14px;
    }

    .overlay-subtitle {
        font-size: 11px;
    }

    .play-button {
        width: 38px;
        height: 38px;
    }

    .play-button svg {
        width: 16px;
        height: 16px;
    }
}

/* Mobile (480px and below) */
@media (max-width: 480px) {
    .horizontal-cards-section {
        padding: 30px 0;
    }

    .card-item {
        min-width: 240px;
        height: 200px;
    }

    .card-item:nth-child(even) {
        margin-top: 40px;
    }

    .horizontal-cards-wrapper {
        gap: 25px;
        animation: autoScroll 20s linear infinite;
    }

    .card-inner {
        border-radius: 20px;
    }

    .video-overlay {
        padding: 10px 12px;
        border-radius: 0 0 20px 20px;
    }

    .overlay-content {
        gap: 10px;
    }

    .overlay-title {
        font-size: 13px;
        margin-bottom: 3px;
    }

    .overlay-subtitle {
        font-size: 10px;
    }

    .play-button {
        width: 35px;
        height: 35px;
    }

    .play-button svg {
        width: 14px;
        height: 14px;
    }
}

/* Extra Small Mobile (360px and below) */
@media (max-width: 360px) {
    .card-item {
        min-width: 220px;
        height: 180px;
    }

    .card-item:nth-child(even) {
        margin-top: 35px;
    }

    .horizontal-cards-wrapper {
        gap: 20px;
    }

    .overlay-title {
        font-size: 12px;
    }

    .overlay-subtitle {
        font-size: 9px;
    }

    .play-button {
        width: 32px;
        height: 32px;
    }
}

/* Animation Performance Optimization */
@media (prefers-reduced-motion: reduce) {
    .horizontal-cards-wrapper {
        animation: none;
    }

    .card-item:hover {
        transform: none;
    }

    .video-overlay,
    .play-button {
        transition: none;
    }
}