/* AEGRA articles listing and single post. Scoped to the native posts templates. */

body.aegra-articles {
  --aegra-navy: #192133;
  --aegra-gold: #b89966;
  --aegra-gold-deep: #716149;
  --aegra-text: #3f4245;
  --aegra-muted: rgba(25, 33, 51, 0.62);
  --aegra-page-bg: #f7f3eb;
  --aegra-line: rgba(25, 33, 51, 0.12);
  --aegra-container: 1290px;
  --aegra-prose: 72ch;
  --aegra-section-space: clamp(56px, 5.6vw, 80px);
  --aegra-section-space-small: clamp(28px, 3vw, 40px);
  --aegra-inline-gutter: clamp(16px, 2.4vw, 28px);
  --aegra-page-title-size: clamp(1.7rem, 0.95rem + 1.7vw, 2.35rem);
  --aegra-section-title-size: clamp(1.45rem, 0.95rem + 1.05vw, 2rem);
  --aegra-subtitle-size: clamp(1.05rem, 0.95rem + 0.35vw, 1.25rem);
  background: var(--aegra-page-bg);
}

body.aegra-articles #main {
  background: var(--aegra-page-bg);
  overflow-x: clip;
}

body.aegra-articles .hero-section {
  background: var(--aegra-page-bg);
  text-align: left;
}

body.blog.aegra-articles .hero-section {
  padding-top: var(--aegra-section-space);
  padding-bottom: var(--aegra-section-space-small);
}

body.blog.aegra-articles .hero-section .page-title {
  margin: 0;
  color: var(--aegra-navy);
  font-size: var(--aegra-page-title-size);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

body.blog.aegra-articles .hero-section .page-title::after {
  content: "";
  display: block;
  width: 42px;
  height: 2px;
  margin-top: 18px;
  background: var(--aegra-gold);
}

body.blog.aegra-articles .hero-section .page-description {
  max-width: 68ch;
  margin-top: 18px;
  color: var(--aegra-text);
  font-size: 1.05rem;
  line-height: 1.7;
}

body.blog.aegra-articles .hero-section .page-description > :first-child {
  margin-top: 0;
}

body.blog.aegra-articles .hero-section .page-description > :last-child {
  margin-bottom: 0;
}

body.blog.aegra-articles .ct-no-results .entry-content {
  display: none;
}

body.blog.aegra-articles #main > .ct-container {
  padding-bottom: var(--aegra-section-space);
}

body.aegra-articles [data-archive="default"] .entries {
  --grid-columns-gap: clamp(22px, 2.4vw, 32px);
}

@media (max-width: 999.98px) {
  body.aegra-articles[data-prefix="blog"] .entries,
  body.aegra-articles[data-prefix="categories"] .entries,
  body.aegra-articles[data-prefix="author"] .entries {
    --grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 689.98px) {
  body.aegra-articles[data-prefix="blog"] .entries,
  body.aegra-articles[data-prefix="categories"] .entries,
  body.aegra-articles[data-prefix="author"] .entries {
    --grid-template-columns: repeat(1, minmax(0, 1fr));
  }
}

body.blog.aegra-articles .entry-card {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  border: 1px solid var(--aegra-line);
  border-radius: 0;
  background: #fff;
  box-shadow: none;
  --border-radius: 0px;
}

body.blog.aegra-articles .entry-card .ct-media-container,
body.blog.aegra-articles .entry-card .boundless-image {
  border-radius: 0;
}

body.blog.aegra-articles .entry-card img {
  width: 100%;
  height: auto;
  max-width: 100%;
  object-fit: cover;
}

body.blog.aegra-articles .entry-card .entry-title {
  margin: 10px 0 8px;
  color: var(--aegra-navy);
  font-size: clamp(1.15rem, 1rem + 0.35vw, 1.35rem);
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.3;
}

body.blog.aegra-articles .entry-card .entry-title a {
  color: inherit;
  text-decoration: none;
}

body.blog.aegra-articles .entry-card .entry-title a::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
}

body.blog.aegra-articles .entry-card .meta-categories,
body.blog.aegra-articles .entry-card .entry-button,
body.blog.aegra-articles .entry-card .meta-categories a {
  position: relative;
  z-index: 2;
}

body.blog.aegra-articles .entry-card .entry-meta {
  margin: 0;
  color: var(--aegra-gold-deep);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  line-height: 1.4;
  text-transform: uppercase;
}

body.blog.aegra-articles .entry-card .meta-categories a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--aegra-gold-deep);
  text-decoration: none;
}

body.blog.aegra-articles .entry-card .meta-date,
body.blog.aegra-articles .entry-card .meta-date time {
  color: var(--aegra-muted);
  font-size: 0.92rem;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
}

body.blog.aegra-articles .entry-card .entry-excerpt {
  flex: 1 1 auto;
  margin: 0 0 8px;
  color: var(--aegra-text);
  font-size: 0.98rem;
  line-height: 1.65;
}

body.blog.aegra-articles .entry-card .entry-button {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  min-height: 44px;
  margin-top: auto;
  padding: 8px 0;
  color: var(--aegra-gold-deep);
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px solid var(--aegra-gold);
}

