/* ==========================================================================
   Dr. Mukul Bhargava Cardiology - Video Gallery Stylesheet (videos.css)
   ========================================================================== */

/* 1. Global Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* 2. Responsive Video Section Container */
.video-section {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow-x: hidden;
}

/* 3. Responsive Video Grid:
      - Mobile (< 640px): 1 column
      - Tablet (640px - 1023px): 2 columns
      - Desktop (>= 1024px): 3 columns
*/
.video-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    margin: 0 auto;
}

@media (min-width: 640px) {
    .video-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 1.75rem;
    }
}

@media (min-width: 1024px) {
    .video-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 2rem;
    }
}

/* 4. Video Card Component */
.video-card {
    background-color: #ffffff;
    border-radius: 1.25rem;
    overflow: hidden;
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 18px -2px rgba(15, 23, 42, 0.06), 0 2px 6px -1px rgba(15, 23, 42, 0.04);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.video-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 30px -4px rgba(29, 78, 216, 0.12), 0 4px 12px -2px rgba(15, 23, 42, 0.06);
    border-color: #bfdbfe;
}

/* 5. Video Iframe Wrapper with 16:9 Aspect Ratio */
.video-wrapper {
    position: relative;
    width: 100%;
    max-width: 100%;
    aspect-ratio: 16 / 9;
    background-color: #0f172a;
    overflow: hidden;
    border-radius: 1.25rem 1.25rem 0 0;
}

.video-wrapper iframe {
    display: block;
    width: 100%;
    height: 100%;
    aspect-ratio: 16 / 9;
    border: 0;
}

/* 6. Video Metadata & Card Body */
.video-info {
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    justify-content: space-between;
    box-sizing: border-box;
    background-color: #ffffff;
}

.video-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #1d4ed8;
    background-color: #eff6ff;
    border: 1px solid #dbeafe;
    padding: 0.25rem 0.625rem;
    border-radius: 9999px;
    margin-bottom: 0.625rem;
    width: fit-content;
}

.video-title {
    font-family: "Playfair Display", Georgia, serif;
    font-size: 1.0625rem;
    font-weight: 700;
    line-height: 1.4;
    color: #0f172a;
    margin: 0 0 0.5rem 0;
}

.video-desc {
    font-size: 0.8125rem;
    color: #64748b;
    line-height: 1.5;
    margin: 0 0 1rem 0;
}

.video-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 0.75rem;
    border-top: 1px solid #f1f5f9;
    font-size: 0.75rem;
    color: #94a3b8;
}

.video-channel {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    font-weight: 600;
    color: #1d4ed8;
}

/* 7. Mobile Safeguards & Overflow Control */
@media (max-width: 639px) {
    .video-grid {
        gap: 1.25rem;
    }
    .video-title {
        font-size: 1rem;
    }
    .video-info {
        padding: 1rem;
    }
}
