/* ==========================================================================
   BLOGOVÝ DESIGN SYSTÉM - Nozeakatany.cz
   ========================================================================== */

/* Základní kontejner článku */
.news-item-detail article {
  max-width: 1100px;
  margin: 0 auto;
  color: #242424;
  font-size: 16px;
  line-height: 1.7;
}


/* Hlavní mezititulky H2: zarovnání vlevo a rozumné odsazení */
.news-item-detail article h2 {
  color: #c62828;
  text-align: left;      /* Žádné centrování, hezky doleva */
  font-size: 26px;
  margin: 36px 0 16px 0;
}

/* Nadpisy v calloutech: striktní vynulování horní mezery */
.article-callout h2,
.article-callout h3 {
  margin-top: 0 !important;       /* Odstraní velkou horní díru */
  margin-bottom: 8px !important;
  text-align: left;
}

/* doleva i nadpis ve FAQ */
.article-faq h2 {
  text-align: left;
}
/* Obsah článku (TOC) - odstranění horní díry a zarovnání vlevo */
.article-toc h2,
.article-toc__title {
  margin-top: 0 !important;         /* Odstraní velkou horní mezeru */
  margin-bottom: 12px !important;
  text-align: left;                 /* Zarovnání vlevo */
  font-size: 22px;
  color: #c62828;                   /* Červená barva nadpisu */
}

/* ==========================================================================
   ODRÁŽKY A TEXTOVÉ MEZERY (Definitivní stažení mezer)
   ========================================================================== */

