/* ==========================================================================
   ANAZ — Blog details page (single article)
   Source: html/css/blog-details.css. Theme copy for single posts
   (template-parts/content/content-blog-details.php); WordPress additions are
   section 6b (post content from the editor) and the --no-image card rules.
   Requires base.css (font, reset, .anaz-visually-hidden). Everything is
   namespaced with the .blog-details- prefix.

   Layout
     ≥992px   article (≈2/3) + sidebar (≈1/3) side by side
     <992px   article, then sidebar; sidebar becomes a 2-column grid
              from 640px (search full width, categories | related)
     <640px   everything in one column

   Animation hooks (data-bd-*) are only styled by js/blog-details.js through
   GSAP; nothing here hides content, so the page is complete without JS.

   Contents
     1.  Base & variables
     2.  Hero & breadcrumb
     3.  Main layout
     4.  Article image, meta & heading
     5.  Article body
     6.  Quote & checklist
     7.  Tags
     8.  Sidebar cards & search
     9.  Sidebar categories
     10. Related articles
     11. More Articles
     12. Responsive
     13. Accessibility & reduced motion
   ========================================================================== */

/* 1. Base & variables ===================================================== */

.blog-details {
    --bd-navy: #0B2F5B;
    --bd-navy-dark: #082A50;
    --bd-orange: #FF4B0B;
    --bd-orange-dark: #E63E02;
    --bd-orange-tint: #FFF1EA;
    --bd-text: #53688E;
    --bd-muted: #7B8BA5;
    --bd-white: #FFFFFF;
    --bd-bg-light: #F3F8FD;
    --bd-border: #E6EDF5;
    --bd-shadow: 0 6px 22px rgba(11, 47, 91, 0.06);
    --bd-shadow-hover: 0 12px 30px rgba(11, 47, 91, 0.11);
    --bd-radius: 12px;
    --bd-radius-sm: 10px;
    --bd-container: 1280px;
    --bd-gutter: clamp(16px, 4vw, 48px);
    --bd-ease: cubic-bezier(0.22, 1, 0.36, 1);

    display: block;
    color: var(--bd-text);
    background: var(--bd-white);
}

.blog-details a {
    color: inherit;
}

.blog-details a:focus-visible,
.blog-details input:focus-visible {
    outline: 2px solid var(--bd-orange);
    outline-offset: 3px;
}

.blog-details-container {
    width: 100%;
    max-width: var(--bd-container);
    margin-inline: auto;
    padding-inline: var(--bd-gutter);
}

.blog-details-highlight {
    color: var(--bd-orange);
}

/* Shared category badge + date */
.blog-details-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 14px;
}

.blog-details-badge {
    display: inline-flex;
    align-items: center;
    min-height: 22px;
    padding: 3px 12px;
    border-radius: 999px;
    background: var(--bd-orange);
    color: var(--bd-white);
    font-size: 0.6875rem;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    text-decoration: none;
}

.blog-details a.blog-details-badge {
    color: var(--bd-white);
    transition: background-color 0.2s ease;
}

.blog-details a.blog-details-badge:hover {
    background: var(--bd-orange-dark);
}

.blog-details-date {
    color: var(--bd-muted);
    font-size: 0.875rem;
    font-weight: 500;
}

.blog-details-meta--small {
    gap: 4px 12px;
}

.blog-details-meta--small .blog-details-badge {
    min-height: 19px;
    padding: 2px 10px;
    font-size: 0.5938rem;
}

.blog-details-meta--small .blog-details-date {
    font-size: 0.8125rem;
}

.blog-details-arrow {
    flex: none;
    color: var(--bd-orange);
    transition: transform 0.25s var(--bd-ease);
}

/* 2. Hero & breadcrumb ==================================================== */

.blog-details-hero {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    display: flex;
    align-items: center;
    min-height: clamp(220px, 20vw, 320px);
    padding-block: 36px;
    background: linear-gradient(100deg, var(--bd-bg-light) 0%, #F8FBFE 45%, var(--bd-white) 100%);
}

.blog-details-hero-media {
    position: absolute;
    z-index: -2;
    top: 0;
    right: 0;
    bottom: 0;
    width: 60%;
}

.blog-details-hero-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 55% 62%;
}

