/* ==========================================================
   Koně Zlín — kone.css
   Child template stylesheet (parent: Cassiopeia)
   Design tokens extracted from design/komp.html
   ========================================================== */

/* --- Font faces (self-hosted, GDPR) --- */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/inter-v20-latin-ext-regular.woff2') format('woff2');
  unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF, U+0000-00FF;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('../fonts/inter-v20-latin-ext-500.woff2') format('woff2');
  unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF, U+0000-00FF;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('../fonts/inter-v20-latin-ext-600.woff2') format('woff2');
  unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF, U+0000-00FF;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('../fonts/inter-v20-latin-ext-700.woff2') format('woff2');
  unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF, U+0000-00FF;
}

/* --- Design tokens --- */
:root {
  --pastva: #2F4A36;
  --pastva-700: #243A2A;
  --mech: #6E7F5B;
  --seno: #F4EEE1;
  --seno-2: #EAE1CE;
  --band: #E6E8D5;
  --krem: #FBF8F1;
  --kuze: #9C5A2C;
  --rail: #B23A2E;
  --hlina: #221C16;
  --hlina-60: #5C544A;
  --maxw: 1180px;
  --hero-img: linear-gradient(135deg, #3a546f, #2F4A36);
}

/* --- Reset Cassiopeia defaults --- */
.site-kone {
  font-family: 'Inter', system-ui, sans-serif;
  color: var(--hlina);
  background: var(--seno);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  margin: 0;
  padding: 0;
}

.site-kone *,
.site-kone *::before,
.site-kone *::after {
  box-sizing: border-box;
}

/* Reset Cassiopeia grid and container */
.site-kone .site-grid,
.site-kone .container-header,
.site-kone .container-component,
.site-kone .container-footer {
  display: block;
  max-width: none;
  padding: 0;
  margin: 0;
  grid-template-columns: none;
}

/* --- Typography --- */
.site-kone h1,
.site-kone h2,
.site-kone h3,
.site-kone .logo {
  font-family: 'Inter', system-ui, sans-serif;
  line-height: 1.08;
  letter-spacing: -.02em;
  font-weight: 700;
}

.site-kone a:not(.btn) {
  color: inherit;
  text-decoration: none;
}

/* --- Layout utility --- */
.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 28px;
}

/* --- Inner content utility (1100px, used inside bands + art-head) --- */
.inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 28px;
}

/* --- Eyebrow --- */
.eyebrow {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--kuze);
}

/* --- Rail pattern --- */
.rail {
  height: 9px;
  background: repeating-linear-gradient(-45deg, var(--rail) 0 14px, #F4EEE1 14px 28px);
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-weight: 600;
  font-size: 15px;
  padding: 13px 24px;
  border-radius: 3px;
  transition: transform .12s ease, background .12s ease;
  border: 0;
  cursor: pointer;
  font-family: inherit;
}

.btn:focus-visible {
  outline: 3px solid var(--kuze);
  outline-offset: 3px;
}

.btn-primary {
  background: var(--rail);
  color: #fff;
}

.btn-primary:hover {
  background: #9c3025;
  transform: translateY(-1px);
}

.btn-ghost {
  background: transparent;
  color: var(--seno);
  border: 1.5px solid rgba(244, 238, 225, .5);
}

.btn-ghost:hover {
  background: rgba(244, 238, 225, .12);
}

/* --- Header --- */
.site-header {
  z-index: 50;
  background: rgba(47, 74, 54, .97);
  backdrop-filter: saturate(1.2) blur(4px);
}

.site-header.is-sticky {
  position: sticky;
  top: 0;
}

.site-header .nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 74px;
}

.site-header .logo {
  display: flex;
  align-items: center;
  text-decoration: none;
  flex-shrink: 0;
}

.site-header .logo img {
  width: 150px;
  height: auto;
  display: block;
}

/* --- Menu --- */
.site-header .mod-menu {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  gap: 4px;
  align-items: center;
  list-style: none;
  margin: 0;
  padding: 0;
  flex-shrink: 1;
}

.site-header .mod-menu li {
  margin: 0;
  padding: 0;
  white-space: nowrap;
}

.site-header .mod-menu a,
.site-header .mod-menu .mod-menu__heading {
  color: #E6E9DF;
  font-size: 14.5px;
  font-weight: 500;
  padding: 9px 13px;
  border-radius: 4px;
  transition: background .12s;
  text-decoration: none;
  display: block;
  cursor: pointer;
}

.site-header .mod-menu a:hover,
.site-header .mod-menu .mod-menu__heading:hover {
  background: rgba(244, 238, 225, .12);
}

/* Dropdown for nested items (Tábory) */
.site-header .mod-menu .parent {
  position: relative;
}

