/**
 * SafeSante Single Article Styles - Redesigned
 * Templates: single-pharma-article.php, single-doctor-article.php, single-tele-article.php
 */

/* ========================================
   Override Parent Theme (Shiptar) Elements
   ======================================== */

/* Hide Shiptar/Parent theme default post elements */
.single-post .et_pb_post_title,
.single-post .et_pb_title_container,
.single-post .et_post_meta_wrapper,
.single-post .post-meta,
.single-post .entry-featured-image-url,
.single-post #main-content > .container > .et_pb_row:first-child,
.single-post .et_pb_post_content > .et_pb_section:first-child,
body.single-post #page-container > #main-content > .container > article > .entry-title,
body.single-post #page-container > #main-content > .container > article > .post-meta,
body.single-post .entry-title,
body.single-post .et_pb_post .entry-title,
body.single-post header.entry-header,
body.single-post .single-post-header,
body.single-post .post-header,
body.single-post .blog-header,
body.single-post .entry-featured-image-url {
    display: none !important;
}

/* Ensure our article container displays properly */
body.single-post .article-hero,
body.single-post .article-container,
body.single-post .article-navigation {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* Remove parent theme padding/margins that might affect layout */
body.single-post #main-content {
    padding-top: 0 !important;
    margin-top: 0 !important;
}

body.single-post #main-content .container {
    width: 100% !important;
    max-width: 100% !important;
    padding: 0 !important;
}

body.single-post .et_pb_post {
    margin: 0 !important;
    padding: 0 !important;
}

body.single-post .et_pb_post_content {
    margin: 0 !important;
    padding: 0 !important;
}

/* ========================================
   CSS Variables
   ======================================== */
:root {
    /* Base Colors */
    --article-primary: #202B6D;
    --article-dark: #0F1432;
    --article-light-blue: #D2ECF6;
    --article-coral: #F75C48;
    --article-yellow: #FEC400;
    --article-white: #FFFFFF;
    --article-gray: #F7F7F7;
    --article-text: #000000;
    --article-text-light: #4E585B;

    /* Category Accent Colors */
    --tele-accent: #D2ECF6;
    --doctor-accent: #F75C48;
    --pharma-accent: #FEC400;

    /* Hero Section */
    --hero-min-height: 500px;
    --hero-mobile-height: 350px;
    --hero-overlay-gradient: linear-gradient(to top, rgba(15, 20, 50, 0.85) 0%, rgba(15, 20, 50, 0.4) 50%, transparent 100%);

    /* Content Layout */
    --content-max-width: 750px;
    --content-padding: 60px 20px;

    /* Typography */
    --heading-number-size: 3.5rem;
    --drop-cap-size: 4rem;
    --pull-quote-border-width: 5px;

    /* Header offset */
    --header-height-desktop: 115px;
    --header-height-mobile: 80px;
}

/* ========================================
   Hero Section (Full-width with overlay)
   ======================================== */
.article-hero {
    position: relative;
    min-height: var(--hero-min-height);
    display: flex;
    align-items: flex-end;
    margin-top: calc(var(--header-height-desktop) * -1);
    padding-top: var(--header-height-desktop);
}

.hero-background {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    z-index: 1;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: var(--hero-overlay-gradient);
    z-index: 2;
}

.hero-content {
    position: relative;
    z-index: 3;
    width: 100%;
    max-width: var(--content-max-width);
    margin: 0 auto;
    padding: 40px 20px 60px;
    color: var(--article-white);
}

/* Breadcrumb */
.article-breadcrumb {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: 'DM Sans';
    font-size: 14px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.article-breadcrumb a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: color 0.3s ease;
}

.article-breadcrumb a:hover {
    color: var(--article-white);
}

.breadcrumb-separator {
    color: rgba(255, 255, 255, 0.5);
    font-size: 10px;
}

.article-breadcrumb .current {
    color: var(--article-white);
    font-weight: 500;
}

/* Hero Title */
.hero-title {
    font-family: 'DM Sans';
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 700;
    line-height: 1.2;
    color: var(--article-white);
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    margin-bottom: 20px;
}

/* Hero Meta */
.hero-meta {
    display: flex;
    align-items: center;
    gap: 15px;
    font-family: 'DM Sans';
    font-size: 14px;
    color: rgba(255, 255, 255, 0.9);
    flex-wrap: wrap;
}

.hero-meta i {
    margin-right: 6px;
}

