/* =========================================================
   Nutra-Med Packaging — Resources
   ---------------------------------------------------------
   Shared by resources.html (listing) and the article detail
   pages. Link AFTER main.css.
   ========================================================= */

/* ---------------------------------------------------------
   BREADCRUMBS
   --------------------------------------------------------- */
.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--gray);
  margin-bottom: 20px;
}

.breadcrumbs a {
  color: var(--gray);
  transition: color 0.2s;
}

.breadcrumbs a:hover { color: var(--blue); }

.breadcrumbs .sep { opacity: 0.6; }

.breadcrumbs .current {
  color: var(--blue);
  max-width: 340px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ---------------------------------------------------------
   DARK PAGE HERO
   --------------------------------------------------------- */
.page-hero {
  position: relative;
  overflow: hidden;
  background: var(--navy);
  padding: 56px 0 64px;
}

.page-hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.page-hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.28;
}

.page-hero .container {
  position: relative;
  z-index: 1;
}

.page-hero .breadcrumbs,
.page-hero .breadcrumbs a {
  color: rgba(255, 255, 255, 0.7);
}

.page-hero .breadcrumbs a:hover { color: var(--white); }

.page-hero-badge {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 8px;
  background: rgba(4, 108, 244, 0.85);
  color: var(--white);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 16px;
}

.page-hero h1 {
  font-size: 64px;
  font-weight: 700;
  line-height: 72px;
  color: var(--white);
  margin-bottom: 16px;
}

.page-hero p {
  font-size: 16px;
  line-height: 26px;
  color: rgba(255, 255, 255, 0.82);
  max-width: 720px;
}

/* ---------------------------------------------------------
   FILTER BAR
   --------------------------------------------------------- */
.filter-bar {
  border-bottom: 1px solid #E5E7EB;
  background: var(--white);
  padding: 20px 0;
}

.filter-bar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.filter-chip {
  padding: 9px 20px;
  border-radius: 9999px;
  background: #F3F4F6;
  font-size: 14px;
  font-weight: 500;
  color: var(--slate);
  transition: background 0.2s, color 0.2s;
}

.filter-chip:hover { background: #E5E7EB; }

.filter-chip.active {
  background: var(--blue);
  color: var(--white);
}

.filter-search {
  position: relative;
  min-width: 280px;
}

.filter-search svg {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  color: var(--gray);
  pointer-events: none;
}

.filter-search input {
  width: 100%;
  padding: 12px 16px 12px 42px;
  border: 1px solid #D1D5DB;
  border-radius: 10px;
  font-family: var(--font);
  font-size: 15px;
  color: var(--navy);
  background: var(--white);
  outline: none;
  transition: border-color 0.2s;
}

.filter-search input::placeholder { color: #9CA3AF; }
.filter-search input:focus { border-color: var(--blue); }

/* ---------------------------------------------------------
   RESOURCE CARDS
   --------------------------------------------------------- */
.resources-section {
  padding: var(--section-py) 0;
  background: var(--section-bg);
}

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

.resource-card {
  display: flex;
  flex-direction: column;
  background: var(--white);
  border: 1px solid #E5E7EB;
  border-radius: 16px;
  overflow: hidden;
  transition: opacity 0.7s ease, transform 0.7s ease, box-shadow 0.25s ease;
}

.resource-card.visible:hover {
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.10);
  transform: translateY(-3px);
}

.resource-card-img {
  height: 200px;
  overflow: hidden;
}

.resource-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.resource-card-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 20px;
}

.resource-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.resource-badge {
  padding: 5px 10px;
  border-radius: 6px;
  background: var(--blue-light);
  color: var(--blue);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
}

.resource-date {
  font-size: 13px;
  color: var(--gray);
}

.resource-card h3 {
  font-size: 18px;
  font-weight: 600;
  line-height: 26px;
  color: var(--navy);
  margin-bottom: 10px;
}

.resource-card p {
  font-size: 14px;
  line-height: 22px;
  color: var(--gray);
  flex: 1;
  margin-bottom: 16px;
}

.resource-card .link-blue { font-size: 15px; }

.resources-empty {
  display: none;
  padding: 48px 0;
  text-align: center;
  font-size: 16px;
  color: var(--gray);
}

/* ---------------------------------------------------------
   PAGINATION
   --------------------------------------------------------- */
.pagination {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 48px;
}

.pagination a,
.pagination span {
  min-width: 44px;
  height: 44px;
  padding: 0 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #E5E7EB;
  border-radius: 10px;
  background: var(--white);
  font-size: 15px;
  font-weight: 500;
  color: var(--slate);
  transition: border-color 0.2s, color 0.2s;
}

.pagination a:hover {
  border-color: var(--blue);
  color: var(--blue);
}

.pagination .current {
  background: var(--blue);
  border-color: var(--blue);
  color: var(--white);
}

.pagination .gap {
  border-color: transparent;
  background: none;
}

/* ---------------------------------------------------------
   ARTICLE DETAIL
   --------------------------------------------------------- */
.article-page { padding: 32px 0 var(--section-py); }

