/* ============================================================
   Med Spa Blog Redesign — style.css  v2.1.0
   Brand Colors:
     Dark bg:       #0a0a0a  (header/nav/dark sections)
     Teal accent:   #00c4cc  (links, borders, active states)
     Purple button: #7e39e8  (CTA buttons)
     White:         #ffffff
   ============================================================ */

/* ── Google Font: Montserrat ─────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@600;700;800&display=swap');

/* ============================================================
   DIVI TEMPLATE RESETS
   ============================================================ */

/* Hide Divi's native right sidebar */
.single-post #sidebar,
.single #sidebar {
    display: none !important;
}

/* Hide Divi's sidebar divider line (container::before pseudo-element) */
.single-post #main-content .container::before,
.single #main-content .container::before,
.single-post #main-content .container:before,
.single #main-content .container:before {
    display: none !important;
    background: none !important;
    width: 0 !important;
}

/* Give left-area full width */
.single-post #left-area,
.single #left-area {
    width: 100% !important;
    float: none !important;
    padding-right: 0 !important;
    margin-right: 0 !important;
}

/* Constrain content area to a readable max-width, centered */
.single-post #content-area,
.single #content-area {
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 20px;
    box-sizing: border-box;
}

/* Hide the original Divi title/meta block — we rebuild it in the hero */
.single-post .et_pb_post > .et_post_meta_wrapper:first-child,
.single .et_pb_post > .et_post_meta_wrapper:first-child {
    display: none !important;
}

/* The comment section wrapper Divi puts in a second et_post_meta_wrapper */
.single-post .et_pb_post > .et_post_meta_wrapper:not(:first-child),
.single .et_pb_post > .et_post_meta_wrapper:not(:first-child) {
    max-width: 100% !important;
    width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
    box-sizing: border-box !important;
}

/* ============================================================
   BLOCK TEMPLATE (No Sidebar Blog) RESETS
   ============================================================ */

/* Hide the block-rendered post title — we render it in the hero */
body.post-template-no-sidebar-blog .wp-block-post-title {
    display: none !important;
}
/* Hide only the constrained div that directly wraps the post title */
body.post-template-no-sidebar-blog div.wp-block-group.is-layout-constrained:has(> .wp-block-post-title) {
    display: none !important;
}

/* Remove block theme's constrained max-width from our layout elements */
body.post-template-no-sidebar-blog .entry-content > .msbr-hero,
body.post-template-no-sidebar-blog .entry-content > .msbr-layout {
    max-width: none !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
}

/* Constrain the block template content area */
body.post-template-no-sidebar-blog .entry-content {
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 20px;
    box-sizing: border-box;
}

/* ============================================================
   READING PROGRESS BAR
   ============================================================ */
#msbr-progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    width: 0%;
    background: linear-gradient(90deg, #00c4cc 0%, #7e39e8 100%);
    z-index: 99999;
    transition: width 0.1s linear;
    pointer-events: none;
}

/* ============================================================
   HERO SECTION
   ============================================================ */
.msbr-hero {
    display: flex;
    align-items: flex-start;
    gap: 32px;
    width: 100%;
    margin: 30px 0 0 0;
    padding: 0 0 40px 0;
    border-bottom: 2px solid #f0f0f0;
    box-sizing: border-box;
}

.msbr-hero-left {
    flex: 1 1 45%;
    min-width: 0;
}

.msbr-hero-right {
    flex: 1 1 52%;
    min-width: 0;
}

/* Title inside hero — works for both Divi .entry-title and block .msbr-block-title */
.msbr-hero-left .entry-title,
.msbr-hero-left .msbr-block-title {
    font-family: 'Montserrat', Helvetica, Arial, sans-serif !important;
    font-size: clamp(26px, 3.5vw, 42px) !important;
    font-weight: 800 !important;
    line-height: 1.2 !important;
    color: #0a0a0a !important;
    margin-bottom: 16px !important;
    margin-top: 0 !important;
}

/* Post meta (author, date, category) */
.msbr-hero-left .post-meta {
    font-size: 14px !important;
    color: #666 !important;
    margin-bottom: 12px !important;
}

.msbr-hero-left .post-meta a {
    color: #00c4cc !important;
    text-decoration: none !important;
}

.msbr-hero-left .post-meta a:hover {
    text-decoration: underline !important;
}

/* Read time badge */
.msbr-read-time {
    display: inline-block;
    font-size: 12px;
    font-weight: 700;
    color: #555;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 10px;
    padding: 4px 10px;
    background: #f0f9fa;
    border-radius: 20px;
    border: 1px solid #c8f0f2;
}

/* ============================================================
   VIDEO THUMBNAIL (click-to-play)
   ============================================================ */
.msbr-video-block {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
}

