/* =========================================================
   API YAMU — BLOG / STORIES
   File: apiyamu-blog.css
   Purpose: magazine-style article grid for Shoptet Tango
   ========================================================= */

/* Main article listing */
.news-wrapper {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 32px;
  row-gap: 72px;
  margin-top: 36px;
}

/* Individual article card */
.news-wrapper .news-item {
  display: flex !important;
  flex-direction: column;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  min-width: 0;
  text-align: center;
}

/* Reset legacy floats / clearfix behavior */
.news-wrapper .news-item::before,
.news-wrapper .news-item::after {
  display: none !important;
  content: none !important;
}

/* Article image wrapper */
.news-wrapper .news-item .image,
.news-wrapper .news-item .news-item-image {
  float: none !important;
  width: 100% !important;
  max-width: none !important;
  margin: 0 0 22px !important;
  padding: 0 !important;
  overflow: hidden;
  aspect-ratio: 4 / 3;
}

/* Article image */
.news-wrapper .news-item .image img,
.news-wrapper .news-item .news-item-image img {
  display: block;
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  object-fit: cover;
  object-position: center;
  padding: 0 !important;
  margin: 0 !important;
  border: 0 !important;
  transition: transform 0.35s ease;
}

/* Subtle hover */
.news-wrapper .news-item:hover .image img,
.news-wrapper .news-item:hover .news-item-image img {
  transform: scale(1.02);
}

/* Text area */
.news-wrapper .news-item .text,
.news-wrapper .news-item .news-item-text {
  width: 100% !important;
  padding: 0 18px !important;
  margin: 0 !important;
  text-align: center !important;
}

/* Hide excerpt / description */
.news-wrapper .news-item .description,
.news-wrapper .news-item .news-item-desc,
.news-wrapper .news-item .text > p:not(.news-item-date),
.news-wrapper .news-item .news-item-text > p:not(.news-item-date) {
  display: none !important;
}

/* Article title */
.news-wrapper .news-item .title,
.news-wrapper .news-item .news-item-header,
.news-wrapper .news-item h2,
.news-wrapper .news-item h3 {
  margin: 0 !important;
  padding: 0 !important;
  font-size: 21px !important;
  line-height: 1.3 !important;
  font-weight: 600 !important;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-align: center;
  color: #111 !important;
}

/* Title link */
.news-wrapper .news-item .title a,
.news-wrapper .news-item .news-item-header a,
.news-wrapper .news-item h2 a,
.news-wrapper .news-item h3 a {
  color: #111 !important;
  text-decoration: none !important;
}

/* Hide date */
.news-wrapper .news-item .date,
.news-wrapper .news-item .news-item-date,
.news-wrapper .news-item time {
  display: none !important;
}

/* If title/date are inside text container, keep title before date */
.news-wrapper .news-item .text,
.news-wrapper .news-item .news-item-text {
  display: flex;
  flex-direction: column;
}

/* Remove "Výpis článků" heading to keep magazine feel */
.news-wrapper + .pagination-wrapper,
.news-wrapper ~ .pagination-wrapper {
  margin-top: 70px;
}

/* Wider content area on blog listing, while respecting theme container */
@media (min-width: 992px) {
  .news-wrapper {
    width: 100%;
  }
}

/* Tablet */
@media (max-width: 991px) {
  .news-wrapper {
    column-gap: 24px;
    row-gap: 56px;
  }

  .news-wrapper .news-item .title,
  .news-wrapper .news-item .news-item-header,
  .news-wrapper .news-item h2,
  .news-wrapper .news-item h3 {
    font-size: 19px !important;
  }
}

/* Mobile: one card per row */
@media (max-width: 767px) {
  .news-wrapper {
    grid-template-columns: 1fr;
    row-gap: 48px;
    margin-top: 28px;
  }

  .news-wrapper .news-item .image,
  .news-wrapper .news-item .news-item-image {
    margin-bottom: 18px !important;
  }

  .news-wrapper .news-item .text,
  .news-wrapper .news-item .news-item-text {
    padding: 0 8px !important;
  }

  .news-wrapper .news-item .title,
  .news-wrapper .news-item .news-item-header,
  .news-wrapper .news-item h2,
  .news-wrapper .news-item h3 {
    font-size: 18px !important;
    line-height: 1.3 !important;
  }

}


