/* -------------------------------------------------------------------------- */
/* Plugin Styles: TBS WA Helper */
/* -------------------------------------------------------------------------- */

/* Root Variables (Fallback) */
:root {
    --tbs-wa-color-text-main: #18181b;
    --tbs-wa-color-text-muted: #52525b;
    --tbs-wa-color-border: #E4E4E7;
    --tbs-wa-color-bg-alt: #F4F4F5;
    --tbs-wa-font-serif: 'Playfair Display', serif;
    --tbs-wa-font-sans: 'Manrope', sans-serif;
    --tbs-wa-ease-out: cubic-bezier(0.25, 1, 0.5, 1);
}

/* -------------------------------------------------------------------------- */
/* Latest From the Blog (Grid) */
/* -------------------------------------------------------------------------- */
.tbs-grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2.5rem;
}

.tbs-blog-card {
    display: flex;
    flex-direction: column;
    background: #fff;
    border: none;
    transition: transform 0.3s var(--tbs-wa-ease-out);
    text-decoration: none;
}

.tbs-blog-card:hover {
    transform: translateY(-5px);
}

.tbs-blog-image {
    width: 100%;
    height: 250px;
    background: #f0f0f0;
    overflow: hidden;
    margin-bottom: 1.5rem;
    position: relative;
    border-radius: 4px;
}

.tbs-blog-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.tbs-blog-card:hover .tbs-blog-image img {
    transform: scale(1.05);
}

.tbs-blog-content {
    padding-right: 1rem;
}

.tbs-blog-date {
    font-size: 0.8rem;
    color: var(--tbs-wa-color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
    display: block;
    font-weight: 500;
}

.tbs-blog-title {
    font-family: var(--tbs-wa-font-serif);
    font-size: 1.35rem;
    line-height: 1.3;
    margin-bottom: 1rem;
    color: var(--tbs-wa-color-text-main);
}

.tbs-blog-link {
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 4px;
    color: var(--tbs-wa-color-text-main);
    transition: opacity 0.2s;
}

.tbs-blog-card:hover .tbs-blog-link {
    opacity: 0.7;
}

/* -------------------------------------------------------------------------- */
/* Publications & Thought Leadership (List) */
/* -------------------------------------------------------------------------- */
.tbs-publications-list {
    display: grid;
    grid-template-columns: 1fr;
    border-top: 1px solid var(--tbs-wa-color-border);
}


.tbs-pub-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 1rem;
    border-bottom: 1px solid var(--tbs-wa-color-border);
    transition: all 0.3s ease;
    gap: 2rem;
    text-decoration: none;
    color: inherit;
    position: relative;
    z-index: 1;
    overflow: hidden;
}

.tbs-pub-item:hover {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
}

.tbs-pub-overlay-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.5s ease;
}

.tbs-pub-overlay-image::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.9);
    z-index: 1;
}


.tbs-pub-overlay-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: relative;
    z-index: 0;
}


.tbs-pub-overlay-image::before {
    content: attr(data-source);
    position: absolute;
    top: 50%;
    left: 20%;
    transform: translateY(-50%);
    font-size: 4rem;
    font-weight: 800;
    color: rgba(0, 0, 0, 0.04);
    white-space: nowrap;
    z-index: 2;
    pointer-events: none;
    font-family: var(--tbs-wa-font-sans);
    line-height: 1;
    text-transform: uppercase;
}

.tbs-pub-item:hover .tbs-pub-overlay-image {
    opacity: 1;
    visibility: visible;
}

.tbs-pub-meta,
.tbs-pub-title,
.tbs-pub-icon {
    position: relative;
    z-index: 2;
}

.tbs-pub-meta {
    font-size: 0.85rem;
    color: var(--tbs-wa-color-text-muted);
    width: 30%;
    min-width: 200px;
    flex-shrink: 0;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 500;
}

.tbs-pub-date {
    display: block;
    color: #999;
    font-size: 0.75rem;
    margin-top: 0.2rem;
    font-weight: 400;
}

.tbs-pub-title {
    font-family: var(--tbs-wa-font-serif);
    font-size: 1.25rem;
    font-weight: 400;
    flex-grow: 1;
    color: var(--tbs-wa-color-text-main);
    line-height: 1.4;
    text-align: left;
    padding-right: 2rem;

    /* Truncate to 1 line to prevent height shifting */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
}