.meta-separator {
    color: rgba(255, 255, 255, 0.5);
}

/* Category-specific hero accents */
.tele-hero .article-breadcrumb .current,
.tele-hero .hero-meta i {
    color: var(--tele-accent);
}

.doctor-hero .article-breadcrumb .current,
.doctor-hero .hero-meta i {
    color: var(--doctor-accent);
}

.pharma-hero .article-breadcrumb .current,
.pharma-hero .hero-meta i {
    color: var(--pharma-accent);
}

/* ========================================
   Article Container
   ======================================== */
.article-container {
    background: var(--article-white);
    padding: 0;
}

/* Back to Blog Link */
.back-link-container {
    max-width: var(--content-max-width);
    margin: 0 auto;
    padding: 30px 20px 0;
}

.back-to-blog {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: 'DM Sans';
    font-size: 14px;
    font-weight: 500;
    color: var(--article-primary);
    text-decoration: none;
    transition: color 0.3s ease;
}

.back-to-blog:hover {
    color: var(--article-coral);
}

.back-to-blog i {
    font-size: 12px;
}

/* Article Body */
.article-body {
    max-width: var(--content-max-width);
    margin: 0 auto;
    padding: var(--content-padding);
}

/* ========================================
   Article Content Typography
   ======================================== */
.article-content {
    font-family: 'DM Sans';
    font-size: 1.125rem;
    line-height: 1.85;
    color: var(--article-text);
    counter-reset: heading-counter;
}

.article-content p {
    color: var(--article-text);
    margin-bottom: 1.5em;
}

/* Drop Cap */
.article-content > p:first-of-type::first-letter {
    float: left;
    font-size: var(--drop-cap-size);
    font-weight: 700;
    line-height: 0.8;
    padding-right: 12px;
    padding-top: 4px;
    color: var(--article-primary);
}

.tele-article .article-content > p:first-of-type::first-letter {
    color: var(--article-primary);
}

.doctor-article .article-content > p:first-of-type::first-letter {
    color: var(--doctor-accent);
}

.pharma-article .article-content > p:first-of-type::first-letter {
    color: var(--pharma-accent);
}

/* Headings */
.article-content h2,
.article-content h3,
.article-content h4 {
    color: var(--article-text);
    font-family: 'DM Sans';
}

/* Numbered H2 Headings */
.article-content h2 {
    display: flex;
    align-items: baseline;
    gap: 15px;
    font-size: 1.75rem;
    font-weight: 700;
    margin-top: 2.5em;
    margin-bottom: 1em;
    counter-increment: heading-counter;
}

.article-content h2::before {
    content: counter(heading-counter) ".";
    font-size: var(--heading-number-size);
    font-weight: 800;
    line-height: 1;
    flex-shrink: 0;
    color: var(--article-primary);
}

/* Category-specific heading number colors */
.tele-article .article-content h2::before {
    color: var(--article-primary);
}

.doctor-article .article-content h2::before {
    color: var(--doctor-accent);
}

.pharma-article .article-content h2::before {
    color: var(--pharma-accent);
}

.article-content h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-top: 2em;
    margin-bottom: 0.75em;
}

.article-content h4 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-top: 1.5em;
    margin-bottom: 0.5em;
}

/* Pull Quote / Blockquote */
.article-content blockquote {
    margin: 2em 0;
    padding: 20px 0 20px 25px;
    border-left: var(--pull-quote-border-width) solid var(--article-primary);
    font-style: italic;
    font-size: 1.25rem;
    line-height: 1.7;
    color: var(--article-text-light);
    background: transparent;
}

.tele-article .article-content blockquote {
    border-left-color: var(--tele-accent);
}

.doctor-article .article-content blockquote {
    border-left-color: var(--doctor-accent);
}

.pharma-article .article-content blockquote {
    border-left-color: var(--pharma-accent);
}

/* Custom Styled Lists */
.article-content ul {
    list-style: none;
    padding-left: 0;
    margin: 1.5em 0;
}

.article-content ul li {
    position: relative;
    padding-left: 28px;
    margin-bottom: 12px;
}

.article-content ul li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 12px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--article-primary);
}

.tele-article .article-content ul li::before {
    background: var(--article-primary);
}

.doctor-article .article-content ul li::before {
    background: var(--doctor-accent);
}

.pharma-article .article-content ul li::before {
    background: var(--pharma-accent);
}

