/* ==========================================================
   Tour cards: home page + packages page
   ========================================================== */

/* The home page has no global border-box reset, so the cards bring their own. */
.tour-box,
.tour-box *,
.tour-box *::before,
.tour-box *::after {
    box-sizing: border-box;
}

.tour-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr));
    gap: 24px;
    margin-top: 36px;
}

.tour-box {
    position: relative;
    display: flex;
    flex-direction: column;
    min-width: 0;
    margin: 0;
    overflow: hidden;
    background: #ffffff;
    border: 1px solid #e5eaf2;
    border-radius: 18px;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 12px 32px -14px rgba(15, 23, 42, 0.18);
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.tour-box:hover {
    transform: translateY(-4px);
    border-color: #d4dcea;
    box-shadow: 0 2px 4px rgba(15, 23, 42, 0.05), 0 24px 48px -18px rgba(15, 23, 42, 0.3);
}

/* ---------- Photo + price ---------- */

/* height/top/right/margin below reset the old card rules that used to live in
   style.css and packages.css, so a stale cached copy can't distort the cards. */
.tour-image {
    position: relative;
    height: auto;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: #e8edf4;
}

.tour-image > a {
    display: block;
    height: 100%;
    color: inherit;
}

/* Soft shade at the bottom so the price stays readable on any photo. */
.tour-image > a::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 50%;
    background: linear-gradient(to top, rgba(8, 18, 38, 0.5), rgba(8, 18, 38, 0));
    pointer-events: none;
}

.tour-image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.tour-box:hover .tour-image img {
    transform: scale(1.05);
}

.price-tag {
    position: absolute;
    top: auto;
    right: auto;
    left: 14px;
    bottom: 14px;
    z-index: 1;
    display: inline-flex;
    align-items: baseline;
    gap: 5px;
    max-width: calc(100% - 28px);
    padding: 8px 12px;
    font-size: 1.05rem;
    font-weight: 800;
    line-height: 1.1;
    color: #0f2557;
    background: rgba(255, 255, 255, 0.96);
    border-radius: 12px;
    box-shadow: 0 8px 22px rgba(8, 18, 38, 0.25);
}

.price-tag .price-unit {
    font-size: 0.8rem;
    font-weight: 600;
    white-space: nowrap;
    color: #5b6b85;
}

/* ---------- Title + inclusions ---------- */

.tour-content {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    padding: 18px 20px 20px;
}

.tour-content > a {
    color: inherit;
    text-decoration: none;
}

.tour-content h2 {
    margin: 0 0 12px;
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: -0.01em;
    color: #0f172a;
    transition: color 0.2s ease;
}

.tour-content > a:hover h2 {
    color: #1e3a8a;
}

.tour-box .inclusions {
    margin: 0 0 16px;
    padding: 14px 0 0;
    list-style: none;
    border-top: 1px solid #eef2f7;
}

.tour-box .inclusions li {
    position: relative;
    margin: 0;
    padding: 5px 0 5px 27px;
    font-size: 0.93rem;
    line-height: 1.45;
    color: #475569;
}

.tour-box .inclusions li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 7px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #e7f6ee url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2316a34a' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / 11px 11px no-repeat;
}

.tour-box .inclusions b {
    color: #0f172a;
}

/* Long lists show their first 6 items; /js/tour-cards.js adds the toggle.
   Keep the 6 in sync with VISIBLE in that file. */
.tour-box .inclusions.is-collapsed > li:nth-child(n + 7) {
    display: none;
}

.tour-more {
    display: inline-flex;
    align-items: center;
    align-self: flex-start;
    gap: 8px;
    margin: -6px 0 18px;
    padding: 4px 0;
    font: inherit;
    font-size: 0.88rem;
    font-weight: 700;
    color: #1e3a8a;
    background: none;
    border: 0;
    cursor: pointer;
}

.tour-more::after {
    content: "";
    width: 7px;
    height: 7px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: translateY(-2px) rotate(45deg);
    transition: transform 0.2s ease;
}

.tour-more[aria-expanded="true"]::after {
    transform: translateY(2px) rotate(-135deg);
}

.tour-more:hover {
    color: #2563eb;
    text-decoration: underline;
}

/* ---------- Buttons ---------- */

.tour-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: auto;
}

.btn-view-more,
.btn-book-now,
.btn-whatsapp-card {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 46px;
    padding: 11px 14px;
    font-size: 0.93rem;
    font-weight: 700;
    line-height: 1.2;
    text-align: center;
    text-decoration: none;
    border-radius: 12px;
    cursor: pointer;
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.btn-view-more {
    color: #1e3a8a;
    background: #ffffff;
    border: 1.5px solid #cdd7e6;
}

.btn-view-more:hover {
    color: #1e3a8a;
    background: #f1f5fb;
    border-color: #1e3a8a;
}

.btn-book-now {
    color: #ffffff;
    background: #1e3a8a;
    border: 1.5px solid #1e3a8a;
    box-shadow: 0 8px 18px -8px rgba(30, 58, 138, 0.6);
}

.btn-book-now:hover {
    color: #1e3a8a;
    background: #fbbf24;
    border-color: #fbbf24;
    box-shadow: 0 8px 18px -8px rgba(251, 191, 36, 0.7);
    transform: translateY(-1px);
}

/* Full-width row under View More / Book Now; opens the WhatsApp booking popup. */
.btn-whatsapp-card {
    grid-column: 1 / -1;
    color: #ffffff;
    background: #15803d;
    border: 1.5px solid #15803d;
}

.btn-whatsapp-card:hover {
    color: #ffffff;
    background: #166534;
    border-color: #166534;
    transform: translateY(-1px);
}

.btn-whatsapp-card i {
    font-size: 1.15rem;
}

.tour-box a:focus-visible,
.tour-more:focus-visible {
    outline: 2px solid #1e3a8a;
    outline-offset: 2px;
}

.tour-image > a:focus-visible {
    outline-offset: -3px;
}

/* ---------- Responsive ---------- */

@media (max-width: 768px) {
    .tour-grid {
        gap: 20px;
        margin-top: 24px;
    }
}

@media (max-width: 480px) {
    .tour-content {
        padding: 16px 16px 18px;
    }

    .tour-content h2 {
        font-size: 1.15rem;
    }

    .price-tag {
        font-size: 1rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .tour-box,
    .tour-image img,
    .tour-more::after,
    .btn-view-more,
    .btn-book-now,
    .btn-whatsapp-card {
        transition: none;
    }

    .tour-box:hover,
    .tour-box:hover .tour-image img,
    .btn-book-now:hover,
    .btn-whatsapp-card:hover {
        transform: none;
    }
}