.msbr-yt-thumb {
    position: absolute;
    top: 0; left: 0;
    width: 100%;
    height: 100%;
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    box-shadow: 0 8px 30px rgba(0,0,0,0.22);
    background: #000;
}

.msbr-yt-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s;
}

.msbr-yt-thumb:hover img {
    transform: scale(1.03);
}

.msbr-yt-play {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 72px;
    height: 72px;
    background: rgba(255,0,0,0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, transform 0.2s;
    pointer-events: none;
}

.msbr-yt-thumb:hover .msbr-yt-play {
    background: #ff0000;
    transform: translate(-50%, -50%) scale(1.1);
}

.msbr-yt-play svg {
    width: 28px;
    height: 28px;
    fill: #fff;
    margin-left: 4px;
}

.msbr-yt-embed {
    display: none;
    position: absolute;
    top: 0; left: 0;
    width: 100%;
    height: 100%;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 8px 30px rgba(0,0,0,0.22);
    z-index: 10;
}

.msbr-yt-iframe-slot {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
}

.msbr-yt-embed iframe {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    border: none;
    border-radius: 10px;
}

/* ============================================================
   MAIN LAYOUT
   ============================================================ */
.msbr-layout {
    width: 100%;
    box-sizing: border-box;
}

.msbr-body {
    display: flex;
    align-items: flex-start;
    gap: 28px;
    padding-top: 40px;
    width: 100%;
    box-sizing: border-box;
}

/* ── Left TOC Column ────────────────────────────────────── */
.msbr-toc-col {
    flex: 0 0 195px;
    min-width: 0;
    max-width: 195px;
}

.msbr-toc {
    position: sticky;
    top: 100px;
    background: #f8feff;
    border: none;
    border-radius: 10px;
    padding: 20px;
    font-size: 14px;
    box-shadow: 0 2px 8px rgba(0,196,204,0.10);
}

.msbr-toc-title {
    font-family: 'Montserrat', Helvetica, Arial, sans-serif;
    font-size: 13px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #0a0a0a;
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 2px solid #00c4cc;
}

.msbr-toc-list {
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

.msbr-toc-item {
    margin-bottom: 6px !important;
    padding: 0 !important;
}

.msbr-toc-item > a {
    display: block;
    color: #333 !important;
    text-decoration: none !important;
    font-size: 13.5px;
    line-height: 1.4;
    padding: 4px 8px;
    border-radius: 5px;
    transition: background 0.15s, color 0.15s;
}

.msbr-toc-item > a:hover,
.msbr-toc-item > a.msbr-toc-active {
    background: #e0f9fa !important;
    color: #00a8af !important;
}

.msbr-toc-sub {
    list-style: none !important;
    margin: 4px 0 0 12px !important;
    padding: 0 !important;
}

.msbr-toc-sub li {
    margin-bottom: 4px !important;
}

.msbr-toc-sub li a {
    display: block;
    color: #555 !important;
    text-decoration: none !important;
    font-size: 12.5px;
    padding: 3px 8px;
    border-radius: 4px;
    transition: background 0.15s, color 0.15s;
}

.msbr-toc-sub li a:hover {
    background: #e0f9fa !important;
    color: #00a8af !important;
}

/* ── Center Content Column ────────────────────────────────── */
.msbr-content-col {
    flex: 1 1 0;
    min-width: 0;
    font-size: 17px;
    line-height: 1.75;
    color: #2d2d2d;
}

/* Typography */
.msbr-content-col h2 {
    font-family: 'Montserrat', Helvetica, Arial, sans-serif !important;
    font-size: clamp(22px, 2.5vw, 32px) !important;
    font-weight: 800 !important;
    color: #0a0a0a !important;
    margin-top: 48px !important;
    margin-bottom: 16px !important;
    line-height: 1.25 !important;
}

.msbr-content-col h3 {
    font-family: 'Montserrat', Helvetica, Arial, sans-serif !important;
    font-size: clamp(18px, 2vw, 24px) !important;
    font-weight: 700 !important;
    color: #0a0a0a !important;
    margin-top: 36px !important;
    margin-bottom: 12px !important;
}

.msbr-content-col h4 {
    font-family: 'Montserrat', Helvetica, Arial, sans-serif !important;
    font-size: 18px !important;
    font-weight: 700 !important;
    color: #222 !important;
    margin-top: 28px !important;
    margin-bottom: 10px !important;
}

.msbr-content-col p {
    margin-bottom: 20px !important;
    font-size: 17px !important;
    line-height: 1.75 !important;
}

.msbr-content-col ul,
.msbr-content-col ol {
    margin-left: 24px !important;
    margin-bottom: 20px !important;
}

.msbr-content-col li {
    margin-bottom: 8px !important;
    font-size: 17px !important;
    line-height: 1.7 !important;
}

.msbr-content-col a {
    color: #00c4cc !important;
    text-decoration: underline !important;
}

.msbr-content-col a:hover {
    color: #009ea4 !important;
}

.msbr-content-col strong {
    color: #0a0a0a;
}

.msbr-content-col blockquote {
    border-left: 4px solid #00c4cc !important;
    padding: 12px 20px !important;
    margin: 24px 0 !important;
    background: #f0fdfe !important;
    border-radius: 0 8px 8px 0 !important;
    font-style: italic !important;
    color: #333 !important;
}

/* ── Key Takeaways Box ────────────────────────────────────── */
.msbr-takeaways {
    background: #f8feff;
    border: 1px solid #b8ecee;
    border-left: 4px solid #00c4cc;
    border-radius: 0 10px 10px 0;
    padding: 20px 24px;
    margin: 28px 0 32px;
}

.msbr-takeaways-title {
    font-size: 15px;
    font-weight: 800;
    color: #0a0a0a;
    margin-bottom: 14px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.msbr-takeaways ul {
    margin: 0 !important;
    padding: 0 !important;
    list-style: none !important;
}

.msbr-takeaways li {
    font-size: 15px !important;
    color: #2d2d2d;
    padding: 6px 0 6px 28px !important;
    position: relative;
    border-bottom: 1px solid #e0f9fa;
    margin-bottom: 0 !important;
}

.msbr-takeaways li:last-child {
    border-bottom: none;
}

.msbr-takeaways li::before {
    content: '✓';
    position: absolute;
    left: 4px;
    color: #00c4cc;
    font-weight: 800;
    font-size: 14px;
}

/* ── CTA Box (inline, top of content) ────────────────────── */
.msbr-cta-box {
    display: flex;
    align-items: center;
    gap: 16px;
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a2e 100%);
    color: #fff;
    border-radius: 12px;
    padding: 20px 24px;
    margin-bottom: 36px;
    flex-wrap: wrap;
    border-top: 3px solid #00c4cc;
}

.msbr-cta-icon {
    font-size: 28px;
    flex-shrink: 0;
}

.msbr-cta-content {
    flex: 1 1 200px;
}

.msbr-cta-headline {
    font-family: 'Montserrat', Helvetica, Arial, sans-serif;
    font-size: 17px;
    font-weight: 800;
    margin-bottom: 4px;
}

.msbr-cta-sub {
    font-size: 14px;
    opacity: 0.85;
}

/* Purple button — matches the "Free Consultation" nav button */
.msbr-cta-btn {
    display: inline-block;
    background: #7e39e8;
    color: #fff !important;
    font-weight: 800;
    font-size: 14px;
    padding: 12px 22px;
    border-radius: 8px;
    text-decoration: none !important;
    white-space: nowrap;
    transition: background 0.2s, transform 0.15s;
    flex-shrink: 0;
}

.msbr-cta-btn:hover {
    background: #6a2fd4 !important;
    transform: translateY(-1px);
    color: #fff !important;
}

/* ── Right Sticky CTA Column ──────────────────────────────── */
.msbr-right-col {
    flex: 0 0 195px;
    min-width: 0;
    max-width: 195px;
    overflow: visible;
}

.msbr-sticky-cta {
    position: sticky;
    top: 100px;
    background: #fff;
    border: 1px solid #e8e8e8;
    border-top: 3px solid #00c4cc;
    border-right: none;
    border-radius: 0 0 0 12px;
    padding: 22px 16px;
    text-align: center;
    box-sizing: border-box;
    width: 100%;
}

.msbr-sticky-cta-title {
    font-family: 'Montserrat', Helvetica, Arial, sans-serif;
    font-size: 16px;
    font-weight: 800;
    color: #0a0a0a;
    margin-bottom: 10px;
    line-height: 1.3;
}

.msbr-sticky-cta-body {
    font-size: 13px;
    color: #555;
    line-height: 1.5;
    margin-bottom: 16px;
}

.msbr-sticky-cta-btn {
    display: block;
    background: #7e39e8;
    color: #fff !important;
    font-weight: 700;
    font-size: 14px;
    padding: 12px 16px;
    border-radius: 8px;
    text-decoration: none !important;
    transition: background 0.2s;
}

.msbr-sticky-cta-btn:hover {
    background: #6a2fd4 !important;
    color: #fff !important;
}

/* ── Share Bar ────────────────────────────────────────────── */
.msbr-share-bar {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    padding: 24px 0;
    border-top: 1px solid #e8e8e8;
    border-bottom: 1px solid #e8e8e8;
    margin: 40px 0 36px;
}

.msbr-share-label {
    font-size: 15px;
    font-weight: 700;
    color: #0a0a0a;
}

.msbr-share-icons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.msbr-share-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 9px 16px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none !important;
    transition: opacity 0.2s, transform 0.15s;
    color: #fff !important;
}

.msbr-share-btn:hover {
    opacity: 0.88;
    transform: translateY(-1px);
    color: #fff !important;
}

.msbr-share-btn svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.msbr-share-fb { background: #1877f2; }
.msbr-share-tw { background: #0a0a0a; }
.msbr-share-li { background: #0a66c2; }

/* ── Author Bio ───────────────────────────────────────────── */
.msbr-author-bio {
    display: flex;
    gap: 20px;
    align-items: flex-start;
    background: #f8feff;
    border: 1px solid #b8ecee;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 48px;
}

.msbr-author-avatar img {
    width: 80px !important;
    height: 80px !important;
    border-radius: 50% !important;
    object-fit: cover;
    flex-shrink: 0;
    border: 3px solid #00c4cc;
}

.msbr-author-info {
    flex: 1;
    min-width: 0;
}

.msbr-author-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #00c4cc;
    margin-bottom: 4px;
}

.msbr-author-name {
    font-family: 'Montserrat', Helvetica, Arial, sans-serif;
    font-size: 20px;
    font-weight: 800;
    color: #0a0a0a;
    margin-bottom: 8px;
}

.msbr-author-desc {
    font-size: 14px;
    color: #555;
    line-height: 1.6;
    margin-bottom: 12px;
}

.msbr-author-more {
    display: inline-block;
    font-size: 14px;
    font-weight: 700;
    color: #00c4cc !important;
    text-decoration: none !important;
}

.msbr-author-more:hover {
    text-decoration: underline !important;
    color: #009ea4 !important;
}

/* ── Related Articles ─────────────────────────────────────── */
.msbr-related {
    padding: 40px 0 20px;
    border-top: 2px solid #e8e8e8;
    width: 100%;
}

.msbr-related-title {
    font-family: 'Montserrat', Helvetica, Arial, sans-serif !important;
    font-size: 26px !important;
    font-weight: 800 !important;
    color: #0a0a0a !important;
    margin-bottom: 28px !important;
    text-align: center;
}

.msbr-related-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.msbr-related-card {
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #e2e8f0;
    transition: box-shadow 0.2s, transform 0.2s;
    background: #fff;
}

.msbr-related-card:hover {
    box-shadow: 0 8px 24px rgba(0,196,204,0.15);
    transform: translateY(-3px);
}

.msbr-related-card-link {
    display: block;
    text-decoration: none !important;
    color: inherit !important;
}

.msbr-related-thumb {
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #0a0a0a;
}

.msbr-related-img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    display: block !important;
    transition: transform 0.3s;
}

.msbr-related-card:hover .msbr-related-img {
    transform: scale(1.04);
}

.msbr-related-img-placeholder {
    width: 100%;
    height: 180px;
    background: linear-gradient(135deg, #0a0a0a 0%, #00c4cc 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.msbr-related-img-placeholder span {
    color: rgba(255,255,255,0.85);
    font-size: 13px;
    font-weight: 700;
    text-align: center;
    line-height: 1.4;
}

.msbr-related-body {
    padding: 16px 18px 20px;
}

.msbr-related-date {
    font-size: 12px;
    color: #888;
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.msbr-related-card-title {
    font-family: 'Montserrat', Helvetica, Arial, sans-serif;
    font-size: 15px;
    font-weight: 700;
    color: #0a0a0a;
    line-height: 1.4;
    margin-bottom: 12px;
}

.msbr-read-more {
    display: inline-block;
    font-size: 13px;
    font-weight: 700;
    color: #00c4cc;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
    .msbr-toc-col,
    .msbr-right-col {
        display: none;
    }

    .msbr-body {
        display: block;
    }

    .msbr-content-col {
        width: 100%;
    }

    .msbr-related-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .msbr-hero {
        flex-direction: column-reverse;
        gap: 24px;
        padding-bottom: 28px;
    }

    .msbr-hero-left,
    .msbr-hero-right {
        flex: 1 1 100%;
        width: 100%;
    }

    .msbr-related-grid {
        grid-template-columns: 1fr;
    }

    .msbr-cta-box {
        flex-direction: column;
        text-align: center;
        gap: 10px;
        padding: 20px 20px;
    }

    .msbr-cta-icon {
        font-size: 24px;
    }

    .msbr-share-bar {
        flex-direction: column;
        align-items: flex-start;
    }

    .msbr-author-bio {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .msbr-hero-left .entry-title,
    .msbr-hero-left .msbr-block-title {
        font-size: 24px !important;
    }

    .msbr-content-col h2 {
        font-size: 22px !important;
    }

    .msbr-content-col p,
    .msbr-content-col li {
        font-size: 16px !important;
    }
}

/* ============================================================
   SMOOTH SCROLL & SCROLL OFFSET
   ============================================================ */
html {
    scroll-behavior: smooth;
}

[id^="msbr-section-"] {
    scroll-margin-top: 90px;
}
