/*
 * Blogs component styles.
 *
 * Matches the design reference html/blogs.html, html/blogs-inside.html and
 * html/assets/css/site.css. Loaded by blogs/blogs.php on the Blogs page and on
 * single posts. Depends on the design tokens in site.css.
 *
 * The design hides the featured card (.blogs-feature), so the listing is the
 * hero plus the post grid. The hero uses the shared `.hero-frame` and
 * blogs/images/blogs-hero-bg.png.
 */

/* Listing hero. The shared `.hero-frame` from site.css — photograph, magenta arc
   and real heading, placed from the same 1440 x 503 frame as the Contact Us and
   Careers heroes. See docs/HERO_BANNER_METHOD.md. */
.blogs-title::before, .blogs-title::after { display: none; }

/* Post grid (the design hides the featured card).
   The 1440 frame gives a 1280 column with three 407px cards, so the gap is 30px,
   the same as the related-stories grid. */
.blogs-feature { display: none; }
/* --blog-unit is one design pixel of the blog card: 1px at the 1440 Figma frame
   and 1.3333px at 1920, the same ratio as --container, so the whole card scales
   with the column. --blog-gradient is the supplied card/underline border
   gradient, shared by the listing cards, the related-stories cards and the
   Load More rule. */
.blogs-list, .blog-related { --blog-unit: clamp(1px, 0.0694444vw, 1.3333333px); --blog-gradient: linear-gradient(90deg, #b04198 2.71%, #e14c8d 51.38%, #ffdb85 100%); }
.blogs-list { padding-top: clamp(3rem, 5vw, 5rem); }
/* Above the 1440 frame the listing keeps that frame's 1280px design column:
   the container and the 1px card unit stop scaling, so the cards, images and
   spacing stay exactly as they are at 1440 and the extra viewport width
   becomes side margin. */
@media (min-width: 1440px) {
  .blogs-list { --container: 1280px; --blog-unit: 1px; }
}

.blogs-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 30px; margin: 0; padding: 0; list-style: none; }
/* Every card is the same rectangle: 407 x 364 with a 16px radius at the 1440
   frame. The height is fixed rather than the picture's own ratio, so a row of
   cards stays level no matter how long the titles and excerpts are. The 1px
   border is the supplied gradient; it is painted as a border-box background
   because `border-image` does not follow the 16px radius. */
.blogs-grid > li { display: flex; flex-direction: column; min-height: calc(364 * var(--blog-unit)); overflow: hidden; border: 1px solid transparent; border-radius: 16px; color: var(--ink); background: linear-gradient(#fff, #fff) padding-box, var(--blog-gradient) border-box; }
/* The image band is a fixed height rather than the picture's own ratio, so cards
   stay identical whatever proportions the featured image has. */
.blog-card__image { flex: 0 0 auto; margin: 0; }
.blog-card__image img { display: block; width: 100%; height: calc(162 * var(--blog-unit)); object-fit: cover; }
/* Column layout: the read-more action is pushed onto the card floor. */
.blog-card__body { display: flex; flex: 1 1 auto; flex-direction: column; padding: calc(16 * var(--blog-unit)) calc(24 * var(--blog-unit)); }
.blog-card__date { margin: 0; color: #2a2929; font-size: 14.4px; line-height: 1.5; }
/* Title and excerpt are clamped so the copy can never stretch the rectangle. */
.blog-card__title { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; margin: calc(4 * var(--blog-unit)) 0 0; font-size: 20px; font-weight: 600; line-height: 1.4; }
/* inline-block here would stop the title clamp from working (core sets it on
   .wp-block-post-title a), so the link stays inline. */
.blog-card__body .blog-card__title a { display: inline; color: inherit; text-decoration: none; }
.blog-card__body .wp-block-post-excerpt { margin: calc(4 * var(--blog-unit)) 0 0; }
.blog-card__body .wp-block-post-excerpt__excerpt { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; margin: 0; font-size: 16px; line-height: 1.5; }
/* 45-degree white up-right arrow, shared by the post cards and the related-stories cards */
.blog-card__body, .blog-related { --arrow-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='17' height='17' viewBox='0 0 17 17' fill='none'%3E%3Cpath d='M4.2 12.8 12.8 4.2M5.8 4.2h7v7' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
.blog-card__body .wp-block-read-more { position: relative; display: block; flex: 0 0 auto; width: calc(30 * var(--blog-unit)); height: calc(30 * var(--blog-unit)); margin: auto 0 0 auto; border-radius: 50%; background-color: #dd0b81; background-image: var(--arrow-icon); background-repeat: no-repeat; background-position: center; background-size: calc(17 * var(--blog-unit)) calc(17 * var(--blog-unit)); font-size: 0; text-decoration: none; }

/* Load more. 24px/600 Comfortaa at the 1440 frame, right-aligned to the column
   (the Figma node ends at x 1359, the column ends at 1360), with the supplied
   gradient as a 1px rule directly under the label. `width: fit-content` keeps
   both the button and the rule exactly as wide as the text. */
.blogs-load-more { display: block; width: fit-content; margin: 4rem 0 0 auto; padding: 0 0 calc(6 * var(--blog-unit)); border: 0; background: var(--blog-gradient) bottom / 100% 1px no-repeat; color: var(--ink); font-family: inherit; font-size: 24px; font-weight: 600; letter-spacing: 0; line-height: 1.5; text-transform: uppercase; cursor: pointer; }

/* Single post (Blogs-Inside node) */
.blog-article__hero { padding-block: 106px 0; background: #fff; }
.blog-article__image { margin: 0; }
.blog-article__image img { display: block; width: 100%; height: 447px; border-radius: 16px; object-fit: cover; transform: scaleX(-1); }
.blog-article__content { padding-block: 0; }
/* Above the 1440 frame the article keeps that frame's 1280px design column:
   the hero, body and related stories stop scaling with the shared --container,
   and the related cards keep their 1px design unit, so the extra viewport width
   becomes side margin. */
@media (min-width: 1440px) {
  .blog-article__hero .container,
  .blog-article__content .container,
  .blog-related .container { --container: 1280px; }
  .blog-related { --blog-unit: 1px; }
}
.blog-article__content .container { max-width: 1280px; }
.blog-article__byline { align-items: center; margin: 38px 0 0 !important; color: #2a2929; font-size: 16px; font-weight: 300; line-height: 16px; }
log-article__byline p { font-size: 16px; margin: 0 10px !important; }
.blog-article__byline .wp-block-post-author__avatar { display: none; }
.blog-article__byline .wp-block-post-author__content { display: flex; flex-direction: row; align-items: center; gap: .35em; }
.blog-article__byline .wp-block-post-author__byline { margin: 0; width: auto; font-size: 16px; }
.blog-article__byline .wp-block-post-author__name { margin: 0;}
.blog-article__byline-sep { margin: 0 .6rem; }
/* Blog detail typography: headings are 900, running text is 300. Emphasis,
   links, byline avatars and the related-stories cards keep their own styles. */
.blog-article__title { max-width: 1064px; margin: 19px 0 38px; font-size: 32px; font-weight: 900; line-height: 1.5; }
.blog-article__content p, .blog-article__content li { font-size: 18px; font-weight: 300; line-height: 1.5; text-align: justify; margin-bottom: 15px; }
.blog-article__content h1, .blog-article__content h4, .blog-article__content h5, .blog-article__content h6 { font-weight: 900; }
.blog-article__content h2 { margin: 2rem 0 1.2rem; font-size: 26px; font-weight: 900; }
.blog-article__content h3 { margin: 1.8rem 0 .8rem; font-size: 20px; font-weight: 900; }
.blog-article__content ol, .blog-article__content ul { padding-left: 1.2rem; }
.blog-article__content a { color: var(--pink); }
.blog-article__byline .wp-block-post-date { font-size: 16px; margin: 20px 0; line-height: 1.5; text-align: justify; margin-bottom: 15px; }
.blog-article__byline-sep.wp-block-paragraph {
    margin: 0 10px;
}
/* Read More Stories. Each card is the 407 x 364 Figma box with the 16px radius
   and the supplied 1px gradient border; the picture is squared off at the bottom
   so the white body reads as part of the same card. */
.blog-related { padding-block: 0 4rem; }
.blog-related .container { max-width: 1280px; }
.blog-related__rule { height: 0; margin: 0 0 24px; border-top: 1px solid rgb(221 11 129 / 20%); }
.blog-related__heading { margin: 0 0 29px; font-size: 20px; font-weight: 700; }
.blog-related__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 30px; }
.blog-related__card { display: flex; flex-direction: column; min-height: calc(364 * var(--blog-unit)); overflow: hidden; border: 1px solid transparent; border-radius: 16px; color: inherit; background: linear-gradient(#fff, #fff) padding-box, var(--blog-gradient) border-box; text-decoration: none; }
.blog-related__media { position: relative; display: block; flex: 0 0 auto; }
.blog-related__media img { display: block; width: 100%; height: calc(222 * var(--blog-unit)); object-fit: cover; }
.blog-related__arrow { position: absolute; right: calc(26 * var(--blog-unit)); bottom: calc(24 * var(--blog-unit)); width: calc(30 * var(--blog-unit)); height: calc(30 * var(--blog-unit)); border-radius: 50%; background: #dd0b81 var(--arrow-icon) center / calc(17 * var(--blog-unit)) calc(17 * var(--blog-unit)) no-repeat; }
/* The title is one line and the excerpt three, as the design shows, so the copy
   can never push the card past the 407 x 364 box. */
.blog-related__card h3 { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 1; overflow: hidden; margin: calc(23 * var(--blog-unit)) calc(26 * var(--blog-unit)) 0; font-size: 20px; font-weight: 600; line-height: 1.5; }
.blog-related__card p { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden; margin: 5px calc(26 * var(--blog-unit)) 0; font-size: 16px; line-height: 1.5; }
/* 6 x 6 dots, 8 apart, so three of them are the supplied 34 x 6 navigation.
   The active dot is magenta and the rest grey. The nav ships hidden and is
   revealed by blogs.js only when a second page exists, so without JavaScript all
   nine stories stay visible instead of being stranded behind dead dots. */
.blog-related__nav { display: flex; width: fit-content; height: calc(6 * var(--blog-unit)); gap: calc(8 * var(--blog-unit)); margin: calc(30 * var(--blog-unit)) auto 0; }
.blog-related__dot { position: relative; width: calc(6 * var(--blog-unit)); height: calc(6 * var(--blog-unit)); padding: 0; border: 0; border-radius: 50%; background: radial-gradient(circle, #adadad 0 65%, #d9d9d9 100%); cursor: pointer; }
/* A 6px dot is the design, but a bigger invisible target keeps it clickable. */
.blog-related__dot::after { position: absolute; content: ""; inset: calc(-6 * var(--blog-unit)); }
.blog-related__dot.is-active { background: radial-gradient(circle, #e0007d 0 65%, #f2a3cd 100%); }

@media (max-width: 720px) {
  .blogs-grid { grid-template-columns: minmax(0, 1fr); }
  .blogs-load-more { margin-right: auto; }
  .blog-article__hero { padding-block: 24px 0; }
  .blog-article__image img { height: 240px; }
  .blog-article__byline { margin-top: 24px; }
  .blog-article__title { font-size: 24px; }
  .blog-related__grid { grid-template-columns: 1fr; }
  .blog-article__content p, .blog-article__content li, .blog-article__byline .wp-block-post-date {
    font-size: 16px;
  }
}
