/* General reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Navigation bar styling */

body {
    background-image: url('/Assets/Main_Asset/Background_Image.png'); /* Replace with the path to your image */
    background-size: cover; /* Ensures the image covers the entire viewport */
    background-repeat: no-repeat; /* Prevents tiling */
    background-attachment: fixed; /* Keeps the background fixed during scrolling */
    background-position: center; /* Centers the image */
}

/* Back-to-Top Arrow Styling */
#back-to-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #6a1b9a; /* Purple background */
    border-radius: 50%;
    box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.2);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease-in-out, visibility 0.3s ease-in-out;
}

#back-to-top img {
    width: 24px;
    height: 24px;
    filter: invert(1); /* Makes the arrow white */
    cursor: pointer;
}

#back-to-top:hover {
    background-color: #4CAF50; /* Green background on hover */
}

#back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: rgba(255, 255, 255); /* Slight transparency */
    padding: 1rem 2rem;
    border-bottom: 1px solid #ccc;
    position: fixed;
    transition: opacity 0.3s ease-in-out, background-color 0.3s ease-in-out;
    z-index: 1000;
    width: 100%;
}

.logo img {
    width: 8rem;
    height: auto;
    display: block;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 2rem;
}

.nav-links li a {
    text-decoration: none;
    font-size: 1.2rem;
    color: #6a1b9a;
    font-weight: bold;
    transition: color 0.3s ease;
}

.nav-links li a:hover {
    color: #4CAF50;
}

/* Drop Down Menu for the Services Component */
.nav-links .dropdown {
    position: relative; /* Position the parent relative for proper alignment */
}

.nav-links .dropdown .dropdown-menu {
    display: none; /* Hidden by default */
    position: absolute;
    top: 100%; /* Aligns the dropdown directly below the parent */
    left: 0;
    background-color: #ffffff; /* Dropdown background */
    border: 1px solid #ccc;
    list-style: none;
    padding: 0;
    margin: 0;
    box-shadow: 0px 2px 5px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    width: 200px; /* Adjust as needed */
}

.nav-links .dropdown .dropdown-menu li {
    padding: 10px 20px;
}

.nav-links .dropdown .dropdown-menu li a {
    text-decoration: none;
    color: #6a1b9a;
    font-size: 1rem;
    display: block;
    transition: color 0.3s ease;
}

.nav-links .dropdown .dropdown-menu li a:hover {
    color: #4CAF50; /* Green on hover */
}

/* Show dropdown menu on hover */
.nav-links .dropdown:hover .dropdown-menu {
    display: block;
}

/* Menu toggle button (hidden on larger screens) */
.menu-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.menu-toggle span {
    background-color: #6a1b9a;
    height: 3px;
    width: 25px;
    margin: 4px 0;
    transition: 0.3s;
}

/* Sidebar Styling */
.sidebar {
    position: fixed;
    top: 0;
    right: -250px;
    width: 250px;
    height: 100vh;
    background-color: #ffffff;
    box-shadow: -2px 0 5px rgba(0, 0, 0, 0.2);
    transition: right 0.3s ease-in-out;
    z-index: 2000; /* Increased to ensure sidebar overlays other elements */
    padding-top: 20px;
    display: none;
    flex-direction: column;
}

.sidebar.active {
    display: flex;
    right: 0;
}

.sidebar .close-btn {
    font-size: 2rem;
    color: #000000;
    cursor: pointer;
    text-align: center;
    margin: 10px 20px;
}

