/* 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 {
    /* Alias the Tailwind brand palette so plain CSS can use it too */
    --primary: var(--color-primary);
    --light-primary: var(--color-primary-light);
    --dark-primary: var(--color-primary-dark);
    --secondary: var(--color-secondary);
    --dark-secondary: var(--color-secondary-dark);
}

/* 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%;
}

.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 */
}


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

.gallery-wrapper {
    max-width: 1200px; /* Increased max-width for larger screens */
    margin: 0 auto;
    padding: 0 10px;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px; /* Slightly increased gap */
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border: 1px solid #000;
    aspect-ratio: 4 / 3; /* Maintains consistent aspect ratio */
}

.gallery-grid img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Ensures images fill container nicely */
    transition: transform 0.3s ease;
    display: block; /* Removes bottom spacing */
}

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

/* Gallery items are buttons (lightbox) — reset button defaults */
.gallery-item {
    width: 100%;
    padding: 0;
    background: none;
    font: inherit;
    cursor: zoom-in;
}

.gallery-empty {
    padding: 40px 0;
    color: #64748b;
}

/* Responsive Design with Media Queries */

/* Small devices (phones, up to 576px) */
@media (max-width: 576px) {
    .gallery-grid {
        grid-template-columns: 1fr; /* Single column */
        gap: 10px;
    }

    .gallery-container {
        padding: 10px;
    }
}

/* Medium devices (tablets, 577px to 768px) */
@media (min-width: 577px) and (max-width: 768px) {
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
}

/* Large devices (desktops, 769px to 992px) */
@media (min-width: 769px) and (max-width: 992px) {
    .gallery-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Extra large devices (large desktops, 993px and up) */
@media (min-width: 993px) {
    .gallery-grid {
        grid-template-columns: repeat(4, 1fr); /* 4 columns for wide screens */
    }
}

/* Optional: Hover effect adjustment for touch devices */
@media (hover: none) {
    .gallery-grid img:hover {
        transform: none; /* Disable hover effect on touch devices */
    }
}

/* 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 */
}

/* 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 */
    }
}
