/*
 * Blog Page - Doctor Talks Video Section
 * Annai Theresa Hospital
 * Color Theme: Beige background (#E6D9CC), White cards, Blue accents (#2c5aa0)
 */

/* ===================================
   PAGE BACKGROUND
   =================================== */
body {
    background-color: #E6D9CC;
}

/* ===================================
   DOCTOR TALKS SECTION
   =================================== */
.doctor-talks-section {
    background-color: #E6D9CC;
    padding: 80px 20px;
}

.doctor-talks-section .container {
    max-width: 1200px;
    margin: 0 auto;
}

/* ===================================
   SECTION HEADER
   =================================== */
.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-title {
    font-family: 'Playfair Display', serif;
    font-size: 2.5rem;
    font-weight: 700;
    color: #193C43;
    margin-bottom: 12px;
}

/* Gold accent text */
.gold-text {
    color: #D2AB6A;
}

/* Blue accent text */
.blue-text {
    color: #2c5aa0;
}

.section-subtitle {
    font-family: 'Inter', sans-serif;
    font-size: 1.1rem;
    color: rgb(90, 108, 125);
    line-height: 1.6;
    margin: 0;
}

/* ===================================
   VIDEO GRID
   =================================== */
.video-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-bottom: 60px;
}

/* ===================================
   VIDEO CARD
   =================================== */
.video-card {
    background: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

/* Hidden videos (initially hidden) */
.video-card.video-hidden {
    display: none;
}

/* Show videos with animation */
.video-card.video-show {
    display: flex;
    animation: slideDown 0.5s ease-out forwards;
}

.video-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
}

/* ===================================
   VIDEO THUMBNAIL
   =================================== */
.video-thumbnail-link {
    display: block;
    text-decoration: none;
    cursor: pointer;
}

.video-thumbnail {
    position: relative;
    width: 100%;
    padding-top: 90%; /* Taller aspect ratio to show more vertical image content */
    background: #f0f0f0;
    overflow: hidden;
}

.video-thumbnail img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.video-card:hover .video-thumbnail img,
.video-thumbnail-link:hover .video-thumbnail img {
    transform: scale(1.05);
}

/* Play Button Overlay */
.play-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: #2c5aa0;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 2;
}

.video-card:hover .play-button,
.video-thumbnail-link:hover .play-button {
    background: #2c5aa0;
    color: #ffffff;
    transform: translate(-50%, -50%) scale(1.1);
}

.play-button i {
    margin-left: 3px; /* Center the play icon visually */
}

/* Duration Badge */
.video-duration {
    position: absolute;
    bottom: 12px;
    right: 12px;
    background: rgba(0, 0, 0, 0.8);
    color: #ffffff;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.875rem;
    font-weight: 600;
    z-index: 2;
}

/* ===================================
   VIDEO CONTENT
   =================================== */
.video-content {
    padding: 24px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.video-title {
    font-family: 'Inter', sans-serif;
    font-size: 1.125rem;
    font-weight: 700;
    color: #2c5aa0;
    margin: 0 0 8px 0;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.video-date {
    font-size: 0.875rem;
    color: #999;
    margin: 0 0 12px 0;
}

.video-description {
    font-size: 0.9375rem;
    color: #666;
    line-height: 1.6;
    margin: 0 0 20px 0;
    flex-grow: 1;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ===================================
   WATCH BUTTON
   =================================== */
.watch-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #2c5aa0;
    color: #ffffff;
    padding: 12px 24px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9375rem;
    transition: all 0.3s ease;
    align-self: flex-start;
}

.watch-btn:hover {
    background: #234780;
    transform: translateX(4px);
}

.watch-btn i {
    transition: transform 0.3s ease;
}

.watch-btn:hover i {
    transform: translateX(4px);
}

/* ===================================
   SHOW MORE/LESS BUTTON
   =================================== */
.show-more-container {
    display: flex;
    justify-content: flex-end;
    margin: 30px 0;
    padding-right: 0;
}

.show-more-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: #2c5aa0;
    color: #ffffff;
    padding: 12px 28px;
    border: none;
    border-radius: 50px;
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(44, 90, 160, 0.3);
}

.show-more-btn:hover {
    background: #234780;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(44, 90, 160, 0.4);
}

.show-more-btn i {
    font-size: 0.875rem;
    transition: transform 0.3s ease;
}

.show-more-btn:hover i {
    transform: translateY(2px);
}

/* ===================================
   HOSPITAL GALLERY SECTION
   =================================== */
.hospital-gallery-section {
    background-color: #E6D9CC;
    background-image: radial-gradient(circle, rgba(44, 90, 160, 0.03) 1px, transparent 1px);
    background-size: 20px 20px;
    padding: 80px 20px;
    border-top: 3px solid #D2AB6A;
    border-bottom: 3px solid #D2AB6A;
    box-shadow: inset 0 10px 20px -10px rgba(0, 0, 0, 0.05);
}

.gallery-header {
    text-align: center;
    margin-bottom: 50px;
}

.gallery-title {
    font-family: 'Playfair Display', serif;
    font-size: 2rem;
    font-weight: 700;
    color: #193C43;
    margin-bottom: 12px;
}

.gallery-subtitle {
    font-size: 1.1rem;
    color: rgb(90, 108, 125);
    line-height: 1.6;
    margin: 0;
}

/* Gallery Tabs */
.gallery-tabs {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    margin-bottom: 50px;
}

.gallery-tab {
    padding: 12px 24px;
    border: none;
    border-radius: 50px;
    background: #d3ccc2;
    color: #333;
    font-family: 'Inter', sans-serif;
    font-size: 0.9375rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.gallery-tab:hover {
    background: #c4bdb3;
    transform: translateY(-2px);
}

.gallery-tab.active {
    background: #2c5aa0;
    color: #ffffff;
}

/* Gallery Grid */
.gallery-grid {
    display: none;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
    max-width: 900px;
    margin: 0 auto;
}

.gallery-grid.active {
    display: grid;
}

/* Gallery Item */
.gallery-item {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    aspect-ratio: 16 / 9;
}

.gallery-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.gallery-item:hover img {
    transform: scale(1.05);
}

/* Gallery Overlay */
.gallery-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0) 100%);
    padding: 20px;
    opacity: 0;
    transition: opacity 0.3s ease;
    display: flex;
    align-items: flex-end;
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

