/* ── FEATURED / NEWS GRID — Magazine style ── */

/* ── HERO & PROMO GRIDS ── */

#promo {
  margin-bottom: 48px;
}
.promo-wrapper {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.promo-i {
  background: var(--c-text);
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: none;
  transition:
    transform var(--transition),
    box-shadow var(--transition);
  position: relative;
  display: flex;
  flex-direction: column;
  width: auto;
  float: none;
  height: auto;
  padding: 0;
  margin: 0;
  min-height: 280px;
}
.promo-i:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}
/* First card = featured large */
.promo-i:first-child {
  grid-column: 1 / -1;
  min-height: 420px;
  display: flex;
  width: auto;
}
/* Image fills entire card */
.promo-i .img-wrapper {
  position: absolute;
  inset: 0;
  overflow: hidden;
  line-height: 0;
  height: auto;
  width: auto;
  float: none;
}
.promo-i .img-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}
.promo-i:hover .img-wrapper img {
  transform: scale(1.04);
}
.promo-i:first-child .img-wrapper {
  order: initial;
}
/* Gradient overlay on image — works as <a> or <div> */
a.news-descr,
a.news-descr:hover {
  color: inherit;
  text-decoration: none;
}
.promo-i .news-descr {
  position: relative;
  z-index: 2;
  margin-top: auto;
  padding: 24px;
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.85) 0%,
    rgba(0, 0, 0, 0.4) 60%,
    transparent 100%
  );
  display: flex;
  flex-direction: column;
  flex: none;
  width: auto;
}
.promo-i:first-child .news-descr {
  padding: 40px 36px 36px;
  order: initial;
  justify-content: flex-end;
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.9) 0%,
    rgba(0, 0, 0, 0.45) 50%,
    transparent 100%
  );
}
/* Title — white on dark overlay */
.promo-i h4 {
  font-size: 1rem;
  font-weight: 600;
  color: #fff;
  line-height: 1.4;
  margin: 0;
  text-transform: none;
  max-height: none;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
}
.promo-i h4 a {
  color: #fff;
}
.promo-i h4 a:hover {
  color: rgba(255, 255, 255, 0.8);
}
.promo-i:first-child h4 {
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  -webkit-line-clamp: unset;
  line-clamp: unset;
}
/* Date/meta — subtle on overlay */
.promo-date {
  font-size: 0.75rem;
  line-height: 1.5;
  padding: 8px 0 0;
  color: rgba(255, 255, 255, 0.5);
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.promo-date span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.promo-date i {
  font-size: 0.65rem;
  color: rgba(255, 255, 255, 0.4);
}
/* Message — hidden on small cards, visible on featured */
.promo-message {
  font-size: 0.85rem;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.6);
  max-height: 0;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  padding: 0;
  margin: 0;
  transition: max-height 0.3s;
}
.promo-i:first-child .promo-message {
  max-height: 80px;
  padding-top: 10px;
  -webkit-line-clamp: 3;
  line-clamp: 3;
}
/* Read more link */
.link-holder {
  margin-top: 0;
  padding: 0;
  position: static;
  background: none;
  width: auto;
  display: none;
}
.promo-i:first-child .link-holder {
  display: block;
  width: auto;
  position: static;
  padding-top: 16px;
}
.link-holder a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  font-weight: 500;
  color: #fff;
  padding: 8px 20px;
  background: var(--c-accent);
  border-radius: 100px;
  transition: all var(--transition);
}
.link-holder a::after {
  content: "\2192";
  transition: transform var(--transition);
}
.link-holder a:hover {
  background: var(--c-accent-hover);
}
.link-holder a:hover::after {
  transform: translateX(4px);
}

