/* =========================================================
   Autodoprava Rašovský — styles
   Brand: #0057A4 (blue), #017DD7 (link blue)
   Mobile-first, dependency-free.
   ========================================================= */

:root {
  --blue: #0057A4;
  --blue-dark: #00427d;
  --blue-deep: #06294a;
  --link: #0a6bb3;
  --link-hover: #00427d;
  --accent: #f3a712;       /* warm amber accent for eyebrows/underlines */
  --accent-ink: #8a5a00;   /* AA-safe amber text on white */
  --ink: #1a2230;
  --muted: #5b6675;
  --bg: #ffffff;
  --bg-alt: #eef4fb;
  --bg-tint: #f7fafd;
  --card: #ffffff;
  --border: #e2e8f0;
  --border-strong: #cdd9e6;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow-sm: 0 1px 2px rgba(16, 42, 73, .06), 0 2px 6px rgba(16, 42, 73, .05);
  --shadow: 0 6px 22px rgba(0, 87, 164, .10);
  --shadow-hover: 0 18px 40px rgba(0, 64, 125, .20);
  --maxw: 1120px;
  --header-h: 64px;
  --space: clamp(3rem, 7vw, 5.5rem);
}

/* ---------- Reset / base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 12px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.65;
  font-size: 1.0625rem;
}

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

a { color: var(--link); }
a:hover { color: var(--link-hover); }

h1, h2, h3 { line-height: 1.2; color: var(--blue); margin: 0 0 .5em; }

p { margin: 0 0 1rem; }
p:last-child { margin-bottom: 0; }

.container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: clamp(16px, 4vw, 32px);
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--blue);
  color: #fff;
  padding: .6rem 1rem;
  z-index: 1000;
  border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; color: #fff; }

:focus-visible {
  outline: 3px solid var(--link);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .55rem;
  padding: .85rem 1.4rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: 1.02rem;
  line-height: 1.1;
  text-decoration: none;
  border: 2px solid transparent;
  transition: transform .15s ease, background-color .15s ease, color .15s ease, box-shadow .15s ease;
  white-space: nowrap;
}
.btn--call {
  background: linear-gradient(180deg, #0066bd, var(--blue));
  color: #fff;
  box-shadow: 0 6px 16px rgba(0, 87, 164, .32);
}
.btn--call:hover { background: linear-gradient(180deg, #0057a4, var(--blue-dark)); color: #fff; transform: translateY(-2px); box-shadow: 0 10px 24px rgba(0, 87, 164, .4); }
.btn--call:active { transform: translateY(0); box-shadow: 0 4px 12px rgba(0, 87, 164, .3); }
.btn--ghost {
  background: transparent;
  color: var(--blue);
  border-color: var(--border-strong);
}
.btn--ghost:hover { background: var(--blue); color: #fff; border-color: var(--blue); transform: translateY(-2px); }
.btn__icon { display: inline-flex; }
.btn__icon svg { width: 1.05em; height: 1.05em; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, .9);
  backdrop-filter: saturate(150%) blur(10px);
  border-bottom: 1px solid var(--border);
  transition: box-shadow .2s ease, background-color .2s ease;
}
.site-header.is-scrolled {
  background: rgba(255, 255, 255, .96);
  box-shadow: 0 4px 18px rgba(16, 42, 73, .08);
}
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: var(--header-h);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  text-decoration: none;
  color: var(--blue);
  font-weight: 800;
}
.brand__logo { width: 42px; height: 42px; }
.brand__name { font-size: 1.08rem; letter-spacing: .2px; }

.primary-nav { display: flex; align-items: center; gap: 1.25rem; }
.primary-nav ul {
  list-style: none;
  display: flex;
  gap: 1.1rem;
  margin: 0;
  padding: 0;
}
/* menu list links only — NOT the call button (so .btn--call keeps its white text) */
.primary-nav ul a {
  text-decoration: none;
  color: var(--ink);
  font-weight: 600;
  padding: .35rem .15rem;
  position: relative;
}
.primary-nav ul a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  height: 2px;
  background: var(--blue);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform .2s ease;
}
.primary-nav ul a:hover { color: var(--blue); }
.primary-nav ul a:hover::after,
.primary-nav ul a.is-active::after { transform: scaleX(1); }
.primary-nav ul a.is-active { color: var(--blue); }
.primary-nav__call { padding: .58rem 1.1rem; font-size: .95rem; }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  background: transparent;
  border: 0;
  cursor: pointer;
  padding: 0;
}
.nav-toggle__bar {
  width: 26px;
  height: 3px;
  background: var(--blue);
  border-radius: 2px;
  transition: transform .2s ease, opacity .2s ease;
}
.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  background: #0a2d4d url("assets/img/hero-1024.jpg") center / cover no-repeat;
  color: #fff;
  isolation: isolate;
}
.hero__overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(105deg, rgba(4, 28, 52, .92) 0%, rgba(0, 56, 105, .8) 48%, rgba(0, 64, 120, .55) 100%);
  z-index: -1;
}
.hero__overlay::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(4, 24, 46, .55), transparent 38%);
}
.hero__content {
  padding-block: clamp(3.5rem, 10vw, 7rem);
  max-width: 720px;
}
/* location indicator sits below the hero text and states only where we operate */
.hero__location { margin: 0 0 1.9rem; }
.hero__location-chip {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  font-size: .95rem;
  font-weight: 700;
  color: #fff;
  background: rgba(255, 255, 255, .14);
  border: 1px solid rgba(255, 255, 255, .28);
  padding: .45rem .95rem;
  border-radius: 999px;
}
.hero__location-chip svg { width: 1.05em; height: 1.05em; }
.hero h1 {
  color: #fff;
  font-size: clamp(2rem, 5.4vw, 3.4rem);
  font-weight: 800;
  letter-spacing: -.01em;
  line-height: 1.1;
  margin-bottom: .55em;
  text-shadow: 0 2px 12px rgba(0, 20, 40, .4);
}
.hero__lead {
  font-size: clamp(1.05rem, 2.2vw, 1.22rem);
  color: rgba(255, 255, 255, .94);
  max-width: 60ch;
  margin-bottom: 1.4rem;
  text-shadow: 0 1px 3px rgba(0, 0, 0, .3);
}
.hero__actions { display: flex; flex-wrap: wrap; gap: .9rem; }
.hero .btn--ghost-light { color: #fff; border-color: rgba(255, 255, 255, .55); }
.hero .btn--ghost-light:hover { background: #fff; color: var(--blue); border-color: #fff; }
.hero__features {
  list-style: none;
  margin: 2.2rem 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: .6rem 1.4rem;
}
.hero__features li {
  position: relative;
  padding-left: 1.65rem;
  font-weight: 600;
  font-size: .98rem;
  color: rgba(255, 255, 255, .95);
}
.hero__features li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 1.2rem;
  height: 1.2rem;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='12' fill='%23f3a712'/%3E%3Cpath d='M7 12.3l3.2 3.2L17 8.5' fill='none' stroke='%23072039' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
}

@media (min-width: 760px) {
  .hero { background-image: url("assets/img/hero.jpg"); }
}

/* ---------- Sections ---------- */
.section { padding-block: var(--space); }
.section--alt { background: var(--bg-alt); }
.section__head { text-align: center; margin-bottom: 2.8rem; }
.section__eyebrow {
  display: block;
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--accent-ink);
  margin: 0 0 .5rem;
}
.section__title {
  font-size: clamp(1.7rem, 3.8vw, 2.3rem);
  font-weight: 800;
  letter-spacing: -.01em;
  text-align: center;
  margin-bottom: .6rem;
}
.section__title::after {
  content: "";
  display: block;
  width: 56px;
  height: 4px;
  margin: .7rem auto 0;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--blue), var(--accent));
}
.section__intro {
  text-align: center;
  color: var(--muted);
  max-width: 58ch;
  margin: 1rem auto 0;
  font-size: 1.08rem;
}