.article-meta {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
}

.article-meta .resource-date { font-size: 14px; }

.article-title {
  font-size: 44px;
  font-weight: 600;
  line-height: 54px;
  color: var(--navy);
  margin-bottom: 32px;
}

.article-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 56px;
  align-items: start;
}

.article-hero-img {
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 28px;
  max-height: 420px;
}

.article-hero-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.article-body p {
  font-size: 15px;
  line-height: 26px;
  color: var(--gray);
  margin-bottom: 24px;
}

.article-body p strong { color: var(--navy); }

.article-body h2 {
  font-size: 22px;
  font-weight: 600;
  line-height: 30px;
  color: var(--navy);
  margin-bottom: 14px;
}

.article-body blockquote {
  font-size: 15px;
  line-height: 26px;
  color: var(--gray);
  margin-bottom: 24px;
}

/* "About Nutra-Med" panel */
.article-about {
  border: 1px solid #DBEAFE;
  border-radius: 12px;
  background: #F8FAFF;
  padding: 20px 22px;
  margin-bottom: 32px;
}

.article-about h3 {
  font-size: 15px;
  font-weight: 600;
  color: var(--blue);
  margin-bottom: 8px;
}

.article-about p {
  font-size: 13px;
  line-height: 21px;
  color: var(--gray);
  margin: 0;
}

.article-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 500;
  color: var(--blue);
  transition: gap 0.2s;
}

.article-back:hover { gap: 12px; }
.article-back svg { width: 16px; height: 16px; }

/* --- Sidebar --- */
.article-aside {
  position: sticky;
  top: 96px;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.share-box {
  border: 1px solid #E5E7EB;
  border-radius: 12px;
  background: #F9FAFB;
  padding: 18px 20px;
}

.share-box h3,
.aside-heading {
  font-size: 15px;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 14px;
}

.share-links {
  display: flex;
  gap: 10px;
}

.share-links a {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--blue-light);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

.share-links a:hover { background: #D0E4FD; }

.share-links svg {
  width: 15px;
  height: 15px;
  fill: var(--blue);
}

.related-list {
  display: flex;
  flex-direction: column;
}

.related-item {
  display: flex;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid #E5E7EB;
}

.related-item:last-child { border-bottom: none; }

.related-item img {
  width: 64px;
  height: 52px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
}

.related-item .resource-date {
  display: block;
  font-size: 12px;
  margin-bottom: 4px;
}

.related-item h4 {
  font-size: 13px;
  font-weight: 600;
  line-height: 19px;
  color: var(--navy);
  transition: color 0.2s;
}

.related-item:hover h4 { color: var(--blue); }

/* --- You May Also Like --- */
.more-resources { padding: 0 0 var(--section-py); }

/* ---------------------------------------------------------
   CONTACT CTA BAND
   --------------------------------------------------------- */
.contact-band {
  padding: var(--section-py) 0;
  background: #EEF2F9;
}

.contact-band-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: center;
}

.contact-band h2 {
  font-size: 34px;
  font-weight: 500;
  line-height: 44px;
  color: var(--navy);
  margin-bottom: 20px;
}

.contact-band p {
  font-size: 15px;
  line-height: 26px;
  color: var(--gray);
  margin-bottom: 28px;
}

.contact-band-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.contact-band-image {
  border-radius: 12px;
  overflow: hidden;
  height: 320px;
}

.contact-band-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ---------------------------------------------------------
   RESPONSIVE
   --------------------------------------------------------- */
@media (max-width: 1024px) {
  .resources-grid { grid-template-columns: repeat(2, 1fr); }

  .article-layout {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .article-aside { position: static; }

  /* The full "You May Also Like" grid already covers this */
  .article-aside .related-block { display: none; }

  .page-hero h1 {
    font-size: 48px;
    line-height: 56px;
  }

  .contact-band-inner { grid-template-columns: 1fr; gap: 32px; }
  .contact-band-image { height: 260px; order: 1; }
}

@media (max-width: 768px) {
  .page-hero { padding: 40px 0 44px; }

  .page-hero h1 {
    font-size: 38px;
    line-height: 46px;
  }

  .page-hero p { font-size: 15px; line-height: 24px; }

  .filter-bar-inner { flex-direction: column; align-items: stretch; }
  .filter-search { min-width: 0; width: 100%; }

  .filter-chips { gap: 8px; }
  .filter-chip { padding: 8px 16px; font-size: 13px; }

  .resources-grid { grid-template-columns: 1fr; }

  .article-page { padding: 20px 0 56px; }

  .article-title {
    font-size: 28px;
    line-height: 36px;
    margin-bottom: 24px;
  }

  .breadcrumbs .current { max-width: 180px; }

  .contact-band h2 {
    font-size: 26px;
    line-height: 34px;
  }

  .contact-band-buttons .btn-primary,
  .contact-band-buttons .btn-outline {
    width: 100%;
    text-align: center;
    padding: 14px;
  }

  .contact-band-image { height: 200px; }

  .pagination a,
  .pagination span {
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    font-size: 14px;
  }
}
