/* cestopol.cz - zakladni styl. Mobile-first, bez build kroku. */

:root {
  --color-primary: #2f6690;
  --color-primary-dark: #204a6b;
  --color-primary-light: #eaf2f8;
  --color-accent: #ef8f22;
  --color-accent-dark: #d17a12;
  --color-bg: #ffffff;
  --color-bg-alt: #f6f9fb;
  --color-text: #1c2b33;
  --color-text-muted: #5c6f78;
  --color-border: #e1e8ec;
  --color-success: #2e8b57;
  --color-success-bg: #e9f7ef;
  --color-danger: #c0392b;
  --color-danger-bg: #fbeae8;
  --color-warning: #b7791f;
  --color-warning-bg: #fbf1de;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 2px 10px rgba(28, 43, 51, 0.08);
  --shadow-lg: 0 12px 32px rgba(28, 43, 51, 0.16);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --container-width: 1160px;
}

* { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 5.5rem; /* aby kotva nezmizela pod pripnutou hlavickou */
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  margin: 0;
  font-family: var(--font);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.5;
  font-size: 16px;
}

img { max-width: 100%; display: block; }

a { color: var(--color-primary); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4 { line-height: 1.25; margin: 0 0 .5em; font-weight: 700; }
h1 { font-size: clamp(1.75rem, 1.4rem + 1.5vw, 2.6rem); }
h2 { font-size: clamp(1.4rem, 1.2rem + 1vw, 2rem); }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; }

.container {
  width: 100%;
  max-width: var(--container-width);
  margin-inline: auto;
  padding-inline: 1rem;
}

@media (min-width: 640px) {
  .container { padding-inline: 1.5rem; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  border: 2px solid transparent;
  border-radius: 999px;
  padding: .8rem 1.5rem;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: transform .1s ease, box-shadow .15s ease, background-color .15s ease;
  line-height: 1.2;
  min-height: 48px;
}
.btn:hover { text-decoration: none; }
.btn:active { transform: scale(.98); }
.btn-block { width: 100%; }

.btn-primary {
  background: var(--color-accent);
  color: #fff;
  box-shadow: 0 4px 14px rgba(239, 143, 34, 0.35);
}
.btn-primary:hover { background: var(--color-accent-dark); }

.btn-outline {
  background: transparent;
  border-color: var(--color-primary);
  color: var(--color-primary);
}
.btn-outline:hover { background: var(--color-primary-light); }

.btn-ghost {
  background: transparent;
  color: var(--color-primary);
}
.btn-ghost:hover { background: var(--color-primary-light); }

.btn-danger { background: var(--color-danger); color: #fff; }
.btn-sm { padding: .5rem 1rem; min-height: 38px; font-size: .9rem; }

.btn:disabled { opacity: .55; cursor: not-allowed; box-shadow: none; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(255, 255, 255, .96);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--color-border);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: .65rem;
}
.brand { display: flex; align-items: center; gap: .6rem; font-weight: 800; font-size: 1.2rem; color: var(--color-primary-dark); }
.brand img { height: 40px; width: 40px; }
.main-nav { display: flex; align-items: center; gap: 1.4rem; }
.main-nav a { color: var(--color-text); font-weight: 600; }
.main-nav a:hover { color: var(--color-primary); text-decoration: none; }

/* Hamburger tlacitko - viditelne jen do 640px, tj. telefony (viz .main-nav
   pravidlo nize) - na tabletu a vys se nav zobrazuje bezne v radku jako driv. */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  flex-shrink: 0;
}
.nav-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--color-primary-dark);
  border-radius: 2px;
  transition: transform .2s ease, opacity .2s ease;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Hamburger jen na telefonu (do 640px) - na tabletu (768px a vic, viz
   .mobile-order-bar breakpoint 899px pouzity jinde pro odlisny ucel) zustava
   klasicke menu v radku. */