body.aegra-articles a:focus-visible {
  outline: 2px solid var(--aegra-gold);
  outline-offset: 3px;
}

body.single-post.aegra-articles .hero-section {
  padding-top: var(--aegra-section-space);
  padding-bottom: 12px;
}

body.single-post.aegra-articles .hero-section .ct-container,
body.single-post.aegra-articles .ct-featured-image,
body.single-post.aegra-articles article > .hero-section {
  width: min(var(--aegra-prose), calc(100% - (var(--aegra-inline-gutter) * 2)));
  max-width: var(--aegra-prose);
  margin-inline: auto;
}

body.single-post.aegra-articles .hero-section .entry-meta {
  margin: 0 0 12px;
  color: var(--aegra-gold-deep);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

body.single-post.aegra-articles .hero-section .meta-categories a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--aegra-gold-deep);
  text-decoration: none;
}

body.single-post.aegra-articles .hero-section .page-title {
  margin: 0 0 12px;
  color: var(--aegra-navy);
  font-size: var(--aegra-page-title-size);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

body.single-post.aegra-articles .hero-section .meta-date,
body.single-post.aegra-articles .hero-section .meta-date time {
  color: var(--aegra-muted);
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
}

body.single-post.aegra-articles .hero-section .page-description {
  max-width: var(--aegra-prose);
  margin-top: 16px;
  color: var(--aegra-text);
  font-size: 1.08rem;
  line-height: 1.7;
}

body.single-post.aegra-articles .ct-featured-image {
  margin-top: 28px;
  margin-bottom: 8px;
}

body.single-post.aegra-articles .ct-featured-image .ct-media-container,
body.single-post.aegra-articles .ct-featured-image img {
  border-radius: 0;
}

body.single-post.aegra-articles .ct-featured-image img {
  display: block;
  width: 100%;
  height: auto;
  max-width: 100%;
  object-fit: cover;
}

body.single-post.aegra-articles .entry-content {
  width: min(var(--aegra-prose), calc(100% - (var(--aegra-inline-gutter) * 2)));
  max-width: var(--aegra-prose);
  margin: 28px auto var(--aegra-section-space);
  color: var(--aegra-text);
  font-size: 1.0625rem;
  line-height: 1.75;
  overflow-wrap: break-word;
  --wp--style--global--content-size: 72ch;
  --theme-block-max-width: 72ch;
}

body.single-post.aegra-articles .entry-content > * {
  max-width: 72ch;
}

body.single-post.aegra-articles .entry-content h2 {
  margin: 1.7em 0 0.45em;
  color: var(--aegra-navy);
  font-size: var(--aegra-section-title-size);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.25;
}

body.single-post.aegra-articles .entry-content h3 {
  margin: 1.45em 0 0.4em;
  color: var(--aegra-navy);
  font-size: var(--aegra-subtitle-size);
  font-weight: 600;
  line-height: 1.35;
}

body.single-post.aegra-articles .entry-content h4,
body.single-post.aegra-articles .entry-content h5,
body.single-post.aegra-articles .entry-content h6 {
  margin: 1.3em 0 0.35em;
  color: var(--aegra-navy);
  line-height: 1.35;
}

body.single-post.aegra-articles .entry-content p {
  margin: 0 0 1.15em;
}

body.single-post.aegra-articles .entry-content ul,
body.single-post.aegra-articles .entry-content ol {
  margin: 0 0 1.15em;
  padding-left: 1.25em;
}

body.single-post.aegra-articles .entry-content li {
  margin: 0.35em 0;
}

body.single-post.aegra-articles .entry-content li::marker {
  color: var(--aegra-gold-deep);
}

body.single-post.aegra-articles .entry-content a {
  color: var(--aegra-gold-deep);
}

body.single-post.aegra-articles .entry-content img,
body.single-post.aegra-articles .entry-content video,
body.single-post.aegra-articles .entry-content iframe,
body.single-post.aegra-articles .entry-content figure {
  max-width: 100%;
  height: auto;
}

body.single-post.aegra-articles .entry-content pre,
body.single-post.aegra-articles .entry-content table {
  display: block;
  max-width: 100%;
  overflow-x: auto;
}

body.single-post.aegra-articles .ct-related-posts {
  width: min(var(--aegra-container), calc(100% - (var(--aegra-inline-gutter) * 2)));
  margin: 0 auto var(--aegra-section-space);
}

body.single-post.aegra-articles .ct-related-posts .ct-module-title {
  margin: 0 0 22px;
  color: var(--aegra-navy);
  font-size: var(--aegra-section-title-size);
  font-weight: 600;
  letter-spacing: -0.02em;
}

body.single-post.aegra-articles .ct-related-posts .entry-card {
  border: 1px solid var(--aegra-line);
  border-radius: 0;
  background: #fff;
  box-shadow: none;
}

@media (max-width: 390px) {
  body.blog.aegra-articles .hero-section .page-title,
  body.single-post.aegra-articles .hero-section .page-title {
    font-size: 1.7rem;
  }
}
