/**
 * Detail šablony (pages/nahled-sablony.php)
 * Všechny třídy mají prefix `tpl-`, aby neovlivnily zbytek webu.
 */

.tpl-detail {
  color: #1f2a37;
  font-family: 'Open Sans', Arial, sans-serif;
}

.tpl-detail *,
.tpl-detail *::before,
.tpl-detail *::after {
  box-sizing: border-box;
}

.tpl-detail h1,
.tpl-detail h2,
.tpl-detail h3 {
  margin: 0;
  color: #12202f;
  font-family: 'Open Sans', Arial, sans-serif;
  text-transform: none;
}

.tpl-detail p {
  margin: 0;
}

.tpl-detail svg {
  flex: none;
}

.tpl-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* --- Drobečková navigace + listování ----------------------------------- */

.tpl-topbar {
  border-bottom: 1px solid #eef2f5;
  background: #fbfcfd;
}

.tpl-topbar .tpl-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 12px;
  padding-bottom: 12px;
  font-size: 14px;
}

.tpl-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
  color: #5b6878;
}

.tpl-breadcrumb a {
  color: #0077b3;
  text-decoration: none;
}

.tpl-breadcrumb a:hover,
.tpl-breadcrumb a:focus {
  color: #005f8f;
  text-decoration: underline;
}

.tpl-breadcrumb [aria-current] {
  color: #1f2a37;
  font-weight: 600;
}

.tpl-pager {
  display: flex;
  align-items: center;
  gap: 4px;
}

.tpl-pager a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  padding: 6px 12px;
  border-radius: 6px;
  color: #3d4a5a;
  text-decoration: none;
}

.tpl-pager a:hover,
.tpl-pager a:focus {
  background: #f2f6f9;
  color: #12202f;
  text-decoration: none;
}

.tpl-pager-divider {
  width: 1px;
  height: 18px;
  background: #dfe5eb;
}

/* --- Hero --------------------------------------------------------------- */

.tpl-hero {
  background: #f3f7fa;
}

.tpl-hero .tpl-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 56px;
  padding-top: 56px;
  padding-bottom: 64px;
}

.tpl-hero-text {
  flex: 1 1 400px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.tpl-hero-media {
  flex: 1 1 620px;
  min-width: 0;
}

.tpl-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tpl-badge {
  display: inline-block;
  padding: 6px 10px;
  border-radius: 999px;
  background: #e3f1fa;
  color: #005f8f;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .06em;
  line-height: 1.2;
  text-transform: uppercase;
}

.tpl-badge-dark {
  background: #1f2a37;
  color: #ffffff;
}

.tpl-badge-muted {
  background: #eef2f5;
  color: #3d4a5a;
}

.tpl-eyebrow {
  margin: 0 0 6px !important;
  color: #5b6878;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.4;
}

/* custom.css nastavuje všem h2 `font-size: 2.1em !important` */
.tpl-detail .tpl-title {
  font-size: 56px !important;
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -.02em;
}

.tpl-lead {
  color: #3d4a5a;
  font-size: 17px;
  line-height: 1.65;
}

.tpl-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.tpl-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 52px;
  padding: 0 24px;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  transition: background .15s, box-shadow .15s;
}

.tpl-btn-primary,
.tpl-btn-primary:visited {
  background: #3b7d17;
  box-shadow: 0 6px 16px rgba(59, 125, 23, .28);
  color: #ffffff;
}

.tpl-btn-primary:hover,
.tpl-btn-primary:focus {
  background: #2f6e12;
  color: #ffffff;
  text-decoration: none;
}

.tpl-btn-ghost,
.tpl-btn-ghost:visited {
  min-height: 44px;
  padding: 0 18px;
  border: 2px solid #0088cc;
  background: #ffffff;
  color: #005f8f;
  font-size: 15px;
}

.tpl-btn-ghost:hover,
.tpl-btn-ghost:focus {
  background: #eaf4fb;
  color: #005f8f;
  text-decoration: none;
}

.tpl-note {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  padding: 16px 18px;
  border: 1px dashed #b9d3e6;
  border-radius: 12px;
  background: #f7fbfe;
  color: #3d4a5a;
  font-size: 15px;
  line-height: 1.5;
}

.tpl-note-text {
  flex: 1 1 240px;
}

.tpl-note svg {
  color: #0077b3;
}

.tpl-note strong {
  color: #12202f;
}

.tpl-note a {
  color: #0077b3;
  font-weight: 700;
}

/* --- Rámy náhledů (PC a mobil) ----------------------------------------- */

.tpl-frame-link,
.tpl-frame-link:hover,
.tpl-frame-link:focus {
  display: block;
  color: inherit;
  text-decoration: none;
}

.tpl-frame {
  overflow: hidden;
  border: 1px solid #dde6ee;
  border-radius: 14px;
  background: #ffffff;
  box-shadow: 0 24px 60px rgba(16, 42, 67, .14);
}

.tpl-frame-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-bottom: 1px solid #e9eef3;
  background: #f8fafc;
}

.tpl-frame-dots {
  display: flex;
  gap: 6px;
}

