/* =========================================================
   kurzy.css — page-specific styles for Kurzy
   expects: style.css, clanky1.css, pedagogika.css loaded first
   ========================================================= */

/* ── Grid of cards (kurzy overview) ───────────────────── */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
  gap: 26px;
}

/* Globální .card je ve style.css; tady jen úprava pro karty kurzů */
.grid > .card,
a.card {
  padding: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 100%;
}

/* Thumbnail */
.thumb {
  height: 230px;
  background: rgba(58, 123, 213, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
}

.thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.thumb-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}

.thumb-icon svg {
  width: 54px;
  height: 54px;
  fill: var(--brand-bright);
  opacity: 0.22;
}

/* ── Card content ─────────────────────────────────────── */
.card-body {
  padding: 18px 22px 22px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 4px;
}

.badge {
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  border-radius: 20px;
  padding: 3px 10px;
  border: 1px solid rgba(46, 196, 160, 0.35);
  background: rgba(46, 196, 160, 0.10);
  color: var(--brand-green);
  line-height: 1.2;
}

.badge-web {
  border-color: rgba(78, 146, 240, 0.35);
  background: rgba(78, 146, 240, 0.10);
  color: var(--brand-bright);
}

.badge-indiv {
  border-color: rgba(245, 200, 66, 0.40);
  background: rgba(245, 200, 66, 0.12);
  color: #b88900;
}

.card-title {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text-1);
  line-height: 1.35;
  margin: 0;
}

.card-desc {
  font-size: 0.875rem;
  color: var(--text-3);
  line-height: 1.65;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin: 0 0 1.1rem 0;
}

/* ── Fancy footer in overview card ───────────────────── */
.card-footer-row {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.2rem;
  flex-wrap: wrap;
}

.card-more-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.1rem;
  padding: 0.55rem 0.85rem;
  border-radius: 800px;
  background: linear-gradient(135deg, var(--brand), var(--brand-bright));
  color: #fff;
  font-weight: 700;
  font-size: 0.85rem;
  line-height: 1;
  box-shadow: 0 10px 24px rgba(58, 123, 213, 0.22);
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.card-more-btn svg {
  width: 14px;
  height: 14px;
  fill: currentColor;
  transition: transform 0.2s ease;
  flex-shrink: 0;
}

.card:hover .card-more-btn {
  transform: translateY(-2px);
  box-shadow: 0 14px 28px rgba(58, 123, 213, 0.28);
  filter: brightness(1.03);
}

.card:hover .card-more-btn svg {
  transform: translateX(3px);
}

.price-chip-card {
  display: inline-flex;
  align-items: baseline;
  gap: 0.1rem;
  padding: 0.4rem 0.75rem;
  border-radius: 800px;
  background: rgba(78, 146, 240, 0.10);
  color: var(--brand);
  font-weight: 800;
  white-space: nowrap;
  line-height: 1;
}

.price-chip-card b {
  font-size: 1.1rem;
  line-height: 1;
  color: var(--brand-bright);
  font-weight: 900;
}

.price-chip-card small {
  font-size: 0.8rem;
  font-weight: 700;
  opacity: 0.85;
  color: var(--text-2);
}

/* ── Detail page ─────────────────────────────────────── */
.back {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 0.875rem;
  font-weight: 800;
  color: var(--brand-bright);
  text-decoration: none;
  margin-bottom: 26px;
  transition: gap 0.15s;
}

.back:hover {
  gap: 11px;
}

.back svg {
  width: 18px;
  height: 18px;
  fill: var(--brand-bright);
}

