/*
Theme Name: Video Library
Description: Custom video library theme
Version: 1.0
*/

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: #f8f9fa;
    color: #152549;
    line-height: 1.6;
    margin: 0 !important;
    padding: 0 !important;
}

/* Header Styles - OPTIMIZED */
.header {
    background-color: #152549;
    color: white;
    padding: 1rem 2rem;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    height: 60px;
}

.header-content {
    display: flex;
    justify-content: flex-start; /* Changed from center to flex-start */
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    height: 100%;
    padding-left: 2rem; /* Add some left padding */
}


/* Logo Styling - ENHANCED WITH IMAGE SUPPORT */
.logo {
    font-size: 1.5rem;
    font-weight: 600;
    color: #85C9D3;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.logo-image {
    height: 40px;
    width: auto;
    max-width: 200px;
    object-fit: contain;
    display: none; /* hidden initially */
    filter: brightness(1.1) contrast(1.1);
}

.logo-text {
    font-size: 1.5rem;
    font-weight: 600;
    color: #85C9D3;
    display: block; /* visible initially */
}

.logo-image[style*="display: block"] + .logo-text {
    display: none !important; /* hide text if image shows */
}

@media (max-width: 768px) {
    .logo-image {
        height: 35px;
        max-width: 150px;
    }
    
    .logo-text {
        font-size: 1.3rem;
    }
}

/* Sidebar Menu - OPTIMIZED */
.sidebar {
    width: 350px !important;
    background-color: #152549 !important;
    color: white !important;
    padding: 1.5rem !important;
    overflow-y: auto !important;
    position: fixed !important;
    left: 0 !important;
    top: 60px !important;
    height: calc(100vh - 60px) !important;
    z-index: 999 !important;
    display: block !important;
    visibility: visible !important;
}

.sidebar h2 {
    color: #85C9D3;
    margin-bottom: 1.5rem;
    font-size: 1.3rem;
    text-align: center;
    padding-bottom: 1rem;
    border-bottom: 2px solid #6D84C2;
}

/* VIDEO MENU - FULL TITLE VERSION */
.video-menu-section {
    margin-bottom: 2rem;
}

.video-menu-section h3 {
    color: #8DA5DB;
    font-size: 1rem;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.video-menu {
    list-style: none;
    max-height: 60vh;
    overflow-y: auto;
    padding-right: 0.5rem;
}

.video-menu-item {
    margin-bottom: 0.5rem;
    padding: 1.2rem;
    background-color: rgba(255,255,255,0.08);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    border-left: 4px solid transparent;
}

.video-menu-item:hover {
    background-color: rgba(255,255,255,0.15);
    border-left-color: #85C9D3;
    transform: translateX(5px);
}

.video-menu-item.active {
    background-color: #6D84C2;
    border-left-color: #EE9D38;
}

.video-menu-content {
    width: 100%;
}

.video-menu-content h4 {
    color: #ffffff;
    font-size: 0.9rem;
    margin: 0;
    font-weight: 600;
    line-height: 1.5;
    text-align: left;
    word-wrap: break-word;
    hyphens: auto;
}

.video-menu-item:hover .video-menu-content h4 {
    color: #85C9D3;
}

.video-menu-item.active .video-menu-content h4 {
    color: #ffffff;
}

/* Hero Section - WHITE BACKGROUND */
.hero {
    background: #ffffff; /* Changed from gradient to white */
    color: #152549; /* Changed text color to dark for contrast */
    padding: 2rem;
    margin-bottom: 0;
    text-align: left;
    min-height: calc(100vh - 60px);
    display: flex;
    flex-direction: column;
}

.hero h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: #152549; /* Changed from #85C9D3 to dark blue */
}

/* Adjust main paragraph spacing */
.hero p {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    color: #333;
    max-width: 700px;
    line-height: 1.6;
    /* Removed margin-left: auto and margin-right: auto */
}
/* Override for intro box paragraphs to ensure left alignment */
.homepage-intro-box p {
    text-align: left !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    font-size: 1.15rem;
    color: #222;
    margin-bottom: 1.2rem;
    max-width: none; /* Remove max-width constraint */
}

