/* ============================================
   Hero Banner
   ============================================ */
#blog-hero {
    position: relative;
    min-height: 28rem;
    display: flex;
    align-items: flex-end;
    background-color: #0a1f3d;
    background-size: cover;
    background-position: center;
    padding: clamp(3rem, 8vw, 5rem) 0 clamp(2rem, 5vw, 3rem);
    overflow: hidden;
}

#blog-hero .cs-hero-overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(
        to top,
        rgba(5, 15, 35, 0.92) 40%,
        rgba(5, 15, 35, 0.45) 100%
    );
    pointer-events: none;
}

#blog-hero .cs-container {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding-left: clamp(1rem, 5vw, 3rem);
    padding-right: clamp(1rem, 5vw, 3rem);
}

#blog-hero .cs-tag {
    display: inline-flex;
    align-self: flex-start;
    background: transparent;
    color: #C9A84C;
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 0;
    border-radius: 0;
    text-decoration: none;
    transition: opacity 0.2s;
}

#blog-hero .cs-tag:hover {
    opacity: 0.85;
}

#blog-hero .cs-hero-title {
    font-size: clamp(1.25rem, 3vw, 1.875rem);
    font-weight: 700;
    color: #ffffff;
    line-height: 1.3;
    max-width: 40rem;
    margin: 0;
}

#blog-hero .cs-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.65);
}

#blog-hero .cs-meta-item {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

#blog-hero .cs-meta-item svg {
    flex-shrink: 0;
}

#blog-hero .cs-meta-sep {
    opacity: 0.35;
}

/* ============================================
   Article + Sidebar Layout
   ============================================ */
#blog-content {
    padding: clamp(2rem, 5vw, 4rem) clamp(0.5rem, 2vw, 1.5rem);
    max-width: 88rem;
    margin-inline: auto;
}

#blog-content .cs-blog-layout {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
    gap: clamp(2rem, 4vw, 3rem);
    align-items: start;
}

@media only screen and (max-width: 1023px) {
    #blog-content .cs-blog-layout {
        grid-template-columns: 1fr;
    }
}

/* ============================================
   Article Body
   ============================================ */
.cs-article {
    font-size: 1rem;
    line-height: 1.8;
    color: var(--bodyTextColor);
}

.cs-article p {
    margin: 0 0 1.25rem;
}

.cs-article h2 {
    font-size: clamp(1.125rem, 2.5vw, 1.5rem);
    font-weight: 700;
    color: var(--headerColor);
    margin: 2rem 0 0.75rem;
    line-height: 1.3;
}

.cs-article h3 {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--headerColor);
    margin: 1.5rem 0 0.5rem;
}

.cs-article ul,
.cs-article ol {
    margin: 0 0 1.25rem 1.25rem;
    padding: 0;
}

.cs-article ul li,
.cs-article ol li {
    margin-bottom: 0.5rem;
}

.cs-article img {
    max-width: 100%;
    max-height: 480px;
    width: 100%;
    object-fit: cover;
    border-radius: 0.5rem;
    display: block;
    margin: 1.5rem auto;
}

.cs-article figure {
    margin: 1.5rem 0;
}

.cs-article figure figcaption {
    font-size: 0.75rem;
    color: var(--bodyTextColor);
    text-align: center;
    margin-top: 0.375rem;
}

/* Pull quote — use WP Quote block */
.cs-article blockquote {
    border-left: 0.1875rem solid var(--secondary);
    padding: 0.75rem 1.25rem;
    margin: 1.5rem 0;
    background: var(--tableColor);
    border-radius: 0 0.5rem 0.5rem 0;
}

.cs-article blockquote p {
    font-size: 1.125rem;
    font-style: italic;
    color: var(--headerColor);
    margin: 0;
    line-height: 1.55;
}

.cs-article blockquote cite {
    font-size: 0.75rem;
    color: var(--bodyTextColor);
    font-style: normal;
    display: block;
    margin-top: 0.5rem;
}

/* Tables (AI era article, admissions lists) */
.cs-article table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
    margin: 1.5rem 0;
    table-layout: fixed;
}

.cs-article table th {
    background: var(--primary);
    color: var(--bodyTextColorWhite);
    font-weight: 600;
    text-align: left;
    padding: 0.625rem 0.75rem;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.cs-article table td {
    padding: 0.625rem 0.75rem;
    border-bottom: 1px solid var(--tableColor);
    color: var(--bodyTextColor);
    vertical-align: top;
}

.cs-article table tr:last-child td {
    border-bottom: none;
}

.cs-article table tr:nth-child(even) td {
    background: var(--tableColor);
}

/* Video embed wrapper */
.cs-article .wp-block-embed {
    margin: 1.5rem 0;
}

.cs-article .wp-block-embed iframe {
    width: 100%;
    border-radius: 0.5rem;
}

.cs-article hr {
    border: none;
    border-top: 1px solid var(--tableColor);
    margin: 2rem 0;
}

/* ============================================
   Post Navigation
   ============================================ */
.cs-post-nav {
    display: flex;
    gap: 1rem;
    margin-top: 2.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--tableColor);
}

@media only screen and (max-width: 600px) {
    .cs-post-nav {
        flex-direction: column;
    }
}

.cs-post-nav-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex: 1;
    text-decoration: none;
    color: var(--bodyTextColor);
    font-size: 0.875rem;
    transition: color 0.2s;
}

