/* ============================================================
   Sustainable Supplier Management page
   (builds on eudr-compliance-software.css for hero, form, TOC, FAQ, mid CTAs)
   ============================================================ */

/* Hero: page background image (overrides the shared EUDR hero image; same dark overlay) */
.tg-hero { background-image: linear-gradient(90deg, rgba(3, 27, 26, 0.85) 0%, rgba(3, 27, 26, 0.68) 50%, rgba(3, 27, 26, 0.35) 100%), url('../images/sustainable-supplier-management/sustainable-supplier-management-hero-banner.webp'); background-position: center right; }

/* Hero trust badges with icons */
.tg-hero-badges .ssm-badge { display: inline-flex; align-items: center; gap: 8px; }
.tg-hero-badges .ssm-badge img { flex-shrink: 0; width: 18px; height: 18px; padding: 3px; box-sizing: content-box; border-radius: 6px; background: #e6f4ee; }

/* Shared icon chip (holds an SVG icon) */
.ssm-icon { display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; width: 48px; height: 48px; border-radius: 14px; background: #e6f4ee; color: #0ba56a; font-size: 22px; line-height: 1; }
.ssm-icon img { display: block; width: 28px; height: 28px; }

/* Section illustrations */
.ssm-media { overflow: hidden; border: 1px solid #e1eee7; border-radius: 22px; background: #ffffff; box-shadow: 0 18px 44px rgba(7, 38, 37, 0.08); }
.ssm-media img { display: block; width: 100%; height: auto; }
.ssm-media--wide { max-width: 1200px; margin: 0 auto 36px; }
#questionnaires-vs-traceability .ssm-media--wide { margin-bottom: 28px; }

/* Text + image split ("What is" and "Procurement"): wider image column on the right */
.ssm-intro-split, .ssm-procurement { display: grid; grid-template-columns: minmax(0, 0.7fr) minmax(0, 1.3fr); gap: 40px; align-items: center; max-width: 1320px; margin: 0 auto; }
.ssm-intro-copy h2 { margin: 0 0 18px; color: #173b36; font-family: "Montserrat", sans-serif; font-size: clamp(24px, 3.2vw, 34px); font-weight: 700; line-height: 1.22; }
.ssm-procurement h2 { margin: 0 0 20px; color: #173b36; font-family: "Montserrat", sans-serif; font-size: clamp(24px, 3.2vw, 34px); font-weight: 700; line-height: 1.22; }
.ssm-intro-copy p, .ssm-procurement-body p { margin: 0 0 16px !important; color: #53635f; font-size: 16.5px; line-height: 1.7; }
.ssm-intro-copy p:last-child, .ssm-procurement-body p:last-child { margin-bottom: 0 !important; }

/* Dark sections (Why it can't wait, Industries) */
.ssm-dark-section { position: relative; background-color: #052d26 !important; background-image: radial-gradient(circle at 50% 0%, rgba(16, 185, 129, 0.16) 0%, transparent 65%); padding-top: 84px; padding-bottom: 92px; }
.ssm-dark-section .section-header h2 { color: #ffffff; }
.ssm-dark-section .section-header p { color: #b3d9cc; }
.ssm-dark-grid { display: grid; gap: 20px; }
.ssm-dark-grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.ssm-dark-grid--5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.ssm-dark-card { padding: 28px 24px; border: 1px solid rgba(255, 255, 255, 0.12); border-radius: 20px; background: rgba(255, 255, 255, 0.04); transition: transform .3s ease, border-color .3s ease, background .3s ease; }
.ssm-dark-card:hover { transform: translateY(-5px); border-color: rgba(87, 231, 182, 0.5); background: rgba(11, 165, 106, 0.1); }
.ssm-dark-card .ssm-icon { margin-bottom: 18px; color: #57e7b6; }
.ssm-dark-section .ssm-dark-card h3 { margin: 0 0 10px; color: #ffffff; font-family: "Montserrat", sans-serif; font-size: 19px; font-weight: 700; line-height: 1.3; }
.ssm-dark-section .ssm-dark-card p { margin: 0; color: #b3d9cc; font-size: 15px; line-height: 1.68; }
.ssm-dark-section .internal-links { color: #57e7b6 !important; text-decoration: underline; text-underline-offset: 3px; }
.ssm-dark-section .internal-links:hover { color: #ffffff !important; }

.ssm-note { display: flex; align-items: center; gap: 18px; max-width: 900px; margin: 36px auto 0; padding: 22px 28px; border: 1px solid rgba(87, 231, 182, 0.3); border-radius: 18px; background: rgba(87, 231, 182, 0.08); }
.ssm-note-icon { display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; width: 48px; height: 48px; border-radius: 50%; background: rgba(87, 231, 182, 0.15); color: #57e7b6; font-size: 22px; }
.ssm-dark-section .ssm-note p { margin: 0; color: #e2f4ed; font-size: 16px; line-height: 1.65; }

/* Card grids (benefits, steps, challenges, features) */
.ssm-card-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.ssm-card { display: flex; flex-direction: column; padding: 28px 24px; border: 1.5px solid #e1eee7; border-radius: 20px; background: #ffffff; box-shadow: 0 4px 16px rgba(7, 38, 37, 0.04); transition: transform .3s ease, border-color .3s ease, box-shadow .3s ease; }
.ssm-card:hover { transform: translateY(-4px); border-color: #9cd9bd; box-shadow: 0 18px 38px -12px rgba(11, 165, 106, 0.22); }
.ssm-card > .ssm-icon { margin-bottom: 18px; }
.ssm-card h3 { margin: 0 0 10px; color: #072625; font-family: "Montserrat", sans-serif; font-size: 18px; font-weight: 700; line-height: 1.35; }
.ssm-card p { margin: 0; color: #4b635d; font-size: 15px; line-height: 1.65; }

/* Green links in light sections (beats a shared rule that otherwise wins) */
.page-livestock-traceability .ssm-card a.internal-links,
.page-livestock-traceability .ssm-procurement a.internal-links { color: #0ba56a !important; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.page-livestock-traceability .ssm-card a.internal-links:hover,
.page-livestock-traceability .ssm-procurement a.internal-links:hover { color: #008352 !important; }

/* Six-step cards */
.ssm-step-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.ssm-step-badge { display: inline-flex; align-items: center; height: 30px; padding: 0 14px; border-radius: 999px; background: #0ba56a; color: #ffffff; font-size: 13px; font-weight: 700; }

/* Challenge / solution cards */
.ssm-challenge-card .ssm-challenge { margin-bottom: 12px; padding-bottom: 12px; border-bottom: 1px dashed #e1eee7; }
.ssm-challenge-card .ssm-challenge strong { color: #c8412b; }
.ssm-challenge-card .ssm-solution strong { color: #0ba56a; }

/* Questionnaires vs Verified */
.ssm-compare { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; max-width: 1080px; margin: 0 auto; }
.ssm-compare-card { padding: 32px; border-radius: 20px; }
.ssm-compare-card h3 { display: flex; align-items: center; gap: 10px; margin: 0 0 14px; font-family: "Montserrat", sans-serif; font-size: 21px; font-weight: 700; line-height: 1.3; }
.ssm-compare-card p { margin: 0; font-size: 15.5px; line-height: 1.7; }
.ssm-compare-card--before { border: 1px solid #f1dcd6; background: #fff7f5; }
.ssm-compare-card--before h3 { color: #173b36; }
.ssm-compare-card--before h3 i { color: #c8412b; }
.ssm-compare-card--before p { color: #53635f; }
.ssm-compare-card--after { border: 1px solid rgba(87, 231, 182, 0.45); background: linear-gradient(160deg, #0b6b4a 0%, #052d26 100%); box-shadow: 0 18px 46px rgba(11, 165, 106, 0.18); }
.ssm-compare-card--after h3 { color: #ffffff; }
.ssm-compare-card--after h3 i { color: #57e7b6; }
.ssm-compare-card--after p { color: #e2f4ed; }

/* Comparison table */
.ssm-table-wrap { max-width: 1080px; margin: 0 auto; overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid #dce8e2; border-radius: 18px; background: #ffffff; box-shadow: 0 10px 30px rgba(23, 59, 54, 0.06); }
.ssm-table { width: 100%; margin: 0; border-collapse: collapse; table-layout: fixed; text-align: left; }
.ssm-table thead th { padding: 18px 22px; background: #173b36; color: #ffffff; font-family: "Montserrat", sans-serif; font-size: 15px; font-weight: 700; border: none; }
.ssm-table thead th:first-child { width: 22%; }
.ssm-table thead th.ssm-col-highlight { background: #0ba56a; }
.ssm-table tbody th, .ssm-table tbody td { padding: 18px 22px; border-bottom: 1px solid #eef2ef; font-size: 15px; line-height: 1.6; vertical-align: top; }
.ssm-table tbody th { background: #f8fbf9; color: #173b36; font-weight: 700; }
.ssm-table tbody td { color: #53635f; }
.ssm-table tbody td.ssm-col-highlight { background: #f2faf5; color: #173b36; font-weight: 500; }
.ssm-table tbody tr:last-child th, .ssm-table tbody tr:last-child td { border-bottom: none; }

/* How to choose checklist */
#how-to-choose { padding: 65px 20px; background: #f6f9f7; color: #172b24; }
#how-to-choose .checklist-container { max-width: 900px; margin: auto; }
#how-to-choose .checklist-header { max-width: 720px; margin: 0 auto 35px; text-align: center; }
#how-to-choose .checklist-header h2 { margin: 0 0 14px; color: #173b36; font-family: "Montserrat", sans-serif; font-size: clamp(24px, 3.2vw, 34px); font-weight: 700; line-height: 1.22; }
#how-to-choose .checklist-header p { color: #68776f; font-size: 15.5px; line-height: 1.7; }
#how-to-choose .checklist-progress { margin-bottom: 22px; }
#how-to-choose .progress-info { display: flex; justify-content: space-between; gap: 10px; margin-bottom: 12px; font-size: 14px; }
#how-to-choose .progress-info strong { color: #16834d; }
#how-to-choose .progress-track { height: 7px; overflow: hidden; border-radius: 20px; background: #dce8df; }
#how-to-choose .progress-fill { width: 0%; height: 100%; border-radius: 20px; background: #16834d; transition: width .3s ease; }
#how-to-choose .checklist-items { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; }
#how-to-choose .checklist-item { position: relative; display: flex; align-items: flex-start; gap: 13px; min-height: 80px; padding: 19px; border: 1px solid #e5ece7; border-radius: 12px; background: #ffffff; cursor: pointer; transition: .2s ease; }
#how-to-choose .checklist-item:hover { border-color: #16834d; transform: translateY(-2px); }
#how-to-choose .checklist-item input { position: absolute; width: 1px; height: 1px; opacity: 0; }
#how-to-choose .custom-check { position: relative; flex-shrink: 0; width: 21px; height: 21px; border: 1.5px solid #b9c9be; border-radius: 6px; transition: .2s; }
#how-to-choose .checklist-item input:focus-visible + .custom-check { outline: 2px solid #16834d; outline-offset: 2px; }
#how-to-choose .checklist-item input:checked + .custom-check { border-color: #16834d; background: #16834d; }
#how-to-choose .checklist-item input:checked + .custom-check::after { content: "\2713"; position: absolute; top: 0; left: 4px; color: #ffffff; font-size: 14px; font-weight: 700; }
#how-to-choose .item-text { color: #34463b; font-size: 14.5px; line-height: 1.6; }
#how-to-choose .checklist-item input:checked ~ .item-text { color: #16834d; }
#how-to-choose .checklist-result { display: none; align-items: center; gap: 18px; margin-top: 22px; padding: 20px; border-radius: 12px; background: #eaf4ed; }
#how-to-choose .result-score { display: grid; place-items: center; min-width: 65px; height: 65px; border-radius: 12px; background: #ffffff; color: #16834d; font-size: 20px; font-weight: 800; }
#how-to-choose .checklist-result strong { color: #172b24; font-size: 16px; }
#how-to-choose .checklist-result p { margin: 5px 0 0; color: #63766a; font-size: 13.5px; line-height: 1.5; }
#how-to-choose .checklist-cta { display: none; align-items: center; justify-content: space-between; gap: 25px; margin-top: 22px; padding: 30px 35px; border-radius: 16px; background: #103c2b; animation: ssmRevealCTA .45s ease; }
@keyframes ssmRevealCTA { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
#how-to-choose .checklist-cta p { margin: 0; max-width: 540px; color: #e2f4ed; font-size: 16px; line-height: 1.6; }
#how-to-choose .cta-button { display: inline-block; padding: 15px 21px; border-radius: 8px; background: #7be0a5; color: #103c2b; font-size: 14px; font-weight: 700; text-decoration: none; white-space: nowrap; transition: .2s; }
#how-to-choose .cta-button:hover { background: #ffffff; transform: translateY(-2px); }
#how-to-choose .cta-button span { margin-left: 8px; }

/* Why choose TransGenie */
.ssm-why-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; max-width: 1080px; margin: 0 auto; }
.ssm-why-item { display: flex; align-items: flex-start; gap: 18px; padding: 24px; border: 1.5px solid #e1eee7; border-radius: 18px; background: #ffffff; transition: border-color .25s ease, transform .25s ease; }
.ssm-why-item:hover { transform: translateY(-3px); border-color: #9cd9bd; }
.ssm-why-item:last-child:nth-child(odd) { grid-column: 1 / -1; }
.ssm-why-item h3 { margin: 0 0 6px; color: #072625; font-family: "Montserrat", sans-serif; font-size: 18px; font-weight: 700; line-height: 1.35; }
.ssm-why-item p { margin: 0; color: #4b635d; font-size: 15px; line-height: 1.65; }

/* Responsive */
@media (max-width: 1199px) {
  .ssm-dark-grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ssm-dark-grid--5 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 1024px) {
  .ssm-intro-split, .ssm-procurement { grid-template-columns: 1fr; gap: 24px; }
}
@media (max-width: 991px) {
  .ssm-card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ssm-dark-grid--5 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 767px) {
  .tg-hero { background-image: linear-gradient(180deg, rgba(3, 27, 26, 0.94) 0%, rgba(3, 27, 26, 0.88) 100%), url('../images/sustainable-supplier-management/sustainable-supplier-management-hero-banner.webp'); background-position: center; }
  .ssm-media { border-radius: 14px; }
  .ssm-media--wide { margin-bottom: 20px; }
  .ssm-intro-copy p, .ssm-procurement-body p { font-size: 15px; }
  .ssm-dark-section { padding-top: 60px; padding-bottom: 60px; }
  .ssm-dark-grid--4, .ssm-dark-grid--5, .ssm-card-grid, .ssm-compare, .ssm-why-list { grid-template-columns: 1fr; gap: 12px; }
  .ssm-icon { width: 42px; height: 42px; border-radius: 12px; font-size: 19px; }
  .ssm-icon img { width: 24px; height: 24px; }
  .ssm-card, .ssm-dark-card { padding: 20px 18px; border-radius: 14px; }
  .ssm-card h3, .ssm-dark-section .ssm-dark-card h3, .ssm-why-item h3, .ssm-compare-card h3 { font-size: 16px !important; line-height: 1.3 !important; }
  .ssm-card p, .ssm-dark-section .ssm-dark-card p, .ssm-why-item p, .ssm-compare-card p { font-size: 14px; line-height: 1.55; }
  .ssm-note { flex-direction: column; align-items: flex-start; gap: 12px; padding: 20px; }
  .ssm-dark-section .ssm-note p { font-size: 14.5px; }
  .ssm-compare-card { padding: 22px; }
  .ssm-table { min-width: 600px; }
  .ssm-table thead th, .ssm-table tbody th, .ssm-table tbody td { padding: 14px 16px; font-size: 14px; }
  .ssm-why-item { padding: 18px; gap: 14px; }
  .ssm-why-item:last-child:nth-child(odd) { grid-column: auto; }
  #how-to-choose { padding: 45px 15px; }
  #how-to-choose .checklist-items { grid-template-columns: 1fr; }
  #how-to-choose .checklist-cta { flex-direction: column; align-items: flex-start; padding: 24px; }
  #how-to-choose .cta-button { width: 100%; text-align: center; }
}
@media (prefers-reduced-motion: reduce) {
  .ssm-card, .ssm-card:hover, .ssm-dark-card, .ssm-dark-card:hover, .ssm-why-item, .ssm-why-item:hover { transition: none; transform: none; }
}
