/* ==========================================================================
   ZaMaRo.cz - Modern Responsive Stylesheet (2026 Edition)
   Mobile First, CSS Grid, Flexbox, Accessible & Touch Friendly
   ========================================================================== */

/* 1. Design Tokens & Root Variables */
:root {
  --primary: #1b6b38;
  --primary-dark: #124d27;
  --primary-light: #278843;
  --accent: #6db71d;
  --accent-soft: rgba(109, 183, 29, 0.12);
  --accent-hover: #5ea118;
  
  --bg-page: #daf4bd;
  --bg-card: #ffffff;
  --bg-card-subtle: #f9fbf9;
  
  --text-main: #242925;
  --text-muted: #5e6660;
  --text-light: #869088;
  
  --border-light: rgba(0, 0, 0, 0.08);
  --border-green: rgba(27, 107, 56, 0.18);
  
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-full: 9999px;
  
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 14px rgba(27, 107, 56, 0.08);
  --shadow-lg: 0 10px 30px rgba(27, 107, 56, 0.12);
  
  --font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

/* 2. Base Reset */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-family);
  font-size: 15px;
  line-height: 1.65;
  color: var(--text-main);
  background-color: var(--bg-page);
  min-height: 100vh;
  position: relative;
  background-image: url('../image/trava-bottom.png');
  background-position: center bottom;
  background-repeat: repeat-x;
  background-attachment: fixed;
  background-size: 100% auto;
}

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

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

a:hover {
  color: var(--primary-light);
}

strong, b {
  color: var(--primary-dark);
  font-weight: 700;
}

/* 3. Main Container */
#page {
  width: 94%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 16px 0 80px 0;
}

/* 4. Header & Branding */
header#site-header {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border-light);
  padding: 14px 24px;
  margin-bottom: 20px;
  position: relative;
  z-index: 100;
}

#header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

#logo a {
  display: flex;
  align-items: center;
  gap: 16px;
  text-decoration: none;
}

.logo-img {
  height: 52px;
  width: auto;
  object-fit: contain;
  transition: transform 0.3s ease;
}

#logo a:hover .logo-img {
  transform: scale(1.04);
}

.logo-text {
  display: flex;
  flex-direction: column;
}

.logo-title {
  font-size: 26px;
  font-weight: 800;
  color: var(--primary);
  line-height: 1.15;
  letter-spacing: -0.5px;
}

.logo-subtitle {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: 0.2px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.btn-call {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  color: #ffffff !important;
  font-weight: 700;
  font-size: 14px;
  padding: 10px 18px;
  border-radius: var(--radius-full);
  box-shadow: 0 4px 12px rgba(27, 107, 56, 0.25);
  transition: var(--transition);
  white-space: nowrap;
}

.btn-call:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(27, 107, 56, 0.35);
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
}

.btn-menu {
  display: none;
  background: var(--bg-page);
  border: 1px solid var(--border-light);
  color: var(--primary);
  padding: 8px;
  border-radius: var(--radius-md);
  cursor: pointer;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.btn-menu:hover {
  background: var(--accent-soft);
}

/* 5. Main Layout (CSS Grid) */
#main-layout {
  display: grid;
  grid-template-columns: 240px 1fr 270px;
  gap: 20px;
  align-items: start;
}

/* 6. Navigation (Left Column) */
aside#left-col {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

nav.main-nav {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-light);
  overflow: hidden;
  padding: 8px;
}

nav.main-nav ul {
  list-style: none;
}

nav.main-nav > ul > li {
  margin-bottom: 2px;
}

nav.main-nav a {
  display: flex;
  align-items: center;
  padding: 10px 14px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-main);
  border-radius: var(--radius-sm);
  transition: var(--transition);
}

nav.main-nav a::before {
  content: "•";
  color: var(--accent);
  font-size: 18px;
  margin-right: 10px;
  line-height: 1;
  transition: var(--transition);
}

nav.main-nav a:hover {
  background: var(--accent-soft);
  color: var(--primary);
  padding-left: 18px;
}

nav.main-nav a:hover::before {
  color: var(--primary);
}

nav.main-nav a.active {
  background: var(--primary);
  color: #ffffff;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(27, 107, 56, 0.25);
}

nav.main-nav a.active::before {
  color: #ffffff;
}

/* Submenu */
nav.main-nav ul li ul {
  margin: 4px 0 6px 14px;
  padding-left: 10px;
  border-left: 2px solid var(--accent-soft);
}

nav.main-nav ul li ul a {
  font-size: 13px;
  font-weight: 500;
  padding: 6px 10px;
}

