/* ============================================================
   iRent.sk — additions on top of the design (style.css is an
   unmodified copy of new-design/assets/css/style.css, so the
   design can be updated by replacing that file).
   ============================================================ */

/* ---------- Self-hosted Manrope (variable, OFL) — no Google Fonts request (GDPR) ---------- */
@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-display: swap;
  font-weight: 200 800;
  src: url('../fonts/manrope-latin-ext-wght-normal.woff2') format('woff2-variations');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-display: swap;
  font-weight: 200 800;
  src: url('../fonts/manrope-latin-wght-normal.woff2') format('woff2-variations');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ---------- Hero: real <img> (responsive, high fetch priority) instead of a CSS background ---------- */
.hero-bg { background: none; }
.hero-bg picture, .hero-bg img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
}
.hero-bg img { object-fit: cover; object-position: center 38%; }
.hero-bg::after { z-index: 1; }

/* ---------- Content must be visible without JavaScript (SEO, AI crawlers, slow devices) ---------- */
html:not(.js) .reveal { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ---------- Accessibility ---------- */
.skip-link {
  position: absolute; left: 16px; top: -60px; z-index: 1000;
  background: var(--ink); color: #fff;
  padding: 10px 16px; border-radius: var(--radius-sm); font-weight: 700;
}
.skip-link:focus { top: 12px; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

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

/* footer column titles are <h2 class="h4"> (correct heading order), styled like the design's h4 */
.footer-col .h4 { color: #fff; font-size: 0.95rem; margin-bottom: 18px; letter-spacing: 0.02em; }

/* touch targets ≥ 44px in the mobile menu */
.mobile-menu a { min-height: 44px; display: flex; align-items: center; }
.mobile-menu .btn { justify-content: center; }

/* ---------- Error pages ---------- */
.error-page { padding: 170px 0 110px; text-align: center; }
.error-page .code { font-size: clamp(4rem, 14vw, 8rem); font-weight: 800; color: var(--b600); line-height: 1; }
.error-page h1 { margin: 18px 0 12px; }
.error-page p { color: var(--muted); max-width: 520px; margin: 0 auto 28px; }
.error-page .actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* ---------- Mobile fixes for bugs present in the design itself ----------
   .hero h1 .accent has white-space: nowrap, so "auto na prenájom na Slovensku."
   is wider than a phone screen and the whole page scrolls sideways. */
@media (max-width: 768px) {
  .hero h1 .accent { white-space: normal; }
  .hero .eyebrow { white-space: normal; line-height: 1.4; }
  .hero h1 { overflow-wrap: break-word; }
}

/* ---------- Phase 3: listing, detail, directories ---------- */
html:not(.js) .filters { display: block; position: static; }      /* filters usable without JS on mobile */
html:not(.js) .filters-toggle, html:not(.js) .filters-close { display: none !important; }
.filters .btn-block { margin-top: 8px; }
.active-filter a { display: inline-grid; place-items: center; margin-left: 6px; color: inherit; }

.car-price .per-day { display: block; font-size: 0.82rem; color: var(--muted); font-weight: 600; }

.notice { padding: 12px 16px; border-radius: var(--radius-sm); margin: 0 0 18px; font-weight: 600; font-size: 0.93rem; }
.notice-warn { background: #fff7e6; color: #8a5300; border: 1px solid #f5d38c; }

.pagination { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin: 40px 0 10px; }
.pagination a, .pagination span {
  min-width: 44px; min-height: 44px; padding: 0 14px; display: inline-grid; place-items: center;
  border-radius: 12px; border: 1px solid var(--line); background: #fff; font-weight: 700;
}
.pagination a:hover { border-color: var(--b400); color: var(--b700); }
.pagination .current { background: var(--b600); border-color: var(--b600); color: #fff; }
.pagination .gap { border: 0; background: none; min-width: auto; }

.gallery-thumbs { display: flex; gap: 10px; margin-top: 12px; overflow-x: auto; padding-bottom: 4px; }
.gallery-thumbs a { flex: none; border-radius: 10px; overflow: hidden; border: 2px solid transparent; }
.gallery-thumbs a.active, .gallery-thumbs a:hover { border-color: var(--b500); }
.gallery-thumbs img { width: 120px; height: 80px; object-fit: cover; }

.price-table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
.price-table th, .price-table td { padding: 11px 12px; border-bottom: 1px solid var(--line); text-align: left; }
.price-table thead th { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); }
.price-table tbody th { font-weight: 600; }
.price-table td:nth-child(2) { font-weight: 800; white-space: nowrap; }
.price-table small { font-weight: 600; color: var(--muted); }
.table-note { margin-top: 12px; font-size: 0.85rem; color: var(--muted); }

.extras-list { display: grid; gap: 8px; }
.extras-list li { display: flex; justify-content: space-between; gap: 16px; padding: 10px 0; border-bottom: 1px dashed var(--line); }

.book-hint { font-size: 0.83rem; color: var(--muted); margin: 6px 0 10px; }
.book-vat { font-size: 0.82rem; color: var(--muted); margin-top: 8px; }
.block-sub { font-size: 1rem; margin: 22px 0 10px; }
.prose p { margin: 0 0 12px; color: var(--ink-soft); }
.cms h2, .cms h3, .cms h4 { margin: 26px 0 10px; }
.cms ul, .cms ol { margin: 0 0 14px 22px; list-style: disc; }
.cms a { color: var(--b700); text-decoration: underline; }

.link-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; margin-bottom: 36px; }
.link-grid a { display: flex; flex-direction: column; gap: 2px; padding: 16px 18px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: #fff; min-height: 44px; }
.link-grid a:hover { border-color: var(--b400); box-shadow: var(--shadow-sm); }
.link-grid span { font-size: 0.85rem; color: var(--muted); }
.group-title { font-size: 1.25rem; margin: 10px 0 16px; }

.rental-avatar { background: linear-gradient(135deg, var(--b500), var(--b700)); }
.rental-card h3 a:hover, .rental-box-head a:hover { color: var(--b700); }

@media (max-width: 560px) {
  .price-table th, .price-table td { padding: 10px 6px; font-size: 0.88rem; }
}

/* grid items default to min-width:auto → a scrolling thumbnail strip or long text would widen the page */
.detail-layout > *, .listing-layout > *, .rental-info-grid > * { min-width: 0; }
.kv b, .rental-contacts li, .detail-block { overflow-wrap: break-word; }

/* mobile: sticky booking bar (the booking box is below the content on small screens) */
.mobile-book-bar { display: none; }
@media (max-width: 1024px) {
  .mobile-book-bar {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 90;
    padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
    background: #fff; border-top: 1px solid var(--line); box-shadow: 0 -8px 24px rgba(16, 22, 10, 0.08);
  }
  .mobile-book-bar .mb-price { display: flex; flex-direction: column; line-height: 1.2; }
  .mobile-book-bar .mb-price small { color: var(--muted); font-size: 0.78rem; font-weight: 600; }
  .mobile-book-bar .mb-price b { font-size: 1.15rem; }
  .mobile-book-bar .btn { min-height: 44px; }
  body:has(.mobile-book-bar) .site-footer { padding-bottom: 90px; }
}

/* ---------- Phase 4: reservation form ---------- */
.res-title { font-size: clamp(1.6rem, 3.4vw, 2.3rem); margin: 6px 0 10px; }
.res-lead { color: var(--muted); max-width: 720px; margin-bottom: 30px; }
.res-lead a, .res-legal a, .res-car a:hover, .res-done a { color: var(--b700); }
.res-layout { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 32px; align-items: start; padding-bottom: 60px; }
.res-layout > * { min-width: 0; }
.res-summary { order: 2; }
.res-summary .book-panel { top: 92px; }
.res-car { display: flex; gap: 14px; align-items: center; padding: 18px 22px; border-bottom: 1px solid var(--line); }
.res-car img { width: 96px; height: 64px; object-fit: cover; border-radius: 10px; flex: none; background: var(--bg-soft); }
.res-car b { display: block; line-height: 1.3; }
.res-car span { font-size: 0.85rem; color: var(--muted); font-weight: 600; }
.res-form { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); padding: 28px; }
.res-fieldset { border: 0; padding: 0; margin: 0 0 22px; min-width: 0; }
.res-fieldset legend { font-size: 1.1rem; font-weight: 800; margin-bottom: 14px; padding: 0; }
.res-form .field { margin-bottom: 16px; }
.res-form .book-dates { margin-bottom: 0; }
.res-form .book-dates .field { margin-bottom: 0; }
.res-two { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field textarea {
  width: 100%; padding: 13px 15px; border: 1.5px solid var(--line); border-radius: 13px; background: #fff;
  font: inherit; font-weight: 600; color: var(--ink); outline: none; resize: vertical; min-height: 110px;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.field textarea:focus { border-color: var(--b500); box-shadow: 0 0 0 4px rgba(101, 163, 13, 0.14); }
.field input, .field textarea { font-size: 16px; }      /* ≥16px: iOS does not zoom into the field */
.field .opt { text-transform: none; letter-spacing: 0; font-weight: 600; }
.field-hint { display: block; font-size: 0.82rem; color: var(--muted); margin-top: 6px; }
.field-error { display: block; font-size: 0.85rem; color: #b42318; font-weight: 700; margin-top: 6px; }
.field.has-error input, .field.has-error textarea { border-color: #d92d20; }
.error-summary { border: 1.5px solid #f3b4ae; background: #fef3f2; color: #7a1a12; border-radius: var(--radius-sm); padding: 14px 18px; margin-bottom: 22px; }
.error-summary ul { margin: 8px 0 0 18px; list-style: disc; }
.error-summary a { color: inherit; text-decoration: underline; }
.res-submit { min-height: 52px; font-size: 1.02rem; }
.res-legal { font-size: 0.82rem; color: var(--muted); margin-top: 14px; }
/* honeypot: off-screen, not display:none (some bots skip hidden fields) */
.hp { position: absolute !important; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }

.res-done { max-width: 620px; margin: 0 auto 70px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-md); }
.res-done .modal-success { padding-bottom: 18px; }
.res-done h1 { font-size: 1.6rem; margin-bottom: 10px; }
.res-done-lines { margin: 0 28px 20px; }
.res-next { display: grid; gap: 12px; margin: 0 28px 24px; font-size: 0.93rem; color: var(--ink-soft); }
.res-next li { display: flex; gap: 10px; align-items: flex-start; }
.res-next svg { color: var(--b600); flex: none; margin-top: 2px; }
.res-actions { display: flex; flex-wrap: wrap; gap: 12px; padding: 0 28px 28px; }
.res-actions .btn { min-height: 44px; }

@media (max-width: 1024px) {
  .res-layout { grid-template-columns: 1fr; gap: 22px; }
  .res-summary { order: 0; }
  .res-summary .book-panel { position: static; }
}
@media (max-width: 560px) {
  .res-form { padding: 20px 16px; }
  .res-two { grid-template-columns: 1fr; gap: 0; }
  .res-done-lines, .res-next { margin-left: 18px; margin-right: 18px; }
  .res-actions { padding: 0 18px 22px; }
  .res-actions .btn { flex: 1 1 100%; }
}
.res-summary .book-summary { border-top: 0; padding-top: 0; }
.res-form .field label { flex-wrap: wrap; }
.res-form .field label .opt { color: var(--muted); font-size: 0.78rem; }

/* ---------- Phase 6: cookie consent (only rendered when GA4 is configured) ---------- */
.cookie-banner {
  position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 200; max-width: 760px; margin: 0 auto;
  display: flex; gap: 18px; align-items: center; flex-wrap: wrap; justify-content: space-between;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-lg); padding: 18px 20px;
}
.cookie-banner[hidden] { display: none; }
.cookie-banner > div:first-child { flex: 1 1 320px; }
.cookie-banner p { font-size: 0.86rem; color: var(--muted); margin-top: 4px; }
.cookie-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.cookie-actions .btn { min-height: 44px; }
.link-button { background: none; border: 0; padding: 0; font: inherit; color: inherit; cursor: pointer; }
.link-button:hover { text-decoration: underline; }

/* ---------- Phase 7: promotions ---------- */
.book-price .old { margin-left: 10px; font-size: 1.05rem; font-weight: 700; text-decoration: line-through; opacity: 0.75; }
.book-price .old[hidden] { display: none; }
.book-discount b { color: #b91c1c; }
.book-discount small { display: block; font-weight: 600; }
.promo-note { margin: 0 0 14px; padding: 10px 14px; border-radius: var(--radius-sm); background: #fef2f2; color: #991b1b; font-weight: 700; font-size: 0.9rem; }
.hours-list { display: grid; gap: 6px; margin: 0; font-size: 0.93rem; }
.hours-list > div { display: flex; justify-content: space-between; gap: 16px; padding: 6px 0; border-bottom: 1px dashed var(--line); }
.hours-list dt { font-weight: 700; }
.hours-list dd { margin: 0; color: var(--ink-soft); }

/* ---------- Phase 7: reviews ---------- */
.review-card { padding: 30px 28px; }
.review-head h1 { font-size: 1.6rem; }
.review-head p { color: var(--muted); margin: 6px 0 22px; }
.review-form .field { margin-bottom: 16px; }
.stars { border: 0; padding: 0; margin: 0 0 18px; }
.stars legend { font-weight: 800; margin-bottom: 8px; }
/* reversed order + flex-direction: row-reverse → hovering/checking a star highlights it and all before it */
.stars-input { display: inline-flex; flex-direction: row-reverse; gap: 4px; }
.stars-input input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.stars-input label { cursor: pointer; color: #d6dbcd; padding: 4px; border-radius: 8px; }
.stars-input label svg { fill: currentColor; }
.stars-input input:checked ~ label, .stars-input label:hover, .stars-input label:hover ~ label { color: #f59e0b; }
.stars-input input:focus-visible + label { outline: 3px solid var(--b500); outline-offset: 2px; }
.rating-line { display: inline-flex; align-items: center; gap: 6px; font-weight: 800; }
.rating-line svg { color: #f59e0b; fill: currentColor; }
.rating-line small { color: var(--muted); font-weight: 600; }
.review-list { display: grid; gap: 14px; }
.review-item { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 16px 18px; background: #fff; }
.review-item header { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 6px; }
.review-item .stars-static { color: #f59e0b; letter-spacing: 1px; }
.review-item .reply { margin-top: 10px; padding: 10px 14px; border-left: 3px solid var(--b500); background: var(--bg-soft); font-size: 0.92rem; }

/* ---- language switcher ---- */
.lang-switch { position: relative; }
.lang-switch summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; padding: 8px 10px; border-radius: 10px; font-weight: 700; font-size: 0.85rem; color: inherit; }
.lang-switch summary::-webkit-details-marker { display: none; }
.lang-switch summary:hover, .lang-switch[open] summary { background: rgba(127, 127, 127, 0.14); }
.lang-switch summary:focus-visible { outline: 2px solid var(--b500, #65a30d); outline-offset: 2px; }
.lang-switch ul { position: absolute; right: 0; top: calc(100% + 6px); z-index: 60; min-width: 160px; margin: 0; padding: 6px; list-style: none; background: #fff; border: 1px solid var(--line, #e5e7eb); border-radius: 12px; box-shadow: 0 12px 30px rgba(15, 23, 42, 0.14); }
.lang-switch li a { display: block; padding: 9px 12px; border-radius: 8px; color: var(--ink, #0f172a); font-weight: 600; text-decoration: none; }
.lang-switch li a:hover { background: var(--b50, #f7fee7); }
.lang-switch li a[aria-current="true"] { color: var(--b700, #4d7c0f); font-weight: 800; }
.mobile-langs { display: flex; flex-wrap: wrap; gap: 8px; padding-top: 8px; }
.mobile-langs a { padding: 8px 12px; border: 1px solid var(--line, #e5e7eb); border-radius: 10px; font-weight: 700; }
.mobile-langs a[aria-current="true"] { border-color: var(--b500, #65a30d); color: var(--b700, #4d7c0f); }

/* ---- TOP (Phase 9a): highlighted card ---- */
.car-card-top { border-color: var(--b300, #bef264); box-shadow: 0 0 0 2px var(--b200, #d9f99d), 0 14px 34px rgba(77, 124, 15, 0.14); }
.car-card-top .car-body { background: linear-gradient(180deg, var(--b50, #f7fee7), #fff 60%); }
.sort-info { font-size: 0.82rem; font-weight: 600; color: var(--muted, #64748b); text-decoration: underline; text-underline-offset: 2px; white-space: nowrap; }
