/* ═══════════════════════════════════════════════════════════════
   TOUR DETAIL — Layout
═══════════════════════════════════════════════════════════════ */
.tour-meta-line {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    font-size: 0.95rem;
    color: #6c757d;
    margin-bottom: 1rem;
}

.tour-meta-line .meta-separator {
    color: #dee2e6;
}

.tour-meta-line .meta-item {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
}

.category-pill {
    background: var(--primary-color, #3498db);
    color: white;
    padding: 4px 14px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

/* ═══════════════════════════════════════════════════════════════
   Gallery — Bento Grid (Desktop)
═══════════════════════════════════════════════════════════════ */
.gallery-bento {
    display: grid;
    grid-template-columns: 3fr 2fr;
    grid-template-rows: 1fr 1fr 1fr;
    gap: 6px;
    border-radius: 16px;
    overflow: hidden;
    height: 420px;
    margin-bottom: 1.5rem;
}

.gallery-bento .gallery-main {
    grid-row: 1 / -1;
}

.gallery-bento a {
    display: block;
    overflow: hidden;
    position: relative;
}

.gallery-bento img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    cursor: pointer;
    transition: filter 0.2s ease, transform 0.3s ease;
}

.gallery-bento a:hover img {
    filter: brightness(0.85);
    transform: scale(1.03);
}

.gallery-more-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.gallery-more-overlay:hover {
    background: rgba(0, 0, 0, 0.65);
}

.gallery-empty {
    height: 420px;
    border-radius: 16px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
}

/* Portrait-first layout */
.gallery-bento--portrait {
    grid-template-columns: 2fr 3fr;
    height: 480px;
}

.gallery-bento--portrait .gallery-main {
    grid-column: 1;
}

/* Grid adaptation for photo count */
.gallery-bento--count-1 {
    grid-template-columns: 1fr;
    grid-template-rows: 1fr;
}

.gallery-bento--count-2 {
    grid-template-rows: 1fr;
}

.gallery-bento--count-3 {
    grid-template-rows: 1fr 1fr;
}

/* ═══════════════════════════════════════════════════════════════
   Gallery — Mobile Carousel
═══════════════════════════════════════════════════════════════ */
.gallery-mobile-wrap {
    display: none;
    position: relative;
    margin-bottom: 1.5rem;
}

.gallery-mobile {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    gap: 8px;
    border-radius: 16px;
    scrollbar-width: none;
}

.gallery-mobile::-webkit-scrollbar { display: none; }

.gallery-mobile-item {
    flex: 0 0 auto;
    height: 300px;
    max-width: 85%;
    min-width: 45%;
    scroll-snap-align: start;
    border-radius: 12px;
    overflow: hidden;
}

.gallery-mobile-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Counter badge "1 / 6" */
.gallery-mobile-counter {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(0, 0, 0, 0.55);
    color: #fff;
    font-size: 0.8rem;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 20px;
    backdrop-filter: blur(4px);
    z-index: 2;
    pointer-events: none;
}

/* Dot indicators */
.gallery-mobile-dots {
    display: flex;
    justify-content: center;
    gap: 6px;
    padding-top: 10px;
}

.gallery-mobile-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #d1d5db;
    transition: background 0.2s, transform 0.2s;
}

.gallery-mobile-dot--active {
    background: #4f46e5;
    transform: scale(1.3);
}

@media (max-width: 767.98px) {
    .gallery-bento { display: none; }
    .gallery-mobile-wrap { display: block; }
}

