/* --- BASIC PAGE SETUP --- */
body {
    background-color: #ffffff;
    color: black;
    font-family: "Jost", sans-serif; /* Changed to your custom font! */
    margin: 0;
}

/* --- THE MAIN LAYOUT --- */
.container {
    display: flex;     
    height: 100vh;     
}

/* --- LEFT SIDE (MENU) --- */
.sidebar {
    width: 20%;        
    padding: 50px;     
    box-sizing: border-box; 
    
    /* NEW: These 3 lines push the menu perfectly into the vertical center */
    display: flex;
    flex-direction: column;
    justify-content: center; 
}

/* Styling the menu list */
.sidebar ul {
    list-style-type: none; 
    padding: 0;
    margin: 0;
}

/* NEW: Controls the spacing between menu items */
.sidebar li {
    margin-bottom: 8px; /* Change this number to make spacing even thinner/wider */
}

/* Styling the links */
.sidebar a {
    text-decoration: none; 
    color: black;
    font-size: 18px;
    font-weight: 400; /* Use 300 for thinner text, or 600 for bolder text */
}

.sidebar a:hover {
    color: gray; /* Turns text gray when mouse hovers over it */
}

/* Active link styling */
.sidebar a.active {
    font-weight: 600; 
    color: black;
}

/* --- RIGHT SIDE (CONTENT) --- */
.content {
    width: 80%;        
    padding: 50px;
    box-sizing: border-box;
    overflow-y: auto;  
}

/* Making headings a bit lighter to match minimalist videography style */
.content h1 {
    font-weight: 300; 
}

/* Styling the image */
.content img {
    max-width: 100%;   
    height: auto;      
    margin-top: 20px;  
}

/* --- VIDEO GRID LAYOUT --- */
.video-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* Creates 2 equal columns */
    gap: 30px; /* Space between thumbnails */
    margin-top: 40px;
}

/* --- VIDEO THUMBNAILS --- */
.video-thumbnail {
    position: relative;
    display: block; 
    aspect-ratio: 16 / 9; /* Forces a perfect 16:9 cinematic ratio */
    overflow: hidden; 
    border-radius: 6px; 
    text-decoration: none;
    background-color: #000; /* Changed to true black (#000) for seamless black bars! */
}

/* Reset image margin and make it fit the 16:9 box without cropping */
.video-thumbnail img {
    margin-top: 0 !important; 
    width: 100%;
    height: 100%;
    object-fit: contain; /* MAGIC WORD: Changes it from cropping to fitting! */
    transition: transform 0.6s ease, filter 0.6s ease;
}

/* --- VIDEO TITLE OVERLAY --- */
.video-title {
    position: absolute;
    top: 50%;
    left: 50%;
    /* Initially positioned slightly lower so it can slide up */
    transform: translate(-50%, -35%); 
    width: 90%; /* Keeps long titles from touching the edges */
    text-align: center;
    color: white;
    font-size: 24px;
    font-weight: 300; /* Keeps the minimalist, cinematic font weight */
    letter-spacing: 1px;
    opacity: 0; /* Hidden by default */
    transition: opacity 0.5s ease, transform 0.5s ease;
    z-index: 2; /* Keeps text above the image */
}

/* --- HOVER ANIMATIONS --- */
.video-thumbnail:hover img {
    transform: scale(1.05); /* Slow, subtle zoom-in */
    /* Darkens image a bit more (0.4) so the white text is easy to read */
    filter: brightness(0.4); 
}

.video-thumbnail:hover .video-title {
    opacity: 1; /* Fades the text in */
    /* Slides the text up perfectly into the center */
    transform: translate(-50%, -50%); 
}

/* --- RESPONSIVE FIX FOR SMALLER SCREENS (PHONES & TABLETS) --- */
@media (max-width: 900px) {

    /* 1. Stack the layout vertically instead of left-to-right */
    .container {
        flex-direction: column;
    }

    /* 2. Move the sidebar to the top and make it full width */
    .sidebar {
        width: 100%;
        padding: 20px; /* Reduces the huge padding for mobile */
        border-bottom: 1px solid #eee; /* Optional: adds a subtle line under the menu */
    }

    /* 3. Make the menu items sit horizontally side-by-side */
    .sidebar ul {
        display: flex;
        flex-wrap: wrap; /* Allows links to wrap to a second line on super tiny phones */
        justify-content: center; /* Centers the links on the screen */
        gap: 25px; /* Adds space between the links */
    }

    /* Remove the vertical spacing we used for desktop */
    .sidebar li {
        margin-bottom: 0; 
    }

    /* 4. Make the content section full width and let it take the remaining height */
    .content {
        width: 100%;
        padding: 30px 20px; /* Adjusts padding so text isn't touching the screen edges */
        flex: 1; /* Tells it to fill up whatever space is left under the top menu */
    }

    /* 5. Keep the video grid single-column on phones */
    .video-grid {
        grid-template-columns: 1fr; 
    }
}

/* --- YOUTUBE VIDEO MODAL (LIGHTBOX) --- */
.modal {
    display: none; /* Hidden by default */
    position: fixed;
    z-index: 1000; /* Stays on top of everything */
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85); /* Dark semi-transparent background */
    backdrop-filter: blur(5px); /* Cinematic blur effect */
    align-items: center; /* Centers vertically */
    justify-content: center; /* Centers horizontally */
}

/* The box containing the video */
.modal-content {
    position: relative;
    width: 80%; /* Pretty big, but not fullscreen */
    max-width: 1100px; /* Stops it from getting excessively huge on massive monitors */
    background: #000;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

/* Forces perfect 16:9 aspect ratio */
.iframe-container {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 Math (9 / 16 = 0.5625) */
    height: 0;
    overflow: hidden;
    border-radius: 8px;
}

/* The actual YouTube embed */
.iframe-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* The 'X' Close Button */
.close-modal {
    position: absolute;
    top: -40px;
    right: 0;
    color: #fff;
    font-size: 35px;
    font-weight: 100;
    cursor: pointer;
    transition: color 0.3s ease;
}

.close-modal:hover {
    color: #aaa;
}

/* Mobile adjustments for the modal */
@media (max-width: 900px) {
    .modal-content {
        width: 95%; /* Make it wider on small phone screens */
    }
}

/* --- SLIDESHOW CROSSFADE IMAGES --- */
.slide-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain; /* Keeps the cinematic black bars */
    opacity: 0; /* Hidden by default */
    z-index: 1; /* Sits above the base thumb.jpg, but below the title */
    pointer-events: none; /* Stops it from blocking your clicks */

    /* The magic crossfade: 0.8 seconds to fade in/out smoothly */
    transition: transform 0.6s ease, filter 0.6s ease, opacity 0.8s ease-in-out !important;
}

/* Forces the title to ALWAYS stay on top of the fading images */
.video-title {
    z-index: 2 !important; 
}