@media (max-width: 640px) {
  .site-header { position: sticky; }
  .site-header .container { position: relative; }
  .nav-toggle { display: flex; }
  .main-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: #fff;
    border-bottom: 1px solid var(--color-border);
    box-shadow: var(--shadow);
    padding: .5rem 1rem;
  }
  .main-nav.is-open { display: flex; }
  .main-nav a { padding: .75rem 0; border-top: 1px solid var(--color-border); }
  .main-nav a:first-child { border-top: none; }
}

/* ---------- Hero ---------- */
.hero {
  /* background-color je pojistka, kdyby se nenacetl assets/img/hero.webp;
     tmavsi gradient nad fotkou drzi text citelny na jakemkoliv snimku. */
  background-color: var(--color-primary-dark);
  background-image:
    linear-gradient(160deg, rgba(32, 63, 92, .82) 0%, rgba(20, 41, 61, .88) 100%),
    url('../img/hero.webp');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  color: #fff;
  padding-block: 4.5rem 5rem;
}
.hero h1 { color: #fff; margin-bottom: .4em; text-shadow: 0 1px 12px rgba(0,0,0,.25); }
.hero h2, .hero p {
  color: rgba(255,255,255,.92); font-size: 1.1rem; font-weight: 500;
  max-width: 42ch; margin: 0;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.5rem; }

/* ---------- Sections ---------- */
.section { padding-block: 3rem; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin-bottom: 1.5rem; flex-wrap: wrap; }
.section-head p { color: var(--color-text-muted); margin: 0; }

.page-prose { max-width: 68ch; }
.page-prose p { line-height: 1.7; margin: 0 0 1.2em; }

.about-layout { display: grid; grid-template-columns: 2fr 1fr; gap: 2rem; align-items: stretch; }
.about-photo { border-radius: var(--radius); overflow: hidden; }
.about-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
@media (max-width: 780px) {
  .about-layout { grid-template-columns: 1fr; }
  .about-photo { aspect-ratio: 16 / 9; }
}

/* ---------- Kontakt ---------- */
.contact-info-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1.5rem;
  margin: 1.5rem 0 2.5rem;
}
.contact-info-block { border: 1px solid var(--color-border); border-radius: var(--radius); padding: 1.25rem; }
.contact-info-block strong { display: block; margin-bottom: .5rem; font-size: 1.05rem; color: var(--color-primary-dark); }
.contact-info-block p { margin: 0 0 .3rem; }
.contact-info-block a { color: var(--color-text); }
.contact-info-block a:hover { color: var(--color-primary); text-decoration: underline; }

.contact-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; align-items: start; }
.contact-map { border-radius: var(--radius); overflow: hidden; aspect-ratio: 4 / 3; border: 1px solid var(--color-border); }
.contact-map iframe { width: 100%; height: 100%; border: 0; display: block; }
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
@media (max-width: 780px) { .contact-layout { grid-template-columns: 1fr; } }

/* ---------- Trip cards ---------- */
.trip-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.25rem;
}
.trip-card {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: box-shadow .15s ease, transform .15s ease;
  color: inherit;
  text-decoration: none;
}
.trip-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); text-decoration: none; }
.trip-card-media { position: relative; aspect-ratio: 4 / 3; background: var(--color-bg-alt); overflow: hidden; }
.trip-card-media img { width: 100%; height: 100%; object-fit: cover; }
.trip-card-badge {
  position: absolute; top: .6rem; left: .6rem; z-index: 1;
  font-size: .72rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase;
  background: var(--color-danger); color: #fff;
  border-radius: 999px; padding: .28rem .6rem;
}
.trip-card.is-full .trip-card-media img { filter: grayscale(.55); opacity: .82; }
.trip-card-body { padding: 1rem 1.1rem 1.2rem; display: flex; flex-direction: column; gap: .4rem; flex: 1; }
.trip-card-date {
  display: inline-flex; align-items: center; gap: .35rem;
  font-size: .82rem; font-weight: 700; color: var(--color-primary);
  background: var(--color-primary-light); border-radius: 999px; padding: .25rem .65rem;
  width: fit-content;
}
.trip-card-body h3 { margin: .2rem 0 0; color: var(--color-text); transition: color .15s ease; }
.trip-card:hover .trip-card-body h3 { color: var(--color-primary); }
.trip-card-places { color: var(--color-text-muted); font-size: .82rem; margin: 0; }
.trip-card-excerpt { color: var(--color-text-muted); font-size: .92rem; margin: 0; flex: 1; }
.trip-card-footer { display: flex; align-items: center; justify-content: space-between; margin-top: .5rem; }
.trip-price { font-weight: 800; font-size: 1.1rem; color: var(--color-primary-dark); }
.trip-price small { font-weight: 500; color: var(--color-text-muted); font-size: .75rem; display: block; }

