/*
Theme Name: MedCare Pro
Theme URI: https://example.com/medcare-pro
Author: Antigravity Team
Author URI: https://example.com
Description: A fully responsive, ultra-fast, SEO-optimized, and AdSense-friendly WordPress theme for Hospitals, Medical, and Healthcare websites. Designed for maximum authority, speed, and premium trust.
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: medcare-pro
Tags: medical, healthcare, hospital, clinic, doctors, custom-menu, featured-images, sticky-post, threaded-comments, translation-ready, accessibility-ready

--------------------------------------------------------------
>>> TABLE OF CONTENTS:
1. CSS Custom Properties (Variables)
2. Reset & Base Styles
3. Accessibility & Helpers
4. Typography & Headings
5. Layout Structure (Header, Footer, Main Grid)
6. Sticky Elements
7. Navigation (Desktop Dropdowns, Mobile Slide Menu)
8. Homepage Sections
9. Single Post Elements (TOC, Author Box, Share Buttons)
10. Sidebar & Widgets
11. Comments & Forms
12. Dark Mode Overrides
13. Print Styles
-------------------------------------------------------------- */

/* 1. CSS Custom Properties (Variables) */
:root {
    /* Color Palette */
    --primary-color: #0d9488;      /* Deep Teal */
    --primary-dark: #0f766e;       /* Darker Teal */
    --primary-light: #ccfbf1;      /* Very Light Teal */
    --secondary-color: #0284c7;    /* Medical Blue */
    --secondary-dark: #0369a1;     /* Darker Blue */
    --secondary-light: #e0f2fe;    /* Very Light Blue */
    --accent-color: #f97316;       /* Warm Orange for CTA */
    
    /* Neutrals (Light Mode) */
    --bg-main: #f8fafc;
    --bg-card: #ffffff;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --border-color: #e2e8f0;
    
    /* Typography */
    --font-sans: 'Outfit', 'Inter', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    
    /* Layout */
    --container-width: 1200px;
    --header-height: 70px;
    --sidebar-width: 320px;
    --border-radius-sm: 6px;
    --border-radius-md: 12px;
    --border-radius-lg: 20px;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.08);
    
    /* Transition */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
}

[data-theme="dark"] {
    --bg-main: #0f172a;
    --bg-card: #1e293b;
    --text-main: #f1f5f9;
    --text-muted: #94a3b8;
    --border-color: #334155;
    --primary-light: #134e4a;
    --secondary-light: #0c4a6e;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.4);
}

/* 2. Reset & Base Styles */
*, *::before, *::after {
    box-sizing: border-box;
}

html {
    font-family: var(--font-sans);
    line-height: 1.6;
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
}

body {
    margin: 0;
    padding: 0;
    background-color: var(--bg-main);
    color: var(--text-main);
    transition: background-color var(--transition-normal), color var(--transition-normal);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: var(--secondary-color);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--primary-color);
}

button, input, select, textarea {
    font-family: inherit;
    font-size: 100%;
    margin: 0;
}

/* 3. Accessibility & Helpers */
.screen-reader-text {
    border: 0;
    clip: rect(1px, 1px, 1px, 1px);
    clip-path: inset(50%);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    width: 1px;
    word-wrap: normal !important;
}

.screen-reader-text:focus {
    background-color: var(--bg-card);
    clip: auto !important;
    clip-path: none !important;
    color: var(--text-main);
    display: block;
    font-size: 1em;
    height: auto;
    left: 5px;
    line-height: normal;
    padding: 15px 23px 14px;
    position: absolute;
    top: 5px;
    text-decoration: none;
    width: auto;
    z-index: 100000;
    border-radius: var(--border-radius-sm);
    box-shadow: var(--shadow-lg);
}

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
}