nav.main-nav ul li ul a.active {
  background: var(--accent);
  color: #ffffff;
}

/* 7. Center Content */
main#content {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
}

.nadpis {
  background: linear-gradient(135deg, #eaf5eb 0%, #ffffff 100%);
  border: 1px solid var(--border-green);
  border-left: 5px solid var(--primary);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  box-shadow: var(--shadow-sm);
}

.nadpis h1 {
  font-size: 24px;
  font-weight: 800;
  color: var(--primary-dark);
  line-height: 1.25;
}

.sub-sep {
  color: var(--accent);
  margin: 0 4px;
}

.sub-title {
  color: var(--primary-light);
  font-weight: 600;
}

article.article-content {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-light);
  padding: 26px 30px;
}

.page-item {
  margin-bottom: 24px;
}

.page-item:last-child {
  margin-bottom: 0;
}

.text-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-light);
}

.page-body p {
  margin-bottom: 1.1em;
  text-align: left;
  line-height: 1.75;
}

.page-body ul, .page-body ol {
  margin: 1em 0 1.5em 24px;
}

.page-body li {
  margin-bottom: 6px;
}

.page-body img {
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  margin: 12px 0;
}

/* Page Body & Content Tables (Ceníky & Údaje) */
.page-body {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

table,
.page-body table,
article table {
  width: 100% !important;
  max-width: 100% !important;
  min-width: 520px;
  border-collapse: separate !important;
  border-spacing: 0 !important;
  margin: 1.5rem 0 !important;
  height: auto !important;
  background: var(--bg-card);
  border: 1px solid rgba(27, 107, 56, 0.16) !important;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

/* Colgroup column distribution */
table colgroup,
.page-body table colgroup {
  display: table-column-group !important;
}

table colgroup col,
.page-body table colgroup col {
  width: auto !important;
}

table colgroup col:first-child,
.page-body table colgroup col:first-child {
  width: 60% !important;
}

table colgroup col:nth-child(2),
.page-body table colgroup col:nth-child(2) {
  width: 15% !important;
}

table colgroup col:nth-child(3),
.page-body table colgroup col:nth-child(3) {
  width: 25% !important;
}

/* Table Header (První řádek) */
table tr:first-child,
.page-body table tr:first-child {
  background: #edf6ea !important;
  border-bottom: 2px solid var(--border-green) !important;
}

table tr:first-child td,
.page-body table tr:first-child td,
table th,
.page-body table th {
  padding: 13px 18px !important;
  height: auto !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  color: var(--primary-dark) !important;
  text-transform: uppercase !important;
  letter-spacing: 0.6px !important;
  border-bottom: 2px solid rgba(27, 107, 56, 0.25) !important;
  vertical-align: middle !important;
}

/* Rows & Cells */
table tr,
.page-body table tr {
  height: auto !important;
  transition: background-color 0.15s ease;
}

table tbody tr:not(:first-child):nth-child(even),
.page-body table tbody tr:not(:first-child):nth-child(even) {
  background-color: rgba(240, 248, 235, 0.5) !important;
}

table tbody tr:not(:first-child):hover,
.page-body table tbody tr:not(:first-child):hover {
  background-color: rgba(218, 244, 189, 0.45) !important;
}

table td,
.page-body table td {
  padding: 11px 18px !important;
  height: auto !important;
  font-size: 14.5px !important;
  line-height: 1.5 !important;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05) !important;
  vertical-align: middle !important;
}

/* Column 1: Služba / Položka */
table td:first-child,
.page-body table td:first-child {
  text-align: left !important;
  color: var(--text-main);
  font-weight: 500;
}

/* Column 2: Jednotka */
table td:nth-child(2),
.page-body table td:nth-child(2) {
  text-align: center !important;
  color: var(--primary);
  font-weight: 600;
  white-space: nowrap;
}

/* Column 3: Cena */
table td:last-child,
.page-body table td:last-child {
  text-align: right !important;
  color: var(--primary-dark);
  font-weight: 700;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  font-size: 15px;
}

/* Colspan rows (e.g. Návrhy) */
table td[colspan="2"],
.page-body table td[colspan="2"] {
  text-align: left !important;
  color: var(--text-main);
  font-weight: 500;
}

/* 8. Right Column */
aside#right-col {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.box {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-light);
  padding: 18px;
}

.box-promo-img {
  padding: 0;
  overflow: hidden;
}

.box-promo-img img {
  width: 100%;
  height: 170px;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.box-promo-img:hover img {
  transform: scale(1.05);
}

.box-akce {
  border-top: 4px solid var(--accent);
  background: linear-gradient(180deg, #f8fbf8 0%, #ffffff 100%);
}

#akce h4 {
  font-size: 16px;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
}

#akce p {
  font-size: 14px;
  line-height: 1.55;
  color: var(--text-main);
  margin-bottom: 8px;
}