/* Soft fade so the photo melts into the light background behind the text */
.blog-details-hero-media::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    background:
        linear-gradient(90deg, #F6FAFE 0%, rgba(246, 250, 254, 0.85) 14%, rgba(246, 250, 254, 0.35) 34%, rgba(246, 250, 254, 0) 55%),
        linear-gradient(0deg, rgba(255, 255, 255, 0.35) 0%, rgba(255, 255, 255, 0) 30%);
}

/* Geometric overlays near the right edge */
.blog-details-hero-shape {
    position: absolute;
    z-index: -1;
    pointer-events: none;
}

.blog-details-hero-shape--blue {
    top: 0;
    right: 0;
    width: clamp(120px, 14vw, 230px);
    height: 100%;
    background: linear-gradient(160deg, rgba(110, 160, 220, 0.55), rgba(40, 95, 170, 0.35));
    clip-path: polygon(100% 0, 100% 100%, 8% 100%);
    mix-blend-mode: multiply;
}

.blog-details-hero-shape--orange {
    top: 0;
    right: 0;
    width: clamp(90px, 10vw, 165px);
    height: 48%;
    background: linear-gradient(135deg, #FF7A35, var(--bd-orange));
    clip-path: polygon(52% 0, 100% 0, 100% 46%, 72% 100%, 30% 100%);
    opacity: 0.92;
}

.blog-details-hero-shape--orange-low {
    right: 0;
    bottom: 0;
    width: clamp(40px, 4.5vw, 72px);
    height: 38%;
    background: linear-gradient(160deg, #FF8A4C, var(--bd-orange));
    clip-path: polygon(100% 0, 100% 100%, 0 100%);
    opacity: 0.85;
}

.blog-details-hero-inner {
    position: relative;
}

.blog-details-breadcrumb ol {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 2px 0;
    margin: 0 0 14px;
    padding: 0;
    list-style: none;
    max-width: 560px;
    font-size: 0.8125rem;
    font-weight: 500;
    line-height: 1.4;
    color: var(--bd-navy);
}

.blog-details-breadcrumb li {
    display: inline-flex;
    align-items: center;
    min-width: 0;
}

.blog-details-breadcrumb li + li::before {
    content: ">";
    content: ">" / "";
    margin-inline: 7px;
    color: var(--bd-muted);
}

.blog-details-breadcrumb a {
    text-decoration: none;
    transition: color 0.2s ease;
}

.blog-details-breadcrumb a:hover {
    color: var(--bd-orange);
}

.blog-details-breadcrumb [aria-current="page"] {
    color: var(--bd-navy);
    overflow-wrap: anywhere;
}

.blog-details-hero-title {
    margin: 0 0 14px;
    color: var(--bd-navy);
    font-size: clamp(2.125rem, 2.2vw + 1.3rem, 3.5rem);
    font-weight: 800;
    line-height: 1.05;
    letter-spacing: -0.025em;
    white-space: nowrap;
}

.blog-details-hero-text {
    max-width: 440px;
    margin: 0;
    color: var(--bd-navy);
    font-size: 1rem;
    font-weight: 500;
    line-height: 1.55;
}

/* 3. Main layout ========================================================== */

.blog-details-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 32%);
    align-items: start;
    gap: clamp(28px, 3.4vw, 52px);
    padding-top: clamp(24px, 2vw, 32px);
    padding-bottom: clamp(48px, 5vw, 72px);
}

.blog-details-article,
.blog-details-sidebar {
    min-width: 0;
}

/* 4. Article image, meta & heading ======================================== */

.blog-details-featured {
    margin: 0 0 22px;
    overflow: hidden;
    border-radius: var(--bd-radius);
    background: var(--bd-bg-light);
    box-shadow: var(--bd-shadow);
}

.blog-details-featured img {
    width: 100%;
    height: auto;
    aspect-ratio: 2.72 / 1;
    object-fit: cover;
    object-position: center 45%;
}

.blog-details-article-title {
    max-width: 15.6em; /* breaks after "Chains", as in the design */
    margin: 14px 0 0;
    color: var(--bd-navy);
    font-size: clamp(1.75rem, 1.6vw + 1.1rem, 2.625rem);
    font-weight: 800;
    line-height: 1.16;
    letter-spacing: -0.02em;
}

.blog-details-intro {
    margin: clamp(26px, 3vw, 44px) 0 0;
    color: var(--bd-text);
    font-size: clamp(1rem, 0.25vw + 0.95rem, 1.125rem);
    line-height: 1.65;
}

/* 5. Article body ========================================================= */

