/* Alternativa24 — CBC-style card homepage (overrides a24-cryptonews-red home v2) */

.home-main {
  padding-top: 22px;
}

/* Top block: lead + latest → one card grid */
.home-top {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
  align-items: stretch;
  margin-bottom: 8px;
}

.lead-story {
  display: flex;
  flex-direction: column;
  grid-column: span 2;
  gap: 0;
  border: 1px solid var(--line);
  padding: 0;
  background: #fff;
  border-bottom: 1px solid var(--line);
}

.lead-story.no-thumb .lead-body {
  padding: 18px;
}

.lead-img {
  aspect-ratio: 16 / 10;
  order: -1;
}

.lead-body {
  padding: 16px 18px 18px;
}

.lead-body h1 {
  font-size: 22px;
  line-height: 1.2;
  margin: 0 0 10px;
  letter-spacing: -0.02em;
}

.lead-body p {
  font-size: 14px;
  line-height: 1.45;
  margin: 0 0 12px;
  max-width: none;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.lead-body .meta {
  margin-top: auto;
  font-size: 12px;
}

/* Sidebar headlines as compact cards in the grid */
.latest-panel {
  border: 0;
  padding: 0;
  display: contents;
}

.latest-panel h2 {
  grid-column: 1 / -1;
  margin: 4px 0 2px;
  font-size: 20px;
}

.latest-row {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  border: 1px solid var(--line);
  padding: 14px 16px;
  background: #fff;
  min-height: 100%;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.latest-row:hover {
  border-color: #d1d5db;
  box-shadow: 0 2px 8px rgba(17, 24, 39, 0.06);
}

.latest-row strong {
  font-size: 15px;
  line-height: 1.25;
  font-weight: 800;
}

.latest-row span {
  margin-top: auto;
  padding-top: 10px;
}

/* Main stream → vertical cards */
.home-sections {
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 24px;
}

.stream .section-title {
  margin-bottom: 16px;
}

.stream {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
}

.stream .section-title {
  grid-column: 1 / -1;
}

.stream-item {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 0;
  border: 1px solid var(--line);
  background: #fff;
  border-top: 1px solid var(--line);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.stream-item:hover {
  border-color: #d1d5db;
  box-shadow: 0 2px 10px rgba(17, 24, 39, 0.07);
}

.stream-item > div {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 14px 16px 16px;
}

.stream-img {
  order: -1;
  aspect-ratio: 16 / 10;
  width: 100%;
}

.stream-item h3 {
  font-size: 17px;
  line-height: 1.22;
  margin: 0 0 8px;
  letter-spacing: -0.02em;
}

.stream-item h3 a:hover {
  color: var(--red);
}

.stream-item p {
  font-size: 13px;
  line-height: 1.4;
  margin: 0 0 10px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.stream-item .cat {
  margin-bottom: 8px;
}

.stream-item .meta {
  margin-top: auto;
  font-size: 12px;
}

.stream-item.no-thumb > div {
  padding-top: 18px;
}

.home-rail {
  padding-left: 20px;
}

@media (max-width: 1100px) {
  .home-top,
  .stream {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 820px) {
  .home-top,
  .stream {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .home-sections {
    grid-template-columns: 1fr;
  }

  .home-rail {
    border-left: 0;
    padding-left: 0;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
  }

  .rail-box {
    margin-bottom: 0;
  }
}

@media (max-width: 560px) {
  .home-top,
  .stream {
    grid-template-columns: 1fr;
  }

  .lead-body h1 {
    font-size: 20px;
  }

  .home-rail {
    grid-template-columns: 1fr;
  }
}
