/* ============================================================
   Autoškola TRIO – stylesheet
   Vychází z původního designu autoskolatrio.cz:
   - tmavě zelený header → světle zelený gradient přes celou stránku
   - černé "kartičky" s bílým textem pro kurzy a obsahové bloky
   - kontrastní bílé tlačítka "E-shop"
   ============================================================ */

:root {
  --green-dark:    #2f4d2a;       /* tmavě zelená pro header overlay */
  --green-mid:     #6dbf5c;       /* středně zelená přechodu */
  --green-light:   #a4ed8d;       /* světle zelená pozadí */
  --green-pale:    #c5f4b1;       /* velmi světlá zelená */
  --black-soft:    #0a0a0a;       /* karty a tabulky */
  --black-deep:    #000;
  --text-light:    #ffffff;
  --text-dark:     #111;
  --text-muted:    #555;
  --border-light:  rgba(0,0,0,0.08);
  --shadow-card:   0 2px 8px rgba(0,0,0,0.08);
  --radius:        4px;
  --max-w:         1400px;
  --content-w:     1200px;

  --ff-base:  'Roboto', 'Segoe UI', system-ui, sans-serif;
  --ff-head:  'Roboto', 'Segoe UI', system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

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

body {
  font-family: var(--ff-base);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-dark);
  background:
    linear-gradient(180deg,
      rgba(110, 191, 92, 0.95) 0%,
      rgba(164, 237, 141, 1) 30%,
      rgba(197, 244, 177, 1) 100%);
  background-attachment: fixed;
  min-height: 100vh;
}

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

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

/* ============================================================
   HEADER + NAVIGATION
   ============================================================ */

.site-header {
  position: relative;
  background: var(--green-dark);
  color: var(--text-light);
  z-index: 100;
  border-bottom: 2px solid rgba(255,255,255,0.05);
}

.header-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0.75rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.logo a {
  display: inline-flex;
  align-items: center;
}
.logo img { height: 56px; width: auto; }

.main-nav {
  flex: 1;
}
.main-nav ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  justify-content: flex-end;
  align-items: center;
}
.main-nav a {
  color: var(--text-light);
  font-size: 0.95rem;
  font-weight: 500;
  padding: 0.5rem 0.85rem;
  border-radius: var(--radius);
  letter-spacing: 0.02em;
  transition: background 0.15s, color 0.15s;
  display: inline-block;
}
.main-nav a:hover, .main-nav a.is-active {
  background: rgba(255,255,255,0.08);
  text-decoration: none;
  color: var(--green-light);
}

.cart-icon {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 0.85rem;
  background: rgba(255,255,255,0.08);
  border-radius: var(--radius);
  color: var(--text-light);
  font-weight: 600;
}
.cart-icon:hover { background: rgba(255,255,255,0.15); text-decoration: none; }
.cart-icon .count { background: var(--green-light); color: var(--green-dark); font-size: 0.8rem; padding: 0.05rem 0.4rem; border-radius: 999px; font-weight: 700; }

.menu-toggle { display: none; background: none; border: 1px solid rgba(255,255,255,0.3); color: var(--text-light); padding: 0.4rem 0.7rem; border-radius: var(--radius); cursor: pointer; font-size: 1.2rem; }

/* ============================================================
   HERO – velký banner s obrázkem auta a překrytým nadpisem
   ============================================================ */

.hero {
  position: relative;
  background-size: cover;
  background-position: center;
  height: 360px;
  display: flex;
  align-items: center;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(180deg,
    rgba(47,77,42,0.35) 0%,
    rgba(110,191,92,0.65) 100%);
  z-index: 1;
}
.hero-inner {
  position: relative;
  z-index: 2;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 1.5rem;
  width: 100%;
}
.hero h1 {
  color: var(--text-light);
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 700;
  text-shadow: 0 2px 12px rgba(0,0,0,0.3);
  letter-spacing: -0.01em;
}

/* ============================================================
   COURSE TABLE – 8 sloupců s černým pozadím
   ============================================================ */

