html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Quicksand', sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f0f9f9;
    color: #2e3d49;
    /* Use a relative font size on body for accessibility */
    font-size: 16px;
}

section {
    margin-bottom: 40px;
}

.nav-links a {
    color: white;
}

.header {
    background: #a8d5ba;
    display: flex;
    align-items: center; /* vertical alignment */
    justify-content: space-between;
    padding: 4px 40px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    /* Removed flex-wrap here, will handle stacking with media query */
}

/* Updated Logo size to use relative unit, making it more flexible */
.logo a img {
    width: 140px; /* Adjusted to be slightly smaller and consistent */
    height: auto; /* Maintain aspect ratio */
    display: block;
}

.nav a {
    text-decoration: none;
    color: black;
    font-weight: 500;
    margin: 0 10px; /* Reduced margin for space */
    transition: color 0.3s;
}

    .nav a:hover {
        color: #003f5c;
    }

.hero {
    background: linear-gradient(to right, #d4f1ff, #e8f8ff);
    text-align: center;
    padding: 0px 20px; /* Increased padding for better vertical spacing */
}

    .hero h1 {
        font-family: 'Quicksand', sans-serif;
        font-size: 2.5rem; /* Using rem for better scaling */
        font-weight: 700;
        margin-bottom: 10px;
        color: #2c3e50;
    }

    .hero h1 .homestay-name {
    /* Make it italic */
    font-style: italic;
    /* Make 'Morje's Beach Homestay' even bolder (e.g., a weight above 700) */
    font-weight: 900; 
    /* You can also adjust the color for emphasis if needed, but I'll keep the current h1 color */
    color: #2c3e50; 
}

.hero h1 .welcome-text {
    /* Make it italic */
    font-style: italic;
    /* Make 'Welcome to' lighter (e.g., a weight of 400 or less) */
    font-weight: 400;
    /* Lighten the color slightly for the "lighter" effect */
    color: #5d758c; 
}

    .hero p {
        font-family: 'Dancing Script', cursive;
        font-size: 1.25rem; /* Using rem for better scaling */
        font-weight: 400;
        color: #34495e;
    }

/* --- Features Section (Rooms) --- */
.features {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-around;
    gap: 20px;
    padding: 40px 20px;
    background-color: #fefefe;
}

.feature {
    width: 30%;
    min-width: 280px; /* Increased min-width for better look */
    background: #ffffff;
    padding: 15px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    border-radius: 8px;
    text-align: center;
}

    .feature img {
        max-width: 100%;
        height: auto; /* Ensures aspect ratio is maintained */
        border-radius: 8px;
        object-fit: cover;
    }

/* --- Gallery Section --- */
#Gallery {
    /* padding: 40px 20px; */
    background-color: #eef8fa;
}

.gallery-heading {
    text-align: center;
    font-size: 2rem;
    font-weight: bold;
    margin-bottom: 30px;
    color: #222;
}

.gallerys {
    display: flex;
    justify-content: space-around; /* Center items when they wrap */
    gap: 20px;
    flex-wrap: wrap;
}

.gallery {
    /* Set a max-width and let flex handle the sizing */
    max-width: 220px;
    width: 100%; /* Important for stacking on small screens */
    text-align: center;
}

    .gallery img {
        width: 100%;
        height: 180px; /* Reduced height for better stacking on mobile */
        object-fit: cover;
        border-radius: 10px;
    }


    .gallery a {
        margin-top: 10px;
        font-size: 1.1rem;
        font-weight: bold;
        color: #333;
        display: block; /* Make link a block element for better touch area */
    }

/* --- Footer and Social Links --- */
.footer {
    background-color: #007f8c; /* deep teal */
    color: white;
    text-align: center;
    padding: 5px 0;
}

.social-links {
    padding: 20px 0;
    text-align: center;
    background-color: #fefefe;
}

    .social-links a {
        margin: 0 10px;
        display: inline-block;
    }

    .social-links img {
        width: 32px;
        height: 32px;
        transition: transform 0.3s;
    }

        .social-links img:hover {
            transform: scale(1.2);
        }

/* --- Carousel Styling --- */
.carousel-container {
    position: relative;
    width: 100%;
    /* Removed fixed height and let the image size determine the height */
    height: auto;
    padding-bottom: 56.25%; /* 16:9 aspect ratio placeholder */
    overflow: hidden;
}

.carousel-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

    .carousel-slide img {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%; /* Changed to 100% */
        height: 100%; /* Changed to 100% */
        object-fit: cover; /* Changed to cover to fill container nicely */
        opacity: 0;
        transition: opacity 1s ease-in-out;
        z-index: 0;
    }

        .carousel-slide img.active {
            opacity: 1;
            z-index: 1;
        }

.prev, .next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(0,0,0,0.5);
    color: white;
    border: none;
    padding: 10px;
    cursor: pointer;
    font-size: 1.5rem; /* Larger for better mobile tapping */
    z-index: 2; /* Increased z-index */
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.prev {
    left: 10px;
}

.next {
    right: 10px;
}

/* --- Map and Contact --- */
.map-section {
    padding: 20px;
}

.map-container {
    width: 100%;
    height: 350px;
    margin-top: 20px;
}

    .map-container iframe {
        border-radius: 8px;
    }


.contact-sticky {
    position: fixed;
    bottom: 20px;
    left: 20px;
    z-index: 999;
}

.contact-card {
    background: #ffffff;
    border-left: 5px solid #00bfa5;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    padding: 15px;
    border-radius: 8px;
    font-size: 0.9rem;
    color: #2e3d49;
    transition: transform 0.2s ease;
}

    .contact-card:hover {
        transform: scale(1.03);
    }

    .contact-card a {
        color: #007f8c;
        text-decoration: none;
    }

        .contact-card a:hover {
            text-decoration: underline;
        }

/* --- Media Queries for Responsiveness --- */

/* Tablet and smaller screens */
@media (max-width: 1024px) {
    .header {
        padding: 4px 20px;
    }

    .nav a {
        margin: 0 5px;
        font-size: 0.9rem;
    }
}

/* Mobile screens */
@media (max-width: 768px) {
    /* Header Stacking for Mobile */
    .header {
        flex-direction: column;
        align-items: center;
        padding: 10px 20px;
    }

    .nav {
        margin-top: 10px;
        width: 100%;
        display: flex;
        justify-content: center;
        flex-wrap: wrap;
    }

        .nav a {
            padding: 5px 10px;
            margin: 5px;
        }

    /* Hero Text Adjustments */
    .hero h1 {
        font-size: 2rem;
    }

    /* Features Stacking */
    .features {
        flex-direction: column;
        align-items: center;
        padding: 20px;
    }

    .feature {
        width: 90%;
        min-width: unset;
    }

    /* Gallery Stacking */
    .gallerys {
        flex-direction: column;
        align-items: center;
    }

    .gallery {
        max-width: 90%;
    }

    /* Contact Card Position */
    .contact-sticky {
        /* Move to the bottom center for better mobile view */
        left: 50%;
        transform: translateX(-50%);
        bottom: 10px;
        width: 90%; /* Take up most of the width */
    }

    .contact-card {
        padding: 10px;
        text-align: center;
        display: flex;
        flex-direction: column;
    }

    /* WhatsApp Button adjustment */
    #whatsapp-button {
        bottom: 10px;
        right: 10px;
    }
}