/* 1. Pojistka: automaticky smaže prázdné odstavce, které tam Shoptet sám vloží */
.news-item-detail article p:empty,
.news-item-detail article p:has(> br:only-child) {
  display: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* 2. Odstavec před odrážkami: srazíme jeho spodní mezeru na minimum */
.news-item-detail article p:has(+ ul),
.news-item-detail article p:has(+ ol) {
  margin-bottom: 4px !important;       /* Konec odstavce se přirazí těsně k odrážkám */
}

/* 3. Běžný seznam v textu: žádná velká horní díra */
.news-item-detail article ul,
.news-item-detail article ol {
  margin-top: 4px !important;          /* Seznam se přitiskne k textu nad sebou */
  margin-bottom: 14px !important;      /* Přiměřený odskok od následujícího odstavce */
  padding-left: 22px !important;
  list-style-type: disc;
}

.news-item-detail article li {
  margin-bottom: 5px !important;       /* Kompaktní řádky */
  line-height: 1.55;
}

.news-item-detail article li:last-child {
  margin-bottom: 0 !important;
}

/* 4. ZELENÝ KONTROLNÍ SEZNAM (a boxy se samotným seznamem) */
.news-item-detail article .article-callout--success,
.news-item-detail article .article-callout:has(ul:first-child) {
  padding: 12px 18px !important;       /* Zmenšíme polstrování celého zeleného boxu */
}

.news-item-detail article .article-callout ul {
  margin: 0 !important;                /* Žádné vnější okraje navíc */
  padding: 0 0 0 18px !important;      /* Pouze odsazení puntíků od linky */
  list-style-type: disc;
}

.news-item-detail article .article-callout li {
  margin-bottom: 5px !important;
  line-height: 1.55;
}

.news-item-detail article .article-callout li:last-child {
  margin-bottom: 0 !important;
}

/* 1. HERO BANNER ČLÁNKU */
.article-hero {
  background: linear-gradient(135deg, #101010 0%, #343434 46%, #8f1818 100%);
  color: #ffffff;
  padding: 38px 26px;
  border-radius: 16px;
  margin: 0 0 28px 0;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
  text-align: center;
}
.article-hero__badge {
  margin: 0 0 10px 0;
  color: #e6bd69;
  font-size: 14px;
  font-weight: bold;
  letter-spacing: 1.5px;
  text-transform: uppercase;
}
.article-hero__perex {
  max-width: 900px;
  margin: 0 auto;
  font-size: 18px;
  line-height: 1.65;
  color: #f1f1f1;
}

/* 2. LIŠTA AUTORA A DATUMU */
.article-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  background: #f7f7f7;
  border: 1px solid #e5e5e5;
  border-left: 5px solid #9b1c1c;
  border-radius: 10px;
  padding: 14px 18px;
  margin: 18px 0 28px 0;
  font-size: 14px;
  color: #444444;
}
.article-meta a {
  color: #9b1c1c;
  font-weight: bold;
  text-decoration: none;
}
.article-meta a:hover {
  text-decoration: underline;
}

/* 3. OBSAH ČLÁNKU (NAVIGACE) */
.article-toc {
  background: #fafafa;
  border: 1px solid #dddddd;
  border-radius: 14px;
  padding: 22px 26px;
  margin: 26px 0 32px 0;
}
.article-toc__title {
  margin: 0 0 12px 0;
  color: #c62828;
  font-size: 22px;
}
.article-toc ul,
.article-toc ol {
  margin: 0;
  padding-left: 22px;
}
.article-toc li {
  margin-bottom: 6px;
}
.article-toc a {
  color: #9b1c1c;
  text-decoration: none;
  font-weight: 500;
}
.article-toc a:hover {
  text-decoration: underline;
}

/* 4. VÝSTRAŽNÉ A INFORMAČNÍ PRUHY (CALLOUTY) */
.article-callout {
  padding: 19px 21px;
  border-radius: 12px;
  margin: 28px 0;
  border-left: 6px solid;
}
.article-callout p:last-child {
  margin-bottom: 0;
}

/* Oranžové varování (Tamahagane, Hamon, bezpečnost) */
.article-callout--warning {
  background: #fff3e0;
  border-color: #ef6c00;
  color: #4a2800;
}
.article-callout--warning h2,
.article-callout--warning h3 {
  color: #bf4f00;
  margin: 0 0 8px 0;
  font-size: 21px;
}

/* Modré info (Parametry, rady) */
.article-callout--info {
  background: #eef5f8;
  border-color: #39738c;
  color: #1e3a47;
}
.article-callout--info h2,
.article-callout--info h3 {
  color: #285b70;
  margin: 0 0 8px 0;
  font-size: 21px;
}

/* Zelený box (Pomoc, doporučení) */
.article-callout--success {
  background: #eaf7ec;
  border-color: #2e7d32;
  color: #144419;
}
.article-callout--success h2,
.article-callout--success h3 {
  color: #1b5e20;
  margin: 0 0 8px 0;
  font-size: 21px;
}

/* Červený varovný box */
.article-callout--danger {
  background: #fff0f0;
  border-color: #9b1c1c;
  color: #5c1113;
}
.article-callout--danger h2,
.article-callout--danger h3 {
  color: #96272a;
  margin: 0 0 8px 0;
  font-size: 21px;
}

/* Šedý box s horním červeným pruhem (např. "Tip od Marka") */
.article-callout--tip {
  background: #f3f3f3;
  border-top: 4px solid #9b1c1f;
  border-radius: 12px;
  padding: 22px 24px;
  margin: 30px 0;
}
.article-callout--tip h2,
.article-callout--tip h3 {
  color: #242424;
  margin: 0 0 10px 0;
  font-size: 22px;
}

/* 5. MŘÍŽKY A KARTY (2, 3 I 4 BLOKY VEDLE SEBE) */
.article-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin: 26px 0;
}

/* Základní karta - přirozeně se zalamuje i jako 3+1 nebo 2+2 */
.article-card {
  flex: 1 1 230px;
  border-radius: 14px;
  padding: 19px;
  border: 1px solid;
  background: #fff7f2;
  border-color: #efd3c5;
}
.article-card h3 {
  margin: 0 0 8px 0;
  font-size: 20px;
  color: #8a2c16;
}
.article-card p:last-child,
.article-card ul:last-child {
  margin-bottom: 0;
}
.article-card ul {
  padding-left: 20px;
  margin: 0;
}
.article-card li {
  margin-bottom: 5px;
}

