/*!
 * Doctor Videos - Video Grid
 * File: sections/doctor-videos/02-video-grid/style.css
 * Theme tokens: #F8FAFC / #071322 / #C9A84C
 * Scope: .dc-doctor-video-grid, #dc-doc-modal
 */

.dc-doctor-video-grid {
    background: #F8FAFC;
    padding: 80px 24px;
}

.dc-doctor-video-grid,
.dc-doctor-video-grid *,
.dc-doctor-video-grid *::before,
.dc-doctor-video-grid *::after,
#dc-doc-modal,
#dc-doc-modal *,
#dc-doc-modal *::before,
#dc-doc-modal *::after {
    box-sizing: border-box;
}

.dc-doctor-video-grid__inner {
    max-width: 1200px;
    margin: 0 auto;
}

/* ---- Filter tabs --------------------------------------------------------- */
.dc-doctor-video-grid__filters {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    margin: 0 0 40px;
    padding: 0;
}

.dc-doctor-video-grid__filter {
    -webkit-appearance: none;
    appearance: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 24px;
    border: 1.5px solid #CBD5E1;
    border-radius: 999px;
    background: #FFF;
    color: #071322;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.5;
    text-align: center;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.dc-doctor-video-grid__filter:hover {
    border-color: #071322;
}

.dc-doctor-video-grid__filter.active,
.dc-doctor-video-grid__filter.is-active {
    background: #071322;
    color: #C9A84C;
    border-color: #071322;
}

.dc-doctor-video-grid__filter:focus-visible {
    outline: 2px solid #C9A84C;
    outline-offset: 2px;
}

/* ---- Video grid ---------------------------------------------------------- */
.dc-doctor-video-grid__list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
    margin: 0;
    padding: 0;
    list-style: none;
}

/* ---- Card ---------------------------------------------------------------- */
.dc-doctor-video-grid__card {
    margin: 0;
    background: #FFF;
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(7, 19, 34, 0.06);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.dc-doctor-video-grid__card:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 40px rgba(7, 19, 34, 0.12);
}

.dc-doctor-video-grid__card:focus-within {
    outline: 2px solid #C9A84C;
    outline-offset: 2px;
}

/* ---- Thumbnail ----------------------------------------------------------- */
.dc-doctor-video-grid__thumbnail {
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #071322;
}

.dc-doctor-video-grid__thumbnail img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ---- Play button --------------------------------------------------------- */
.dc-doctor-video-grid__play {
    position: absolute;
    inset: 0;
    margin: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    border: 2px solid rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    background: rgba(201, 168, 76, 0.4);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    box-shadow: 0 4px 20px rgba(7, 19, 34, 0.35);
    color: #FFF;
    cursor: pointer;
    transition: transform 0.3s ease, background-color 0.3s ease, box-shadow 0.3s ease;
}

.dc-doctor-video-grid__play:hover,
.dc-doctor-video-grid__play:focus-visible {
    transform: scale(1.1);
    background: rgba(201, 168, 76, 0.7);
}

.dc-doctor-video-grid__play svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

.dc-doctor-video-grid__play i {
    font-size: 20px;
}

/* ---- Duration badge ------------------------------------------------------ */
.dc-doctor-video-grid__duration {
    position: absolute;
    right: 10px;
    bottom: 10px;
    padding: 3px 8px;
    background: rgba(0, 0, 0, 0.7);
    color: #FFF;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.5;
    border-radius: 5px;
    letter-spacing: 0.3px;
}

/* ---- Card body ----------------------------------------------------------- */
.dc-doctor-video-grid__body {
    padding: 20px;
}

.dc-doctor-video-grid__body h3,
.dc-doctor-video-grid__topic {
    margin: 0 0 6px;
    font-size: 18px;
    font-weight: 700;
    line-height: 1.4;
    color: #071322;
}

.dc-doctor-video-grid__topic a {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s ease;
}

.dc-doctor-video-grid__topic a:hover {
    color: #C9A84C;
}

.dc-doctor-video-grid__doctor,
.dc-doctor-video-grid__doctor-name {
    margin: 0;
    font-size: 14px;
    line-height: 1.5;
    color: #64748B;
}

/* ---- Modal --------------------------------------------------------------- */
#dc-doc-modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    z-index: 99999;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

#dc-doc-modal.active,
#dc-doc-modal.is-open {
    display: flex;
    animation: dc-doc-modal-fade-in 0.3s ease;
}

.dc-doc-modal__content {
    position: relative;
    width: 100%;
    max-width: 960px;
}

#dc-doc-modal.active .dc-doc-modal__content,
#dc-doc-modal.is-open .dc-doc-modal__content {
    animation: dc-doc-modal-zoom-in 0.35s ease;
}

.dc-doc-modal__player {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: 12px;
    overflow: hidden;
    background: #000;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.5);
}

.dc-doc-modal__player iframe,
.dc-doc-modal__player video {
    display: block;
    width: 100%;
    height: 100%;
    border: 0;
}

.dc-doc-modal__close {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 1.5px solid rgba(255, 255, 255, 0.7);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    color: #FFF;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease, transform 0.3s ease;
}

.dc-doc-modal__close:hover {
    background: #C9A84C;
    border-color: #C9A84C;
    color: #071322;
    transform: rotate(90deg);
}

@keyframes dc-doc-modal-fade-in {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes dc-doc-modal-zoom-in {
    from {
        opacity: 0;
        transform: scale(0.96);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* ---- Responsive ---------------------------------------------------------- */
@media (max-width: 767px) {
    .dc-doctor-video-grid {
        padding: 48px 16px;
    }

    .dc-doctor-video-grid__filters {
        flex-wrap: nowrap;
        justify-content: flex-start;
        overflow-x: auto;
        gap: 8px;
        margin-bottom: 28px;
        padding-bottom: 8px;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .dc-doctor-video-grid__filters::-webkit-scrollbar {
        display: none;
    }

    .dc-doctor-video-grid__filter {
        flex-shrink: 0;
        padding: 8px 16px;
        font-size: 13px;
    }
}