/* Universal Reset and Box Sizing */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    height: 100%;
    overflow: hidden; /* Prevents scrolling */
    font-family: sans-serif;
    color: white;
}

#presentation-container {
    height: 100%;
    width: 100%;
    position: relative;
}

/* --- SLIDE STYLING --- */
.slide {
    width: 100%;
    height: 100%;
    position: absolute; /* Stack slides on top of each other */
    top: 0;
    left: 0;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.5s ease-in-out; /* Smooth transition between slides */
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #000; /* Default background for media that doesn't fill the screen */
}

.slide.active {
    opacity: 1;
    visibility: visible;
    z-index: 10; /* Bring the active slide to the front */
}

/* --- MEDIA STYLING (Image/Video/GIF) --- */
.media-content {
    /* This ensures the media covers the entire screen space */
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover; /* Important for responsiveness: fills the container without stretching */
    z-index: 1;
}

/* --- CAPTION STYLING --- */
.caption {
    position: relative;
    z-index: 5; /* Keep caption above the media */
    background: rgba(0, 0, 0, 0.65); /* Semi-transparent dark background for readability */
    padding: 20px;
    max-width: 80%;
    text-align: center;
    border-radius: 8px;
    /* Responsive font sizing using viewport units */
    font-size: clamp(14px, 2vw, 24px); 
}

.caption h2 {
    margin-bottom: 10px;
    font-size: 1.5em;
}

/* Optional: Overlay to darken media slightly for better caption contrast */
.slide::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.2);
    z-index: 2;
    pointer-events: none; /* Allows clicks to pass through to the slide */
}