/* ─────────────────────────────────────────────────────────────────────────────
   resources.css — Resources page styles
   Pixel-faithful translation of Figma node 4:400
   ───────────────────────────────────────────────────────────────────────────── */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  /* Brand */
  --primary:         #076476;
  --primary-dark:    #054e5c;
  --primary-deep:    #004b59;
  /* Text */
  --text-heading:    #1a1c1c;
  --text-body:       #555f6f;
  --text-nav:        #555f6f;
  --white:           #ffffff;
  /* Borders */
  --border-card:     #bfc8cc;
  --border-nav:      #f3f4f6;
  /* Backgrounds */
  --bg-videos:       #f3f3f4;
  /* Fonts */
  --font-display:    'Manrope', sans-serif;
  --font-body:       'Inter', sans-serif;
}

/* ── Base ───────────────────────────────────────────────────────────────────── */

body {
  font-family: var(--font-display);
  color: var(--text-body);
  background: var(--white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ── Containers ─────────────────────────────────────────────────────────────── */

.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Resources content area matches the Figma 960px content width */
.container-resources {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 16px;
}

/* ── Header / Nav ───────────────────────────────────────────────────────────── */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--white);
  border-bottom: 1px solid var(--border-nav);
}

.nav {
  display: flex;
  align-items: center;
  gap: 32px;
  padding: 16px 24px;
  max-width: 1280px;
  margin: 0 auto;
}

.nav-logo img {
  height: 32px;
  display: block;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
  list-style: none;
  margin-left: auto;
}

.nav-links a {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 500;
  color: var(--text-body);
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.15s;
}

.nav-links a:hover,
.nav-link--active {
  color: var(--primary) !important;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  background: none;
  border: none;
  cursor: pointer;
  margin-left: auto;
  padding: 4px;
}

.nav-toggle span {
  display: block;
  height: 2px;
  background: var(--text-heading);
  border-radius: 2px;
  transition: transform 0.2s, opacity 0.2s;
}

.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.nav-mobile {
  display: none;
  flex-direction: column;
  list-style: none;
  background: var(--white);
  border-top: 1px solid var(--border-nav);
  padding: 8px 0;
}

.nav-mobile.open { display: flex; }

.nav-mobile a {
  display: block;
  padding: 12px 24px;
  font-size: 15px;
  font-weight: 500;
  color: var(--text-body);
  text-decoration: none;
}

.nav-mobile a:hover { color: var(--primary); }

/* ── Hero ───────────────────────────────────────────────────────────────────── */

.resources-hero {
  padding: 20px 0 0;
}

.hero-card {
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 480px;
  padding: 172px 32px;
}

.hero-card-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.hero-card-img-wrap {
  position: absolute;
  inset: 0;
  overflow: hidden;
  border-radius: 8px;
}

.hero-card-img {
  position: absolute;
  left: 0;
  width: 100%;
  height: 193.33%;
  top: -46.67%;
  max-width: none;
  object-fit: cover;
}

.hero-card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(0,0,0,0.5), rgba(0,0,0,0.7));
  border-radius: 8px;
}

.hero-card-content {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  max-width: 672px;
  text-align: center;
}

.hero-label {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 400;
  color: var(--white);
  line-height: 1.5;
}

.hero-subtitle {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 400;
  color: var(--white);
  opacity: 0.9;
  line-height: 1.5;
}

.btn-hero {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--primary);
  color: var(--white);
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.24px;
  padding: 12px 24px;
  height: 48px;
  min-width: 180px;
  border-radius: 4px;
  text-decoration: none;
  transition: background 0.15s;
  margin-top: 8px;
}

.btn-hero:hover { background: var(--primary-dark); }

/* ── Category Nav ───────────────────────────────────────────────────────────── */

.category-nav {
  background: #f9f9f9;
  border-bottom: 1px solid var(--border-card);
  margin-top: 0;
}

.category-nav-list {
  display: flex;
  gap: 32px;
  list-style: none;
  padding: 0;
}