/* The divider above the first body section in the design sits on the body
   itself, as WordPress content is not wrapped in sections. */
.blog-details-body {
    margin-top: 22px;
    padding-top: 20px;
    border-top: 1px solid var(--bd-border);
    overflow-wrap: break-word;
}

.blog-details-section {
    margin-bottom: 22px;
}

.blog-details-section--divided {
    padding-top: 20px;
    border-top: 1px solid var(--bd-border);
}

.blog-details-body h2,
.blog-details-body h3 {
    margin: 0 0 10px;
    color: var(--bd-navy);
    font-size: clamp(1.1875rem, 0.4vw + 1.05rem, 1.4375rem);
    font-weight: 800;
    line-height: 1.3;
    letter-spacing: -0.01em;
}

.blog-details-body p {
    margin: 0 0 12px;
    font-size: 1rem;
    line-height: 1.7;
}

.blog-details-body p:last-child {
    margin-bottom: 0;
}

/* 6. Quote & checklist ==================================================== */

.blog-details-quote {
    display: flex;
    align-items: flex-start;
    gap: clamp(16px, 2.4vw, 30px);
    margin: 0 0 24px;
    padding: clamp(20px, 2vw, 26px) clamp(20px, 2.6vw, 34px);
    border-left: 3px solid var(--bd-orange);
    border-radius: 4px var(--bd-radius) var(--bd-radius) 4px;
    background: var(--bd-bg-light);
}

.blog-details-quote-icon {
    flex: none;
    width: clamp(34px, 3vw, 42px);
    height: auto;
    margin-top: 4px;
    color: var(--bd-orange);
}

.blog-details-body .blog-details-quote p {
    margin: 0;
    color: var(--bd-navy);
    font-size: clamp(1.0625rem, 0.3vw + 1rem, 1.25rem);
    font-weight: 500;
    line-height: 1.55;
}

.blog-details-checklist {
    display: grid;
    gap: 10px;
    margin: 12px 0 0;
    padding: 0;
    list-style: none;
}

.blog-details-checklist li {
    position: relative;
    padding-left: 30px;
    font-size: 1rem;
    line-height: 1.5;
}

/* Orange circle with a white tick (no icon font) */
.blog-details-checklist li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.12em;
    width: 19px;
    height: 19px;
    border-radius: 50%;
    background: var(--bd-orange) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 12.5 4 4 8-9'/%3E%3C/svg%3E") center / 12px no-repeat;
}

/* 6b. WordPress post content ============================================== */
/* Editor content is flat (no .blog-details-section wrappers), so spacing,
   lists and quotes reproduce the design from plain elements and core blocks. */

.blog-details-body :is(h2, h3, h4, h5, h6):not(:first-child) {
    margin-top: 22px;
}

.blog-details-body :is(h4, h5, h6) {
    margin-bottom: 8px;
    color: var(--bd-navy);
    font-size: 1.0625rem;
    font-weight: 800;
    line-height: 1.35;
}

.blog-details-body :where(p, li, td, th, figcaption, cite, dd) a {
    color: var(--bd-orange-dark);
    text-decoration: underline;
    text-underline-offset: 2px;
    transition: color 0.2s ease;
}

.blog-details-body :where(p, li, td, th, figcaption, cite, dd) a:hover {
    color: var(--bd-navy);
}

/* Bulleted lists use the design's checklist */
.blog-details-body ul:where(:not([class]), .wp-block-list) {
    display: grid;
    gap: 10px;
    margin: 12px 0 16px;
    padding: 0;
    list-style: none;
}

.blog-details-body ul:where(:not([class]), .wp-block-list) > li {
    position: relative;
    padding-left: 30px;
    font-size: 1rem;
    line-height: 1.5;
}

.blog-details-body ul:where(:not([class]), .wp-block-list) > li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.12em;
    width: 19px;
    height: 19px;
    border-radius: 50%;
    background: var(--bd-orange) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 12.5 4 4 8-9'/%3E%3C/svg%3E") center / 12px no-repeat;
}

.blog-details-body ol {
    margin: 12px 0 16px;
    padding-left: 1.4em;
}

.blog-details-body ol > li {
    margin-bottom: 8px;
    padding-left: 4px;
    line-height: 1.6;
}

.blog-details-body ol > li::marker {
    color: var(--bd-orange);
    font-weight: 800;
}

