/* Smart Business 360 — Resources mega menu + Documentation hub */

.nav-resources {
  position: static;
}

@media (min-width: 992px) {
  .nav-resources {
    position: relative;
  }

  .nav-resources .resources-mega {
    left: 50%;
    transform: translateX(-42%);
  }
}

.resources-mega {
  --res-navy: #003366;
  --res-ink: #0f172a;
  --res-muted: #64748b;
  --res-line: #e2e8f0;
  --res-soft: #f8fafc;
  display: none;
  width: min(760px, calc(100vw - 32px)) !important;
  max-width: min(760px, calc(100vw - 32px)) !important;
  min-width: min(760px, calc(100vw - 32px)) !important;
  max-height: none !important;
  overflow: visible !important;
  padding: 0 !important;
  border: 1px solid var(--res-line) !important;
  border-radius: 14px !important;
  box-shadow: 0 18px 48px rgba(15, 23, 42, 0.12) !important;
  background: #fff !important;
  margin-top: 10px !important;
}

nav.main-nav li.nav-resources:hover > .resources-mega,
nav.main-nav li.nav-resources.show > .resources-mega,
nav.main-nav .resources-mega.show {
  display: block !important;
}

.resources-mega-inner {
  padding: 18px 18px 14px;
}

.resources-mega-cols {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px 18px;
}

.resources-mega-label {
  margin: 0 0 8px;
  font-size: 0.68rem;
  font-weight: 750;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--res-muted);
}

.resources-mega-link {
  display: flex !important;
  align-items: center;
  gap: 10px;
  padding: 9px 10px !important;
  border-radius: 8px;
  color: var(--res-ink) !important;
  font-size: 0.9rem !important;
  font-weight: 550 !important;
  text-decoration: none !important;
  white-space: normal !important;
  transition: background 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.resources-mega-link i {
  width: 16px;
  color: var(--res-navy);
  opacity: 0.85;
  flex-shrink: 0;
}

.resources-mega-link:hover,
.resources-mega-link:focus-visible {
  background: rgba(0, 51, 102, 0.06) !important;
  color: var(--res-navy) !important;
  outline: none;
}

.resources-mega-link:hover span::after {
  content: " →";
  opacity: 0.7;
}

.resources-mega-foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--res-line);
}

.resources-mega-foot a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.88rem;
  font-weight: 650;
  color: var(--res-navy);
  text-decoration: none;
}

.resources-mega-foot a:hover {
  text-decoration: underline;
}

/* Documentation hub */
body.lp-docs {
  background: #fff;
  color: var(--res-ink, #0f172a);
}

.docs-hero {
  padding: clamp(72px, 10vw, 110px) 0 clamp(40px, 6vw, 56px);
  background:
    radial-gradient(900px 320px at 12% -10%, rgba(0, 80, 153, 0.1), transparent 60%),
    linear-gradient(180deg, #f7fafc 0%, #ffffff 78%);
  border-bottom: 1px solid #e2e8f0;
}

.docs-wrap {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
}

.docs-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid #e2e8f0;
  background: #fff;
  color: #003366;
  font-size: 0.78rem;
  font-weight: 650;
  margin-bottom: 14px;
}

.docs-hero h1 {
  margin: 0 0 10px;
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #001a33;
}

.docs-hero-lead {
  margin: 0 0 22px;
  max-width: 640px;
  color: #475569;
  font-size: 1.05rem;
  line-height: 1.6;
}

.docs-search {
  position: relative;
  max-width: 640px;
}

.docs-search i {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: #94a3b8;
}

.docs-search input {
  width: 100%;
  min-height: 52px;
  padding: 12px 16px 12px 44px;
  border: 1px solid #dbe3ef;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.05);
  font: inherit;
  font-size: 1rem;
  color: #0f172a;
}

.docs-search input:focus {
  outline: 2px solid rgba(0, 51, 102, 0.25);
  outline-offset: 1px;
  border-color: #003366;
}

.docs-search-empty {
  margin-top: 10px;
  color: #64748b;
  font-size: 0.92rem;
}

.docs-section {
  padding: clamp(40px, 6vw, 64px) 0;
}

.docs-section h2 {
  margin: 0 0 8px;
  font-size: clamp(1.35rem, 2.5vw, 1.7rem);
  font-weight: 750;
  color: #001a33;
}

.docs-section-lead {
  margin: 0 0 24px;
  color: #64748b;
  max-width: 560px;
}

.docs-cat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.docs-cat-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 20px;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  background: #fff;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
  min-height: 168px;
}

.docs-cat-card:hover {
  border-color: rgba(0, 51, 102, 0.28);
  box-shadow: 0 12px 28px rgba(0, 51, 102, 0.08);
  transform: translateY(-2px);
  color: inherit;
}

.docs-cat-icon {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 51, 102, 0.08);
  color: #003366;
}

.docs-cat-card h3 {
  margin: 0;
  font-size: 1.02rem;
  font-weight: 720;
  color: #0f172a;
}

.docs-cat-card p {
  margin: 0;
  color: #64748b;
  font-size: 0.88rem;
  line-height: 1.45;
  flex: 1;
}

.docs-cat-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.82rem;
  font-weight: 650;
  color: #003366;
}

.docs-guide-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.docs-guide-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 18px;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  background: #fff;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
  min-height: 180px;
}

.docs-guide-card:hover {
  border-color: rgba(0, 51, 102, 0.28);
  box-shadow: 0 12px 28px rgba(0, 51, 102, 0.08);
  transform: translateY(-2px);
  color: inherit;
}

.docs-guide-cat {
  font-size: 0.72rem;
  font-weight: 750;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #64748b;
}

.docs-guide-card h3 {
  margin: 0;
  font-size: 1.02rem;
  font-weight: 720;
  color: #0f172a;
}

.docs-guide-card p {
  margin: 0;
  color: #64748b;
  font-size: 0.88rem;
  line-height: 1.45;
  flex: 1;
}

.docs-guide-cta {
  font-size: 0.88rem;
  font-weight: 650;
  color: #003366;
}

.docs-help {
  background: linear-gradient(135deg, #001a33 0%, #003366 100%);
  color: #fff;
  border-radius: 16px;
  padding: clamp(28px, 4vw, 40px);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
}

.docs-help h2 {
  margin: 0 0 6px;
  color: #fff;
  font-size: 1.35rem;
}

.docs-help p {
  margin: 0;
  color: rgba(255, 255, 255, 0.82);
}

.docs-help .btn {
  background: #fff;
  color: #003366;
  border: none;
}

.docs-help .btn:hover {
  background: #f1f5f9;
  color: #001a33;
}

.docs-category-block {
  margin-bottom: 36px;
}

.docs-category-block h2 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

@media (max-width: 1100px) {
  .docs-cat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .docs-guide-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 991px) {
  .nav-resources {
    position: static;
    width: 100%;
  }

  .resources-mega {
    position: static !important;
    transform: none !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
    margin: 8px 0 0 !important;
    box-shadow: none !important;
    border: 1px solid #e2e8f0 !important;
  }

  .resources-mega-cols {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .resources-mega-foot {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 640px) {
  .docs-cat-grid,
  .docs-guide-grid {
    grid-template-columns: 1fr;
  }

  .docs-wrap {
    width: calc(100% - 28px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .docs-cat-card,
  .docs-guide-card,
  .resources-mega-link {
    transition: none;
  }

  .docs-cat-card:hover,
  .docs-guide-card:hover {
    transform: none;
  }
}
