/* Premrest v3 — Resources listing + detail styles */

.res-toolbar {
  display: flex; flex-wrap: wrap; gap: 16px; align-items: center; justify-content: space-between;
  margin-bottom: 24px;
}
.res-tabs { display: flex; flex-wrap: wrap; gap: 6px; }
.res-tab {
  font-family: var(--font-ui); font-weight: var(--fw-semibold); font-size: 0.9rem;
  background: transparent; border: 1px solid rgba(46,49,51,0.18); color: var(--neutral-charcoal);
  padding: 8px 16px; border-radius: 999px; cursor: pointer; transition: all .15s ease;
}
.res-tab:hover { border-color: var(--brand-orange); color: var(--brand-orange); }
.res-tab.is-active { background: var(--neutral-charcoal); color: var(--neutral-white); border-color: var(--neutral-charcoal); }

.res-filters { display: flex; gap: 10px; flex-wrap: wrap; }
.res-select, .res-search {
  font-family: var(--font-ui); font-size: 0.9rem;
  padding: 9px 14px; border-radius: 999px; border: 1px solid rgba(46,49,51,0.18);
  background: var(--neutral-white); color: var(--neutral-charcoal); min-width: 160px;
}
.res-search { min-width: 220px; }
.res-search:focus, .res-select:focus { outline: none; border-color: var(--brand-orange); }

.res-grid {
  display: grid; gap: 22px;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}
.res-card {
  display: flex; flex-direction: column; background: var(--neutral-white);
  border: 1px solid rgba(46,49,51,0.08); border-radius: var(--radius-md);
  overflow: hidden; text-decoration: none; color: var(--neutral-charcoal);
  transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}
.res-card:hover { border-color: var(--brand-orange); box-shadow: var(--shadow-md); transform: translateY(-2px); }
.res-card-media {
  position: relative; aspect-ratio: 16/9; background: rgba(46,49,51,0.08); overflow: hidden;
}
.res-card-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.res-card-placeholder { width: 100%; height: 100%; background: linear-gradient(135deg, var(--brand-cream), rgba(46,49,51,0.08)); }
.res-card-type {
  position: absolute; top: 12px; left: 12px;
  font-family: var(--font-ui); font-weight: var(--fw-bold); font-size: 0.72rem;
  letter-spacing: 0.08em; text-transform: uppercase;
  background: rgba(255,255,255,0.95); color: var(--neutral-charcoal);
  padding: 6px 10px; border-radius: 999px;
}
.res-card-play {
  position: absolute; inset: 0; margin: auto; width: 56px; height: 56px;
  background: rgba(34,34,34,0.8); color: var(--neutral-white);
  border-radius: 50%; display: grid; place-items: center; font-size: 1.2rem;
  padding-left: 4px;
}
.res-card-body { padding: 20px 22px 22px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.res-card-meta {
  display: flex; flex-wrap: wrap; gap: 6px;
  font-family: var(--font-ui); font-size: 0.78rem; color: rgba(46,49,51,0.6);
  text-transform: uppercase; letter-spacing: 0.08em; font-weight: var(--fw-semibold);
}
.res-card h3 {
  font-size: 1.15rem; margin: 0; line-height: 1.25;
  font-family: var(--font-heading); font-weight: var(--fw-bold);
}
.res-card p { font-size: 0.92rem; color: rgba(46,49,51,0.7); margin: 0; flex: 1; }
.res-card-cta { font-family: var(--font-heading); font-weight: var(--fw-bold); color: var(--brand-orange); font-size: 0.9rem; }

.res-empty { text-align: center; padding: 40px 0; color: rgba(46,49,51,0.6); }

.res-featured-head {
  display: flex; flex-wrap: wrap; gap: 24px; align-items: end; justify-content: space-between;
}
.res-featured-ctas { display: flex; gap: 10px; flex-wrap: wrap; }

/* Detail page */
.res-detail { max-width: 820px; }
.res-detail-head { margin: 22px 0 30px; }
.res-detail-head h1 {
  font-family: var(--font-heading); font-weight: var(--fw-heavy);
  font-size: clamp(2rem, 4vw, 3.2rem); line-height: 1.05; letter-spacing: -0.02em;
  margin: 12px 0 0;
}
.res-detail-head .lead { margin-top: 18px; font-size: 1.1rem; color: rgba(46,49,51,0.75); }
.res-detail-meta {
  display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
  font-family: var(--font-ui); font-size: 0.82rem; color: rgba(46,49,51,0.6);
  text-transform: uppercase; letter-spacing: 0.08em; font-weight: var(--fw-semibold);
}
.res-detail-meta .pill {
  background: var(--brand-orange); color: var(--neutral-white);
  padding: 4px 12px; border-radius: 999px; font-size: 0.72rem;
}
.res-embed {
  position: relative; aspect-ratio: 16/9; border-radius: var(--radius-lg);
  overflow: hidden; box-shadow: var(--shadow-md); margin: 20px 0 32px;
}
.res-embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.res-hero-img { border-radius: var(--radius-lg); overflow: hidden; margin: 20px 0 32px; }
.res-hero-img img { width: 100%; height: auto; display: block; }
.res-body { font-family: var(--font-body); font-size: 1.05rem; line-height: 1.65; color: rgba(46,49,51,0.9); }
.res-body p { margin: 0 0 1.1em; }
.res-body h2, .res-body h3 { font-family: var(--font-heading); font-weight: var(--fw-bold); margin: 1.6em 0 0.5em; }
.res-body a { color: var(--brand-orange); }
.res-body img { max-width: 100%; height: auto; border-radius: var(--radius-md); margin: 1em 0; }
.res-body blockquote {
  border-left: 4px solid var(--brand-orange); padding: 4px 0 4px 20px;
  margin: 1.4em 0; color: rgba(46,49,51,0.78); font-style: italic;
}

.res-related { margin-top: 60px; padding-top: 40px; border-top: 1px solid rgba(46,49,51,0.12); }
.res-related h2 { margin-bottom: 22px; }

@media (max-width: 720px) {
  .res-toolbar { flex-direction: column; align-items: stretch; }
  .res-filters { flex-direction: column; }
  .res-select, .res-search { width: 100%; }
}
