/* Soma blog — custom layout on top of the Webflow design system.
   Brand colours: #078dff blue / #012b5f navy / #03448a dark blue / #dceaf5 light bg */

:root {
  --soma-blue: #078dff;
  --soma-navy: #012b5f;
  --soma-dark-blue: #03448a;
  --soma-light: #dceaf5;
  --soma-text: #1a1f2c;
  --soma-muted: #5b6577;
  --soma-border: #e5ecf3;
  --soma-card-bg: #ffffff;
}

/* ---------- Pills / tags ---------- */
.soma-pill {
  display: inline-block;
  background: var(--soma-light);
  color: var(--soma-navy);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 6px 12px;
  border-radius: 999px;
  margin-bottom: 12px;
}
.soma-pill--accent {
  background: var(--soma-blue);
  color: #ffffff;
}
.soma-pill--small {
  font-size: 11px;
  padding: 4px 10px;
  margin-bottom: 8px;
}

/* ---------- Breadcrumb ---------- */
.soma-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  font-size: 14px;
  color: var(--soma-muted);
  margin-bottom: 24px;
}
.soma-breadcrumb a {
  color: var(--soma-muted);
  text-decoration: none;
}
.soma-breadcrumb a:hover {
  color: var(--soma-blue);
  text-decoration: underline;
}

/* ---------- Hub: header ---------- */
.soma-hub__header {
  text-align: center;
  max-width: 760px;
  margin: 80px auto 48px;
}
.soma-hub__title {
  font-size: clamp(36px, 5vw, 56px);
  line-height: 1.1;
  color: var(--soma-navy);
  margin: 16px 0 16px;
  font-weight: 700;
}
.soma-hub__lede {
  font-size: 18px;
  line-height: 1.6;
  color: var(--soma-muted);
}

/* ---------- Hub: featured card ---------- */
.soma-hub__featured {
  margin-bottom: 56px;
}
.soma-card--featured {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 0;
  background: var(--soma-card-bg);
  border: 1px solid var(--soma-border);
  border-radius: 16px;
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.soma-card--featured:hover {
  transform: translateY(-4px);
  box-shadow: 0 24px 48px rgba(1, 43, 95, 0.12);
}
.soma-card--featured .soma-card__image img {
  height: 100%;
  min-height: 320px;
  object-fit: cover;
}
.soma-card--featured .soma-card__body {
  padding: 48px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.soma-card--featured h2 {
  font-size: 32px;
  line-height: 1.2;
  color: var(--soma-navy);
  margin: 8px 0 16px;
}
.soma-card--featured p {
  color: var(--soma-muted);
  font-size: 17px;
  line-height: 1.6;
  margin-bottom: 24px;
}

/* ---------- Hub: filters + search ---------- */
.soma-hub__filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--soma-border);
}
.soma-filter {
  background: transparent;
  border: 1px solid var(--soma-border);
  color: var(--soma-text);
  font-weight: 500;
  font-size: 14px;
  padding: 8px 16px;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.soma-filter:hover {
  border-color: var(--soma-blue);
  color: var(--soma-blue);
}
.soma-filter.is-active {
  background: var(--soma-navy);
  color: #ffffff;
  border-color: var(--soma-navy);
}
.soma-hub__search {
  display: block;
  margin: 24px 0 32px;
}
.soma-hub__search input {
  width: 100%;
  max-width: 400px;
  padding: 12px 16px;
  border: 1px solid var(--soma-border);
  border-radius: 999px;
  font-size: 15px;
  background: #ffffff;
  font-family: inherit;
}
.soma-hub__search input:focus {
  outline: none;
  border-color: var(--soma-blue);
  box-shadow: 0 0 0 3px rgba(7, 141, 255, 0.15);
}

/* ---------- Hub: grid ---------- */
.soma-hub__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
  margin-bottom: 80px;
}
.soma-hub__empty {
  text-align: center;
  color: var(--soma-muted);
  padding: 40px 0;
  font-size: 16px;
}

