body, html {
    margin: 0;
    padding: 0;
    overflow: hidden;
    font-family: Arial, sans-serif;
}

.slider {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    overflow: hidden;
    z-index: 0;
}

.slides {
    position: relative;
    width: 100%;
    height: 100vh;
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 3s ease-in-out;
    animation: fade 150s infinite; /* 30 seconds per slide, total of 150s for 5 slides */
}

.slide:nth-child(1) { animation-delay: 0s; }
.slide:nth-child(2) { animation-delay: 30s; }
.slide:nth-child(3) { animation-delay: 60s; }
.slide:nth-child(4) { animation-delay: 90s; }
.slide:nth-child(5) { animation-delay: 120s; }

.slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Background overlay */
.slider::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.5); /* Dark overlay */
    z-index: 1;
}

@keyframes fade {
    0%, 20% { opacity: 1; }  /* Image visible for the first 20% of the time */
    25%, 100% { opacity: 0; } /* Then fade out, stay hidden until loop repeats */
}

.content {
    position: relative;
    z-index: 2; /* Ensure content is above overlay */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100vh; /* Occupies full height of the viewport */
    text-align: center;
    color: white;
    font-weight: bold;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7); /* Shadow for readability */
}

.content h1 {
    font-size: 3em;
    margin: 0;
}

.button {
    display: inline-block;
    margin-top: 20px;
    padding: 10px 20px;
    color: white;
    background-color: #333;
    text-decoration: none;
    border-radius: 5px;
}

/* Navigation buttons */
.nav-buttons {
    position: fixed; /* Make the buttons stay on top while scrolling */
    top: 20px;
    right: 20px;
    z-index: 3; /* Ensure this is higher than the slider and overlay */
}

.nav-button {
    margin-left: 10px;
    padding: 10px 15px;
    color: white;
    background-color: #555;
    text-decoration: none;
    border-radius: 5px;
    transition: background-color 0.3s;
}

.nav-button:hover {
    background-color: #777; /* Change color on hover */
}
