/* Basic reset and body setup */
* {
    box-sizing: border-box;
}

/* --- Force Full Viewport Height & Control Overflow --- */
html, body {
    /*height: 100vh !important; /* Add !important */
    /*overflow: hidden !important; /* Add !important */
    margin: 0;
    padding: 0;
}

#main {
    position: relative;
    height: 100vh !important; /* Add !important */
    /* Ensure overflow is NOT hidden here */
    overflow: visible !important; /* Or remove overflow rule completely */
}

/* Background Layer Styling */
.background-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%; /* Fill #main */
    z-index: 1;
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    transition: background-image 0.7s ease-in-out, background-position 0.5s ease-in-out;
}

/* Slideshow Container Styling */
.slideshow-container {
    display: block;
    z-index: 2; /* Above background */
}

/* Individual Slide Section Styling */
.slide {
    height: 100% !important; /* Add !important */
    scroll-snap-align: start;
    scroll-snap-stop: always;
    position: relative;
    width: 100%;
}

/* Floating Dialog Styling (z-index already increased) */
.dialog {
    font-size: 15pt;
    position: absolute;
    /*top: 50%;
    left: 50%;*/
    /* transform: translate(-50%, -50%) scale(0.9); */
    background-color: rgba(255, 255, 255, 0.85);
    padding: 25px 35px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    max-width: 500px;
    width: 80%;
    text-align: center;
    z-index: 1;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s ease-in-out, transform 0.5s ease-in-out;
}

.dialog.visible {
    opacity: 1;
    /*transform: translate(-50%, -50%) scale(1);*/
    pointer-events: auto;
}

.dialog h2 {
    margin-bottom: 15px;
    color: #333;
}

.dialog p {
    color: #555;
    line-height: 1.6;
}

div.image { position: relative; }
div.image img {
    width: 100%;
    height: auto;
    /*position: absolute;
    /*border-radius: 10px;*/
}

.applyLink {
    cursor:     pointer;
    margin-top: -30px;
    position:   relative;
    z-index:    2;
}
.applyLink button {
    background-color: mediumaquamarine;
}
