/* General styles for the gallery */
.slidesection {
    background-color: #F0F8FF; /* Slight blue */ 
    position: relative;
    padding: 0; /* Add padding as needed */
    box-sizing: border-box; /* Ensure padding and borders are included in the element's total width and height */
    max-height: none; /* Optional: Set a max height if needed */
    width: 100%; 
    max-width: 100%;
    overflow-x: hidden; /* Hide horizontal overflow */
    overflow-y: auto; 
    text-align: center;
}

.slider-container {
    max-width: 100%;
    margin: 20px auto;
    background: #F0F8FF;
    text-align: center;
    aspect-ratio: 16 / 9;
    width: 100%; /* Ensure the width does not exceed the parent */
    box-sizing: border-box;
    margin-bottom: 20px; 
}

.gallery-title {
    width: 100%;
    max-width: 100%;
    margin: 20px auto;
    background: #F0F8FF;
    text-align: center;
    margin-bottom: 20px; 
    color: #2A3A52;
    font-family: 'Poppins', Arial, sans-serif; /* Use Poppins as primary and Arial as fallback */
    font-weight: 700;  /* Bold weight */
    margin: 10px 0;
}

.slider-image {
    width: 100%;
    height: 100%;
    object-fit: contain; /* Ensure the image fits within the container without cropping */
    transition: opacity 1s ease-in-out;
    opacity: 0; /* Initially hide the image until it loads */
    text-align: center;
}

.slider-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 24px;
    color: #333;
}

.gallery-section {
    width: 100%;
    background-color: #F0F8FF;
    display: flex;
    flex-direction: column;
    text-align: center;
    overflow: hidden;
}

.gallery-container {
    display: flex;
    flex-wrap: wrap; /* Allow wrapping on mobile and tablet */
    gap: 15px; /* Space between items */
    width: 100%;
    margin: 0 auto; /* Center the gallery container */
    justify-content: center; /* Center items horizontally */
    text-align: center;
    width: 100%; /* Ensure the width does not exceed the parent */
    max-height: 100%; /* Ensure the height does not exceed the parent */
    box-sizing: border-box;
    margin-bottom: 0;
}

.gallery-item {
    /*change - from relative to absolute */
    position: relative;
    overflow: hidden;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    aspect-ratio: 1 / 1; /* Maintain square aspect ratio */
}

.gallery-item img {
    width: 100%;
    height: 100%;
    display: block;
}

.gallery-item:hover img {
    transform: scale(1.05);
}

.gallery-item:hover::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1;
    transition: opacity 0.3s ease;
}

.gallery-item:hover .gallery-item-info {
    opacity: 1;
}

.gallery-item-info {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: rgba(0, 0, 0, 0.5);
    color: #fff;
    text-align: center;
    padding: 10px;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 2;
}

/* Lightbox styles */
.lightbox {
    display: none;
    position: fixed;
    z-index: 999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.8);
    justify-content: center;
    align-items: center;
}

.lightbox-content {
    max-width: 90%;
    max-height: 80%;
    object-fit: contain; /* Fit the image within the lightbox without cropping */
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 20px;
    color: #fff;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
}

.lightbox-caption {
    text-align: center;
    color: #fff;
    margin-top: 10px;
}

/* Base class for responsive height */
.responsive-padding {
    height: 20px; /* Default height for mobile devices */
  }
    /* Adjust height for tablets */
  @media (min-width: 768px) {
    .responsive-padding {
      height: 30px; /* Height for tablets */
    }
  }
    /* Adjust height for laptops */
  @media (min-width: 1024px) {
    .responsive-padding {
      height: 40px; /* Height for laptops */
    }
  }
    /* Adjust height for large monitors */
  @media (min-width: 1440px) {
    .responsive-padding {
      height: 50px; /* Height for large monitors */
    }
  }

/* 320px and less */
@media (max-width: 320px) {
    .slider-container, .gallery-title, .gallery-container {
        max-width: 80%;
        margin: 5px auto;
    }

    .gallery-item {
        width: calc(100% / 4 - 10px); /* 4 items per row */
    }
}

