/*
 * Main styles for the Trailhead-style landing page.
 */

:root {
  --trailhead-blue: #032d60;
  --trailhead-link: #0b5cab;
  --trailhead-border: #d9dde6;
  --trailhead-text: #16325c;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  color: var(--trailhead-text);
  background: #fff;
}

a {
  color: inherit;
  text-decoration: none;
}

.trailhead-page {
  min-height: 100vh;
}

.logo-text {
  font-size: 34px;
  line-height: 1;
  font-weight: 800;
  color: var(--trailhead-blue);
}

/* Header styles matching provided markup */
.th-header {
  width: 100%;
  border-bottom: 1px solid #d8dde6;
  background: #fff;
  color: #032d60;
  font-family: inherit;
}

.th-container {
  width: 100%;
  padding: 0 22px;
}

.th-topbar {
  height: 44px;
  border-bottom: 1px solid #d8dde6;
}

.th-topbar-inner,
.th-navbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.th-topbar-left,
.th-top-links,
.th-topbar-right,
.th-nav-left,
.th-main-links {
  display: flex;
  align-items: center;
}

.th-topbar-left { gap: 30px; }
.th-topbar-right { gap: 14px; margin-left: auto; }

.th-salesforce-logo {
  width: 76px;
  height: 28px;
  object-fit: contain;
}

.th-top-links { gap: 26px; }

.th-top-links a {
  font-size: 16px;
  line-height: 1;
  font-weight: 700;
  color: #032d60;
}

.th-search-pill {
  width: 280px;
  border: 1px solid #d8dde6;
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 12px;
  color: #8a94a6;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.th-phone-icon-btn {
  border: 0;
  background: transparent;
  padding: 0;
  color: #032d60;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.th-phone-icon {
  width: 18px;
  height: 18px;
  display: block;
}

.th-user-dot {
  width: 22px;
  height: 22px;
  border-radius: 999px;
  border: 1px solid #d8dde6;
  background: #f6f7f9;
}

.th-navbar { height: 56px; }
.th-nav-left { gap: 28px; }

.th-brand {
  font-size: 24px;
  font-weight: 800;
  line-height: 1;
  color: #032d60;
}

.th-main-links { gap: 22px; }

.th-main-links > a,
.th-main-links > .th-cert-wrap > .th-cert-trigger {
  font-size: 16px;
  line-height: 1;
  font-weight: 700;
  color: #032d60;
}

.th-main-links > .th-cert-wrap > .th-cert-trigger {
  border: 0;
  background: transparent;
  padding: 0;
  cursor: pointer;
  color: #0176d3;
}

.th-signup {
  border-radius: 4px;
  background: #0176d3;
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 700;
  color: #fff;
}

.th-cert-wrap { position: relative; }
.th-cert-menu {
  pointer-events: none;
  visibility: hidden;
  opacity: 0;
  position: absolute;
  left: 50%;
  top: calc(100% + 12px);
  transform: translateX(-50%);
  width: min(980px, calc(100vw - 36px));
  border: 1px solid #d9dde6;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 8px 18px rgb(0 0 0 / 12%);
  padding: 44px 40px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  transition: opacity 150ms ease, visibility 150ms ease;
  z-index: 30;
}

.th-cert-menu::before {
  content: "";
  position: absolute;
  top: -9px;
  left: 50%;
  width: 16px;
  height: 16px;
  transform: translateX(-50%) rotate(45deg);
  background: #fff;
  border-left: 1px solid #d9dde6;
  border-top: 1px solid #d9dde6;
}

.th-cert-wrap:hover .th-cert-menu,
.th-cert-wrap:focus-within .th-cert-menu {
  pointer-events: auto;
  visibility: visible;
  opacity: 1;
}

.th-cert-col + .th-cert-col {
  border-left: 1px solid #e1e5ee;
  margin-left: 28px;
  padding-left: 56px;
}

.th-cert-heading {
  margin: 0 0 22px;
  font-size: 18px;
  line-height: 1.25;
  font-weight: 500;
  color: #4f5d75;
}

.th-cert-col a {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  margin: 0 0 8px;
  font-size: 17px;
  line-height: 1.2;
  font-weight: 700;
  color: #032d60;
}