.blog-details-body li > :is(ul, ol) {
    margin: 10px 0 0;
}

.blog-details-body :is(ul, ol):last-child {
    margin-bottom: 0;
}

/* Quotes (core Quote block or <blockquote>): the design's quote card, with
   the quote mark drawn by CSS since editor content has no icon markup */
.blog-details-body blockquote:not(.blog-details-quote) {
    position: relative;
    margin: 22px 0 24px;
    padding: clamp(20px, 2vw, 26px) clamp(20px, 2.6vw, 34px) clamp(20px, 2vw, 26px) calc(clamp(20px, 2.6vw, 34px) + clamp(34px, 3vw, 42px) + clamp(16px, 2.4vw, 30px));
    border-left: 3px solid var(--bd-orange);
    border-radius: 4px var(--bd-radius) var(--bd-radius) 4px;
    background: var(--bd-bg-light);
}

.blog-details-body blockquote:not(.blog-details-quote)::before {
    content: "";
    position: absolute;
    left: clamp(20px, 2.6vw, 34px);
    top: calc(clamp(20px, 2vw, 26px) + 4px);
    width: clamp(34px, 3vw, 42px);
    aspect-ratio: 48 / 40;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 40'%3E%3Cpath fill='%23FF4B0B' d='M0 40V24.6C0 11.2 5.9 3 17.8 0l2.4 5.3C13.6 7.6 10.4 12 10 18.4h9.6V40H0Zm27.8 0V24.6C27.8 11.2 33.7 3 45.6 0L48 5.3c-6.6 2.3-9.8 6.7-10.2 13.1h9.6V40H27.8Z'/%3E%3C/svg%3E") center / contain no-repeat;
}

.blog-details-body blockquote:not(.blog-details-quote) p {
    color: var(--bd-navy);
    font-size: clamp(1.0625rem, 0.3vw + 1rem, 1.25rem);
    font-weight: 500;
    line-height: 1.55;
}

.blog-details-body blockquote cite {
    display: block;
    margin-top: 10px;
    color: var(--bd-muted);
    font-size: 0.875rem;
    font-style: normal;
    font-weight: 600;
}

/* Images, media and embeds stay within the article column */
.blog-details-body :is(img, video) {
    max-width: 100%;
    height: auto;
}

.blog-details-body :is(iframe, embed, object) {
    max-width: 100%;
}

.blog-details-body figure {
    max-width: 100%;
    margin: 22px 0;
}

.blog-details-body :is(.wp-block-image, .wp-caption) img {
    border-radius: var(--bd-radius-sm);
}

.blog-details-body :is(.alignwide, .alignfull) {
    width: auto;
    max-width: 100%;
    margin-inline: 0;
}

.blog-details-body :is(figcaption, .wp-caption-text) {
    margin-top: 8px;
    color: var(--bd-muted);
    font-size: 0.875rem;
    line-height: 1.5;
    text-align: center;
}

.blog-details-body .wp-block-table {
    overflow-x: auto;
}

.blog-details-body table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9375rem;
}

.blog-details-body :is(th, td) {
    padding: 10px 12px;
    border: 1px solid var(--bd-border);
    text-align: left;
    vertical-align: top;
}

.blog-details-body th {
    background: var(--bd-bg-light);
    color: var(--bd-navy);
    font-weight: 700;
}

.blog-details-body pre {
    margin: 22px 0;
    padding: 16px 18px;
    overflow-x: auto;
    border-radius: var(--bd-radius-sm);
    background: var(--bd-bg-light);
    color: var(--bd-navy);
    font-size: 0.875rem;
    line-height: 1.6;
}

.blog-details-body :not(pre) > code {
    padding: 0.1em 0.35em;
    border-radius: 4px;
    background: var(--bd-bg-light);
    color: var(--bd-navy);
    font-size: 0.9em;
}

.blog-details-body hr {
    margin: 28px 0;
    border: 0;
    border-top: 1px solid var(--bd-border);
}

/* Multi-page posts (<!--nextpage-->) */
.blog-details-pages {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 22px;
    color: var(--bd-navy);
    font-weight: 700;
}

.blog-details .blog-details-pages a {
    color: var(--bd-orange-dark);
}

/* 7. Tags ================================================================= */

.blog-details-tags {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 16px;
    margin-top: 24px;
    padding-top: 18px;
    border-top: 1px solid var(--bd-border);
}