/* VIDEO TILES GRID - FIXED WHITESPACE ISSUES */
.video-tiles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    max-width: 1200px;
    margin: 0 auto 3rem auto; /* Added bottom margin for spacing from CTA */
    padding: 0 1rem;
    flex: 1;
}

.video-tile {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    display: flex; /* FIXED - Use flexbox to prevent whitespace */
    flex-direction: column;
    height: auto; /* Let content determine height */
}

.video-tile:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
}

.video-tile-thumbnail {
    position: relative;
    width: 100%;
    height: 180px; /* Fixed height for consistent layout */
    overflow: hidden;
    background: #f0f0f0;
    flex-shrink: 0; /* Don't shrink thumbnail */
}

.video-tile-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.video-tile:hover .video-tile-thumbnail img {
    transform: scale(1.05);
}

/* Enhanced placeholder for videos without thumbnails */
.no-thumbnail {
    width: 100%;
    height: 180px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #f8f9fa;
    color: #666;
    border: 2px dashed #ddd;
}

.video-icon {
    font-size: 3rem;
    margin-bottom: 0.5rem;
    opacity: 0.7;
}

.placeholder-text {
    font-size: 0.9rem;
    font-style: italic;
}

.play-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.video-tile:hover .play-overlay {
    opacity: 1;
}

.play-icon {
    color: white;
    font-size: 3rem;
    margin-bottom: 0.5rem;
}

.video-type-badge {
    background: rgba(255, 255, 255, 0.9);
    color: #152549;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.video-type-badge.storylane {
    background: #6D84C2;
    color: white;
}

.video-type-badge.youtube {
    background: #ff0000;
    color: white;
}

/* FIXED TILE CONTENT - Remove excessive whitespace */
.video-tile-content {
    padding: 1.5rem;
    color: #152549;
    flex: 1; /* Take remaining space */
    display: flex;
    flex-direction: column;
    justify-content: space-between; /* Distribute space evenly */
}

.video-tile-content h3 {
    font-size: 1.1rem;
    margin-bottom: 0.75rem; /* Reduced margin */
    font-weight: 600;
    line-height: 1.3;
    flex-shrink: 0; /* Don't shrink title */
}

.video-tile-content p {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 1rem;
    line-height: 1.4;
    flex: 1; /* Take available space but don't create excess */
    display: -webkit-box;
    -webkit-line-clamp: 3; /* Limit to 3 lines */
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Hide empty paragraphs to prevent whitespace */
.video-tile-content p:empty {
    display: none;
    margin: 0;
}

.video-tile-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    color: #888;
    flex-shrink: 0; /* Don't shrink meta info */
    margin-top: auto; /* Push to bottom */
}

.video-date {
    font-weight: 500;
}

