/* ============================================================
   Homepage-specific styles (module 03 - 05)
   Loaded only on front-page.php
   ============================================================ */

/* ------------------------------------------------------------
   Module 03 — Hero (magazine grid: 1 big + stacked right)
   ------------------------------------------------------------ */
[class~="3d13c2-hero"] {
  padding-top: 44px;
  padding-bottom: 44px;
}

[class~="3d13c2-hero__grid"] {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 32px;
}

[class~="3d13c2-hero__main"] {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--bg-deep);
  min-height: 420px;
  display: flex;
}

[class~="3d13c2-hero__main"] img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

[class~="3d13c2-hero__main-overlay"] {
  position: relative;
  margin-top: auto;
  width: 100%;
  padding: 26px;
  background: linear-gradient(to top, rgba(13, 17, 17, 0.96), rgba(13, 17, 17, 0.4) 70%, transparent);
  z-index: 2;
}

[class~="3d13c2-hero__title"] {
  font-size: 2.1rem;
  line-height: 1.14;
  margin-bottom: 0.4em;
}

[class~="3d13c2-hero__main"] [class~="3d13c2-hero__title"] a {
  color: #fff;
}

[class~="3d13c2-hero__main"] [class~="3d13c2-hero__title"] a:hover {
  color: var(--accent);
}

[class~="3d13c2-hero__excerpt"] {
  color: #cfd6d8;
  font-size: 0.95rem;
  margin-bottom: 0;
  max-width: 58ch;
}

[class~="3d13c2-hero__side"] {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

[class~="3d13c2-hero__item"] {
  flex: 1;
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--border);
  padding: 8px 0;
}

[class~="3d13c2-hero__item:last-child"] {
  border-bottom: 0;
}

[class~="3d13c2-hero__item-title"] {
  font-size: 1.2rem;
  line-height: 1.3;
  margin: 0;
}

[class~="3d13c2-hero__item-title"] a {
  background-image: linear-gradient(var(--accent), var(--accent));
  background-repeat: no-repeat;
  background-position: 0 100%;
  background-size: 0 2px;
  transition: background-size 0.3s ease, color 0.2s ease;
}

[class~="3d13c2-hero__item-title"] a:hover {
  background-size: 100% 2px;
  color: var(--text);
}

/* ------------------------------------------------------------
   Module 04 — Editor's Choice (text-only, large title + underline)
   ------------------------------------------------------------ */
[class~="3d13c2-editors"] {
  background: var(--bg-deep);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

[class~="3d13c2-editors__list"] {
  list-style: none;
  margin: 0;
  padding: 0;
}

[class~="3d13c2-editors__item"] {
  display: flex;
  align-items: baseline;
  gap: 26px;
  padding: 24px 0;
  border-bottom: 1px solid var(--border);
}

[class~="3d13c2-editors__item"]:last-child {
  border-bottom: 0;
}

[class~="3d13c2-editors__num"] {
  font-family: var(--font-head);
  font-size: 2.3rem;
  font-weight: 600;
  color: var(--accent);
  line-height: 1;
  flex: none;
  min-width: 46px;
}

[class~="3d13c2-editors__title"] {
  font-size: 1.7rem;
  margin: 0;
}

[class~="3d13c2-editors__title"] a {
  background-image: linear-gradient(var(--accent), var(--accent));
  background-repeat: no-repeat;
  background-position: 0 100%;
  background-size: 0 2px;
  transition: background-size 0.3s ease, color 0.2s ease;
}

[class~="3d13c2-editors__title"] a:hover {
  background-size: 100% 2px;
  color: var(--text);
}

/* ------------------------------------------------------------
   Module 05 — Main feed (70/30: single-column list + sidebar)
   ------------------------------------------------------------ */
[class~="3d13c2-feed__grid"] {
  display: grid;
  grid-template-columns: 1.9fr 1fr;
  gap: 40px;
  align-items: start;
}

/* Sidebar — author mini card */
[class~="3d13c2-sidecard"] {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

[class~="3d13c2-sidecard__avatar"] {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid var(--accent);
  margin-bottom: 14px;
}

[class~="3d13c2-sidecard__avatar"] img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

[class~="3d13c2-sidecard__name"] {
  font-family: var(--font-head);
  font-size: 1.15rem;
  margin-bottom: 0.2em;
}

[class~="3d13c2-sidecard__bio"] {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-bottom: 0;
}

/* Sidebar — numbered trending list */
[class~="3d13c2-trending"] {
  list-style: none;
  margin: 0;
  padding: 0;
}

[class~="3d13c2-trending"] li {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

[class~="3d13c2-trending__num"] {
  font-family: var(--font-head);
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--accent);
  line-height: 1;
  flex: none;
  min-width: 24px;
}

[class~="3d13c2-trending__link"] {
  font-size: 0.9rem !important;
}

/* Sidebar — tag cloud */
[class~="3d13c2-tagcloud"] {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

[class~="3d13c2-tagcloud"] a {
  display: inline-block;
  padding: 5px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.78rem !important;
}

[class~="3d13c2-tagcloud"] a:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* Sidebar — newsletter form */
[class~="3d13c2-subscribe-form"] {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

[class~="3d13c2-subscribe-form"] input[type="email"] {
  background: var(--bg-deep);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.9rem;
  width: 100%;
}

[class~="3d13c2-subscribe-form"] input[type="email"]::placeholder {
  color: var(--text-muted);
}

[class~="3d13c2-subscribe-form"] input[type="email"]:focus {
  outline: none;
  border-color: var(--accent);
}

/* ------------------------------------------------------------
   Responsive
   ------------------------------------------------------------ */
@media (max-width: 960px) {
  [class~="3d13c2-hero__grid"] {
    grid-template-columns: 1fr;
  }

  [class~="3d13c2-hero__main"] {
    min-height: 300px;
  }

  [class~="3d13c2-hero__title"] {
    font-size: 1.7rem;
  }

  [class~="3d13c2-feed__grid"] {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  [class~="3d13c2-editors__item"] {
    gap: 18px;
  }

  [class~="3d13c2-editors__num"] {
    font-size: 1.7rem;
    min-width: 32px;
  }

  [class~="3d13c2-editors__title"] {
    font-size: 1.3rem;
  }
}