.flex-center {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 4. Typography & Headings */
h1, h2, h3, h4, h5, h6 {
    color: var(--text-main);
    font-weight: 700;
    line-height: 1.25;
    margin-top: 0;
    margin-bottom: 0.5em;
}

h1 { font-size: 2.25rem; }
h2 { font-size: 1.75rem; border-bottom: 2px solid var(--border-color); padding-bottom: 0.25em; margin-top: 1.5em; }
h3 { font-size: 1.5rem; margin-top: 1.25em; }
h4 { font-size: 1.25rem; }

/* AdSense Container Safety (Prevent CLS) */
.adsense-placeholder {
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: var(--border-color);
    border: 1px dashed var(--text-muted);
    min-height: 100px;
    margin: 20px 0;
    position: relative;
    overflow: hidden;
    border-radius: var(--border-radius-sm);
}

.adsense-placeholder::before {
    content: "Advertisement";
    font-size: 0.75rem;
    color: var(--text-muted);
    position: absolute;
    top: 2px;
    left: 5px;
}

/* 5. Layout Structure */
#page {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.site-content {
    flex-grow: 1;
    padding: 40px 0;
}

.main-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
}

@media (min-width: 992px) {
    .main-layout {
        grid-template-columns: 1fr var(--sidebar-width);
    }
}

/* Header */
.site-header {
    background-color: var(--bg-card);
    box-shadow: var(--shadow-sm);
    z-index: 1000;
    border-bottom: 1px solid var(--border-color);
}

.header-container {
    height: var(--header-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.site-branding .site-title {
    font-size: 1.5rem;
    margin: 0;
    font-weight: 800;
}

.site-branding .site-title a {
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Sticky Header functionality */
.site-header.is-sticky {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    animation: slideDown 0.3s ease-out;
    box-shadow: var(--shadow-md);
}

@keyframes slideDown {
    from { transform: translateY(-100%); }
    to { transform: translateY(0); }
}

/* Reading Progress Bar */
.reading-progress-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background-color: transparent;
    z-index: 9999;
}

.reading-progress-bar {
    height: 100%;
    background-color: var(--primary-color);
    width: 0%;
    transition: width 0.1s ease-out;
}

/* Footer */
.site-footer {
    background-color: var(--bg-card);
    border-top: 1px solid var(--border-color);
    padding: 60px 0 20px;
    font-size: 0.95rem;
}

.footer-widgets {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-widget-title {
    font-size: 1.1rem;
    margin-bottom: 1.25em;
    position: relative;
    padding-bottom: 0.5em;
}

.footer-widget-title::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 40px;
    height: 3px;
    background-color: var(--primary-color);
    border-radius: 2px;
}

.footer-widget ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-widget ul li {
    margin-bottom: 0.75em;
}

.footer-widget ul li a {
    color: var(--text-muted);
}

.footer-widget ul li a:hover {
    color: var(--primary-color);
}

.footer-bottom {
    border-top: 1px solid var(--border-color);
    padding-top: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

@media (min-width: 768px) {
    .footer-bottom {
        flex-direction: row;
    }
}

/* Footer Menu Navigation */
.footer-navigation ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
}

.footer-navigation a {
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 600;
}

.footer-navigation a:hover {
    color: var(--primary-color);
}

.footer-badges {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.trust-badge {
    background: var(--bg-main);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    padding: 4px 8px;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 5px;
}

.trust-badge svg {
    color: var(--primary-color);
    fill: currentColor;
    width: 14px;
    height: 14px;
}

/* 6. Sticky Elements */
@media (min-width: 992px) {
    .sticky-sidebar {
        position: sticky;
        top: calc(var(--header-height) + 20px);
        align-self: start;
    }
}

/* 7. Navigation */
.main-navigation {
    display: none;
}

@media (min-width: 992px) {
    .main-navigation {
        display: block !important;
    }
    .menu-toggle {
        display: none !important;
    }
}

.main-navigation > ul,
.main-navigation > div > ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    gap: 24px;
}

.main-navigation li {
    position: relative;
    list-style: none;
}

.main-navigation a {
    color: var(--text-main);
    font-weight: 600;
    font-size: 0.95rem;
    padding: 10px 0;
    display: inline-block;
}

.main-navigation a:hover,
.main-navigation li.current-menu-item > a {
    color: var(--primary-color);
}

/* Desktop Dropdown Menus */
.main-navigation li:hover > ul {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.main-navigation ul ul {
    position: absolute;
    left: 0;
    top: 100%;
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-lg);
    border-radius: var(--border-radius-sm);
    min-width: 200px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    padding: 10px 0;
    margin: 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.2s ease-in-out;
    z-index: 999;
}

.main-navigation ul ul li {
    width: 100%;
}

.main-navigation ul ul a {
    padding: 8px 20px;
    width: 100%;
    font-weight: 500;
    display: block;
}

.main-navigation ul ul a:hover {
    background-color: var(--bg-main);
    color: var(--primary-color);
}

/* Mobile Hamburger & Slide Menu */
.menu-toggle {
    display: none;
}

@media (max-width: 991px) {
    .menu-toggle {
        display: flex;
        flex-direction: column;
        gap: 5px;
        background: none;
        border: none;
        cursor: pointer;
        padding: 10px;
        z-index: 1001;
    }
}

.menu-toggle span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--text-main);
    transition: transform var(--transition-fast), opacity var(--transition-fast);
}