.cs-post-nav-link:hover {
    color: var(--primary);
}

.cs-post-nav-link span {
    display: flex;
    flex-direction: column;
}

.cs-post-nav-link span small {
    font-size: 0.6875rem;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: var(--secondary);
    font-weight: 600;
    margin-bottom: 0.125rem;
}

.cs-post-nav-link svg {
    flex-shrink: 0;
    color: var(--secondary);
}

.cs-post-nav-link.cs-next {
    justify-content: flex-end;
    text-align: right;
}

/* ============================================
   Author Card
   ============================================ */
.cs-author-card {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1.25rem;
    background: var(--tableColor);
    border-radius: 0.75rem;
    margin-top: 2rem;
}

.cs-author-card .cs-author-avatar {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    background: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--secondary);
    font-size: 0.8125rem;
    font-weight: 600;
    flex-shrink: 0;
}

.cs-author-card .cs-author-info p {
    margin: 0;
}

.cs-author-card .cs-author-name {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--headerColor);
}

.cs-author-card .cs-author-role {
    font-size: 0.75rem;
    color: var(--bodyTextColor);
}

/* ============================================
   Sidebar
   ============================================ */
.cs-sidebar {
    position: sticky;
    top: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

@media only screen and (max-width: 1023px) {
    .cs-sidebar {
        position: static;
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr));
    }
}

.cs-sidebar-card {
    background: #ffffff;
    border: 1px solid #e2e2e2;
    border-radius: 0.75rem;
    padding: 1.25rem;
}

.cs-sidebar-card .cs-sidebar-card-title {
    font-size: 1rem;
    font-family: var(--headerFont);
    letter-spacing: 0.09em;
    text-transform: capitalize;
    color: var(--tableColor);
    margin: 0 0 1rem;
}

.cs-sidebar-contact {
    border: 1px solid #e2e2e2 !important;
    border-radius: 0.75rem;
}

/* CTA card body text */
.cs-sidebar-cta-text {
    font-size: 0.8125rem;
    color: #555555;
    line-height: 1.6;
    margin: 0 0 1rem;
}

/* CTA card buttons */
.cs-sidebar-cta .cs-button-solid,
.cs-sidebar-cta .cs-button-outline {
    display: block;
    text-align: center;
    width: 100%;
    margin-bottom: 0.5rem;
    box-sizing: border-box;
    padding: 0.75rem 1rem;
    border-radius: 4rem;
    font-size: 0.8125rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-decoration: none;
    transition: opacity 0.2s;
}

.cs-sidebar-cta .cs-button-solid {
    background: var(--primary, #0a1f3d);
    color: #ffffff !important;
}

.cs-sidebar-cta .cs-button-solid:hover {
    opacity: 0.88;
}

.cs-sidebar-cta .cs-button-outline {
    background: transparent;
    color: var(--primary, #0a1f3d) !important;
    border: 1.5px solid var(--primary, #0a1f3d);
}

.cs-sidebar-cta .cs-button-outline:hover {
    background: var(--primary, #0a1f3d);
    color: #ffffff !important;
}

.cs-sidebar-cta .cs-button-solid:last-child,
.cs-sidebar-cta .cs-button-outline:last-child {
    margin-bottom: 0;
}

/* Share card */
.cs-share-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.cs-share-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.3125rem;
    font-size: 0.75rem;
    color: #444444;
    border: 1px solid #d0d0d0;
    border-radius: 0.375rem;
    padding: 0.375rem 0.625rem;
    background: none;
    cursor: pointer;
    text-decoration: none;
    transition: border-color 0.2s, color 0.2s;
}

.cs-share-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}

/* Related posts */
.cs-related-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.cs-related-item {
    border-bottom: 1px solid #e8e8e8;
}

.cs-related-item:last-child {
    border-bottom: none;
}

.cs-related-link {
    display: flex;
    gap: 0.625rem;
    padding: 0.5rem 0;
    text-decoration: none;
    color: inherit;
}

.cs-related-link:hover .cs-related-title {
    color: var(--primary);
}

.cs-related-thumb {
    width: 3rem;
    height: 3rem;
    border-radius: 0.375rem;
    background: #eef0f4;
    flex-shrink: 0;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cs-related-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cs-related-thumb .cs-related-thumb-fallback {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--primary);
}

.cs-related-text {
    flex: 1;
    min-width: 0;
}

.cs-related-title {
    font-size: 0.75rem;
    font-weight: 600;
    color: #1a1a2e;
    margin: 0 0 0.125rem;
    line-height: 1.35;
    transition: color 0.2s;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.cs-related-meta {
    font-size: 0.6875rem;
    color: #777777;
}

/* Contact card */
.cs-sidebar-contact address {
    font-style: normal;
}

.cs-sidebar-contact address p {
    display: flex;
    align-items: flex-start;
    gap: 0.375rem;
    font-size: 1rem;
    color: #444444;
    margin: 0 0 0.5rem;
    line-height: 1.6;
}

.cs-sidebar-contact address p:last-child {
    margin-bottom: 0;
}

.cs-sidebar-contact address p svg {
    flex-shrink: 0;
    margin-top: 0.125rem;
    color: var(--primary);
}

.cs-sidebar-contact address a {
    color: #444444;
    text-decoration: none;
    transition: color 0.2s;
}

.cs-sidebar-contact address a:hover {
    color: var(--primary);
}