/* ============================================================
   tour-detail.css — Trip Designer Tour Package Detail Page
   ============================================================ */

/* Hero — shared B2C pattern (package image optional, fallback to beach) */
.td-hero {
    position: relative;
    background: url('../../images/hero-beach.jpg') center/cover no-repeat, #0e1f5c;
    padding: 36px 0 56px;
    overflow: hidden;
    min-height: auto;
}
.td-hero-img {
    position: absolute;
    inset: 0;
    width: 100%; height: 100%;
    object-fit: cover;
    z-index: 0;
    opacity: .35;
}
.td-hero-overlay {
    position: absolute; inset: 0; z-index: 0;
    background: linear-gradient(135deg, rgba(8,17,84,.88) 0%, rgba(30,64,175,.62) 50%, rgba(4,16,124,.88) 100%);
    pointer-events: none;
}
.td-hero::after {
    content: '';
    position: absolute;
    bottom: -1px; left: 0; right: 0;
    height: 40px;
    background: #f4f6fb;
    clip-path: ellipse(70% 100% at 50% 100%);
    z-index: 1;
    pointer-events: none;
}
.td-hero-content {
    position: relative; z-index: 2;
    padding: 0 20px; text-align: center;
}
.td-hero-country {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: rgba(251,191,36,.15);
    border: 1px solid rgba(251,191,36,.4);
    color: #fcd34d;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 1.4px;
    text-transform: uppercase;
    padding: 5px 14px;
    border-radius: 5px;
    margin-bottom: 12px;
    box-shadow: 0 4px 16px rgba(251,191,36,.18);
}
.td-hero-title {
    font-size: 2.1rem; font-weight: 900; color: #fff;
    line-height: 1.25; margin: 0 0 14px;
    letter-spacing: -0.3px;
    text-shadow: 0 4px 24px rgba(0,0,0,.3);
}
.td-hero-meta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: center; }
.td-hero-badge {
    display: inline-flex; align-items: center; gap: 6px;
    background: rgba(255,255,255,.1);
    border: 1px solid rgba(255,255,255,.15);
    color: #fff;
    font-size: 12px; font-weight: 700;
    padding: 7px 14px; border-radius: 5px;
    backdrop-filter: blur(8px);
    transition: background .2s, transform .2s;
}
.td-hero-badge:hover { background: rgba(255,255,255,.18); transform: translateY(-2px); }
.td-hero-badge i { color: #fbbf24; }

/* Body */
.td-body { padding: 28px 0 56px; background: #f4f6fb; }
.td-flex { display: flex; gap: 24px; align-items: flex-start; }
.td-main { flex: 1; min-width: 0; }
.td-sidebar { width: 300px; flex-shrink: 0; }

/* Back buttons bar (shared pattern with visa-detail) */
.td-back-bar { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 22px; }
.td-back {
    display: inline-flex; align-items: center; gap: 8px;
    font-size: .9rem; font-weight: 700; text-decoration: none;
    padding: 10px 20px; border-radius: 5px;
    transition: all .2s; cursor: pointer;
    border: 1.5px solid transparent;
}
.td-back i { font-size: .95rem; transition: transform .2s; }
.td-back:hover { text-decoration: none; transform: translateY(-2px); }
.td-back:hover i { transform: translateX(-3px); }
.td-back-secondary {
    background: #fff; color: #64748b;
    border-color: #e2e8f0;
    box-shadow: 0 1px 4px rgba(0,0,0,.04);
}
.td-back-secondary:hover {
    background: #f8fafc; color: var(--tp, #04107C);
    border-color: var(--tp, #04107C);
    box-shadow: 0 6px 18px rgba(4,16,124,.12);
}
.td-back-primary {
    background: linear-gradient(135deg, var(--tp, #04107C) 0%, #1e40af 100%);
    color: #fff; border-color: transparent;
    box-shadow: 0 4px 14px rgba(4,16,124,.25);
}
.td-back-primary:hover {
    background: linear-gradient(135deg, #020a5e 0%, var(--tp, #04107C) 100%);
    color: #fff; box-shadow: 0 8px 24px rgba(4,16,124,.35);
}
.td-back-primary:hover i { transform: translateX(0) rotate(-10deg); }

/* Gallery */
.td-gallery {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}
.td-gallery-item {
    border-radius: 5px; overflow: hidden;
    height: 90px; background: #dde3f0; cursor: pointer;
}
.td-gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.td-gallery-item:hover img { transform: scale(1.07); }

/* Cards */
.td-card {
    background: #fff; border-radius: 5px;
    box-shadow: 0 2px 12px rgba(0,0,0,.06);
    border: 1px solid #e8eaf0;
    margin-bottom: 20px; overflow: hidden;
}
.td-card-header {
    display: flex; align-items: center; gap: 10px;
    padding: 13px 20px; background: #f8f9fc;
    border-bottom: 2px solid #e8eaf0;
    color: #1e293b; font-size: 14px; font-weight: 800;
}
.td-card-header i { font-size: 15px; color: var(--tp, #04107C); }
.td-card-body { padding: 20px; }

/* Includes */
.td-includes { display: flex; gap: 10px; flex-wrap: wrap; }
.td-inc {
    display: flex; flex-direction: column; align-items: center; gap: 5px;
    background: #eef2ff; color: var(--tp, #04107C);
    border: 1.5px solid #c7d2fe;
    border-radius: 5px; padding: 12px 18px;
    font-size: 10.5px; font-weight: 800;
    text-align: center; min-width: 64px;
    transition: all .2s;
}
.td-inc:hover { background: #e0e7ff; transform: translateY(-2px); box-shadow: 0 4px 14px rgba(4,16,124,.1); }
.td-inc i { font-size: 22px; color: var(--tp, #04107C); }

/* Itinerary */
.td-day { display: flex; padding-bottom: 24px; position: relative; }
.td-day:last-child { padding-bottom: 0; }
.td-day-left { flex-shrink: 0; width: 44px; display: flex; flex-direction: column; align-items: center; }
.td-day-num {
    width: 36px; height: 36px; border-radius: 50%;
    background: #eef1fb; border: 2px solid var(--tp, #04107C); color: var(--tp, #04107C);
    font-size: 12px; font-weight: 900;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0; position: relative; z-index: 1;
}
.td-day-line { width: 2px; flex: 1; background: #e2e8f0; margin-top: 4px; }
.td-day:last-child .td-day-line { display: none; }
.td-day-right { flex: 1; padding-left: 12px; padding-top: 6px; }
.td-day-label {
    font-size: 11px; font-weight: 700; color: #64748b;
    text-transform: uppercase; letter-spacing: .6px; margin-bottom: 6px;
}
.td-day-text { font-size: 13.5px; color: #374151; line-height: 1.7; white-space: pre-line; }

/* HTML content */
.td-html-content { font-size: 13.5px; color: #475569; line-height: 1.7; }
.td-html-content ul { padding-left: 20px; margin: 8px 0; list-style: disc; }
.td-html-content ul li { list-style: disc; margin-bottom: 4px; }
.td-html-content ol { padding-left: 20px; margin: 8px 0; }
.td-html-content ol li { margin-bottom: 4px; }
.td-html-content li * { font-family: inherit !important; font-size: inherit !important; color: inherit !important; }
.td-html-content p { margin-bottom: 8px; }
.td-html-content font, .td-html-content span { font-family: inherit !important; font-size: inherit !important; color: inherit !important; }

/* Sidebar price card */
.td-sidebar {
    position: sticky;
    top: 80px;
    align-self: flex-start;
}
.td-price-card {
    background: #fff; border-radius: 5px;
    box-shadow: 0 4px 20px rgba(4,16,124,.12);
    border: 2px solid var(--tp, #04107C);
    overflow: hidden;
}
.td-price-header { background: var(--tp, #04107C); padding: 18px 20px; text-align: center; }
.td-price-label { color: rgba(255,255,255,.75); font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .8px; }
.td-price-adult { color: #fff; font-size: 30px; font-weight: 900; line-height: 1.1; margin: 6px 0 2px; }
.td-price-child { color: rgba(255,255,255,.8); font-size: 13px; font-weight: 600; }
.td-price-body { padding: 18px 20px; }
.td-price-row {
    display: flex; align-items: center; justify-content: space-between;
    padding: 9px 0; border-bottom: 1px solid #f0f3fb; font-size: 13px;
}
.td-price-row:last-child { border-bottom: none; }
.td-price-row-label { color: #64748b; font-weight: 600; display: flex; align-items: center; gap: 6px; }
.td-price-row-label i { color: var(--tp, #04107C); }
.td-price-row-val { font-weight: 800; color: #1e293b; }
.td-book-btn {
    display: block; width: 100%; padding: 14px;
    background: linear-gradient(135deg, var(--tp, #04107C), #1a2fa8);
    color: #fff; text-align: center; font-size: 14px; font-weight: 800;
    border: none; border-radius: 5px; cursor: pointer; margin-top: 16px;
    text-decoration: none; transition: opacity .2s; letter-spacing: .3px;
}
.td-book-btn:hover { opacity: .9; color: #fff; text-decoration: none; }
.td-book-btn.amber { background: linear-gradient(135deg, #d97706, #b45309); margin-top: 10px; }

/* Similar Packages */
.td-similar { margin-top: 16px; }
.td-similar-head {
    font-size: 13px; font-weight: 800; color: #1e293b;
    margin-bottom: 12px;
    display: flex; align-items: center; gap: 7px;
    padding: 0 4px;
}
.td-similar-head i { color: var(--tp, #04107C); }
.td-similar-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
}
.td-sim-card {
    background: #fff; border-radius: 5px;
    border: 1.5px solid #e2e8f0;
    overflow: hidden; text-decoration: none; color: inherit;
    transition: all .2s; display: flex; flex-direction: column;
}
.td-sim-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(4,16,124,.12);
    border-color: #c7d2fe; text-decoration: none; color: inherit;
}
.td-sim-img {
    height: 120px; position: relative; overflow: hidden;
    background: linear-gradient(135deg, #1e3a5f, var(--tp, #04107C));
}
.td-sim-img img { width: 100%; height: 100%; object-fit: cover; }
.td-sim-ph {
    width: 100%; height: 100%;
    display: flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, #1e3a5f, var(--tp, #04107C));
}
.td-sim-nights {
    position: absolute; top: 8px; right: 8px;
    background: rgba(0,0,0,.55); color: #fff;
    font-size: 11px; font-weight: 700;
    padding: 3px 9px; border-radius: 5px;
}
.td-sim-body { padding: 10px 12px; flex: 1; }
.td-sim-country {
    font-size: 10px; font-weight: 700; color: var(--tp, #04107C);
    text-transform: uppercase; letter-spacing: .4px; margin-bottom: 3px;
}
.td-sim-name {
    font-size: 12px; font-weight: 700; color: #0f172a;
    line-height: 1.4; margin-bottom: 6px;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.td-sim-price { font-size: 13px; font-weight: 900; color: var(--tp, #04107C); }
.td-sim-price span { font-size: 10px; color: #94a3b8; font-weight: 500; }

/* Mobile fixed Book Now bar */
.td-mobile-book {
    position: fixed;
    bottom: 0; left: 0; right: 0;
    z-index: 1050;
    padding: 12px 16px;
    background: #fff;
    box-shadow: 0 -4px 16px rgba(0,0,0,.12);
}
.td-mobile-book-btn {
    display: block;
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, var(--tp, #04107C), #1a2fa8);
    color: #fff;
    text-align: center;
    font-size: 15px;
    font-weight: 800;
    border-radius: 5px;
    text-decoration: none;
    letter-spacing: .3px;
}
.td-mobile-book-btn:hover { opacity: .9; color: #fff; text-decoration: none; }

@media (max-width: 900px) {
    .td-body { padding-bottom: 80px; }
}

@media (max-width: 900px) {
    .td-flex { flex-direction: column; }
    .td-sidebar { width: 100%; position: static; }
    .td-hero { padding: 28px 0 48px; }
    .td-hero-title { font-size: 1.6rem; }
    .td-gallery { grid-template-columns: repeat(3, 1fr); }
    .td-similar-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 575px) {
    .td-hero { padding: 22px 0 42px; }
    .td-hero-title { font-size: 1.3rem; }
    .td-hero-meta { gap: 8px; }
    .td-hero-badge { font-size: 11px; padding: 5px 10px; }
    .td-gallery { grid-template-columns: repeat(2, 1fr); }
    .td-similar-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    /* Phones: a 4:3 image fills each half-viewport card properly. The
       fixed 120px height looked like a thin strip on small screens with
       top/bottom of the scene cropped — aspect-ratio scales with width
       so the photo stays in its natural framing at any size. */
    .td-sim-img { height: auto; aspect-ratio: 4/3; }
    .td-sim-body { padding: 9px 10px; }
    .td-sim-name { font-size: 13px; line-height: 1.3; }
    .td-sim-nights { font-size: 10px; padding: 2px 7px; }
}