.th-main-links a,
.th-cert-trigger {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.th-icon-caret {
  width: 12px;
  height: 12px;
  color: #6d7d99;
  display: block;
}

.th-icon-launch {
  width: 15px;
  height: 15px;
  color: #183b66;
  display: block;
}

.th-cert-col p {
  margin: 0 0 36px;
  font-size: 15px;
  line-height: 1.5;
  color: #1f2f46;
}

.th-cert-col p:last-child {
  margin-bottom: 0;
}

main {
  margin: 0;
}

.hero {
  width: min(1240px, 96%);
  margin: 46px auto;
  display: grid;
  grid-template-columns: minmax(460px, 1fr) minmax(520px, 1fr);
  gap: 52px;
  align-items: center;
}

.hero-content h1 {
  margin: 0 0 14px;
  color: var(--trailhead-blue);
  font-size: 3rem;
  line-height: 1;
  font-weight: 800;
}

.hero-content p {
  font-size: 16px;
  line-height: 1.45;
  max-width: 500px;
  color: #16325c;
}

.hero-actions {
  margin-top: 20px;
  display: flex;
  gap: 10px;
}

.btn {
  display: inline-block;
  padding: 9px 14px;
  border-radius: 4px;
  font-weight: 700;
  font-size: 13px;
  line-height: 1;
}

.btn-primary {
  background: #0176d3;
  color: #fff;
}

.btn-outline {
  border: 1px solid #2574c5;
  color: var(--trailhead-link);
  background: #fff;
}

.hero-illustration {
  min-height: 310px;
}

.banner-image {
  width: 100%;
  display: block;
  border-radius: 12px;
  border: 1px solid #dfe3eb;
}

.certification-mega {
  margin: 0;
  width: 760px;
  background: #fff;
  border-radius: 12px;
  border: 1px solid #e3e8f0;
  box-shadow: 0 8px 20px rgb(0 0 0 / 5%);
  display: none;
  grid-template-columns: 1fr 1fr;
  position: absolute;
  top: calc(100% + 14px);
  left: 50%;
  transform: translateX(-45%);
  z-index: 8;
}

.cert-menu-wrapper {
  position: relative;
}

.cert-menu-wrapper:hover .certification-mega,
.cert-menu-wrapper:focus-within .certification-mega {
  display: grid;
}

.menu-col {
  padding: 26px 22px;
}

.menu-col + .menu-col {
  border-left: 1px solid #e8ecf3;
}

.menu-col .eyebrow {
  margin-top: 0;
  color: #495b72;
  font-size: 18px;
}

.menu-col a {
  display: block;
  color: var(--trailhead-blue);
  font-weight: 700;
  margin-top: 18px;
  margin-bottom: 6px;
}

.menu-col p {
  margin: 0;
  line-height: 1.4;
  color: #45586f;
}

.skills-section {
  margin-top: 72px;
  background-image: url("/assets/home-skills-bg-339e87aa.jpg");
  background-position: bottom center;
  background-size: cover;
  background-repeat: no-repeat;
}

.skills-overlay {
  background: rgb(255 255 255 / 60%);
}

.skills-container {
  width: min(1280px, 100%);
  margin: 0 auto;
  padding: 40px 16px 144px;
}

.skills-section h2 {
  text-align: center;
  margin: 0 0 40px;
  color: var(--trailhead-blue);
  font-size: 3rem;
  font-weight: 800;
  line-height: 1.05;
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  width: min(1040px, 100%);
  margin: 0 auto;
}

.skill-card {
  position: relative;
  background: #fff;
  border: 1px solid #d4d8e1;
  border-radius: 16px;
  padding: 1.25rem;
  box-shadow: 0 1px 2px rgb(15 23 42 / 8%);
}

.skill-topbar {
  height: 6px;
  width: calc(100% + 48px);
  margin-left: -24px;
  margin-top: -24px;
  margin-bottom: 18px;
  border-radius: 16px 16px 0 0;
  background: #5c2d91;
}

.skill-card h3 {
  margin: 0;
  color: var(--trailhead-blue);
  font-size: 32px;
  line-height: 1;
  font-weight: 700;
}

.skill-card p {
  margin: 14px 0 0;
  line-height: 1.25rem;
  font-size: 18px;
  font-weight: 400;
  color: #16325c;
}

.agentblazer-section {
  margin-top: 40px;
  padding: 48px 0;
}

.agentblazer-container {
  width: min(1280px, 100%);
  margin: 0 auto;
  padding: 0 16px;
}

.section-head {
  width: 100%;
  margin: 0 0 24px;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 12px;
}

.section-head h2,
.trailblazers-heading h2 {
  margin: 0;
  color: var(--trailhead-blue);
  font-size: 1.5rem;
  line-height: 1.2;
  font-weight: 700;
}

.section-head a {
  color: var(--trailhead-link);
  font-weight: 600;
  font-size: 14px;
}

.agentblazer-grid,
.trailblazers-grid {
  width: 100%;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.learning-card {
  background: #fff;
  border: 1px solid #d4d8e1;
  border-radius: 16px;
  padding: 1.25rem;
  box-shadow: 0 1px 2px rgb(15 23 42 / 6%);
}

.learning-icon {
  width: 40px;
  height: 40px;
  margin-bottom: 16px;
}

.learning-type {
  margin-top: 0;
  display: block;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #0176d3;
  font-weight: 600;
}

.learning-card h4 {
  margin: 8px 0 0;
  color: #0d2e57;
  font-size: 1.125rem;
  line-height: 1.2;
  font-weight: 700;
}

.learning-card p {
  margin: 12px 0 0;
  color: #16325c;
  line-height: 1.7;
  font-size: 0.875rem;
}

.learning-card a {
  margin-top: 20px;
  display: inline-block;
  color: var(--trailhead-link);
  font-weight: 600;
  font-size: 14px;
}

.profile-card {
  background: #fff;
  border: 1px solid #d4d8e1;
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 1px 2px rgb(15 23 42 / 6%);
}

.profile-card p {
  margin: 0;
  color: #16325c;
  line-height: 1.75;
  font-size: 14px;
}

.profile-card a {
  margin-top: 16px;
  display: inline-block;
  color: var(--trailhead-link);
  font-weight: 600;
  font-size: 14px;
}

.trailblazers-section {
  padding: 56px 0;
}

.cert-widget-layout {
  width: min(1240px, 96%);
  margin: 36px auto 24px;
}

.cert-widget-layout-page {
  margin-top: 28px;
  margin-bottom: 48px;
}

.cert-widget-panel {
  min-width: 0;
}

.cert-count {
  font-size: 12px;
  color: #2f3d53;
  margin-bottom: 10px;
}

.trailblazers-container {
  width: min(1280px, 100%);
  margin: 0 auto;
  padding: 0 16px;
}

.trailblazers-heading {
  margin-bottom: 24px;
  display: flex;
  justify-content: center;
  text-align: center;
}

.trailblazers-heading h2 {
  font-size: 32px;
}

.profile-image-wrap {
  margin-bottom: 16px;
  overflow: hidden;
  border-radius: 12px;
}

.profile-image {
  width: 100%;
  height: auto;
  display: block;
}

.trailhead-footer {
  margin-top: 8px;
}

.footer-quick-links {
  border-top: 1px solid #e4e8f0;
  padding: 26px 12px;
  display: flex;
  justify-content: center;
  gap: 30px;
  flex-wrap: wrap;
}

.footer-quick-links a {
  color: #0b5cab;
  font-size: 14px;
  font-weight: 700;
}

.footer-main {
  background: #032d60;
  color: #c7d5ea;
  border-radius: 0 0 16px 16px;
  padding: 34px min(120px, 9vw) 24px;
}

.footer-columns {
  display: grid;
  grid-template-columns: repeat(4, minmax(140px, 1fr));
  gap: 24px;
}

.footer-col h4 {
  margin: 0 0 12px;
  color: #fff;
  font-size: 16px;
}

.footer-col a {
  display: block;
  margin: 8px 0;
  font-size: 14px;
  color: #b4c6de;
}

.footer-bottom {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid rgb(110 145 188 / 35%);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.footer-copy {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
}

.footer-globe {
  width: 20px;
  height: 20px;
  border-radius: 999px;
  background: #0ea5e9;
  color: #032d60;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
}

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

.footer-legal a {
  font-size: 13px;
  color: #c0d0e6;
}

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

  .hero-content p {
    font-size: 24px;
  }

  .hero-content h1 {
    font-size: 2.4rem;
  }

  .certification-mega {
    width: 100%;
  }

  .skills-section h2,
  .section-head h2,
  .trailblazers-heading h2 {
    font-size: 32px;
  }

  .learning-card h4 {
    font-size: 24px;
  }

  .skill-card h3 {
    font-size: 26px;
  }

  .skill-card p,
  .learning-card p,
  .profile-card p {
    font-size: 16px;
  }
}

@media (max-width: 800px) {
  .utility-nav {
    flex-wrap: wrap;
    padding: 8px 0;
  }

  .search-wrap {
    margin-left: 0;
  }

  .search-wrap input {
    width: 100%;
  }

  .main-nav {
    flex-wrap: wrap;
    gap: 10px;
    padding: 10px 0;
  }

  .main-nav nav {
    flex-wrap: wrap;
    gap: 12px;
    font-size: 16px;
  }

  .logo-text {
    font-size: 28px;
  }

  .certification-mega {
    width: min(760px, 92vw);
    left: 0;
    transform: none;
    grid-template-columns: 1fr;
  }

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

  .skills-container {
    padding-bottom: 96px;
  }

  .agentblazer-grid,
  .trailblazers-grid {
    grid-template-columns: 1fr;
  }

  .menu-col + .menu-col {
    border-left: 0;
    border-top: 1px solid #e8ecf3;
  }

  .section-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .profile-image { height: auto; }

  .footer-main {
    border-radius: 0;
    padding: 28px 20px;
  }

  .footer-columns {
    grid-template-columns: repeat(2, minmax(120px, 1fr));
  }

  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
  }
}

.cert-content-host {
  display: block;
  width: 100%;
}

.cert-content-fallback {
  width: min(1152px, 92%);
  margin: 64px auto;
  color: #032d60;
}

.cert-content-fallback h1 {
  font-size: 32px;
  font-weight: 800;
  margin: 0 0 12px;
}

.cert-content-fallback p {
  color: #181818;
  font-size: 16px;
}

/* --- BFF demo (auth form + dashboard) ------------------------------------ */
.th-auth-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 360px;
  margin-top: 24px;
}

