/* Gallery image zoom effect */
#gallery div img {
    transition: transform 0.3s ease;
    /* smooth animation */
}

#gallery div:hover img {
    transform: scale(1.1);
    /* zoom-in on hover */
}

/* Optional: add a little lift effect on thumbnail hover */
#gallery div:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
}

/* Gallery Title */
#galleryTitle {
    text-align: center;
    font-size: 20px;
    font-weight: 800;
    margin-top: 20px;
    margin-bottom: 10px;
    color: #fff;
    background: linear-gradient(135deg, #1c6a91, #2d7da4, #195c84);
    padding: 14px 25px;
    border-radius: 8px;
    display: inline-block;
    left: 50%;
    position: relative;
    transform: translateX(-50%);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Gallery Grid */
#gallery {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 15px;
    padding: 20px;
}

/* Modal */
#imageModal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    cursor: pointer;
    overflow: auto;
    -webkit-overflow-scrolling: touch;
}

/* Close Button */
#closeBtn {
    position: fixed;
    top: 15px;
    right: 15px;
    color: #fff;
    font-size: 35px;
    font-weight: bold;
    cursor: pointer;
    z-index: 10000;
    background: rgba(0, 0, 0, 0.5);
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

/* Previous Button */
#prevBtn {
    position: fixed;
    top: 50%;
    left: 15px;
    transform: translateY(-50%);
    color: #fff;
    font-size: 40px;
    padding: 10px;
    cursor: pointer;
    user-select: none;
    z-index: 10000;
}

/* Next Button */
#nextBtn {
    position: fixed;
    top: 50%;
    right: 15px;
    transform: translateY(-50%);
    color: #fff;
    font-size: 40px;
    padding: 10px;
    cursor: pointer;
    user-select: none;
    z-index: 10000;
}

/* Modal Image */
#modalImage {
    margin: auto;
    display: block;
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    padding: 60px 20px 70px 20px; /* bottom space for buttons */
    cursor: default;
}

/* Modal Bottom Buttons */
#modalButtons {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 15px;
    z-index: 10001;
}

@media (max-width: 768px) {
    #gallery {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)) !important;
        gap: 10px !important;
        padding: 10px !important;
    }

    #imageModal {
        padding: 0;
    }

    #modalImage {
        padding: 50px 10px 60px 10px !important;
        max-height: calc(100vh - 20px) !important;
    }

    #closeBtn {
        top: 10px !important;
        right: 10px !important;
        font-size: 30px !important;
        width: 40px !important;
        height: 40px !important;
    }
}
@media (max-width: 768px) {
    /* Gallery Title adjustments for mobile */
    #galleryTitle {
        display: block; /* make it block-level */
        position: static; /* remove relative positioning */
        transform: none; /* remove translate */
        font-size: 16px; /* smaller font size */
        padding: 10px 15px; /* left/right spacing */
        margin: 20px auto 10px; /* top/bottom spacing and center with auto margins */
        word-break: break-word; /* prevent text overflow */
        max-width: 95%; /* optional: prevent it from touching edges */
    }
}

/* Container for the main ad */
.ad-container {
    background-color: rgb(224 242 254 / var(--tw-bg-opacity, 1));
    border-radius: 10px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    padding: 1rem;
}

/* Left content */
.ad-left {
    flex: 0 0 75%; /* 9/12 columns equivalent */
    max-width: 75%;
}

.ad-left h4 {
    font-size: 20px;
    font-weight: 700;
    color: #1a2b48;
    margin-bottom: 10px;
}

.ad-left p {
    font-size: 14px;
    color: #444;
    margin-bottom: 16px;
}

/* Button */
.ad-left .btn {
    border: 1px solid #007bff;
    color: #007bff;
    border-radius: 6px;
    font-size: 13px;
    padding: 6px 14px;
}

.ad-left .btn i {
    margin-right: 4px;
    font-size: 14px;
}

/* Right image */
.ad-right {
    flex: 0 0 25%; /* 3/12 columns equivalent */
    max-width: 25%;
    text-align: right;
}

.ad-right img {
    max-height: 150px;
    width: auto;
}

/* Other ad boxes */
.ad-box {
    border-radius: 6px;
    padding: 1rem;
    margin-bottom: 1.5rem;
}

.ad-box-1 {
    background: #eef7ff;
    border: 1px dashed #99c2ff;
}

.ad-box-1 p {
    margin: 0;
    color: #186eba;
    font-weight: 600;
}

.ad-box-2 {
    background: #fff8e1;
    border: 1px dashed #ffcc00;
}

.ad-box-2 p {
    margin: 0;
    color: #8a6d3b;
    font-weight: 600;
}

.ad-box img {
    max-width: 100%;
    height: auto;
    margin-top: 8px;
}

/* Disable hover for ad block */
#gallery .ad-container,
#gallery .ad-container:hover,
#gallery .ad-container * {
    transform: none !important;
    box-shadow: none !important;
    cursor: default !important;
}

@media (max-width: 768px) {
   
    /* Fix image overflow issue */
    .ad-right img {
        width: 100%;
        max-width: 100%;
        height: auto;
        margin-top: 10px;
        border-radius: 8px;
        display: block;
    }
}
