/* Tours (/tours, /tours/{slug}) — builds on pages.css (.pg, .pg-hero, .pg-content, .pg-box) */

/* Index: toolbar */
.tr-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 26px;
    padding: 12px;
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 16px 40px rgba(17, 14, 63, .1);
}

.tr-tabs {
    display: flex;
    gap: 6px;
    padding: 4px;
    border-radius: 14px;
    background: var(--pg-bg);
}

.tr-tab {
    height: 40px;
    padding: 0 18px;
    border-radius: 11px;
    font-size: 14px;
    font-weight: 700;
    color: var(--pg-muted);
    background: transparent;
    cursor: pointer;
    transition: background-color .15s, color .15s, box-shadow .15s;
}

.tr-tab:hover {
    color: var(--pg-navy);
}

.tr-tab.is-active {
    color: #fff;
    background: var(--pg-navy);
    box-shadow: 0 6px 14px rgba(17, 14, 63, .2);
}

.tr-tab small {
    margin-right: 4px;
    font-weight: 400;
    opacity: .7;
}

.tr-search {
    position: relative;
    flex: 1 1 260px;
    max-width: 380px;
}

.tr-search input {
    width: 100%;
    height: 48px;
    padding: 0 46px 0 16px;
    border: 1px solid var(--pg-border);
    border-radius: 14px;
    background: #fff;
    font-size: 14px;
    color: var(--pg-navy);
    outline: none;
    transition: border-color .15s, box-shadow .15s;
}

.tr-search input:focus {
    border-color: var(--pg-orange);
    box-shadow: 0 0 0 4px rgba(246, 130, 22, .14);
}

.tr-search i {
    position: absolute;
    top: 50%;
    right: 18px;
    transform: translateY(-50%);
    color: #9a9bb0;
}

/* Index: cards */
.tr-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 22px;
}

.tr-card {
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid var(--pg-border);
    border-radius: 20px;
    overflow: hidden;
    color: var(--pg-navy);
    box-shadow: 0 6px 18px rgba(17, 14, 63, .05);
    transition: transform .25s, box-shadow .25s, border-color .25s;
}

.tr-card:hover {
    color: var(--pg-navy);
    transform: translateY(-6px);
    border-color: rgba(246, 130, 22, .45);
    box-shadow: 0 22px 44px rgba(17, 14, 63, .14);
}

.tr-card__media {
    position: relative;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: #e9e8f1;
}

.tr-card__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .6s ease;
}

.tr-card:hover .tr-card__media img {
    transform: scale(1.08);
}

.tr-card__media::after {
    content: "";
    position: absolute;
    inset: auto 0 0;
    height: 45%;
    background: linear-gradient(to top, rgba(9, 8, 35, .55), transparent);
    pointer-events: none;
}

.tr-badge {
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    color: var(--pg-navy);
    background: rgba(255, 255, 255, .92);
    backdrop-filter: blur(6px);
}

.tr-badge i {
    color: var(--pg-orange);
}

.tr-card__duration {
    position: absolute;
    bottom: 12px;
    right: 14px;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #fff;
}

.tr-card__body {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 18px 18px 16px;
}

.tr-card__title {
    font-size: 16px;
    font-weight: 800;
    line-height: 1.8;
    margin: 0;
}

.tr-card__facts {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.tr-fact {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    max-width: 100%;
    padding: 4px 10px;
    border-radius: 8px;
    font-size: 12px;
    color: var(--pg-muted);
    background: var(--pg-bg);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tr-fact i {
    color: var(--pg-orange);
    font-size: 11px;
}

.tr-card__foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
    padding-top: 12px;
    border-top: 1px dashed var(--pg-border);
    font-size: 13px;
    font-weight: 700;
    color: var(--pg-orange-dark);
}

.tr-card__foot span:last-child {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--pg-navy);
    background: var(--pg-bg);
    transition: background-color .2s, color .2s, transform .2s;
}

.tr-card:hover .tr-card__foot span:last-child {
    color: #fff;
    background: var(--pg-orange);
    transform: translateX(-3px);
}

.tr-pagination {
    margin-top: 36px;
    display: flex;
    justify-content: center;
}

.tr-pagination .pagination {
    gap: 6px;
}

.tr-pagination .page-link {
    min-width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 12px !important;
    color: var(--pg-navy);
    background: #fff;
    box-shadow: 0 4px 12px rgba(17, 14, 63, .06);
}

.tr-pagination .active > .page-link,
.tr-pagination .page-item.active .page-link {
    color: #fff;
    background: var(--pg-navy);
}

/* Show: gallery */
.tr-gallery {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 8px;
    height: 420px;
    margin-bottom: 24px;
    padding: 8px;
    background: #fff;
    border-radius: 22px;
    box-shadow: 0 18px 44px rgba(17, 14, 63, .1);
}

.tr-gallery__item {
    position: relative;
    display: block;
    overflow: hidden;
    border-radius: 14px;
    background: #e9e8f1;
}

.tr-gallery__item:first-child {
    grid-row: span 2;
}

.tr-gallery__item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .5s ease;
}

