/* Tour card — used in /tours/, /tour_categories/, sidebars and shortcodes via display_tour.php */

.tour-card {
    background: #fff;
    border: 0.5px solid rgba(0,0,0,0.12);
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: box-shadow 0.2s, transform 0.2s;
    margin-bottom: 30px;
}
.tour-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    transform: translateY(-2px);
}

.tour-card a:not(.tour-card__cta) { color: inherit; text-decoration: none; }
.tour-card a:not(.tour-card__cta):hover { color: inherit; text-decoration: none; }
.tour-card a:focus-visible { outline: 2px solid #185fa5; outline-offset: 2px; border-radius: 4px; }

.tour-card__image-wrap {
    position: relative;
    aspect-ratio: 16 / 10;
    overflow: hidden;
}
.tour-card__image-link {
    display: block;
    width: 100%;
    height: 100%;
}
.tour-card__image {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.tour-card__badges {
    position: absolute;
    top: 12px;
    left: 12px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    z-index: 2;
    max-width: calc(100% - 24px);
}
.tour-card__badge {
    font-size: 12px;
    font-weight: 600;
    padding: 5px 10px;
    border-radius: 8px;
    line-height: 1.1;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    background: #1A1A1A;
    color: #FFFFFF;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}
.tour-card__badge-icon {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}
.tour-card__badge--saving   { background: #1d497b; color: #FFFFFF; } /* granatowy — % rabat z dates_and_prices / discount_for_all */
.tour-card__badge--promo    { background: #FAB005; color: #FFFFFF; } /* żółty — tekst_specialny (legacy main.css .tour_item_image div) */

.tour-card__body {
    padding: 14px 16px 0;
    display: flex;
    flex-direction: column;
    flex: 1;
}
.tour-card__body .cat_title {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #888780;
    margin: 0 0 4px;
    line-height: 1.2;
    text-align: left;
}
.tour-card__title {
    font-family: 'Rubik', sans-serif;
    font-size: 18px;
    font-weight: 500;
    line-height: 1.3;
    color: #343A40;
    margin: 4px 0 8px;
}
.tour-card__title a { color: inherit; }
/* Sub-heading — sibling of h3, sits tight underneath the title. */
.tour-card__sub-heading {
    display: block;
    font-size: 13px;
    font-weight: 400;
    color: #5f5e5a;
    margin: -4px 0 8px;
    background: none;
    text-align: left;
    padding: 0;
}

.tour-card__meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #5f5e5a;
    padding-bottom: 10px;
    border-bottom: 0.5px solid rgba(0,0,0,0.08);
    margin-bottom: 12px;
    flex-wrap: wrap;
}
.tour-card__meta-info {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px 10px;
}
.tour-card__location,
.tour-card__duration-info,
.tour-card__group-info {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
}

/* Rating — match LP wzorzec: cyan #7CC7CB inherited from legacy main.css .tour_item_review.
   Neutralize main.css absolute positioning, font-size (24→14), and weight (500→inherit) — but keep the cyan color. */
.tour-card__meta .tour_item_review {
    position: static;
    bottom: auto;
    right: auto;
    top: auto;
    left: auto;
    text-align: left;
    display: inline-block;
    line-height: 1;
    margin: 0;
    padding: 0;
    font-size: 14px;
    color: #7CC7CB;
}
.tour-card__meta .modal_tour_rating {
    background-image: none;
    padding: 0;
    height: auto;
    font-size: 14px;
    color: #7CC7CB;
}
.tour-card__meta .av_rating { font-style: normal; }
/* Clickable rating → deep-link to the Reviews tab on the tour page (functions.php hash router
   opens #reviews_tab on load). Hover deepens the cyan (#7CC7CB → #3FA9AE), mirroring the CTA's
   color-shift hover; no underline, consistent with the card's no-underline link convention
   (.tour-card a:not(.tour-card__cta):hover sets text-decoration:none, spec 0,3,1).
   The visible color sits on the inner .modal_tour_rating span (spec 0,2,0), so the hover must
   target that span with enough specificity (0,4,0) — recoloring the <a> alone wouldn't show. */
.tour-card__meta .tour_item_review__link { color: inherit; text-decoration: none; cursor: pointer; }
.tour-card__meta .tour_item_review__link .modal_tour_rating { transition: color 0.2s; }
.tour-card__meta .tour_item_review__link:hover .modal_tour_rating { color: #3FA9AE; }

/* Bezpiecznik na reguły z main.css, które wygrywają w kaskadzie gdy kafelek
   renderuje się WEWNĄTRZ `.post_content` (shortcode "Explore … with StayPoland"
   w treści artykułu). Sprawcy:
     - `.post_content ul li`        (spec 0,1,2) → font-size:1.5rem; line-height:1.7
                                     = napompowany tekst, przez co kropka odjeżdża
     - `.post_content ul li:before` (spec 0,1,3) → content:"•"; top:-10px; left:-20px;
                                     font-size:28px = cyjanowy punkt poza/ponad kafelkiem
   Nasze selektory `.tour-card__highlights li(::before)` mają NIŻSZĄ specyficzność
   (0,1,1 / 0,1,2), więc bez `!important` przegrywają w kontekście artykułu.
   `!important` na wszystkich właściwościach geometrii i typografii gwarantuje, że
   kafelek wygląda identycznie wszędzie — niezależnie od kontekstu. */
.tour-card__highlights {
    list-style: none !important;
    padding: 0;
    margin: 0 0 12px;
}
.tour-card__highlights li {
    position: relative;
    padding: 4px 0 4px 16px !important;
    font-size: 13px !important;
    line-height: 1.4 !important;
    color: #1a1a1a;
    margin: 0 !important;
}
.tour-card__highlights li::before {
    content: "" !important;
    position: absolute;
    left: 0 !important;
    top: 10px !important;
    width: 7px !important;
    height: 7px !important;
    border-radius: 50%;
    background: #5dcaa5 !important;
    /* neutralizuje ewentualny przeciekający glif "•" gdyby content kiedyś nie wygrał */
    color: transparent !important;
    font-size: 0 !important;
}

.tour-card__footer {
    padding: 14px 16px 16px;
    border-top: 0.5px solid rgba(0,0,0,0.08);
    background: #fafaf8;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    min-height: 96px;
    box-sizing: border-box;
    margin-top: auto;
}
.tour-card__price { margin: 0; }
.tour-card__price .price-label {
    font-size: 10px;
    text-transform: uppercase;
    color: #888780;
    letter-spacing: 0.04em;
    margin: 0;
}
.tour-card__price .price-value {
    font-size: 22px;
    font-weight: 500;
    color: #d4761a;
    line-height: 1.1;
    margin: 0;
}
.tour-card__price .price-per {
    font-size: 11px;
    color: #5f5e5a;
    margin: 0;
}
.tour-card__price--quote .price-value { font-size: 16px; line-height: 1.2; }

.tour-card__cta,
.tour-card__cta:link,
.tour-card__cta:visited,
.tour-card__cta:focus,
.tour-card__cta:active {
    display: inline-block;
    background: #FAB005;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    padding: 14px 18px;
    border-radius: 6px;
    line-height: 1;
    transition: background 0.2s;
    white-space: nowrap;
    flex-shrink: 0;
    text-decoration: none;
}
.tour-card__cta:hover,
.tour-card:hover .tour-card__cta { background: #F08C00; color: #fff; text-decoration: none; }

/* Neutralize legacy wrappers (.tour_list_item / .white_sidebar_block) when used around .tour-card.
   These wrappers have fixed heights and box-shadows from main.css that would clip the LP-style card. */
.tour_list_item:has(.tour-card),
.white_sidebar_block:has(.tour-card) {
    background: transparent;
    box-shadow: none;
    height: auto;
    cursor: default;
    margin-bottom: 0;
    transition: none;
}
.tour_list_item:has(.tour-card):hover,
.white_sidebar_block:has(.tour-card):hover {
    box-shadow: none;
}

@media (max-width: 1199px) {
    .tour-card__footer { padding: 12px 14px 14px; min-height: auto; flex-wrap: wrap; }
    .tour-card__cta { padding: 12px 14px; font-size: 11px; }
    .tour-card__price .price-value { font-size: 20px; }
}
@media (max-width: 767px) {
    .tour-card__image-wrap { aspect-ratio: 3 / 2; }
    .tour-card__body { padding: 12px 14px 0; }
    .tour-card__footer { padding: 12px 14px 14px; }
}

/* Bootstrap column padding override — only on columns that wrap a tour-card.
   Scoped via :has() so we don't touch every grid column on the site. */
[class*="col-"]:has(> .tour_list_item > .tour-card),
[class*="col-"]:has(> .white_sidebar_block > .tour-card),
[class*="col-"]:has(> .tour_list_item > .white_sidebar_block > .tour-card),
[class*="col-"]:has(> .tour-card) {
    padding-left: 8px;
    padding-right: 8px;
}

/* taxonomy-tour_categories.php: ukryj nazwę kategorii na kafelku (kontekst już w H1 strony) */
body.tax-tour_categories .tour-card__body .cat_title { display: none; }

/* SPEC-04 — city-archive H2 section groups */
.tour-group { margin: 0 0 2.5rem; }
.tour-group__title { margin: 0 0 .35em; font-size: 1.6rem; line-height: 1.2; }
.tour-group__lead { margin: 0 0 2rem; color: #555; font-size: 16px; line-height: 24px; text-align: center; }
@media (max-width: 991px) { .tour-group__lead { font-size: 14px; line-height: 22px; } }
@media (max-width: 767px) { .tour-group__title { font-size: 1.35rem; } }
