﻿/* ServicesUnits.css */
.cave-booking .container {
    /*max-width: 1000px;*/
    margin: 0 auto;
    padding: 2rem;
    background: var(--container-bg, #fcfaf7);
    border-radius: 2.5rem;
    box-shadow: 0 30px 50px -20px rgba(0,0,0,0.2);
}

.card {
    border: 1px solid var(--card-border, #6A8D92);
    border-radius: 1.2rem;
    overflow: hidden;
    transition: 0.2s;
    background: var(--card-bg, #FAF6EF);
    display: flex;
    flex-direction: column;
    height: 100%;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
}

    .card:hover {
        transform: translateY(-4px);
        box-shadow: 0 12px 24px -10px rgba(0,0,0,0.12);
        border-color: var(--card-title);
    }

.card-img-top {
    width: 100%;
    height: 200px;
    object-fit: cover;
    background: #f0f0f0;
}

.card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 0.5rem 1.2rem 0.5rem;
    text-align: center;
}

.card-title {
    font-size: 1.6rem;
    font-weight: 600;
    color: var(--card-title);
    margin-bottom: 0rem;
    padding-bottom: 0.5rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-decoration: none !important;
}

.btn-back {
    background: #e5dfd7;
    color: #385542;
    border-radius: 40px;
    border: none;
    padding: 0.5rem 1.5rem;
    text-decoration: none;
    display: inline-block;
    transition: all 0.2s ease;
}

    .btn-back:hover {
        background: #d4cbbc;
        transform: translateY(-2px);
        color: #385542;
    }

/* Service Modal */
.modal-dialog {
    max-width: 900px;
}

.modal-content {
    border-radius: 2rem;
    overflow: hidden;
}

.modal-header {
    border-bottom: 1px solid #e0d6cc;
    padding: 1.5rem;
}

    .modal-header .btn-close {
        font-size: 1.5rem;
    }

.modal-title {
    font-size: 2rem;
    color: #2f4a3b;
    font-weight: 600;
}

.modal-body {
    padding: 2rem;
}

.service-writeup {
    white-space: pre-wrap;
    line-height: 1.8;
    font-size: 1.1rem;
    color: #2f4a3b;
    text-align: justify;
    margin-bottom: 1.5rem;
}

.modal-footer {
    border-top: 1px solid #e0d6cc;
    padding: 1rem 1.5rem;
}

    .modal-footer .btn-secondary {
        background: #e5dfd7;
        color: #385542;
        border-radius: 40px;
        border: none;
        padding: 0.5rem 1.5rem;
        transition: all 0.2s ease;
    }

        .modal-footer .btn-secondary:hover {
            background: #d4cbbc;
            color: #385542;
        }

/* Gallery Button */
.btn-gallery {
    background: #3b5e4a;
    color: white;
    border: none;
    border-radius: 40px;
    padding: 0.5rem 1.5rem;
    transition: all 0.2s ease;
}

    .btn-gallery:hover {
        background: #2f4f3c;
        transform: scale(1.02);
        color: white;
    }

/* Gallery Modal */
.gallery-modal .modal-dialog {
    max-width: 95vw;
    width: 95vw;
}

.gallery-modal .modal-content {
    border-radius: 2rem;
    overflow: hidden;
    max-height: 95vh;
}

.gallery-modal .modal-header {
    border-bottom: 1px solid #e0d6cc;
    padding: 1rem 1.5rem;
    flex-shrink: 0;
}

    .gallery-modal .modal-header .btn-close {
        font-size: 1.5rem;
    }

.gallery-modal .modal-title {
    font-size: 1.8rem;
    color: #2f4a3b;
    font-weight: 600;
}

.gallery-modal .modal-body {
    padding: 1rem;
    overflow-y: auto;
    flex: 1;
}

.gallery-modal .modal-footer {
    flex-shrink: 0;
    padding: 0.75rem 1.5rem;
    border-top: 1px solid #e0d6cc;
}

/* Carousel */
.gallery-modal .carousel {
    border-radius: 1rem;
    overflow: hidden;
    background: #f5f3f0;
    position: relative;
}

.gallery-modal .carousel-inner {
    position: relative;
    width: 100%;
    overflow: hidden;
    background: #f5f3f0;
    min-height: 200px;
}

    .gallery-modal .carousel-inner img {
        width: 100%;
        height: auto;
        max-height: 60vh;
        object-fit: contain;
        background: #f5f3f0;
    }

.gallery-modal .carousel-control-prev,
.gallery-modal .carousel-control-next {
    position: absolute;
    top: 0;
    bottom: 0;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 12%;
    color: #fff;
    text-align: center;
    opacity: 0.4;
    transition: opacity 0.15s ease;
    background: rgba(0,0,0,0.2);
    border: none;
    cursor: pointer;
}

.gallery-modal .carousel-control-prev {
    left: 0;
}

.gallery-modal .carousel-control-next {
    right: 0;
}

    .gallery-modal .carousel-control-prev:hover,
    .gallery-modal .carousel-control-next:hover {
        opacity: 0.9;
        background: rgba(0,0,0,0.3);
    }

.gallery-modal .carousel-control-prev-icon,
.gallery-modal .carousel-control-next-icon {
    display: inline-block;
    width: 2rem;
    height: 2rem;
    background-repeat: no-repeat;
    background-position: 50%;
    background-size: 100% 100%;
}

.gallery-modal .carousel-control-prev-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23fff'%3e%3cpath d='M11.354 1.646a.5.5 0 0 1 0 .708L5.707 8l5.647 5.646a.5.5 0 0 1-.708.708l-6-6a.5.5 0 0 1 0-.708l6-6a.5.5 0 0 1 .708 0z'/%3e%3c/svg%3e");
}

.gallery-modal .carousel-control-next-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23fff'%3e%3cpath d='M4.646 1.646a.5.5 0 0 1 .708 0l6 6a.5.5 0 0 1 0 .708l-6 6a.5.5 0 0 1-.708-.708L10.293 8 4.646 2.354a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e");
}