.article-content ol {
    padding-left: 25px;
    margin: 1.5em 0;
}

.article-content ol li {
    margin-bottom: 12px;
    padding-left: 8px;
}

/* Strong and Emphasis */
.article-content strong {
    font-weight: 700;
    color: var(--article-text);
}

.article-content em {
    font-style: italic;
}

/* Links in content */
.article-content a {
    color: var(--article-primary);
    text-decoration: underline;
    transition: color 0.3s ease;
}

.article-content a:hover {
    color: var(--article-coral);
}

/* ========================================
   Inline CTA Banner
   ======================================== */
.inline-cta {
    display: flex;
    align-items: center;
    gap: 25px;
    margin: 50px 0;
    padding: 25px 30px;
    border-radius: 20px;
    background: var(--article-gray);
}

.cta-photo {
    flex-shrink: 0;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    overflow: hidden;
}

.cta-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cta-text {
    flex: 1;
}

.cta-text .cta-title {
    font-family: 'DM Sans';
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 5px;
    color: var(--article-text);
}

.cta-text .cta-subtitle {
    font-family: 'DM Sans';
    font-size: 0.95rem;
    color: var(--article-text-light);
    margin: 0;
}

.cta-action {
    flex-shrink: 0;
}

.cta-button {
    display: inline-block;
    padding: 14px 28px;
    border-radius: 30px;
    font-family: 'DM Sans';
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    color: var(--article-white);
    transition: all 0.3s ease;
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

/* Category-specific CTA colors */
.tele-cta {
    background: rgba(210, 236, 246, 0.5);
    border: 2px solid var(--tele-accent);
}

.tele-cta .cta-button {
    background: var(--article-primary);
}

.tele-cta .cta-button:hover {
    background: var(--article-dark);
}

.doctor-cta {
    background: rgba(247, 92, 72, 0.1);
    border: 2px solid var(--doctor-accent);
}

.doctor-cta .cta-button {
    background: var(--doctor-accent);
}

.doctor-cta .cta-button:hover {
    background: #e54a36;
}

.pharma-cta {
    background: rgba(254, 196, 0, 0.15);
    border: 2px solid var(--pharma-accent);
}

.pharma-cta .cta-button {
    background: var(--pharma-accent);
    color: var(--article-primary);
}

.pharma-cta .cta-button:hover {
    background: #e5b000;
}

/* ========================================
   Info/Highlight Boxes
   ======================================== */
.article-content .info-box,
.article-content .highlight-box {
    margin: 2em 0;
    padding: 25px 30px;
    border-radius: 15px;
    border-left: 5px solid;
}

.info-box.info-tip {
    background: rgba(210, 236, 246, 0.3);
    border-left-color: var(--tele-accent);
}

.info-box.info-warning {
    background: rgba(254, 196, 0, 0.15);
    border-left-color: var(--pharma-accent);
}

.info-box.info-important {
    background: rgba(247, 92, 72, 0.1);
    border-left-color: var(--doctor-accent);
}

/* Category-specific default info box */
.tele-article .article-content .info-box {
    background: rgba(210, 236, 246, 0.3);
    border-left-color: var(--tele-accent);
}

.doctor-article .article-content .info-box {
    background: rgba(247, 92, 72, 0.1);
    border-left-color: var(--doctor-accent);
}

.pharma-article .article-content .info-box {
    background: rgba(254, 196, 0, 0.15);
    border-left-color: var(--pharma-accent);
}

/* ========================================
   Section Dividers
   ======================================== */
.article-content hr {
    border: none;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--article-gray), transparent);
    margin: 3em 0;
}

/* ========================================
   Tags & Categories Section
   ======================================== */
.article-taxonomy {
    max-width: var(--content-max-width);
    margin: 0 auto;
    padding: 40px 20px 60px;
    border-top: 1px solid var(--article-gray);
}

.taxonomy-row {
    margin-bottom: 25px;
}

.taxonomy-row:last-child {
    margin-bottom: 0;
}

.taxonomy-label {
    font-family: 'DM Sans';
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--article-text-light);
    margin-bottom: 12px;
}

.taxonomy-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.taxonomy-pill {
    display: inline-block;
    padding: 8px 18px;
    border-radius: 25px;
    font-family: 'DM Sans';
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s ease;
}

/* Category Pills */
.category-pill {
    background: var(--article-gray);
    color: var(--article-primary);
    border: 1px solid transparent;
}