.video-type-label {
    background: #8DA5DB;
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

/* FLOATING CTA BUTTON - REPOSITIONED BELOW TILES */
/* Center align the CTA button */
.floating-cta {
    position: relative;
    margin-top: 2rem;
    margin-bottom: 2rem;
    z-index: 10;
    text-align: center; /* Center the CTA button */
}


.cta-button {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    background: linear-gradient(45deg, #EE9D38, #f4b965);
    color: white;
    padding: 1rem 2rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
    box-shadow: 0 8px 25px rgba(238, 157, 56, 0.3);
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.cta-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(238, 157, 56, 0.4);
    background: linear-gradient(45deg, #f4b965, #EE9D38);
    color: white;
    text-decoration: none;
}

.cta-icon {
    font-size: 1.2rem;
}

.cta-arrow {
    transition: transform 0.3s ease;
}

.cta-button:hover .cta-arrow {
    transform: translateX(3px);
}

/* FULLSCREEN VIDEO STYLES - WHITE BACKGROUND */
.video-content-container.fullscreen-video {
    position: fixed;
    top: 60px;
    left: 350px;
    width: calc(100vw - 350px);
    height: calc(100vh - 60px);
    background: #ffffff; /* Changed from #000 to white */
    z-index: 998;
    display: none;
}

.video-content-container.fullscreen-video.active {
    display: block;
}

.fullscreen-video-container {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    background: #ffffff; /* Changed from #000 to white */
}

.video-header {
    background: rgba(255, 255, 255, 0.95); /* Changed from black to white */
    padding: 1rem 2rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    z-index: 10;
    position: relative;
    border-bottom: 1px solid #eee; /* Added subtle border */
}

.back-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background-color: #8DA5DB;
    color: white;
    padding: 0.75rem 1.5rem;
    text-decoration: none;
    border-radius: 6px;
    transition: background-color 0.3s;
    border: none;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 500;
}

.back-button:hover {
    background-color: #6D84C2;
    color: white;
}

.video-title {
    color: #152549; /* Changed from white to dark blue */
    font-size: 1.5rem;
    margin: 0;
    font-weight: 600;
    flex: 1;
}

.fullscreen-video-player {
    flex: 1;
    position: relative;
    background: #ffffff; /* Changed from #000 to white */
}

/* YouTube Fullscreen */
.youtube-fullscreen {
    width: 100%;
    height: 100%;
    position: relative;
}

.youtube-fullscreen iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* Storylane Fullscreen */
.storylane-fullscreen {
    width: 100%;
    height: 100%;
    position: relative;
    background: #fff;
}

.storylane-fullscreen iframe {
    width: 100%;
    height: 100%;
    border: none;
}

.no-video-message {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: white;
    font-size: 1.2rem;
}

.video-summary-section {
    background: rgba(255, 255, 255, 0.95);
    padding: 1rem 2rem;
    max-height: 150px;
    overflow-y: auto;
}

.summary-content h3 {
    color: #152549;
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.summary-content p {
    color: #666;
    line-height: 1.5;
    margin: 0;
}

/* Custom Scrollbar for Video Menu */
.video-menu::-webkit-scrollbar {
    width: 6px;
}

.video-menu::-webkit-scrollbar-track {
    background: rgba(255,255,255,0.1);
    border-radius: 3px;
}

.video-menu::-webkit-scrollbar-thumb {
    background: #6D84C2;
    border-radius: 3px;
}

.video-menu::-webkit-scrollbar-thumb:hover {
    background: #8DA5DB;
}

/* Utility Classes */
.hidden {
    display: none;
}

.fade-in {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* LAYOUT FIX - OVERRIDE ANY CONFLICTS */
body {
    margin: 0 !important;
    padding: 0 !important;
    overflow-x: hidden !important;
}

.main-container {
    display: flex !important;
    margin-top: 60px !important;
    min-height: calc(100vh - 60px) !important;
    padding: 0 !important;
    width: 100vw !important;
    position: relative !important;
}

.sidebar {
    position: fixed !important;
    left: 0 !important;
    top: 60px !important;
    width: 350px !important;
    height: calc(100vh - 60px) !important;
    z-index: 999 !important;
    overflow-y: auto !important;
}

.content-area {
    margin-left: 350px !important;
    width: calc(100vw - 350px) !important;
    min-height: calc(100vh - 60px) !important;
    padding: 0 !important;
    position: relative !important;
    overflow-x: hidden !important;
}

/* Responsive Design */
@media (max-width: 768px) {
    .sidebar {
        width: 100%;
        position: static;
        height: auto;
    }
    
    .content-area {
        margin-left: 0;
        width: 100%;
    }
    
    .main-container {
        flex-direction: column;
    }
    
    .hero h1 {
        font-size: 2rem;
    }
    
    .video-tiles-grid {
        grid-template-columns: 1fr;
        margin-bottom: 2rem;
    }
    
    .video-content-container.fullscreen-video {
        left: 0;
        width: 100vw;
    }
    
    .video-title {
        font-size: 1.2rem;
    }
    
    .floating-cta {
        margin-top: 1.5rem;
        margin-bottom: 1.5rem;
    }
    
    .cta-button {
        padding: 0.8rem 1.5rem;
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .video-header {
        padding: 0.5rem 1rem;
        flex-direction: column;
        gap: 0.5rem;
        align-items: flex-start;
    }
    
    .video-title {
        font-size: 1rem;
    }
    
    .back-button {
        padding: 0.5rem 1rem;
        font-size: 0.8rem;
    }
    
    .video-tile-content {
        padding: 1.25rem;
    }
    
    .floating-cta {
        margin-top: 1rem;
        margin-bottom: 1rem;
    }
}

/* ===== Global Footer Styling ===== */
.site-footer {
    position: fixed; /* Stays fixed at bottom */
    bottom: 0;
    left: 0;
    width: 100vw; /* Full viewport width */
    background-color: #152549;
    color: #85C9D3;
    text-align: center;
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 1000; /* Stay above main content */
}

.footer-content {
    max-width: 100%;
    margin: 0 auto;
}

/* Prevent page content from hiding behind footer */
body {
    padding-bottom: 50px; /* Same or slightly larger than footer height */
}

/* ===== HAMBURGER MENU BUTTON ===== */
#hamburger-toggle {
    display: none; /* default hidden */
    background: none;
    border: none;
    font-size: 2rem;
    color: white;
    cursor: pointer;
    z-index: 1100;
}

@media (max-width: 768px) {
    #hamburger-toggle {
        display: block;
        position: absolute;
        left: 15px;
        top: 10px;
    }

    /* Sidebar hidden by default on mobile */
    .sidebar {
        transform: translateX(-100%);
        position: fixed !important;
        top: 60px !important;
        left: 0 !important;
        width: 250px !important;
        height: calc(100vh - 60px) !important;
        background-color: #152549;
        transition: transform 0.3s ease-in-out;
        z-index: 1001;
    }

    /* Sidebar visible when active */
    .sidebar.active {
        transform: translateX(0);
    }

    /* Overlay when menu open */
    body.menu-active::before {
        content: "";
        position: fixed;
        top: 60px;
        left: 0;
        width: 100vw;
        height: calc(100vh - 60px);
        background: rgba(0, 0, 0, 0.4);
        z-index: 1000;
    }

    /* Adjust content area to take full width on mobile */
    .content-area {
        margin-left: 0 !important;
        width: 100% !important;
    }
}

@media (min-width: 769px) {
    /* Ensure sidebar always visible on desktop */
    .sidebar {
        transform: translateX(0) !important;
        position: fixed !important;
    }
}

/* Homepage Features List */
.hero .homepage-features {
    list-style-type: disc;
    max-width: 700px;
    margin: 1.5rem auto 3rem auto;
    padding-left: 2rem;
    color: #333;
    font-size: 1rem;
    line-height: 1.6;
    text-align: left  !important;
}

.hero .homepage-features li {
    margin-bottom: 0.75rem;
    font-weight: 500;
}

.hero .homepage-features li:last-child {
    margin-bottom: 0;
}

/* Adjust main paragraph spacing */
.hero p {
    font-size: 1.1rem;
    margin-bottom: 1.5rem; /* Reduced from 3rem to 1.5rem */
    color: #333; /* Changed from #666 to darker for better contrast */
    max-width: 700px; /* Increased from 600px */
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
}


/* ====== Homepage Intro Box - Full Width ====== */
.homepage-intro-box {
    background: #f6f9fc;
    border-radius: 16px;
    box-shadow: 0 2px 12px rgba(100,140,180,0.06);
    width: 100%;
    margin: 0.2rem 0 1rem 0; /* Reduced top/bottom margins */
    padding: 0.5rem 1.5rem 0.5rem 1.5rem; /* Reduced padding all around */
    box-sizing: border-box;
    text-align: left !important;
}


.homepage-intro-lead {
    text-align: left !important;
    margin-bottom: 1.2rem;
    color: #222;
    font-size: 1.15rem;
    line-height: 1.6;
}

.homepage-intro-box h1 {
    color: #152549;
    margin-bottom: 0.8rem; /* Reduced from 1.4rem */
    text-align: left;
    font-size: 1.8rem; /* Slightly smaller */
    
}

.homepage-intro-box p {
    font-size: 0.95rem; /* Slightly smaller */
    color: #222;
    margin-bottom: 0.6rem; /* Reduced from 1rem */
    line-height: 1.4; /* Tighter line spacing */
     text-align: left;
}

.homepage-intro-box .homepage-features {
    font-size: 0.85rem; /* Smaller text */
    line-height: 1.4; /* Tighter spacing */
    margin-top: 0.2rem; /* Minimal top margin */
    padding-left: 0.2rem; /* Reduced indent */
}

.homepage-intro-box .homepage-features li {
    margin-bottom: 0.4rem; /* Reduced spacing between bullets */
}

.homepage-intro-box .homepage-features li:last-child {
    margin-bottom: 0;
}

@media (max-width: 768px) {
    .homepage-intro-box {
        padding: 1.2rem 0.7rem;
        border-radius: 10px;
    }
}

/* ===== Category Styling ===== */
/* Category header styling */
.video-category-section {
    margin-bottom: 2rem;
}

.category-header {
    background: #6D84C2; /* Contrast background color */
    color: #ffffff;
    font-size: 0.9rem;
    margin-bottom: 1rem;
    padding: 0.8rem 1rem;
   /* text-transform: capitalize; */
    letter-spacing: 1px;
    border-radius: 6px;
    font-weight: 600;
    text-align: center;
}

.category-videos {
    list-style: none;
    margin-bottom: 1.5rem;
}

.category-videos .video-menu-item {
    margin-bottom: 0.5rem;
    padding: 1rem;
    background-color: rgba(255,255,255,0.05); /* Lighter background for items */
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
}

.category-videos .video-menu-item:hover {
    background-color: rgba(255,255,255,0.12);
    border-left-color: #85C9D3;
    transform: translateX(3px);
}
/* Sidebar logo styling */
.sidebar-logo {
    display: block;
    text-align: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #6D84C2;
}

.sidebar-logo .logo-image {
    max-width: 180px;
    height: auto;
    display: block;
    margin: 0 auto;
}

.sidebar-logo .logo-text {
    color: #85C9D3;
    font-size: 1.3rem;
    font-weight: 600;
    display: block;
}

/* Clean up header without logo */
.header-content {
    justify-content: flex-start;
    padding-left: 2rem;
}


/* Move homepage intro box closer to top header */
.hero {
    padding-top: 0.5rem !important; /* Reduced from 2rem */
}

.homepage-intro-box {
    margin-top: 0 !important; /* No top margin */
    text-align: left !important;
}
.homepage-intro-box * {
    text-align: left !important;
}

/* Fix missing bullet points for homepage intro features */
.homepage-intro-box .homepage-features {
    list-style-type: disc !important;
    padding-left: 1.5rem !important;
    margin-left: 0 !important;
    display: block !important;
}

.homepage-intro-box .homepage-features li {
    list-style: disc !important;
    list-style-position: outside !important;
    margin-left: 0 !important;
    padding-left: 0 !important;
    display: list-item !important;
}

/* Responsive paragraph that doesn't get cut off on any device */
.homepage-intro-box p.homepage-intro-lead {
    white-space: normal !important; /* Allow text wrapping */
    overflow: visible !important; /* Show all text */
    text-overflow: clip !important; /* No ellipsis cutoff */
    width: 100% !important;
    max-width: 100% !important;
    font-size: 1rem !important;
    color: #222 !important;
    text-align: left !important; /* Left align for better readability */
    margin: 0.5rem 0 1rem 0 !important;
    margin-left: 0 !important; /* Force left margin to 0 */
    margin-right: auto !important; /* Push to left */
    line-height: 1.5 !important;
    word-wrap: break-word !important; /* Break long words if needed */
    padding-left: 0 !important; /* Remove any left padding */
    display: block !important; /* Ensure block display */
}


/* Optional: Center align on larger screens if preferred */
@media (min-width: 1024px) {
    .homepage-intro-box p.homepage-intro-lead {
        text-align: left !important;
    }
}

/* Ensure smaller font on mobile for better fit */
@media (max-width: 768px) {
    .homepage-intro-box p.homepage-intro-lead {
        font-size: 0.9rem !important;
        text-align: left !important;
    }
}

/* RAPS 2025 Quiz Banner Styling */
.quiz-banner {
    display: block;
    background-color: #EE9D38; /*#0a1936; /* Dark background */
    color: #ffffff; /* Light text */
    padding: 0.5rem 1rem;
    margin: 0.1rem auto 1.5rem auto; /* Top, auto left/right, bottom */
    text-align: center;
    text-decoration: none;
    font-weight: 600;
    border-radius: 8px;
    max-width: 95%; /* Responsive width */
    width: 960px; /* Max width for larger screens */
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.quiz-banner:hover {
    background-color: #152549; /* Slightly lighter on hover */
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.25);
    color: #ffffff;
}

/* Responsive adjustments for smaller screens */
@media (max-width: 768px) {
    .quiz-banner {
        font-size: 0.9rem;
        padding: 0.6rem;
    }
}





