/* Trhalka – magazín: výpis článků (Magazín, rubriky, Novinky…) a sekce „Z magazínu“ na úvodní stránce v designu webu
   (zelená karta se zlatým ornamentem jako banner kategorií, nadpisy se zlatými linkami, karty jako produkty). Samostatný soubor. */

/* ---------- záhlaví výpisu: zelená karta se zlatým ornamentem (jako banner kategorií) ---------- */
.type-posts-listing .sectionDescription {
  position: relative; overflow: hidden; margin: 6px 0 0; padding: 46px 56px 44px; border-radius: 24px;
  background: linear-gradient(110deg, #00241d 0%, #003f33 55%, #0a4a37 100%); color: rgba(255, 255, 255, .86);
  box-shadow: 0 24px 44px -30px rgba(0, 63, 51, .55); text-align: left;
}
.type-posts-listing .sectionDescription::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .07;
  background: url("/user/documents/upload/trhalka-ornament.png") left center / auto 130% repeat-x;
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 60%, #000 100%); mask-image: linear-gradient(90deg, transparent 0%, #000 60%, #000 100%);
}
.type-posts-listing .sectionDescription > * { position: relative; }
.type-posts-listing .sectionDescription h1 {
  margin: 0 0 16px !important; padding: 0 !important; color: #fff !important; font-size: 44px !important; line-height: 1.1 !important; font-weight: 700 !important; text-align: left !important;
}
.type-posts-listing .sectionDescription h1::before {
  content: "Trhalka · Magazín"; display: block; margin-bottom: 14px; color: #e0c497; font-size: 13px; font-weight: 600; letter-spacing: .28em; text-transform: uppercase; line-height: 1.2;
}
.type-posts-listing .sectionDescription h1::after { content: ""; display: block; width: 64px; height: 2px; margin-top: 18px; border-radius: 2px; background: #e0c497; }
.type-posts-listing .sectionDescription p { max-width: 820px; margin: 0 0 4px !important; color: #d7e2dd !important; font-size: 16px !important; line-height: 1.75 !important; font-weight: 400 !important; }
.type-posts-listing .sectionDescription a { color: #f0d9ae !important; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgba(240, 217, 174, .6); }
.type-posts-listing .sectionDescription a:hover { color: #fff !important; }
/* rubriky / alkohol jako pilulky se zlatým okrajem */
.type-posts-listing .dp-magazine-filters { display: flex !important; flex-wrap: wrap; gap: 12px; justify-content: flex-start !important; margin: 22px 0 0 !important; }
.type-posts-listing .dp-magazine-selector {
  -webkit-appearance: none; appearance: none; width: auto !important; min-width: 168px; height: 44px !important; margin: 0 !important; padding: 0 44px 0 20px !important;
  border: 1px solid rgba(224, 196, 151, .75) !important; border-radius: 999px !important; cursor: pointer;
  background: #01372c url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%23e0c497' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 18px center !important;
  color: #fff !important; font: 600 13px/1 Montserrat, sans-serif !important; transition: background-color .2s ease, border-color .2s ease;
}
.type-posts-listing .dp-magazine-selector:hover { background-color: #014236 !important; border-color: #e0c497 !important; }
/* po kliknutí / odkliknutí bez světlého pozadí a záře (přebíjí obecný styl polí formulářů) */
.type-posts-listing .dp-magazine-selector:focus, .type-posts-listing .dp-magazine-selector:focus-visible, .type-posts-listing .dp-magazine-selector:active { outline: none !important; box-shadow: none !important; background-color: #01372c !important; border-color: #e0c497 !important; color: #fff !important; }
.type-posts-listing .dp-magazine-selector option { color: #003f33; background: #fff; }
/* rubriky (Novinky, Rum, Recepty…): výběry jsou v odstavci bez obalu → stejné rozestupy jako na Magazínu */
.type-posts-listing .sectionDescription p:has(> .dp-magazine-selector) { display: flex; flex-wrap: wrap; gap: 12px; justify-content: flex-start; margin: 28px 0 0 !important; }

/* ---------- nadpisy sekcí jako na úvodní stránce ---------- */
.type-posts-listing .dp-magazine-h2 {
  display: flex !important; align-items: center; justify-content: center; gap: 22px; margin: 56px 0 30px !important;
  color: #003f33 !important; font-size: 30px !important; font-weight: 700 !important; line-height: 1.2 !important; text-align: center;
}
.type-posts-listing .dp-magazine-h2::before, .type-posts-listing .dp-magazine-h2::after { content: ""; flex: 0 0 56px; height: 2px; background: #e0c497; }

/* ---------- karty článků ---------- */
.type-posts-listing .dp-recent-news, .type-posts-listing .news-wrapper, .dp-hp-news.news-wrapper {
  display: grid !important; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px !important; margin: 0 !important; padding: 0 !important; align-items: stretch;
}
.type-posts-listing .news-wrapper { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px !important; }
.dp-hp-news.news-wrapper { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.type-posts-listing .news-wrapper::before, .type-posts-listing .news-wrapper::after, .dp-hp-news.news-wrapper::before, .dp-hp-news.news-wrapper::after { content: none !important; }
.type-posts-listing .news-item, .dp-hp-news .news-item {
  position: relative; display: flex !important; flex-direction: column !important; width: auto !important; max-width: none !important; height: auto !important; margin: 0 !important; padding: 14px !important; float: none !important;
  border: 1.5px solid #ece2cf !important; border-radius: 18px !important; background: #fff !important; box-shadow: none;
  transition: transform .3s ease, border-color .3s ease, box-shadow .3s ease;
}
.type-posts-listing .news-item:hover, .dp-hp-news .news-item:hover { transform: translateY(-5px); border-color: #e0c497 !important; box-shadow: 0 18px 32px -20px rgba(0, 63, 51, .45); }
.type-posts-listing .news-item .image, .dp-hp-news .news-item .image {
  flex: none !important; width: 100% !important; max-width: none !important; height: auto !important; aspect-ratio: 1 / 1; margin: 0 !important; padding: 0 !important; overflow: hidden; border-radius: 12px; background: #f6f1e7;
}
.type-posts-listing .news-item .image a, .dp-hp-news .news-item .image a { display: block !important; width: 100%; height: 100% !important; }
.type-posts-listing .news-item .image img, .dp-hp-news .news-item .image img {
  display: block; width: 100% !important; height: 100% !important; max-width: none !important; object-fit: cover; transition: transform .5s ease;
}
.type-posts-listing .news-item:hover .image img, .dp-hp-news .news-item:hover .image img { transform: scale(1.04); }
.type-posts-listing .news-item .text, .dp-hp-news .news-item .text {
  display: flex !important; flex: 1 1 auto; flex-direction: column; justify-content: flex-start !important; width: auto !important; max-width: none !important; height: auto !important; margin: 0 !important; padding: 18px 6px 8px !important; text-align: center;
}
.type-posts-listing .news-item .title, .dp-hp-news .news-item .title {
  display: -webkit-box !important; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden; margin: 0 !important; padding: 0 !important;
  color: #003f33 !important; font-size: 16px !important; line-height: 1.4 !important; font-weight: 700 !important; text-align: center !important; text-decoration: none !important; text-transform: none;
}
.type-posts-listing .dp-recent-news .news-item .title { font-size: 20px !important; line-height: 1.35 !important; }
.type-posts-listing .news-item .title:hover, .dp-hp-news .news-item .title:hover { color: #0a5a47 !important; }
/* celá karta klikací (odkaz nadpisu přes celou kartu) */
.type-posts-listing .news-item .title::after, .dp-hp-news .news-item .title::after { content: ""; position: absolute; inset: 0; border-radius: 18px; }
/* bez úryvku textu pod nadpisem */
.type-posts-listing .news-item .description, .dp-hp-news .news-item .description, .type-posts-listing .news-item .text > time, .dp-hp-news .news-item .text > time { display: none !important; }

/* ---------- stránkování ---------- */
.type-posts-listing .listingControls { margin-top: 36px !important; }

/* ---------- úvodní stránka – sekce Z magazínu ---------- */
.dp-news-wrap .dp-hp-news-more { margin-top: 28px; text-align: center; }
.type-index .dp-homepage-news-title { display: flex !important; align-items: center; justify-content: center; gap: 22px; }
.type-index .dp-homepage-news-title::before, .type-index .dp-homepage-news-title::after { content: ""; flex: 0 0 56px; height: 2px; border-radius: 2px; background: #e0c497; }
.dp-news-wrap .dp-hp-news .news-item .title { font-size: 18px !important; }

/* ---------- tablet / telefon ---------- */
@media (max-width: 1199px) {
  .type-posts-listing .news-wrapper { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 991px) {
  .type-posts-listing .dp-recent-news { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .type-posts-listing .dp-recent-news .news-item:nth-child(3) { display: none !important; }
  .type-posts-listing .sectionDescription h1 { font-size: 36px !important; }
}
@media (max-width: 767px) {
  /* telefon: bez karty – nadpis uprostřed, pod ním text a filtry */
  .type-posts-listing .sectionDescription { margin: 10px 0 0; padding: 0; border-radius: 0; background: none; box-shadow: none; text-align: center; }
  .type-posts-listing .sectionDescription::before { content: none; }
  .type-posts-listing .sectionDescription h1 { margin: 0 0 16px !important; color: #003f33 !important; font-size: 30px !important; text-align: center !important; }
  .type-posts-listing .sectionDescription h1::before { content: none; }
  .type-posts-listing .sectionDescription h1::after { margin: 14px auto 0; }
  .type-posts-listing .sectionDescription p { margin: 0 auto 4px !important; color: #4d4d4d !important; font-size: 15px !important; line-height: 1.7 !important; text-align: center !important; }
  .type-posts-listing .sectionDescription a { color: #b89865 !important; text-decoration-color: rgba(184, 152, 101, .45); }
  .type-posts-listing .dp-magazine-filters { justify-content: center !important; margin-top: 20px !important; }
  .type-posts-listing .sectionDescription p:has(> .dp-magazine-selector) { justify-content: center; gap: 10px; margin: 22px 0 0 !important; }
  .type-posts-listing .dp-magazine-selector, .type-posts-listing .dp-magazine-selector:hover, .type-posts-listing .dp-magazine-selector:focus, .type-posts-listing .dp-magazine-selector:focus-visible, .type-posts-listing .dp-magazine-selector:active {
    border-color: #e0c497 !important; color: #003f33 !important;
    background: #faf6ee url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%23b89865' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 18px center !important;
  }
  .type-posts-listing .dp-magazine-filters { gap: 10px; }
  .type-posts-listing .dp-magazine-selector { flex: 1 1 140px; min-width: 0; }
  .type-posts-listing .dp-magazine-h2 { gap: 14px; margin: 36px 0 20px !important; font-size: 22px !important; }
  .type-posts-listing .dp-magazine-h2::before, .type-posts-listing .dp-magazine-h2::after { flex-basis: 32px; }
  .type-posts-listing .dp-recent-news { grid-template-columns: 1fr; gap: 16px !important; }
  .type-posts-listing .dp-recent-news .news-item:nth-child(3) { display: flex !important; }
  .type-posts-listing .news-wrapper { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px !important; }
  /* úvodní stránka na telefonu: 3 články pod sebou, fotka vlevo */
  .dp-hp-news.news-wrapper { grid-template-columns: 1fr; gap: 12px !important; }
  .dp-news-wrap .dp-hp-news .news-item { flex-direction: row !important; align-items: center; gap: 14px; }
  .dp-news-wrap .dp-hp-news .news-item .image { width: 104px !important; flex: 0 0 104px !important; }
  .dp-news-wrap .dp-hp-news .news-item .text { padding: 0 4px 0 0 !important; text-align: left; }
  .dp-news-wrap .dp-hp-news .news-item .title { font-size: 15px !important; text-align: left !important; }
  .type-index .dp-homepage-news-title::before, .type-index .dp-homepage-news-title::after { flex-basis: 28px; }
  .type-index .dp-homepage-news-title { gap: 14px; }
  .type-posts-listing .news-item, .dp-hp-news .news-item { padding: 10px !important; border-radius: 16px !important; }
  .type-posts-listing .news-item .text, .dp-hp-news .news-item .text { padding: 12px 2px 4px !important; }
  .type-posts-listing .news-item .title, .dp-hp-news .news-item .title { font-size: 14px !important; -webkit-line-clamp: 4; }
  .type-posts-listing .dp-recent-news .news-item .title { font-size: 18px !important; }
}
@media (prefers-reduced-motion: reduce) {
  .type-posts-listing .news-item, .dp-hp-news .news-item, .type-posts-listing .news-item .image img, .dp-hp-news .news-item .image img { transition: none; }
  .type-posts-listing .news-item:hover, .dp-hp-news .news-item:hover { transform: none; }
}

/* ---------- prázdná rubrika („Záznamy nebyly nalezeny…“, např. Víno) jako karta v designu webu ---------- */
.type-posts-listing .sectionDescription + p:last-child {
  max-width: 620px; margin: 48px auto 64px !important; padding: 112px 36px 40px !important; border: 1.5px solid #ece2cf; border-radius: 18px; text-align: center;
  font-size: 0 !important; line-height: 0 !important; color: transparent !important;
  background: #faf6ee url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='64' height='64' viewBox='0 0 64 64'%3E%3Ccircle cx='32' cy='32' r='31' fill='%23fff' stroke='%23e0c497' stroke-width='1.5'/%3E%3Cpath d='M24 18h11l6 6v22H24z M35 18v6h6 M28 31h9 M28 36h9 M28 41h6' fill='none' stroke='%23b89865' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat center 36px / 64px 64px;
}
.type-posts-listing .sectionDescription + p:last-child::before {
  content: "Zatím tu nejsou žádné články"; display: block; margin-bottom: 10px; color: #003f33; font: 700 22px/1.3 Montserrat, sans-serif;
}
.type-posts-listing .sectionDescription + p:last-child::after {
  content: "Na článcích pro tuto rubriku pracujeme. Mezitím si vyberte jinou rubriku nebo druh alkoholu výše, případně zamiřte do celého magazínu."; display: block; color: #4d4d4d; font: 400 15px/1.7 Montserrat, sans-serif;
}
@media (max-width: 767px) {
  .type-posts-listing .sectionDescription + p:last-child { margin: 32px 0 44px !important; padding: 100px 22px 30px !important; background-position: center 26px; }
  .type-posts-listing .sectionDescription + p:last-child::before { font-size: 19px; }
  .type-posts-listing .sectionDescription + p:last-child::after { font-size: 14px; }
}
