/* Inquilion Insights — components with no existing counterpart on the main
   site (article body, author card). Built from the same design tokens as
   inquilion-styles.css (:root variables), not a separate palette. */

/* ---------- Featured image (single post) ---------- */
.insights-featured-image {
  margin: 0 0 clamp(32px, 4vw, 56px);
}

.insights-featured-image img {
  width: 100%;
  aspect-ratio: 21 / 9;
  object-fit: cover;
  display: block;
}

.insights-article {
  padding: 0 6vw clamp(48px, 6vw, 80px);
}

.insights-article .entry-content {
  max-width: var(--max);
  margin: 0 auto;
  font-size: var(--type-body);
  line-height: 1.8;
  font-weight: 300;
  color: var(--ink);
}

.insights-article .entry-content > * + * {
  margin-top: 1.4em;
}

.insights-article .entry-content h2 {
  font-size: clamp(1.6rem, 2.6vw, 2.4rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-top: 1.8em;
}

.insights-article .entry-content h3 {
  font-size: clamp(1.25rem, 1.8vw, 1.6rem);
  margin-top: 1.6em;
}

.insights-article .entry-content a {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

.insights-article .entry-content ul,
.insights-article .entry-content ol {
  padding-left: 1.4em;
}

.insights-meta {
  margin-bottom: 8px;
}

/* ---------- Author card ---------- */
.author-card {
  width: 100%;
  max-width: var(--max);
  margin: clamp(64px, 6vw, 96px) auto 0;
  padding: 40px;
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: 4px;
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 24px;
  align-items: start;
}

.author-card-photo {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--hairline);
}

.author-card-body {
  min-width: 0;
}

.author-card-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -0.01em;
  margin: 0;
}

.author-card-title {
  color: var(--grey);
  font-size: 0.95rem;
  margin: 0 0 12px;
}

.author-card-bio {
  font-size: 1rem;
  line-height: 1.7;
  color: var(--muted);
  margin: 0 0 16px;
}

.author-card-linkedin {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 0.9rem;
  letter-spacing: 0.02em;
  color: var(--ink);
  text-decoration: none;
  width: fit-content;
}

.author-card-linkedin:hover {
  text-decoration: underline;
}

@media (max-width: 600px) {
  .author-card {
    grid-template-columns: 1fr;
    padding: 28px;
    text-align: center;
    justify-items: center;
  }

  .author-card-linkedin {
    margin: 0 auto;
  }
}

/* ---------- Listing grid ---------- */
.insights-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 32px;
  max-width: var(--max);
  margin: 0 auto;
}

.insights-card {
  border: 1px solid var(--hairline);
  border-radius: 4px;
  background: var(--white);
  transition: box-shadow 0.2s ease;
  overflow: hidden;
}

.insights-card:hover {
  box-shadow: var(--shadow);
}

.insights-card-link {
  display: block;
  color: inherit;
  text-decoration: none;
}

.insights-card-thumb {
  aspect-ratio: 16 / 9;
  overflow: hidden;
}

.insights-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.insights-card-body {
  padding: 32px;
}

.insights-card h3 {
  font-family: var(--font-display);
  font-size: 1.3rem;
  line-height: 1.25;
  letter-spacing: -0.01em;
  margin-bottom: 12px;
}

.insights-card-excerpt {
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.7;
}

/* ---------- Article table ---------- */
.insights-article .entry-content table.insights-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
  line-height: 1.55;
}

.insights-article .entry-content .insights-table th,
.insights-article .entry-content .insights-table td {
  text-align: left;
  vertical-align: top;
  padding: 16px 20px;
  border-bottom: 1px solid var(--hairline);
}

.insights-article .entry-content .insights-table thead th {
  background: var(--surface);
  color: var(--ink);
  font-weight: 600;
}

.insights-article .entry-content .insights-table td {
  color: var(--muted);
  font-weight: 300;
}

.insights-article .entry-content .insights-table td:first-child {
  color: var(--ink);
}

@media (max-width: 600px) {
  .insights-article .entry-content table.insights-table {
    display: block;
    overflow-x: auto;
  }
}

/* ---------- Article inline figure ---------- */
.insights-article .entry-content .insights-inline-figure {
  margin: 2.2em 0;
}

.insights-article .entry-content .insights-inline-figure img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 4px;
}

/* Logged-in admin bar sits over the fixed nav */
body.admin-bar .site-nav {
  top: 32px;
}

@media (max-width: 782px) {
  body.admin-bar .site-nav {
    top: 46px;
  }
}

/* ---------- Article layout: content left, compact CTA box right ---------- */
.insights-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: clamp(32px, 4vw, 64px);
  max-width: calc(var(--max) + 344px);
  margin: 0 auto;
  align-items: start;
}

.insights-main .entry-content {
  max-width: none;
  margin: 0;
}

.insights-main .author-card {
  max-width: none;
  margin: clamp(64px, 6vw, 96px) 0 0;
}

.insights-cta-box {
  position: sticky;
  top: 120px;
  background: var(--ink);
  color: var(--white);
  padding: 26px 24px;
  border-radius: 4px;
}

.insights-cta-eyebrow {
  margin: 0;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.6);
}

.insights-cta-title {
  margin: 10px 0 18px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  line-height: 1.35;
  color: var(--white);
}

.insights-cta-box .pill {
  display: block;
  text-align: center;
  padding: 14px 20px;
  background: var(--white);
  color: var(--ink);
  border-color: var(--white);
}

.insights-cta-box .pill:hover {
  background: transparent;
  color: var(--white);
}

@media (max-width: 960px) {
  .insights-layout {
    grid-template-columns: 1fr;
  }

  .insights-cta-box {
    position: static;
    order: -1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px 20px;
    margin-bottom: 8px;
  }

  .insights-cta-eyebrow {
    width: 100%;
  }

  .insights-cta-title {
    margin: 0;
  }

  .insights-cta-box .pill {
    display: inline-block;
  }
}

/* The Beaver Builder parent theme underlines every link on hover; the house nav, wordmark and buttons never do. */
a.wordmark:hover,
a.wordmark:focus,
a.pill:hover,
a.pill:focus,
.site-nav a:hover,
.site-nav a:focus,
.mobile-menu a:hover,
.mobile-menu a:focus,
.insights-card-link:hover,
.insights-card-link:focus {
  text-decoration: none;
}
