/* =====================================================
   MedTechISO - Resources Page Styles
   ===================================================== */

/* ========== FILTER BAR ========== */
.resources-filter-bar {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  padding: 16px 0;
  position: sticky;
  top: 72px;
  z-index: 100;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.filter-layout {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.filter-search {
  position: relative;
  flex: 1;
  min-width: 200px;
  max-width: 320px;
}

.filter-search i {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-light);
  font-size: 0.85rem;
}

.filter-search input {
  width: 100%;
  padding: 9px 14px 9px 36px;
  border: 1px solid var(--border);
  border-radius: 30px;
  font-size: var(--text-sm);
  color: var(--text-dark);
  background: var(--light-bg);
  outline: none;
  transition: var(--transition);
  font-family: inherit;
}

.filter-search input:focus {
  border-color: var(--blue);
  background: white;
  box-shadow: 0 0 0 3px rgba(30, 95, 168, 0.1);
}

.filter-tabs {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.filter-tab {
  padding: 8px 16px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--white);
  color: var(--text-mid);
  font-size: var(--text-sm);
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  font-family: inherit;
}

.filter-tab:hover { border-color: var(--blue); color: var(--blue); }
.filter-tab.active {
  background: var(--blue);
  color: white;
  border-color: var(--blue);
}

/* ========== RESOURCES GRID ========== */
.featured-resources { background: var(--light-bg); }

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

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

.resource-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.rc-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 20px;
}

