/* -------------------------------------------------------------
 * YOUTUBE SHORTS TESTIMONIALS SECTION
 * ------------------------------------------------------------- */

.shorts-testimonials-section {
    background-color: #F4F1EA;
}

/* 9:16 Aspect Ratio Placeholder */
.short-placeholder {
    width: 100%;
    padding-bottom: 177.77%; /* 16:9 vertical fallback */
    background-color: rgba(0, 0, 0, 0.05); /* Very subtle dark bg in case image fails */
    border: 2.2px solid #1D2A36; /* Dark blue border with increased thickness */
    cursor: pointer;
    transform: translate3d(0, 0, 0);
    will-change: transform;
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    touch-action: manipulation;
}

.short-placeholder:active {
    transform: scale(0.975);
}

.short-bg {
    /* For now it's just a dark bg, later can hold the video thumbnail */
    background-color: #222222;
    transition: opacity 0.3s ease;
}

/* Play Button Outer Circle */
.play-btn-outer {
    width: 64px;
    height: 64px;
    background-color: #1D2A36; /* Dark blue theme color */
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), background-color 0.3s ease;
    z-index: 2;
}

/* Play Button Inner Triangle */
.play-btn-inner {
    width: 0; 
    height: 0; 
    border-top: 10px solid transparent;
    border-bottom: 10px solid transparent;
    border-left: 16px solid #F4F1EA; /* Tan color matching section background */
    margin-left: 5px; /* Optically center the triangle */
    transition: border-left-color 0.3s ease;
}

/* Close Button (Visible when playing) */
.short-close-btn {
    top: 12px;
    right: 12px;
    width: 32px;
    height: 32px;
    background-color: rgba(0, 0, 0, 0.75);
    color: #fff;
    border-radius: 50%;
    cursor: pointer;
    z-index: 10;
    font-size: 14px;
    transition: all 0.2s ease;
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.short-close-btn:hover {
    background-color: #E63946; /* Brand red */
    transform: scale(1.1);
}


/* Desktop Adjustments: Move cards 1mm down & testimonials results tape 1mm up */
@media (min-width: 769px) {
    .short-placeholder {
        margin-top: 1mm !important; /* Move YT iframe cards 1mm down on desktop */
    }
    #testimonialSection .marquee-wrapper {
        bottom: 1mm !important; /* Move testimonials results moving tape 1mm up only on desktop */
    }
}

/* Hover Effects */
@media (hover: hover) and (pointer: fine) {
    .short-placeholder:hover {
        transform: none !important; /* Do not move up when mouse hovered on desktop */
        box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15) !important;
    }
    
    .short-placeholder:hover .play-btn-outer {
        transform: scale(1.15);
        background-color: #141f28; /* Slightly darker blue on hover */
    }
    
    .short-placeholder:hover .short-bg {
        opacity: 0.9;
    }
}

/* Responsive Grid Adjustments */
@media (max-width: 768px) {
    .shorts-testimonials-section {
        padding-bottom: 2rem !important; /* Heavily reduced to crop gap below results tape */
    }
    
    .play-btn-outer {
        width: 54px;
        height: 54px;
    }
    
    .play-btn-inner {
        border-top: 8px solid transparent;
        border-bottom: 8px solid transparent;
        border-left: 14px solid #F4F1EA;
    }
}

/* Shorts Carousel Mobile */
@media (max-width: 768px) {
    .shorts-row {
        flex-wrap: nowrap;
        overflow-x: auto;
        overflow-y: hidden;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        scroll-behavior: smooth;
        scrollbar-width: none; /* Firefox */
        touch-action: pan-y pan-x;
        padding-bottom: 1rem;
        /* Override bootstrap gap/margins/centering to ensure tight snapping */
        margin-left: -0.75rem; /* Pull out of default container padding */
        margin-right: -0.75rem;
        padding-left: 1.5rem; /* Space so the first item centers perfectly */
        padding-right: 1.5rem; /* Space so the last item centers perfectly */
        justify-content: flex-start !important; /* CRITICAL: Fixes the bug where first item is permanently off-center */
        gap: 1.5rem;
    }
    .shorts-row::-webkit-scrollbar {
        display: none; /* Chrome/Safari/Opera */
    }
    .short-col {
        scroll-snap-align: center;
        /* Reduce size by 10% so it's slightly smaller and peeks the next card */
        flex: 0 0 calc(90vw - 3rem);
        max-width: calc(90vw - 3rem);
        padding-left: 0;
        padding-right: 0;
    }
    .gravity-effect-title {
        margin-top: calc(-3.5rem + 1.5cm) !important;
    }
}

.shorts-carousel-controls {
    display: flex;
    justify-content: space-between;
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    transform: translateY(-50%);
    z-index: 10;
    pointer-events: none;
    padding: 0 10px;
}
.shorts-nav {
    pointer-events: auto;
    background-color: #1D2A36;
    border: none;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), background-color 0.3s ease;
}
.shorts-nav:hover {
    background-color: #141f28;
    transform: scale(1.1);
}

.css-arrow {
    width: 14px;
    height: 14px;
    border-top: 3px solid #F4F1EA;
    border-right: 3px solid #F4F1EA;
    display: inline-block;
}

.arrow-left {
    transform: rotate(-135deg);
    margin-left: 5px; /* visually center the chevron in the circle */
}

.arrow-right {
    transform: rotate(45deg);
    margin-right: 5px; /* visually center the chevron in the circle */
}