.sidebar .sidebar-links {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.sidebar .sidebar-links li a {
    text-decoration: none;
    font-size: 1rem;
    color: #6a1b9a;
    font-weight: bold;
    display: block;
    text-align: center;
    transition: color 0.3s ease;
}

.sidebar .sidebar-links li a:hover {
    color: #4CAF50;
}

/* Sidebar Dropdown */
.sidebar .dropdown {
    position: relative;
}

.sidebar .dropdown .dropdown-menu {
    display: none; /* Hidden by default */
    list-style: none;
    margin-bottom: 0;
    padding-top: 1rem;
    flex-direction: column;
    gap: 0.5rem;
    background-color: #ffffff;
    line-height: 1.3rem;
}

.sidebar .dropdown.open .dropdown-menu {
    display: flex; /* Show the dropdown */
}

.sidebar .dropdown .plus-symbol {
    float: right;
    font-size: 1.2rem;
    color: #6a1b9a;
    cursor: pointer;
    transition: transform 0.3s;
}

.sidebar .dropdown.open .plus-symbol {
    transform: rotate(45deg); /* Rotate "+" to "x" */
}

/* Slider Styling */
/* Slider Container */
/* Slider Styling */
.slider {
    width: 100%;
    height: 90vh; /* Set a fixed height for the slider */
    position: relative;
    overflow: hidden;
}

.slide-container {
    width: 100%;
    height: 100%;
    position: relative;
}

.slide {
    width: 100%;
    height: 100%;
    position: absolute;
    opacity: 0;
    transition: opacity 1.5s ease-in-out;
}

.slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.slide.active {
    opacity: 1;
}

/* Contents Styling */
/* Events Section */
.events-grid {
    padding: 2rem;
    text-align: center;
}

.events-grid h2 {
    font-size: 2rem;
    margin-bottom: 2rem;
    color: #6a1b9a;
}

/* Event Titles Styling */
.event-title {
    font-size: 1.5rem;
    color: #6a1b9a;
    text-align: center;
    margin-bottom: 0.5rem;
    font-weight: bold;
}

/* Grid Layout */
.grid-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin: 2rem 0;
}

.grid-item {
    position: relative;
    overflow: hidden;
    border-radius: 10px;/* Popup Content - Increased size */
    .popup-content {
        background: #ffffff;
        padding: 3rem;
        max-width: 80%; /* Increase the width to take more screen space */
        width: 50%; /* Increase from 90% to 50% for a larger size */
        height: 50vh; /* Increase height to half of the viewport */
        border-radius: 10px;
        text-align: center;
        position: relative;
        box-shadow: 0 0 20px rgba(0, 0, 0, 0.3);
    }
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.5);
    transition: transform 0.3s ease-in-out;
}

.grid-item img {
    width: 99%;
    height: 40vh;
    object-fit: cover;
    border-radius: 10px;
    padding-top: 0.3rem;
    transition: transform 0.3s ease-in-out;
}

.grid-item:hover {
    transform: translateY(-5px);
}

.grid-item:hover img {
    transform: scale(1.1);
}

/* View More Button */
.view-more {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    background-color: #6a1b9a;
    color: #ffffff;
    border: none;
    border-radius: 5px;
    padding: 0.5rem 1rem;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.view-more:hover {
    background-color: #4CAF50;
}

/* Popup Overlay */
/* Popup Overlay - Covers entire screen */
.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: none;
    justify-content: center;
    align-items: flex-start;
    overflow-y: auto; /* Enables scrolling */
    z-index: 1000;
    padding: 2rem 0; /* Space above and below the popup */
}

.popup-content {
    background: #ffffff;
    padding: 2rem;
    max-width: 90%;
    width: 800px;
    border-radius: 10px;
    text-align: center;
    position: relative;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.3);
    overflow-y: auto;
    max-height: 90vh; /* Set maximum height */
}

.popup-images-container img {
    width: 100%;
    margin: 1rem 0;
    border-radius: 10px;
    object-fit: cover;
}


/* Popup Title */
.popup-content h3 {
    margin-top: 1rem;
    color: #6a1b9a;
    font-size: 2rem;
}

/* Popup Description */
.popup-content p {
    font-size: 1.5rem;
    color: #333;
    margin-bottom: 1.5rem;
    line-height: 2rem;
    margin-top: 1rem;
}