.price-old { font-weight: 500; color: var(--color-text-muted); font-size: .85em; }

.empty-state {
  text-align: center; padding: 3rem 1rem; color: var(--color-text-muted);
  background: var(--color-bg-alt); border-radius: var(--radius);
}

/* ---------- Filters ---------- */
.filters {
  display: grid;
  grid-template-columns: 1fr;
  gap: .75rem;
  background: var(--color-bg-alt);
  border-radius: var(--radius);
  padding: 1rem;
  margin-bottom: 1.5rem;
}
@media (min-width: 720px) {
  .filters { grid-template-columns: repeat(3, 1fr) auto; align-items: end; }
}
.field { display: flex; flex-direction: column; gap: .3rem; }
.field label { font-size: .82rem; font-weight: 600; color: var(--color-text-muted); }
.field input, .field select, .field textarea, .place-row select {
  font: inherit;
  padding: .65rem .8rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--color-text);
  min-height: 44px;
}
.field textarea { min-height: 120px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus, .place-row select:focus {
  outline: 2px solid var(--color-primary); outline-offset: 1px;
}
.field-check { display: flex; align-items: center; gap: .5rem; flex-direction: row; }
.field-check input { min-height: 0; width: 18px; height: 18px; }

/* ---------- Trip detail ---------- */
.trip-detail {
  display: grid;
  gap: 2rem;
  grid-template-columns: 1fr;
  padding-block: 2rem;
}
@media (min-width: 900px) {
  .trip-detail { grid-template-columns: 1.4fr 1fr; align-items: start; }
}
.trip-detail-body { color: var(--color-text); white-space: pre-line; }
.trip-detail-body iframe, .ql-editor iframe {
  display: block; width: 100%; aspect-ratio: 16 / 9; height: auto;
  border: 0; border-radius: var(--radius-sm); margin: 1rem 0;
}

.booking-box {
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1.25rem;
  position: sticky;
  top: 5.5rem;
  box-shadow: var(--shadow);
  background: #fff;
}
.booking-box h3 { margin-bottom: 1rem; }
.booking-box-title {
  display: flex; align-items: flex-start; justify-content: space-between; gap: .5rem;
}
.place-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: .5rem;
  align-items: center;
  margin-bottom: .6rem;
}

.qty-stepper {
  display: flex;
  align-items: stretch;
  height: 44px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: #fff;
}
.qty-btn {
  width: 44px;
  border: none;
  background: var(--color-bg-alt);
  color: var(--color-primary-dark);
  font-size: 1.4rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color .15s ease;
}
.qty-btn:hover:not(:disabled) { background: var(--color-primary-light); }
.qty-btn:active:not(:disabled) { transform: scale(.94); }
.qty-btn:disabled { opacity: .35; cursor: not-allowed; }
.qty-input {
  width: 40px;
  border: none;
  border-left: 1px solid var(--color-border);
  border-right: 1px solid var(--color-border);
  text-align: center;
  font-weight: 700;
  font-size: 1rem;
  color: var(--color-text);
  background: #fff;
  padding: 0;
  -moz-appearance: textfield;
}
.qty-input::-webkit-inner-spin-button, .qty-input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }

