/* 
 * Gritatech Videos - Frontend Styles
 */

.gritatech-videos-section {
    position: relative;
    z-index: 1;
    overflow: hidden;
}

.gritatech-videos-swiper {
    position: relative;
    padding: 10px 40px !important; /* Space for arrows */
    margin: 0 -40px; /* Offset padding */
}

.sp-video-card {
    display: block;
    position: relative;
    width: 100%;
    aspect-ratio: 9 / 16;
    border-radius: 12px;
    overflow: hidden;
    text-decoration: none;
    background: #111;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    cursor: pointer;
}

.sp-video-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
}

.sp-video-card__media {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.sp-video-card__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.sp-video-card:hover .sp-video-card__media img {
    transform: scale(1.05);
}

.sp-video-card__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.95) 0%, rgba(0, 0, 0, 0.4) 50%, rgba(0, 0, 0, 0.1) 100%);
}

.sp-video-card__play {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(1);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    border: 2px solid rgba(255, 255, 255, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(2px);
    transition: all 0.3s ease;
}

.sp-video-card:hover .sp-video-card__play {
    transform: translate(-50%, -50%) scale(1.1);
    background: rgba(236, 0, 140, 0.8); /* Primary color glow */
    border-color: #ec008c;
}

.sp-video-card__play svg {
    width: 24px;
    height: 24px;
    color: #fff;
    margin-left: 3px; /* Center triangle optically */
}

.sp-video-card__content {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 20px;
    z-index: 2;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.sp-video-card__badge {
    position: relative;
    display: inline-block;
    padding-left: 10px;
    color: #fff;
    font-size: 0.75rem;
    font-weight: 800;
    margin-bottom: 8px;
    letter-spacing: 0.05em;
}

.sp-video-card__badge::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background-color: #ec008c; /* Red/Primary bar next to badge */
}

.sp-video-card__title {
    color: #fff;
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.3;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Swiper Navigation Arrows */
.sp-swiper-prev,
.sp-swiper-next {
    width: 40px !important;
    height: 40px !important;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255,255,255,0.5);
    border-radius: 50%;
    color: #fff !important;
    backdrop-filter: blur(4px);
}

.sp-swiper-prev:hover,
.sp-swiper-next:hover {
    background: #ec008c;
    border-color: #ec008c;
}

.sp-swiper-prev::after,
.sp-swiper-next::after {
    font-size: 16px !important;
    font-weight: bold;
}

.sp-swiper-prev { left: 0 !important; }
.sp-swiper-next { right: 0 !important; }

/* Modal Styles */
.sp-video-modal {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.sp-video-modal.is-active {
    opacity: 1;
    visibility: visible;
}

.sp-video-modal__overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(5px);
    cursor: pointer;
}

.sp-video-modal__content {
    position: relative;
    width: 100%;
    max-width: 500px; /* Limit width for 9:16 vertical ratio */
    height: 90vh; /* Max height */
    aspect-ratio: 9 / 16;
    margin: 0 auto;
    z-index: 2;
    background: #000;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0,0,0,0.5);
}

@media (max-width: 768px) {
    .sp-video-modal__content {
        max-width: 95vw;
        height: 85vh;
        border-radius: 8px;
    }
}

.sp-video-modal__close {
    position: absolute;
    top: -40px;
    right: 0;
    background: none;
    border: none;
    color: #fff;
    font-size: 32px;
    line-height: 1;
    cursor: pointer;
    transition: color 0.2s;
    z-index: 3;
}

@media (max-width: 768px) {
    .sp-video-modal__close {
        top: 10px;
        right: 10px;
        background: rgba(0,0,0,0.5);
        border-radius: 50%;
        width: 36px;
        height: 36px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 24px;
    }
}

.sp-video-modal__close:hover {
    color: #ec008c;
}

.sp-video-modal__iframe-container {
    width: 100%;
    height: 100%;
}

.sp-video-modal__iframe-container iframe {
    width: 100%;
    height: 100%;
    border: none;
}