.blog-details-tags-label {
    color: var(--bd-navy);
    font-size: 1rem;
    font-weight: 800;
}

.blog-details-tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.blog-details-tag {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 6px 20px;
    border-radius: 999px;
    background: var(--bd-bg-light);
    color: var(--bd-navy);
    font-size: 0.8125rem;
    font-weight: 600;
    text-decoration: none;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.blog-details .blog-details-tag:hover {
    background: var(--bd-orange);
    color: var(--bd-white);
}

/* 8. Sidebar cards & search =============================================== */

.blog-details-sidebar {
    display: grid;
    gap: 20px;
}

.blog-details-card {
    padding: 20px 18px;
    border: 1px solid var(--bd-border);
    border-radius: var(--bd-radius);
    background: var(--bd-white);
    box-shadow: var(--bd-shadow);
}

.blog-details-card-title,
.blog-details-related-heading {
    margin: 0 0 14px;
    color: var(--bd-navy);
    font-size: 1.125rem;
    font-weight: 800;
    line-height: 1.3;
}

.blog-details-search {
    position: relative;
    margin: 0;
}

.blog-details-search-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--bd-navy);
    pointer-events: none;
}

.blog-details-search-input {
    width: 100%;
    height: 46px;
    padding: 0 16px 0 46px;
    border: 1px solid var(--bd-border);
    border-radius: 999px;
    background: var(--bd-white);
    color: var(--bd-navy);
    font: inherit;
    font-size: 0.875rem;
    box-shadow: 0 2px 8px rgba(11, 47, 91, 0.04);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    -webkit-appearance: none;
    appearance: none;
}

.blog-details-search-input::placeholder {
    color: var(--bd-muted);
    opacity: 1;
}

.blog-details .blog-details-search-input:focus,
.blog-details .blog-details-search-input:focus-visible {
    outline: none;
    border-color: var(--bd-orange);
    box-shadow: 0 0 0 3px rgba(255, 75, 11, 0.14);
}

.blog-details-search-status {
    margin: 10px 4px 0;
    color: var(--bd-muted);
    font-size: 0.8125rem;
    line-height: 1.45;
}

.blog-details-search-status:empty {
    display: none;
}

.blog-details-search-status a {
    color: var(--bd-orange);
    font-weight: 700;
}

/* 9. Sidebar categories =================================================== */

.blog-details-categories {
    padding-inline: 0;
    padding-bottom: 14px;
}

.blog-details-categories .blog-details-card-title {
    padding-inline: 20px;
    margin-bottom: 8px;
}

.blog-details-categories ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.blog-details-categories a {
    position: relative;
    display: flex;
    align-items: center;
    gap: 4px;
    min-height: 38px;
    padding: 6px 20px;
    color: var(--bd-text);
    font-size: 0.9375rem;
    font-weight: 500;
    text-decoration: none;
    transition: color 0.2s ease, background-color 0.2s ease;
}

.blog-details-categories a::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--bd-orange);
    transform: scaleY(0);
    transition: transform 0.25s var(--bd-ease);
}

.blog-details .blog-details-categories a:hover {
    color: var(--bd-orange);
}

.blog-details .blog-details-categories a.is-active {
    background: var(--bd-orange-tint);
    color: var(--bd-orange-dark);
    font-weight: 600;
}

.blog-details-categories a.is-active::before {
    transform: none;
}

/* 10. Related articles ==================================================== */

.blog-details-related {
    margin-top: 8px;
}

.blog-details-related-list {
    display: grid;
    gap: 14px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.blog-details-related-card {
    position: relative;
    display: grid;
    grid-template-columns: 92px minmax(0, 1fr) auto;
    align-items: stretch;
    gap: 14px;
    padding-right: 14px;
    overflow: hidden;
    border: 1px solid var(--bd-border);
    border-radius: var(--bd-radius-sm);
    background: var(--bd-white);
    box-shadow: var(--bd-shadow);
    transition: box-shadow 0.25s ease, border-color 0.25s ease;
}

.blog-details-related-card[hidden],
.blog-details-more-card[hidden] {
    display: none;
}

/* Posts without a featured image (doubled class: wins over the responsive
   grid-template-columns below) */
.blog-details-related-card.blog-details-related-card--no-image {
    grid-template-columns: minmax(0, 1fr) auto;
    padding-left: 16px;
}

.blog-details-related-image {
    width: 100%;
    height: 100%;
    min-height: 74px;
    object-fit: cover;
}

.blog-details-related-body {
    align-self: center;
    padding-block: 10px;
}

.blog-details-related-title {
    margin: 7px 0 0;
    color: var(--bd-navy);
    font-size: 0.9063rem;
    font-weight: 800;
    line-height: 1.32;
}

/* Stretched link: the whole card is clickable, one link per card */
.blog-details-related-title a,
.blog-details-more-card-title a {
    text-decoration: none;
}

.blog-details-related-title a::after,
.blog-details-more-card-title a::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
}