.menu-toggle.is-active span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.menu-toggle.is-active span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.is-active span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

.mobile-navigation {
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100%;
    background-color: var(--bg-card);
    box-shadow: var(--shadow-lg);
    z-index: 999;
    padding: 80px 20px 20px;
    transition: right var(--transition-normal);
    overflow-y: auto;
}

.mobile-navigation.is-open {
    right: 0;
}

.mobile-navigation ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.mobile-navigation li {
    margin-bottom: 15px;
}

.mobile-navigation a {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-main);
    display: block;
}

.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 998;
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--transition-normal);
}

.mobile-menu-overlay.is-visible {
    opacity: 1;
    visibility: visible;
}

/* Theme Switcher Button */
.theme-toggle-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-main);
    padding: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.theme-toggle-btn svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

/* 8. Homepage Sections */
.homepage-section {
    padding: 50px 0;
}

.homepage-section:nth-of-type(even) {
    background-color: var(--bg-card);
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 30px;
}

.section-title {
    font-size: 1.8rem;
    margin: 0;
    position: relative;
    padding-bottom: 10px;
}

.section-title::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 60px;
    height: 4px;
    background-color: var(--primary-color);
    border-radius: 2px;
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--secondary-dark) 100%);
    color: #ffffff;
    padding: 80px 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero-section h1 {
    color: #ffffff;
    font-size: 3rem;
    max-width: 800px;
    margin: 0 auto 20px;
    font-weight: 800;
}

.hero-section p {
    font-size: 1.25rem;
    max-width: 600px;
    margin: 0 auto 30px;
    color: rgba(255,255,255,0.9);
}

.hero-cta {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 40px;
}

.btn {
    padding: 12px 28px;
    border-radius: var(--border-radius-sm);
    font-weight: 700;
    text-align: center;
    display: inline-block;
    transition: all var(--transition-fast);
    cursor: pointer;
}

.btn-primary {
    background-color: var(--accent-color);
    color: white;
}

.btn-primary:hover {
    background-color: #ea580c;
    color: white;
    transform: translateY(-2px);
}

.btn-secondary {
    background-color: rgba(255,255,255,0.15);
    color: white;
    border: 1px solid rgba(255,255,255,0.3);
}

.btn-secondary:hover {
    background-color: rgba(255,255,255,0.25);
    color: white;
    transform: translateY(-2px);
}

/* Hero Search */
.hero-search {
    max-width: 600px;
    margin: 0 auto;
    background: white;
    border-radius: var(--border-radius-md);
    padding: 6px;
    display: flex;
    box-shadow: var(--shadow-lg);
}