/* 375px and less */
@media (min-width: 321px) and (max-width: 375px) {
    .slider-container, .gallery-title, .gallery-container {
        max-width: 300px;
        margin: 10px auto;
    }

    .gallery-item {
        width: calc(100% / 4 - 10px); /* 4 items per row */
    }
}

/* 425px and less */
@media (min-width: 376px) and (max-width: 425px) {
    .slider-container, .gallery-title, .gallery-container {
        max-width: 340px;
        margin: 15px auto;
    }

    .gallery-item {
        width: calc(100% / 4 - 15px); /* 2 items per row */
    }
}

/* 768px and less */
@media (min-width: 426px) and (max-width: 768px) {
    .slider-container, .gallery-title, .gallery-container {
        max-width: 80%;
        margin: 20px auto;
    }

    .gallery-item {
        width: calc(100% / 6 - 15px); /* 3 items per row */
    }
}

/* 1024px and less */
@media (min-width: 769px) and (max-width: 1024px) {
    .slider-container, .gallery-title, .gallery-container {
        max-width: 810px;
        margin: 20px auto;
    }

    .gallery-item {
        width: calc(100% / 12 - 15px); /* 4 items per row */
    }
}

@media (min-width: 1025px)  and (max-width: 1439px) {
    .slider-container, .gallery-title, .gallery-container {
        max-width: 1150px; /* Set a maximum width for larger screens */
        margin: 20px auto;
    }

    .gallery-item {
        width: calc(100% / 15 - 15px); /* 15 items per row */
    }
}

@media (min-width: 1440px) and (max-width: 1799px) {
    .slider-container, .gallery-title, .gallery-container {
        max-width: 1270px; /* Set a maximum width for larger screens */
        margin: 20px auto;
    }

    .gallery-item {
        width: calc(100% / 15 - 15px); /* 15 items per row */
    }
}

@media (min-width: 1800px) and (max-width: 2199px)  {
    .slider-container, .gallery-title, .gallery-container {
        max-width: 1750px; /* Set a maximum width for larger screens */
        margin: 20px auto;
    }

    .gallery-item {
        width: calc(100% / 15 - 15px); /* 15 items per row */
    }
}


@media (min-width: 2200px)  {
    .slider-container, .gallery-title, .gallery-container {
        max-width: 2000px; /* Set a maximum width for larger screens */
        margin: 20px auto;
    }

    .gallery-item {
        width: calc(100% / 15 - 15px); /* 15 items per row */
    }
}

@media (min-height: 615px)  and (max-height: 800px) {
    .slider-container {
        max-height: 450px; /* Set a maximum width for larger screens */
    }
}

@media (min-height: 1100px)  {
    .slider-container {
        max-height: 950px; /* Set a maximum width for larger screens */
        min-height: 940px;
    }
}

@media (min-height: 550px)  and (max-height: 614px) {
    .slider-container {
        max-height: 400px; /* Set a maximum width for larger screens */
    }
}

/* Default styles for gallery-title */
.gallery-title {
    text-align: center;  /* Center the title */
    font-size: 1.5rem;   /* Default font size */
    margin: 10px 0;
}


/* 320px and less */
@media (max-width: 320px) {
    .gallery-title {
        font-size: 1rem; /* Smaller font size for very small screens */
    }
}

/* 375px and less */
@media (min-width: 321px) and (max-width: 375px) {
    .gallery-title {
        font-size: 1rem;
    }
}

/* 425px and less */
@media (min-width: 376px) and (max-width: 425px) {
    .gallery-title {
        font-size: 1.25rem;
    }
}

/* 768px and less */
@media (min-width: 426px) and (max-width: 768px) {
    .gallery-title {
        font-size: 1.25rem;
    }
}

/* 1024px and less */
@media (min-width: 769px) and (max-width: 1024px) {
    .gallery-title {
        font-size: 1.24rem;
    }
}

/* 1025px to 1439px */
@media (min-width: 1025px) and (max-width: 1439px) {
    .gallery-title {
        font-size: 1.5rem;
    }
}

/* 1440px and above */
@media (min-width: 1440px) {
    .gallery-title {
        font-size: 1.5rem;
    }
}