.section-courses {
  padding: 2rem 1rem 3rem;
}
.courses-wrap {
  max-width: var(--max-w);
  margin: 0 auto;
  overflow-x: auto;
}
.courses-grid {
  display: grid;
  grid-template-columns: repeat(8, minmax(150px, 1fr));
  gap: 1px;
  background: var(--black-deep);
  border: 1px solid var(--black-deep);
}
.course-cell {
  background: var(--black-deep);
  color: var(--text-light);
  display: flex;
  flex-direction: column;
}
.course-cell .course-name {
  text-align: center;
  padding: 1.25rem 0.5rem 0.5rem;
  font-size: 1.4rem;
  font-weight: 500;
}
.course-cell .course-loc {
  text-align: center;
  padding: 0 0.5rem 1.25rem;
  font-size: 0.9rem;
  color: rgba(255,255,255,0.85);
}
.course-cell .course-price {
  background: rgba(0,0,0,0.5);
  text-align: center;
  font-size: 1.6rem;
  font-weight: 600;
  padding: 0.85rem 0.5rem;
  border-top: 1px solid rgba(255,255,255,0.05);
  border-bottom: 1px solid rgba(255,255,255,0.05);
}
.course-cell .course-features {
  flex: 1;
  background: var(--green-light);
  color: var(--text-dark);
  padding: 0;
  list-style: none;
  font-size: 0.85rem;
  display: flex;
  flex-direction: column;
}
.course-cell .course-features li {
  padding: 0.65rem 0.85rem;
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  border-bottom: 1px solid rgba(0,0,0,0.06);
  background: #fff;
}
.course-cell .course-features li:nth-child(even) { background: var(--green-pale); }
.course-cell .course-features li::before {
  content: '';
  width: 8px; height: 8px;
  background: var(--green-mid);
  border-radius: 50%;
  margin-top: 0.4rem;
  flex-shrink: 0;
}
.course-cell .course-cta {
  background: var(--green-pale);
  padding: 0.85rem;
  border-top: 1px solid rgba(0,0,0,0.08);
}
.course-cell .course-cta a {
  display: block;
  background: var(--black-deep);
  color: var(--text-light);
  text-align: center;
  padding: 0.65rem;
  font-weight: 500;
  border-radius: var(--radius);
  transition: background 0.15s;
}
.course-cell .course-cta a:hover { background: var(--green-dark); text-decoration: none; }
.course-cell .course-badge {
  position: absolute;
  top: 0; right: 0;
  background: var(--green-mid);
  color: #fff;
  padding: 0.2rem 0.6rem;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  z-index: 1;
}

@media (max-width: 1100px) {
  .courses-grid { grid-template-columns: repeat(4, minmax(180px, 1fr)); }
}
@media (max-width: 700px) {
  .courses-grid { grid-template-columns: repeat(2, minmax(160px, 1fr)); }
  .course-cell .course-name { font-size: 1.1rem; padding: 0.85rem 0.5rem 0.3rem; }
  .course-cell .course-price { font-size: 1.25rem; padding: 0.6rem; }
}

/* ============================================================
   CONTENT – statické stránky
   ============================================================ */

.content-section {
  max-width: var(--content-w);
  margin: 0 auto;
  padding: 3rem 1.5rem;
}
.content-section h1 {
  font-size: clamp(2rem, 4vw, 3rem);
  margin-bottom: 1.5rem;
  text-align: center;
  font-weight: 600;
}
.content-section h2 {
  font-size: 1.7rem;
  margin: 2rem 0 1rem;
  font-weight: 600;
  text-align: center;
}
.content-section h3 {
  font-size: 1.3rem;
  margin: 1.5rem 0 0.75rem;
  font-weight: 600;
}
.content-section h4 {
  font-size: 1.1rem;
  margin: 1.25rem 0 0.5rem;
  font-weight: 600;
}
.content-section p {
  margin-bottom: 1rem;
  text-align: center;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}
.content-section ul, .content-section ol {
  max-width: 900px;
  margin: 0 auto 1rem;
  padding-left: 1.5rem;
}
.content-section li { margin-bottom: 0.4rem; }
.content-section table {
  width: 100%;
  max-width: 800px;
  margin: 1rem auto;
  border-collapse: collapse;
  background: rgba(255,255,255,0.6);
}
.content-section table th, .content-section table td {
  padding: 0.6rem 1rem;
  border: 1px solid rgba(0,0,0,0.1);
}
.content-section table th { background: rgba(0,0,0,0.05); font-weight: 600; text-align: left; }

.content-section img.hero-image {
  margin-bottom: 2rem;
  width: 100%;
  max-height: 360px;
  object-fit: cover;
  border-radius: var(--radius);
}

/* ============================================================
   BUTTONS
   ============================================================ */

.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  font-weight: 500;
  text-align: center;
  border-radius: var(--radius);
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  text-decoration: none;
}
.btn-primary { background: var(--black-deep); color: var(--text-light); }
.btn-primary:hover { background: var(--green-dark); color: var(--text-light); text-decoration: none; }
.btn-secondary { background: transparent; color: var(--green-dark); border-color: var(--green-dark); }
.btn-secondary:hover { background: var(--green-dark); color: var(--text-light); text-decoration: none; }
.btn-block { display: block; width: 100%; }

/* ============================================================
   FORM
   ============================================================ */