/* ── ENTRY BLOCK (Article card in list) ── */
.eBlock {
  margin: 0 0 24px;
  padding: 24px;
  border-spacing: 0;
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-lg);
  transition: box-shadow var(--transition);
}
.eBlock:hover {
  box-shadow: var(--shadow-md);
}
.eBlock + table {
  margin: 0;
  padding: 20px;
  border-spacing: 0;
  background: var(--c-surface);
}
.eBlock + table td[width="60%"],
.eTitle a {
  font-size: 1.25rem;
  padding: 0 0 16px;
  color: var(--c-text);
}
.eBlock td {
  padding: 5px 0 !important;
}
.eBlock .eTitle,
.eBlock td.eTitle,
.eTitle {
  font-family: var(--font-heading);
  padding: 0 0 16px !important;
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--c-text);
  text-align: left !important;
}
.module-tests .eTitle {
  border-bottom: 0;
  margin-bottom: 0 !important;
}
.module-tests .eMessage {
  padding-bottom: 20px !important;
  border-bottom: 1px solid var(--c-border);
}
.module-tests #testBlockD .eMessage,
.popupbody hr {
  border-bottom: 0;
}
.eTitle a {
  padding: 0 0 16px !important;
  margin: 0 !important;
  font-size: 1.4rem;
  transition: color var(--transition);
}
.eTitle a:hover {
  color: var(--c-accent);
  text-decoration: none;
}
.eBlock td.eDetails,
.eBlock td.eDetails1,
.eBlock td.eDetails2,
.eDetails,
.eDetails1,
.eDetails2 {
  clear: both;
  font-size: 0.8rem;
  padding: 16px 0 !important;
  border-top: 1px solid var(--c-border);
  color: var(--c-text-muted);
}
/* Hide text labels in entry details, show only values */
.ed-label {
  display: none;
}
.ed-value {
  color: var(--c-text-secondary);
}
.e-add,
.e-author,
.e-date,
.e-loads,
.e-rating,
.e-reads,
.e-tags {
  padding: 0 8px 0 0;
  font-size: 0;
}
.e-add .ed-value,
.e-author .ed-value,
.e-date .ed-value,
.e-loads .ed-value,
.e-rating .ed-value,
.e-reads .ed-value,
.e-tags .ed-value {
  font-size: 0.8rem;
}
.e-add::after,
.e-author::after,
.e-date::after,
.e-loads::after,
.e-rating::after,
.e-reads::after,
.e-tags::after {
  content: "\00B7";
  padding: 0 0 0 8px;
  color: var(--c-text-muted);
  font-size: 0.8rem;
}
.e-category + span + span::before {
  content: "\00B7";
  padding: 0 8px;
}
.ed-sep {
  display: none;
}
/* Article meta: compact icon row */
.article-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  font-size: 0.8rem;
  color: var(--c-text-muted);
  padding: 8px 0 16px;
  border-bottom: 1px solid var(--c-border);
}
.article-meta-item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.article-meta-item svg {
  flex-shrink: 0;
}
.sidebox .answer {
  font-size: 0.85rem;
}
#message.wysibb-texarea {
  border-color: transparent !important;
}
.pollAns,
.pollLnk a,
.pollQue,
.pollTot {
  font-size: 0.85rem !important;
}
.eBlock td.eMessage,
.eBlock td.eText,
.eMessage,
.eText {
  word-break: break-word;
  line-height: 1.7;
  color: var(--c-text-secondary);
}
.eMessage img,
.eText img {
  display: block;
  max-width: 100%;
  margin: 12px 0 !important;
  border-radius: var(--radius-sm);
}
.eMessage p,
.eText p {
  margin: 0;
  padding: 0 0 8px;
}
#shop-basket ul li a::before,
.entryReadAll {
  display: none;
}

/* ── RESPONSIVE GRIDS (Articles & Homepage) ── */
@media (max-width: 1100px) {
  .recommend-grid {
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: auto;
  }
  .rec-card:nth-child(1),
  .rec-card:nth-child(2),
  .rec-card:nth-child(3) {
    grid-row: auto;
    min-height: 260px;
  }
  .rec-card:nth-child(n + 4) {
    grid-column: auto;
    background: var(--c-text);
    border: 0;
    min-height: 180px;
    position: relative;
  }
  .rec-card:nth-child(n + 4) .rec-link {
    display: block;
    height: 100%;
  }
  .rec-card:nth-child(n + 4) img {
    width: 100%;
    height: 100%;
    position: absolute;
    inset: 0;
    border-radius: 0;
  }
  .rec-card:nth-child(n + 4) .rec-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 14px;
    background: linear-gradient(
      to top,
      rgba(0, 0, 0, 0.8) 0%,
      transparent 100%
    );
  }
  .rec-card:nth-child(n + 4) h4 {
    color: #fff;
  }
  .rec-card:nth-child(n + 4) .rec-date {
    color: rgba(255, 255, 255, 0.5);
  }
}
@media (max-width: 959px) {
  .recommend-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .rec-card:nth-child(1),
  .rec-card:nth-child(2),
  .rec-card:nth-child(3) {
    min-height: 220px;
  }
  .hp-engage {
    grid-template-columns: 1fr;
  }
  .blog-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .related-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }
  .profile-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .profile-head {
    padding: 20px;
  }
  .profile-section {
    padding: 16px 20px;
  }
  .profile-buttons.profile-labels {
    padding: 0 20px 16px;
  }
  .profile-row {
    flex-direction: column;
    gap: 2px;
  }
  .profile-row-name {
    width: auto;
    text-align: left;
    font-weight: 600;
  }
}
@media (max-width: 640px) {
  .recommend-grid {
    grid-template-columns: 1fr 1fr;
  }
  .blog-grid {
    grid-template-columns: 1fr;
  }
  .blog-grid .blog-card {
    flex-direction: row;
    gap: 0;
  }
  .blog-grid .blog-card-img {
    width: 100px;
    height: 80px;
    border-radius: var(--radius-md) 0 0 var(--radius-md);
  }
  .blog-grid .blog-card-body {
    padding: 10px 12px;
  }
  .profile-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 480px) {
  .recommend-grid {
    grid-template-columns: 1fr;
  }
  .rec-card:nth-child(1),
  .rec-card:nth-child(2),
  .rec-card:nth-child(3) {
    min-height: 200px;
  }
  .related-grid {
    grid-template-columns: 1fr !important;
  }
  a.related-card .related-cover {
    height: 160px !important;
  }
  .profile-head {
    flex-direction: column;
    text-align: center;
    gap: 12px;
  }
}