.category-link {
  display: inline-flex;
  align-items: center;
  padding: 16px 0 15px;
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.21px;
  color: var(--text-nav);
  text-decoration: none;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
  transition: color 0.15s, border-color 0.15s;
}

.category-link:hover {
  color: var(--text-heading);
}

.category-link--active {
  color: var(--text-heading);
  border-bottom-color: var(--primary);
}

/* ── Resource Sections ──────────────────────────────────────────────────────── */

.resource-sections {
  padding: 48px 0 80px;
}

.resource-section {
  margin-bottom: 80px;
}

.resource-section:last-child {
  margin-bottom: 0;
}

/* Section headers */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.section-heading {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 400;
  color: var(--text-heading);
  line-height: 1.5;
}

.section-heading--center {
  text-align: center;
}

.section-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  color: var(--primary);
  text-decoration: none;
  transition: color 0.15s;
}

.section-link:hover { color: var(--primary-dark); }

.link-icon {
  width: 9.33px;
  height: 9.33px;
  flex-shrink: 0;
}

/* ── Blog Grid ──────────────────────────────────────────────────────────────── */

.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.blog-card {
  background: var(--white);
  border: 1px solid var(--border-card);
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.blog-card-image {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
}

.blog-card-image img {
  position: absolute;
  left: 0;
  width: 100%;
  height: 177.78%;
  top: -38.89%;
  max-width: none;
  object-fit: cover;
}

.blog-card-body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.blog-card-title {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 400;
  color: var(--text-heading);
  margin-bottom: 8px;
  line-height: 1.5;
}

.blog-card-desc {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 400;
  color: var(--text-body);
  line-height: 1.5;
  margin-bottom: 16px;
  flex: 1;
}

.view-more-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  color: var(--primary);
  text-decoration: none;
  transition: color 0.15s;
}

.view-more-link:hover { color: var(--primary-dark); }

.chevron-icon {
  width: 4.32px;
  height: 7px;
  flex-shrink: 0;
}

/* ── Datasheets Grid ────────────────────────────────────────────────────────── */

.datasheets-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  margin-top: 24px;
}

.datasheet-card {
  display: flex;
  align-items: center;
  gap: 24px;
  background: var(--white);
  border: 1px solid var(--border-card);
  border-radius: 8px;
  padding: 25px;
  height: 138px;
}

.datasheet-icon {
  flex-shrink: 0;
  width: 56px;
  height: 62px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.datasheet-icon img {
  width: 56px;
  height: 62px;
  object-fit: contain;
}

.datasheet-text {
  flex: 1;
  min-width: 0;
}

.datasheet-title {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  color: var(--text-heading);
  margin-bottom: 4px;
  line-height: 1.5;
}

.datasheet-desc {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 400;
  color: var(--text-body);
  line-height: 1.43;
}

.download-link {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  color: var(--primary);
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.15s;
}

.download-link:hover { color: var(--primary-dark); }

/* ── Demo Videos Section ────────────────────────────────────────────────────── */

.demo-videos-section {
  background: var(--bg-videos);
  border-radius: 24px;
  padding: 48px 16px;
  margin-left: -16px;
  margin-right: -16px;
}

.demo-videos-section .section-heading--center {
  margin-bottom: 24px;
}

.videos-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.video-card {
  border-radius: 8px;
  overflow: hidden;
  background: var(--white);
  position: relative;
}

.video-thumb {
  position: relative;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  cursor: pointer;
}

.video-thumb img:first-child {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.video-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.2s;
}

.video-thumb:hover .video-overlay {
  opacity: 1;
}

.play-icon {
  width: 48.5px;
  height: 53px;
}

.video-caption {
  padding: 24px;
  background: var(--white);
}

.video-title {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  color: var(--text-heading);
  margin-bottom: 4px;
  line-height: 1.5;
}

.video-desc {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 400;
  color: var(--text-body);
  line-height: 1.43;
}

/* ── Whitepapers Grid ───────────────────────────────────────────────────────── */

.whitepapers-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  margin-top: 24px;
}

