/* ==========================================================
   Resources Page — resources-page.css  v2.0
   Matches Figma node 1187:985 (updated design).

   Most layout tokens live in intone-design-system.css.
   This file: intro, carousel, case-study card, article card,
   white-papers overrides, and responsive.
   ========================================================== */

/* ── Resources intro paragraph ── */
.resources-intro {
  padding: 60px 44px 0;
}
.resources-intro__text {
  font-family: var(--ds-font-heading, 'Public Sans', sans-serif);
  font-size: clamp(16px, 1.8vw, 24px);
  font-weight: 500;
  line-height: 1.36;
  color: #000;
  /* text-transform: uppercase; */
  margin: 0;
  /* max-width: 1352px; */
}


/* ══════════════════════════════════════════════════════════
   SHARED: Gold-sidebar + carousel layout
   Used by both Case Studies and Articles sections
   ══════════════════════════════════════════════════════════ */
.res-section-wrapper {
  padding: 0 44px 80px;
}
.res-section-block {
  display: flex;
  gap: 0;
  align-items: stretch;
  overflow: hidden;
}

/* Gold sidebar (same as home-services-block__sidebar) */
.res-sidebar {
  flex: 0 0 360px;
  min-height: 616px;
  background: var(--ds-gold, #f6b43f);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
  flex-shrink: 0;
}
.res-sidebar__text {
  transform: rotate(-90deg);
  white-space: nowrap;
  font-family: var(--ds-font-heading, 'Public Sans', sans-serif);
  font-size: clamp(40px, 5vw, 68px);
  font-weight: 700;
  text-transform: uppercase;
  color: #000;
  line-height: normal;
  user-select: none;
}


/* ══════════════════════════════════════════════════════════
   CAROUSEL COMPONENT  (.res-carousel)
   CSS scroll-snap + JS prev/next buttons
   ══════════════════════════════════════════════════════════ */
.res-carousel-wrap {
  flex: 1;
  min-width: 0;
  position: relative;
  display: flex;
  flex-direction: column;
}
.res-carousel {
  overflow: hidden;
  width: 100%;
  position: relative;
}
.res-carousel__track {
  display: flex;
  gap: 32px;
  transition: transform 0.45s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  will-change: transform;
  align-items: flex-start;
  padding: 16px 0 24px 32px;
}

/* Carousel navigation */
.res-carousel__nav {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  padding: 16px 0 0;
}
.res-carousel__btn {
  width: 48px;
  height: 48px;
  background: #000;
  color: #fff;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.2s, opacity 0.2s;
}
.res-carousel__btn:hover { background: var(--ds-navy, #1e2e4c); }
.res-carousel__btn:disabled {
  opacity: 0.25;
  cursor: not-allowed;
}
.res-carousel__btn svg {
  display: block;
  pointer-events: none;
}


/* ══════════════════════════════════════════════════════════
   CASE STUDY CARD  (.res-case-card)
   image (480×440) + category tag + title
   ══════════════════════════════════════════════════════════ */
.res-case-card {
  flex: 0 0 480px;
  max-width: 480px;
  min-width: 300px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  text-decoration: none;
  color: inherit;
}
.res-case-card:hover { text-decoration: none; }
.res-case-card__image {
  width: 100%;
  aspect-ratio: 480 / 440;
  overflow: hidden;
  background: #d9d9d9;
  flex-shrink: 0;
  transition: box-shadow 0.35s ease;
}
.res-case-card:hover .res-case-card__image {
  box-shadow: 0 20px 40px -12px rgba(246, 180, 63, 0.45);
}
.res-case-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}
.res-case-card:hover .res-case-card__image img { transform: scale(1.04); }
.res-case-card__category {
  background: var(--ds-light-200, #f4f6f9);
  padding: 3px 12px;
  font-family: var(--ds-font-heading, 'Public Sans', sans-serif);
  font-size: 14px;
  font-weight: 400;
  line-height: 20px;
  color: var(--ds-navy, #1e2e4c);
  display: inline-block;
  align-self: flex-start;
}
.res-case-card__title {
  font-family: var(--ds-font-heading, 'Public Sans', sans-serif);
  font-size: 24px;
  font-weight: 600;
  line-height: normal;
  color: var(--ds-navy, #1e2e4c);
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}


/* ══════════════════════════════════════════════════════════
   ARTICLE CARD  (.res-article-card)
   image (389×325 rounded-12) + author avatar + date +
   title (24px) + excerpt (16px) + Read More button
   ══════════════════════════════════════════════════════════ */
.res-article-card {
  flex: 0 0 389px;
  max-width: 389px;
  min-width: 280px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  text-decoration: none;
  color: inherit;
}
.res-article-card:hover { text-decoration: none; }

/* Image */
.res-article-card__image {
  width: 100%;
  aspect-ratio: 389 / 325;
  overflow: hidden;
  background: #d9d9d9;
  border-radius: 12px;
  flex-shrink: 0;
  position: relative;
  transition: box-shadow 0.35s ease;
}
.res-article-card:hover .res-article-card__image {
  box-shadow: 0 20px 40px -12px rgba(246, 180, 63, 0.45);
}
.res-article-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}
.res-article-card:hover .res-article-card__image img { transform: scale(1.04); }

/* Meta row: avatar + name + date */
.res-article-card__meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.res-article-card__author {
  display: flex;
  align-items: center;
  gap: 8px;
}
.res-article-card__avatar {
  width: 32px;
  height: 32px;
  /* No circular clip — matches .post-header__avatar so a brand favicon/
     squircle avatar shows fully here too instead of being cropped to a
     circle; object-fit:contain shows the whole image (square photos still
     fill the 1:1 box). */
  object-fit: contain;
  flex-shrink: 0;
  aspect-ratio: 1 / 1;
}
.res-article-card__author-name {
  font-family: var(--ds-font-heading, 'Public Sans', sans-serif);
  font-size: 14px;
  font-weight: 400;
  line-height: 20px;
  color: var(--ds-navy, #1e2e4c);
  white-space: nowrap;
}
.res-article-card__date {
  font-family: var(--ds-font-heading, 'Public Sans', sans-serif);
  font-size: 14px;
  font-weight: 400;
  line-height: 16px;
  color: #9a9a9a;
  white-space: nowrap;
}

/* Title */
.res-article-card__title {
  font-family: var(--ds-font-heading, 'Public Sans', sans-serif);
  font-size: 24px;
  font-weight: 500;
  line-height: 32px;
  color: var(--ds-navy, #1e2e4c);
  margin: 0;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

/* Excerpt */
.res-article-card__excerpt {
  font-family: var(--ds-font-heading, 'Public Sans', sans-serif);
  font-size: 16px;
  font-weight: 400;
  line-height: 24px;
  color: var(--ds-navy, #1e2e4c);
  margin: 0;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

/* Read More button */
.res-article-card__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 148px;
  padding: 12px 16px;
  border: 2px solid #233963;
  font-family: var(--ds-font-heading, 'Public Sans', sans-serif);
  font-size: 16px;
  font-weight: 500;
  line-height: 24px;
  color: #233963;
  text-transform: uppercase;
  text-decoration: none;
  transition: background 0.2s, color 0.2s;
  background: #fff;
  align-self: flex-start;
}
.res-article-card__btn:hover {
  background: #233963;
  color: #fff;
  text-decoration: none;
}


/* ── Responsive ── */
@media (max-width: 1200px) {
  .res-sidebar { flex: 0 0 260px; }
  .res-section-wrapper { padding: 0 44px 64px; }
}
@media (max-width: 960px) {
  .resources-intro { padding: 48px 24px 0; }
  .res-section-wrapper { padding: 0 24px 56px; }
  .res-section-block { flex-direction: column; }
  .res-sidebar {
    flex: none;
    height: 100px;
    min-height: unset;
    width: 100%;
  }
  .res-sidebar__text {
    transform: none;
    font-size: clamp(28px, 5vw, 40px);
  }
  .res-case-card  { flex: 0 0 320px; max-width: 320px; }
  .res-article-card { flex: 0 0 300px; max-width: 300px; }
  .res-carousel__nav { justify-content: flex-start; }
}
@media (max-width: 640px) {
  .resources-intro { padding: 40px 20px 0; }
  .res-section-wrapper { padding: 0 20px 48px; }
  .res-case-card  { flex: 0 0 280px; max-width: 280px; }
  .res-article-card { flex: 0 0 260px; max-width: 260px; }
  .res-carousel__btn { width: 40px; height: 40px; }
}


/* ── Dark mode overrides ─────────────────────────────────── */

[data-theme="dark"] .resources-intro__text {
  color: var(--t-text);
}

/* Case study cards */
[data-theme="dark"] .res-case-card__category {
  background: var(--t-surface);
  color: var(--t-text-muted);
}
[data-theme="dark"] .res-case-card__title {
  color: var(--t-text);
}

/* Article cards */
[data-theme="dark"] .res-article-card__author-name,
[data-theme="dark"] .res-article-card__title,
[data-theme="dark"] .res-article-card__excerpt {
  color: var(--t-text);
}
[data-theme="dark"] .res-article-card__btn {
  background: var(--t-surface-raised);
  border-color: var(--t-border-strong);
  color: var(--t-text);
}
[data-theme="dark"] .res-article-card__btn:hover {
  background: var(--t-text);
  border-color: var(--t-text);
  color: var(--t-bg);
}

/* Carousel nav — currently black (#000), keep readable */
[data-theme="dark"] .res-carousel__btn {
  background: var(--t-text);
  color: var(--t-bg);
}
[data-theme="dark"] .res-carousel__btn:hover {
  background: var(--t-text-muted);
}

/* ============================================================
   INSIGHTS SECTION  (extracted from design-system)
   ============================================================ */

/* ============================================================
   17. INSIGHTS SECTION  (resources page blog grid)
   ============================================================ */
.insights-section {
  background: #fff;
  padding: 100px 32px;
}

.insights-inner {
  background: var(--ds-light-100, #f3f4f5);
  padding: 31px 32px 32px;
}

.insights-heading {
  font-family: var(--ds-font-heading);
  font-size: clamp(40px, 5vw, 68px);
  font-weight: 700;
  line-height: normal;
  text-transform: uppercase;
  color: #181818;
  margin: 0 0 18px;
}

.insights-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.insights-search-row {
  border-top: 1px solid #181818;
  padding: 17px 0 16px;
}

.insights-search-input {
  display: block;
  width: 100%;
  background: var(--ds-light-100, #f3f4f5);
  border: 1px solid #e6e6e6;
  padding: 9px 13px;
  height: 35px;
  font-family: var(--ds-font-heading);
  font-size: 13px;
  color: #303030;
  outline: none;
  transition: border-color 0.2s;
}

.insights-search-input:focus {
  border-color: #181818;
}

.insights-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.insights-post-card {
  display: flex;
  flex-direction: column;
  gap: 0;
  text-decoration: none;
  color: inherit;
}

.insights-post-card:hover {
  text-decoration: none;
}

.insights-post-card__thumb {
  width: 100%;
  aspect-ratio: 332 / 221;
  overflow: hidden;
  background: #d9d9d9;
  margin-bottom: 15px;
}

.insights-post-card__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}

.insights-post-card:hover .insights-post-card__thumb img {
  transform: scale(1.04);
}

.insights-post-card__date {
  font-family: var(--ds-font-heading);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.46;
  color: #5e5e5e;
  margin: 0 0 2px;
}

.insights-post-card__title {
  font-family: var(--ds-font-heading);
  font-size: 24px;
  /* updated from 16px to match Figma White Papers design */
  font-weight: 500;
  line-height: normal;
  color: #181818;
  margin: 0;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.insights-post-card__read-more {
  font-family: var(--ds-font-heading);
  font-size: 14px;
  font-weight: 500;
  color: #181818;
  text-decoration: underline;
  display: block;
  padding-top: 15px;
}

.insights-pagination {
  border-top: 1px solid #000;
  padding: 33px 0 32px;
  margin-top: 24px;
  display: flex;
  justify-content: flex-end;
}

.insights-pagination__nav {
  display: flex;
  gap: 24px;
  align-items: center;
}

.insights-pagination__btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 28px;
  text-decoration: none;
  color: #181818;
  transition: opacity 0.2s;
}

.insights-pagination__btn:hover {
  opacity: 0.6;
}

.insights-pagination__btn svg {
  display: block;
}

.insights-pagination__btn--disabled {
  opacity: 0.3;
  pointer-events: none;
}


/* ============================================================


/* ── Responsive ── */

/* Insights grid responsive */
@media (max-width: 1100px) {
  .insights-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 780px) {
  .insights-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .insights-section {
    padding: 64px 24px;
  }

  .insights-inner {
    padding: 24px 24px 24px;
  }
}

@media (max-width: 540px) {
  .insights-grid {
    grid-template-columns: 1fr;
  }

  .insights-section {
    padding: 48px 20px;
  }

  .insights-inner {
    padding: 20px;
  }
}


/* ── Dark mode overrides ── */

/* ── Insights / resources section ── */
[data-theme="dark"] .insights-section {
  background: var(--t-bg);
}
[data-theme="dark"] .insights-inner {
  background: var(--t-surface);
}
[data-theme="dark"] .insights-heading {
  color: var(--t-text);
}
[data-theme="dark"] .insights-search-row {
  border-top-color: var(--t-border-strong);
}
[data-theme="dark"] .insights-search-input {
  background: var(--t-surface);
  border-color: var(--t-border);
  color: var(--t-text);
}
[data-theme="dark"] .insights-search-input:focus {
  border-color: var(--t-text);
}