/* ═══════════════════════════════════════════════════════════════
   Gallery — Native Lightbox Dialog
═══════════════════════════════════════════════════════════════ */
.gallery-dialog {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    max-width: 100vw;
    max-height: 100vh;
    margin: 0;
    padding: 0;
    border: none;
    background: rgba(0, 0, 0, 0.92);
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.gallery-dialog::backdrop {
    background: rgba(0, 0, 0, 0.92);
}

.gallery-dialog[open] {
    display: flex;
}

.gallery-dialog-close {
    position: absolute;
    top: 16px;
    right: 20px;
    background: none;
    border: none;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    z-index: 10;
    line-height: 1;
    padding: 4px 8px;
    opacity: 0.8;
    transition: opacity 0.2s;
}

.gallery-dialog-close:hover {
    opacity: 1;
}

.gallery-dialog-counter {
    position: absolute;
    top: 20px;
    left: 20px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
    z-index: 10;
}

.gallery-dialog-img {
    max-width: 90vw;
    max-height: 85vh;
    object-fit: contain;
    border-radius: 4px;
}

.gallery-dialog-caption {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
    text-align: center;
    max-width: 80vw;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.gallery-dialog-prev,
.gallery-dialog-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.4);
    border: none;
    color: white;
    font-size: 2rem;
    padding: 8px 14px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 10;
    opacity: 0.8;
    transition: opacity 0.2s, background 0.2s;
}

.gallery-dialog-prev { left: 16px; }
.gallery-dialog-next { right: 16px; }

.gallery-dialog-prev:hover,
.gallery-dialog-next:hover {
    opacity: 1;
    background: rgba(0, 0, 0, 0.6);
}

/* ═══════════════════════════════════════════════════════════════
   Content Sections
═══════════════════════════════════════════════════════════════ */
.content-section {
    padding-top: 2rem;
    margin-top: 2rem;
    border-top: 1px solid #f0f0f0;
}

.content-section:first-child {
    border-top: none;
    padding-top: 0;
    margin-top: 0;
}

.content-section h3 {
    font-size: 1.35rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: #1a1a1a;
}

/* ═══════════════════════════════════════════════════════════════
   Description Collapse
═══════════════════════════════════════════════════════════════ */
.description-collapse {
    max-height: 200px;
    overflow: hidden;
    position: relative;
    transition: max-height 0.4s ease;
}

.description-collapse.expanded {
    max-height: none;
}

.description-collapse:not(.expanded)::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: linear-gradient(transparent, white);
}

/* ═══════════════════════════════════════════════════════════════
   Guide / Supplier Card
═══════════════════════════════════════════════════════════════ */
.supplier-card {
    border: 1px solid #e0e0e0;
    border-radius: 16px;
    padding: 1.25rem;
    background: white;
    transition: box-shadow 0.2s;
}

.supplier-card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.supplier-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.supplier-avatar-initials {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
    flex-shrink: 0;
}

/* ═══════════════════════════════════════════════════════════════
   Reviews
═══════════════════════════════════════════════════════════════ */
.rating-summary {
    display: flex;
    align-items: center;
    gap: 2rem;
    padding: 1.5rem;
    background: #f8f9fa;
    border-radius: 16px;
    margin-bottom: 1.5rem;
}

.rating-big-number {
    font-size: 3rem;
    font-weight: 700;
    color: #1a1a1a;
    line-height: 1;
}

.rating-stars-big .fas.fa-star {
    font-size: 1.1rem;
    color: #ffc107;
}

.review-card {
    border: 1px solid #f0f0f0;
    border-radius: 12px;
    padding: 1rem 1.25rem;
    margin-bottom: 0.75rem;
    transition: box-shadow 0.2s ease;
    background: white;
}

.review-card:hover {
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

.review-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.95rem;
    color: white;
    flex-shrink: 0;
}