/* Custom indicators - FIXED: Higher z-index to show above image */
#galleryIndicators {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 10;
    display: flex;
    justify-content: center;
    padding: 0;
    margin: 0 15% 0.75rem 15%;
    list-style: none;
    gap: 8px;
    flex-wrap: wrap;
    pointer-events: none;
}

    #galleryIndicators button {
        width: 14px;
        height: 14px;
        border-radius: 50%;
        border: 2px solid rgba(255,255,255,0.9);
        margin: 0;
        padding: 0;
        background: rgba(255,255,255,0.4);
        opacity: 0.7;
        transition: all 0.3s ease;
        text-indent: -9999px;
        cursor: pointer;
        flex-shrink: 0;
        pointer-events: auto;
        box-shadow: 0 1px 4px rgba(0,0,0,0.3);
    }

        #galleryIndicators button.active {
            background: #3b5e4a;
            opacity: 1;
            border-color: #3b5e4a;
            transform: scale(1.3);
            box-shadow: 0 2px 8px rgba(59, 94, 74, 0.5);
        }

        #galleryIndicators button:hover {
            opacity: 1;
            transform: scale(1.15);
        }

/* Thumbnail Strip */
.gallery-thumbnails-strip {
    display: flex;
    gap: 6px;
    padding: 10px 0;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
}

    .gallery-thumbnails-strip::-webkit-scrollbar {
        height: 4px;
    }

    .gallery-thumbnails-strip::-webkit-scrollbar-track {
        background: #f0ece7;
        border-radius: 4px;
    }

    .gallery-thumbnails-strip::-webkit-scrollbar-thumb {
        background: #3b5e4a;
        border-radius: 4px;
    }

