/* ==========================================================================
   SINGLE POSTS & ARTICLES
   Unified Styles for News, Legal Trends, Podcasts, and Webinars
   ========================================================================== */

/* ==========================================================================
   1. POST TEMPLATE DEFAULTS & TYPOGRAPHY
   ========================================================================== */

.post-template-default .grid__blog-container h1,
.post-template-default .grid__blog-container h2,
.post-template-default .grid__blog-container h3,
.post-template-default .grid__blog-container h4,
.post-template-default .grid__blog-container h5,
.post-template-default .grid__blog-container h6 {
    font-family: var(--font-serif);
    margin-bottom: 1rem;
}

.post-template-default .grid__blog-container h1 {
    font-size: 4.2rem;
}

.post-template-default .grid__blog-container p {
    text-wrap: pretty;
}

.post-template-default .grid__blog-container a {
    color: var(--harbor);
}

.post-template-default .comments-area {
    display: none;
}


/* ==========================================================================
   2. AUTHOR SIDEBAR CARD
   Used on single posts to display the team member's bio summary.
   ========================================================================== */

.cmbg3-author-sidebar-card {
    position: relative;
    background-color: var(--atlantic);
    /* Copley (Navy) */
    color: #ffffff;
    padding: 0;
    margin-bottom: 30px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.cmbg3-author-sidebar-card:hover .author-card-content {
    background-color: var(--harbor);
}

.cmbg3-author-sidebar-card .author-card-image {
    background-image: url('/wp-content/uploads/author-profile-bg.png');
    background-size: cover;
    background-position: top;
    background-repeat: no-repeat;
}

.cmbg3-author-sidebar-card .author-card-image img {
    width: 100%;
    height: auto;
    display: block;
    aspect-ratio: 1/1;
    object-fit: cover;
    object-position: top;
    mix-blend-mode: multiply;
    transition: all 0.3s ease-in-out;
}

.cmbg3-author-sidebar-card .author-card-image a:hover img {
    transform: scale(1.05);
}

.cmbg3-author-sidebar-card .author-card-content {
    position: absolute;
    top: auto;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 1rem 2rem;
    z-index: 9;
    background-color: var(--atlantic);
    transition: all 0.3s ease-in-out;
}

.cmbg3-author-sidebar-card .author-name {
    color: #ffffff;
    font-size: 2rem;
    margin: 0 !important;
    line-height: 1;
}

.cmbg3-author-sidebar-card .author-name a {
    color: #fff;
    text-decoration: none !important;
    background-image: none !important;
    /* Prevents theme's dynamic line draw */
}

.cmbg3-author-sidebar-card .author-name a span {
    background-image: none !important;
    text-decoration: none !important;
}

.cmbg3-author-sidebar-card .author-name a:hover {
    text-decoration: none !important;
    background-image: none !important;
}

.cmbg3-author-sidebar-card .author-name a:hover span {
    background-image: none !important;
    text-decoration: none !important;
}

.cmbg3-author-sidebar-card .author-title {
    color: #b9b9b9;
    font-size: 1.4rem;
    margin: 0 0 20px 0;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.cmbg3-author-sidebar-card .author-card-footer {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cmbg3-author-sidebar-card .view-profile-link {
    color: #ffffff;
    text-decoration: none;
    font-size: 1.4rem;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: opacity 0.2s ease;
}

.cmbg3-author-sidebar-card .view-profile-link:hover {
    opacity: 0.8;
}

.cmbg3-author-sidebar-card .view-profile-link .arrow {
    color: var(--gold);
    font-size: 1.2rem;
}

/* "Lift" the sub-links so they are clickable on top of the card overlay */
.author-link,
.category-links a {
    position: relative;
    z-index: 10;
    /* Higher than the stretched-link's z-index */
}


/* ==========================================================================
   3. SIDEBAR CATEGORIES
   ========================================================================== */

.cmbg3-sidebar-categories .sidebar-title {
    font-size: 2rem;
    color: var(--copley-deep-blue);
    border-bottom: 2px solid var(--copley-deep-blue);
    padding-bottom: 10px;
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-family: var(--font-serif);
}

.cmbg3-sidebar-categories .category-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.cmbg3-sidebar-categories .category-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid var(--copley-slate);
}

.cmbg3-sidebar-categories .category-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.cmbg3-sidebar-categories .category-item a {
    text-decoration: none;
    color: var(--copley-slate);
    font-weight: 500;
    transition: color 0.2s ease;
    font-size: 1.3rem;
}

.cmbg3-sidebar-categories .category-item a:hover {
    color: var(--atlantic-deep);
}

.cmbg3-sidebar-categories .category-count {
    font-size: 1.3rem;
    color: var(--copley-grey);
}


/* ==========================================================================
   4. BLOG CARDS & FILTERING
   ========================================================================== */

.blog-card {
    position: relative;
}

.blog-card__image-container {
    display: block;
    /* Turns inline tags like <picture> into blocks so clipping works */
    position: relative;
    overflow: hidden;
    /* Clips the scaling image inside the card boundaries */
}

.blog-card__image {
    aspect-ratio: 16/9;
    width: 100%;
    height: auto;
    object-fit: cover;
    display: block;
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    /* Ultra-smooth cubic-bezier easing */
}

/* Premium Hover-Zoom Animation */
.blog-card:hover .blog-card__image {
    will-change: transform;
    transform: scale(1.04);
    /* Elegant, subtle scale */
}

.blog-card .blog-card__content {
    padding: 15px 15px 0px 15px;
}

.blog-card__title-link {
    margin-bottom: 1rem;
}

.blog-card__title {
    font-size: 2.4rem;
    font-family: var(--font-serif);
}




.blog-card__date {
    margin-top: 1rem;
    font-size: 1.4rem;
}

.blog-card a {
    text-decoration: none;
}

.blog-card a:hover {
    text-decoration: none !important;
}

.blog-filter-results-count {
    grid-column: 1 / -1;
    /* Span from the first column to the last */
    width: 100%;
    margin-bottom: 20px;
}

.blog-filter-pills-container {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 3rem;
}

.blog-filter-pill {
    background-color: var(--copley-light);
    color: var(--atlantic);
    font-size: 1.4rem;
    font-weight: 600;
    padding: 4px 8px;
    transition: all 0.25s ease-in-out;
}

.blog-filter-pill.is-active {
    background-color: var(--atlantic);
    color: white;
}

.blog-filter-pill span {
    font-weight: 400;
    font-size: 1.2rem;
}

.blog-ajax-pagination-wrapper {
    margin-top: 3rem;
}

.blog-ajax-pagination-wrapper .blog-filter-pagination {
    display: flex;
    gap: 6px;
    justify-content: center;
    align-items: center;
}

.blog-ajax-pagination-wrapper button.page-numbers,
.blog-ajax-pagination-wrapper span.page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    height: 44px;
    background-color: var(--union);
    padding: 0 1.5rem;
    font-size: 1.4rem;
    font-weight: 600;
    line-height: 1;
    border: 1px solid rgba(37, 45, 79, 0.15);
    color: var(--atlantic, #252d4f);
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    cursor: pointer;
}

.blog-ajax-pagination-wrapper button.page-numbers.current,
.blog-ajax-pagination-wrapper span.page-numbers.current {
    border-color: var(--harbor);
    background-color: var(--harbor);
    color: var(--union);
    cursor: default;
}

.blog-ajax-pagination-wrapper button.page-numbers:hover {
    border-color: var(--harbor);
    background-color: var(--harbor);
    color: #ffffff;
    text-decoration: none;
}

.blog-ajax-pagination-wrapper .pagination-dots {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    height: 44px;
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--copley-slate, #666666);
}


/* ==========================================================================
   5. LEGACY CONTENT CLEANUP
   Tidies up stacked images and messy layouts from old migrated posts.
   ========================================================================== */

.is-article .site-main img {
    max-width: 100% !important;
    height: auto !important;
}

/* Prevent parent caption/figure wrappers with legacy inline pixel widths from blowing out */
.is-article .site-main :is(.wp-block-image, .wp-caption, figure, .wp-caption-text) {
    max-width: 100% !important;
    box-sizing: border-box !important;
}

/* Clean block alignment and styling for content images */
.is-article .site-main :is(p, figure, .wp-block-image, .wp-caption) img {
    display: block;
    margin: 2.5rem auto !important;
    border-radius: 4px;
}

/* Ensure captions look good under these images */
.is-article .site-main :is(p, figure, .wp-block-image, .wp-caption) .wp-caption-text {
    text-align: center;
    font-size: 0.9rem;
    color: #666;
    margin-top: -1.5rem;
    margin-bottom: 2.5rem;
}




/* Target the image inside the FIRST card specifically */
ul.news-items-container>li.news-loop-item:first-of-type img.news-item__image {
    aspect-ratio: 1 / 1 !important;
    object-fit: cover !important;
    width: 100% !important;
    height: auto !important;
    /* Overrides explicit HTML height attributes to prevent aspect-ratio conflicts */
}

@media (min-width: 1024px) {
    ul.news-items-container>li.news-loop-item:first-of-type .news-item {
        grid-template-columns: 1fr 1fr;
        gap: 8rem;
        margin-bottom: 8rem;
    }
}

.blog-featured-hero {
    margin-top: 4rem;
    margin-bottom: 8rem;
}

.blog-featured-hero__inner {
    display: grid;
    grid-template-columns: 1fr;
    margin: 0 auto;
    gap: 8rem;
    align-items: end;
}

@media (min-width: 768px) {
    .blog-featured-hero__inner {
        grid-template-columns: 1fr 1fr;
    }
}

.blog-featured-hero__image-col img {
    aspect-ratio: 1/1;
    object-fit: cover;
    width: 100%;
    height: auto;
}

.blog-featured-hero__date {
    margin-bottom: 1rem;
    font-size: 1.6rem;
}

.blog-featured-hero__title {
    font-family: var(--font-serif);
    font-size: 3.2rem;
    text-decoration: none;
    margin-bottom: 2rem;
}

.blog-featured-hero__title a {
    text-decoration: none;
}

.blog-featured-hero__title a:hover {
    text-decoration: none !important;
    color: var(--harbor);
}

.blog-featured-hero__excerpt {
    font-size: 2rem;
}

.blog-featured-hero__excerpt p {
    margin-bottom: 0;
}

.blog-featured-hero__btn {
    margin-top: 2rem;
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
}

/* ==========================================================================
   4.5 BACK TO HUB NAVIGATION (AUTHOR ARCHIVES)
   ========================================================================== */

.blog-filter-back-to-hub {
    margin-bottom: 4rem;
}

.back-to-hub-link {
    color: var(--copley-slate, #666666);
    text-decoration: none !important;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 1.5rem;
    font-weight: 500;
    font-family: var(--font-sans, "SuisseIntl-Regular", sans-serif);
    transition: color 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.back-to-hub-link:hover {
    color: var(--copley-deep-blue, #000000) !important;
}

.back-to-hub-link .arrow {
    font-size: 1.6rem;
    line-height: 1;
    display: inline-block;
    transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.back-to-hub-link:hover .arrow {
    transform: translateX(-4px);
}