.category-pill:hover {
    background: var(--article-primary);
    color: var(--article-white);
}

/* Specific category colors */
.pill-blog-general,
.pill-blog-général {
    background: var(--article-gray);
    color: var(--article-primary);
}

.pill-blog-teleconsultation,
.pill-blog-téléconsultation {
    background: var(--tele-accent);
    color: var(--article-primary);
}

.pill-blog-medecin,
.pill-blog-médecin {
    background: var(--doctor-accent);
    color: var(--article-white);
}

.pill-blog-pharmacie {
    background: var(--pharma-accent);
    color: var(--article-primary);
}

/* Tag Pills */
.tag-pill {
    background: transparent;
    color: var(--article-primary);
    border: 1px solid var(--article-primary);
}

.tag-pill:hover {
    background: var(--article-primary);
    color: var(--article-white);
}

/* Category-specific tag styling */
.tele-taxonomy .tag-pill {
    border-color: var(--article-primary);
}

.tele-taxonomy .tag-pill:hover {
    background: var(--article-primary);
    color: var(--article-white);
}

.doctor-taxonomy .tag-pill {
    border-color: var(--doctor-accent);
    color: var(--doctor-accent);
}

.doctor-taxonomy .tag-pill:hover {
    background: var(--doctor-accent);
    color: var(--article-white);
}

.pharma-taxonomy .tag-pill {
    border-color: var(--pharma-accent);
    color: var(--article-text);
}

.pharma-taxonomy .tag-pill:hover {
    background: var(--pharma-accent);
    color: var(--article-primary);
}

/* No tags message */
.no-tags {
    font-size: 13px;
    color: var(--article-text-light);
    font-style: italic;
}

/* ========================================
   Post Navigation
   ======================================== */
.article-navigation {
    max-width: var(--content-max-width);
    margin: 0 auto;
    padding: 0 20px 60px;
}

.nav-links {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 30px;
    padding-top: 30px;
    border-top: 1px solid var(--article-gray);
}

.nav-previous,
.nav-next {
    flex: 1;
    max-width: 45%;
}

.nav-previous a,
.nav-next a {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: var(--article-text);
    gap: 8px;
    transition: color 0.3s ease;
}

.nav-previous a:hover,
.nav-next a:hover {
    color: var(--article-coral);
}

.nav-previous a i,
.nav-next a i {
    font-size: 14px;
    color: var(--article-text-light);
}

.nav-label {
    font-family: 'DM Sans';
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--article-text-light);
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-title {
    font-family: 'DM Sans';
    font-size: 16px;
    font-weight: 600;
    color: inherit;
    line-height: 1.4;
}

.nav-next {
    text-align: right;
}

.nav-next .nav-label {
    justify-content: flex-end;
}

/* ========================================
   Responsive Styles
   ======================================== */

/* Large Tablet */
@media (max-width: 992px) {
    :root {
        --hero-min-height: 400px;
        --content-max-width: 100%;
        --content-padding: 40px 30px;
        --heading-number-size: 2.5rem;
    }

    .hero-title {
        font-size: 2rem;
    }

    .article-content {
        font-size: 1rem;
    }

    .inline-cta {
        padding: 20px 25px;
    }
}

/* Tablet */
@media (max-width: 768px) {
    :root {
        --hero-min-height: var(--hero-mobile-height);
        --content-padding: 30px 20px;
        --heading-number-size: 2rem;
        --drop-cap-size: 3rem;
    }

    .article-hero {
        margin-top: calc(var(--header-height-mobile) * -1);
        padding-top: var(--header-height-mobile);
    }

    .hero-content {
        padding: 30px 15px 40px;
    }

    .hero-title {
        font-size: 1.5rem;
    }

    .hero-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .meta-separator {
        display: none;
    }

    .article-content h2 {
        flex-direction: column;
        gap: 5px;
        align-items: flex-start;
    }

    /* Inline CTA stacked on mobile */
    .inline-cta {
        flex-direction: column;
        text-align: center;
        padding: 30px 20px;
    }

    .cta-photo {
        margin-bottom: 10px;
    }

    .cta-action {
        width: 100%;
    }

    .cta-button {
        display: block;
        width: 100%;
    }

    /* Navigation stacked */
    .nav-links {
        flex-direction: column;
        gap: 25px;
    }

    .nav-previous,
    .nav-next {
        max-width: 100%;
        text-align: left;
    }

    .nav-next .nav-label {
        justify-content: flex-start;
    }

    .taxonomy-pills {
        gap: 8px;
    }

    .taxonomy-pill {
        padding: 6px 14px;
        font-size: 12px;
    }
}