.hero-search input[type="search"] {
    flex-grow: 1;
    border: none;
    padding: 10px 15px;
    outline: none;
    font-size: 1rem;
    color: #1e293b;
}

.hero-search button {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 10px 25px;
    border-radius: var(--border-radius-sm);
    font-weight: 600;
    cursor: pointer;
}

/* Post Cards */
.post-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.post-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: transform var(--transition-fast), box-shadow var(--transition-fast);
    display: flex;
    flex-direction: column;
}

.post-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.post-card-image {
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background-color: var(--border-color);
}

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

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

.post-card-content {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.post-card-category {
    font-size: 0.75rem;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.05em;
    color: var(--primary-color);
    margin-bottom: 8px;
}

.post-card-title {
    font-size: 1.15rem;
    margin-bottom: 10px;
    line-height: 1.4;
}

.post-card-title a {
    color: var(--text-main);
}

.post-card-excerpt {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 15px;
    flex-grow: 1;
}

.post-card-meta {
    font-size: 0.8rem;
    color: var(--text-muted);
    border-top: 1px solid var(--border-color);
    padding-top: 12px;
    display: flex;
    justify-content: space-between;
}

/* Numbered Latest Posts */
.numbered-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.numbered-item {
    display: flex;
    gap: 20px;
    align-items: center;
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 20px;
    border-radius: var(--border-radius-md);
}

.numbered-badge {
    font-size: 2rem;
    font-weight: 800;
    color: var(--primary-color);
    opacity: 0.3;
    min-width: 50px;
    text-align: center;
}

.numbered-content {
    flex-grow: 1;
}

.numbered-content h3 {
    margin: 0 0 5px;
    font-size: 1.15rem;
}

/* Categories List */
.category-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.category-badge {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 10px 20px;
    border-radius: 30px;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-main);
    box-shadow: var(--shadow-sm);
}

.category-badge:hover {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* Doctor Profiles */
.doctors-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 30px;
}

.doctor-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    overflow: hidden;
    text-align: center;
    padding: 30px 20px;
    box-shadow: var(--shadow-sm);
}

.doctor-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    margin: 0 auto 15px;
    object-fit: cover;
    border: 3px solid var(--primary-light);
}

.doctor-name {
    font-size: 1.2rem;
    margin-bottom: 5px;
}

.doctor-specialty {
    font-size: 0.85rem;
    color: var(--primary-color);
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 10px;
}

/* Top Hospitals */
.hospitals-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.hospital-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    padding: 25px;
    box-shadow: var(--shadow-sm);
}

.hospital-name {
    font-size: 1.25rem;
    margin-bottom: 8px;
    color: var(--secondary-dark);
}

.hospital-meta {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 15px;
}

/* Testimonials */
.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.testimonial-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    padding: 30px;
    box-shadow: var(--shadow-sm);
    position: relative;
}

.testimonial-text {
    font-style: italic;
    color: var(--text-main);
    margin-bottom: 20px;
}

.testimonial-author {
    font-weight: 700;
    font-size: 0.95rem;
}

/* FAQs */
.faq-accordion {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    margin-bottom: 15px;
    overflow: hidden;
}

.faq-question {
    padding: 20px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    user-select: none;
}

.faq-question::after {
    content: '+';
    font-size: 1.5rem;
    font-weight: 400;
    color: var(--primary-color);
    transition: transform var(--transition-fast);
}

.faq-item.is-open .faq-question::after {
    transform: rotate(45deg);
}

.faq-answer {
    padding: 0 20px;
    max-height: 0;
    overflow: hidden;
    transition: padding var(--transition-fast), max-height var(--transition-fast);
    color: var(--text-muted);
}

.faq-item.is-open .faq-answer {
    padding: 0 20px 20px;
    max-height: 500px;
}

/* 9. Single Post Elements */
.breadcrumbs {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 20px;
}

.breadcrumbs a {
    color: var(--text-muted);
}

.breadcrumbs span {
    margin: 0 5px;
}

