/*
 * Travel offers (inc/offers.php): offer cards, the /offers/ page and single
 * offer pages. Built on the tc2 tokens and motion in tc2.css.
 */

/* ── Card ──────────────────────────────────────────────────────────── */
.tco-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.tco-card {
	display: flex; flex-direction: column; overflow: hidden; isolation: isolate;
	background: #fff; border-radius: var(--radius); box-shadow: var(--shadow-soft);
	transition: transform .55s var(--ease-spring), box-shadow .45s ease;
}
.tco-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lift); }
.tco-card:active { transform: scale(.985); transition-duration: .1s; }
.tco-card__media { position: relative; aspect-ratio: 4 / 3; overflow: hidden; background: var(--sky); }
.tco-card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease-spring); }
.tco-card:hover .tco-card__media img { transform: scale(1.05); }
.tco-card__tag {
	position: absolute; top: 16px; left: 16px; background: var(--red); color: #fff;
	font-size: 11.5px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; padding: 6px 12px; border-radius: 999px;
}
.tco-card__body { padding: 22px 24px 26px; display: flex; flex-direction: column; flex: 1; }
.tco-card__svc { font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); }
.tco-card h3 { margin-top: 8px; font-size: 20px; font-weight: 800; letter-spacing: -.015em; line-height: 1.2; }
.tco-card__line { margin-top: 6px; font-size: 15px; line-height: 1.5; color: var(--ink-2); }
.tco-card__foot { margin-top: auto; padding-top: 18px; display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 16px; }
.tco-card__price { font-size: 14px; color: var(--ink-2); }
.tco-card__price strong { font-size: 22px; font-weight: 800; color: var(--navy); }
.tco-card__price small { font-size: 12.5px; }
.tco-card__ends { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; color: var(--red-text); }
.tco-card__ends .tc2-icon { width: 16px; height: 16px; }