/* Keywords Cloud */
#keywords .keywords-title {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.keywords-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.keyword-tag {
  display: inline-block;
}

.keyword-tag a, .keyword-tag {
  display: inline-block;
  background: #edf4ed;
  color: var(--primary);
  font-size: 12px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  border: 1px solid rgba(27, 107, 56, 0.12);
  transition: var(--transition);
}

.keyword-tag a:hover, .keyword-tag:hover {
  background: var(--primary);
  color: #ffffff !important;
  transform: translateY(-1px);
  box-shadow: 0 2px 6px rgba(27, 107, 56, 0.2);
}

/* 9. Fotogalerie (Modern CSS Grid) */
#fotogalery {
  margin-top: 10px;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}

.foto-card {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}

.foto-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--border-green);
}

.foto-img-wrap {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  background: #e9eee9;
}

.foto-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.foto-card:hover .foto-img-wrap img {
  transform: scale(1.08);
}

.foto-zoom-badge {
  position: absolute;
  bottom: 8px;
  right: 8px;
  background: rgba(0, 0, 0, 0.6);
  color: #ffffff;
  padding: 6px;
  border-radius: 50%;
  opacity: 0;
  transform: scale(0.8);
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
}

.foto-card:hover .foto-zoom-badge {
  opacity: 1;
  transform: scale(1);
}

.foto-desc {
  padding: 10px 12px;
  flex-grow: 1;
}

.galery-title {
  font-weight: 700;
  font-size: 13px;
  color: var(--primary-dark);
  margin-bottom: 2px;
}

.galery-pertext {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.4;
}

.empty-gallery {
  grid-column: 1 / -1;
  text-align: center;
  padding: 30px;
  color: var(--text-muted);
  background: var(--bg-card);
  border-radius: var(--radius-md);
}

/* 10. Footer */
footer#site-footer {
  margin-top: 30px;
  text-align: center;
  font-size: 13px;
  color: var(--text-muted);
  background: var(--bg-card);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-light);
  padding: 16px;
  box-shadow: var(--shadow-sm);
}

footer#site-footer a {
  color: var(--primary);
  font-weight: 600;
}

footer#site-footer a:hover {
  text-decoration: underline;
}

/* 11. Responsive Breakpoints */

/* Tablet & Smaller Desktop (max-width: 1024px) */
@media screen and (max-width: 1024px) {
  #main-layout {
    grid-template-columns: 220px 1fr;
  }
  
  aside#right-col {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 16px;
  }
  
  .box-promo-img img {
    height: 140px;
  }
}

/* Mobile Devices (max-width: 768px) */
@media screen and (max-width: 768px) {
  body {
    background-size: auto 170px;
    background-position: center bottom;
    background-repeat: repeat-x;
  }

  #page {
    width: 95%;
    padding: 10px 0 60px 0;
  }
  
  header#site-header {
    padding: 12px 14px;
    margin-bottom: 14px;
  }
  
  .logo-img {
    height: 40px;
  }
  
  .logo-title {
    font-size: 20px;
  }
  
  .logo-subtitle {
    font-size: 11px;
  }
  
  .btn-menu {
    display: inline-flex;
  }
  
  .btn-call span {
    display: none;
  }
  
  .btn-call {
    padding: 8px 12px;
  }
  
  #main-layout {
    display: flex;
    flex-direction: column;
    gap: 14px;
  }
  
  aside#left-col {
    width: 100%;
  }
  
  /* Collapsible mobile nav */
  nav.main-nav {
    display: none;
  }
  
  nav.main-nav.is-open {
    display: block;
    animation: fadeInDown 0.25s ease-out;
  }
  
  @keyframes fadeInDown {
    from {
      opacity: 0;
      transform: translateY(-8px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
  
  .box-promo-img {
    display: none;
  }
  
  main#content {
    width: 100%;
  }
  
  article.article-content {
    padding: 18px 16px;
  }
  
  .nadpis {
    padding: 12px 16px;
  }
  
  .nadpis h1 {
    font-size: 20px;
  }
  
  aside#right-col {
    display: flex;
    flex-direction: column;
    width: 100%;
  }
  
  .gallery-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 10px;
  }
}

/* Very Small Screens (max-width: 420px) */
@media screen and (max-width: 420px) {
  .logo-subtitle {
    display: none;
  }
  
  .gallery-grid {
    grid-template-columns: 1fr;
  }
}