.post-header {
    margin-bottom: 30px;
}

.post-title {
    font-size: 2.5rem;
    margin-bottom: 15px;
    font-weight: 800;
}

.post-meta-container {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: center;
    font-size: 0.85rem;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 15px;
}

.post-meta-item {
    display: flex;
    align-items: center;
    gap: 5px;
}

.medical-disclaimer-box {
    background-color: var(--secondary-light);
    border-left: 5px solid var(--secondary-color);
    padding: 20px;
    border-radius: 0 var(--border-radius-md) var(--border-radius-md) 0;
    font-size: 0.9rem;
    color: var(--text-main);
    margin-bottom: 30px;
}

.medical-disclaimer-box p {
    margin: 0;
}

/* Table of Contents */
.table-of-contents {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    padding: 20px;
    margin-bottom: 30px;
}

.toc-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 10px;
    margin-bottom: 15px;
}

.toc-title {
    font-weight: 700;
    margin: 0;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.toc-toggle-btn {
    background: none;
    border: none;
    color: var(--primary-color);
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    padding: 0;
}

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

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

.toc-list li.toc-h3 {
    padding-left: 20px;
    font-size: 0.9rem;
}

.toc-list a {
    color: var(--text-main);
}

.toc-list a:hover {
    color: var(--primary-color);
}

/* Content Area styling */
.post-entry-content {
    font-size: 1.1rem;
    line-height: 1.75;
    color: var(--text-main);
}

.post-entry-content p {
    margin-bottom: 1.5em;
}

.post-entry-content blockquote {
    border-left: 4px solid var(--primary-color);
    padding-left: 20px;
    margin: 30px 0;
    font-style: italic;
    color: var(--text-muted);
}

/* Share Buttons */
.share-buttons {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 40px 0;
    flex-wrap: wrap;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    padding: 15px 0;
}

.share-label {
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--text-muted);
    text-transform: uppercase;
}