.blog-details-related-card .blog-details-arrow {
    align-self: end;
    margin-bottom: 14px;
}

.blog-details-related-card:hover,
.blog-details-more-card:hover {
    border-color: #D5E1EE;
    box-shadow: var(--bd-shadow-hover);
}

.blog-details-related-card:hover .blog-details-arrow,
.blog-details-more-card:hover .blog-details-arrow {
    transform: translateX(4px);
}

.blog-details-related-card:hover .blog-details-related-title,
.blog-details-more-card:hover .blog-details-more-card-title {
    color: var(--bd-orange);
}

.blog-details-related-card:focus-within,
.blog-details-more-card:focus-within {
    outline: 2px solid var(--bd-orange);
    outline-offset: 2px;
}

.blog-details-related-card a:focus-visible,
.blog-details-more-card a:focus-visible {
    outline: none; /* the card shows the focus ring */
}

/* 11. More Articles ======================================================= */

.blog-details-more {
    padding-block: clamp(28px, 3vw, 40px) clamp(56px, 6vw, 88px);
    border-top: 1px solid var(--bd-border);
    background: linear-gradient(180deg, #F8FBFE 0%, var(--bd-white) 100%);
}

.blog-details-more-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px 24px;
    margin-bottom: 22px;
}

.blog-details-more-title {
    display: flex;
    align-items: center;
    gap: 18px;
    margin: 0;
    color: var(--bd-navy);
    font-size: clamp(1.375rem, 0.6vw + 1.15rem, 1.75rem);
    font-weight: 800;
    line-height: 1.2;
}

.blog-details-more-title::before {
    content: "";
    flex: none;
    width: clamp(36px, 3.4vw, 48px);
    height: 3px;
    border-radius: 2px;
    background: var(--bd-orange);
}

.blog-details .blog-details-more-all {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 40px;
    color: var(--bd-navy);
    font-size: 0.9375rem;
    font-weight: 800;
    text-decoration: none;
    transition: color 0.2s ease;
}

.blog-details-more-all svg {
    color: var(--bd-orange);
    transition: transform 0.25s var(--bd-ease);
}

.blog-details .blog-details-more-all:hover {
    color: var(--bd-orange);
}

.blog-details-more-all:hover svg {
    transform: translateX(4px);
}

.blog-details-more-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: clamp(16px, 1.8vw, 24px);
    margin: 0;
    padding: 0;
    list-style: none;
}

.blog-details-more-card {
    position: relative;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid var(--bd-border);
    border-radius: var(--bd-radius);
    background: var(--bd-white);
    box-shadow: var(--bd-shadow);
    transition: box-shadow 0.25s ease, border-color 0.25s ease;
}

.blog-details-more-image {
    width: 100%;
    height: auto;
    aspect-ratio: 3.6 / 1;
    object-fit: cover;
}

.blog-details-more-body {
    flex: 1;
    padding: 18px 56px 22px 22px;
}

.blog-details-more-card-title {
    margin: 10px 0 0;
    color: var(--bd-navy);
    font-size: clamp(1rem, 0.25vw + 0.95rem, 1.125rem);
    font-weight: 800;
    line-height: 1.32;
    transition: color 0.2s ease;
}

.blog-details-more-card .blog-details-arrow {
    position: absolute;
    right: 22px;
    bottom: 24px;
}

/* 12. Responsive ========================================================== */

/* Laptop / iPad landscape: keep two columns, tighten the sidebar */
@media (max-width: 1279px) {
    .blog-details-layout {
        grid-template-columns: minmax(0, 1fr) minmax(270px, 31%);
    }

    .blog-details-related-card {
        grid-template-columns: 84px minmax(0, 1fr) auto;
        gap: 12px;
    }
}

@media (max-width: 1100px) {
    .blog-details-hero-media {
        width: 64%;
    }

    .blog-details-more-image {
        aspect-ratio: 3 / 1;
    }
}