.gallery-thumbnail-item {
    flex: 0 0 80px;
    height: 60px;
    border-radius: 6px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.2s ease;
    opacity: 0.6;
    position: relative;
}

    .gallery-thumbnail-item:hover {
        opacity: 0.9;
        transform: scale(1.05);
    }

    .gallery-thumbnail-item.active {
        border-color: #3b5e4a;
        opacity: 1;
        transform: scale(1.05);
        box-shadow: 0 2px 8px rgba(59, 94, 74, 0.3);
    }

    .gallery-thumbnail-item img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    .gallery-thumbnail-item .thumb-overlay {
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0,0,0,0.3);
        display: flex;
        align-items: center;
        justify-content: center;
        opacity: 0;
        transition: opacity 0.2s ease;
    }

    .gallery-thumbnail-item:hover .thumb-overlay {
        opacity: 1;
    }

    .gallery-thumbnail-item .thumb-overlay i {
        color: white;
        font-size: 16px;
    }

/* No images */
.no-images {
    text-align: center;
    color: #8f9e95;
    padding: 2rem;
    background: #f5f3f0;
    border-radius: 1rem;
}

    .no-images i {
        font-size: 2.5rem;
        display: block;
        margin-bottom: 0.5rem;
    }

.spinner-overlay {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    min-height: 200px;
}

.empty-state {
    padding: 3rem 1rem;
    text-align: center;
}

    .empty-state i {
        font-size: 3rem;
        color: #cdbfb0;
        margin-bottom: 1rem;
    }

    .empty-state h5 {
        color: #2f4a3b;
        margin-bottom: 0.5rem;
    }

    .empty-state p {
        color: #8f9e95;
    }

/* Responsive */
@media (max-width: 992px) {
    .gallery-modal .modal-dialog {
        max-width: 98vw;
        width: 98vw;
    }

    .gallery-modal .modal-body {
        padding: 0.75rem;
    }

    .gallery-modal .carousel-inner img {
        max-height: 50vh;
    }
}

@media (max-width: 768px) {
    .card-title {
        font-size: 1.3rem;
    }

    .card-img-top {
        height: 150px;
    }

    .gallery-modal .modal-title {
        font-size: 1.2rem;
    }

    .gallery-modal .modal-dialog {
        max-width: 100vw;
        width: 100vw;
        margin: 0;
        max-height: 100vh;
    }

    .gallery-modal .modal-content {
        border-radius: 0;
        max-height: 100vh;
    }

    .gallery-modal .modal-body {
        max-height: 80vh;
        padding: 0.5rem;
    }

    .gallery-modal .carousel-inner img {
        max-height: 40vh;
    }

    .gallery-modal .carousel-control-prev,
    .gallery-modal .carousel-control-next {
        width: 10%;
    }

    #galleryIndicators {
        margin: 0 10% 0.5rem 10%;
    }

        #galleryIndicators button {
            width: 12px;
            height: 12px;
        }

    .gallery-thumbnail-item {
        flex: 0 0 60px;
        height: 45px;
    }
}

@media (max-width: 576px) {
    .card-title {
        font-size: 1.2rem;
    }

    .card-img-top {
        height: 120px;
    }

    .cave-booking .container {
        padding: 1rem;
        border-radius: 1.5rem;
    }

    .modal-title {
        font-size: 1.5rem;
    }

    .service-writeup {
        font-size: 1rem;
    }

    .modal-body {
        padding: 1rem;
    }

    .gallery-modal .modal-title {
        font-size: 1rem;
    }

    .gallery-modal .modal-header {
        padding: 0.75rem 1rem;
    }

    .gallery-modal .modal-body {
        padding: 0.5rem;
    }

    .gallery-modal .carousel-inner img {
        max-height: 35vh;
    }

    .gallery-modal .carousel-control-prev,
    .gallery-modal .carousel-control-next {
        width: 12%;
    }

    .spinner-overlay {
        min-height: 150px;
        padding: 1rem;
    }

    #galleryIndicators {
        margin: 0 8% 0.35rem 8%;
        gap: 5px;
    }

        #galleryIndicators button {
            width: 10px;
            height: 10px;
        }

    .gallery-thumbnail-item {
        flex: 0 0 50px;
        height: 38px;
    }
}