.detail-box {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.detail-thumb {
  width: 100%;
  height: 280px;
  background: rgba(58, 123, 213, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.detail-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.detail-thumb svg {
  width: 70px;
  height: 70px;
  fill: var(--brand-bright);
  opacity: 0.18;
}

.detail-head {
  padding: 28px 36px 22px;
  border-bottom: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  align-items: flex-start;
}

.detail-head-text {
  flex: 1;
  min-width: 0;
}

.detail-head-text h1 {
  font-size: clamp(1.4rem, 3vw, 1.95rem);
  font-weight: 900;
  color: var(--text-1);
  letter-spacing: -0.4px;
  margin-bottom: 10px;
}

.detail-head-text p {
  font-size: 0.95rem;
  color: var(--text-3);
  max-width: 560px;
  line-height: 1.65;
  margin-bottom: 12px;
}

.price-chip {
  background: rgba(58, 123, 213, 0.10);
  border: 1px solid var(--border-mid);
  border-radius: 12px;
  padding: 12px 24px;
  text-align: center;
  flex-shrink: 0;
}

.price-chip .pc-val {
  display: block;
  font-size: 1.55rem;
  font-weight: 900;
  color: var(--brand-bright);
  letter-spacing: -0.3px;
}

.price-chip .pc-note {
  font-size: 0.77rem;
  color: var(--text-3);
  font-weight: 600;
}

.detail-content {
  padding: 32px 36px;
  font-size: 0.95rem;
  line-height: 1.75;
  color: var(--text-2);
}

.detail-content h2 {
  font-size: 1.08rem;
  font-weight: 900;
  color: var(--text-1);
  margin: 26px 0 10px;
  padding-left: 14px;
  border-left: 3px solid var(--brand-bright);
}

.detail-content h3 {
  font-size: 1rem;
  font-weight: 900;
  color: var(--text-1);
  margin: 22px 0 8px;
}

.detail-content p {
  margin-bottom: 12px;
}

.detail-content ul,
.detail-content ol {
  margin: 6px 0 14px 22px;
}

.detail-content li {
  margin-bottom: 4px;
}

.detail-content hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 20px 0;
}

.detail-content a {
  color: var(--brand-bright);
}

.detail-content a:hover {
  text-decoration: underline;
}

.detail-content img {
  max-width: 100%;
  height: auto;
  border-radius: 10px;
}

.detail-content table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
  margin: 14px 0 18px;
}

.detail-content th,
.detail-content td {
  border: 1px solid var(--border);
  padding: 8px 12px;
  text-align: left;
}

.detail-content th {
  background: var(--bg-subtle);
  font-weight: 800;
  color: var(--text-1);
}

/* CTA */
.detail-cta {
  padding: 0 36px 32px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.btn-sign {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, var(--brand), var(--brand-dark));
  color: var(--text-inv);
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 800;
  padding: 12px 26px;
  border-radius: 12px;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: transform 0.18s, box-shadow 0.18s, background 0.18s;
  align-self: flex-start;
}

.btn-sign:hover {
  background: linear-gradient(135deg, var(--brand-bright), var(--brand));
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(58, 123, 213, 0.30);
}

.btn-sign svg {
  width: 16px;
  height: 16px;
  fill: var(--text-inv);
}

.cta-note {
  font-size: 0.82rem;
  color: var(--text-3);
  font-style: italic;
}

.cta-note a {
  color: var(--brand-bright);
}

/* ── Empty state ─────────────────────────────────────── */
.empty {
  padding: 80px 20px;
  text-align: center;
  color: var(--text-3);
}

.empty svg {
  width: 54px;
  height: 54px;
  fill: var(--text-3);
  margin-bottom: 14px;
  display: block;
  margin-inline: auto;
  opacity: 0.7;
}

/* ── Responsive ─────────────────────────────────────── */
@media (max-width: 768px) {
  .grid {
    grid-template-columns: 1fr;
  }

  .thumb {
    height: 210px;
  }

  .detail-thumb {
    height: 220px;
  }

  .detail-head {
    padding: 20px;
    flex-direction: column;
  }

  .detail-content,
  .detail-cta {
    padding-left: 20px;
    padding-right: 20px;
  }
}

@media (max-width: 640px) {
  .card-footer-row {
    align-items: stretch;
  }

  .card-more-btn,
  .price-chip-card {
    width: 100%;
    justify-content: center;
  }

  .card-body {
    padding: 16px 18px 18px;
  }
}