.gallery-label {
    color: #ffffff;
    font-size: 0.9375rem;
    font-weight: 600;
    text-align: center;
    width: 100%;
}

/* ===================================
   LIGHTBOX MODAL
   =================================== */
.gallery-lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.95);
    z-index: 10000;
    align-items: center;
    justify-content: center;
}

.gallery-lightbox.active {
    display: flex;
}

.lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.lightbox-content img {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 8px;
}

.lightbox-caption {
    color: #ffffff;
    text-align: center;
    margin-top: 20px;
}

.lightbox-caption h4 {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0 0 8px 0;
}

.lightbox-caption p {
    font-size: 0.9375rem;
    margin: 4px 0;
    opacity: 0.9;
}

/* Lightbox Controls */
.lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid #ffffff;
    color: #ffffff;
    font-size: 2.5rem;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    z-index: 10001;
}

.lightbox-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
}

.lightbox-prev,
.lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid #ffffff;
    color: #ffffff;
    font-size: 1.5rem;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10001;
}

.lightbox-prev {
    left: 30px;
}

.lightbox-next {
    right: 30px;
}

.lightbox-prev:hover,
.lightbox-next:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-50%) scale(1.1);
}

/* ===================================
   SOCIAL MEDIA SECTION
   =================================== */
.social-media-section {
    background: #F5F1ED;
    padding: 80px 20px;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.social-header {
    text-align: center;
    margin-bottom: 50px;
}

.social-title {
    font-family: 'Playfair Display', serif;
    font-size: 2rem;
    font-weight: 700;
    color: #193C43;
    margin-bottom: 12px;
}

.social-subtitle {
    font-size: 1.1rem;
    color: rgb(90, 108, 125);
    line-height: 1.6;
    margin: 0;
}

/* Social Buttons Grid */
.social-buttons-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
    max-width: 800px;
    margin: 0 auto;
}

/* Base Social Button */
.social-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 18px 28px;
    border-radius: 50px;
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    color: #ffffff;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.social-btn i {
    font-size: 1.25rem;
}

.social-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
}

/* Facebook Button */
.facebook-btn {
    background: #1877f2;
}

.facebook-btn:hover {
    background: #0c63d4;
}

/* Instagram Button */
.instagram-btn {
    background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
}

.instagram-btn:hover {
    background: linear-gradient(45deg, #e08423 0%, #d6582c 25%, #cc1733 50%, #bc1356 75%, #ac0878 100%);
}

/* YouTube Buttons */
.youtube-btn {
    background: #FF0000;
    flex-direction: row;
    gap: 10px;
    padding: 18px 24px;
}

.youtube-btn:hover {
    background: #CC0000;
}

.youtube-btn .btn-content {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    line-height: 1.2;
}

.youtube-btn .doctor-name {
    font-size: 0.9375rem;
    font-weight: 700;
    line-height: 1.2;
}

.youtube-btn .doctor-specialty {
    font-size: 0.75rem;
    font-weight: 400;
    opacity: 0.9;
    line-height: 1.2;
}

.youtube-btn i {
    font-size: 1.25rem;
    flex-shrink: 0;
}

/* ===================================
   RESPONSIVE DESIGN
   =================================== */

/* Tablet: 2 columns */
@media (max-width: 1024px) {
    .video-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 25px;
    }

    .section-title {
        font-size: 2.25rem;
    }

    .doctor-talks-section {
        padding: 60px 20px;
    }

    /* Show only first 3 videos on tablet (hide 4-12) */
    .video-card:nth-child(n+4):not(.video-show) {
        display: none !important;
    }

    .video-card:nth-child(n+4).video-show {
        display: flex !important;
    }
}