/* Barevné varianty karet */
.article-card--warm { /* Cihlová / Teplá (Diferenciální kalení, Yakiba) */
  background: #fff7f2;
  border-color: #efd3c5;
}
.article-card--warm h3 {
  color: #8a2c16;
}

.article-card--cool { /* Modrá / Studená (Průběžné kalení, Ji) */
  background: #eef5f8;
  border-color: #cadde5;
}
.article-card--cool h3 {
  color: #285b70;
}

.article-card--purple { /* Fialová (Hamon, 3. alternativa) */
  background: #f5f0fa;
  border-color: #d8c9e5;
}
.article-card--purple h3 {
  color: #65427d;
}

.article-card--positive { /* Zelená (Skutečný hamon, Správné řešení) */
  background: #edf7ef;
  border-color: #cbe3cf;
}
.article-card--positive h3 {
  color: #276836;
}

.article-card--negative { /* Červená (Imitace, Varovné znaky) */
  background: #fff0f0;
  border-color: #e7c4c4;
}
.article-card--negative h3 {
  color: #96272a;
}

.article-card--gray { /* Šedá neutrální (Higonokami pilíře) */
  background: #f7f7f7;
  border-color: #dddddd;
}
.article-card--gray h3 {
  color: #222222;
}

/* 6. TABULKY */
.article-table-wrap {
  overflow-x: auto;
  margin: 24px 0 32px 0;
}
.article-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
  min-width: 760px;
}
.article-table thead tr {
  background: #202020;
  color: #ffffff;
}
.article-table th,
.article-table td {
  padding: 12px 14px;
  border: 1px solid #dddddd;
  text-align: left;
}
.article-table tbody tr:nth-child(even) {
  background: #fafafa;
}
.article-table td a {
  color: #9b1c1c;
  font-weight: bold;
}

/* 7. ČASOVÁ OSA (TIMELINE) */
.article-timeline {
  margin: 26px 0;
}
.article-timeline__item {
  display: flex;
  gap: 16px;
  margin-bottom: 14px;
  align-items: flex-start;
}
.article-timeline__badge {
  min-width: 82px;
  background: #9b1c1c;
  color: #ffffff;
  text-align: center;
  padding: 9px 7px;
  border-radius: 7px;
  font-weight: bold;
}
.article-timeline__content {
  flex: 1;
  background: #f5f5f5;
  padding: 15px 18px;
  border-radius: 8px;
}