/* ── Offers page header ────────────────────────────────────────────── */
.tco-head { padding: 88px 0 56px; background: linear-gradient(180deg, #e2f0fa 0%, #f3f8fc 100%); }
.tco-head h1 { margin-top: 16px; font-size: clamp(38px, 4vw, 58px); font-weight: 800; line-height: 1.08; letter-spacing: -.03em; }
.tco-head h1 em { font-style: normal; color: var(--red); }
.tco-head .tc2-lead { margin-top: 16px; max-width: 620px; }
.tco-filter { margin-top: 32px; display: flex; flex-wrap: wrap; gap: 10px; }
.tco-filter a {
	min-height: 44px; display: inline-flex; align-items: center; padding: 0 20px; border-radius: 999px;
	background: #fff; border: 1.5px solid var(--line); font-weight: 700; font-size: 14px;
	transition: border-color .2s ease, background-color .2s ease, transform .3s var(--ease-spring);
}
.tco-filter a:hover { border-color: var(--navy); }
.tco-filter a:active { transform: scale(.96); }
.tco-filter a[aria-current] { background: var(--navy); border-color: var(--navy); color: #fff; }
.tco-empty { text-align: center; max-width: 560px; margin: 0 auto; padding: 24px 0; }
.tco-empty .tc2-lead { margin: 14px 0 28px; }

/* ── Single offer hero ─────────────────────────────────────────────── */
.tco-hero { position: relative; overflow: hidden; color: #fff; background: var(--navy); min-height: clamp(420px, 58vh, 620px); display: flex; align-items: flex-end; }
.tco-hero__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.tco-hero::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(15,29,51,.15) 0%, rgba(15,29,51,.35) 45%, rgba(15,29,51,.88) 100%); }
.tco-hero__in { position: relative; z-index: 1; width: 100%; padding-top: 72px; padding-bottom: 64px; }
.tco-hero .tc2-label { color: #fff; opacity: .9; margin-top: 22px; }
.tco-hero h1 { color: #fff; margin-top: 12px; font-size: clamp(36px, 4.4vw, 64px); font-weight: 800; line-height: 1.05; letter-spacing: -.03em; text-transform: uppercase; max-width: 900px; }
.tco-hero__line { margin-top: 14px; font-size: 20px; font-style: italic; color: rgba(255,255,255,.88); max-width: 640px; }
.tco-hero__meta { margin-top: 28px; display: flex; flex-wrap: wrap; gap: 12px; }
.tco-pill { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 18px; border-radius: 999px; background: rgba(255,255,255,.16); backdrop-filter: blur(8px); font-size: 14px; font-weight: 600; }
.tco-pill .tc2-icon { width: 18px; height: 18px; }
.tco-pill--price { background: var(--red); }
.tco-pill--price strong { font-size: 18px; font-weight: 800; }
.tco-pill--ended { background: rgba(0,0,0,.45); }
.tco-back { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 700; color: rgba(255,255,255,.88); }
.tco-back:hover { color: #fff; }
.tco-back__ico { width: 18px; height: 18px; transform: rotate(180deg); }
@media (prefers-reduced-transparency: reduce) { .tco-pill { backdrop-filter: none; background: rgba(15,29,51,.8); } }

.tco-ended { background: #fff4e5; border-bottom: 1px solid #f5d9ad; }
.tco-ended .tc2-wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 32px; padding-top: 20px; padding-bottom: 20px; }
.tco-ended p { max-width: 760px; line-height: 1.5; }

/* ── Single offer body ─────────────────────────────────────────────── */
.tco-layout { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: clamp(32px, 5vw, 72px); align-items: start; }
.tco-main > * + * { margin-top: 48px; }
.tco-intro { font-size: 18px; line-height: 1.7; color: var(--ink-2); }
.tco-intro p + p { margin-top: 14px; }
.tco-table-wrap { overflow-x: auto; border-radius: var(--radius); box-shadow: var(--shadow-soft); background: #fff; -webkit-overflow-scrolling: touch; }
.tco-table { width: 100%; border-collapse: collapse; min-width: 520px; font-size: 15.5px; }
/* Override the parent theme's table reset (cell borders, zebra rows). */
.tco-table { margin: 0; }
.tco-table th, .tco-table td { padding: 16px 20px; text-align: left; vertical-align: middle; line-height: 1.4; border: 0; border-bottom: 1px solid var(--line); background: transparent !important; }
.tco-table thead th { background: var(--navy) !important; color: #fff; font-size: 12.5px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; white-space: nowrap; }
.tco-table tbody th { font-weight: 600; }
.tco-table td { font-weight: 800; white-space: nowrap; font-variant-numeric: tabular-nums; }
.tco-table tbody tr:last-child > * { border-bottom: 0; }
.tco-table tbody tr:hover > * { background: var(--sky) !important; }
.tco-incl { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr)); gap: 32px; }
.tco-incl h2, .tco-terms h2 { font-size: 20px; font-weight: 800; letter-spacing: -.01em; margin-bottom: 14px; }
.tco-list li { display: flex; gap: 10px; align-items: flex-start; padding: 6px 0; font-size: 16px; line-height: 1.5; }
.tco-list .tc2-icon { width: 20px; height: 20px; margin-top: 2px; }
.tco-list--yes .tc2-icon { color: #1a9a52; }
.tco-list--no .tc2-icon { color: var(--red); }
.tco-terms { padding: 28px 30px; border-radius: var(--radius); background: var(--off); }
.tco-terms ul { list-style: disc; padding-left: 20px; }
.tco-terms li { padding: 4px 0; font-size: 15px; line-height: 1.55; color: var(--ink-2); }

.tco-book { position: sticky; top: 100px; }
.tco-book__card { padding: 32px 28px; border-radius: var(--radius); background: #fff; box-shadow: var(--shadow-lift); display: flex; flex-direction: column; gap: 12px; }
.tco-book__from { font-size: 13px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); }
.tco-book__price { font-size: 44px; font-weight: 800; letter-spacing: -.03em; line-height: 1; margin-top: -4px !important; }
.tco-book__note { color: var(--ink-2); font-size: 15px; }
.tco-book__ends { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 700; color: var(--red-text); margin: 4px 0 8px !important; }
.tco-book__ends .tc2-icon { width: 18px; height: 18px; }
.tco-book .tc2-btn { width: 100%; }

/* Shortcode on non-tc2 pages: no outer section padding to fight with */
.tco-embed { background: transparent; margin: 32px 0; }

@media (prefers-reduced-motion: reduce) {
	.tco-card:hover, .tco-card:hover .tco-card__media img, .tco-filter a:active { transform: none !important; }
}
@media (prefers-contrast: more) {
	.tco-card, .tco-book__card, .tco-table-wrap { border: 1px solid var(--navy); }
}

/* ── Responsive ────────────────────────────────────────────────────── */
@media (max-width: 1023px) {
	.tco-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.tco-layout { grid-template-columns: minmax(0, 1fr); }
	.tco-book { position: static; }
}
@media (max-width: 640px) {
	.tco-grid { grid-template-columns: minmax(0, 1fr); gap: 16px; }
	.tco-head { padding: 56px 0 40px; }
	.tco-hero__in { padding-top: 48px; padding-bottom: 40px; }
	.tco-hero__line { font-size: 17px; }
	.tco-table { font-size: 14.5px; }
	.tco-table th, .tco-table td { padding: 13px 14px; }
	/* Phones: each rate row becomes a small card so no column is hidden off-screen. */
	.tco-table { min-width: 0; }
	.tco-table thead { display: none; }
	.tco-table, .tco-table tbody, .tco-table tr, .tco-table tbody th { display: block; width: 100%; }
	.tco-table tbody th { background: var(--sky) !important; white-space: normal; }
	.tco-table td { display: flex; justify-content: space-between; gap: 16px; }
	.tco-table td::before { content: attr(data-label); font-weight: 600; color: var(--ink-2); font-size: 13px; text-transform: uppercase; letter-spacing: .08em; }
	.tco-table tbody tr:last-child > * { border-bottom: 1px solid var(--line); }
	.tco-table tbody tr:last-child > td:last-child { border-bottom: 0; }
	.tco-terms { padding: 22px 20px; }
	.tco-book__card { padding: 26px 20px; }
}
