/*
 * Auro Pacific Care — desktop typography / navigation refinement
 * Add this file AFTER assets/style.css. It preserves the existing layout,
 * components and page flow while reducing visual weight and header height.
 */

:root {
  --apc-brand-blue: #163f8f;
  --apc-brand-green: #31a85e;
  --apc-text: #17345f;
  --apc-muted: #60799c;
  --apc-line: #e3eaf2;
}

/* ---------- Global editorial typography ---------- */
body {
  font-size: 15px;
  line-height: 1.58;
  color: var(--apc-text);
}

h1,
h2,
h3,
h4,
h5,
h6,
strong,
.btn,
.primary-btn,
.secondary-btn,
.site-nav a,
.nav-badge {
  font-weight: 600 !important;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  letter-spacing: -0.018em;
}

p {
  font-weight: 400;
}

/* ---------- Header ---------- */
.site-header {
  background: #fff;
}

.header-inner {
  min-height: 94px;
  display: flex;
  align-items: center;
  gap: 22px;
}

.brand {
  flex: 0 0 auto;
  min-width: 0;
}

.brand-copy strong {
  font-size: 32px !important;
  line-height: 1.02;
  font-weight: 700 !important;
  white-space: nowrap;
}

.brand-copy small {
  margin-top: 7px;
  font-size: 13px !important;
  line-height: 1.2;
  font-weight: 500 !important;
  letter-spacing: .01em;
}

.header-search {
  flex: 1 1 520px;
  max-width: 540px;
  min-width: 300px;
  margin-left: auto;
}

.search-form {
  height: 48px;
  border: 1px solid #dce4ed;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 6px 18px rgba(21, 57, 95, .06);
  overflow: hidden;
}

.search-form input {
  font-size: 15px !important;
  font-weight: 400 !important;
  padding: 0 16px;
}

.search-form button {
  width: 48px;
  min-width: 48px;
  font-size: 18px !important;
  font-weight: 500 !important;
}

.menu-toggle {
  flex: 0 0 auto;
}

/* Keep the existing row/flow; only tighten it and move the nav to the right. */
.nav-row {
  min-height: 52px;
  border-top: 1px solid #eef2f6;
  border-bottom: 1px solid var(--apc-line);
  background: rgba(255,255,255,.98);
}

.nav-inner {
  min-height: 52px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.nav-badge {
  position: relative;
  flex: 0 0 auto;
  min-height: 44px;
  padding: 0 17px !important;
  border-radius: 13px !important;
  font-size: 13px !important;
  line-height: 1;
  letter-spacing: -.01em;
  white-space: nowrap;
}

.nav-badge small {
  font-size: 11px !important;
  font-weight: 600 !important;
  opacity: .82;
}

.site-nav {
  margin-left: auto !important;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 26px !important;
  min-width: 0;
}

.site-nav a {
  padding: 17px 0 !important;
  font-size: 13.5px !important;
  line-height: 1 !important;
  color: #203d68;
  font-weight: 600 !important;
  white-space: nowrap;
}

.site-nav a:hover,
.site-nav a:focus-visible,
.site-nav a.active {
  color: var(--apc-brand-blue);
}

/* ---------- All Categories hover menu ---------- */
.category-menu {
  position: absolute;
  top: calc(100% + 9px);
  left: 0;
  width: 560px;
  max-width: min(560px, calc(100vw - 30px));
  padding: 14px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  background: #fff;
  border: 1px solid #dfe8f0;
  border-radius: 16px;
  box-shadow: 0 18px 40px rgba(24, 52, 88, .16);
  opacity: 0;
  visibility: hidden;
  transform: translateY(5px);
  pointer-events: none;
  transition: opacity .16s ease, transform .16s ease, visibility .16s ease;
  z-index: 1200;
}

.nav-badge:hover .category-menu,
.nav-badge:focus-within .category-menu,
.nav-badge.category-open .category-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}

.category-menu a {
  display: block;
  padding: 10px 12px;
  border-radius: 10px;
  color: #1d3b66;
  text-decoration: none;
  font-size: 13.5px;
  line-height: 1.25;
  font-weight: 600;
}

.category-menu a:hover,
.category-menu a:focus-visible {
  background: #f1f7f3;
  color: #1d8b4c;
}

/* ---------- Home page typography ---------- */
.hero-copy h1 {
  font-size: clamp(42px, 3.7vw, 54px) !important;
  line-height: 1.02 !important;
  font-weight: 700 !important;
}

.hero-copy > p {
  max-width: 610px;
  font-size: 15px !important;
  line-height: 1.6 !important;
}

.metric strong,
.trust-card h4,
.section-head h2,
.category-card strong,
.story-card h3,
.side-stack h3,
.tool-card h3 {
  font-weight: 650 !important;
}