.price-total {
  display: flex; align-items: baseline; justify-content: space-between;
  margin: 1rem 0; padding-top: 1rem; border-top: 1px dashed var(--color-border);
}
.price-total .amount { font-size: 1.6rem; font-weight: 800; color: var(--color-primary-dark); }
.price-total .price-old { margin-right: .4rem; }

/* Detail pobytu - stitek "Obsazeno" vpravo v zahlavi objednavkoveho boxu
   (vsechny vypsane terminy obsazene - kapacita 0 nebo naplnena) */
.booking-soldout {
  flex-shrink: 0; align-self: flex-start;
  font-weight: 800; font-size: .82rem; letter-spacing: .04em; text-transform: uppercase;
  background: var(--color-danger-bg); color: var(--color-danger);
  border-radius: 999px; padding: .3rem .7rem;
}
#termin option:disabled { color: var(--color-text-muted); }

/* ---------- Ukotvena lista s cenou/Objednat na mobilu (detail pobytu) ---------- */
.mobile-order-bar {
  display: none;
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 90;
  align-items: center; justify-content: space-between; gap: 1rem;
  background: #fff; border-top: 1px solid var(--color-border);
  box-shadow: 0 -4px 16px rgba(28, 43, 51, .1);
  padding: .75rem 1rem calc(.75rem + env(safe-area-inset-bottom));
}
.mobile-order-bar-price { font-weight: 700; color: var(--color-primary-dark); }
.mobile-order-bar-price small { font-weight: 400; color: var(--color-text-muted); }
@media (max-width: 899px) {
  .mobile-order-bar { display: flex; }
  body:has(#mobile-order-bar) { padding-bottom: 68px; }

  /* Ikonka nastaveni cookies (#c-icon) prichazi z GTM tagu (mimo tenhle
     repozitar - viz README/GTM), na mobilu ale defaultne sedi vlevo dole
     presne pres tlacitko Objednat v mobile-order-bar. !important je nutne,
     protoze GTM svuj <style> vklada za behu do <head> AZ PO tomhle souboru,
     takze by jinak pri stejne specificite vyhralo podle poradi v kaskade. */
  body:has(#mobile-order-bar) #c-icon { bottom: 83px !important; }
}

/* Cookie lista/ikonka (#c-bar/#c-icon, viz GTM tag) ma velmi vysoky z-index a
   na mobilu prekryva polozky v otevrenem objednavkovem modalu (#order-modal)
   - dokud je modal otevreny, cookie prvky se schovaji; po zavreni se zase
   ukazou (viz vychozi pravidlo pro #c-bar/#c-icon z GTM tagu). */
body:has(#order-modal:not([hidden])) #c-bar,
body:has(#order-modal:not([hidden])) #c-icon {
  display: none !important;
}

.badge { display: inline-block; font-size: .78rem; font-weight: 700; padding: .2rem .55rem; border-radius: 999px; }
.badge-success { background: var(--color-success-bg); color: var(--color-success); }
.badge-muted { background: var(--color-bg-alt); color: var(--color-text-muted); }
.badge-warning { background: var(--color-warning-bg); color: var(--color-warning); }
.badge-danger { background: var(--color-danger-bg); color: var(--color-danger); }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--color-primary-dark);
  color: rgba(255,255,255,.85);
  padding-block: 2.5rem;
  margin-top: 3rem;
}
.site-footer a { color: #fff; }
.site-footer .container { display: flex; flex-wrap: wrap; gap: 1rem 2rem; justify-content: space-between; }
.footer-bottom {
  text-align: center;
  margin-top: 2rem;
  padding: 1.5rem 1rem 0;
  border-top: 1px solid rgba(255, 255, 255, .15);
}
.footer-bottom p { margin: 0; color: rgba(255, 255, 255, .7); font-size: .88rem; }

/* ---------- Alerts / flash ---------- */
.alert { border-radius: var(--radius-sm); padding: .85rem 1rem; margin-bottom: 1rem; font-weight: 600; }
.alert-success { background: var(--color-success-bg); color: var(--color-success); }
.alert-error { background: var(--color-danger-bg); color: var(--color-danger); }
.alert-warning { background: var(--color-warning-bg); color: var(--color-warning); }

/* ---------- Admin layout ---------- */
.admin-shell { display: flex; min-height: 100vh; background: var(--color-bg-alt); }
.admin-sidebar {
  width: 230px; flex-shrink: 0; background: var(--color-primary-dark); color: #fff;
  padding: 1.5rem 1rem; position: sticky; top: 0; height: 100vh; overflow-y: auto;
}
.admin-sidebar .brand { color: #fff; margin-bottom: 2rem; }
.admin-sidebar nav a {
  display: block; color: rgba(255,255,255,.82); padding: .6rem .75rem; border-radius: var(--radius-sm);
  font-weight: 600; margin-bottom: .15rem;
}
.admin-sidebar nav a:hover, .admin-sidebar nav a.active { background: rgba(255,255,255,.12); color: #fff; text-decoration: none; }
.admin-main { flex: 1; padding: 2rem; min-width: 0; }
.admin-topbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.5rem; gap: 1rem; flex-wrap: wrap; }

@media (max-width: 820px) {
  .admin-shell { flex-direction: column; }
  .admin-sidebar { width: 100%; height: auto; position: static; padding: 1rem; }
  .admin-sidebar nav { display: flex; flex-wrap: wrap; gap: .3rem; }
  .admin-main { padding: 1.25rem; }
}

.card { background: #fff; border: 1px solid var(--color-border); border-radius: var(--radius); padding: 1.25rem; margin-bottom: 1.25rem; }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 1rem; margin-bottom: 1.5rem; }
.stat-card { background: #fff; border: 1px solid var(--color-border); border-radius: var(--radius); padding: 1.25rem; }
.stat-card .value { font-size: 2rem; font-weight: 800; color: var(--color-primary-dark); }
.stat-card .label { color: var(--color-text-muted); font-weight: 600; font-size: .9rem; }

table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: .7rem .6rem; border-bottom: 1px solid var(--color-border); font-size: .92rem; }
th { color: var(--color-text-muted); font-size: .78rem; text-transform: uppercase; letter-spacing: .03em; }
.table-wrap { overflow-x: auto; }
.table-centered th, .table-centered td { text-align: center; }
.table-centered .qty-stepper { margin: 0 auto; }

.form-grid { display: grid; gap: 1rem; grid-template-columns: 1fr; }
@media (min-width: 640px) { .form-grid.cols-2 { grid-template-columns: 1fr 1fr; } }
.checkbox-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: .5rem; }

/* ---------- Image picker (admin) ---------- */
.image-picker {
  position: relative;
  aspect-ratio: 4 / 3;
  border: 2px dashed var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-bg-alt);
  overflow: hidden;
  transition: border-color .15s ease, background-color .15s ease;
}
.image-picker:hover, .image-picker.is-dragover {
  border-color: var(--color-primary);
  background: var(--color-primary-light);
}
.image-picker-input {
  position: absolute; inset: 0; width: 100%; height: 100%;
  opacity: 0; cursor: pointer; z-index: 2; margin: 0; min-height: 0;
}
.image-picker-icon {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  color: var(--color-primary); pointer-events: none;
}
.image-picker-icon svg { width: 32px; height: 32px; }

.image-gallery-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: .6rem; margin-top: .75rem;
}
.image-gallery-item {
  position: relative; aspect-ratio: 4 / 3; border-radius: var(--radius-sm); overflow: hidden;
  background: var(--color-bg-alt); border: 2px solid transparent;
}
.image-gallery-item.is-cover { border-color: var(--color-primary); }
.image-gallery-item img { width: 100%; height: 100%; object-fit: cover; display: block; }
.image-gallery-item form { margin: 0; }
.image-gallery-item-remove {
  display: flex; align-items: center; justify-content: center;
  position: absolute; top: .35rem; right: .35rem; z-index: 1;
  width: 26px; height: 26px; border-radius: 50%; border: none;
  background: rgba(28, 43, 51, .78); color: #fff; font-size: 1.05rem; line-height: 1;
  cursor: pointer; transition: background-color .15s ease;
}
.image-gallery-item-remove:hover { background: var(--color-danger); }
.image-gallery-item-cover {
  display: flex; align-items: center; justify-content: center;
  position: absolute; top: .35rem; left: .35rem; z-index: 1;
  width: 26px; height: 26px; border-radius: 50%; border: none;
  background: rgba(28, 43, 51, .78); color: #fff; font-size: .95rem; line-height: 1;
  cursor: pointer; transition: background-color .15s ease;
}
.image-gallery-item-cover:hover { background: var(--color-primary); }
.image-gallery-item-badge {
  position: absolute; top: .35rem; left: .35rem; z-index: 1;
  background: var(--color-primary); color: #fff; font-size: .68rem; font-weight: 600;
  padding: .15rem .5rem; border-radius: 999px; pointer-events: none;
}

/* ---------- Galerie na detailu pobytu ---------- */
.trip-gallery-main {
  position: relative; border-radius: var(--radius); overflow: hidden;
  margin-bottom: .6rem; aspect-ratio: 16/9; background: var(--color-bg-alt);
}
.trip-gallery-main img { width: 100%; height: 100%; object-fit: cover; display: block; }
.trip-gallery-main img.is-zoomable { cursor: zoom-in; }
.trip-gallery-arrow {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 1;
  width: 40px; height: 40px; border-radius: 50%; border: none;
  background: rgba(28, 43, 51, .6); color: #fff; font-size: 1.5rem; line-height: 1;
  cursor: pointer; transition: background-color .15s ease;
  display: flex; align-items: center; justify-content: center;
}
.trip-gallery-arrow:hover { background: rgba(28, 43, 51, .85); }
.trip-gallery-prev { left: .6rem; }
.trip-gallery-next { right: .6rem; }
.trip-gallery-thumbs { display: flex; gap: .5rem; flex-wrap: wrap; margin-bottom: 1.25rem; }
.trip-gallery-thumb {
  width: 72px; height: 54px; object-fit: cover; border-radius: var(--radius-sm);
  cursor: pointer; opacity: .6; border: 2px solid transparent; transition: opacity .15s ease, border-color .15s ease;
}
.trip-gallery-thumb:hover { opacity: .9; }
.trip-gallery-thumb.is-active { opacity: 1; border-color: var(--color-primary); }

.trip-lightbox-overlay { background: rgba(20, 30, 36, .92); }
.trip-lightbox-inner { position: relative; width: 100%; max-width: 1100px; }
.trip-lightbox-inner img { width: 100%; max-height: 85vh; object-fit: contain; display: block; }
.trip-lightbox-inner .modal-close { background: rgba(255, 255, 255, .15); color: #fff; }
.trip-lightbox-inner .modal-close:hover { background: rgba(255, 255, 255, .3); }
.trip-lightbox-inner .trip-gallery-arrow { top: 50%; }

/* ---------- Vlastni potvrzovaci dialog (admin) ---------- */
.confirm-modal { max-width: 380px; text-align: center; }
.confirm-modal p { margin: 0 0 1.25rem; color: var(--color-text); }
.confirm-modal-actions { display: flex; gap: .6rem; justify-content: center; }
.confirm-modal-actions .btn { flex: 1; }

.login-shell { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: var(--color-primary-dark); padding: 1rem; }
.login-card { background: #fff; border-radius: var(--radius); padding: 2rem; width: 100%; max-width: 380px; box-shadow: var(--shadow-lg); }
.login-card .brand { justify-content: center; margin-bottom: 1.5rem; }

/* ---------- Booking modal ---------- */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(28, 43, 51, .55);
  display: flex; align-items: flex-end; justify-content: center;
  z-index: 100; padding: 0;
}
.modal-overlay[hidden] { display: none; }
.modal {
  background: #fff; border-radius: var(--radius) var(--radius) 0 0;
  width: 100%; max-width: 560px; max-height: 92vh; overflow-y: auto;
  padding: 1.5rem; position: relative; box-shadow: var(--shadow-lg);
}
@media (min-width: 640px) {
  .modal-overlay { align-items: center; padding: 1rem; }
  .modal { border-radius: var(--radius); }
}
/* .modal-overlay je na mobilu vychozi zarovnany dolu (bottom sheet - vhodne
   pro objednavkovy formular), ale prohlizec obrazku musi byt vzdy uprostred
   bez ohledu na sirku obrazovky - proto override az za zakladni pravidlo,
   aby vyhral i pri stejne specificite (cascade poradi). */
.trip-lightbox-overlay { align-items: center; }
.modal-close {
  position: absolute; top: .75rem; right: .75rem; background: var(--color-bg-alt);
  border: none; border-radius: 50%; width: 36px; height: 36px; font-size: 1.3rem;
  cursor: pointer; color: var(--color-text-muted); line-height: 1;
}
.modal-close:hover { background: var(--color-border); }

.place-group {
  border: 1px solid var(--color-border); border-radius: var(--radius); padding: 1.1rem;
  margin: 1rem 0; background: var(--color-bg-alt);
}
.place-group h4 { margin: 0 0 .9rem; font-size: .92rem; font-weight: 700; color: var(--color-primary-dark); }
.traveler-row { display: grid; gap: .85rem; grid-template-columns: 1fr 1fr; }
.traveler-row .field { margin: 0; min-width: 0; }
.traveler-row .field input, .traveler-row .field select { width: 100%; min-width: 0; }
.traveler-row .field.full { grid-column: 1 / -1; }
.traveler-row .field .optional { font-weight: 400; text-transform: none; letter-spacing: 0; }

.dob-select-group { display: grid; grid-template-columns: 78px 1fr 92px; gap: .5rem; }
.dob-select-group select { padding-inline: .55rem; }
@media (max-width: 360px) { .dob-select-group { grid-template-columns: 68px 1fr 82px; gap: .35rem; } }

.traveler-more { margin-top: 1rem; margin-bottom: 1.5rem; }
.traveler-more summary {
  cursor: pointer; color: var(--color-primary); font-weight: 600; font-size: .92rem;
  list-style: none;
}
.traveler-more summary::-webkit-details-marker { display: none; }
.traveler-more summary::before { content: '+ '; }
.traveler-more[open] summary::before { content: '– '; }
.traveler-more summary:hover { color: var(--color-primary-dark); }
.traveler-label { margin: 0 0 .5rem; font-size: .85rem; font-weight: 700; color: var(--color-text-muted); }
.traveler-label:not(:first-child) { margin-top: 1.1rem; }

.order-vop-check {
  display: flex; align-items: center; gap: .65rem;
  margin: 1.3rem 0 1.7rem; font-size: .92rem; color: var(--color-text); cursor: pointer;
}
.order-vop-check input[type="checkbox"] {
  appearance: none; -webkit-appearance: none;
  width: 22px; height: 22px; min-height: 0; flex-shrink: 0; margin: 0;
  border: 2px solid var(--color-border); border-radius: 6px;
  background: #fff; cursor: pointer; position: relative;
  transition: background-color .15s ease, border-color .15s ease;
}
.order-vop-check input[type="checkbox"]:hover { border-color: var(--color-primary); }
.order-vop-check input[type="checkbox"]:checked { background: var(--color-accent); border-color: var(--color-accent); }
.order-vop-check input[type="checkbox"]:checked::after {
  content: '';
  position: absolute; left: 6px; top: 2px; width: 6px; height: 11px;
  border: solid #fff; border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
.order-vop-check input[type="checkbox"]:focus-visible { outline: 2px solid var(--color-primary); outline-offset: 2px; }

.payment-options { display: flex; flex-direction: column; gap: .75rem; margin-top: 1.25rem; }

.qr-box { display: flex; justify-content: center; padding: 1rem 0; }
.qr-box img { width: 220px; height: 220px; border: 1px solid var(--color-border); border-radius: var(--radius-sm); background: #fff; }
.qr-details { width: 100%; border-collapse: collapse; margin: 1rem 0; }
.qr-details th { text-align: left; color: var(--color-text-muted); font-weight: 600; font-size: .85rem; padding: .4rem .5rem .4rem 0; white-space: nowrap; vertical-align: top; }
.qr-details td { padding: .4rem 0; font-weight: 700; word-break: break-word; }

/* ---------- Toggle switch ---------- */
.status-toggle { display: flex; align-items: center; gap: .75rem; }
.status-toggle[hidden] { display: none; }
.switch { position: relative; display: inline-block; width: 52px; height: 30px; flex-shrink: 0; }
.switch input {
  position: absolute; inset: 0; width: 100%; height: 100%; margin: 0;
  opacity: 0; cursor: pointer; z-index: 1;
}
.switch-track {
  position: absolute; inset: 0; background: #c7d0d6; border-radius: 999px;
  transition: background-color .2s ease;
}
.switch-thumb {
  position: absolute; top: 3px; left: 3px; width: 24px; height: 24px;
  background: #fff; border-radius: 50%; box-shadow: 0 1px 3px rgba(28, 43, 51, .35);
  transition: transform .2s cubic-bezier(.4, 0, .2, 1);
}
.switch input:checked ~ .switch-track { background: var(--color-success); }
.switch input:checked ~ .switch-track .switch-thumb { transform: translateX(22px); }
.switch input:focus-visible ~ .switch-track { outline: 2px solid var(--color-primary); outline-offset: 2px; }
.switch input:disabled ~ .switch-track { opacity: .6; cursor: not-allowed; }
.status-toggle-label { font-weight: 700; }
.status-toggle-label.is-active { color: var(--color-success); }
.status-toggle-label.is-inactive { color: var(--color-text-muted); }

.muted { color: var(--color-text-muted); }
.mt-0 { margin-top: 0; }
.flex-between { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; }

/* ---------- Flatpickr - sladeni s barvami webu ---------- */
.flatpickr-calendar {
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  font-family: var(--font);
}
.flatpickr-months .flatpickr-month,
.flatpickr-current-month,
.flatpickr-weekdays { background: var(--color-primary-dark); }
.flatpickr-current-month span.cur-month,
.flatpickr-current-month input.cur-year { color: #fff; }
span.flatpickr-weekday { background: var(--color-primary-dark); color: rgba(255,255,255,.85); }
.flatpickr-months .flatpickr-prev-month, .flatpickr-months .flatpickr-next-month { fill: #fff; }
.flatpickr-months .flatpickr-prev-month:hover, .flatpickr-months .flatpickr-next-month:hover { fill: var(--color-accent); }
.flatpickr-day.selected, .flatpickr-day.selected:hover,
.flatpickr-day.startRange, .flatpickr-day.endRange {
  background: var(--color-accent); border-color: var(--color-accent);
}
.flatpickr-day.inRange {
  background: var(--color-primary-light); border-color: var(--color-primary-light);
  box-shadow: -5px 0 0 var(--color-primary-light), 5px 0 0 var(--color-primary-light);
}
.flatpickr-day.today { border-color: var(--color-primary); }
.flatpickr-day.today:hover { background: var(--color-primary-light); border-color: var(--color-primary); }
.flatpickr-day:hover { background: var(--color-primary-light); }
.flatpickr-alt-input { cursor: pointer; background-color: #fff; }