/* 8. VÝZVA K AKCI (CTA BANNER) */
.article-cta {
  background: linear-gradient(135deg, #1d1d1d 0%, #761518 100%);
  color: #ffffff;
  padding: 32px 24px;
  border-radius: 14px;
  text-align: center;
  margin: 36px 0;
}
.article-cta h2 {
  color: #ffffff !important;
  margin: 0 0 12px 0;
  font-size: 26px;
}
.article-cta p {
  max-width: 780px;
  margin: 0 auto 20px auto;
  color: #eeeeee;
}
.article-btn {
  display: inline-block;
  padding: 12px 24px;
  border-radius: 7px;
  font-weight: bold;
  text-decoration: none;
  margin: 5px;
  transition: opacity 0.2s ease;
}
.article-btn:hover {
  opacity: 0.9;
}
.article-btn--primary {
  background: #c62828;
  color: #ffffff !important;
}
.article-btn--white {
  background: #ffffff;
  color: #222222 !important;
}

/* 9. FAQ SEKCE */
.news-item-detail article .article-faq {
  margin-top: 36px !important;
}

.news-item-detail article .article-faq h2 {
  margin-bottom: 12px !important;
  text-align: left !important;
}

/* Každá otázka s odpovědí: jemná linka a polstrování jen 10 px */
.news-item-detail article .article-faq__item {
  padding: 10px 0 !important;
  border-top: 1px solid #e5e5e5 !important;
}

.news-item-detail article .article-faq__item:last-child {
  border-bottom: 1px solid #e5e5e5 !important;
}

/* Otázka (H3): nulový vršek a jen 4 px mezera k odpovědi */
.news-item-detail article .article-faq__question {
  margin-top: 0 !important;           /* Žádná díra pod linkou */
  margin-bottom: 4px !important;      /* Odpověď je hned pod otázkou */
  font-size: 18px !important;
  font-weight: 700 !important;
  line-height: 1.35 !important;
  color: #1a1a1a !important;
}

/* Odpověď (P): striktně zrušíme 20px odskok odstavce Shoptetu */
.news-item-detail article .article-faq__answer {
  margin-top: 0 !important;
  margin-bottom: 0 !important;        /* Nulová mezera dole */
  line-height: 1.5 !important;
  color: #333333 !important;
}

/* MOBILNÍ OPTIMALIZACE */
@media (max-width: 767px) {
  .article-hero {
    padding: 26px 18px;
  }
  .article-hero__perex {
    font-size: 16px;
  }
  .article-meta {
    flex-direction: column;
    align-items: flex-start;
  }
  .article-timeline__item {
    flex-direction: column;
    gap: 8px;
  }
  .article-timeline__badge {
    min-width: auto;
    display: inline-block;
    padding: 4px 10px;
  }
}
/* ==========================================================================
   OBRÁZKY V ČLÁNKU
   ========================================================================== */
.news-item-detail article figure,
.news-item-detail article .article-figure {
  margin: 28px auto !important;
  text-align: center;
}

.news-item-detail article img {
  max-width: 100% !important;        /* Nikdy nepřeteče šířku displeje na mobilu */
  height: auto !important;            /* Zachová správný poměr stran */
  border-radius: 12px !important;     /* Zaoblení rohů sladěné s boxy */
  display: block;
  margin: 0 auto;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08); /* Decentní stín */
}

/* ==========================================================================
   SÉMANTICKÁ RESPONZIVNÍ TABULKA (METODA STACKING)
   ========================================================================== */

/* Na PC: styl pro řádkový nadpis th[scope="row"] */
.news-item-detail article .article-table th[scope="row"] {
  font-weight: 700;
  text-align: left;
  border: 1px solid #dddddd;
  padding: 10px 12px;
  background: #ffffff;
}

.news-item-detail article .article-table tbody tr:nth-child(even) th[scope="row"] {
  background: #fafafa;
}

/* NA MOBILU (pod 768px): Překlopení tabulky do karet (Stacking) */
@media (max-width: 767px) {
  /* Skrytí klasické hlavičky thead (přístupně pro čtečky i roboty) */
  .news-item-detail article .article-table--stack thead {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }

  /* Zrušení scrollování obalu a přeměna tabulky na blok */
  .news-item-detail article .article-table-wrap:has(.article-table--stack) {
    overflow-x: visible !important;
  }

  .news-item-detail article .article-table--stack {
    display: block !important;
    min-width: 100% !important;
    width: 100% !important;
    border: none !important;
  }

  .news-item-detail article .article-table--stack tbody {
    display: block;
  }

  /* Každý řádek tr se stane samostatnou kartou */
  .news-item-detail article .article-table--stack tr {
    display: block !important;
    background: #ffffff !important;
    border: 1px solid #e0e0e0 !important;
    border-radius: 12px !important;
    margin-bottom: 16px !important;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  }

  /* První buňka (Použití) slouží jako tmavé záhlaví karty */
  .news-item-detail article .article-table--stack th[scope="row"] {
    display: block !important;
    background: #202020 !important;
    color: #ffffff !important;
    font-size: 16px !important;
    padding: 10px 14px !important;
    border: none !important;
    text-align: left !important;
  }

  /* Datové buňky td pod sebou */
  .news-item-detail article .article-table--stack td {
    display: flex !important;
    flex-direction: column !important;
    padding: 9px 14px !important;
    border: none !important;
    border-bottom: 1px solid #f0f0f0 !important;
    text-align: left !important;
    background: transparent !important;
  }

  .news-item-detail article .article-table--stack td:last-child {
    border-bottom: none !important;
  }

  /* Zobrazení názvu sloupce z atributu data-label */
  .news-item-detail article .article-table--stack td::before {
    content: attr(data-label);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #888888;
    margin-bottom: 3px;
  }
}
/* Plynulé scrollování a odsazení pod fixní hlavičku Shoptetu */
html {
  scroll-behavior: smooth;
}