.form { max-width: 700px; margin: 0 auto; background: rgba(255,255,255,0.85); padding: 2rem; border-radius: var(--radius); box-shadow: var(--shadow-card); }
.form .field { margin-bottom: 1rem; }
.form label { display: block; font-weight: 500; margin-bottom: 0.3rem; font-size: 0.9rem; }
.form input, .form select, .form textarea {
  width: 100%;
  padding: 0.65rem 0.85rem;
  border: 1px solid rgba(0,0,0,0.2);
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 1rem;
  background: #fff;
}
.form input:focus, .form select:focus, .form textarea:focus {
  outline: none; border-color: var(--green-dark); box-shadow: 0 0 0 3px rgba(110,191,92,0.2);
}
.form textarea { min-height: 110px; resize: vertical; }
.form .row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form .check { display: flex; align-items: flex-start; gap: 0.5rem; margin-bottom: 1rem; }
.form .check input { width: auto; margin-top: 0.3rem; }
.form .alert { padding: 0.75rem 1rem; border-radius: var(--radius); margin-bottom: 1rem; }
.form .alert-error { background: #fdd; color: #800; border: 1px solid #faa; }
.form .alert-success { background: #dfd; color: #050; border: 1px solid #aea; }
.honeypot { position: absolute; left: -9999px; }

@media (max-width: 600px) {
  .form .row-2 { grid-template-columns: 1fr; }
}

/* ============================================================
   SHOP – produkty grid
   ============================================================ */

.shop-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1.5rem;
  max-width: var(--content-w);
  margin: 2rem auto;
  padding: 0 1.5rem;
}
.product-card {
  background: rgba(255,255,255,0.85);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  transition: transform 0.2s, box-shadow 0.2s;
}
.product-card:hover { transform: translateY(-3px); box-shadow: 0 6px 20px rgba(0,0,0,0.1); }
.product-card img { width: 100%; aspect-ratio: 1; object-fit: cover; }
.product-card .body { padding: 1rem; flex: 1; display: flex; flex-direction: column; }
.product-card h3 { font-size: 1.1rem; margin-bottom: 0.4rem; }
.product-card .price { font-weight: 600; color: var(--green-dark); margin-bottom: 1rem; flex: 1; }
.product-card .btn { margin-top: auto; }

/* ============================================================
   CART
   ============================================================ */

.cart-table { width: 100%; border-collapse: collapse; background: rgba(255,255,255,0.85); }
.cart-table th, .cart-table td { padding: 0.85rem 1rem; text-align: left; border-bottom: 1px solid rgba(0,0,0,0.08); }
.cart-table th { background: var(--green-dark); color: #fff; }
.cart-table tfoot td { font-weight: 700; background: rgba(0,0,0,0.04); }
.cart-empty { text-align: center; padding: 3rem 1rem; background: rgba(255,255,255,0.85); border-radius: var(--radius); }

/* ============================================================
   FOOTER
   ============================================================ */

.site-footer {
  background: rgba(255,255,255,0);
  padding: 3rem 1.5rem 1.5rem;
  margin-top: 3rem;
}
.footer-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1fr;
  gap: 2rem;
}
.footer-col h3 { font-size: 1rem; font-weight: 600; margin-bottom: 0.75rem; color: var(--text-dark); }
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 0.4rem; }
.footer-col a { color: var(--text-dark); font-size: 0.9rem; }
.footer-col a:hover { color: var(--green-dark); text-decoration: underline; }
.social-links { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.social-links a {
  width: 40px; height: 40px;
  background: var(--text-dark);
  color: #fff;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.social-links a.fb { background: #1877f2; }
.social-links a.ig { background: #e4405f; }
.social-links a.wa { background: #25d366; }
.social-links a.mail { background: #444; }

.footer-bottom {
  max-width: var(--max-w);
  margin: 2rem auto 0;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(0,0,0,0.1);
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-muted);
}

@media (max-width: 800px) {
  .footer-inner { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 480px) {
  .footer-inner { grid-template-columns: 1fr; }
}

/* ============================================================
   GDPR COOKIE BANNER
   ============================================================ */

.cookie-banner {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  background: var(--black-deep);
  color: var(--text-light);
  padding: 1.25rem 1.5rem;
  z-index: 999;
  display: none;
  box-shadow: 0 -4px 20px rgba(0,0,0,0.3);
}
.cookie-banner.is-visible { display: block; }
.cookie-banner-inner {
  max-width: var(--content-w);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
}
.cookie-banner h3 { font-size: 1.1rem; margin-bottom: 0.4rem; color: var(--green-light); }
.cookie-banner p { font-size: 0.85rem; line-height: 1.5; flex: 1; min-width: 280px; margin: 0; color: rgba(255,255,255,0.85); text-align: left; }
.cookie-banner .actions { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.cookie-banner .btn { padding: 0.5rem 1rem; font-size: 0.85rem; }
.cookie-banner .btn-primary { background: var(--green-light); color: var(--text-dark); }
.cookie-banner .btn-primary:hover { background: var(--green-mid); color: #fff; }
.cookie-banner .btn-ghost { background: transparent; color: #fff; border: 1px solid rgba(255,255,255,0.3); }

/* ============================================================
   MOBILE NAV
   ============================================================ */

@media (max-width: 900px) {
  .menu-toggle { display: inline-block; }
  .main-nav {
    position: absolute;
    top: 100%; left: 0; right: 0;
    background: var(--green-dark);
    border-top: 1px solid rgba(255,255,255,0.1);
    display: none;
    flex-direction: column;
  }
  .main-nav.is-open { display: flex; }
  .main-nav ul { flex-direction: column; align-items: stretch; padding: 0.5rem; gap: 0; }
  .main-nav a { display: block; padding: 0.85rem 1rem; border-bottom: 1px solid rgba(255,255,255,0.05); }
  .header-inner { flex-wrap: wrap; }
}

/* ============================================================
   UTILITIES
   ============================================================ */

.text-center { text-align: center; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 2rem; }
.mt-3 { margin-top: 2rem; }
.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; }
