/* ============================================================
   HOMEPAGE – sekce "Rady a typy" (poslední 3 články)
   Vše pro lov (Shoptet)
   ============================================================ */

.hp-articles {
  margin: 30px auto 40px;
}

/* Když je sekce uvnitř #hp-clanky divu, nepřidáváme další šířkové omezení */
#hp-clanky .hp-articles {
  max-width: none;
  padding-left: 0;
  padding-right: 0;
}

/* Hlavička sekce */
.hp-articles-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}

.hp-articles-head h2 {
  margin: 0;
  font-size: 1.6em;
  color: #1a1a1a;
}

.hp-articles-all {
  color: #2e6b2e;
  text-decoration: none;
  font-weight: bold;
  font-size: .95em;
  white-space: nowrap;
}

.hp-articles-all:hover {
  color: #1a4a1a;
  text-decoration: underline;
}

/* Mřížka 3 karet */
.hp-articles-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  align-items: stretch;
}

/* Karta */
.hp-article-card {
  display: flex;
  flex-direction: column;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
  transition: box-shadow .2s ease, transform .2s ease;
}

.hp-article-card:hover {
  box-shadow: 0 6px 20px rgba(0,0,0,.10);
  transform: translateY(-3px);
}

/* Obrázek 16:9 */
.hp-article-img {
  display: block;
  overflow: hidden;
}

.hp-article-img img {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  display: block;
}

/* Placeholder pro články bez náhledovky */
.hp-article-img--placeholder {
  aspect-ratio: 16 / 9;
  background: #f4f9f4 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='48' viewBox='0 0 24 24' fill='none' stroke='%232e6b2e' stroke-width='1.5'%3E%3Crect x='3' y='3' width='18' height='18' rx='2'/%3E%3Ccircle cx='8.5' cy='8.5' r='1.5'/%3E%3Cpath d='M21 15l-5-5L5 21'/%3E%3C/svg%3E") center/48px no-repeat;
  border-bottom: 1px solid #e0e0e0;
}

/* Tělo karty */
.hp-article-body {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  padding: 18px 20px 22px;
}

.hp-article-title {
  margin: 4px 0 8px;
  font-size: 1.05em;
  line-height: 1.35;
  /* rezervuje místo na 2 řádky, aby karty s 1řádkovým nadpisem
     nebyly nižší a tlačítka zůstala zarovnaná */
  min-height: 2.7em;
}

.hp-article-title a {
  color: #1a1a1a;
  text-decoration: none;
}

.hp-article-title a:hover {
  color: #2e6b2e;
}

.hp-article-date {
  font-size: .85em;
  color: #888;
  margin-bottom: 10px;
}

.hp-article-perex {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin: 0;
  font-size: .9em;
  line-height: 1.55;
  color: #555;
}

.hp-article-more {
  display: inline-block;
  align-self: flex-start;
  margin: 20px 0 0;
  padding: 11px 24px;
  background: #2e6b2e;
  color: #fff;
  border-radius: 5px;
  font-size: .9em;
  font-weight: bold;
  text-decoration: none;
  transition: background .2s ease;
}

.hp-article-more:hover {
  background: #1a4a1a;
  color: #fff;
}

/* Responzivita */
@media (max-width: 1100px) {
  .hp-articles-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 700px) {
  .hp-articles-grid {
    grid-template-columns: 1fr;
  }
}