.th-auth-form label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-weight: 600;
  color: #032d60;
}

.th-auth-form input {
  padding: 10px 12px;
  border: 1px solid #c9c9c9;
  border-radius: 6px;
  font-size: 15px;
}

.th-auth-error {
  color: #ba0517;
  font-weight: 600;
}

.bff-status {
  margin-top: 16px;
  color: #032d60;
  font-size: 15px;
}

/* Dashboard layout — mirrors the landing-page certification widget. */
.dashboard-section {
  width: min(1152px, 92%);
  margin: 48px auto 96px;
}

.dashboard-head {
  margin-bottom: 32px;
}

.dashboard-head h1 {
  font-size: 32px;
  font-weight: 800;
  color: #032d60;
  margin: 0 0 12px;
}

.dashboard-head p {
  color: #181818;
  font-size: 16px;
  max-width: 720px;
  margin: 0 0 16px;
}

/* Cards styled to match the Next.js cert-widget cards on the landing page. */
.cert-card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  margin-top: 24px;
}

.cert-card {
  position: relative;
  border-radius: 24px;
  background: #fff;
  padding: 32px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
  transition: box-shadow 0.2s ease;
  overflow: hidden;
}

.cert-card:hover {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.cert-card-tag {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
}

.cert-card-icon {
  height: 24px;
  width: 24px;
  object-fit: contain;
}

.cert-card-tag span {
  font-size: 0.75rem;
  font-weight: 500;
  color: #032d60;
}

.cert-card-title {
  display: block;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.3;
  color: #032d60;
  margin: 0 0 24px;
  text-decoration: none;
}

a.cert-card-title:hover {
  text-decoration: underline;
}

.cert-card-desc {
  font-size: 0.875rem;
  line-height: 1.6;
  color: #181818;
  margin: 0;
}

.cert-card-empty {
  grid-column: 1 / -1;
  border: 1px solid #e5e5e5;
  border-radius: 12px;
  padding: 40px;
  text-align: center;
  color: #9a9a9a;
}

@media (max-width: 900px) {
  .cert-card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 600px) {
  .cert-card-grid { grid-template-columns: 1fr; }
}