/* Small Mobile */
@media (max-width: 480px) {
    .hero-content {
        padding: 20px 15px 30px;
    }

    .article-breadcrumb {
        font-size: 12px;
    }

    .hero-title {
        font-size: 1.35rem;
    }

    .back-link-container {
        padding: 20px 15px 0;
    }

    .article-body {
        padding: 30px 15px;
    }

    .article-taxonomy {
        padding: 30px 15px 40px;
    }

    .article-navigation {
        padding: 0 15px 40px;
    }
}

/* ========================================
   Article Wrapper with Sidebar Layout
   ======================================== */

/* Outer wrapper for full-width background */
.article-wrapper {
    width: 100%;
    padding: 0;
    margin: 0;
}

/* Inner container for content centering */
.article-wrapper-inner {
    display: flex;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px 60px;
    gap: 40px;
}

/* Category-specific wrapper backgrounds - SOLID colors, full width */
.tele-wrapper {
    background: #D2ECF6;
}

.pharma-wrapper {
    background: #202B6D;
}

.doctor-wrapper {
    background: #131A45;
}

/* ========================================
   Left Sidebar Styles
   ======================================== */
.article-sidebar {
    width: 280px;
    flex-shrink: 0;
    padding-top: 40px;
    position: relative;
}

.sidebar-inner {
    position: sticky;
    top: 140px;
    display: flex;
    flex-direction: column;
    gap: 30px;
}

/* Category Badge */
.sidebar-category {
    margin-bottom: 10px;
}

.category-badge {
    display: inline-block;
    padding: 10px 20px;
    border-radius: 30px;
    font-family: 'DM Sans';
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Category-specific badge colors */
.tele-badge {
    background: var(--article-primary);
    color: var(--article-white);
}

.pharma-badge {
    background: var(--pharma-accent);
    color: var(--article-primary);
}

.doctor-badge {
    background: var(--doctor-accent);
    color: var(--article-white);
}

/* Sidebar Title */
.sidebar-title {
    font-family: 'DM Sans';
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--article-text-light);
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--article-gray);
}

/* Table of Contents */
.sidebar-toc {
    background: var(--article-white);
    padding: 20px;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.toc-nav {
    max-height: 300px;
    overflow-y: auto;
}

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

.toc-list li {
    margin-bottom: 10px;
}

.toc-link {
    display: block;
    font-family: 'DM Sans';
    font-size: 14px;
    color: var(--article-text-light);
    text-decoration: none;
    padding: 8px 12px;
    border-radius: 8px;
    border-left: 3px solid transparent;
    transition: all 0.3s ease;
    line-height: 1.4;
}

.toc-link:hover {
    background: var(--article-gray);
    color: var(--article-primary);
}

/* Category-specific TOC link active/hover colors */
.tele-sidebar .toc-link:hover,
.tele-sidebar .toc-link.active {
    border-left-color: var(--article-primary);
    color: var(--article-primary);
}

.pharma-sidebar .toc-link:hover,
.pharma-sidebar .toc-link.active {
    border-left-color: var(--pharma-accent);
    color: var(--article-primary);
}

.doctor-sidebar .toc-link:hover,
.doctor-sidebar .toc-link.active {
    border-left-color: var(--doctor-accent);
    color: var(--doctor-accent);
}

/* Share Buttons */
.sidebar-share {
    background: var(--article-white);
    padding: 20px;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

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

.share-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    color: var(--article-white);
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 16px;
}

.share-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.15);
}

.share-facebook {
    background: #1877F2;
}

.share-twitter {
    background: #1DA1F2;
}

.share-linkedin {
    background: #0A66C2;
}

.share-email {
    background: var(--article-primary);
}

/* Related Articles */
.sidebar-related {
    background: var(--article-white);
    padding: 20px;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.related-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.related-item {
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--article-gray);
}