.tbs-pub-icon {
    font-size: 1.2rem;
    opacity: 0.3;
    transition: transform 0.3s ease, opacity 0.3s ease;
    flex-shrink: 0;
}

.tbs-pub-item:hover .tbs-pub-icon {
    transform: translate(3px, -3px);
    opacity: 1;
}

@media (max-width: 900px) {
    .tbs-pub-overlay-image {
        display: none;
    }
}

/* Helper for section header if handled by widget */
.tbs-section-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 3rem;
}

.tbs-section-heading {
    margin-bottom: 0;
    font-family: "Manrope", sans-serif;
    /* Fallback */
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--tbs-wa-color-border);
    display: inline-block;
    color: var(--tbs-wa-color-text-main);
}

.tbs-view-all-link {
    display: inline-flex;
    align-items: center;
    border-bottom: 1px solid var(--tbs-wa-color-text-main);
    padding-bottom: 2px;
    margin-top: 0.5rem;
    font-weight: 500;
    transition: all 0.3s ease;
    text-decoration: none;
    color: inherit;
}

/* -------------------------------------------------------------------------- */
/* Single Post Header Styles */
/* -------------------------------------------------------------------------- */
/* Container Helper */
.tbs-small-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 1rem;
    /* Added padding for mobile safety */
}

/* Header Section */
.tbs-post-header {
    text-align: center;
    padding-top: 6rem;
    padding-bottom: 4rem;
    background-color: var(--tbs-wa-color-bg-alt);
    margin-bottom: 0;
    /* Ensures it sits flush above image margin */
}

.tbs-post-meta {
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--tbs-wa-color-text-muted);
    font-family: var(--tbs-wa-font-sans);
}

.tbs-post-category {
    color: var(--tbs-wa-color-text-main);
    font-weight: 600;
    margin-right: 1rem;
}

.tbs-post-title {
    font-family: var(--tbs-wa-font-serif);
    font-size: clamp(2rem, 5vw, 3.5rem);
    line-height: 1.2;
    margin-bottom: 1.5rem;
    color: var(--tbs-wa-color-text-main);
    font-weight: 400;
}

.tbs-post-excerpt {
    font-size: 1.25rem;
    color: var(--tbs-wa-color-text-muted);
    font-family: var(--tbs-wa-font-sans);
    line-height: 1.6;
    margin-bottom: 2rem;
}

.tbs-post-author {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.tbs-author-avatar img {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
}

.tbs-author-name {
    font-weight: 500;
    font-size: 0.95rem;
    color: var(--tbs-wa-color-text-main);
    font-family: var(--tbs-wa-font-sans);
}

/* -------------------------------------------------------------------------- */
/* Single Post Content Styles */
/* -------------------------------------------------------------------------- */
.tbs-post-featured-image {
    margin: -3rem auto 4rem;
    width: 100%;
    border-radius: 4px;
    overflow: hidden;
    /* Fixes radius */
    position: relative;
    z-index: 2;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    /* Adds subtle lift */
}

.tbs-post-featured-image img {
    width: 100%;
    height: auto;
    display: block;
}

.tbs-post-featured-image figcaption {
    font-size: 0.85rem;
    color: #888;
    margin-top: 0.5rem;
    text-align: center;
    font-family: var(--tbs-wa-font-sans);
}

.tbs-article-body {
    font-family: var(--tbs-wa-font-serif);
    font-size: 1.15rem;
    line-height: 1.8;
    color: #333;
}

.tbs-article-body p {
    margin-bottom: 2rem;
}

.tbs-article-body h2,
.tbs-article-body h3,
.tbs-article-body h4 {
    font-family: var(--tbs-wa-font-sans);
    font-weight: 600;
    margin-top: 3rem;
    margin-bottom: 1.5rem;
    line-height: 1.3;
    color: var(--tbs-wa-color-text-main);
}

.tbs-article-body h2 {
    font-size: 2rem;
}

.tbs-article-body h3 {
    font-size: 1.5rem;
}

.tbs-article-body blockquote {
    font-size: 1.8rem;
    font-family: var(--tbs-wa-font-serif);
    font-style: italic;
    color: var(--tbs-wa-color-text-main);
    border-left: 2px solid var(--tbs-wa-color-text-main);
    padding-left: 2rem;
    margin: 3rem 0;
    line-height: 1.4;
}

.tbs-drop-cap::first-letter {
    float: left;
    font-size: 4rem;
    line-height: 0.8;
    margin-right: 0.5rem;
    font-weight: 700;
}

.tbs-post-footer {
    border-top: 1px solid var(--tbs-wa-color-border);
    padding-top: 2rem;
    margin-top: 4rem;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: center;
}

.tbs-post-tags a,
.tbs-post-tags span {
    display: inline-block;
    background: var(--tbs-wa-color-bg-alt);
    padding: 0.3rem 0.8rem;
    border-radius: 50px;
    font-size: 0.85rem;
    margin-right: 0.5rem;
    color: var(--tbs-wa-color-text-muted);
    text-decoration: none;
    font-family: var(--tbs-wa-font-sans);
    transition: background 0.3s ease;
}

.tbs-post-tags a:hover {
    background: #e0e0e0;
}

.tbs-share-links {
    font-family: var(--tbs-wa-font-sans);
}

.tbs-share-links span {
    font-weight: 600;
    margin-right: 0.5rem;
}

.tbs-share-links a {
    margin-left: 1rem;
    font-weight: 500;
    color: var(--tbs-wa-color-text-main);
    text-decoration: none;
    transition: opacity 0.3s;
}

.tbs-share-links a:hover {
    opacity: 0.7;
}

@media (max-width: 768px) {
    .tbs-pub-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .tbs-pub-meta {
        min-width: auto;
        margin-bottom: 0px;
        font-size: 0.75rem;
    }

    .tbs-pub-icon {
        display: none;
    }

    .tbs-pub-title {
        font-size: 1.15rem;
    }

    .tbs-post-header {
        padding-top: 4rem;
    }
}

/* -------------------------------------------------------------------------- */
/* Podcast Section Styles */
/* -------------------------------------------------------------------------- */
.tbs-podcasts-section {
    padding-top: 5rem;
    padding-bottom: 5rem;
    background: #fff;
}

.tbs-podcast-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-top: 3rem;
}

