/* Keep your existing imports and root variables */
@import url('https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&display=swap');

:root {
    --primary: #009900;
    --light-primary: #00bf00;
    --dark-primary: #007000;
    --secondary: #ffcc33;
    --dark-secondary: #deb12b;
}

/* Keep your existing body and container styles */
html, body {
    font-family: "Inter", serif;
    color: slategray;
    height: 100%;
    margin: 0;
}

.page-wrapper {
    display: flex;
    flex-direction: column;
    min-height: 100vh; /* Ensures the wrapper takes full viewport height */
}

.container {
    width: 86%;
    margin: auto;
}

/* Menu Styling - Optimized Version */
.main-navigation {
    padding: 10px;
    background: #f8f9fa;
}

/* Main content grows to push footer down */
main {
    flex: 1 0 auto; /* Allows main to grow and push footer to bottom */
}

/* Footer styling */
footer {
    flex-shrink: 0; /* Prevents footer from shrinking */
    width: 100%;
    background: #00bf00; /* Example background, adjust as needed */
    padding: 20px 0; /* Example padding */
}

.menu {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column; /* Default for mobile */
}

.menu li {
    position: relative;
}

.menu a {
    text-decoration: none;
    color: #333;
    padding: 10px;
    display: block;
    transition: background-color 0.3s ease;
}

.menu a:hover {
    background-color: #f0f0f0;
}

/* Submenu Styling - Improved Stability */
.submenu {
    list-style: none;
    margin: 0;
    padding: 0;
    background: white;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    border-radius: 4px;
    min-width: 200px;
    z-index: 1000;
}

.submenu li a {
    padding: 10px 15px; /* Increased padding for easier clicking */
}

.submenu li a:hover {
    background-color: #e0e0e0;
}

/* Desktop Styles */
@media (min-width: 768px) {
    .menu {
        flex-direction: row;
        gap: 10px; /* Added consistent spacing between items */
    }

    #navbar-dropdown {
        display: block;
    }

    .submenu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        margin-top: -1px; /* Removes gap between parent and submenu */
    }

    .submenu .submenu {
        top: 0;
        left: 100%;
        margin-left: -1px; /* Removes gap for nested submenus */
    }

    .has-submenu:hover > .submenu {
        display: block;
    }

    [data-collapse-toggle="navbar-dropdown"] {
        display: none;
    }
}

/* Mobile Styles */
@media (max-width: 767px) {
    #navbar-dropdown {
        display: none;
    }

    #navbar-dropdown.active {
        display: block;
    }

    .submenu {
        position: static;
        width: 100%;
        padding-left: 1rem;
        box-shadow: none; /* Remove shadow on mobile for cleaner look */
    }

    .has-submenu:hover > .submenu {
        display: none; /* Prevent hover on mobile */
    }

    /* You might want to add a class to show submenu on click for mobile */
    .has-submenu.active > .submenu {
        display: block;
    }
}

/* Navbar Fixed Positioning - Keep your existing styles */
.navbar {
    transition: all 0.3s ease;
}

.navbar.fixed {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    z-index: 1000; /* Keep navbar above other content */
}


/* for Gallery section */
.gallery-container {
    text-align: center;
    padding: 20px;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    max-width: 800px;
    margin: 0 auto;
}

.gallery-grid div {
    position: relative;
    overflow: hidden;
    border: 1px solid #000;
}

.gallery-grid img {
    width: 100%;
    height: auto;
    transition: transform 0.3s ease;
}

.gallery-grid img:hover {
    transform: scale(1.2); /* Zoom effect */
    cursor: zoom-in;
}

/*for custom card in home */
.custom-card {
    background: #bdb8b8;
    border-radius: 15px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
    padding: 2rem;
    max-width: 500px;
    width: 100%;
    margin: 0 auto;
    text-align: center;
  }

  .custom-card:hover {
    background-color: var(--light-primary); /* Slightly darker gray for dropdown items */
}

/* for team member section */
.team-member {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 16px;
    background-color: #f7fafc;
}

.team-member img {
    border-radius: 50%;
    width: 100px;
    height: 100px;
    object-fit: cover;
    margin-bottom: 12px;
}

.btn-primary{
    background-color: var(--light-primary);
    padding: 4px 12px;
    color: white;
    border-radius: 6px;
    transition: 0.3s;
}

.btn-primary:hover{
    background-color: var(--dark-primary);
}


.btn-secondary{
    background-color: var(--secondary);
    padding: 4px 12px;
    color: white;
    border-radius: 6px;
    transition: 0.3s;
}

.btn-secondary:hover{
    background-color: var(--dark-secondary);
}


.limited-text {
    display: -webkit-box;
    -webkit-line-clamp : 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.desccription figure{
    width: 100% !important;
}

/* Scope Swiper styles to the image section only */
#image-carousel .swiper-container {
    width: 100%;
    height: 400px; /* Adjust height as needed */
}

#image-carousel .swiper-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

#image-carousel .swiper-button-next,
#image-carousel .swiper-button-prev {
    color: white; /* Change color as needed */
}

#image-carousel .swiper-pagination-bullet {
    background: white; /* Change color as needed */
}

/* for scroll-container */
.scroll-container {
    width: 100%;
    overflow: hidden;
    white-space: nowrap;
    position: relative;
}

.scroll-container h1 {
    display: inline-block;
    padding-left: 100%;
    animation: scroll-text 10s linear infinite;
}

.scroll-container:hover h1 {
    animation-play-state: paused;
}

@keyframes scroll-text {
    0% {
        transform: translateX(100%);
    }
    100% {
        transform: translateX(-100%);
    }
}

.scroll-container::before,
.scroll-container::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: 50px;
    z-index: 2;
}

.scroll-container::before {
    left: 0;
    background: linear-gradient(to right, white, transparent);
}

.scroll-container::after {
    right: 0;
    background: linear-gradient(to left, white, transparent);
}

/* Popup styles */
.popup {
    display: none; /* Hidden by default */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    overflow: auto; /* Allow scrolling if content is too large */
}

.popup-content {
    position: relative;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: white;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    max-width: 50%; /* Ensure the popup doesn't exceed screen width */
    max-height: 90vh; /* Ensure the popup doesn't exceed screen height */
    overflow-y: auto; /* Allow scrolling if content is too tall */
}

.close-popup {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 24px;
    cursor: pointer;
    z-index: 1001; /* Ensure the close button is above other content */
}

.close-popup:hover {
    color: red;
}

.popup-image {
    max-width: 100%; /* Ensure the image doesn't exceed the popup width */
    height: auto; /* Maintain aspect ratio */
    margin-top: 10px; /* Add some spacing */
}

/*for small media popup */
@media (max-width: 768px) {
    .popup-content {
        max-width: 95%; /* Increase width for smaller screens */
        padding: 10px; /* Reduce padding for smaller screens */
    }

    .popup-image {
        max-width: 90%; /* Adjust image size for smaller screens */
    }
}