.related-item:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.related-item a {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.related-item a:hover .related-title {
    color: var(--article-coral);
}

.related-thumb {
    width: 60px;
    height: 60px;
    border-radius: 10px;
    overflow: hidden;
    flex-shrink: 0;
}

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

.related-title {
    font-family: 'DM Sans';
    font-size: 14px;
    font-weight: 500;
    color: var(--article-text);
    line-height: 1.4;
    transition: color 0.3s ease;
}

/* ========================================
   Article Container within Wrapper
   ======================================== */
.article-wrapper-inner .article-container,
.article-wrapper .article-container {
    flex: 1;
    min-width: 0;
    background: var(--article-white);
    border-radius: 24px;
    box-shadow: 0 4px 40px rgba(0, 0, 0, 0.08);
    margin-top: 20px;
}

.article-wrapper-inner .article-body,
.article-wrapper .article-body {
    max-width: 100%;
    padding: 40px 50px;
}

.article-wrapper-inner .article-taxonomy,
.article-wrapper .article-taxonomy {
    max-width: 100%;
    padding: 40px 50px 50px;
}

.article-wrapper-inner .article-navigation,
.article-wrapper .article-navigation {
    max-width: 100%;
    padding: 0 50px 50px;
}

.article-wrapper-inner .back-link-container,
.article-wrapper .back-link-container {
    max-width: 100%;
    padding: 30px 50px 0;
}

/* ========================================
   Sidebar Responsive Styles
   ======================================== */

/* Large Tablet */
@media (max-width: 1200px) {
    .article-wrapper-inner {
        gap: 30px;
    }

    .article-sidebar {
        width: 250px;
    }
}

/* Tablet */
@media (max-width: 992px) {
    .article-wrapper-inner {
        flex-direction: column;
        padding: 0 0 50px;
    }

    .article-sidebar {
        width: 100%;
        padding: 20px;
        order: 2;
        background: var(--article-gray);
    }

    .sidebar-inner {
        position: static;
        flex-direction: row;
        flex-wrap: wrap;
        gap: 20px;
    }

    .sidebar-category {
        width: 100%;
        margin-bottom: 0;
    }

    .sidebar-toc,
    .sidebar-share,
    .sidebar-related {
        flex: 1;
        min-width: 280px;
    }

    .article-wrapper-inner .article-container,
    .article-wrapper .article-container {
        border-radius: 0;
        margin-top: 0;
        order: 1;
    }

    .article-wrapper-inner .article-body,
    .article-wrapper-inner .article-taxonomy,
    .article-wrapper-inner .back-link-container,
    .article-wrapper .article-body,
    .article-wrapper .article-taxonomy,
    .article-wrapper .back-link-container {
        padding-left: 30px;
        padding-right: 30px;
    }

    .article-wrapper-inner .article-navigation,
    .article-wrapper .article-navigation {
        padding-left: 30px;
        padding-right: 30px;
    }

    /* Hide TOC on tablet/mobile for cleaner look */
    .sidebar-toc {
        display: none;
    }
}

/* Mobile */
@media (max-width: 768px) {
    .sidebar-inner {
        flex-direction: column;
    }

    .sidebar-toc,
    .sidebar-share,
    .sidebar-related {
        min-width: 100%;
    }

    .article-wrapper-inner .article-body,
    .article-wrapper-inner .article-taxonomy,
    .article-wrapper-inner .back-link-container,
    .article-wrapper .article-body,
    .article-wrapper .article-taxonomy,
    .article-wrapper .back-link-container {
        padding-left: 20px;
        padding-right: 20px;
    }

    .article-wrapper-inner .article-navigation,
    .article-wrapper .article-navigation {
        padding-left: 20px;
        padding-right: 20px;
    }

    .share-buttons {
        justify-content: center;
    }
}

/* ========================================
   Hero CTA (Below H1 Title)
   ======================================== */
.hero-cta {
    margin-top: 25px;
}

.hero-cta-button {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 28px;
    border-radius: 30px;
    font-family: 'DM Sans';
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
}

.hero-cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.hero-cta-button i {
    font-size: 12px;
    transition: transform 0.3s ease;
}

.hero-cta-button:hover i {
    transform: translateX(4px);
}

/* Category colors for hero CTA */
.doctor-hero-cta-button {
    background: var(--doctor-accent);
    color: var(--article-white);
}

.doctor-hero-cta-button:hover {
    background: #e54a36;
}

.pharma-hero-cta-button {
    background: var(--pharma-accent);
    color: var(--article-primary);
}

.pharma-hero-cta-button:hover {
    background: #e5b000;
}

.tele-hero-cta-button {
    background: var(--article-white);
    color: var(--article-primary);
}

.tele-hero-cta-button:hover {
    background: var(--tele-accent);
}

/* ========================================
   Sidebar CTA
   ======================================== */
.sidebar-cta {
    background: var(--article-white);
    padding: 0;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    text-align: center;
    overflow: hidden;
}

.sidebar-cta-image {
    width: 100%;
    height: 120px;
    overflow: hidden;
}

.sidebar-cta-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.sidebar-cta:hover .sidebar-cta-image img {
    transform: scale(1.05);
}

.sidebar-cta-content {
    padding: 20px;
}

.sidebar-cta-title {
    font-family: 'DM Sans';
    font-size: 15px;
    font-weight: 700;
    color: var(--article-text);
    margin-bottom: 8px;
    line-height: 1.4;
}

.sidebar-cta-subtitle {
    font-family: 'DM Sans';
    font-size: 12px;
    color: var(--article-text-light);
    margin-bottom: 14px;
    line-height: 1.5;
}

.sidebar-cta-button {
    display: block;
    padding: 14px 20px;
    border-radius: 30px;
    font-family: 'DM Sans';
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
}

.sidebar-cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.15);
}

