/* Základ */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  background: #f3f4f8;
  color: #0f172a;
}

/* Odkazy */

a {
  color: inherit;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

a.read-more {
  color: #2563eb !important;
}

/* Layout stránky */

main {
  max-width: 1120px;
  margin: 40px auto 64px;
  padding: 0 16px;
}

/* Horní navigace */

.top-nav {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(243, 244, 248, 0.96);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(148, 163, 184, 0.35);
}

.top-nav-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.site-title {
  font-family: "Barlow Condensed", system-ui, sans-serif;
  letter-spacing: 0.26em;
  font-size: 32px;
  font-weight: 700;
  color: #0f172a;
}

.btn-newsletter {
  font-size: 14px;
  font-weight: 500;
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.7);
  background: #0f172a;
  color: #f9fafb;
}

/* Topic bar */

.topic-wrapper {
  border-top: 1px solid rgba(148, 163, 184, 0.35);
}

.topic-bar {
  max-width: 1120px;
  margin: 0 auto;
  padding: 8px 16px 10px;
  display: flex;
  gap: 8px;
  overflow-x: auto;
}

.topic-pill {
  font-size: 13px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.12);
  white-space: nowrap;
  color: #0f172a;
}

.topic-pill.active {
  background: #111827;
  color: #f9fafb;
}

/* HERO SEKCE */

.hero-section {
  display: flex;
  gap: 40px;
  align-items: stretch;
  margin-top: 32px;
  margin-bottom: 40px;
}

.hero-image-wrapper {
  flex: 0 0 46%;
  max-width: 520px;
  aspect-ratio: 16 / 9;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.35);
}

.hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.hero-content {
  flex: 1;
  max-width: 560px;
  padding: 8px 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.badge {
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #6366f1;
}

.hero-content h1 {
  margin: 8px 0 12px;
  font-family: "Barlow Condensed", system-ui, sans-serif;
  font-size: 32px;
  line-height: 1.1;
  color: #0f172a;
}

.hero-meta {
  margin: 0 0 12px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: #6b7280;
}

.hero-perex {
  margin: 0 0 20px;
  font-size: 15px;
  line-height: 1.6;
  color: #111827;
}

.hero-read-more {
  display: inline-block;
  font-size: 14px;
  font-weight: 500;
  color: #2563eb !important;
  text-decoration: none;
  margin-top: auto;
}

.hero-read-more:hover {
  text-decoration: underline;
}

/* Teasery pod hero */

.teasers-section {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  margin-bottom: 40px;
}

.teaser-card {
  flex: 1 1 0;
  min-width: 0;
  background: #ffffff;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.16);
  display: flex;
  flex-direction: column;
}

.teaser-image-wrapper {
  overflow: hidden;
}

.teaser-image {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
}

.teaser-body {
  padding: 16px 18px 18px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

/* Rubrika pod hero (NOVINKY, MTG ARENA) – skrytá */
.teaser-tag {
  display: none;
}

/* Nadpis teaser karet */
.teaser-card h2 {
  margin: 0 0 6px;
  font-family: "Barlow Condensed", system-ui, sans-serif;
  font-size: 20px;
  line-height: 1.25;
  color: #0f172a;
  flex: 0 0 auto;
  /* height: 4em;         odstraněno, aby se nic neořezávalo */
  /* overflow: hidden;    odstraněno */
}

.teaser-card .teaser-body .read-more {
  display: inline-block;
  font-size: 14px;
  font-weight: 500;
  color: #2563eb !important;
  text-decoration: none;
  margin-top: auto;
}

.teaser-card .teaser-body .read-more:hover {
  text-decoration: underline;
}

/* Obrázky v kartách článků */

.article-card img,
.teaser img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
}

/* JAK ZAČÍT S MAGICEM */

.getting-started-section {
  max-width: 1120px;
  margin: 40px auto 32px;
  padding: 0 20px;
}

.getting-started-section h2 {
  font-size: 1.9rem;
  margin-bottom: 20px;
}

.getting-started-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.getting-started-card {
  background-color: #020617;
  color: #e5e7eb;
  border-radius: 16px;
  padding: 16px 18px;
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.4);
}

.getting-started-card h3 {
  font-size: 1.1rem;
  font-family: "Barlow Condensed", system-ui, sans-serif;
  font-weight: 700;
  margin-bottom: 8px;
  margin-top: 0;
}

.getting-started-card p {
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 10px;
}

.getting-started-card .read-more {
  font-size: 0.9rem;
  color: #93c5fd;
  text-decoration: none;
}

.getting-started-card .read-more:hover {
  text-decoration: underline;
}

/* NEWSLETTER */

.newsletter-section {
  width: 100%;
  margin: 32px auto 64px;
  padding: 0;
  display: block;
}

.newsletter-box {
  max-width: 800px;
  margin: 0 auto;
  background-color: #020617;
  color: #f9fafb;
  padding: 24px 28px;
  border-radius: 16px;
  text-align: center;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.35);
}

.newsletter-box h2 {
  font-size: 1.8rem;
  margin-bottom: 10px;
}

.newsletter-box p {
  margin-bottom: 6px;
  line-height: 1.5;
}

.newsletter-form {
  margin-top: 12px;
}

.newsletter-form label {
  display: block;
  margin-bottom: 6px;
  font-weight: 600;
}

.newsletter-form input[type="email"] {
  width: 100%;
  max-width: 360px;
  padding: 8px 10px;
  border-radius: 6px;
  border: 1px solid #334155;
  font-size: 1rem;
  background-color: #020617;
  color: #f9fafb;
}

.newsletter-form input[type="email"]::placeholder {
  color: #64748b;
}

