body {
    font-family: 'Arial', sans-serif;
    text-align: center;
    background: #f8f8f8;
    margin: 0;
    padding: 0;
}
/* header {
    background: #374a51;
    color: white;
    padding: 50px 20px;
} */

header {
    position: relative;
    height: 150px; /* Adjust height as needed */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 50px 20px;
    background-color: #374a51; /* Background color */
    color: white;
    overflow: hidden;
}

header::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('images/villabaro.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0.2; /* Set image opacity */

 /* Make the fade-out happen earlier */
 mask-image: linear-gradient(
    to right, 
    rgba(55, 74, 81, 0) 5%,  /* Fully transparent at 5% */
    rgba(55, 74, 81, 1) 25%, /* Fully visible from 25% */
    rgba(55, 74, 81, 1) 75%, /* Fully visible until 75% */
    rgba(55, 74, 81, 0) 95%  /* Starts fading again at 75%, fully transparent at 95% */
);

-webkit-mask-image: linear-gradient(
    to right, 
    rgba(55, 74, 81, 0) 5%,  
    rgba(55, 74, 81, 1) 25%, 
    rgba(55, 74, 81, 1) 75%, 
    rgba(55, 74, 81, 0) 95%  
);
}
.fade-in {
    opacity: 0;
    animation: fadeIn 2s forwards;
}
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
section {
    margin: 40px;
}
.gallery img {
    width: 100%;
    max-width: 300px;
    margin: 10px;
    border-radius: 10px;
}
footer {
    background: #374a51;
    color: white;
    padding: 20px;
    margin-top: 40px;
}

.max-width {
    max-width: 600px;
    width: 100%;
}

.max-width-gallery {
    width: 100%;
}

.body {
    display: flex;
    flex-direction: column; /* Everything in a column */
    align-items: center; /* Center horizontally */
    font-family: Arial, sans-serif;
    text-align: center;
}

/* Helmet Button */
.helmet-button {
    width: 40px;
    height: 40px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    outline: none;
    transition: transform 0.2s ease-in-out;
}

.helmet-button:hover {
    transform: scale(1.1);
}

/* Gallery styling */
.gallery {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
    padding: 20px;
    overflow: hidden;
}

/* Image styling */
/* Ensure images are hidden by default */
.scroll-image {
    width: 80%;
    max-width: 1000px;
    border-radius: 10px;
    opacity: 0;
    transform: translateY(50px);
    transition: opacity 1s ease-out, transform 1s ease-out;
    will-change: opacity, transform;
}

/* Prevent images from appearing when menu is open */
/* .menu.active ~ .gallery .scroll-image {
    opacity: 0 !important;
    transform: translateY(50px);
} */

/* Hide images completely when the menu is open */
/* .menu.active ~ .body .gallery {
    display: none !important;
} */
 


/* Make first image visible immediately */
.scroll-image:first-child {
    opacity: 1;
    transform: translateY(0);
}

/* Reveal images only when they are in view */
.scroll-image.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Alternate sizes for variation */
.scroll-image:nth-child(odd) {
    width: 100%;
    margin-left: -10%;
}
.scroll-image:nth-child(even) {
    width: 100%;
    margin-right: -10%;
}

/* Parallax effect */
.scroll-image.show {
    opacity: 1;
    transform: translateY(0);
}

/* Lightbox styles */
.lightbox {
    display: none; /* This ensures the lightbox is hidden on page load */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
    pointer-events: none; /* Prevents accidental clicks when hidden */
}

.lightbox.show {
    opacity: 1;
    pointer-events: auto;
}

.lightbox-img {
    max-width: 80%;
    max-height: 80%;
    transition: transform 0.3s ease-in-out;
}

/* Close button */
.close {
    position: absolute;
    top: 20px;
    right: 30px;
    font-size: 50px;
    color: white;
    cursor: pointer;
    transition: 0.3s;
}

.close:hover {
    color: #f1c40f;
}

/* Image hover effect */
.scroll-image {
    cursor: pointer;
    transition: transform 0.3s ease-in-out;
}

.scroll-image:hover {
    transform: scale(1.05);
}



/* Hamburger Menu (Right Side) */
/* Make the hamburger menu sticky */
.hamburger {
    font-size: 30px;
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    position: fixed;  /* Keeps it in place */
    top: 10px;        /* Distance from the top */
    right: 10px;      /* Distance from the right */
    transition: transform 0.2s ease-in-out, background 0.3s ease-in-out;
}

/* Slightly enlarge the icon on hover */
.hamburger:hover {
    transform: scale(1.3);
}

/* Make sure it's visible above the menu */
.menu {
    z-index: 1000;
}

/* Flyout Menu (Slides in from the Right) */
.menu {
    position: fixed;
    top: 0;
    right: -100%; /* Initially hidden */
    width: 250px;
    height: 100%;
    background: rgba(55, 74, 81, 0.95);
    backdrop-filter: blur(10px);
    transition: right 0.3s ease-in-out;
    text-align: center;
    z-index: 1000; /* Ensures menu is above everything */
}

/* Close Button inside Menu */
.close-menu {
    font-size: 40px;
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    position: absolute;
    top: 10px;
    right: 10px;
    transition: color 0.3s ease-in-out;
}

.close-menu:hover {
    color: #f1c40f;
}

.menu ul {
    list-style: none;
    padding: 10px;
}

.menu li {
    margin: 20px 0;
}

.menu a {
    color: white;
    text-decoration: none;
    font-size: 22px;
    transition: color 0.3s ease-in-out;
}

.menu a:hover {
    color: #f1c40f;
}

/* Show menu when active */
.menu.active {
    right: 0;
}

/* Fullscreen Menu on Mobile */
@media (max-width: 768px) {
    .menu {
        width: 100%;
        right: -100%;
        height: 100vh;
        text-align: center;
    }

    .menu ul {
        padding-top: 80px;
    }

    .menu li {
        margin: 30px 0;
    }
}
/* Prevent scrolling when menu is active */
body.menu-open {
    overflow: hidden;
}