/* ---------- Service cards ---------- */
.cards {
  display: grid;
  grid-template-columns: 1fr; /* 1-up on phone/tablet; 3-up from 760px (see media query) */
  gap: 1.5rem;
}
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
  display: flex;
  flex-direction: column;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); border-color: var(--border-strong); }
.card__media { position: relative; overflow: hidden; }
.card__img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  transition: transform .4s ease;
}
.card:hover .card__img { transform: scale(1.05); }
.card__body {
  padding: 1.5rem 1.5rem 1.6rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.card__title {
  font-size: 1.28rem;
  display: flex;
  align-items: center;
  gap: .6rem;
  margin-bottom: .7rem;
}
.card__title::before {
  content: "";
  width: 4px;
  align-self: stretch;
  min-height: 1.2em;
  border-radius: 2px;
  background: linear-gradient(var(--blue), var(--accent));
  flex: 0 0 auto;
}
.card__body p { color: #44505f; }

/* ---------- Pricing ---------- */
.pricing {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.75rem;
  align-items: start;
}
.pricing__block {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 0;
  overflow: hidden;
}
.pricing__heading {
  display: flex;
  align-items: center;
  gap: .6rem;
  font-size: 1.2rem;
  color: #fff;
  margin: 0;
  padding: 1rem 1.5rem;
  background: linear-gradient(120deg, var(--blue), var(--blue-dark));
}
.pricing__heading svg { width: 1.3rem; height: 1.3rem; flex: 0 0 auto; }
.price-table { width: 100%; border-collapse: collapse; }
.price-table th, .price-table td {
  text-align: left;
  padding: .7rem 1.5rem;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.price-table tbody tr:nth-child(odd) { background: var(--bg-tint); }
.price-table tbody tr:hover { background: #e9f1fa; }
.price-table th[scope="row"] { font-weight: 500; color: var(--ink); padding-right: 1rem; }
.price-table td {
  text-align: right;
  font-weight: 800;
  color: var(--blue);
  white-space: nowrap;
}
.price-table tr:last-child th, .price-table tr:last-child td { border-bottom: 0; }
.pricing__note {
  text-align: center;
  color: var(--muted);
  margin-top: 2rem;
  font-size: 1.05rem;
}
.pricing__note a { font-weight: 700; }

/* ---------- Gallery ---------- */
.gallery {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr); /* 2-up on phone; 4-up from 760px (8 imgs → 4×2) */
  gap: 1rem;
}
.gallery__item {
  position: relative;
  display: block;
  border-radius: var(--radius-sm);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  background: #e9eef4;
  aspect-ratio: 4 / 3;
  transition: box-shadow .2s ease, transform .2s ease;
}
.gallery__item:hover, .gallery__item:focus-visible { box-shadow: var(--shadow-hover); transform: translateY(-3px); }
.gallery__item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .35s ease;
}
.gallery__item:hover img, .gallery__item:focus-visible img { transform: scale(1.07); }
.gallery__item::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(4, 28, 52, .45), transparent 55%);
  opacity: 0;
  transition: opacity .25s ease;
  z-index: 1;
}
.gallery__item::after {
  content: "";
  position: absolute;
  right: .6rem;
  bottom: .6rem;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: rgba(255, 255, 255, .92) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230057A4' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='M21 21l-4.3-4.3M11 8v6M8 11h6'/%3E%3C/svg%3E") center / 60% no-repeat;
  opacity: 0;
  transform: scale(.8);
  transition: opacity .25s ease, transform .25s ease;
  z-index: 2;
}
.gallery__item:hover::before, .gallery__item:focus-visible::before { opacity: 1; }
.gallery__item:hover::after, .gallery__item:focus-visible::after { opacity: 1; transform: scale(1); }