.share-btn {
    padding: 8px 16px;
    border-radius: var(--border-radius-sm);
    color: white;
    font-size: 0.85rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.share-fb { background-color: #1877f2; }
.share-tw { background-color: #1da1f2; }
.share-li { background-color: #0077b5; }
.share-wa { background-color: #25d366; }

.share-btn:hover {
    opacity: 0.9;
    color: white;
}

/* Inline related article block */
.inline-related-article {
    border: 1px solid var(--border-color);
    background-color: var(--bg-main);
    border-radius: var(--border-radius-md);
    padding: 20px;
    margin: 30px 0;
    display: flex;
    align-items: center;
    gap: 20px;
}

.inline-related-thumb {
    width: 80px;
    height: 80px;
    flex-shrink: 0;
    border-radius: var(--border-radius-sm);
    overflow: hidden;
    background-color: var(--border-color);
}

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

.inline-related-info {
    flex-grow: 1;
}

.inline-related-label {
    font-size: 0.75rem;
    color: var(--primary-color);
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 4px;
}

.inline-related-title {
    margin: 0;
    font-size: 1rem;
}

/* Author Box */
.author-box {
    display: flex;
    gap: 20px;
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    padding: 30px;
    margin: 40px 0;
}

@media (max-width: 576px) {
    .author-box {
        flex-direction: column;
        text-align: center;
        align-items: center;
    }
}

.author-avatar {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.author-info h3 {
    margin: 0 0 10px;
    font-size: 1.25rem;
}

.author-bio {
    font-size: 0.95rem;
    color: var(--text-muted);
    margin-bottom: 15px;
}

.author-links {
    display: flex;
    gap: 15px;
}

@media (max-width: 576px) {
    .author-links {
        justify-content: center;
    }
}

/* 10. Sidebar & Widgets */
.widget {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: var(--shadow-sm);
}

.widget-title {
    font-size: 1.15rem;
    margin-bottom: 20px;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 8px;
    position: relative;
}

.widget-title::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -2px;
    width: 50px;
    height: 2px;
    background-color: var(--primary-color);
}

/* Recent/Popular Post Widgets list style */
.widget-posts-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.widget-posts-list li {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
    align-items: center;
}

.widget-posts-list li:last-child {
    margin-bottom: 0;
}

.widget-post-thumb {
    width: 60px;
    height: 60px;
    border-radius: var(--border-radius-sm);
    overflow: hidden;
    flex-shrink: 0;
    background-color: var(--border-color);
}

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

.widget-post-info h4 {
    margin: 0 0 5px;
    font-size: 0.9rem;
    line-height: 1.3;
}

.widget-post-meta {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Category Tab widget */
.category-tabs-nav {
    display: flex;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 15px;
    gap: 10px;
}

.category-tab-btn {
    border: none;
    background: none;
    padding: 8px 12px;
    font-weight: 700;
    cursor: pointer;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.category-tab-btn.is-active {
    color: var(--primary-color);
    border-bottom: 2px solid var(--primary-color);
}

/* Newsletter Widget */
.newsletter-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.newsletter-form input[type="email"] {
    padding: 10px 15px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    outline: none;
    background-color: var(--bg-main);
    color: var(--text-main);
}

.newsletter-form button {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 10px;
    border-radius: var(--border-radius-sm);
    font-weight: 700;
    cursor: pointer;
    transition: background-color var(--transition-fast);
}

.newsletter-form button:hover {
    background-color: var(--primary-dark);
}

/* Search widget */
.search-form-widget {
    display: flex;
}

.search-form-widget input[type="search"] {
    flex-grow: 1;
    border: 1px solid var(--border-color);
    border-right: none;
    padding: 8px 12px;
    border-radius: var(--border-radius-sm) 0 0 var(--border-radius-sm);
    outline: none;
    background-color: var(--bg-main);
    color: var(--text-main);
}

.search-form-widget button {
    border: 1px solid var(--border-color);
    background-color: var(--primary-color);
    color: white;
    padding: 8px 15px;
    border-radius: 0 var(--border-radius-sm) var(--border-radius-sm) 0;
    cursor: pointer;
}

/* 11. Comments & Forms */
.comment-list-title {
    margin-top: 40px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 10px;
}

.comment-list {
    list-style: none;
    padding: 0;
    margin: 20px 0;
}

.comment {
    margin-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 20px;
}

.comment-body {
    display: flex;
    gap: 15px;
}

.comment-meta {
    flex-shrink: 0;
}

.comment-meta img {
    border-radius: 50%;
}

.comment-content {
    flex-grow: 1;
}

.comment-author-name {
    font-weight: 700;
    margin-bottom: 2px;
}

.comment-metadata {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 10px;
}

.comment-form input,
.comment-form textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    margin-bottom: 15px;
    outline: none;
    background-color: var(--bg-main);
    color: var(--text-main);
}

.comment-form button {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 10px 25px;
    border-radius: var(--border-radius-sm);
    font-weight: 700;
    cursor: pointer;
}

/* Related Posts & Comments Area Cards */
.related-posts,
.comments-area {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    padding: 30px;
    margin-top: 40px;
    box-shadow: var(--shadow-sm);
}

.comments-area .comment-respond {
    margin-top: 0;
}

/* 12. Dark Mode Overrides and Animations */
/* Prevent flash of light mode */
[data-theme="dark"] .post-card-content,
[data-theme="dark"] .widget,
[data-theme="dark"] .author-box,
[data-theme="dark"] .testimonial-card,
[data-theme="dark"] .doctor-card,
[data-theme="dark"] .hospital-card,
[data-theme="dark"] .faq-item {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.2);
}

/* 13. Print Styles */
@media print {
    body {
        background-color: #fff;
        color: #000;
    }
    .site-header,
    .site-footer,
    .sticky-sidebar,
    .share-buttons,
    .comment-respond,
    .adsense-placeholder {
        display: none !important;
    }
    .main-layout {
        display: block;
    }
}