.tr-gallery__item:hover img {
    transform: scale(1.06);
}

.tr-gallery__more {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 15px;
    font-weight: 700;
    color: #fff;
    background: rgba(9, 8, 35, .55);
}

.tr-gallery__more i {
    font-size: 22px;
}

.tr-gallery.is-single {
    grid-template-columns: 1fr;
    grid-template-rows: 1fr;
}

.tr-gallery.is-single .tr-gallery__item:first-child {
    grid-row: auto;
}

.tr-gallery.is-few {
    grid-template-columns: 2fr 1fr;
}

/* Show: feature tiles */
.tr-features {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 12px;
    margin-bottom: 32px;
}

.tr-feature {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px;
    border: 1px solid var(--pg-border);
    border-radius: 16px;
    background: #fff;
}

.tr-feature__icon {
    flex: 0 0 42px;
    height: 42px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 17px;
    color: var(--pg-orange);
    background: rgba(246, 130, 22, .1);
}

.tr-feature__label {
    display: block;
    font-size: 12px;
    color: #8a8b9e;
}

.tr-feature__value {
    display: block;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.7;
    color: var(--pg-navy);
}

.tr-section-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 19px;
    font-weight: 800;
    color: var(--pg-navy);
    margin: 0 0 16px;
}

.tr-section-title::before {
    content: "";
    flex: 0 0 6px;
    height: 22px;
    border-radius: 4px;
    background: var(--pg-orange);
}

/* Show: FAQ */
.tr-faq {
    margin-top: 36px;
    padding-top: 28px;
    border-top: 1px dashed var(--pg-border);
}

.tr-faq__item {
    border: 1px solid var(--pg-border);
    border-radius: 14px;
    margin-bottom: 10px;
    overflow: hidden;
    transition: border-color .15s, box-shadow .15s;
}

.tr-faq__item[open] {
    border-color: rgba(246, 130, 22, .45);
    box-shadow: 0 10px 24px rgba(17, 14, 63, .06);
}

.tr-faq__item summary {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 18px;
    font-size: 15px;
    font-weight: 700;
    color: var(--pg-navy);
    cursor: pointer;
    list-style: none;
}

.tr-faq__item summary::-webkit-details-marker {
    display: none;
}

.tr-faq__item summary > i:first-child {
    color: var(--pg-orange);
}

.tr-faq__item summary > span {
    flex: 1;
    line-height: 1.8;
}

.tr-faq__item summary > i:last-child {
    font-size: 12px;
    color: #9a9bb0;
    transition: transform .2s;
}

.tr-faq__item[open] summary > i:last-child {
    transform: rotate(180deg);
    color: var(--pg-orange);
}

.tr-faq__answer {
    padding: 0 18px 18px 18px;
    font-size: 14px;
    line-height: 2.1;
    color: #4a4a5a;
}

/* Show: aside */
.tr-help__phone {
    display: block;
    direction: ltr;
    font-size: 22px;
    font-weight: 800;
    letter-spacing: .5px;
    color: #fff;
    margin-bottom: 16px;
}

.tr-help__hours {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: rgba(255, 255, 255, .72);
    margin-bottom: 4px;
}

.tr-help__hours i {
    color: var(--pg-orange);
}

.tr-facts-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.tr-facts-list li {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 9px 0;
    font-size: 13px;
    color: var(--pg-muted);
    border-bottom: 1px dashed var(--pg-border);
}

.tr-facts-list li:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.tr-facts-list strong {
    color: var(--pg-navy);
    text-align: left;
}

.tr-back {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 46px;
    border-radius: 14px;
    font-size: 14px;
    font-weight: 700;
    color: var(--pg-navy);
    background: #fff;
    box-shadow: 0 10px 30px rgba(17, 14, 63, .06);
    transition: color .15s;
}

.tr-back:hover {
    color: var(--pg-orange-dark);
}

@media (max-width: 991.98px) {
    .tr-gallery {
        height: 340px;
    }
}

@media (max-width: 767.98px) {
    .tr-toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .tr-tabs {
        justify-content: stretch;
    }

    .tr-tab {
        flex: 1;
        padding: 0 8px;
    }

    .tr-search {
        max-width: none;
        flex-basis: auto;
    }

    .tr-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .tr-gallery,
    .tr-gallery.is-few {
        grid-template-columns: 1fr 1fr;
        grid-template-rows: 220px 90px;
        height: auto;
    }

    .tr-gallery__item:first-child {
        grid-column: span 2;
        grid-row: auto;
    }

    .tr-gallery__item:nth-child(n+4) {
        display: none;
    }

    .tr-gallery.is-single {
        grid-template-columns: 1fr;
        grid-template-rows: 240px;
    }

    .tr-gallery.is-single .tr-gallery__item:first-child {
        grid-column: auto;
    }

    .tr-features {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }

    .tr-feature {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
        padding: 12px;
    }
}


@media (min-width: 768px) {
    .tr-gallery.is-few .tr-gallery__item:nth-child(2):last-child {
        grid-row: span 2;
    }
}

.pg-help .pg-box__title {
    color: #fff;
    border-color: rgba(255, 255, 255, .15);
}