.metric strong {
  font-size: 15px !important;
}

.metric span,
.trust-card p,
.story-card p,
.section-head p,
.category-card span,
.tool-card p {
  font-size: 13px !important;
  line-height: 1.5 !important;
}

.section-head h2 {
  font-size: clamp(28px, 2.2vw, 32px) !important;
  line-height: 1.12;
}

.section-head p {
  max-width: 720px;
}

.story-card h3 {
  font-size: 20px !important;
  line-height: 1.18 !important;
}

.side-stack h3,
.tool-card h3 {
  font-size: 24px !important;
  line-height: 1.16 !important;
}

.list-card .section-head h2 {
  font-size: 21px !important;
}

.trending-item strong {
  font-size: 13px !important;
  line-height: 1.32 !important;
  font-weight: 600 !important;
}

.trending-item span {
  font-size: 12px !important;
}

.badge,
.kicker {
  font-size: 11px !important;
  font-weight: 700 !important;
  letter-spacing: .055em;
}

/* Prevent long headings from visually taking over the viewport. */
.story-body,
.hero-slide-content,
.list-card,
.tool-card,
.category-card {
  overflow-wrap: anywhere;
}

/* ---------- Buttons ---------- */
.primary-btn,
.secondary-btn {
  font-size: 13px !important;
  font-weight: 600 !important;
}

/* ---------- Remove unnecessary visual heaviness ---------- */
.story-card h3 a,
.site-nav a,
.section-link,
.category-card strong,
.trending-item strong {
  text-shadow: none !important;
}

/* ---------- Desktop width / spacing ---------- */
@media (min-width: 1200px) {
  .container {
    max-width: 1320px;
    width: calc(100% - 48px);
  }
}

@media (min-width: 981px) and (max-width: 1199px) {
  .brand-copy strong {
    font-size: 29px !important;
  }

  .site-nav {
    gap: 18px !important;
  }

  .site-nav a {
    font-size: 13.5px !important;
  }

  .header-inner {
    gap: 18px;
  }
}

@media (max-width: 980px) {
  .header-search {
    max-width: none;
    min-width: 0;
  }

  .site-nav {
    justify-content: flex-start;
  }
}

/* ---------- APC logo / subject-first information cards ---------- */
.brand-logo-link {
  width: 305px;
  max-width: 32vw;
  height: 84px;
  display: flex !important;
  align-items: center;
  flex: 0 1 305px !important;
}

.brand-logo {
  display: block;
  width: 100%;
  height: auto;
  max-height: 82px;
  object-fit: contain;
  object-position: left center;
}

.brand-logo-link:focus-visible {
  outline: 3px solid rgba(31, 95, 177, .22);
  outline-offset: 4px;
  border-radius: 10px;
}

.metric strong,
.trust-card h4 {
  color: #153f82;
}

.metric span,
.trust-card p {
  color: #5b7498;
}

.metric,
.trust-card {
  min-width: 0;
}

.trust-card p {
  margin-bottom: 0;
}

@media (min-width: 981px) and (max-width: 1199px) {
  .brand-logo-link {
    width: 280px;
    height: 78px;
    flex-basis: 280px !important;
  }

  .brand-logo {
    max-height: 76px;
  }
}

@media (max-width: 980px) {
  .brand-logo-link {
    width: 300px;
    max-width: 62vw;
    height: 82px;
    flex-basis: 300px !important;
  }

  .brand-logo {
    max-height: 78px;
  }
}


/* ---------- Final desktop density pass ---------- */
@media (min-width: 981px) {
  .top-strip {
    min-height: 38px;
  }

  .top-strip-inner {
    min-height: 38px !important;
  }

  .site-header .header-inner {
    min-height: 94px;
    padding-top: 6px;
    padding-bottom: 6px;
  }

  .brand-logo-link {
    width: 305px;
    height: 84px;
    flex-basis: 305px !important;
  }

  .brand-logo {
    max-height: 82px;
  }

  .nav-row,
  .nav-inner {
    min-height: 52px;
  }

  .nav-badge {
    min-height: 44px;
  }

  .hero-home {
    padding-top: 18px !important;
  }

  .hero-grid {
    min-height: 0 !important;
  }

  .hero-copy h1 {
    margin-top: 8px !important;
    margin-bottom: 12px !important;
  }

  .hero-copy > p {
    margin-bottom: 18px !important;
  }
}

@media (max-width: 980px) {
  .brand-logo-link {
    width: 270px;
    max-width: 58vw;
    height: 74px;
    flex-basis: 270px !important;
  }

  .brand-logo {
    max-height: 70px;
  }
}
