/* Scoped styles for the Videos page under parent ID */
#videos-page {
    font-family: 'Raleway', 'Roboto', sans-serif;
    background-color: #f7faf8;
    color: #333333;
    padding-bottom: 0;
    overflow-x: hidden;
}

/* ==========================================================================
   1. Hero Banner
   ========================================================================== */
#videos-page .videos-hero {
    position: relative;
    background-image: linear-gradient(rgba(10, 48, 20, 0.88), rgba(10, 48, 20, 0.88)), url('../../images/about/about_hero_bg.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    padding: 100px 0 90px;
    text-align: center;
    color: #ffffff;
}

#videos-page .videos-hero h1 {
    font-family: 'Playfair Display', serif;
    font-size: 3.5rem;
    font-weight: 700;
    letter-spacing: 2px;
    margin-bottom: 12px;
    text-transform: uppercase;
}

#videos-page .videos-hero .hero-underline {
    width: 90px;
    height: 4px;
    background-color: #ffcc00;
    margin: 0 auto 22px;
    border-radius: 2px;
}

#videos-page .videos-hero p {
    font-size: 1.3rem;
    max-width: 800px;
    margin: 0 auto;
    font-weight: 400;
    line-height: 1.8;
}

#videos-page .videos-hero .hero-subtext {
    font-size: 1.15rem;
    margin-top: 10px;
    opacity: 0.9;
}

/* ==========================================================================
   2. Video Grid Section
   ========================================================================== */
#videos-page .video-grid-section {
    padding: 3px 0 85px;
}

#videos-page .video-card {
    background-color: #ffffff;
    border: 1px solid #e2ece5;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.02);
    transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1), 
                box-shadow 0.3s ease, 
                border-color 0.3s ease;
    display: block;
    text-decoration: none;
}

#videos-page .video-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(11, 60, 22, 0.08);
    border-color: #b3d4bc;
}

/* Thumbnail and Badge Overlay */
#videos-page .video-thumbnail-container {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background-color: #0b3c16;
    overflow: hidden;
}

#videos-page .video-thumbnail-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

#videos-page .video-card:hover .video-thumbnail-container img {
    transform: scale(1.05);
}

/* YouTube Center Play Button Overlay */
#videos-page .play-btn-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s ease;
    z-index: 2;
}

#videos-page .video-card:hover .play-btn-overlay {
    background-color: rgba(0, 0, 0, 0.3);
}

#videos-page .play-icon {
    width: 46px;
    height: 46px;
    background-color: rgba(229, 9, 20, 0.95); /* YouTube Red */
    color: #ffffff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    box-shadow: 0 4px 12px rgba(229, 9, 20, 0.4);
    transform: scale(0.9);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), 
                background-color 0.3s ease, 
                box-shadow 0.3s ease;
    padding-left: 4px; /* Align play triangle visually */
}

#videos-page .video-card:hover .play-icon {
    transform: scale(1.1);
    background-color: #ff0000;
    box-shadow: 0 6px 20px rgba(255, 0, 0, 0.6);
}

/* Watch on YouTube Badge */
#videos-page .youtube-badge {
    position: absolute;
    bottom: 12px;
    left: 12px;
    background-color: rgba(23, 23, 23, 0.85);
    color: #ffffff;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 6px;
    z-index: 3;
    letter-spacing: 0.5px;
    transition: background-color 0.2s ease;
}

#videos-page .youtube-badge i {
    color: #ff0000;
    font-size: 0.9rem;
}

#videos-page .video-card:hover .youtube-badge {
    background-color: #171717;
}

/* Video Information Text styling */
#videos-page .video-info {
    padding: 20px;
}

#videos-page .video-title {
    font-size: 19px;
    font-weight: 700;
    color: #0b3c16;
    margin-bottom: 14px;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: 3.0em;
    text-align: center;
}

#videos-page .video-metadata {
    display: flex;
    justify-content: center;
    font-size: 0.85rem;
    color: #777777;
    border-top: 1px solid #edf2ee;
    padding-top: 12px;
}

#videos-page .meta-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

#videos-page .meta-item i {
    color: #5c8f69;
}

/* ==========================================================================
   3. CTA Join Us Banner
   ========================================================================== */
#videos-page .cta-banner {
    background-color: #ffdf7a;
    padding: 30px 0;
    border-top: 1px solid #ffd452;
}

#videos-page .cta-icon {
    font-size: 1.8rem;
    color: #0b3c16;
}

#videos-page .cta-text {
    font-size: 1.4rem;
    font-weight: 700;
    color: #2b2b2b;
    margin: 0;
}

#videos-page .cta-btn {
    background-color: #0b3c16;
    color: #ffffff;
    font-size: 1rem;
    font-weight: 700;
    padding: 12px 36px;
    border-radius: 30px;
    text-decoration: none;
    display: inline-block;
    box-shadow: 0 4px 8px rgba(11, 60, 22, 0.15);
    transition: all 0.2s ease;
    border: 2px solid transparent;
}

#videos-page .cta-btn:hover {
    background-color: #ffffff;
    color: #0b3c16;
    border-color: #0b3c16;
    box-shadow: 0 6px 15px rgba(11, 60, 22, 0.22);
}

/* ==========================================================================
   4. Video Lightbox Modal (Autoplay support)
   ========================================================================== */
#videos-page .video-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(5px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    padding: 20px;
}

#videos-page .video-modal.active {
    display: flex;
}

#videos-page .modal-content {
    background-color: #000000;
    max-width: 900px;
    width: 100%;
    aspect-ratio: 16 / 9;
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    animation: modalReveal 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

@keyframes modalReveal {
    from {
        transform: scale(0.9);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

#videos-page .ratio {
    position: relative;
    width: 100%;
    height: 100%;
}

#videos-page .ratio iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

#videos-page .modal-close {
    position: absolute;
    top: 30px;
    right: 35px;
    font-size: 2.5rem;
    color: #dddddd;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 100;
    transition: color 0.2s ease, transform 0.2s ease;
}

#videos-page .modal-close:hover {
    color: #ffffff;
    transform: scale(1.1);
}

@media (max-width: 767px) {
    #videos-page .modal-close {
        top: 15px;
        right: 20px;
        font-size: 2rem;
    }
}
