/**
 * Alshifa Video Testimonials Widget Stylesheet
 * 
 * 5 items on Laptop/Desktop, 3 on Tablet, 1 on Mobile
 * Smooth Native Scroll-Snap Carousel + Fullscreen YouTube Modal
 */

.alshifa-testimonials-section {
    position: relative;
    width: 100%;
    padding: 60px 0 70px 0;
    box-sizing: border-box;
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: #F8FAFC;
    overflow: hidden;
}

.alshifa-testimonials-container {
    max-width: 1320px;
    margin: 0 auto;
    padding: 0 20px;
    box-sizing: border-box;
}

/* Header Row with Navigation Arrows */
.alshifa-testimonials-header-row {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    margin-bottom: 35px;
    gap: 20px;
}

.alshifa-testimonials-header-col {
    max-width: 800px;
}

.alshifa-testimonials-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #E0F2FE;
    color: #0369A1;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.6px;
    text-transform: uppercase;
    padding: 6px 16px;
    border-radius: 50px;
    margin-bottom: 12px;
}

.alshifa-testi-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background-color: #EF4444; /* YouTube Red */
    animation: alshifaPulseRed 1.8s infinite;
}

@keyframes alshifaPulseRed {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.8); }
    70% { transform: scale(1); box-shadow: 0 0 0 7px rgba(239, 68, 68, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

.alshifa-testimonials-title {
    margin: 0 0 6px 0;
    font-size: 32px;
    font-weight: 800;
    color: #0F172A;
    line-height: 1.25;
    letter-spacing: -0.4px;
}

.alshifa-testimonials-title-ar {
    margin: 0 0 6px 0;
    font-size: 17px;
    font-weight: 600;
    color: #0284C7;
    direction: rtl;
    line-height: 1.35;
}

.alshifa-testimonials-subtitle {
    margin: 0;
    font-size: 15px;
    font-weight: 500;
    color: #64748B;
}

/* Nav Buttons - Neutralize Theme CSS Collisions */
.alshifa-testimonials-nav-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
}

button.alshifa-testi-btn {
    all: unset !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 44px !important;
    height: 44px !important;
    min-width: 44px !important;
    min-height: 44px !important;
    max-width: 44px !important;
    max-height: 44px !important;
    border-radius: 50% !important;
    background: #FFFFFF !important;
    background-color: #FFFFFF !important;
    color: #0F172A !important;
    border: 1.5px solid #CBD5E1 !important;
    cursor: pointer !important;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08) !important;
    transition: all 0.25s ease !important;
    padding: 0 !important;
    margin: 0 !important;
    box-sizing: border-box !important;
    opacity: 1 !important;
}

button.alshifa-testi-btn:hover {
    background: #00A887 !important;
    background-color: #00A887 !important;
    color: #FFFFFF !important;
    border-color: #00A887 !important;
    transform: scale(1.08) !important;
    box-shadow: 0 6px 18px rgba(0, 168, 135, 0.35) !important;
}

button.alshifa-testi-btn svg {
    width: 18px !important;
    height: 18px !important;
    stroke: currentColor !important;
    fill: none !important;
    display: block !important;
}

/* ========================================================
   CAROUSEL CONTAINER & SCROLL TRACK
   ======================================================== */
.alshifa-testimonials-carousel {
    position: relative;
    width: 100%;
    overflow: hidden;
    padding: 8px 0;
}

.alshifa-testimonials-track {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    scroll-behavior: smooth;
    scroll-snap-type: x mandatory;
    scrollbar-width: none; /* Hide default scrollbar */
    -ms-overflow-style: none;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 10px;
}

.alshifa-testimonials-track::-webkit-scrollbar {
    display: none;
}

/* 5 Items on Desktop / Laptop (> 1100px) */
.alshifa-testi-item {
    flex: 0 0 calc((100% - 4 * 16px) / 5);
    min-width: 0;
    box-sizing: border-box;
    scroll-snap-align: start;
    flex-shrink: 0;
}

.alshifa-testi-card {
    background: #FFFFFF;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 6px 20px rgba(15, 23, 42, 0.06);
    border: 1px solid #E2E8F0;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
    height: 100%;
    box-sizing: border-box;
}