/* ---------- Cards (used in hub grid + post related) ---------- */
.soma-card {
  display: flex;
  flex-direction: column;
  background: var(--soma-card-bg);
  border: 1px solid var(--soma-border);
  border-radius: 12px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.soma-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 32px rgba(1, 43, 95, 0.1);
  border-color: var(--soma-blue);
}
.soma-card__image {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--soma-light);
}
.soma-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.soma-card:hover .soma-card__image img {
  transform: scale(1.05);
}
.soma-card__body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.soma-card__body h3 {
  font-size: 19px;
  line-height: 1.3;
  color: var(--soma-navy);
  margin: 4px 0 12px;
  font-weight: 600;
}
.soma-card__body p {
  color: var(--soma-muted);
  font-size: 15px;
  line-height: 1.55;
  margin: 0 0 16px;
  flex: 1;
}
.soma-card__cta {
  color: var(--soma-blue);
  font-weight: 600;
  font-size: 14px;
}

/* ---------- Post hero ---------- */
.soma-post__hero {
  padding: 64px 0 0;
  background: linear-gradient(180deg, var(--soma-light) 0%, #ffffff 100%);
}
.soma-post__hero-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  font-size: 14px;
  color: var(--soma-muted);
  margin-bottom: 16px;
}
.soma-post__date::before, .soma-post__read-time::before {
  content: "•";
  margin-right: 8px;
  color: var(--soma-border);
}
.soma-post__hero-meta .soma-pill {
  margin-bottom: 0;
}
.soma-post__hero-meta .soma-post__date::before:first-child {
  display: none;
}
.soma-post__title {
  font-size: clamp(32px, 4.5vw, 48px);
  line-height: 1.15;
  color: var(--soma-navy);
  margin: 0 0 20px;
  font-weight: 700;
  max-width: 880px;
}
.soma-post__lede {
  font-size: 19px;
  line-height: 1.55;
  color: var(--soma-text);
  max-width: 760px;
  margin: 0 0 40px;
}
.soma-post__hero-image {
  margin-top: 40px;
  width: 100%;
  max-height: 480px;
  overflow: hidden;
}
.soma-post__hero-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ---------- Post body ---------- */
.soma-post__body {
  padding: 64px 0;
}
.soma-post__content {
  font-size: 17px;
  line-height: 1.75;
  color: var(--soma-text);
}
.soma-post__content p,
.soma-post__content ul,
.soma-post__content ol,
.soma-post__content blockquote,
.soma-post__content figure,
.soma-post__content table {
  margin: 0 0 1.4em;
}
.soma-post__content h2 {
  font-size: 28px;
  line-height: 1.25;
  color: var(--soma-navy);
  margin: 2.4em 0 0.8em;
  font-weight: 700;
}
.soma-post__content h3 {
  font-size: 22px;
  line-height: 1.3;
  color: var(--soma-navy);
  margin: 2em 0 0.6em;
  font-weight: 600;
}
.soma-post__content h4 {
  font-size: 18px;
  margin: 1.6em 0 0.5em;
  color: var(--soma-navy);
  font-weight: 600;
}
/* In-body article links — explicit "this is a text link, not a button" reset.
   Some Webflow legacy CSS / iOS Safari can otherwise inflate these into pill-shaped buttons. */
.soma-post__content a,
.soma-post__content a:link,
.soma-post__content a:visited {
  color: var(--soma-blue);
  text-decoration: underline;
  background: transparent;
  border: 0;
  padding: 0;
  margin: 0;
  border-radius: 0;
  display: inline;
  font-weight: inherit;
  font-family: inherit;
  -webkit-appearance: none;
  -webkit-tap-highlight-color: rgba(7, 141, 255, 0.2);
}
.soma-post__content a:hover {
  color: var(--soma-dark-blue);
}
.soma-post__content ul, .soma-post__content ol {
  padding-left: 1.5em;
}
.soma-post__content li {
  margin-bottom: 0.4em;
}
.soma-post__content img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin: 1.6em 0;
}
.soma-post__content blockquote {
  border-left: 4px solid var(--soma-blue);
  padding: 0.5em 1.5em;
  background: var(--soma-light);
  border-radius: 0 8px 8px 0;
  font-style: italic;
}