.review-avatar.site { background: linear-gradient(135deg, #28a745, #20c997); }
.review-avatar.vk { background: linear-gradient(135deg, #0077FF, #45a5ff); }

.expand-btn {
    color: var(--primary-color, #3498db) !important;
    text-decoration: none !important;
    font-size: 0.85rem;
}

.expand-btn:hover {
    text-decoration: underline !important;
}

/* VK review images */
.vk-review-images {
    background: rgba(0, 119, 255, 0.04);
    border-radius: 8px;
    padding: 12px;
    border: 1px solid rgba(0, 119, 255, 0.08);
}

.vk-review-img {
    transition: transform 0.2s ease;
    max-height: 150px;
    border-radius: 6px;
}

.vk-review-img:hover {
    transform: scale(1.03);
}

.vk-image-link {
    text-decoration: none;
    display: block;
    position: relative;
    overflow: hidden;
    border-radius: 6px;
}

.vk-image-link::after {
    content: '\f002';
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    position: absolute;
    top: 6px;
    right: 6px;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    padding: 3px 5px;
    border-radius: 4px;
    font-size: 0.7rem;
    opacity: 0;
    transition: opacity 0.2s;
}

.vk-image-link:hover::after { opacity: 1; }

/* VK review videos */
.vk-review-videos {
    background: rgba(255, 107, 0, 0.04);
    border-radius: 8px;
    padding: 12px;
    border: 1px solid rgba(255, 107, 0, 0.08);
}

.vk-video-container {
    transition: transform 0.2s ease;
}

.vk-video-container:hover {
    transform: translateY(-2px);
}

/* Rating distribution bars */
.rating-bars {
    flex-grow: 1;
}

.rating-bar-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 2px;
    font-size: 0.8rem;
}

.rating-bar-label {
    width: 14px;
    text-align: right;
    color: #6c757d;
}

.rating-bar-track {
    flex-grow: 1;
    height: 8px;
    background: #f0f0f0;
    border-radius: 4px;
    overflow: hidden;
}

.rating-bar-fill {
    height: 100%;
    background: #ffc107;
    border-radius: 4px;
    transition: width 0.4s ease;
}

.rating-bar-count {
    width: 24px;
    font-size: 0.75rem;
    color: #6c757d;
}

/* ═══════════════════════════════════════════════════════════════
   Booking Widget (Sidebar)
═══════════════════════════════════════════════════════════════ */
.booking-widget {
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
    padding: 1.5rem;
    position: sticky;
    top: 80px;
}

.booking-widget:hover {
    box-shadow: 0 6px 32px rgba(0, 0, 0, 0.12);
}

.booking-widget .widget-price {
    font-size: 1.75rem;
    font-weight: 700;
    color: #1a1a1a;
    line-height: 1.2;
}

.booking-widget .widget-price-label {
    font-size: 0.85rem;
    color: #6c757d;
}

.booking-widget .form-select {
    border-radius: 10px;
    padding: 0.6rem 0.75rem;
    border-color: #e0e0e0;
    font-size: 0.9rem;
}

.booking-widget .form-select:focus {
    border-color: var(--primary-color, #3498db);
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.15);
}

.booking-widget .btn-book {
    border-radius: 12px;
    padding: 0.75rem;
    font-weight: 600;
    font-size: 1rem;
}

.booking-widget .trust-signals {
    border-top: 1px solid #f0f0f0;
    padding-top: 1rem;
    margin-top: 1rem;
}

/* Free cancellation trust signal (kept) */
.trust-signal-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8rem;
    color: #6c757d;
    padding: 4px 0;
}

.trust-signal-item i {
    font-size: 0.85rem;
    width: 16px;
    text-align: center;
}

/* Group pricing info box */
.group-pricing-info {
    background: linear-gradient(135deg, #e3f2fd 0%, #e0f7fa 100%);
    border-radius: 10px;
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
    border-left: 4px solid #0dcaf0;
}

/* Promocode collapsed */
.promocode-toggle {
    font-size: 0.85rem;
    color: var(--primary-color, #3498db);
    cursor: pointer;
    text-decoration: none;
}

.promocode-toggle:hover {
    text-decoration: underline;
}

/* ═══════════════════════════════════════════════════════════════
   Mobile CTA Bar
═══════════════════════════════════════════════════════════════ */
.mobile-cta-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.1);
    padding: 12px 16px;
    z-index: var(--z-navbar, 300);
    transition: transform 0.3s ease;
}

#mobile-booking-bar {
    transition: transform 0.3s ease;
    box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.1);
}

/* ═══════════════════════════════════════════════════════════════
   Bottom Sheet
═══════════════════════════════════════════════════════════════ */
.bottom-sheet-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 1040;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.bottom-sheet-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.bottom-sheet {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    border-radius: 16px 16px 0 0;
    box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.15);
    z-index: 1050;
    transform: translateY(100%);
    transition: transform 0.3s ease;
    max-height: 80vh;
    overflow-y: auto;
    padding: 0 16px 16px;
}