.site-header .mod-menu .parent > .mod-menu__sub {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--pastva);
  border-radius: 6px;
  padding: 6px 0;
  min-width: 240px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .25);
  list-style: none;
  z-index: 60;
  margin: 0;
}

.site-header .mod-menu .parent:hover > .mod-menu__sub,
.site-header .mod-menu .parent:focus-within > .mod-menu__sub {
  display: block;
}

.site-header .mod-menu .mod-menu__sub a {
  display: block;
  padding: 8px 18px;
  font-size: 14px;
  border-radius: 0;
  white-space: nowrap;
}

/* Burger */
.burger {
  display: none;
  background: none;
  border: 0;
  color: var(--seno);
  font-size: 26px;
  cursor: pointer;
  padding: 4px;
}

/* --- Hero section (article content) --- */
.hero {
  position: relative;
  color: var(--seno);
  overflow: hidden;
  background: var(--pastva);
}

/* Hero photo overlay — covers SVG placeholder when image is available */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to right, rgba(27,44,32,.84) 0%, rgba(36,58,42,.55) 50%, rgba(47,74,54,.35) 100%),
    linear-gradient(to top, rgba(27,44,32,.6) 0%, rgba(27,44,32,.15) 45%, transparent 100%),
    url('/images/hero/hero.jpg') center/cover no-repeat;
  z-index: 1;
}

.hero .scene {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}

.hero-inner {
  position: relative;
  z-index: 2;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 96px 28px 120px;
}

.hero h1 {
  font-size: clamp(38px, 6vw, 72px);
  font-weight: 700;
  max-width: 16ch;
  margin: .5rem 0 1.1rem;
  color: var(--seno);
}

.hero p.lead {
  font-size: clamp(17px, 2.1vw, 21px);
  max-width: 46ch;
  color: #EAEAE0;
  margin-bottom: 2rem;
}

.hero .actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.hero .rail {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
}

/* --- Intro section --- */
.intro {
  padding: 74px 0 30px;
}

.intro .wrap {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 56px;
  align-items: center;
}

.intro h2 {
  font-size: clamp(28px, 3.4vw, 40px);
  font-weight: 600;
  margin: .6rem 0 1rem;
  max-width: 18ch;
}

.intro p {
  color: var(--hlina-60);
  font-size: 17px;
  max-width: 48ch;
}

.intro .photo {
  aspect-ratio: 4/3;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--seno-2);
}

.intro .photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* --- Services cards --- */
.services {
  padding: 64px 0 80px;
}

.services .head {
  margin-bottom: 36px;
  max-width: 50ch;
}

.services h2 {
  font-size: clamp(26px, 3vw, 36px);
  font-weight: 600;
  margin: .5rem 0;
}

.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

.card {
  background: var(--krem);
  border: 1px solid var(--seno-2);
  border-radius: 12px;
  padding: 30px 26px;
  display: flex;
  flex-direction: column;
  transition: transform .14s ease, box-shadow .14s ease;
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 30px -18px rgba(34, 28, 22, .4);
}

.card .ico {
  width: 46px;
  height: 46px;
  border-radius: 9px;
  background: var(--seno);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
  color: var(--pastva);
}

.card h3 {
  font-size: 21px;
  font-weight: 600;
  margin-bottom: 9px;
}

.card p {
  color: var(--hlina-60);
  font-size: 15.5px;
  flex: 1;
  margin-bottom: 18px;
}

.card .more {
  font-weight: 600;
  font-size: 14.5px;
  color: var(--kuze);
  display: inline-flex;
  align-items: center;
  gap: 7px;
  text-decoration: none;
}

.card .more::after {
  content: "\2192";
  transition: transform .14s;
}

.card:hover .more::after {
  transform: translateX(4px);
}

/* --- Camp band (CTA pruh) --- */
.band {
  background: var(--pastva);
  color: var(--seno);
  position: relative;
}

.band .rail {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
}

.band > .wrap {
  padding: 72px 28px;
  display: grid;
  grid-template-columns: 1.3fr auto;
  gap: 40px;
  align-items: center;
}

.band h2 {
  font-size: clamp(28px, 3.6vw, 44px);
  font-weight: 700;
  max-width: 16ch;
  margin-bottom: .7rem;
}

.band p {
  color: #D8DBCD;
  max-width: 42ch;
  font-size: 17px;
}

/* --- Gallery teaser --- */
.gallery {
  padding: 78px 0;
  overflow: hidden;
}

.gallery .head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 30px;
  gap: 20px;
  flex-wrap: wrap;
}

.gallery h2 {
  font-size: clamp(26px, 3vw, 36px);
  font-weight: 600;
}

.grid-g {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 150px;
  gap: 14px;
}

.tile {
  border-radius: 10px;
  overflow: hidden;
  position: relative;
  border: 1px solid var(--seno-2);
}

.tile.tall {
  grid-row: span 2;
}

.tile.wide {
  grid-column: span 2;
}

