.container{
    padding-top: 3rem; 
}
.imghost{
    display: grid; /* Establishes a grid container */
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); /* Creates a responsive grid with columns that are at least 300px wide */
    gap: 2rem; /* Adds space between grid items */
    padding: 2rem; /* Adds padding inside the grid container */
    max-width: 1200px; /* Sets a maximum width for the content */
    margin: 0 auto; /* Centers the grid container on the page */
}
.image{
    width: 100%; /* Makes the media fill the container's width */
    height: 18rem; /* Sets a fixed height */
    object-fit: cover; /* Ensures the media covers the area without distortion */
    border-radius: 7px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1); /* Adds a subtle shadow for depth */
    transition: transform 0.3s ease, box-shadow 0.3s ease; /* Smooth transition for hover effects */
}
.image:hover {
    transform: scale(1.03); /* Slightly enlarges the item on hover */
    box-shadow: 0 8px 16px rgba(0,0,0,0.2); /* Increases the shadow on hover */
}
body {
    font-family: sans-serif;
    background-color: #f4f7f6;
    margin: 0;
    color: #333;
}
.video {
    cursor: pointer;
}
.video-container {
    position: relative;
    /* The container should not have a fixed height, let the video define it */
}
.video-container:hover .video-controls {
    opacity: 1; /* Show controls on hover */
}
/* --- Fullscreen Adjustments --- */
.video-container:fullscreen {
    background-color: black; /* Ensure a black background for letterboxing */
}
.video-container:fullscreen .video {
    height: 100%;
    object-fit: contain; /* Fit video within the screen without cropping */
}
.video-controls {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    padding-top: 5px; /* Make top padding smaller */
    background-color: rgba(0, 0, 0, 0.6);
    border-bottom-left-radius: 7px;
    border-bottom-right-radius: 7px;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1;
}
.control-btn {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    padding: 0;
    width: 36px; /* Give buttons a fixed size */
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.control-btn:hover {
    color: #aaa;
}
.control-btn svg {
    width: 24px; /* Control icon size */
    height: 24px;
    fill: currentColor;
}
/* --- Volume Controls --- */
.volume-container {
    display: flex;
    align-items: center;
}
.volume-slider {
    width: 0;
    max-width: 100px;
    height: 5px;
    opacity: 0;
    transition: width 0.3s ease, opacity 0.3s ease;
    cursor: pointer;
    -webkit-appearance: none;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 5px;
}
.volume-container:hover .volume-slider {
    width: 80px;
    opacity: 1;
}
.volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 15px;
    height: 15px;
    background: white;
    border-radius: 50%;
}
.volume-slider::-moz-range-thumb {
    width: 15px;
    height: 15px;
    background: white;
    border-radius: 50%;
    border: none;
}

/* --- Timeline / Progress Bar --- */
.timeline-container {
    flex-grow: 1;
    height: 5px;
    background-color: rgba(255, 255, 255, 0.3);
    cursor: pointer;
    border-radius: 5px;
    margin: 0 15px;
    transition: height 0.2s ease;
}
.timeline-container:hover {
    height: 10px; /* Make bar thicker on hover */
}
.progress-bar {
    height: 100%;
    width: 0;
    background-image: linear-gradient(to right, #00ac9d 0%, #0056e4 50%, #7d59da 75%, #e81ca3 100%);/* A vibrant accent color */
    border-radius: 5px;
    position: relative;
    transition: width 0.1s linear; /* Smooth transition for progress bar updates */
}
.progress-bar::after { /* Seek-indicator thumb */
    content: '';
    position: absolute;
    right: -7px; /* Adjust position to match new height */
    top: 50%;
    transform: translateY(-50%) scale(0);
    width: 14px;
    height: 14px;
    background-color: white;
    border-radius: 50%;
    transition: transform 0.2s ease;
}
.timeline-container:hover .progress-bar::after {
    transform: translateY(-50%) scale(1);
}
/* --- Loading Animation --- */
.loading-spinner {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    z-index: 2; /* Above video, below controls */
    display: none; /* Hidden by default */
    background-color: rgba(40, 40, 40, 0.6); /* Faded dark grey background */
    border-radius: 50%; /* Make it a circle */
    padding: 5px; /* Add some padding so the K doesn't touch the edge */
    box-sizing: border-box; /* Ensure padding is included in the width/height */
}
.loading-spinner path {
    fill: none;
    stroke-width: 6;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-dasharray: 150; /* Approximate total length of the path */
    stroke-dashoffset: 150;
    animation: draw-k 1.5s ease-in-out infinite;
}
@keyframes draw-k {
    50% {
        stroke-dashoffset: 0;
    }
    100% {
        stroke-dashoffset: -150;
    }
}
/* --- Play/Pause Overlay Icon --- */
.play-pause-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 2; /* Above video, below controls */
    pointer-events: none; /* Allow clicks to pass through to the video */
    opacity: 0; /* Hidden by default */
    transition: opacity 0.3s ease; /* Smooth fade */
    display: flex; /* To center the SVG within it */
    align-items: center;
    justify-content: center;
}
.play-pause-overlay svg {
    width: 80px; /* Large size */
    height: 80px;
    fill: rgba(255, 255, 255, 0.8); /* White, semi-transparent */
}
.overlay-pause-icon { display: none; } /* Initially show play icon */
/* Hide icons by default, JS will show the correct one */
.pause-icon, .volume-muted-icon, .fullscreen-exit-icon {
    display: none;
}
/* --- Header and Logo --- */
.page-header {
    display: flex;
    justify-content: left;
    align-items: left;
    position: fixed;
    top: 0;
    width: 100%;
    background-color: #fff;
    left: 0;
    z-index: 1000;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    padding: 0.5rem 2rem;
}
.logo {
    height: 50px;
}

/* --- Responsive Adjustments for Smaller Screens --- */
@media (max-width: 600px) {
    .video-controls {
        padding: 5px; /* Reduce padding on controls */
        gap: 5px; /* Reduce space between buttons */
    }

    .control-btn {
        width: 32px; /* Make buttons smaller */
        height: 32px;
    }

    .control-btn svg {
        width: 20px; /* Make icons smaller */
        height: 20px;
    }

    .timeline-container {
        margin: 0 8px; /* Reduce horizontal margin on timeline */
    }

    .volume-container:hover .volume-slider {
        width: 60px; /* Make the volume slider a bit shorter */
    }
}