.rc-header.iso { background: linear-gradient(135deg, #1E5FA8, #2D7DD2); }
.rc-header.bep { background: linear-gradient(135deg, #00B4A6, #1E5FA8); }
.rc-header.eumdr { background: linear-gradient(135deg, #003399, #1E5FA8); }
.rc-header.fda { background: linear-gradient(135deg, #B91C1C, #C41E3A); }
.rc-header.qms { background: linear-gradient(135deg, var(--navy), var(--blue)); }
.rc-header.risk { background: linear-gradient(135deg, #065F46, #047857); }
.rc-header.guide { background: linear-gradient(135deg, #7C3AED, #A855F7); }

.rc-category {
  color: white;
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.rc-type {
  color: rgba(255,255,255,0.7);
  font-size: var(--text-xs);
  display: flex;
  align-items: center;
  gap: 4px;
}

.rc-body {
  padding: 20px;
  flex: 1;
}

.rc-body h3 {
  font-size: var(--text-base);
  color: var(--navy);
  margin-bottom: 10px;
  line-height: 1.35;
}

.rc-body p {
  font-size: var(--text-sm);
  color: var(--text-mid);
  line-height: 1.65;
  margin-bottom: 14px;
}

.rc-topics {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.rc-topics span {
  background: var(--light-bg);
  color: var(--text-mid);
  border: 1px solid var(--border);
  padding: 3px 10px;
  border-radius: 12px;
  font-size: var(--text-xs);
  font-weight: 500;
}

.rc-footer {
  padding: 14px 20px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--light-bg);
}

.rc-meta {
  display: flex;
  gap: 14px;
  color: var(--text-light);
  font-size: var(--text-xs);
}

.rc-meta i { margin-right: 3px; }

.rc-read-btn {
  background: none;
  border: none;
  color: var(--blue);
  font-size: var(--text-sm);
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: var(--transition);
  font-family: inherit;
  padding: 0;
}

.rc-read-btn:hover { color: var(--teal); gap: 10px; }

.no-results {
  grid-column: 1/-1;
  flex-direction: column;
  align-items: center;
  padding: 60px 20px;
  color: var(--text-light);
}

.no-results i { font-size: 3rem; margin-bottom: 16px; opacity: 0.3; }

/* ========== ENDPOINT TABLE ========== */
.quick-ref-section { background: var(--white); }

.endpoint-table {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  overflow-x: auto;
}

.et-header {
  display: grid;
  grid-template-columns: 2fr 1.2fr 1fr 1.2fr 1.2fr;
  padding: 14px 20px;
  background: var(--navy);
  min-width: 700px;
}

.et-header div {
  color: rgba(255,255,255,0.7);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.et-row {
  display: grid;
  grid-template-columns: 2fr 1.2fr 1fr 1.2fr 1.2fr;
  padding: 12px 20px;
  border-bottom: 1px solid var(--border);
  align-items: center;
  min-width: 700px;
}

.et-row:last-child { border-bottom: none; }
.et-row.alt { background: var(--light-bg); }

.et-row div { font-size: var(--text-sm); color: var(--text-mid); }
.et-row strong { color: var(--navy); }

.et-part {
  display: inline-block;
  background: rgba(30, 95, 168, 0.08);
  color: var(--blue);
  border: 1px solid rgba(30, 95, 168, 0.15);
  padding: 2px 10px;
  border-radius: 10px;
  font-size: 0.75rem;
  font-weight: 600;
}

.et-yes {
  color: #047857;
  font-size: 0.8rem;
  font-weight: 500;
}

.et-no {
  color: var(--text-light);
  font-size: 0.8rem;
}

.et-cond {
  color: #B45309;
  font-size: 0.8rem;
  font-weight: 500;
}

.et-note {
  margin-top: 16px;
  padding: 16px 20px;
  background: var(--light-bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.et-note i { color: var(--blue); flex-shrink: 0; margin-top: 2px; }
.et-note p { font-size: 0.85rem; color: var(--text-mid); line-height: 1.6; }
.et-note a { color: var(--blue); text-decoration: underline; }

/* ========== STANDARDS GRID ========== */
.standards-section { background: var(--light-bg); }

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

.standard-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  transition: var(--transition);
}

.standard-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.std-code {
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: var(--teal);
  margin-bottom: 8px;
  text-transform: uppercase;
  background: rgba(0, 180, 166, 0.1);
  display: inline-block;
  padding: 3px 10px;
  border-radius: 6px;
}

.standard-card h4 {
  font-size: var(--text-base);
  color: var(--navy);
  margin-bottom: 10px;
}

.standard-card p {
  font-size: var(--text-sm);
  color: var(--text-mid);
  line-height: 1.6;
  margin-bottom: 14px;
}

.standard-card ul { display: flex; flex-direction: column; gap: 5px; }

.standard-card li {
  font-size: var(--text-sm);
  color: var(--text-mid);
  padding-left: 16px;
  position: relative;
}

.standard-card li::before {
  content: '—';
  position: absolute;
  left: 0;
  color: var(--teal);
  font-size: 0.7rem;
}

/* ========== RESOURCE MODAL ========== */
.resource-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 2000;
  align-items: flex-start;
  justify-content: flex-end;
}

.resource-modal.open { display: flex; }

.rm-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 22, 40, 0.6);
  backdrop-filter: blur(4px);
}

.rm-panel {
  position: relative;
  z-index: 1;
  background: var(--white);
  width: min(680px, 100%);
  height: 100vh;
  overflow-y: auto;
  padding: 40px 36px;
  animation: slideInRight 0.3s ease;
  box-shadow: -8px 0 40px rgba(0,0,0,0.2);
}

@keyframes slideInRight {
  from { transform: translateX(100%); }
  to { transform: translateX(0); }
}

.rm-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--white);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-mid);
  font-size: 0.9rem;
  transition: var(--transition);
}

.rm-close:hover { background: var(--light-bg); color: var(--navy); }

.rm-content-header {
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}

.rm-content-header .tag { margin-bottom: 10px; }
.rm-content-header h2 { font-size: var(--text-lg); color: var(--navy); margin-bottom: 8px; }
.rm-content-header p { font-size: var(--text-sm); color: var(--text-mid); }

.rm-section { margin-bottom: 28px; }
.rm-section h3 { font-size: var(--text-md); color: var(--navy); margin-bottom: 12px; padding-bottom: 8px; border-bottom: 2px solid var(--teal); display: inline-block; }
.rm-section p { font-size: var(--text-sm); color: var(--text-mid); line-height: 1.7; margin-bottom: 10px; }
.rm-section ul { display: flex; flex-direction: column; gap: 8px; }
.rm-section li { display: flex; gap: 8px; font-size: var(--text-sm); color: var(--text-mid); }
.rm-section li::before { content: '▸'; color: var(--teal); flex-shrink: 0; }

.rm-cta {
  background: var(--light-bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  text-align: center;
  margin-top: 28px;
}

.rm-cta p { font-size: var(--text-sm); color: var(--text-mid); margin-bottom: 12px; }

/* ========== CTA SIMPLE (reuse) ========== */
.cta-section-simple {
  background: linear-gradient(135deg, var(--blue), var(--navy));
  padding: 72px 0;
  text-align: center;
}

.cta-simple-content h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); color: white; margin-bottom: 12px; }
.cta-simple-content p { color: rgba(255,255,255,0.7); max-width: 560px; margin: 0 auto; }

/* ========== LINKEDIN GALLERY ========== */
.linkedin-gallery-section { background: var(--white); }

/* Post filter tabs */
.lp-filter-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-bottom: 40px;
}

.lp-filter {
  padding: 8px 18px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--white);
  color: var(--text-mid);
  font-size: var(--text-sm);
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  font-family: inherit;
}

.lp-filter:hover { border-color: #0A66C2; color: #0A66C2; }

.lp-filter.active {
  background: #0A66C2;
  color: white;
  border-color: #0A66C2;
}

/* Posts grid — masonry-like 3 columns */
.linkedin-posts-grid {
  columns: 3;
  column-gap: 24px;
}

.lp-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: var(--transition);
  break-inside: avoid;
  margin-bottom: 24px;
  display: inline-block;
  width: 100%;
}

.lp-card:hover {
  box-shadow: var(--shadow-md);
  border-color: rgba(10, 102, 194, 0.25);
  transform: translateY(-2px);
}

/* Card header — author info */
.lp-card-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 18px 12px;
  border-bottom: 1px solid var(--border);
}

.lp-avatar {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--navy), var(--blue));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 0.8rem;
  font-weight: 800;
  flex-shrink: 0;
  overflow: hidden;
}

.lp-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
}

.lp-author {
  flex: 1;
  overflow: hidden;
}

.lp-author strong {
  display: block;
  font-size: var(--text-sm);
  color: var(--navy);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lp-author span {
  display: block;
  font-size: var(--text-xs);
  color: var(--text-light);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lp-li-icon {
  width: 28px;
  height: 28px;
  background: #0A66C2;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 0.75rem;
  flex-shrink: 0;
}

/* Card body */
.lp-card-body { padding: 16px 18px; }

.lp-category-badge {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 10px;
  margin-bottom: 10px;
}

.lp-category-badge.iso10993 { background: rgba(30,95,168,0.1); color: var(--blue); }
.lp-category-badge.eumdr    { background: rgba(0,51,153,0.1); color: #003399; }
.lp-category-badge.fda      { background: rgba(185,28,28,0.1); color: #B91C1C; }
.lp-category-badge.strategy { background: rgba(124,58,237,0.1); color: #7C3AED; }
.lp-category-badge.docs     { background: rgba(6,95,70,0.1); color: #065F46; }

.lp-card-body h4 {
  font-size: var(--text-base);
  color: var(--navy);
  margin-bottom: 10px;
  line-height: 1.4;
}

.lp-card-body > p {
  font-size: var(--text-sm);
  color: var(--text-mid);
  line-height: 1.65;
  margin-bottom: 14px;
}

/* Key points list */
.lp-key-points {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 14px;
  background: var(--light-bg);
  border-radius: var(--radius);
  padding: 12px 14px;
}

.lp-point {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: var(--text-sm);
  color: var(--text-mid);
  line-height: 1.55;
}

.lp-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  background: var(--teal);
  color: white;
  font-size: 0.65rem;
  font-weight: 800;
  border-radius: 6px;
  flex-shrink: 0;
  margin-top: 1px;
}

.lp-point strong { color: var(--navy); }

/* Numbered list style */
.lp-numbered-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 14px;
}

.lp-nl-item {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  font-size: var(--text-sm);
  color: var(--text-mid);
  line-height: 1.55;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

.lp-nl-item:last-child { border-bottom: none; padding-bottom: 0; }

.lp-nl-num {
  min-width: 24px;
  height: 24px;
  background: linear-gradient(135deg, var(--blue), var(--teal));
  color: white;
  font-size: 0.7rem;
  font-weight: 800;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 1px;
}

.lp-nl-item strong { color: var(--navy); }

/* BEP vs BER comparison */
.lp-comparison {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 14px;
}

.lp-compare-col {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
}

.lp-compare-header {
  padding: 8px 12px;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: white;
  text-transform: uppercase;
}

.bep-col .lp-compare-header { background: linear-gradient(135deg, var(--blue), var(--blue-light)); }
.ber-col .lp-compare-header { background: linear-gradient(135deg, var(--teal), var(--teal-light)); }

.lp-compare-label {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-mid);
  padding: 4px 12px 8px;
  background: var(--light-bg);
  border-bottom: 1px solid var(--border);
}

.lp-compare-col ul {
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.lp-compare-col li {
  font-size: var(--text-xs);
  color: var(--text-mid);
  line-height: 1.45;
  padding-left: 12px;
  position: relative;
}

.lp-compare-col li::before {
  content: '▸';
  position: absolute;
  left: 0;
  color: var(--teal);
  font-size: 0.65rem;
}

.lp-compare-col li strong { color: var(--navy); }

/* Insight callout */
.lp-insight {
  font-size: var(--text-sm) !important;
  color: var(--navy) !important;
  font-style: italic;
  background: rgba(0, 180, 166, 0.07);
  border-left: 3px solid var(--teal);
  padding: 10px 14px;
  border-radius: 0 var(--radius) var(--radius) 0;
  margin-top: 4px;
  margin-bottom: 0 !important;
  line-height: 1.6 !important;
}

/* Card footer */
.lp-card-footer {
  padding: 12px 18px;
  border-top: 1px solid var(--border);
  background: var(--light-bg);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}

.lp-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.lp-tags span {
  background: var(--white);
  color: var(--text-mid);
  border: 1px solid var(--border);
  padding: 2px 8px;
  border-radius: 10px;
  font-size: var(--text-xs);
  font-weight: 500;
}

.lp-follow-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: #0A66C2;
  color: white;
  border-radius: 20px;
  padding: 5px 14px;
  font-size: 0.75rem;
  font-weight: 600;
  transition: var(--transition);
  white-space: nowrap;
}

.lp-follow-btn:hover {
  background: #084f9a;
  transform: translateY(-1px);
}

/* Pagination / Load More */
.lp-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.btn-li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 24px;
  background: #0A66C2;
  color: white;
  border-radius: var(--radius);
  font-size: var(--text-base);
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  border: none;
  text-decoration: none;
}

.btn-li:hover {
  background: #084f9a;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(10,102,194,0.35);
}

/* Hidden posts (for load more) */
.lp-card.lp-hidden { display: none; }

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

@media (max-width: 768px) {
  .resources-grid { grid-template-columns: 1fr; }
  .standards-grid { grid-template-columns: 1fr; }
  .filter-layout { flex-direction: column; align-items: stretch; }
  .filter-search { max-width: 100%; }
  .rm-panel { padding: 24px 20px; }
  .linkedin-posts-grid { columns: 1; }
  .lp-comparison { grid-template-columns: 1fr; }
  .lp-pagination { flex-direction: column; }
  .btn-li { width: 100%; justify-content: center; }
}