.alshifa-testi-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 16px 32px rgba(15, 23, 42, 0.12);
    border-color: #0E9FDF;
}

/* YouTube Thumbnail Box */
.alshifa-testi-video-thumb {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #0F172A;
    cursor: pointer;
}

.alshifa-testi-video-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
    opacity: 0.92;
}

.alshifa-testi-card:hover .alshifa-testi-video-thumb img {
    transform: scale(1.08);
    opacity: 1;
}

.alshifa-testi-play-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(15, 23, 42, 0.28);
    transition: background 0.3s ease;
}

.alshifa-play-pulse-circle {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #EF4444;
    color: #FFFFFF;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 16px rgba(239, 68, 68, 0.55);
    transition: transform 0.25s ease, background 0.25s ease;
}

.alshifa-play-pulse-circle i {
    font-size: 15px;
    margin-left: 3px;
}

.alshifa-testi-card:hover .alshifa-play-pulse-circle {
    transform: scale(1.15);
    background: #00A887;
    box-shadow: 0 6px 20px rgba(0, 168, 135, 0.65);
}

.alshifa-testi-video-tag {
    position: absolute;
    bottom: 8px;
    left: 8px;
    background: rgba(15, 23, 42, 0.82);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    color: #FFFFFF;
    font-size: 10px;
    font-weight: 700;
    padding: 3px 7px;
    border-radius: 5px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.alshifa-testi-video-tag i {
    color: #EF4444;
}

/* Card Body */
.alshifa-testi-card-body {
    padding: 14px 14px 16px 14px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
}

.alshifa-testi-stars {
    color: #F59E0B;
    font-size: 11px;
    display: flex;
    gap: 2px;
}

.alshifa-testi-name {
    margin: 2px 0 0 0;
    font-size: 14.5px;
    font-weight: 700;
    color: #0F172A;
    line-height: 1.25;
}

.alshifa-testi-country {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    font-weight: 600;
    color: #0284C7;
}

.alshifa-testi-country i {
    font-size: 11px;
}

.alshifa-testi-meta {
    margin-top: 6px;
    border-top: 1px solid #F1F5F9;
    padding-top: 8px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.alshifa-testi-treatment {
    font-size: 12px;
    font-weight: 600;
    color: #00A887;
    line-height: 1.25;
}

.alshifa-testi-hospital {
    font-size: 11px;
    font-weight: 500;
    color: #64748B;
    line-height: 1.2;
}

/* ========================================================
   RESPONSIVE BREAKPOINTS (LAPTOP: 5, TABLET: 3, MOBILE: 1)
   ======================================================== */
/* Tablet (641px - 1024px) -> Exactly 3 Cards */
@media (max-width: 1024px) and (min-width: 641px) {
    .alshifa-testi-item {
        flex: 0 0 calc((100% - 2 * 14px) / 3);
    }
}

/* Mobile (<= 640px) -> Exactly 1 Card */
@media (max-width: 640px) {
    .alshifa-testimonials-section {
        padding: 40px 0 50px 0;
    }

    .alshifa-testimonials-container {
        padding: 0 14px;
    }

    .alshifa-testi-item {
        flex: 0 0 100%;
    }

    .alshifa-testimonials-header-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }

    .alshifa-testimonials-title {
        font-size: 23px;
    }
}

/* ========================================================
   YOUTUBE POPUP MODAL (FIXED TO VIEWPORT)
   ======================================================== */
.alshifa-video-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 9999999;
    display: none;
    align-items: center;
    justify-content: center;
}

.alshifa-video-modal.active {
    display: flex;
}

.alshifa-video-modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.88);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.alshifa-video-modal-dialog {
    position: relative;
    z-index: 10;
    width: 90%;
    max-width: 860px;
    background: #000000;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.7);
}

.alshifa-video-modal-close {
    position: absolute;
    top: -46px;
    right: 0;
    background: transparent;
    border: none;
    color: #FFFFFF;
    font-size: 40px;
    cursor: pointer;
    line-height: 1;
    transition: transform 0.2s ease, color 0.2s ease;
}

.alshifa-video-modal-close:hover {
    transform: scale(1.15);
    color: #EF4444;
}

.alshifa-video-iframe-container {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
    height: 0;
    overflow: hidden;
}

.alshifa-video-iframe-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}