.tile img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

/* --- Footer --- */
.site-footer {
  background: var(--hlina);
  color: #D8D2C6;
  padding: 64px 0 30px;
  font-size: 15px;
}

.site-footer .footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 44px;
}

.site-footer h4 {
  font-family: 'Inter', system-ui, sans-serif;
  color: var(--seno);
  font-size: 17px;
  font-weight: 600;
  margin-bottom: 14px;
  margin-top: 0;
}

.site-footer a {
  color: #D8D2C6;
  text-decoration: none;
}

.site-footer a:hover {
  color: var(--seno);
}

.site-footer .flogo {
  display: block;
  margin-bottom: 12px;
}

.site-footer .flogo img {
  width: 200px;
  height: auto;
  display: block;
}

.site-footer ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 9px;
  padding: 0;
  margin: 0;
}

.site-footer .map {
  margin-top: 14px;
  border-radius: 9px;
  overflow: hidden;
  border: 1px solid rgba(216, 210, 198, .2);
}

.copyright {
  border-top: 1px solid rgba(216, 210, 198, .15);
  margin-top: 46px;
  padding-top: 22px;
  color: #9A9384;
  font-size: 13.5px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

.copyright a {
  color: #9A9384;
  text-decoration: none;
  transition: color .12s;
}

.copyright a:hover {
  color: #D8D2C6;
}

/* --- Inner pages: component content styling --- */
.site-kone:not(.is-home) main {
  padding-top: 40px;
}

.site-kone:not(.is-home) main h1,
.site-kone:not(.is-home) main h2 {
  margin-top: 0;
}

/* Hide Joomla page-header on inner pages — replaced by .art-head in article HTML */
.site-kone:not(.is-home) .page-header {
  display: none;
}

/* Breadcrumb: hide "You are here:" prefix */
.site-kone .mod-breadcrumbs__here {
  display: none;
}

/* Breadcrumb styling */
.site-kone .mod-breadcrumbs {
  font-size: 14px;
  color: var(--hlina-60);
  padding: 0 0 12px;
  margin: 0;
  background: none;
  border: 0;
}

.site-kone .mod-breadcrumbs a {
  color: var(--kuze);
}

.site-kone .mod-breadcrumbs a:hover {
  text-decoration: underline;
}

/* --- Article head (reusable) --- */
.art-head {
  margin-bottom: 14px;
}

.art-head .eyebrow {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--kuze);
  display: block;
  margin-bottom: 10px;
}

.art-head h1 {
  font-size: clamp(32px, 4.4vw, 48px);
}

.art-head .rule {
  height: 3px;
  width: 64px;
  background: var(--rail);
  margin-top: 18px;
  border-radius: 2px;
}

/* Lead paragraph (scoped to inner pages to avoid hero .lead conflict) */
.site-kone:not(.is-home) .lead {
  max-width: 62ch;
  font-size: 18px;
  color: var(--hlina-60);
  margin: 26px 0 8px;
}

/* --- Full-width alternating bands --- */
.svc-band {
  padding: 56px 0;
}

.svc-band.alt {
  background: var(--band);
}

.svc-band .svc {
  margin: 0 auto;
}

/* --- Service block (2-col: text | photo) --- */
.svc {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 52px;
  align-items: center;
  margin: 64px 0;
}

.svc.reverse .txt { order: 2; }
.svc.reverse .photo { order: 1; }

.svc .txt h2 {
  font-size: clamp(24px, 2.8vw, 32px);
  margin-bottom: 14px;
}

.svc .txt h3 {
  font-size: 18px;
  font-weight: 600;
  margin: 22px 0 8px;
  color: var(--pastva);
}

.svc .txt p {
  color: var(--hlina-60);
  max-width: 46ch;
  margin-bottom: 10px;
}

.svc .photo {
  aspect-ratio: 4/3;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--seno-2);
}

.svc .photo img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.svc .txt ul {
  padding-left: 1.2em;
  margin-bottom: 10px;
  color: var(--hlina-60);
}

.svc .txt li {
  margin-bottom: 4px;
}

/* --- Price tag --- */
.price-tag {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  background: var(--pastva);
  color: var(--seno);
  padding: 11px 18px;
  border-radius: 8px;
  margin-top: 18px;
  font-weight: 600;
}

.price-tag .num {
  font-size: 20px;
}

.price-tag .unit {
  font-size: 13px;
  opacity: .8;
  font-weight: 500;
}

/* --- Pricelist (row-based) --- */
.pricelist {
  margin-top: 18px;
  border-top: 1px solid var(--seno-2);
}

.pricelist .row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  padding: 11px 0;
  border-bottom: 1px solid var(--seno-2);
}

.pricelist .row .label {
  color: var(--hlina);
}

.pricelist .row .label small {
  display: block;
  color: var(--hlina-60);
  font-size: 13px;
}