.whitepaper-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.whitepaper-cover {
  position: relative;
  height: 256px;
  border: 1px solid var(--border-card);
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  padding: 17px;
}

.whitepaper-cover-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: #eee;
}

.whitepaper-cover-bg img {
  position: absolute;
  left: 0;
  top: 0;
  height: 200%;
  width: auto;
  max-width: none;
}

.whitepaper-cover-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(0,0,0,0) 0%, rgba(0,0,0,0.4) 100%);
}

.whitepaper-label {
  position: relative;
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 700;
  color: var(--white);
  letter-spacing: 1.2px;
  text-transform: uppercase;
  line-height: 1.33;
}

.whitepaper-title {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  color: var(--text-heading);
  line-height: 1.5;
  padding-top: 8px;
}

.whitepaper-desc {
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 400;
  color: var(--text-body);
  line-height: 1.33;
}

.whitepaper-link {
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 700;
  color: var(--primary);
  text-decoration: underline;
  text-decoration-skip-ink: none;
  transition: color 0.15s;
}

.whitepaper-link:hover { color: var(--primary-dark); }

/* ── Footer ─────────────────────────────────────────────────────────────────── */

.site-footer {
  background: var(--primary-deep);
  color: var(--white);
  padding: 64px 0 32px;
}

.footer-inner {
  display: flex;
  flex-direction: column;
  gap: 48px;
}

.footer-top {
  display: flex;
  gap: 64px;
  align-items: flex-start;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 24px;
  flex-shrink: 0;
}

.footer-logo img {
  height: 36px;
  display: block;
}

.btn-primary {
  display: inline-block;
  background: var(--primary);
  color: var(--white);
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 600;
  padding: 12px 24px;
  border-radius: 6px;
  text-decoration: none;
  transition: background 0.15s;
  white-space: nowrap;
}

.btn-primary:hover { background: var(--primary-dark); }

.footer-links {
  display: flex;
  gap: 48px;
  flex: 1;
  justify-content: flex-end;
}

.footer-col { display: flex; flex-direction: column; gap: 16px; }

.footer-col-title {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: rgba(255, 255, 255, 0.5);
}

.footer-col ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-col a {
  font-family: var(--font-display);
  font-size: 14px;
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  transition: color 0.15s;
}

.footer-col a:hover { color: var(--white); }

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 32px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.footer-copy {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.5);
}

.footer-legal {
  display: flex;
  gap: 24px;
}

.footer-legal a {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.5);
  text-decoration: none;
  transition: color 0.15s;
}

.footer-legal a:hover { color: var(--white); }

/* ── Responsive ─────────────────────────────────────────────────────────────── */

@media (max-width: 900px) {
  .blog-grid        { grid-template-columns: 1fr; max-width: 520px; margin: 0 auto; }
  .datasheets-grid  { grid-template-columns: 1fr; }
  .videos-grid      { grid-template-columns: 1fr; max-width: 520px; margin: 0 auto; }
  .whitepapers-grid { grid-template-columns: repeat(2, 1fr); }

  .hero-card { padding: 80px 24px; }
}

@media (max-width: 768px) {
  .nav-links  { display: none; }
  .nav-toggle { display: flex; }

  .category-nav-list { gap: 20px; overflow-x: auto; padding-bottom: 2px; }
  .category-link     { white-space: nowrap; }

  .footer-top   { flex-direction: column; gap: 40px; }
  .footer-links { flex-wrap: wrap; gap: 32px; justify-content: flex-start; }
}

@media (max-width: 640px) {
  .whitepapers-grid { grid-template-columns: repeat(2, 1fr); }
  .hero-card        { padding: 64px 20px; min-height: 360px; }

  .datasheet-card {
    flex-wrap: wrap;
    height: auto;
  }

  .footer-bottom { flex-direction: column; gap: 16px; text-align: center; }
  .footer-legal  { flex-wrap: wrap; justify-content: center; }
}

@media (max-width: 480px) {
  .blog-grid        { max-width: 100%; }
  .videos-grid      { max-width: 100%; }
  .whitepapers-grid { grid-template-columns: 1fr; }
}
