/* TJ Trailer — mobile-first styles */
:root {
  --ink: #14202b;
  --muted: #4a5763;
  --bg: #ffffff;
  --soft: #f3f6f8;
  --line: #d5dde3;
  --brand: #0d4f8b;      /* 8.0:1 on white */
  --brand-dark: #093a66;
  --accent: #b8520a;     /* 4.9:1 on white */
  --ok: #1f6f3a;
  --bad: #a3141f;
  --radius: 12px;
  --tap: 52px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; color: var(--ink); background: var(--bg);
  font: 17px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}
img { max-width: 100%; display: block; }
a { color: var(--brand); text-underline-offset: 2px; }
a:hover { color: var(--brand-dark); }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; }
h1 { font-size: 1.85rem; }
h2 { font-size: 1.4rem; margin-top: 1.6em; }
h3 { font-size: 1.1rem; }
p { margin: 0 0 1em; }
.wrap { max-width: 960px; margin: 0 auto; padding: 0 18px; }
.skip { position: absolute; left: -999px; top: 0; background: #fff; padding: 10px; z-index: 10; }
.skip:focus { left: 10px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

/* Header */
.site-header { border-bottom: 1px solid var(--line); background: #fff; }
.site-header .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 16px; padding-top: 10px; padding-bottom: 6px; }
.logo { font-weight: 800; font-size: 1.3rem; color: var(--ink); text-decoration: none; letter-spacing: -.01em; }
.logo span { color: var(--brand); }
.nav { display: flex; flex-wrap: wrap; gap: 2px; margin: 0 -10px; }
.nav a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 10px; color: var(--ink); text-decoration: none; font-weight: 600; border-radius: 8px; }
.nav a[aria-current="page"] { color: var(--brand); text-decoration: underline; text-decoration-thickness: 3px; text-underline-offset: 6px; }
.nav a:hover { background: var(--soft); }

main { padding-bottom: 40px; }
section { padding: 8px 0; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: var(--tap); padding: 12px 24px; border-radius: var(--radius);
  font: inherit; font-weight: 700; font-size: 1.05rem; text-decoration: none; cursor: pointer;
  background: var(--brand); color: #fff; border: 2px solid var(--brand);
}
.btn:hover { background: var(--brand-dark); border-color: var(--brand-dark); color: #fff; }
.btn.secondary { background: #fff; color: var(--brand); }
.btn.secondary:hover { background: var(--soft); color: var(--brand-dark); }
.btn.block { width: 100%; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }
.btn.small { min-height: 44px; padding: 8px 14px; font-size: .95rem; }
.btn.danger { background: #fff; color: var(--bad); border-color: var(--bad); }

/* Hero */
.hero { padding: 18px 0 8px; }
.hero h1 { margin-top: 14px; }
.price-line { font-size: 1.25rem; margin: 0 0 4px; }
.price-line strong { font-size: 1.7rem; }
.sub { color: var(--muted); }
.cta-row { display: flex; flex-direction: column; gap: 10px; margin: 18px 0 6px; }

/* Photos (placeholders until real photos are added) */
.photo, .photo-placeholder { width: 100%; aspect-ratio: 4 / 3; border-radius: var(--radius); object-fit: cover; background: var(--soft); }
.photo-placeholder {
  display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center;
  border: 2px dashed #9aa8b3; color: var(--muted); font-weight: 600; padding: 12px;
}
.photo-placeholder svg { width: 64px; height: 64px; margin-bottom: 6px; }
.gallery { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

/* Cards / lists */
.cards { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 0; list-style: none; margin: 0; }
.cards li { background: var(--soft); border-radius: var(--radius); padding: 14px; font-weight: 600; }
.cards li span { display: block; font-size: 1.6rem; line-height: 1; margin-bottom: 6px; }
.facts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; list-style: none; padding: 0; margin: 0; }
.facts li { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; }
.facts b { display: block; font-size: .85rem; color: var(--muted); font-weight: 600; }
.checks { list-style: none; padding: 0; margin: 0 0 1em; }
.checks li { position: relative; padding: 6px 0 6px 30px; border-bottom: 1px solid var(--line); }
.checks li::before { content: "✓"; position: absolute; left: 4px; top: 6px; color: var(--ok); font-weight: 800; }
.callout { border: 2px solid var(--accent); border-radius: var(--radius); padding: 16px; background: #fff8f2; margin: 16px 0; }
.callout h2, .callout h3 { margin-top: 0; }
.note { background: var(--soft); border-radius: var(--radius); padding: 14px 16px; }

table.specs { width: 100%; border-collapse: collapse; margin-bottom: 1em; }
table.specs th, table.specs td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.specs th { width: 45%; color: var(--muted); font-weight: 600; }

/* FAQ */
details { border: 1px solid var(--line); border-radius: var(--radius); margin: 0 0 10px; background: #fff; }
summary { cursor: pointer; padding: 14px 16px; font-weight: 700; min-height: var(--tap); list-style-position: inside; }
details > div { padding: 0 16px 14px; }

/* Contact */
.contact-list { list-style: none; padding: 0; display: grid; gap: 10px; }
.contact-list a { display: flex; flex-direction: column; padding: 14px 16px; border: 2px solid var(--line); border-radius: var(--radius); text-decoration: none; color: var(--ink); }
.contact-list a:hover { border-color: var(--brand); }
.contact-list small { color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; font-size: .78rem; }
.contact-list strong { font-size: 1.15rem; color: var(--brand); word-break: break-word; }

/* Forms */
.step { border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; margin: 14px 0; }
.step > h2 { margin-top: 0; font-size: 1.25rem; }
.step-num { display: inline-flex; width: 30px; height: 30px; border-radius: 50%; background: var(--brand); color: #fff; align-items: center; justify-content: center; font-size: 1rem; margin-right: 8px; }
label { display: block; font-weight: 600; margin: 12px 0 4px; }
.hint { font-weight: 400; color: var(--muted); font-size: .92rem; }
input[type=text], input[type=email], input[type=tel], input[type=date], select, textarea {
  width: 100%; min-height: 50px; padding: 10px 12px; font: inherit; color: var(--ink);
  border: 2px solid #8a98a4; border-radius: 10px; background: #fff;
}
textarea { min-height: 90px; }
input:focus, select:focus, textarea:focus { border-color: var(--brand); outline: 3px solid #b9d4ee; outline-offset: 0; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.row2 label { margin-top: 12px; }
.check { display: flex; gap: 12px; align-items: flex-start; font-weight: 500; margin: 12px 0; padding: 12px; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; }
.check input { width: 26px; height: 26px; margin: 0; flex: 0 0 auto; accent-color: var(--brand); }
.msg { border-radius: 10px; padding: 12px 14px; margin: 12px 0; font-weight: 600; }
.msg.error { background: #fdecee; color: var(--bad); border: 1px solid #f2b8bf; }
.msg.ok { background: #e9f6ee; color: var(--ok); border: 1px solid #b5dfc4; }
.msg.info { background: var(--soft); color: var(--ink); }
[hidden] { display: none !important; }

/* Calendar */
.cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.cal-head h3 { margin: 0; font-size: 1.15rem; }
.cal-nav { width: 48px; height: 48px; border-radius: 10px; border: 2px solid var(--line); background: #fff; font-size: 1.3rem; cursor: pointer; color: var(--ink); }
.cal-nav[disabled] { opacity: .35; cursor: default; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cal-dow { text-align: center; font-size: .8rem; font-weight: 700; color: var(--muted); padding: 4px 0; }
.cal-day {
  position: relative; aspect-ratio: 1 / 1; min-height: 42px; border-radius: 8px; border: 1px solid var(--line);
  background: #fff; font: inherit; font-weight: 600; color: var(--ink); cursor: pointer; padding: 0;
}
.cal-day:hover:not([disabled]) { border-color: var(--brand); }
.cal-day[disabled] { cursor: not-allowed; }
.cal-day.past { color: #9aa5ae; background: #fafbfc; }
.cal-day.full { background: #e9ecef; color: #6b7680; text-decoration: line-through; }
.cal-day.partial { background: repeating-linear-gradient(135deg, #fff, #fff 6px, #ffe9d6 6px, #ffe9d6 12px); }
.cal-day.in-range { background: #dbe9f6; border-color: #a9c6e3; }
.cal-day.sel { background: var(--brand); color: #fff; border-color: var(--brand); text-decoration: none; }
.cal-day.today::after { content: ""; position: absolute; left: 50%; bottom: 5px; width: 5px; height: 5px; margin-left: -2.5px; border-radius: 50%; background: currentColor; }
.legend { display: flex; flex-wrap: wrap; gap: 8px 16px; font-size: .9rem; color: var(--muted); margin: 10px 0 0; padding: 0; list-style: none; }
.legend i { display: inline-block; width: 16px; height: 16px; border-radius: 4px; border: 1px solid var(--line); vertical-align: -3px; margin-right: 6px; }
.legend .l-free { background: #fff; }
.legend .l-part { background: repeating-linear-gradient(135deg, #fff, #fff 3px, #ffe9d6 3px, #ffe9d6 6px); }
.legend .l-full { background: #e9ecef; }
.legend .l-sel { background: var(--brand); border-color: var(--brand); }

.summary { background: var(--soft); border-radius: var(--radius); padding: 14px 16px; }
.summary dl { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; margin: 0; }
.summary dt { color: var(--muted); }
.summary dd { margin: 0; font-weight: 700; text-align: right; font-size: .95rem; }
.summary dt { font-size: .95rem; }
.summary .total { border-top: 2px solid var(--line); padding-top: 8px; font-size: 1.15rem; }
.agreement-box { max-height: 320px; overflow-y: auto; border: 1px solid #8a98a4; border-radius: 10px; padding: 12px 14px; background: #fff; font-size: .95rem; }
.agreement-box h3 { font-size: 1rem; margin-top: 1em; }

/* Sticky mobile CTA */
.sticky-cta { position: sticky; bottom: 0; background: rgba(255,255,255,.97); border-top: 1px solid var(--line); padding: 10px 18px; z-index: 5; }

/* Footer */
.site-footer { background: var(--ink); color: #e8edf1; padding: 24px 0 90px; font-size: .95rem; }
.site-footer a { color: #fff; }
.site-footer p { margin: 0 0 6px; }

/* Admin */
.admin-table { width: 100%; border-collapse: collapse; font-size: .95rem; }
.badge { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: .82rem; font-weight: 700; }
.badge.confirmed { background: #e9f6ee; color: var(--ok); }
.badge.cancelled { background: #eceff1; color: #4a5763; }
.badge.pending { background: #fff4e5; color: #8a4b00; }
.badge.conflict { background: #fdecee; color: var(--bad); }
.booking-card { border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; margin: 10px 0; }
.booking-card h3 { margin: 0 0 4px; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.booking-card dl { display: grid; grid-template-columns: 9.5em 1fr; gap: 4px 10px; margin: 8px 0; font-size: .95rem; }
.booking-card dt { color: var(--muted); }
.booking-card dd { margin: 0; word-break: break-word; }
.tabs { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }
.tabs button { min-height: 44px; padding: 6px 14px; border-radius: 999px; border: 2px solid var(--line); background: #fff; font: inherit; font-weight: 600; cursor: pointer; }
.tabs button[aria-pressed="true"] { background: var(--brand); color: #fff; border-color: var(--brand); }

@media (min-width: 720px) {
  h1 { font-size: 2.4rem; }
  .cta-row { flex-direction: row; }
  .hero-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 28px; align-items: center; }
  .cards { grid-template-columns: repeat(4, 1fr); }
  .facts { grid-template-columns: repeat(4, 1fr); }
  .gallery { grid-template-columns: repeat(3, 1fr); }
  .book-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 20px; align-items: start; }
  .sticky-cta { display: none; }
  .site-footer { padding-bottom: 24px; }
  .contact-list { grid-template-columns: repeat(3, 1fr); }
}