.bottom-sheet.open {
    transform: translateY(0);
}

.bottom-sheet-handle {
    width: 40px;
    height: 4px;
    background: #d1d5db;
    border-radius: 2px;
    margin: 12px auto 16px;
}

/* ═══════════════════════════════════════════════════════════════
   Question Dialog (native <dialog>)
═══════════════════════════════════════════════════════════════ */
.question-dialog {
    border: none;
    border-radius: 16px;
    padding: 1.5rem;
    max-width: 480px;
    width: calc(100% - 32px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
}

.question-dialog::backdrop {
    background: rgba(0, 0, 0, 0.4);
}

/* ═══════════════════════════════════════════════════════════════
   Recommendations (horizontal scroll)
═══════════════════════════════════════════════════════════════ */
.recommendations-scroll {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 8px;
}

.recommendations-scroll::-webkit-scrollbar { display: none; }

.recommendation-card {
    flex: 0 0 200px;
    scroll-snap-align: start;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #f0f0f0;
    background: white;
    transition: box-shadow 0.2s, transform 0.2s;
    text-decoration: none;
    color: inherit;
}

.recommendation-card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
    text-decoration: none;
    color: inherit;
}

.recommendation-card img {
    width: 100%;
    height: 130px;
    object-fit: cover;
}

.recommendation-card .card-body {
    padding: 10px 12px;
}

.recommendation-card .card-title {
    font-size: 0.85rem;
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 4px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.recommendation-card .card-price {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--primary-color, #3498db);
}

/* ═══════════════════════════════════════════════════════════════
   Booking Modal
═══════════════════════════════════════════════════════════════ */
#bookingModal .modal-content {
    border-radius: 16px;
    border: none;
}

#bookingModal .modal-header {
    border-bottom: 1px solid #f0f0f0;
    padding: 1.25rem 1.5rem;
}

#bookingModal .modal-body {
    padding: 1.5rem;
}

/* ═══════════════════════════════════════════════════════════════
   Animations
═══════════════════════════════════════════════════════════════ */
.fade-in-up {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.fade-in-up.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Skeleton loading */
.skeleton-text {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 4px;
}

.skeleton-name { width: 120px; height: 18px; }
.skeleton-stars { width: 100px; height: 16px; background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%); background-size: 200% 100%; animation: shimmer 1.5s infinite; border-radius: 4px; }
.skeleton-date { width: 80px; height: 14px; background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%); background-size: 200% 100%; animation: shimmer 1.5s infinite; border-radius: 4px; }
.skeleton-comment { width: 100%; height: 16px; }
.skeleton-comment-short { width: 70%; height: 16px; }

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

.review-fade-in {
    animation: reviewFadeIn 0.4s ease-out forwards;
    opacity: 0;
    transform: translateY(20px);
}

@keyframes reviewFadeIn {
    to { opacity: 1; transform: translateY(0); }
}

.review-fade-in:nth-child(1) { animation-delay: 0.05s; }
.review-fade-in:nth-child(2) { animation-delay: 0.1s; }
.review-fade-in:nth-child(3) { animation-delay: 0.15s; }
.review-fade-in:nth-child(4) { animation-delay: 0.2s; }
.review-fade-in:nth-child(5) { animation-delay: 0.25s; }
.review-fade-in:nth-child(6) { animation-delay: 0.3s; }

/* ═══════════════════════════════════════════════════════════════
   Responsive
═══════════════════════════════════════════════════════════════ */
@media (max-width: 991.98px) {
    .booking-widget {
        position: static;
        margin-bottom: 2rem;
    }
}

@media (max-width: 767.98px) {
    .rating-summary {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
    .vk-review-img { max-height: 120px; }
}