/* ---------- Contact ---------- */
.contact { display: flex; justify-content: center; }
.contact__card {
  font-style: normal;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 2.2rem 2.2rem 2rem;
  max-width: 500px;
  width: 100%;
  text-align: center;
}
.contact__name {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--blue);
  margin-bottom: .25rem;
}
.contact__addr { color: var(--muted); margin-bottom: 1.4rem; }
.contact__lines {
  display: grid;
  gap: .65rem;
  text-align: left;
  max-width: 360px;
  margin: 0 auto 1.4rem;
  padding: 1.2rem 0;
  border-block: 1px solid var(--border);
}
.contact__row {
  display: flex;
  align-items: baseline;
  gap: .6rem;
  margin: 0;
}
.contact__label {
  color: var(--muted);
  font-size: .82rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  flex: 0 0 4.5rem;
}
.contact__row a, .contact__row span:last-child { font-weight: 600; color: var(--ink); }
.contact__row a { color: var(--link); }
.contact__card a { overflow-wrap: anywhere; }
.contact__reg { color: var(--muted); font-size: .85rem; margin-top: 0; }

/* On phones the fixed label column squeezes the e-mail onto two lines —
   stack label above value so it gets the card's full width and stays on one line. */
@media (max-width: 480px) {
  .contact__row { flex-direction: column; align-items: flex-start; gap: .1rem; }
  .contact__label { flex: none; }
}
.contact__actions {
  display: flex;
  gap: .8rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 1.6rem;
}