.newsletter-form button {
  margin-top: 8px;
  padding: 8px 16px;
  border-radius: 6px;
  border: none;
  background: #111827;
  color: #fff;
  font-size: 1rem;
  cursor: pointer;
}

.newsletter-form button:hover {
  background: #1f2937;
}

/* FOOTER */

.site-footer {
  background-color: #020617;
  color: #e5e7eb;
  padding: 32px 20px 20px;
  margin-top: 40px;
  font-size: 0.95rem;
}

.footer-inner {
  max-width: 1120px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 0.8fr 0.8fr;
  gap: 24px;
}

.footer-col h3,
.footer-col h4 {
  margin-bottom: 10px;
  font-size: 1.1rem;
}

.footer-about p {
  line-height: 1.6;
}

.footer-links ul,
.footer-social ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-links li,
.footer-social li {
  margin-bottom: 4px;
}

.footer-links a,
.footer-social a {
  color: #e5e7eb;
  text-decoration: none;
}

.footer-links a:hover,
.footer-social a:hover {
  text-decoration: underline;
}

.footer-bottom {
  max-width: 1120px;
  margin: 20px auto 0;
  padding-top: 16px;
  border-top: 1px solid #111827;
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.9rem;
}

.footer-bottom a {
  color: #e5e7eb;
  text-decoration: underline;
}

/* ===== Detail článku ===== */

.article-hero-header {
  max-width: 760px;
  margin: 32px auto 8px;
  padding: 0 16px;
}

.article-hero-header-inner {
  text-align: left;
}

.article-hero-header .article-tag {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #888;
  display: block;
  margin-bottom: 4px;
}

.article-hero-header h1 {
  font-family: "Barlow Condensed", system-ui, sans-serif;
  font-size: 2.4rem;
  line-height: 1.15;
  margin: 0 0 12px;
}

.article-hero-header .hero-perex {
  font-size: 1.05rem;
  color: #333;
  margin: 0 0 20px;
}

.article-tag {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #888;
  margin-bottom: 4px;
  display: inline-block;
}

.article-hero {
  max-width: 760px;
  margin: 16px auto 32px;
  padding: 0 16px;
}

.article-hero img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 10px;
}

.article-hero figcaption {
  font-size: 0.85rem;
  color: #666;
  margin-top: 6px;
}

.article-section {
  max-width: 760px;
  margin: 0 auto 64px;
  padding: 0 16px;
}

.article {
  font-size: 16px;
  line-height: 1.6;
  color: #111;
}

.article h2 {
  font-size: 1.4rem;
  margin: 28px 0 10px;
}

.article p {
  margin-bottom: 12px;
}

.article-table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0 24px;
  font-size: 15px;
}

.article-table th,
.article-table td {
  padding: 10px 14px;
  text-align: left;
  border-bottom: 1px solid #e5e7eb;
}

.article-table th {
  font-family: "Barlow Condensed", system-ui, sans-serif;
  font-size: 16px;
  color: #6b7280;
  font-weight: 600;
}

.article-table tbody tr:hover {
  background: #f9fafb;
}

.article-footer {
  margin-top: 32px;
  padding-top: 16px;
  border-top: 1px solid #eee;
  color: #444;
}

/* Další články */

.related-articles {
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box;
  padding: 28px 16px 0;
  margin-top: 48px;
  border-top: 1px solid #e5e7eb;
}

.related-articles h2 {
  margin: 0 0 20px;
  font-size: 1.4rem;
  font-family: "Barlow Condensed", system-ui, sans-serif;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

/* Výchozí related karta – bílá s obrázkem */

.related-card {
  min-width: 0;
  background: #ffffff;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.16);
  display: flex;
  flex-direction: column;
}

/* Tmavá varianta – série Jak začít */

.related-card.dark {
  background: #020617;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.4);
}

.related-card-link {
  display: block;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}

.related-card-link:hover .related-image {
  opacity: 0.85;
}

.related-image {
  width: 100%;
  height: 180px;
  display: block;
  object-fit: cover;
  transition: opacity 0.2s ease;
}

.related-body {
  padding: 14px 16px 16px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

/* Nadpis v kartách (hlavní i related) */
.related-title {
  margin: 0 0 6px; /* mezera pod nadpisem */
  font-family: "Barlow Condensed", system-ui, sans-serif;
  font-size: 18px;
  line-height: 1.3;
  color: #0f172a;
}

.related-card.dark .related-title {
  color: #ffffff;
}

/* Text v dark boxech */
.related-card.dark .related-body p {
  font-size: 0.9rem;
  line-height: 1.55;
  color: #ffffff;
  margin: 0 0 12px;
}

/* Klikatelný nadpis (obal <a>) */
.related-title-link {
  display: block;
  text-decoration: none;
  color: inherit;
  margin-bottom: 6px; /* mezera mezi nadpisem a popisem / tlačítkem */
}

.related-title-link:hover .related-title {
  text-decoration: underline;
}

/* "Číst více" */
.related-link {
  display: inline-block;
  margin-top: auto;
  font-size: 0.85rem;
  font-weight: 500;
  color: #2563eb;
  text-decoration: none;
}

.related-card.dark .related-link {
  color: #2563eb;
}

.related-link:hover {
  text-decoration: underline;
}

/* Klikatelný nadpis v teaser kartě (když ho používáš) */
.teaser-title-link {
  margin: 0;
  font-family: "Barlow Condensed", system-ui, sans-serif;
  font-size: 20px;
  line-height: 1.25;
  color: #0f172a;
  padding: 12px 18px 0;
}

.related-card-link:hover .teaser-title-link {
  text-decoration: underline;
}

/* Responzivita */

@media (max-width: 900px) {
  .getting-started-grid {
    grid-template-columns: 1fr;
  }

  .related-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .footer-inner {
    grid-template-columns: 1fr;
  }
}
