/* General Section Styles */
.welcome, .services, .events-preview, .about-mini, .cta {
    padding: 60px 20px;
    max-width: 1200px;
    margin: auto;
    text-align: center;
}

.welcome h1, .services h2, .events-preview h2, .about-mini h2, .cta h2 {
    margin-bottom: 20px;
}

.welcome h1, .cta h2 {
    font-size: clamp(2rem, 5vw, 3rem);
    color: #333;
}

.welcome p, .about-mini p, .event p {
    font-size: clamp(1rem, 2.5vw, 1.2rem);
    color: #555;
    line-height: 1.6;
    max-width: 800px;
    margin: 0 auto;
}

/* Gradient Background for Page */
body {
    background: linear-gradient(135deg, #e0f7fa, #bbdefb, #90caf9);
    background-attachment: fixed;
    min-height: 100vh;
    margin: 0;
    padding: 0;
}

/* Header and Navbar Styles */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #333;
    padding: 15px 20px;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: background-color 0.3s ease;
    box-sizing: border-box;
}

/* Logo Styles */
.logo {
    display: flex;
    align-items: center;
}

.logo img {
    height: 40px; /* Adjust based on your logo size */
    width: auto;
}

/* Navigation Links */
.navbar {
    display: flex;
    align-items: center;
}

.navbar ul {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
}

.navbar li {
    margin: 0 15px;
}

.navbar li:last-child {
    margin-right: 25px; /* Extra spacing for the last item to prevent edge proximity */
}

.navbar a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    font-size: 1.1rem;
    padding: 8px 15px;
    border-radius: 20px;
    transition: all 0.3s ease;
    position: relative;
    display: flex;
    align-items: center;
}

.navbar a:hover {
    color: #5efce8;
    background-color: rgba(255, 255, 255, 0.1);
}

.navbar a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    background: #5efce8;
    bottom: 5px;
    left: 50%;
    transform: translateX(-50%);
    transition: width 0.3s ease;
}

.navbar a:hover::after {
    width: 80%;
}

.navbar .active a {
    color: #5efce8;
    background-color: rgba(255, 255, 255, 0.1);
}

.icon {
    margin-right: 8px;
}

/* Hamburger Menu for Mobile */
.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 21px;
    cursor: pointer;
}

.nav-toggle span {
    display: block;
    height: 3px;
    width: 100%;
    background-color: white;
    border-radius: 3px;
    transition: all 0.3s ease;
}

/* Admin Logout Button Styles within Navbar */
.admin-only {
    display: none; /* Hidden by default for non-admins */
}

.admin-only:not(.hidden) {
    display: block; /* Shown only when admin mode is active and hidden class is removed */
}

.admin-logout {
    background: linear-gradient(135deg, #ff6b6b, #ff8e53);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 1.1rem;
    font-weight: 500;
    transition: background 0.3s, transform 0.2s;
}

.admin-logout:hover {
    background: linear-gradient(135deg, #ff8e53, #ff6b6b);
    transform: scale(1.05);
}

.admin-logout.hidden, .edit-text-btn.hidden {
    display: none;
}

/* Service Times Styles */
.service-times {
    display: flex;
    justify-content: center;
    gap: 40px;
    flex-wrap: wrap;
    margin-top: 30px;
}

.service {
    background: #e7ebef;
    padding: 20px;
    border-radius: 15px;
    max-width: 300px;
    box-shadow: 0 8px 16px rgba(0,0,0,0.1);
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.service h3, .event h3 {
    font-size: clamp(1.2rem, 2.5vw, 1.5rem);
    color: #222;
}

.service-link:hover .service {
    background-color: #eef2ff;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.1);
}

/* Event Styles */
.events-list {
    margin-top: 30px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.event {
    background: #fff;
    padding: 15px;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.05);
    max-width: 600px;
    transition: transform 0.2s ease;
}

.event:hover {
    transform: translateY(-5px);
}

/* Button Styles */
.btn, .edit-text-btn {
    padding: 12px 24px;
    color: #fff;
    border-radius: 30px;
    text-decoration: none;
    transition: background 0.3s, transform 0.2s;
    display: inline-block;
}

.btn {
    background: linear-gradient(135deg, #61a5ff, #5efce8);
}

.btn:hover {
    background: linear-gradient(135deg, #5efce8, #61a5ff);
    transform: scale(1.05);
}

.edit-text-btn {
    margin-top: 10px;
    background: linear-gradient(135deg, #61a5ff, #5efce8);
    border: none;
    cursor: pointer;
    font-size: 0.9rem;
}

.edit-text-btn:hover {
    background: linear-gradient(135deg, #5efce8, #61a5ff);
    transform: scale(1.05);
}

/* Call to Action Section */
.cta {
    background: url('cta-background.jpg') center/cover no-repeat;
    color: white;
    text-shadow: 2px 2px 8px rgba(0,0,0,0.7);
    padding: 80px 20px;
    border-radius: 30px;
    position: relative;
    overflow: hidden;
}

.cta::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3);
    z-index: 1;
}

.cta h2, .cta .btn {
    position: relative;
    z-index: 2;
}

/* Slider Styles */
.slider {
    position: relative;
    width: 100vw;
    margin: 80px auto 0; /* Adjusted for fixed navbar height */
    overflow: hidden;
    height: 60vh;
}

.slides {
    display: flex;
    width: 100%;
    height: 100%;
}

.slide {
    width: 100%;
    height: 100%;
    display: none;
    opacity: 0;
    transition: opacity 0.8s ease-in-out;
}

.slide.active {
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 1;
}

.slide img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
}

.prev, .next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    color: white;
    font-size: 2rem;
    cursor: pointer;
    padding: 10px 20px;
    z-index: 10;
    transition: background 0.3s;
}

.prev:hover, .next:hover {
    background: rgba(0, 0, 0, 0.8);
}

.prev {
    left: 10px;
}

.next {
    right: 10px;
}

.dots {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 10;
}

.dot {
    width: 12px;
    height: 12px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    cursor: pointer;
}

.dot.active {
    background: rgba(255, 255, 255, 1);
}

.dot:hover {
    background: rgba(255, 255, 255, 0.8);
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .service-times {
        gap: 20px;
    }
    .slider {
        height: 40vh;
        margin: 80px auto 0; /* Adjusted for fixed navbar height */
    }
    .slide {
        height: 40vh;
    }
    .nav-toggle {
        display: flex;
        z-index: 1001;
    }
    .navbar ul {
        display: none;
        position: absolute;
        top: 70px;
        left: 0; /* Adjusted to ensure full width coverage from left */
        background-color: #333;
        width: 100%;
        flex-direction: column;
        align-items: center;
        padding: 20px 0;
        box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
        transform: translateY(-100%);
        opacity: 0;
        transition: all 0.3s ease;
    }
    .navbar ul.active {
        display: flex;
        transform: translateY(0);
        opacity: 1;
    }
    .navbar li {
        margin: 15px 0;
        width: 100%;
        text-align: center;
    }
    .navbar li:last-child {
        margin-right: 0; /* Reset extra margin on mobile for centered alignment */
    }
    .navbar a, .admin-logout {
        padding: 10px 20px;
        display: block;
    }
}

@media (max-width: 480px) {
    .cta {
        padding: 60px 15px;
    }
    .btn {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
}

/* Navbar scroll effect */
.header.scrolled {
    background-color: rgba(51, 51, 51, 0.95);
}