/* ---------- Post CTA ---------- */
.soma-post__cta {
  background: var(--soma-navy);
  color: #ffffff;
  padding: 48px;
  border-radius: 16px;
  margin-top: 64px;
  text-align: center;
}
.soma-post__cta h2 {
  color: #ffffff;
  font-size: 28px;
  margin: 0 0 16px;
}
.soma-post__cta p {
  color: rgba(255, 255, 255, 0.85);
  font-size: 17px;
  line-height: 1.6;
  margin: 0 0 28px;
}
.soma-post__cta a {
  color: #ffffff;
}
.soma-post__cta-buttons {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}
.soma-post__cta-secondary {
  display: inline-flex;
  align-items: center;
  padding: 14px 28px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 8px;
  color: #ffffff;
  text-decoration: none;
  font-weight: 600;
  transition: background 0.15s ease;
}
.soma-post__cta-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
}

/* Hub-CTA reuses .soma-post__cta-buttons but with blue tones */
.soma-hub__cta {
  margin: 80px 0 0;
}
.soma-hub__cta-inner {
  background: var(--soma-navy);
  color: #ffffff;
  padding: 64px 48px;
  border-radius: 20px;
  text-align: center;
}
.soma-hub__cta-inner h2 {
  color: #ffffff;
  font-size: 32px;
  margin: 0 0 16px;
}
.soma-hub__cta-inner p {
  color: rgba(255, 255, 255, 0.85);
  font-size: 18px;
  margin: 0 0 28px;
  line-height: 1.55;
}

/* ---------- Related posts ---------- */
.soma-post__related {
  background: #f7fafd;
  padding: 80px 0;
  margin-top: 64px;
}
.soma-post__related-title {
  font-size: 28px;
  color: var(--soma-navy);
  margin: 0 0 32px;
}
.soma-post__related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
}

/* ---------- Responsive ---------- */
@media (max-width: 768px) {
  .soma-card--featured {
    grid-template-columns: 1fr;
  }
  .soma-card--featured .soma-card__body {
    padding: 28px;
  }
  .soma-card--featured .soma-card__image img {
    min-height: 220px;
  }
  .soma-hub__header {
    margin: 48px auto 32px;
  }
  .soma-post__hero {
    padding-top: 32px;
  }
  .soma-post__cta, .soma-hub__cta-inner {
    padding: 32px 24px;
  }
}

/* ---------- 404 page ---------- */
.soma-404 {
  padding: 96px 0;
  background: linear-gradient(180deg, var(--soma-light) 0%, #ffffff 100%);
}
.soma-404__inner {
  max-width: 720px;
  margin: 0 auto;
  text-align: center;
}
.soma-404__title {
  font-size: clamp(36px, 5vw, 56px);
  color: var(--soma-navy);
  margin: 16px 0 16px;
  font-weight: 700;
  line-height: 1.1;
}
.soma-404__lede {
  font-size: 18px;
  line-height: 1.6;
  color: var(--soma-muted);
  max-width: 560px;
  margin: 0 auto 32px;
}
.soma-404__links {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: center;
  margin: 0 0 48px;
}
.soma-404__links .soma-post__cta-secondary {
  border-color: rgba(1, 43, 95, 0.2);
  color: var(--soma-navy);
}
.soma-404__links .soma-post__cta-secondary:hover {
  background: rgba(7, 141, 255, 0.08);
}
.soma-404__quicklinks {
  text-align: left;
  background: #ffffff;
  border: 1px solid var(--soma-border);
  border-radius: 12px;
  padding: 32px;
}
.soma-404__quicklinks h2 {
  font-size: 18px;
  margin: 0 0 16px;
  color: var(--soma-navy);
}
.soma-404__quicklinks ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 8px 24px;
}
.soma-404__quicklinks li a {
  color: var(--soma-blue);
  text-decoration: none;
  font-weight: 500;
  display: inline-block;
  padding: 6px 0;
}
.soma-404__quicklinks li a:hover {
  text-decoration: underline;
}

/* ---------- Utilities ---------- */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}