.tbs-podcast-item {
    text-decoration: none;
    color: inherit;
    display: block;
}

.tbs-podcast-thumb {
    position: relative;
    width: 100%;
    aspect-ratio: 16/9;
    overflow: hidden;
    background: #f0f0f0;
    border-radius: 4px;
}

.tbs-podcast-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.tbs-podcast-item:hover .tbs-podcast-thumb img {
    transform: scale(1.05);
}

.tbs-podcast-play-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(1);
    width: 64px;
    height: 64px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #000;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.tbs-podcast-item:hover .tbs-podcast-play-icon {
    transform: translate(-50%, -50%) scale(1.1);
    background: #fff;
}

.tbs-podcast-content {
    padding-top: 1.5rem;
}

.tbs-podcast-meta {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--tbs-wa-color-text-muted);
    margin-bottom: 0.5rem;
}

.tbs-podcast-title {
    font-family: var(--tbs-wa-font-serif);
    font-size: 1.25rem;
    line-height: 1.4;
    color: var(--tbs-wa-color-text-main);
    font-weight: 400;
}

@media (max-width: 900px) {
    .tbs-podcast-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
} 
/* Podcast Header Override */
.tbs-podcast-header-layout { display: block; margin-bottom: 3rem; }
.tbs-podcast-header-layout .tbs-section-subtitle { display: block; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.12em; margin-bottom: 0.5rem; color: var(--tbs-wa-color-text-muted); }
.tbs-podcast-header-layout .tbs-section-title { font-family: var(--tbs-wa-font-serif); font-size: 2.5rem; line-height: 1.2; color: var(--tbs-wa-color-text-main); margin: 0; font-weight: 400; }

/* Container Utility */
.tbs-container { width: 100%; max-width: 1400px; margin: 0 auto; padding: 0 5vw; }

/* Override for Transparent Background */
.tbs-podcasts-section { background: transparent; }

/* Updated Flex Header for View All Button */
.tbs-podcast-header-layout { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 3rem; }
.tbs-podcast-header-left { display: flex; flex-direction: column; }
.tbs-podcast-header-layout .tbs-section-subtitle { margin-bottom: 0.5rem; }
.tbs-podcast-header-layout .tbs-section-title { margin: 0; line-height: 1; }
.tbs-view-all-wrapper-top { margin-bottom: 5px; /* Alignment adjustment */ }
@media (max-width: 768px) { .tbs-podcast-header-layout { flex-direction: column; align-items: flex-start; gap: 1rem; } }
