/* Featured Shorts - Vertical Video Carousel */

/* ============================================
   SECTION & HEADING
   ============================================ */

.infotel-featured-shorts {
    margin: 2rem 0;
    padding: 2rem 60px 0 60px; /* Side padding for arrows, no bottom padding to avoid gap */
    opacity: 1 !important;
    visibility: visible !important;
    display: block !important;
    position: relative;
}

.infotel-featured-shorts__heading {
    font-size: 1.8rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: #fff;
    text-align: center;
}

/* ============================================
   CAROUSEL (SWIPER)
   ============================================ */

.shorts-carousel {
    overflow: hidden !important; /* Hide overflow to crop slides */
    width: 100%;
    max-width: 100%;
    padding: 0; /* Remove all padding to eliminate gaps */
    position: relative; /* For absolute positioning of arrows */
    height: auto !important; /* Prevent Swiper from collapsing */
    min-height: auto; /* Auto height to fit content */
}

/* Hide scrollbar completely on desktop */
.shorts-carousel::-webkit-scrollbar {
    display: none;
}

.shorts-carousel {
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE and Edge */
}

.shorts-carousel .swiper-wrapper {
    display: flex !important;
    align-items: stretch;
    height: auto !important;
    opacity: 1 !important;
    visibility: visible !important;
    transition-timing-function: ease-out !important;
}

.shorts-carousel .swiper-slide {
    width: 22%; /* Responsive width - shows ~4.5 slides */
    max-width: 280px;
    min-width: 200px;
    flex-shrink: 0;
}

/* Responsive slide widths */
@media (min-width: 1280px) {
    .shorts-carousel .swiper-slide {
        width: 21%; /* Shows 4 full + half of 5th */
        max-width: 260px;
    }
}

@media (min-width: 1024px) and (max-width: 1279px) {
    .shorts-carousel .swiper-slide {
        width: 22%;
        max-width: 240px;
    }
}

/* ============================================
   NAVIGATION ARROWS (Desktop)
   ============================================ */

.shorts-carousel .swiper-button-next,
.shorts-carousel .swiper-button-prev {
    width: 44px !important;
    height: 44px !important;
    background: rgba(228, 0, 43, 0.9) !important; /* Red like Global News */
    border-radius: 4px; /* Square with rounded corners */
    color: #fff !important;
    transition: all 0.3s ease;
    display: flex !important;
    opacity: 1 !important;
    visibility: visible !important;
    z-index: 1000 !important; /* Higher z-index than video cards */
    pointer-events: auto !important; /* Ensure clicks work */
    cursor: pointer !important;
    align-items: center;
    justify-content: center;
}

.shorts-carousel .swiper-button-next:hover,
.shorts-carousel .swiper-button-prev:hover {
    background: rgba(139, 0, 0, 1) !important; /* Dark red / red-black */
}

.shorts-carousel .swiper-button-next::after,
.shorts-carousel .swiper-button-prev::after {
    font-size: 20px;
    font-weight: bold;
}

/* Mobile: Hide arrows, show scrollbar, adjust slide count */
@media (max-width: 767px) {
    .shorts-carousel .swiper-button-next,
    .shorts-carousel .swiper-button-prev {
        display: none !important;
    }
    
    .shorts-carousel .swiper-slide {
        width: 60%; /* Show ~1.6 slides (first full, second partially visible) */
        max-width: 280px;
    }
    
    .infotel-featured-shorts {
        padding: 2rem 1rem 0 1rem; /* Less padding on mobile, no bottom gap */
    }
}

/* Position arrows INSIDE the carousel on left and right edges */
.shorts-carousel .swiper-button-prev {
    left: 10px !important;
    top: 50%;
    transform: translateY(-50%);
}

.shorts-carousel .swiper-button-next {
    right: 10px !important;
    top: 50%;
    transform: translateY(-50%);
}

/* Section already styled above with padding for arrows */

/* Disabled state */
.shorts-carousel .swiper-button-disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

/* ============================================
   SCROLLBAR (Mobile)
   ============================================ */

.swiper-scrollbar {
    background: rgba(255, 255, 255, 0.1);
    height: 4px;
    border-radius: 2px;
    margin-top: 16px; /* More space below slides */
    position: relative !important;
    bottom: 0 !important;
    z-index: 10; /* Ensure scrollbar is above slides */
    transition: none !important; /* Remove any transitions */
}

.swiper-scrollbar-drag {
    background: rgba(228, 0, 43, 0.8); /* Red to match theme */
    border-radius: 2px;
    transition: none !important; /* Remove drag animation */
}

/* Hide scrollbar on desktop */
@media (min-width: 768px) {
    .swiper-scrollbar {
        display: none !important;
    }
}

/* ============================================
   VIDEO CARD
   ============================================ */

.short-item {
    cursor: pointer;
    background: #1a1a1a;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.2s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.short-item:hover {
    transform: translateY(-5px);
}

/* ============================================
   9:16 ASPECT RATIO CONTAINER
   ============================================ */