/* Category colors for sidebar CTA */
.doctor-sidebar-cta {
    border-top: 4px solid var(--doctor-accent);
}

.doctor-sidebar-cta .sidebar-cta-button {
    background: var(--doctor-accent);
    color: var(--article-white);
}

.doctor-sidebar-cta .sidebar-cta-button:hover {
    background: #e54a36;
}

.pharma-sidebar-cta {
    border-top: 4px solid var(--pharma-accent);
}

.pharma-sidebar-cta .sidebar-cta-button {
    background: var(--pharma-accent);
    color: var(--article-primary);
}

.pharma-sidebar-cta .sidebar-cta-button:hover {
    background: #e5b000;
}

.tele-sidebar-cta {
    border-top: 4px solid var(--article-primary);
}

.tele-sidebar-cta .sidebar-cta-button {
    background: var(--article-primary);
    color: var(--article-white);
}

.tele-sidebar-cta .sidebar-cta-button:hover {
    background: var(--article-dark);
}

/* ========================================
   Category-specific Sidebar Colors
   ======================================== */

/* Teleconsultation Sidebar */
.tele-sidebar .sidebar-title {
    color: var(--article-primary);
    border-bottom-color: var(--tele-accent);
}

.tele-sidebar .sidebar-toc,
.tele-sidebar .sidebar-share,
.tele-sidebar .sidebar-related {
    border-top: 4px solid var(--tele-accent);
}

/* Pharmacie Sidebar */
.pharma-sidebar .sidebar-title {
    color: var(--article-primary);
    border-bottom-color: var(--pharma-accent);
}

.pharma-sidebar .sidebar-toc,
.pharma-sidebar .sidebar-share,
.pharma-sidebar .sidebar-related {
    border-top: 4px solid var(--pharma-accent);
}

/* Doctor Sidebar */
.doctor-sidebar .sidebar-title {
    color: var(--doctor-accent);
    border-bottom-color: var(--doctor-accent);
}

.doctor-sidebar .sidebar-toc,
.doctor-sidebar .sidebar-share,
.doctor-sidebar .sidebar-related {
    border-top: 4px solid var(--doctor-accent);
}

/* ========================================
   Wrapper Background on Mobile
   ======================================== */
@media (max-width: 992px) {
    /* Full width backgrounds maintained on mobile */
    .tele-wrapper {
        background: #D2ECF6;
    }

    .pharma-wrapper {
        background: #202B6D;
    }

    .doctor-wrapper {
        background: #131A45;
    }

    .tele-wrapper .article-sidebar {
        background: #D2ECF6;
    }

    .pharma-wrapper .article-sidebar {
        background: rgba(32, 43, 109, 0.3);
    }

    .doctor-wrapper .article-sidebar {
        background: rgba(19, 26, 69, 0.3);
    }

    /* Adjust sidebar text colors for dark backgrounds */
    .pharma-wrapper .sidebar-title,
    .doctor-wrapper .sidebar-title {
        color: rgba(255, 255, 255, 0.9);
    }

    .pharma-wrapper .sidebar-toc,
    .pharma-wrapper .sidebar-share,
    .pharma-wrapper .sidebar-related,
    .doctor-wrapper .sidebar-toc,
    .doctor-wrapper .sidebar-share,
    .doctor-wrapper .sidebar-related {
        background: var(--article-white);
    }
}