/* Close Button */
.close-button {
    position: fixed;
    top: 1rem;
    font-size: 2rem;
    cursor: pointer;
    color: #6a1b9a;
    background-color: #fff;
    border: 1px solid #000000;
    padding: 1px 8px;
    border-radius: 50%;
    z-index: 1002; /* Above all content */
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

body.popup-active {
    overflow: hidden;
    height: 100%;
    position: relative;
    width: 100%;
}

/* Blur effect only on page content */
body.popup-active .content {
    filter: blur(5px);
}

/* Decorative Divider */
.divider {
    height: 2px;
    background: linear-gradient(to right, transparent, #6a1b9a, transparent);
    margin: 3rem 0;
}

/* Footer Styling */
footer {
    background-color: #eee5ee;
    color: #333;
    padding: 2rem 1rem;
    font-family: Arial, sans-serif;
}

.footer-container {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 2rem;
}

.footer-about,
.footer-links,
.footer-programs,
.footer-contact {
    flex: 1;
    min-width: 200px;
}

.footer-about h3 {
    color: #27ae60; /* Green color */
    font-size: 1.2rem;
    margin-bottom: 1rem;
}

.footer-links h3,
.footer-programs h3 {
    color: #8e44ad; /* Purple color */
    font-size: 1.2rem;
    margin-bottom: 1rem;
    gap: 2rem;
}

.footer-contact h3 {
    color: #3498db; /* Blue color */
    font-size: 1.2rem;
    margin-bottom: 1rem;
}

.footer-about p {
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 0;
}

.footer-links ul,
.footer-programs ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links ul li a,
.footer-contact a {
    text-decoration: none;
    color: #8e44ad;
    font-size: 0.9rem;
    transition: color 0.3s;
}

.footer-links ul li a:hover,
.footer-contact a:hover {
    color: #27ae60; /* Green hover effect */
}

.footer-programs ul li {
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.blog {
    display: inline-block;
    text-decoration: none;
    color: #ffffff;
    background-color: #6a1b9a; /* Purple button */
    padding: 0.8rem 1.5rem;
    font-size: 1rem;
    border-radius: 5px;
    text-align: center;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.blog:hover {
    background-color: #4CAF50; /* Green on hover */
    transform: scale(1.05); /* Slight zoom on hover */
}

.footer-contact p {
    font-size: 0.9rem;
    margin: 0.3rem 0;
}

.footer-socials {
    margin-top: 1rem;
    display: flex;
    gap: 0.5rem;
}

.footer-socials a img {
    width: 30px;
    height: 30px;
    transition: transform 0.3s;
}

.footer-socials a img:hover {
    transform: scale(1.2); /* Zoom in on hover */
}

/* Responsive styling */
@media (max-width: 768px) {
    .nav-links {
        display: none;
    }

    .menu-toggle {
        display: flex;
    }

    .sidebar {
        display: flex;
    }
}

/* Responsive Event Grid - Tablet */
@media (max-width: 1024px) {
    .grid-container {
        grid-template-columns: repeat(2, 1fr); /* 2 columns on tablets */
        gap: 1rem; /* Smaller gaps */
    }

    .grid-item {
        padding: 0.5rem; /* Less padding for smaller screens */
    }

    .event-title {
        font-size: 1.2rem; /* Smaller title */
    }

    .view-more {
        font-size: 0.9rem; /* Smaller button text */
        padding: 0.3rem 0.6rem;
    }

    .grid-item img {
        height: 30vh; /* Shorter images to avoid long cards */
    }
}

/* Responsive Event Grid - Mobile */
@media (max-width: 768px) {
    .grid-container {
        grid-template-columns: 1fr; /* Single column on mobile */
        gap: 1rem;
    }

    .grid-item {
        padding: 0.5rem;
    }

    .event-title {
        font-size: 1rem; /* Even smaller title for mobile */
    }

    .view-more {
        font-size: 0.8rem;
        padding: 0.3rem 0.5rem;
    }

    .grid-item img {
        height: 25vh; /* Further reduce height for compact design */
    }
}