.short-item__player-wrapper {
    position: relative;
    width: 100%;
    padding-bottom: 177.77%; /* (16/9) * 100 = 177.77% for 9:16 aspect ratio */
    background: #000;
    overflow: hidden;
}

/* ============================================
   THUMBNAIL
   ============================================ */

.short-item__thumbnail {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Play Icon */
.short-item__play-icon {
    width: 60px;
    height: 60px;
    background: rgba(0, 0, 0, 0.6);
    border-radius: 50%;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.short-item__play-icon::before {
    content: '';
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 12px 0 12px 20px;
    border-color: transparent transparent transparent #fff;
    margin-left: 4px;
}

/* Branding */
.short-item__branding {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #e4002b;
    color: #fff;
    padding: 4px 8px;
    font-size: 0.75rem;
    font-weight: bold;
    border-radius: 4px;
    text-transform: uppercase;
    transition: opacity 0.3s ease;
}

/* Title Overlay (on video, at bottom) */
.short-item__title-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    color: #fff;
    font-size: 0.9rem;
    line-height: 1.3;
    padding: 40px 12px 12px 12px; /* Extra padding at top for gradient */
    background: linear-gradient(to bottom, transparent 0%, rgba(0, 0, 0, 0.7) 50%, rgba(0, 0, 0, 0.95) 100%);
    transition: opacity 0.3s ease;
    z-index: 2;
    display: -webkit-box;
    -webkit-line-clamp: 3; /* Limit to 3 lines */
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Hide title on hover */
.short-item:hover .short-item__title-overlay {
    opacity: 0;
}

/* ============================================
   VIDEO PLAYER (HOVER PREVIEW)
   ============================================ */

.short-item__player {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.short-item__player .plyr {
    width: 100%;
    height: 100%;
}

/* Hide Plyr controls for preview players */
.short-item__player .plyr__controls {
    display: none !important;
}

/* ============================================
   VIDEO TITLE (OLD - NOW USING OVERLAY)
   ============================================ */

/* Old title below video - no longer used */

/* ============================================
   MODAL (NATIVE DIALOG)
   ============================================ */

.shorts-modal {
    border: none;
    padding: 0;
    background: rgba(0, 0, 0, 0.85); /* Reduced from 0.95 to 0.85 (10% lighter) */
    width: 100vw;
    height: 100vh;
    max-width: none;
    max-height: none;
    position: fixed;
    top: 0;
    left: 0;
    display: none; /* Hidden by default */
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

/* Show modal when open */
.shorts-modal[open] {
    display: flex;
}

.shorts-modal::backdrop {
    background: rgba(0, 0, 0, 0.8); /* Reduced from 0.9 to 0.8 (10% lighter) */
}

/* Modal Content */
.shorts-modal__content {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 400px;
    width: 90%;
}

/* Close Button */
.shorts-modal__close {
    position: absolute;
    top: -50px;
    right: -10px;
    background: rgba(228, 0, 43, 0.9); /* Same red as arrows */
    border: none;
    color: #fff;
    font-size: 2rem;
    font-weight: bold;
    cursor: pointer;
    width: 44px;
    height: 44px;
    border-radius: 4px; /* Square with rounded corners like arrows */
    z-index: 99999; /* Much higher z-index */
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s ease;
    line-height: 1;
}

.shorts-modal__close:hover {
    background: rgba(139, 0, 0, 1) !important; /* Dark red like arrows on hover */
}

/* Remove focus outline on mouse click */
.shorts-modal__close:focus {
    outline: none;
}

/* Show focus outline only for keyboard navigation */
.shorts-modal__close:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 2px;
}

/* Modal Player Wrapper (9:16 Aspect Ratio) */
.shorts-modal__player-wrapper {
    position: relative;
    width: 100%;
    padding-bottom: 177.77%; /* 9:16 aspect ratio */
    background: #000;
    border-radius: 8px;
    overflow: hidden;
}

.shorts-modal__player {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.shorts-modal__player .plyr {
    width: 100%;
    height: 100%;
}

/* Show Plyr controls in modal */
.shorts-modal__player .plyr__controls {
    display: flex !important;
}

/* Modal Title */
.shorts-modal__title {
    color: #fff;
    font-size: 1.2rem;
    text-align: center;
    margin-top: 1rem;
    margin-bottom: 0;
    padding: 0 1rem;
    max-width: 90%;
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

@media (min-width: 768px) {
    .shorts-carousel .swiper-slide {
        width: 220px; /* Slightly larger on tablets */
    }

    .shorts-modal__content {
        max-width: 420px;
    }
}

@media (min-width: 1024px) {
    .shorts-carousel .swiper-slide {
        width: 240px; /* Even larger on desktop */
    }

    .shorts-modal__content {
        max-width: 450px;
    }
}

@media (max-width: 767px) {
    .shorts-carousel .swiper-slide {
        width: 200px; /* Smaller on mobile */
    }

    .short-item__title {
        font-size: 0.85rem;
        padding: 10px;
        min-height: 50px;
    }

    .shorts-modal__content {
        max-width: 95%;
    }

    .shorts-modal__close {
        top: -40px;
        right: 0;
    }
}

