/* High Advanced Shorts Carousel Styles */
.shorts-section {
    padding: 80px 0;
    background: #fff;
    overflow: hidden;
    position: relative;
}

.shorts-title {
    font-size: clamp(32px, 5vw, 48px);
    font-weight: 800;
    color: #1a1a1a;
    margin-bottom: 50px;
    text-align: center;
    letter-spacing: -1px;
}

.shorts-carousel-main {
    position: relative;
    width: 100%;
    max-width: 100%;
    /* Increased max-width */
    margin: 0;
    padding: 0 40px;
    /* Minimal padding for buttons to be at edges */
    display: flex;
    align-items: center;
}

.shorts-slider-viewport {
    width: 100%;
    overflow: visible;
    padding: 30px 0;
}

.shorts-slider-track {
    display: flex;
    gap: 10px;
    /* More gap for grandeur */
    transition: transform 0.6s cubic-bezier(0.23, 1, 0.32, 1);
    will-change: transform;
}

.short-card {
    flex: 0 0 320px;
    aspect-ratio: 9/16;
    border-radius: 25px;
    overflow: hidden;
    background: #000;
    position: relative;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
    cursor: pointer;
    transform: scale(0.9);
    opacity: 0.9;
}

.short-card.active {
    transform: scale(1.05);
    opacity: 1;
    z-index: 10;
    box-shadow: 0 15px 40px rgba(6, 171, 92, 0.2);
    border: 4px solid var(--navbar-primary-green);
}

.short-card:not(.active):hover {
    transform: scale(.99) translateY(-5px);
    opacity: 1;
}


.player-container {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    overflow: hidden;
}

.short-card iframe {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    transform: translate(-50%, -50%) scale(1.0);
    /* Exact fit to show all controls */
    border: none;
    pointer-events: none;
    object-fit: unset;
}

.short-card.active iframe {
    pointer-events: auto;
}

/* Play/Pause Overlay */
.short-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, transparent 70%, rgba(0, 0, 0, 0.5));
    z-index: 1;
    transition: opacity 0.4s ease;
    pointer-events: none;
}

.short-card.active::before {
    opacity: 0.2;
}

.shorts-logo-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 5;
    width: 80px;
    height: 80px;
    background: var(--color-bg-mint-light);
    backdrop-filter: blur(10px);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.4s ease;
    border: 1px solid var(--color-bg-green-header);
}

.shorts-logo-overlay img {
    width: 40px;
    height: auto;
}

/* Hide logo when iframe is loaded */
.player-container:not(:empty)+.shorts-logo-overlay {
    opacity: 0 !important;
    visibility: hidden !important;
    transform: translate(-50%, -50%) scale(0.5);
}

/* Navigation Buttons - Extreme Edges */
.shorts-nav-btn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: none;
    background: #fff;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 100;
    transition: all 0.3s ease;
    color: #1a1a1a;
    font-size: 24px;
}

.shorts-nav-btn:hover {
    background: var(--navbar-primary-green);
    color: #fff;
    box-shadow: 0 10px 30px rgba(6, 171, 92, 0.4);
    transform: translateY(-50%) scale(1.1);
}

.shorts-nav-btn.prev {
    left: 5px;
}

.shorts-nav-btn.next {
    right: 5px;
}

/* Pagination Dots */
.shorts-pagination {
    display: flex;
    justify-content: center;
    gap: 14px;
    margin-top: 50px;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #e0e0e0;
    cursor: pointer;
    transition: all 0.3s ease;
}

.dot.active {
    width: 40px;
    border-radius: 12px;
    background: var(--navbar-primary-green);
    box-shadow: 0 4px 10px rgba(6, 171, 92, 0.2);
}

/* Responsive Optimizations */
@media (max-width: 1650px) {
    .shorts-carousel-main {
        padding: 0 60px;
        /* Add padding when screen is smaller to keep buttons inside */
    }

    .shorts-nav-btn.prev {
        left: 10px;
    }

    .shorts-nav-btn.next {
        right: 10px;
    }
}

@media (max-width: 1200px) {
    .short-card {
        flex: 0 0 300px;
    }
}

@media (max-width: 992px) {
    .short-card {
        flex: 0 0 320px;
    }
}

@media (max-width: 768px) {
    .short-card {
        flex: 0 0 300px;
    }

    .shorts-nav-btn {
        width: 50px;
        height: 50px;
        font-size: 20px;
    }
}

@media (max-width: 480px) {
    .short-card {
        flex: 0 0 280px;
        /* Bigger for single view on mobile */
    }

    .shorts-carousel-main {
        padding: 0 10px;
    }

    .shorts-nav-btn {
        display: none;
    }
}