.news-item-detail article h2,
.news-item-detail article a[id] {
  scroll-margin-top: 110px;
}

/* ==========================================================================
   1. BĚŽNÉ MEZITITULKY H3 V TEXTU (Shinogi-zukuri, Niku, Kissaki...)
   ========================================================================== */
.news-item-detail article h3 {
  font-size: 20px !important;          /* Zmenšení z obřího na přiměřené */
  font-weight: 700 !important;
  color: #222222 !important;
  margin-top: 22px !important;         /* Kompaktní odskok od předchozího textu */
  margin-bottom: 6px !important;       /* Těsné napojení na odstavec pod sebou */
  line-height: 1.35 !important;
  text-align: left !important;
}

/* Konec odstavce pod H3 přirazíme nahoru */
.news-item-detail article h3 + p {
  margin-top: 0 !important;
}


/* ==========================================================================
   2. MOBILNÍ TABULKA: ODKAZY V ČERNÉM ZÁHLAVÍ (AISI 1045, T10...)
   ========================================================================== */

/* Na PC: odkaz v prvním sloupci je standardně červený */
.news-item-detail article .article-table th[scope="row"] a {
  color: #9b1c1c !important;
  text-decoration: underline;
}

/* Na mobilu: v černém záhlaví karty MUSÍ být odkaz svítivě bílý */
@media (max-width: 767px) {
  .news-item-detail article .article-table--stack th[scope="row"] a {
    color: #ffffff !important;         /* Přebije černou barvu na bílou */
    text-decoration: underline !important;
  }

  .news-item-detail article .article-table--stack th[scope="row"] a:hover {
    color: #e6bd69 !important;         /* Decentní zlatavý hover */
  }
}
/* Šedý zvýrazněný box s červenou linkou (pro úvodní citáty / shrnutí) */
.news-item-detail article .article-callout--gray {
  background: #f7f7f7 !important;
  border-left: 5px solid #9b1c1c !important;
  color: #1f1f1f !important;
}
/* ==========================================================================
   PRODUKTOVÉ ODKAZOVÉ KARTY (Higonokami apod.)
   ========================================================================== */

/* Základní karta s červeným horním pruhem */
.news-item-detail article .article-card-link {
  flex: 1 1 240px;
  display: flex !important;
  flex-direction: column;
  background: #ffffff;
  border: 1px solid #e0e0e0;
  border-top: 4px solid #9b1c1c !important; /* Červený proužek nahoře */
  border-radius: 10px;
  padding: 20px;
  text-decoration: none !important;
  color: #333333 !important;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
}

.news-item-detail article .article-card-link:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
  text-decoration: none !important;
}

.news-item-detail article .article-card-link__title {
  display: block;
  font-size: 19px;
  font-weight: 700;
  color: #9b1c1c;
  margin-bottom: 8px;
  line-height: 1.3;
}

.news-item-detail article .article-card-link__desc {
  display: block;
  font-size: 14.5px;
  line-height: 1.5;
  color: #444444;
}

/* 3. karta: celočervená hlavní CTA karta */
.news-item-detail article .article-card-link--primary {
  background: linear-gradient(135deg, #8e1717 0%, #ba2828 100%) !important;
  border: 1px solid #8e1717 !important;
  border-top: 1px solid #8e1717 !important;
  box-shadow: 0 4px 12px rgba(142, 23, 23, 0.25);
}

.news-item-detail article .article-card-link--primary .article-card-link__title {
  color: #ffffff !important;
}

.news-item-detail article .article-card-link--primary .article-card-link__desc {
  color: #fceeee !important;
}