/* Tablet: Labels always visible */
@media (max-width: 1024px) {
    /* Gallery - Labels always visible on tablet */
    .gallery-overlay {
        opacity: 1;
        background: linear-gradient(to top, rgba(0, 0, 0, 0.75) 0%, rgba(0, 0, 0, 0) 100%);
    }
}

/* Mobile: 1 column */
/* Additional fix for screens below 769px to prevent viewport overflow */
@media (max-width: 768px) {
    /* Ensure body and html don't have horizontal overflow */
    body, html {
        overflow-x: hidden;
        max-width: 100vw;
    }
    
    /* Container width control */
    .container {
        max-width: 100vw;
        padding-left: 16px;
        padding-right: 16px;
        box-sizing: border-box;
    }
    .video-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .section-title {
        font-size: 2rem;
    }

    .section-subtitle {
        font-size: 1rem;
    }

    .doctor-talks-section {
        padding: 50px 16px;
    }

    .section-header {
        margin-bottom: 40px;
    }

    .video-title {
        font-size: 1.0625rem;
    }

    .play-button {
        width: 50px;
        height: 50px;
        font-size: 20px;
    }

    /* Align show more button to center on mobile */
    .show-more-container {
        justify-content: center;
    }

    /* Gallery Section - Mobile */
    .hospital-gallery-section {
        padding: 60px 16px;
    }

    .gallery-title {
        font-size: 1.75rem;
    }

    .gallery-subtitle {
        font-size: 1rem;
    }

    /* Horizontal scrolling tabs - Fixed for viewport overflow */
    .gallery-tabs {
        justify-content: flex-start;
        overflow-x: auto;
        overflow-y: hidden;
        flex-wrap: nowrap;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none; /* Firefox */
        -ms-overflow-style: none; /* IE/Edge */
        padding-bottom: 10px;
        max-width: 100vw; /* Prevent viewport overflow */
        box-sizing: border-box; /* Include padding in width calculation */
        margin-left: 0;
        margin-right: 0;
    }

    .gallery-tabs::-webkit-scrollbar {
        display: none; /* Chrome/Safari */
    }

    .gallery-tab {
        flex-shrink: 0;
        font-size: 0.875rem;
        padding: 10px 20px;
        white-space: nowrap; /* Prevent text wrapping */
    }

    /* Gallery grid - 1 column */
    .gallery-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    /* Labels always visible on mobile */
    .gallery-overlay {
        opacity: 1;
        background: linear-gradient(to top, rgba(0, 0, 0, 0.75) 0%, rgba(0, 0, 0, 0) 100%);
    }

    /* Lightbox adjustments */
    .lightbox-close {
        top: 10px;
        right: 10px;
        width: 40px;
        height: 40px;
        font-size: 2rem;
    }

    .lightbox-prev,
    .lightbox-next {
        width: 40px;
        height: 40px;
        font-size: 1.25rem;
    }

    .lightbox-prev {
        left: 10px;
    }

    .lightbox-next {
        right: 10px;
    }

    .lightbox-caption h4 {
        font-size: 1.125rem;
    }

    .lightbox-caption p {
        font-size: 0.875rem;
    }

    /* Social Media Section - Mobile */
    .social-buttons-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .social-media-section {
        padding: 60px 16px;
    }

    .social-title {
        font-size: 1.75rem;
    }

    .social-subtitle {
        font-size: 1rem;
    }

    .social-btn {
        padding: 16px 24px;
    }
}

/* Small mobile adjustments */
@media (max-width: 480px) {
    .section-title {
        font-size: 1.75rem;
    }

    .video-content {
        padding: 20px;
    }

    .watch-btn {
        width: 100%;
        justify-content: center;
    }
}

/* ===================================
   ANIMATIONS
   =================================== */
/* Slide down animation for show more */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Fade in up animation on scroll */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.video-card {
    animation: fadeInUp 0.6s ease-out;
}

/* Stagger animation for cards */
.video-card:nth-child(1) { animation-delay: 0.05s; }
.video-card:nth-child(2) { animation-delay: 0.1s; }
.video-card:nth-child(3) { animation-delay: 0.15s; }
.video-card:nth-child(4) { animation-delay: 0.2s; }
.video-card:nth-child(5) { animation-delay: 0.25s; }
.video-card:nth-child(6) { animation-delay: 0.3s; }
.video-card:nth-child(7) { animation-delay: 0.35s; }
.video-card:nth-child(8) { animation-delay: 0.4s; }
.video-card:nth-child(9) { animation-delay: 0.45s; }
.video-card:nth-child(10) { animation-delay: 0.5s; }
.video-card:nth-child(11) { animation-delay: 0.55s; }
.video-card:nth-child(12) { animation-delay: 0.6s; }

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
    .video-card {
        animation: none;
    }
    
    .video-card:hover {
        transform: none;
    }
    
    .video-thumbnail img {
        transition: none;
    }
}

