/* =====================================================
   SUPERTREE MEDIA — /media/ archive
   Self-contained: `stmd-` prefix + own custom properties
   (mirrors the events plugin tokens so the pages match;
   never collides with or relies on a theme :root).
===================================================== */

:root {
  --stmd-bg-primary: #f6f5f8;
  --stmd-bg-alt: #eeedf1;
  --stmd-bg-dark: #1a1a2e;
  --stmd-text-heading: #1a1a2e;
  --stmd-text-body: #4a4a5a;
  --stmd-purple: #a78bfa;
  --stmd-purple-hover: #8b5cf6;
  --stmd-purple-light: #ede9fe;
  --stmd-card-radius: 20px;
  --stmd-card-shadow: 0 2px 16px rgba(0, 0, 0, 0.05);
  --stmd-max-width: 1200px;
  --stmd-hero-gradient: linear-gradient(160deg, #8b5cf6 0%, #9b6ffb 40%, #a07dfb 60%, #8b5cf6 100%);
}

.stmd-container {
  max-width: var(--stmd-max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* =============================================
   HERO — compact, purple gradient, watermark
============================================= */
.stmd-hero {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  background: var(--stmd-hero-gradient);
  color: #fff;
}

.stmd-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: radial-gradient(ellipse at 30% 0%, rgba(255, 255, 255, 0.14) 0%, transparent 55%);
  pointer-events: none;
}

.stmd-hero__logo {
  position: absolute;
  right: -7%;
  top: 50%;
  z-index: 1;
  width: auto;
  height: 92%;
  object-fit: contain;
  object-position: center;
  opacity: 0.035;
  filter: brightness(0) invert(1);
  pointer-events: none;
  transform: translateY(-50%);
}

.stmd-hero__inner {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: var(--stmd-max-width);
  margin: 0 auto;
  padding: 80px 80px 70px;
}

.stmd-hero__eyebrow {
  display: inline-block;
  margin: 0 0 24px;
  padding: 8px 18px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10rem;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.7);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 2px;
  line-height: 1.45;
  text-transform: uppercase;
}

.stmd-hero h1 {
  max-width: 22.5ch;
  margin: 0 0 22px;
  color: #fff;
  font-size: 56px;
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: -0.5px;
  text-wrap: balance;
}

.stmd-hero__sub {
  max-width: 50ch;
  margin: 0;
  color: rgba(255, 255, 255, 0.72);
  font-size: 18px;
  line-height: 1.75;
  text-wrap: pretty;
}

/* =============================================
   LISTING — card grid
============================================= */
.stmd-archive__listing {
  background: var(--stmd-bg-primary);
  padding: clamp(64px, 8vw, 110px) 0;
}

.stmd-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.stmd-card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: var(--stmd-card-radius);
  overflow: hidden;
  box-shadow: var(--stmd-card-shadow);
  border: 1px solid rgba(0, 0, 0, 0.04);
  text-decoration: none;
  color: inherit;
  transition: transform 0.3s ease;
}
.stmd-card:hover { transform: translateY(-4px); }

.stmd-card__img { display: block; height: 200px; overflow: hidden; background: var(--stmd-bg-alt); }
.stmd-card__img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }
.stmd-card:hover .stmd-card__img img { transform: scale(1.04); }

.stmd-card__ph { width: 100%; height: 100%; background: linear-gradient(135deg, var(--stmd-purple-light) 0%, var(--stmd-purple) 160%); }

.stmd-card__body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 28px 24px;
}

.stmd-card__tag {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--stmd-purple);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 10px;
}

.stmd-card__body h3 {
  font-size: 17px;
  font-weight: 700;
  color: var(--stmd-text-heading);
  margin: 0 0 8px;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
}

.stmd-card__body p {
  font-size: 14px;
  line-height: 1.7;
  color: var(--stmd-text-body);
  margin: 0;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
}

/* "Read the article →" pinned to the card bottom */
.stmd-card__more {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: auto;
  padding-top: 16px;
  color: var(--stmd-purple);
  font-weight: 600;
  font-size: 14px;
  transition: gap 0.2s ease, color 0.2s ease;
}
.stmd-card__more::after { content: "\2197"; font-size: 15px; line-height: 1; }
.stmd-card:hover .stmd-card__more { gap: 10px; color: var(--stmd-purple-hover); }

.stmd-archive__empty {
  margin: 0;
  font-size: 17px;
  color: var(--stmd-text-body);
}

/* =============================================
   RESPONSIVE
============================================= */
@media (max-width: 1024px) {
  .stmd-hero__inner { padding-left: 40px; padding-right: 40px; padding-top: 56px; padding-bottom: 56px; }
}

@media (max-width: 968px) {
  .stmd-cards { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 640px) {
  .stmd-hero h1 { font-size: 42px; }
  .stmd-hero__inner { padding-left: 24px; padding-right: 24px; }
  .stmd-cards { grid-template-columns: 1fr; }
}