/* =========================================================
   ARTICLE DETAIL — API YAMU STORIES
   ========================================================= */

/* Hide breadcrumb on article detail */
.type-post .breadcrumbs,
.type-article .breadcrumbs,
.article-detail .breadcrumbs,
.news-detail .breadcrumbs,
.news-detail .navigation-breadcrumb,
.news-item-detail .breadcrumbs {
  display: none !important;
}

/* Center main article title */
.type-post h1,
.type-article h1,
.article-detail h1,
.news-detail h1,
.news-item-detail h1 {
  text-align: center !important;
  font-weight: 600 !important;
  font-size: clamp(30px, 3vw, 46px) !important;
  line-height: 1.15 !important;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  margin: 18px auto 28px !important;
  max-width: 1100px;
}

/* Hide publication date */
.type-post .date,
.type-post time,
.type-article .date,
.type-article time,
.article-detail .date,
.article-detail time,
.news-detail .date,
.news-detail time,
.news-item-detail .date,
.news-item-detail time,
.news-detail .news-item-date,
.news-item-detail .news-item-date {
  display: none !important;
}

/* Article text stays readable and left aligned */
.type-post .content-inner,
.type-article .content-inner,
.article-detail .content-inner,
.news-detail .content-inner,
.news-item-detail .content-inner,
.type-post .article-content,
.type-article .article-content,
.article-detail .article-content,
.news-detail .article-content,
.news-item-detail .article-content {
  text-align: left;
}

/* Subheadings inside article */
.type-post .content-inner h2,
.type-post .content-inner h3,
.type-article .content-inner h2,
.type-article .content-inner h3,
.article-detail .content-inner h2,
.article-detail .content-inner h3,
.news-detail .content-inner h2,
.news-detail .content-inner h3,
.news-item-detail .content-inner h2,
.news-item-detail .content-inner h3,
.type-post .article-content h2,
.type-post .article-content h3,
.type-article .article-content h2,
.type-article .article-content h3,
.article-detail .article-content h2,
.article-detail .article-content h3,
.news-detail .article-content h2,
.news-detail .article-content h3,
.news-item-detail .article-content h2,
.news-item-detail .article-content h3 {
  text-align: center !important;
  font-weight: 700 !important;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  line-height: 1.25 !important;
  margin: 54px auto 24px !important;
}

/* Keep body paragraphs left aligned */
.type-post .content-inner p,
.type-article .content-inner p,
.article-detail .content-inner p,
.news-detail .content-inner p,
.news-item-detail .content-inner p,
.type-post .article-content p,
.type-article .article-content p,
.article-detail .article-content p,
.news-detail .article-content p,
.news-item-detail .article-content p {
  text-align: left !important;
}

/* Keep large article images full width of article content */
.type-post .content-inner img,
.type-article .content-inner img,
.article-detail .content-inner img,
.news-detail .content-inner img,
.news-item-detail .content-inner img,
.type-post .article-content img,
.type-article .article-content img,
.article-detail .article-content img,
.news-detail .article-content img,
.news-item-detail .article-content img {
  max-width: 100% !important;
  height: auto !important;
}

/* Mobile article detail */
@media (max-width: 767px) {
  .type-post h1,
  .type-article h1,
  .article-detail h1,
  .news-detail h1,
  .news-item-detail h1 {
    font-size: 28px !important;
    line-height: 1.2 !important;
    margin-bottom: 22px !important;
  }

  .type-post .content-inner h2,
  .type-post .content-inner h3,
  .type-article .content-inner h2,
  .type-article .content-inner h3,
  .article-detail .content-inner h2,
  .article-detail .content-inner h3,
  .news-detail .content-inner h2,
  .news-detail .content-inner h3,
  .news-item-detail .content-inner h2,
  .news-item-detail .content-inner h3,
  .type-post .article-content h2,
  .type-post .article-content h3,
  .type-article .article-content h2,
  .type-article .article-content h3,
  .article-detail .article-content h2,
  .article-detail .article-content h3,
  .news-detail .article-content h2,
  .news-detail .article-content h3,
  .news-item-detail .article-content h2,
  .news-item-detail .article-content h3 {
    margin-top: 40px !important;
    margin-bottom: 18px !important;
  }
}
