/**
 * Destination Details - Styles
 * CSS for destination details page including lightbox and gallery
 */

/* Famous Places Styling */
.famous-place-item:last-child {
    border-bottom: none !important;
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
}

/* Related Items Hover Effect */
.related-item:hover {
    background: #f8f9fa;
    transform: translateX(5px);
}

/* Breadcrumb Separator Color */
.breadcrumb-item + .breadcrumb-item::before {
    color: rgba(255,255,255,0.5);
}

/* Gallery Styles */
.gallery-item-wrapper {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
}

.gallery-image {
    transition: all 0.3s ease;
}

.gallery-item-wrapper:hover .gallery-image {
    transform: scale(1.1);
}

.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: 8px;
}

.gallery-item-wrapper:hover .gallery-overlay {
    opacity: 1;
}

.gallery-overlay i {
    color: white;
    font-size: 2rem;
}

/* Custom Badge Colors */
.bg-purple {
    background-color: #9333ea !important;
}

.bg-brown {
    background-color: #92400e !important;
}

/* Destination Lightbox Modal */
.destination-lightbox-modal {
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.destination-lightbox-modal .lightbox-close {
    position: absolute;
    top: 20px;
    right: 35px;
    color: #fff;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    z-index: 10001;
    transition: 0.3s;
}

.destination-lightbox-modal .lightbox-close:hover {
    color: #bbb;
}

.destination-lightbox-modal .lightbox-content {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.destination-lightbox-modal .lightbox-image-container {
    max-width: 95%;
    max-height: 95vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.destination-lightbox-modal .lightbox-image {
    max-width: 90vw;
    max-height: 80vh;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.5);
}

.destination-lightbox-modal .lightbox-caption {
    text-align: center;
    color: #fff;
    padding: 10px 20px;
    max-width: 800px;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 8px;
    margin-top: 15px;
}

.destination-lightbox-modal .lightbox-caption h5 {
    font-size: 1.3rem;
    margin-bottom: 5px;
    font-weight: 600;
}

.destination-lightbox-modal .lightbox-counter {
    margin-top: 10px;
    font-size: 1rem;
    color: #fff;
    background: rgba(255,255,255,0.1);
    padding: 5px 15px;
    border-radius: 20px;
    display: inline-block;
}

.destination-lightbox-modal .lightbox-prev,
.destination-lightbox-modal .lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(255, 255, 255, 0.1);
    color: white;
    border: none;
    font-size: 30px;
    padding: 15px 20px;
    cursor: pointer;
    transition: 0.3s;
    border-radius: 5px;
    z-index: 10000;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.destination-lightbox-modal .lightbox-prev:hover,
.destination-lightbox-modal .lightbox-next:hover {
    background-color: rgba(255, 255, 255, 0.3);
}

.destination-lightbox-modal .lightbox-prev {
    left: 20px;
}

.destination-lightbox-modal .lightbox-next {
    right: 20px;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .destination-lightbox-modal .lightbox-image {
        max-height: 70vh;
        max-width: 95vw;
    }
    
    .destination-lightbox-modal .lightbox-prev,
    .destination-lightbox-modal .lightbox-next {
        padding: 10px 15px;
        font-size: 24px;
        width: 50px;
        height: 50px;
    }
    
    .destination-lightbox-modal .lightbox-close {
        font-size: 30px;
        top: 10px;
        right: 15px;
    }
}

/* Enhanced Section Headers with Subtitles */
.section-header {
    border-left: 4px solid #0d6efd;
    padding-left: 15px;
    margin-bottom: 15px;
}

.section-header h5 {
    margin-bottom: 3px;
}

.section-header small {
    display: block;
    font-style: italic;
    color: #6c757d;
}

/* Content Text Formatting */
.content-text {
    font-size: 16px;
    color: #495057;
    text-align: justify;
}

.content-text p {
    margin-bottom: 1rem;
}

/* Overview Section - Always Visible */
.overview-section {
    background: linear-gradient(to right, #f8f9fa 0%, #ffffff 100%);
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

/* Content Section Wrapper */
.content-section-wrapper {
    background: #ffffff;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #e9ecef;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
}

.content-section-wrapper:hover {
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

/* Read More / View More Button */
.view-more-btn {
    cursor: pointer;
    font-weight: 500;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 24px;
    border-radius: 25px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.view-more-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.view-more-btn i {
    transition: transform 0.3s ease;
}

.view-more-btn:hover i {
    transform: scale(1.2);
}

/* Content Sections with Smooth Animations */
.content-section {
    margin-bottom: 1rem;
    transition: all 0.5s ease;
}

.content-section-collapsed {
    max-height: 180px;
    overflow: hidden;
    position: relative;
}

.content-section-collapsed::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 80px;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0), rgba(255, 255, 255, 1));
    pointer-events: none;
}

.content-section-expanded {
    max-height: none;
    animation: expandSection 0.5s ease-out;
}

@keyframes expandSection {
    from {
        max-height: 180px;
    }
    to {
        max-height: 3000px;
    }
}

/* Content Preview Line Clamp */
.content-preview {
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Admin Preview Container */
.preview-container {
    max-height: 500px;
    overflow-y: auto;
    padding: 10px;
}

.preview-container::-webkit-scrollbar {
    width: 8px;
}

.preview-container::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.preview-container::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

.preview-container::-webkit-scrollbar-thumb:hover {
    background: #555;
}
