/* ══════════════════════════════════════════════════
   Therapy Hub Page Styles
   ══════════════════════════════════════════════════ */

.therapy-page {
    padding: 80px 40px 120px;
    background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
    min-height: 100vh;
}

.therapy-wrapper {
    max-width: 1400px;
    margin: 0 auto;
}

/* --- Hero Intro Section --- */
.therapy-intro {
    text-align: center;
    margin-bottom: 70px;
    position: relative;
}

.therapy-intro h1 {
    font-size: 46px;
    font-weight: 800;
    color: #00467f;
    margin-bottom: 20px;
    letter-spacing: -0.02em;
}

.therapy-intro p {
    font-size: 18px;
    color: var(--text-light);
    max-width: 720px;
    margin: 0 auto;
    line-height: 1.7;
}

.therapy-intro::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: #009ada;
    margin: 24px auto 0;
    border-radius: 2px;
}

/* --- Video Category Section --- */
.therapy-section-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--text);
    margin: 40px 0 24px;
    padding-bottom: 12px;
    border-bottom: 3px solid #009ada;
    display: inline-block;
}

/* --- Video Grid Layout --- */
.therapy-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 32px;
    margin-bottom: 60px;
}

/* --- Video Card Styling --- */
.therapy-card {
    background: var(--card-bg);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    border: 1px solid var(--border);
    transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.therapy-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(99, 102, 241, 0.12);
    border-color: rgba(99, 102, 241, 0.25);
}

/* Video Preview Wrapper */
.therapy-video-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 16/9;
    background: #000;
    cursor: pointer;
    overflow: hidden;
}

/* We will display a video element directly, but with customized controls or standard preview controls */
.therapy-video-wrapper video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
}

.therapy-card:hover .therapy-video-wrapper video {
    transform: scale(1.04);
}

/* Video Hover Overlay & Play Button */
.video-overlay {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
    transition: background-color 0.3s ease;
    z-index: 2;
}

.therapy-card:hover .video-overlay {
    background: rgba(15, 23, 42, 0.3);
}

/* Glassmorphic Play Button */
.play-btn-circle {
    width: 68px;
    height: 68px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(8px);
    border: 2px solid rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.play-btn-circle i {
    color: #fff;
    font-size: 24px;
    margin-left: 4px; /* Align play icon center */
    transition: transform 0.3s ease;
}

.therapy-video-wrapper:hover .play-btn-circle {
    background: #009ada;
    border-color: #009ada;
    transform: scale(1.15);
    box-shadow: 0 0 30px rgba(0, 154, 218, 0.6);
}

.therapy-video-wrapper:hover .play-btn-circle i {
    transform: scale(1.1);
}

/* Card Body Content */
.therapy-card-body {
    padding: 24px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.therapy-tag {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #009ada;
    margin-bottom: 8px;
}

.therapy-card h3 {
    font-size: 20px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 12px;
    line-height: 1.4;
}

.therapy-card p {
    font-size: 14px;
    color: var(--text-light);
    line-height: 1.6;
    margin-bottom: 20px;
    flex-grow: 1;
}

.watch-link {
    font-size: 14px;
    font-weight: 700;
    color: #00467f;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: auto;
    transition: color 0.2s ease, gap 0.2s ease;
    cursor: pointer;
}

.watch-link i {
    font-size: 12px;
}

.therapy-card:hover .watch-link {
    color: #009ada;
    gap: 10px;
}

/* --- Responsive Layout Breakpoints --- */
@media (max-width: 900px) {
    .therapy-page {
        padding: 60px 24px 90px;
    }
    .therapy-intro h1 {
        font-size: 36px;
    }
    .therapy-intro p {
        font-size: 16px;
    }
    .therapy-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 24px;
    }
}

@media (max-width: 600px) {
    .therapy-page {
        padding: 40px 16px 60px;
    }
    .therapy-intro h1 {
        font-size: 28px;
        margin-bottom: 14px;
    }
    .therapy-intro p {
        font-size: 15px;
    }
    .therapy-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

/* --- Video Modal Lightbox --- */
.video-modal {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.9);
    backdrop-filter: blur(12px);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s ease;
    padding: 20px;
}

.video-modal.open {
    opacity: 1;
    visibility: visible;
}

.video-modal-content {
    position: relative;
    width: 100%;
    max-width: 1000px;
    aspect-ratio: 16/9;
    background: #000;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    transform: scale(0.9);
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.video-modal.open .video-modal-content {
    transform: scale(1);
}

.video-modal-content video {
    width: 100%;
    height: 100%;
    display: block;
}

.video-modal-close {
    position: absolute;
    top: 24px;
    right: 24px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    cursor: pointer;
    transition: all 0.2s ease;
    z-index: 10;
}

.video-modal-close:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: rotate(90deg);
}