.tpl-frame-dots span {
  display: block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #d5dde5;
}

.tpl-frame-url {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  padding: 4px 10px;
  border: 1px solid #e3e9ef;
  border-radius: 6px;
  background: #ffffff;
  color: #5b6878;
  font-size: 12px;
  line-height: 1.4;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.tpl-frame img {
  display: block;
  width: 100%;
  height: auto;
}

.tpl-media-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 16px;
}

.tpl-media-footer p {
  color: #5b6878;
  font-size: 13px;
  line-height: 1.5;
}

.tpl-frame-mobile {
  width: 290px;
  max-width: 100%;
  border-radius: 22px;
}

.tpl-frame-mobile .tpl-frame-bar {
  flex-direction: column;
  gap: 8px;
}

.tpl-frame-notch {
  display: block;
  width: 48px;
  height: 5px;
  border-radius: 999px;
  background: #d5dde5;
}

.tpl-frame-mobile .tpl-frame-url {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
}

.tpl-frame-mobile img {
  height: 520px;
  object-fit: cover;
  object-position: top;
}

/* --- Sekce -------------------------------------------------------------- */

.tpl-section {
  padding-top: 80px;
  padding-bottom: 40px;
}

.tpl-section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 32px;
}

.tpl-kicker {
  margin: 0 0 8px !important;
  color: #0077b3;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .08em;
  line-height: 1.4;
  text-transform: uppercase;
}

.tpl-detail .tpl-heading {
  font-size: 34px !important;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -.01em;
}

.tpl-more {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  color: #0077b3;
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
}

.tpl-more:hover,
.tpl-more:focus {
  color: #005f8f;
  text-decoration: none;
}

/* Mobil */

.tpl-mobile .tpl-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 72px;
}

.tpl-mobile-media {
  flex: 0 1 340px;
  min-width: 0;
  display: flex;
  justify-content: center;
}

.tpl-mobile-text {
  flex: 1 1 460px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.tpl-points {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin: 4px 0 0;
  padding: 0;
  list-style: none;
}

.tpl-points li {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  color: #3d4a5a;
  font-size: 15px;
  line-height: 1.55;
}

.tpl-points strong {
  color: #12202f;
}

.tpl-icon {
  display: flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 9px;
  background: #e3f1fa;
  color: #0077b3;
}

/* Funkce */

.tpl-features {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}

.tpl-feature {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 24px;
  border: 1px solid #e6ebf0;
  border-radius: 12px;
  background: #ffffff;
  transition: border-color .2s;
}

.tpl-feature:hover {
  border-color: #cfe3f1;
}

.tpl-feature .tpl-icon {
  width: 48px;
  height: 48px;
  border-radius: 10px;
}

.tpl-detail .tpl-feature h3 {
  font-size: 18px;
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: 0;
}

.tpl-feature p {
  color: #4a5664;
  font-size: 15px;
  line-height: 1.6;
}

/* Podobné šablony */

.tpl-similar {
  padding-top: 48px;
  padding-bottom: 88px;
}

.tpl-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 24px;
}

.tpl-card,
.tpl-card:visited {
  display: block;
  overflow: hidden;
  border: 1px solid #e6ebf0;
  border-radius: 12px;
  background: #ffffff;
  color: inherit;
  text-decoration: none;
  transition: box-shadow .2s, transform .2s, border-color .2s;
}

.tpl-card:hover,
.tpl-card:focus {
  border-color: #9fcbe6;
  box-shadow: 0 10px 28px rgba(16, 42, 67, .10);
  color: inherit;
  text-decoration: none;
  transform: translateY(-2px);
}

.tpl-card-img {
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-bottom: 1px solid #eef2f5;
  background: #f3f7fa;
}

.tpl-card-img img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
}

.tpl-card-body {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px;
}

.tpl-detail .tpl-card-body h3 {
  font-size: 18px;
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: 0;
}

.tpl-card-body p {
  margin-top: 2px;
  color: #5b6878;
  font-size: 13px;
  line-height: 1.4;
}

.tpl-card-body .tpl-badge {
  padding: 4px 8px;
  font-size: 11px;
}

/* --- Menší obrazovky ---------------------------------------------------- */

@media (max-width: 767px) {
  .tpl-hero .tpl-inner {
    gap: 36px;
    padding-top: 36px;
    padding-bottom: 44px;
  }

  .tpl-detail .tpl-title {
    font-size: 40px !important;
  }

  .tpl-detail .tpl-heading {
    font-size: 26px !important;
  }

  .tpl-section {
    padding-top: 56px;
  }

  .tpl-mobile .tpl-inner {
    gap: 40px;
  }

  .tpl-btn-primary {
    width: 100%;
  }

  .tpl-pager-label {
    display: none;
  }
}

@media (max-width: 479px) {
  .tpl-inner {
    padding: 0 16px;
  }

  .tpl-topbar .tpl-inner,
  .tpl-hero .tpl-inner {
    padding-left: 16px;
    padding-right: 16px;
  }

  .tpl-features,
  .tpl-cards {
    grid-template-columns: minmax(0, 1fr);
  }
}
