:root {
    --bg: #f5f7f9;
    --surface: #ffffff;
    --text: #1f2933;
    --muted: #64748b;
    --border: #e2e8f0;
    --primary: #0e7490;
    --primary-dark: #155e75;
    --primary-soft: #ecfeff;
    --success: #15803d;
    --success-soft: #dcfce7;
    --warning: #a16207;
    --warning-soft: #fef9c3;
    --danger: #b91c1c;
    --danger-soft: #fee2e2;
    --radius: 10px;
    --shadow: 0 1px 2px rgba(15, 23, 42, .06), 0 2px 8px rgba(15, 23, 42, .04);
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font: 15px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    color: var(--text);
    background: var(--bg);
}

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }
code { font-family: Consolas, Menlo, monospace; font-size: .92em; background: #f1f5f9; padding: 1px 5px; border-radius: 4px; }
h1, h2, h3 { line-height: 1.25; margin: 0 0 .5em; }
h1 { font-size: 1.75rem; }
h2 { font-size: 1.3rem; }
h3 { font-size: 1.05rem; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 16px; }
.muted { color: var(--muted); }
.small { font-size: .88rem; }
.right { text-align: right; }
.nowrap { white-space: nowrap; }

/* Header / footer */
.site-header { background: var(--primary-dark); color: #fff; }
.header-inner { display: flex; align-items: center; justify-content: space-between; min-height: 58px; gap: 16px; flex-wrap: wrap; }
.brand { color: #fff; font-weight: 700; font-size: 1.15rem; }
.brand span { font-weight: 400; opacity: .8; }
.brand:hover { text-decoration: none; }
.brand .by { font-size: .72rem; font-weight: 500; opacity: .75; margin-left: 6px; letter-spacing: .02em; }
.site-footer .credit { margin-top: 4px; }
.main-nav { display: flex; gap: 4px; }
.main-nav a { color: #cffafe; padding: 6px 12px; border-radius: 6px; }
.main-nav a:hover { background: rgba(255, 255, 255, .1); text-decoration: none; }
.main-nav a.active { background: rgba(255, 255, 255, .18); color: #fff; }

main.container { padding-top: 24px; padding-bottom: 40px; }

.site-footer { border-top: 1px solid var(--border); background: var(--surface); color: var(--muted); font-size: .88rem; }
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 16px; padding-bottom: 16px; flex-wrap: wrap; }
.footer-inner form { margin: 0; }

/* Buttons & form */
.btn {
    display: inline-block; border: 1px solid var(--border); background: var(--surface); color: var(--text);
    padding: 8px 16px; border-radius: 8px; font: inherit; cursor: pointer; line-height: 1.3;
}
.btn:hover { border-color: var(--primary); text-decoration: none; }
.btn-primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-small { padding: 4px 10px; font-size: .85rem; }
.btn-link { border-color: transparent; background: none; color: var(--primary); }

input, select {
    font: inherit; color: var(--text); background: #fff; border: 1px solid #cbd5e1; border-radius: 8px;
    padding: 7px 10px; width: 100%; min-width: 0;
}
input:focus, select:focus { outline: 2px solid var(--primary-soft); border-color: var(--primary); }

.hero { margin-bottom: 16px; }
.hero p { margin: 0; }

.filters { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); margin-bottom: 16px; }
.filter-row { display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-end; }
.filter-row + .filter-row { margin-top: 12px; }
.filter-row label { display: flex; flex-direction: column; gap: 4px; flex: 1 1 160px; font-size: .85rem; color: var(--muted); }
.filter-row label.grow { flex: 3 1 260px; }
.filter-row label.checkbox { flex-direction: row; align-items: center; gap: 8px; flex: 0 0 auto; color: var(--text); font-size: .92rem; }
.filter-row label.checkbox input { width: auto; }
.filter-row label.inline { flex-direction: row; align-items: center; gap: 8px; flex: 0 1 auto; }
.filter-row label.inline select { width: auto; }
.filter-actions { align-items: center; }
.filter-actions .spacer { flex: 1; }
.filter-submit { flex: 0 0 auto; }

.result-count { color: var(--muted); margin: 0 0 12px; }

/* Alerts & badges */
.alert { padding: 12px 16px; border-radius: 8px; margin-bottom: 16px; border: 1px solid; }
.alert-success { background: var(--success-soft); border-color: #86efac; color: #14532d; }
.alert-warning { background: var(--warning-soft); border-color: #fde047; color: #713f12; }
.alert-danger { background: var(--danger-soft); border-color: #fca5a5; color: #7f1d1d; }

.badge { display: inline-block; font-size: .75rem; padding: 1px 8px; border-radius: 999px; background: #f1f5f9; color: var(--muted); white-space: nowrap; font-weight: 500; }
.badge-success { background: var(--success-soft); color: var(--success); }
.badge-warning { background: var(--warning-soft); color: var(--warning); }
.badge-danger { background: var(--danger-soft); color: var(--danger); }

.chip { display: inline-block; background: #f1f5f9; border-radius: 6px; padding: 2px 8px; font-size: .82rem; margin: 2px 4px 2px 0; }

/* Offer grid */
.offer-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; }
.offer-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column; }
.offer-image { position: relative; display: block; aspect-ratio: 16 / 9; background: linear-gradient(135deg, #a5f3fc, #0e7490); }
.offer-image img { width: 100%; height: 100%; object-fit: cover; }
.zone-tag { position: absolute; left: 10px; top: 10px; background: rgba(15, 23, 42, .72); color: #fff; font-size: .75rem; padding: 2px 10px; border-radius: 999px; }
.zone-tag.static { position: static; display: inline-block; margin-bottom: 8px; background: var(--primary-soft); color: var(--primary-dark); }
.offer-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.offer-body h2 { font-size: 1.08rem; margin: 0; }
.offer-body h2 a { color: var(--text); }
.countries { margin: 0; color: var(--muted); font-size: .88rem; }
.offer-facts { display: flex; gap: 12px; align-items: baseline; color: var(--muted); font-size: .9rem; }
.offer-facts .price strong { color: var(--text); font-size: 1.1rem; }
.departure-list { list-style: none; margin: 6px 0 0; padding: 0; border-top: 1px solid var(--border); }
.departure-list li { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 6px 0; border-bottom: 1px dashed var(--border); font-size: .88rem; flex-wrap: wrap; }
.departure-list li:last-child { border-bottom: 0; }
.dep-meta { display: flex; gap: 6px; align-items: center; color: var(--muted); }

.pagination { display: flex; gap: 4px; justify-content: center; margin-top: 24px; flex-wrap: wrap; }
.pagination a, .pagination span { padding: 6px 12px; border-radius: 6px; border: 1px solid var(--border); background: var(--surface); }
.pagination .current { background: var(--primary); color: #fff; border-color: var(--primary); }
.pagination .gap { border: 0; background: none; }

/* Offer detail */
.breadcrumb { margin: 0 0 12px; }
.offer-header { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; margin-bottom: 16px; flex-wrap: wrap; }
.offer-header h1 { margin-bottom: 4px; }
.tagline { font-size: 1.1rem; color: var(--primary-dark); margin: 0 0 8px; font-style: italic; }
.offer-header-actions { display: flex; gap: 8px; flex-wrap: wrap; }

.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 8px; margin-bottom: 20px; }
.gallery img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 8px; }

.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 20px; box-shadow: var(--shadow); margin-bottom: 16px; }
.section-title { margin: 28px 0 14px; }

.detail-layout { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 16px; align-items: start; }
@media (max-width: 900px) {
    .detail-layout { grid-template-columns: 1fr; }
}

.prose p { margin: 0 0 .8em; }
.prose ul { margin: 0 0 .8em; padding-left: 1.2em; }
.prose li { margin-bottom: .25em; }
.prose > :last-child { margin-bottom: 0; }

.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.table th { text-align: left; color: var(--muted); font-weight: 500; font-size: .82rem; border-bottom: 1px solid var(--border); padding: 8px; }
.table td { padding: 8px; border-bottom: 1px solid var(--border); vertical-align: top; }
.table tr:last-child td { border-bottom: 0; }
.table.compact td, .table.compact th { padding: 6px 4px; }
.table th.right { text-align: right; }
.departures-table tr.selected td { background: var(--primary-soft); }
.table tr.unavailable td { color: var(--muted); }

.facts { display: grid; grid-template-columns: max-content 1fr; gap: 6px 12px; margin: 0 0 12px; font-size: .92rem; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; }

.objectives dt { font-weight: 600; margin-top: 8px; }
.objectives dd { margin: 2px 0 0; }

.days { display: flex; flex-direction: column; gap: 6px; }
.day { border: 1px solid var(--border); border-radius: 8px; }
.day summary { cursor: pointer; padding: 10px 14px; font-weight: 500; list-style-position: inside; }
.day[open] summary { border-bottom: 1px solid var(--border); }
.day-nr { color: var(--primary); font-weight: 700; margin-right: 6px; }
.day-body { padding: 12px 14px; }
.day-body .chips { margin-bottom: 8px; }
.optional-note { background: var(--warning-soft); padding: 8px 12px; border-radius: 6px; margin: 8px 0; }
.optional-note p { margin: 0; display: inline; }
.day-pictures { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.day-pictures img { width: 140px; height: 95px; object-fit: cover; border-radius: 6px; }

.map { height: 340px; border-radius: 8px; margin-top: 12px; z-index: 0; }

/* API explorer */
.response-summary { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; }
.response-summary .badge { font-size: .85rem; padding: 3px 10px; }
pre.json {
    background: #0f172a; color: #e2e8f0; padding: 16px; border-radius: 8px; overflow: auto; max-height: 640px;
    font: 12.5px/1.5 Consolas, Menlo, monospace; margin: 0; white-space: pre;
}

@media (max-width: 600px) {
    .offer-grid { grid-template-columns: 1fr; }
    h1 { font-size: 1.4rem; }
    .card { padding: 14px; }
}