/* Tablet portrait: stack article and sidebar */
@media (max-width: 991px) {
    .blog-details-layout {
        grid-template-columns: minmax(0, 1fr);
        gap: 40px;
    }

    .blog-details-hero-media {
        width: 70%;
    }

    .blog-details-hero-media::before {
        background: linear-gradient(90deg, #F6FAFE 0%, rgba(246, 250, 254, 0.9) 22%, rgba(246, 250, 254, 0.45) 48%, rgba(246, 250, 254, 0.05) 75%);
    }

    .blog-details-more-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 640px) and (max-width: 991px) {
    .blog-details-sidebar {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        align-items: start;
        gap: 24px;
    }

    .blog-details-search-card {
        grid-column: 1 / -1;
    }

    .blog-details-related {
        margin-top: 0;
    }
}

/* Mobile */
@media (max-width: 767px) {
    .blog-details-hero {
        min-height: 0;
        padding-block: 30px 34px;
    }

    .blog-details-hero-media {
        width: 100%;
    }

    .blog-details-hero-media img {
        object-position: 70% 40%;
    }

    /* Photo stays visible on the right but never competes with the text */
    .blog-details-hero-media::before {
        background: linear-gradient(90deg, rgba(246, 250, 254, 0.97) 0%, rgba(246, 250, 254, 0.9) 45%, rgba(246, 250, 254, 0.55) 75%, rgba(246, 250, 254, 0.3) 100%);
    }

    .blog-details-hero-shape--blue {
        width: 90px;
    }

    .blog-details-hero-shape--orange {
        width: 70px;
        height: 40%;
    }

    .blog-details-hero-shape--orange-low {
        width: 32px;
        height: 30%;
    }

    .blog-details-breadcrumb ol {
        max-width: 85%;
        font-size: 0.75rem;
    }

    .blog-details-hero-text {
        max-width: 85%;
        font-size: 0.9375rem;
    }

    .blog-details-featured {
        margin-bottom: 18px;
    }

    .blog-details-featured img {
        aspect-ratio: 16 / 9;
    }

    .blog-details-intro {
        margin-top: 20px;
    }

    .blog-details-more-image {
        aspect-ratio: 2.6 / 1;
    }
}

@media (max-width: 639px) {
    .blog-details-more-grid {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (max-width: 479px) {
    .blog-details-quote {
        flex-direction: column;
        gap: 10px;
    }

    .blog-details-quote-icon {
        width: 32px;
        margin-top: 0;
    }

    .blog-details-body blockquote:not(.blog-details-quote) {
        padding-left: clamp(20px, 2.6vw, 34px);
    }

    .blog-details-body blockquote:not(.blog-details-quote)::before {
        position: static;
        display: block;
        width: 32px;
        margin-bottom: 10px;
    }

    .blog-details-tags {
        flex-direction: column;
        align-items: flex-start;
    }

    .blog-details-tag {
        padding-inline: 16px;
    }

    .blog-details-related-card {
        grid-template-columns: 84px minmax(0, 1fr) auto;
        gap: 12px;
        padding-right: 12px;
    }

    .blog-details-more-body {
        padding: 16px 50px 20px 18px;
    }

    .blog-details-more-card .blog-details-arrow {
        right: 18px;
        bottom: 22px;
    }
}

@media (max-width: 359px) {
    .blog-details-hero-title {
        font-size: 1.875rem;
    }

    .blog-details-related-card {
        grid-template-columns: 72px minmax(0, 1fr) auto;
        gap: 10px;
    }

    .blog-details-meta--small {
        gap: 4px 8px;
    }
}

/* 13. Accessibility & reduced motion ====================================== */

@media (prefers-reduced-motion: reduce) {
    .blog-details-arrow,
    .blog-details-more-all svg,
    .blog-details-categories a::before {
        transition: none;
    }

    .blog-details-related-card:hover .blog-details-arrow,
    .blog-details-more-card:hover .blog-details-arrow,
    .blog-details-more-all:hover svg {
        transform: none;
    }
}

@media (forced-colors: active) {
    .blog-details-badge,
    .blog-details-tag,
    .blog-details-categories a.is-active {
        border: 1px solid CanvasText;
    }

    .blog-details-checklist li::before,
    .blog-details-body ul:where(:not([class]), .wp-block-list) > li::before {
        forced-color-adjust: none;
    }
}