/* ---------- Footer ---------- */
.site-footer {
  background: linear-gradient(160deg, var(--blue-dark), var(--blue-deep));
  color: #c4d8ee;
  padding-block: 2.4rem;
  margin-top: 0;
  border-top: 3px solid var(--accent);
}
.site-footer__inner { text-align: center; }
.site-footer__brand {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  color: #fff;
  font-weight: 800;
  font-size: 1.1rem;
  margin-bottom: 1rem;
}
.site-footer__brand img { width: 34px; height: 34px; }
.site-footer p { margin: .3rem 0; font-size: .92rem; line-height: 1.6; }
.site-footer__contact { margin-top: 1rem; font-size: .98rem; }
.site-footer a { color: #fff; text-decoration: none; font-weight: 600; }
.site-footer a:hover { text-decoration: underline; color: #fff; }
.site-footer__sep { color: rgba(255, 255, 255, .35); margin: 0 .2rem; }

/* ---------- Floating call button (mobile) ---------- */
.call-fab {
  display: none; /* shown only on mobile (see media query) */
  align-items: center;
  gap: .5rem;
  position: fixed;
  right: 16px;
  bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  z-index: 80;
  background: var(--blue);
  color: #fff;
  text-decoration: none;
  font-weight: 800;
  padding: .85rem 1.25rem;
  border-radius: 999px;
  border: 2px solid rgba(255, 255, 255, .9);
  box-shadow: 0 6px 18px rgba(0, 0, 0, .35);
}
.call-fab:hover, .call-fab:focus-visible { color: #fff; background: var(--blue-dark); }
.call-fab:active { transform: translateY(1px); }
.call-fab__icon { display: inline-flex; line-height: 1; }
.call-fab__icon svg { width: 1.2rem; height: 1.2rem; }

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(8, 18, 30, .92);
  padding: 4vmin;
}
.lightbox[hidden] { display: none; }
.lightbox__figure { margin: 0; max-width: min(1100px, 92vw); text-align: center; }
.lightbox__img {
  max-width: 100%;
  max-height: 80vh;
  margin: 0 auto;
  border-radius: 8px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, .5);
}
.lightbox__caption { color: #e9eef4; margin-top: .8rem; font-size: .95rem; }
.lightbox__btn {
  position: absolute;
  background: rgba(255, 255, 255, .12);
  color: #fff;
  border: 0;
  cursor: pointer;
  border-radius: 999px;
  width: 52px;
  height: 52px;
  font-size: 1.6rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color .15s ease;
}
.lightbox__btn:hover { background: rgba(255, 255, 255, .28); }
.lightbox__close { top: 3vmin; right: 3vmin; }
.lightbox__prev { left: 3vmin; top: 50%; transform: translateY(-50%); }
.lightbox__next { right: 3vmin; top: 50%; transform: translateY(-50%); }

/* ---------- Responsive: mobile nav ---------- */
@media (max-width: 760px) {
  .nav-toggle { display: flex; }
  .primary-nav {
    position: fixed;
    inset: var(--header-h) 0 auto 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: #fff;
    border-bottom: 1px solid var(--border);
    box-shadow: 0 12px 24px rgba(0, 0, 0, .12);
    padding: .5rem 0 1rem;
    transform: translateY(-130%);
    visibility: hidden; /* keep off-screen links out of the tab order when closed */
    transition: transform .25s ease, visibility .25s ease;
    max-height: calc(100vh - var(--header-h));
    overflow-y: auto;
  }
  .primary-nav.is-open { transform: translateY(0); visibility: visible; }
  .primary-nav ul { flex-direction: column; gap: 0; }
  .primary-nav li { border-bottom: 1px solid var(--border); }
  .primary-nav ul a { display: block; padding: .9rem clamp(16px, 4vw, 32px); border-bottom: 0; }
  .primary-nav__call { margin: 1rem clamp(16px, 4vw, 32px) 0; justify-content: center; }

  /* always-visible floating call button + clearance so it never covers footer text */
  .call-fab { display: inline-flex; }
  .site-footer { padding-bottom: calc(5.5rem + env(safe-area-inset-bottom, 0px)); }

  /* avoid duplicate call CTAs on mobile — the floating button is the single call action
     (in-page .btn--call in the menu, hero and contact are hidden; .call-fab is separate) */
  .btn--call { display: none; }
  /* hero CTAs are redundant on mobile (floating call + nav handle them) */
  .hero__actions { display: none; }
}

/* ---------- Desktop grid columns ----------
   NOTE: must come AFTER the base .cards/.gallery rules — media queries add no
   specificity, so an equal-specificity base rule placed later would otherwise win. */
@media (min-width: 760px) {
  .cards { grid-template-columns: repeat(3, 1fr); }
  .gallery { grid-template-columns: repeat(4, 1fr); }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    transition-duration: .001ms !important;
  }
}