.pricelist .row .amt {
  font-weight: 700;
  white-space: nowrap;
  color: var(--pastva);
}

/* Hide article title on home page (content is in hero section) */
.site-kone.is-home .page-header {
  display: none;
}

/* Hide article prev/next navigation globally */
.site-kone .pagenavigation {
  display: none;
}

/* Hide Joomla full-text image — used only for OG meta tags, not in article body */
.site-kone .com-content-article .item-image {
  display: none;
}

/* Prevent horizontal overflow from gallery/article on home */
.site-kone.is-home .com-content-article {
  overflow-x: hidden;
}

/* Reset Cassiopeia .nav class (Bootstrap flex-wrap) + column override */
.site-header ul.nav.mod-menu {
  flex-direction: row;
  flex-wrap: nowrap;
}

/* --- Contact page: map + info side by side --- */
.svc.contact {
  align-items: stretch;
}

.svc .map-col {
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--seno-2);
}

.svc .map-col iframe {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 400px;
  border: 0;
}

/* --- Form wrapper (Přihláška) --- */
.konetabor-form-wrapper {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 28px 60px;
}

/* --- Responsive (max-width: 880px) --- */
@media (max-width: 880px) {
  /* Ensure header is a positioning anchor for the menu */
  .site-header {
    position: relative;
  }

  .site-header.is-sticky {
    position: sticky;
  }

  /* Mobile menu — slide from right, full viewport height */
  .site-header .mod-menu,
  .site-header ul.nav.mod-menu {
    display: flex;
    flex-direction: column;
    flex-wrap: nowrap;
    position: absolute;
    top: 74px;
    right: 0;
    width: min(300px, 82vw);
    height: calc(100vh - 74px);
    height: calc(100dvh - 74px);
    background: var(--pastva-700);
    padding: 20px 0 32px;
    gap: 0;
    box-shadow: -6px 0 30px rgba(0, 0, 0, .4);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    transform: translateX(100%);
    transition: transform .28s cubic-bezier(.4, 0, .2, 1);
    z-index: 200;
  }

  .site-header .mod-menu.is-open,
  .site-header ul.nav.mod-menu.is-open {
    transform: translateX(0);
  }

  /* Dark overlay behind menu */
  .site-header::after {
    content: '';
    position: absolute;
    top: 74px;
    left: 0;
    right: 0;
    height: calc(100vh - 74px);
    height: calc(100dvh - 74px);
    background: rgba(0, 0, 0, .5);
    z-index: 100;
    opacity: 0;
    pointer-events: none;
    transition: opacity .28s ease;
  }

  body.menu-open .site-header::after {
    opacity: 1;
    pointer-events: auto;
  }

  /* Keep burger above overlay */
  body.menu-open .burger {
    position: relative;
    z-index: 201;
  }

  /* Prevent body scroll when menu is open */
  body.menu-open {
    overflow: hidden;
  }

  /* Menu links — larger font + padding for comfortable touch targets */
  .site-header .mod-menu a,
  .site-header .mod-menu .mod-menu__heading {
    display: block;
    padding: 14px 24px;
    border-radius: 0;
    font-size: 17px;
    line-height: 1.5;
  }

  /* CTA button (last menu item) */
  .site-header .mod-menu > li:last-child > a {
    margin: 16px 20px 4px;
    border-radius: 6px;
    text-align: center;
    background: var(--rail);
    color: #fff;
    font-weight: 600;
  }

  /* Dropdown in mobile — always visible, fully expanded */
  .site-header .mod-menu .parent > .mod-menu__sub {
    position: static;
    display: block;
    box-shadow: none;
    padding: 0;
    min-width: auto;
    background: transparent;
    border-radius: 0;
  }

  .site-header .mod-menu .mod-menu__sub a {
    padding-left: 44px;
    font-size: 16px;
  }

  .burger {
    display: block;
  }

  .intro .wrap {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .cards {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .band > .wrap {
    grid-template-columns: 1fr;
    gap: 22px;
  }

  .grid-g {
    grid-template-columns: repeat(2, 1fr);
  }

  .site-footer .footer-grid {
    grid-template-columns: 1fr;
  }

  .copyright {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .hero-inner {
    padding: 60px 28px 80px;
  }
}

/* --- Article components responsive (max-width: 820px) --- */
@media (max-width: 820px) {
  .svc-band {
    padding: 40px 0;
  }

  .svc {
    grid-template-columns: 1fr;
    gap: 24px;
    margin: 44px 0;
  }

  .svc.reverse .txt { order: 2; }
  .svc.reverse .photo { order: 1; }

  .svc .txt p,
  .site-kone:not(.is-home) .lead {
    max-width: none;
  }
}

/* --- Accessibility --- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

:focus-visible {
  outline: 3px solid var(--kuze);
  outline-offset: 3px;
}
