/**
 * Phytopedia WordPress Plugin - Main Stylesheet
 * Version: 2.1.0
 * Modern Material Design UI with customizable colors
 */

/* ============================================
   CSS VARIABLES & COLOR SYSTEM
   ============================================ */

:root {
    /* Primary Colors (customizable via settings) */
    --phytopedia-primary: #4CAF50;
    --phytopedia-secondary: #009688;
    --phytopedia-accent: #FFC107;

    /* Shades of Primary Color */
    --primary-light: #81C784;
    --primary-dark: #388E3C;

    /* Grayscale */
    --gray-50: #FAFAFA;
    --gray-100: #F5F5F5;
    --gray-200: #EEEEEE;
    --gray-300: #E0E0E0;
    --gray-400: #BDBDBD;
    --gray-500: #9E9E9E;
    --gray-600: #757575;
    --gray-700: #616161;
    --gray-800: #424242;
    --gray-900: #212121;

    /* Semantic Colors */
    --success-color: #4CAF50;
    --error-color: #F44336;
    --warning-color: #FF9800;
    --info-color: #2196F3;

    /* Text Colors */
    --text-primary: #212121;
    --text-secondary: #757575;
    --text-disabled: #BDBDBD;
    --text-hint: #9E9E9E;

    /* Background Colors */
    --bg-primary: #FFFFFF;
    --bg-secondary: #FAFAFA;
    --bg-tertiary: #F5F5F5;

    /* Border & Divider */
    --border-color: #E0E0E0;
    --divider-color: #BDBDBD;

    /* Shadows */
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.24);
    --shadow-md: 0 3px 6px rgba(0,0,0,0.15), 0 2px 4px rgba(0,0,0,0.12);
    --shadow-lg: 0 10px 20px rgba(0,0,0,0.15), 0 3px 6px rgba(0,0,0,0.10);
    --shadow-xl: 0 15px 25px rgba(0,0,0,0.15), 0 5px 10px rgba(0,0,0,0.05);

    /* Typography */
    --font-family-base: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --font-family-heading: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-family-mono: 'Fira Code', 'Monaco', 'Consolas', monospace;

    /* Spacing Scale */
    --spacing-xs: 4px;
    --spacing-sm: 8px;
    --spacing-md: 16px;
    --spacing-lg: 24px;
    --spacing-xl: 32px;
    --spacing-2xl: 48px;
    --spacing-3xl: 64px;

    /* Border Radius */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --radius-full: 9999px;

    /* Transitions */
    --transition-fast: 150ms ease-in-out;
    --transition-base: 250ms ease-in-out;
    --transition-slow: 350ms ease-in-out;

    /* Z-index Scale */
    --z-dropdown: 1000;
    --z-sticky: 1020;
    --z-fixed: 1030;
    --z-modal-backdrop: 1040;
    --z-modal: 1050;
    --z-popover: 1060;
    --z-tooltip: 1070;
}

/* ============================================
   RESET & BASE STYLES
   ============================================ */

.phytopedia-categories,
.phytopedia-articles-container,
.phytopedia-article-single,
.phytopedia-search-container,
.phytopedia-daily-fact {
    box-sizing: border-box;
    font-family: var(--font-family-base);
    color: var(--text-primary);
    line-height: 1.6;
}

.phytopedia-categories *,
.phytopedia-articles-container *,
.phytopedia-article-single *,
.phytopedia-search-container *,
.phytopedia-daily-fact * {
    box-sizing: inherit;
}

/* ============================================
   HERO SECTION
   ============================================ */

.phytopedia-hero {
    background: linear-gradient(135deg, var(--phytopedia-primary) 0%, var(--phytopedia-secondary) 100%);
    padding: var(--spacing-3xl) var(--spacing-lg);
    text-align: center;
    border-radius: var(--radius-lg);
    margin-bottom: var(--spacing-2xl);
    color: white;
    position: relative;
    overflow: hidden;
}

.phytopedia-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1440 320"><path fill="rgba(255,255,255,0.1)" d="M0,96L48,112C96,128,192,160,288,160C384,160,480,128,576,128C672,128,768,160,864,165.3C960,171,1056,149,1152,133.3C1248,117,1344,107,1392,101.3L1440,96L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z"></path></svg>') no-repeat bottom;
    background-size: cover;
    opacity: 0.3;
}

.phytopedia-hero-content {
    position: relative;
    z-index: 1;
}

.phytopedia-hero h1 {
    font-family: var(--font-family-heading);
    font-size: 2.5rem;
    font-weight: 700;
    margin: 0 0 var(--spacing-md);
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.phytopedia-hero p {
    font-size: 1.25rem;
    margin: 0 0 var(--spacing-xl);
    opacity: 0.95;
}

/* ============================================
   HEADER & NAVIGATION
   ============================================ */

.phytopedia-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--spacing-lg) var(--spacing-xl);
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border-color);
    min-height: 100px;
    position: sticky;
    top: 0;
    z-index: var(--z-sticky);
    box-shadow: var(--shadow-sm);
}

.phytopedia-logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--phytopedia-primary);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.phytopedia-logo svg,
.phytopedia-logo img {
    width: 40px;
    height: 40px;
}

/* ============================================
   BREADCRUMBS
   ============================================ */

.phytopedia-breadcrumbs {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-md) 0;
    font-size: 0.875rem;
    color: var(--text-secondary);
    flex-wrap: wrap;
}

.phytopedia-breadcrumbs a {
    color: var(--phytopedia-primary);
    text-decoration: none;
    transition: color var(--transition-fast);
}

.phytopedia-breadcrumbs a:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

.phytopedia-breadcrumbs .separator {
    color: var(--text-disabled);
    user-select: none;
}

.phytopedia-breadcrumbs .current {
    color: var(--text-primary);
    font-weight: 500;
}

/* ============================================
   GRID LAYOUTS
   ============================================ */

.phytopedia-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: var(--spacing-md);
    margin: var(--spacing-lg) 0;
}

@media (min-width: 1200px) {
    .phytopedia-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (min-width: 768px) and (max-width: 1199px) {
    .phytopedia-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 480px) and (max-width: 767px) {
    .phytopedia-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 479px) {
    .phytopedia-grid {
        grid-template-columns: 1fr;
    }
}

/* ============================================
   CATEGORY CARDS
   ============================================ */

.phytopedia-category-card {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: var(--spacing-md);
    text-align: center;
    transition: all var(--transition-base);
    position: relative;
    overflow: hidden;
}

.phytopedia-category-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--phytopedia-primary), var(--phytopedia-secondary));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform var(--transition-base);
}

.phytopedia-category-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
    border-color: var(--phytopedia-primary);
}

.phytopedia-category-card:hover::before {
    transform: scaleX(1);
}

.category-icon {
    font-size: 3rem;
    margin-bottom: var(--spacing-md);
    filter: grayscale(20%);
}

.phytopedia-category-card h3 {
    font-family: var(--font-family-heading);
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0 0 var(--spacing-sm);
    color: var(--text-primary);
}

.phytopedia-category-card p {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin: 0 0 var(--spacing-md);
    line-height: 1.5;
}

.category-meta {
    font-size: 0.8125rem;
    color: var(--text-hint);
    padding: var(--spacing-sm) 0;
    border-top: 1px solid var(--border-color);
    margin: var(--spacing-md) 0;
}

/* ============================================
   VIEW TOGGLE
   ============================================ */

.phytopedia-view-toggle {
    display: flex;
    gap: var(--spacing-sm);
    justify-content: flex-end;
    margin-bottom: var(--spacing-lg);
    padding: var(--spacing-md);
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
}

.view-toggle-btn {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    padding: var(--spacing-sm) var(--spacing-md);
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
    transition: all var(--transition-fast);
}

.view-toggle-btn:hover {
    background: var(--gray-100);
    border-color: var(--gray-400);
    color: var(--text-primary);
}

.view-toggle-btn.active {
    background: var(--phytopedia-primary);
    border-color: var(--phytopedia-primary);
    color: white;
}

.view-toggle-btn svg {
    width: 16px;
    height: 16px;
}

/* ============================================
   ARTICLE CARDS - GRID VIEW
   ============================================ */

.phytopedia-articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: var(--spacing-md);
}

@media (min-width: 1200px) {
    .phytopedia-articles-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 768px) and (max-width: 1199px) {
    .phytopedia-articles-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 767px) {
    .phytopedia-articles-grid {
        grid-template-columns: 1fr;
    }
}

.phytopedia-articles-grid .phytopedia-article-card {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all var(--transition-base);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.phytopedia-articles-grid .phytopedia-article-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
    border-color: var(--phytopedia-primary);
}

.phytopedia-article-card .article-image {
    position: relative;
    width: 100%;
    height: 200px;
    overflow: hidden;
    background: var(--gray-200);
}

.phytopedia-article-card .article-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

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

.badge-featured {
    position: absolute;
    top: var(--spacing-sm);
    right: var(--spacing-sm);
    background: var(--phytopedia-accent);
    color: white;
    padding: var(--spacing-xs) var(--spacing-sm);
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: var(--shadow-sm);
}

.phytopedia-article-card .article-content {
    padding: var(--spacing-md);
    flex: 1;
    display: flex;
    flex-direction: column;
}

.article-category {
    display: inline-block;
    background: var(--phytopedia-primary);
    color: white;
    padding: var(--spacing-xs) var(--spacing-sm);
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: var(--spacing-sm);
    align-self: flex-start;
}

.phytopedia-article-card h3 {
    font-family: var(--font-family-heading);
    font-size: 1.25rem;
    font-weight: 600;
    margin: var(--spacing-sm) 0;
    line-height: 1.4;
    flex-grow: 0;
}

.phytopedia-article-card h3 a {
    color: var(--text-primary);
    text-decoration: none;
    transition: color var(--transition-fast);
}

.phytopedia-article-card h3 a:hover {
    color: var(--phytopedia-primary);
}

.article-excerpt {
    font-size: 0.9375rem;
    color: var(--text-secondary);
    margin: var(--spacing-sm) 0;
    line-height: 1.6;
    flex-grow: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.article-meta {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    font-size: 0.8125rem;
    color: var(--text-hint);
    margin: var(--spacing-md) 0;
    padding-top: var(--spacing-md);
    border-top: 1px solid var(--border-color);
    flex-wrap: wrap;
}

.article-meta span {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
}

.article-tags {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-xs);
    margin: var(--spacing-sm) 0;
}

.article-tags .tag {
    display: inline-block;
    background: var(--gray-100);
    color: var(--text-secondary);
    padding: 4px 8px;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    transition: all var(--transition-fast);
}

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

/* ============================================
   ARTICLE CARDS - LIST VIEW
   ============================================ */

.phytopedia-articles-list {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

.phytopedia-articles-list .phytopedia-article-card {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all var(--transition-base);
    display: flex;
    flex-direction: row;
}

.phytopedia-articles-list .phytopedia-article-card:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--phytopedia-primary);
}

.phytopedia-articles-list .article-image {
    flex-shrink: 0;
    width: 280px;
    height: auto;
    min-height: 200px;
    position: relative;
    overflow: hidden;
    background: var(--gray-200);
}

.phytopedia-articles-list .article-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.phytopedia-articles-list .article-content {
    padding: var(--spacing-md);
    flex: 1;
}

@media (max-width: 767px) {
    .phytopedia-articles-list .phytopedia-article-card {
        flex-direction: column;
    }

    .phytopedia-articles-list .article-image {
        width: 100%;
        height: 200px;
    }
}

/* ============================================
   BUTTONS & CTAs
   ============================================ */

.phytopedia-button,
a.phytopedia-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-sm) var(--spacing-lg);
    background: var(--phytopedia-primary);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-size: 0.9375rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all var(--transition-fast);
    box-shadow: var(--shadow-sm);
}

.phytopedia-button:hover,
a.phytopedia-button:hover {
    background: var(--primary-dark);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
    color: white;
}

.phytopedia-button:active,
a.phytopedia-button:active {
    transform: translateY(0);
    box-shadow: var(--shadow-sm);
}

/* ============================================
   SINGLE ARTICLE VIEW
   ============================================ */

.phytopedia-article-single {
    max-width: 900px;
    margin: 0 auto;
    padding: var(--spacing-xl);
}

.article-header {
    text-align: left;
    margin-bottom: var(--spacing-2xl);
}

.article-header h1 {
    font-family: var(--font-family-heading);
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1.2;
    margin: 0 0 var(--spacing-lg);
    color: var(--text-primary);
    text-align: left;
}

.article-header .article-meta {
    justify-content: flex-start;
    border-top: none;
    padding-top: 0;
}

.category-badge {
    display: inline-block;
    background: var(--phytopedia-primary);
    color: white;
    padding: var(--spacing-xs) var(--spacing-md);
    border-radius: var(--radius-full);
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.article-featured-image {
    margin: var(--spacing-2xl) 0;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

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

.article-content {
    font-size: 1.0625rem;
    line-height: 1.8;
    color: var(--text-primary);
    margin: var(--spacing-2xl) 0;
}

.article-content h2 {
    font-family: var(--font-family-heading);
    font-size: 2rem;
    font-weight: 700;
    margin: var(--spacing-2xl) 0 var(--spacing-lg);
    color: var(--text-primary);
}

.article-content h3 {
    font-family: var(--font-family-heading);
    font-size: 1.5rem;
    font-weight: 600;
    margin: var(--spacing-xl) 0 var(--spacing-md);
    color: var(--text-primary);
}

.article-content h4 {
    font-size: 1.25rem;
    font-weight: 600;
    margin: var(--spacing-lg) 0 var(--spacing-sm);
}

.article-content p {
    margin: var(--spacing-md) 0;
}

.article-content ul,
.article-content ol {
    margin: var(--spacing-md) 0;
    padding-left: var(--spacing-xl);
}

.article-content li {
    margin: var(--spacing-sm) 0;
}

.article-content a {
    color: var(--phytopedia-primary);
    text-decoration: underline;
    transition: color var(--transition-fast);
}

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

.article-content img {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius-md);
    margin: var(--spacing-lg) 0;
}

.article-content blockquote {
    border-left: 4px solid var(--phytopedia-primary);
    padding-left: var(--spacing-lg);
    margin: var(--spacing-xl) 0;
    font-style: italic;
    color: var(--text-secondary);
}

.article-content code {
    background: var(--gray-100);
    padding: 2px 6px;
    border-radius: var(--radius-sm);
    font-family: var(--font-family-mono);
    font-size: 0.9em;
}

.article-content pre {
    background: var(--gray-900);
    color: var(--gray-100);
    padding: var(--spacing-lg);
    border-radius: var(--radius-md);
    overflow-x: auto;
    margin: var(--spacing-lg) 0;
}

.article-content pre code {
    background: none;
    padding: 0;
    color: inherit;
}

.medical-review-badge {
    background: var(--success-color);
    color: white;
    padding: var(--spacing-md) var(--spacing-lg);
    border-radius: var(--radius-md);
    margin: var(--spacing-xl) 0;
    font-size: 0.9375rem;
}

.article-tags-section {
    margin: var(--spacing-2xl) 0;
    padding: var(--spacing-lg) 0;
    border-top: 1px solid var(--border-color);
}

.article-tags-section strong {
    display: block;
    margin-bottom: var(--spacing-sm);
    color: var(--text-primary);
}

.tags-list {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-sm);
}

.tags-list .tag {
    background: var(--gray-100);
    color: var(--text-secondary);
    padding: var(--spacing-xs) var(--spacing-md);
    border-radius: var(--radius-full);
    font-size: 0.875rem;
    text-decoration: none;
    transition: all var(--transition-fast);
}

.tags-list .tag:hover {
    background: var(--phytopedia-primary);
    color: white;
}

/* ============================================
   RELATED ARTICLES
   ============================================ */

.related-articles-section {
    margin: var(--spacing-3xl) 0;
    padding: var(--spacing-2xl) 0;
    border-top: 2px solid var(--border-color);
}

.related-articles-section h2 {
    font-family: var(--font-family-heading);
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: var(--spacing-xl);
    color: var(--text-primary);
}

.related-articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--spacing-lg);
}

.related-article-card {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all var(--transition-base);
}

.related-article-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
    border-color: var(--phytopedia-primary);
}

.related-article-card img {
    width: 100%;
    height: 150px;
    object-fit: cover;
}

.related-article-card h3 {
    font-size: 1rem;
    font-weight: 600;
    margin: var(--spacing-md);
    padding: 0;
}

.related-article-card h3 a {
    color: var(--text-primary);
    text-decoration: none;
}

.related-article-card h3 a:hover {
    color: var(--phytopedia-primary);
}

.related-article-card p {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin: 0 var(--spacing-md) var(--spacing-md);
    line-height: 1.5;
}

/* ============================================
   SEARCH SYSTEM
   ============================================ */

.phytopedia-search-container {
    margin: var(--spacing-xl) 0;
}

.phytopedia-search-box {
    display: flex;
    gap: var(--spacing-sm);
    background: var(--bg-primary);
    padding: var(--spacing-md);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    flex-wrap: wrap;
}

#phytopedia-search-input {
    flex: 1;
    min-width: 250px;
    padding: var(--spacing-md) var(--spacing-lg);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-family: var(--font-family-base);
    transition: all var(--transition-fast);
}

#phytopedia-search-input:focus {
    outline: none;
    border-color: var(--phytopedia-primary);
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.1);
}

.search-category-filter {
    min-width: 180px;
    padding: var(--spacing-md) var(--spacing-lg);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-family: var(--font-family-base);
    background: white;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.search-category-filter:focus {
    outline: none;
    border-color: var(--phytopedia-primary);
}

.search-btn {
    padding: var(--spacing-md) var(--spacing-xl);
    background: var(--phytopedia-primary);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    transition: all var(--transition-fast);
    box-shadow: var(--shadow-sm);
}

.search-btn:hover {
    background: var(--primary-dark);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.search-btn svg {
    width: 20px;
    height: 20px;
}

.search-results {
    margin-top: var(--spacing-lg);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.search-results.has-results {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-md);
}

.search-result-header {
    padding: var(--spacing-md) var(--spacing-lg);
    background: var(--gray-100);
    border-bottom: 1px solid var(--border-color);
    font-weight: 600;
    color: var(--text-primary);
}

.search-result-item {
    padding: var(--spacing-lg);
    border-bottom: 1px solid var(--border-color);
    transition: background var(--transition-fast);
}

.search-result-item:last-child {
    border-bottom: none;
}

.search-result-item:hover {
    background: var(--gray-50);
}

.search-result-item h4 {
    font-size: 1.125rem;
    font-weight: 600;
    margin: 0 0 var(--spacing-xs);
}

.search-result-item h4 a {
    color: var(--text-primary);
    text-decoration: none;
}

.search-result-item h4 a:hover {
    color: var(--phytopedia-primary);
}

.search-result-excerpt {
    font-size: 0.9375rem;
    color: var(--text-secondary);
    margin: var(--spacing-xs) 0;
    line-height: 1.6;
}

.search-no-results {
    text-align: center;
    padding: var(--spacing-2xl);
    color: var(--text-secondary);
}

.search-no-results svg {
    width: 64px;
    height: 64px;
    margin-bottom: var(--spacing-md);
    opacity: 0.5;
}

.search-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-2xl);
    gap: var(--spacing-md);
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--border-color);
    border-top-color: var(--phytopedia-primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ============================================
   DAILY FACT WIDGET
   ============================================ */

.phytopedia-daily-fact {
    background: #F8F9FA;
    color: var(--text-primary);
    padding: var(--spacing-xl);
    border-radius: var(--radius-lg);
    border: 1px solid #E8EAED;
    border-left: 4px solid var(--phytopedia-primary);
    box-shadow: var(--shadow-sm);
    margin: var(--spacing-xl) 0;
    position: relative;
    overflow: hidden;
}

.phytopedia-daily-fact::before {
    display: none;
}

.fact-icon {
    font-size: 3rem;
    margin-bottom: var(--spacing-md);
    opacity: 0.9;
}

.phytopedia-daily-fact h4 {
    font-family: var(--font-family-heading);
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 0 var(--spacing-md);
}

.fact-text {
    font-size: 1.0625rem;
    line-height: 1.7;
    margin: 0;
    position: relative;
    z-index: 1;
}

.fact-category {
    margin-top: var(--spacing-md);
    font-size: 0.875rem;
    opacity: 0.9;
}

/* ============================================
   RESPONSIVE STYLES
   ============================================ */

@media (max-width: 768px) {
    .phytopedia-hero h1 {
        font-size: 2rem;
    }

    .phytopedia-hero p {
        font-size: 1rem;
    }

    .article-header h1 {
        font-size: 2rem;
    }

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

    .phytopedia-search-box {
        flex-direction: column;
    }

    #phytopedia-search-input,
    .search-category-filter,
    .search-btn {
        width: 100%;
    }

    .phytopedia-view-toggle {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    :root {
        --spacing-xl: 24px;
        --spacing-2xl: 32px;
        --spacing-3xl: 48px;
    }

    .phytopedia-article-single {
        padding: var(--spacing-md);
    }

    .article-header h1 {
        font-size: 1.75rem;
    }
}

/* ============================================
   LOADING STATES & ANIMATIONS
   ============================================ */

.phytopedia-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-3xl);
}

.skeleton {
    background: linear-gradient(90deg, var(--gray-200) 25%, var(--gray-300) 50%, var(--gray-200) 75%);
    background-size: 200% 100%;
    animation: loading 1.5s ease-in-out infinite;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* ============================================
   UTILITY CLASSES
   ============================================ */

.text-center {
    text-align: center;
}

.mt-0 { margin-top: 0; }
.mt-sm { margin-top: var(--spacing-sm); }
.mt-md { margin-top: var(--spacing-md); }
.mt-lg { margin-top: var(--spacing-lg); }
.mt-xl { margin-top: var(--spacing-xl); }

.mb-0 { margin-bottom: 0; }
.mb-sm { margin-bottom: var(--spacing-sm); }
.mb-md { margin-bottom: var(--spacing-md); }
.mb-lg { margin-bottom: var(--spacing-lg); }
.mb-xl { margin-bottom: var(--spacing-xl); }

.p-0 { padding: 0; }
.p-sm { padding: var(--spacing-sm); }
.p-md { padding: var(--spacing-md); }
.p-lg { padding: var(--spacing-lg); }
.p-xl { padding: var(--spacing-xl); }

/* ============================================
   DARK MODE (Optional)
   ============================================ */

@media (prefers-color-scheme: dark) {
    .phytopedia-dark-mode-enabled {
        --text-primary: #E0E0E0;
        --text-secondary: #BDBDBD;
        --text-disabled: #757575;
        --text-hint: #9E9E9E;

        --bg-primary: #212121;
        --bg-secondary: #303030;
        --bg-tertiary: #424242;

        --border-color: #424242;
        --divider-color: #616161;
    }

    .phytopedia-dark-mode-enabled .phytopedia-category-card,
    .phytopedia-dark-mode-enabled .phytopedia-article-card {
        background: var(--bg-secondary);
    }
}

/* ============================================
   SIDEBAR LAYOUT (NEW IN V2.1.6)
   ============================================ */

/* Three-column layout with sidebars */
.phytopedia-article-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 32px;
    margin: 24px 0;
}

.phytopedia-article-layout.has-left-sidebar {
    grid-template-columns: 280px 1fr;
}

.phytopedia-article-layout.has-right-sidebar {
    grid-template-columns: 1fr 300px;
}

.phytopedia-article-layout.has-left-sidebar.has-right-sidebar {
    grid-template-columns: 280px 1fr 300px;
}

/* Sidebar Styling */
.phytopedia-sidebar {
    position: sticky;
    top: 24px;
    max-height: calc(100vh - 48px);
    overflow-y: auto;
}

.phytopedia-sidebar::-webkit-scrollbar {
    width: 6px;
}

.phytopedia-sidebar::-webkit-scrollbar-track {
    background: var(--gray-100);
    border-radius: 3px;
}

.phytopedia-sidebar::-webkit-scrollbar-thumb {
    background: var(--gray-400);
    border-radius: 3px;
}

.phytopedia-sidebar::-webkit-scrollbar-thumb:hover {
    background: var(--gray-500);
}

/* Sidebar Widgets */
.sidebar-widget {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    transition: box-shadow 0.3s ease;
}

.sidebar-widget:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.sidebar-widget .widget-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 16px 0;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--phytopedia-primary);
}

/* Category List in Left Sidebar */
.category-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.category-list li {
    margin-bottom: 12px;
}

.category-list li a {
    display: block;
    padding: 10px 12px;
    color: var(--text-primary);
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.2s ease;
    font-weight: 500;
}

.category-list li a:hover {
    background: var(--phytopedia-primary);
    color: #fff;
    transform: translateX(4px);
}

/* Tags Cloud in Left Sidebar */
.tags-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tags-cloud .tag-link {
    display: inline-block;
    padding: 6px 14px;
    background: var(--gray-100);
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.tags-cloud .tag-link:hover {
    background: var(--phytopedia-primary);
    color: #fff;
    transform: translateY(-2px);
}

/* Daily Fact Widget in Right Sidebar */
.sidebar-widget-fact {
    background: #F8F9FA;
    color: var(--text-primary);
    border: 1px solid #E8EAED;
    border-left: 4px solid var(--phytopedia-primary);
}

.sidebar-widget-fact .widget-title {
    color: var(--text-primary);
    border-bottom-color: #E8EAED;
}

.sidebar-widget-fact .daily-fact-content p {
    color: var(--text-secondary);
    line-height: 1.7;
    margin: 0 0 12px 0;
}

.sidebar-widget-fact .fact-category {
    margin: 0;
    opacity: 0.9;
}

.sidebar-widget-fact .fact-category small {
    color: var(--text-hint);
    font-style: italic;
}

/* Related Articles List in Right Sidebar */
.related-articles-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.related-article-item {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-color);
}

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

.related-article-thumb {
    flex-shrink: 0;
    width: 80px;
    height: 80px;
    border-radius: 8px;
    overflow: hidden;
}

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

.related-article-info {
    flex: 1;
}

.related-article-info h4 {
    font-size: 15px;
    font-weight: 600;
    margin: 0 0 6px 0;
    line-height: 1.4;
}

.related-article-info h4 a {
    color: var(--text-primary);
    text-decoration: none;
    transition: color 0.2s ease;
}

.related-article-info h4 a:hover {
    color: var(--phytopedia-primary);
}

.related-article-info .reading-time {
    font-size: 12px;
    color: var(--text-secondary);
}

/* Mobile Responsive Design */
@media (max-width: 1200px) {
    .phytopedia-article-layout.has-left-sidebar.has-right-sidebar {
        grid-template-columns: 240px 1fr 280px;
        gap: 24px;
    }
}

@media (max-width: 992px) {
    /* Stack sidebars on tablet */
    .phytopedia-article-layout.has-left-sidebar.has-right-sidebar {
        grid-template-columns: 1fr;
    }

    .phytopedia-article-layout.has-left-sidebar,
    .phytopedia-article-layout.has-right-sidebar {
        grid-template-columns: 1fr;
    }

    .phytopedia-sidebar {
        position: relative;
        top: 0;
        max-height: none;
    }

    /* Reorganize sidebar order on mobile */
    .phytopedia-sidebar-left {
        order: -1;
    }

    .phytopedia-article-single {
        order: 0;
    }

    .phytopedia-sidebar-right {
        order: 1;
    }
}

@media (max-width: 768px) {
    .sidebar-widget {
        padding: 16px;
        margin-bottom: 16px;
    }

    .sidebar-widget .widget-title {
        font-size: 16px;
        margin-bottom: 12px;
        padding-bottom: 8px;
    }

    .related-article-thumb {
        width: 60px;
        height: 60px;
    }

    .related-article-info h4 {
        font-size: 14px;
    }
}

/* Dark Mode Support for Sidebars */
.phytopedia-dark-mode-enabled .sidebar-widget {
    background: var(--bg-secondary);
    border-color: var(--border-color);
}

.phytopedia-dark-mode-enabled .category-list li a {
    color: var(--text-primary);
}

.phytopedia-dark-mode-enabled .tags-cloud .tag-link {
    background: var(--bg-tertiary);
    color: var(--text-secondary);
}

.phytopedia-dark-mode-enabled .related-article-info h4 a {
    color: var(--text-primary);
}

/* ============================================
   CLEAN MINIMAL UI REDESIGN (V2.2.0)
   Based on modern knowledge base templates
   ============================================ */

/* Reset spacing for tighter layout */
.phytopedia-categories,
.phytopedia-articles-container {
    margin: 16px 0;
}

/* Category Grid - Cleaner, more compact */
.phytopedia-categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 24px;
}

.phytopedia-category-card {
    background: #FFFFFF;
    border: 1px solid #E8EAED;
    border-radius: 12px;
    padding: 24px 20px;
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.phytopedia-category-card:hover {
    border-color: var(--phytopedia-primary);
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    transform: translateY(-2px);
}

.phytopedia-category-card .category-icon {
    font-size: 32px;
    line-height: 1;
    margin-bottom: 4px;
}

.phytopedia-category-card h3 {
    font-size: 18px;
    font-weight: 600;
    margin: 0;
    color: var(--text-primary);
    line-height: 1.3;
}

.phytopedia-category-card p {
    font-size: 14px;
    color: var(--text-secondary);
    margin: 0;
    line-height: 1.5;
}

.phytopedia-category-card .article-count {
    font-size: 13px;
    color: var(--text-hint);
    font-weight: 500;
    margin-top: auto;
}

/* Article Cards - More compact, list-style option */
.phytopedia-articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 16px;
    margin-top: 20px;
}

.phytopedia-article-card {
    background: #FFFFFF;
    border: 1px solid #E8EAED;
    border-radius: 10px;
    overflow: hidden;
    transition: all 0.2s ease;
    box-shadow: 0 1px 2px rgba(0,0,0,0.04);
    display: flex;
    flex-direction: column;
}

.phytopedia-article-card:hover {
    border-color: var(--phytopedia-primary);
    box-shadow: 0 3px 10px rgba(0,0,0,0.08);
    transform: translateY(-1px);
}

.phytopedia-article-card .article-image {
    height: 160px;
    overflow: hidden;
    position: relative;
}

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

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

.phytopedia-article-card .article-content {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
}

.phytopedia-article-card .article-category {
    font-size: 12px;
    font-weight: 600;
    color: var(--phytopedia-primary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.phytopedia-article-card h3 {
    font-size: 16px;
    font-weight: 600;
    margin: 0;
    line-height: 1.4;
}

.phytopedia-article-card h3 a {
    color: var(--text-primary);
    text-decoration: none;
}

.phytopedia-article-card h3 a:hover {
    color: var(--phytopedia-primary);
}

.phytopedia-article-card .article-excerpt {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.5;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.phytopedia-article-card .article-meta {
    display: flex;
    gap: 12px;
    font-size: 12px;
    color: var(--text-hint);
    margin-top: auto;
    padding-top: 8px;
    border-top: 1px solid #F1F3F4;
}

.phytopedia-article-card .article-meta span {
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Breadcrumbs - Simpler */
.phytopedia-breadcrumbs {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 16px;
    padding: 12px 0;
}

.phytopedia-breadcrumbs a {
    color: var(--phytopedia-primary);
    text-decoration: none;
    transition: color 0.2s;
}

.phytopedia-breadcrumbs a:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

.phytopedia-breadcrumbs .separator {
    color: var(--text-hint);
    margin: 0 4px;
}

.phytopedia-breadcrumbs .current {
    color: var(--text-primary);
    font-weight: 500;
}

/* Single Article - Cleaner typography */
.phytopedia-article-single {
    background: #FFFFFF;
    border-radius: 12px;
    padding: 32px;
    border: 1px solid #E8EAED;
}

.phytopedia-article-single .article-header h1 {
    font-size: 32px;
    font-weight: 700;
    line-height: 1.3;
    margin: 0 0 16px 0;
    color: var(--text-primary);
}

.phytopedia-article-single .article-content {
    font-size: 16px;
    line-height: 1.7;
    color: var(--text-primary);
    margin-top: 24px;
}

.phytopedia-article-single .article-content p {
    margin-bottom: 16px;
}

.phytopedia-article-single .article-content h2 {
    font-size: 24px;
    font-weight: 600;
    margin: 32px 0 16px 0;
    color: var(--text-primary);
}

.phytopedia-article-single .article-content h3 {
    font-size: 20px;
    font-weight: 600;
    margin: 24px 0 12px 0;
    color: var(--text-primary);
}

/* Responsive - Mobile */
@media (max-width: 768px) {
    .phytopedia-categories-grid,
    .phytopedia-articles-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .phytopedia-category-card,
    .phytopedia-article-card {
        padding: 16px;
    }

    .phytopedia-article-single {
        padding: 20px;
    }

    .phytopedia-article-single .article-header h1 {
        font-size: 24px;
    }
}

/* Empty State */
.phytopedia-empty-state {
    text-align: center;
    padding: 60px 20px;
    background: #FFFFFF;
    border: 1px solid #E8EAED;
    border-radius: 12px;
    margin: 32px 0;
}

.phytopedia-empty-state .empty-icon {
    font-size: 64px;
    margin-bottom: 16px;
    opacity: 0.6;
}

.phytopedia-empty-state h3 {
    font-size: 24px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 12px 0;
}

.phytopedia-empty-state p {
    font-size: 16px;
    color: var(--text-secondary);
    margin: 0 0 24px 0;
}

.phytopedia-empty-state .phytopedia-button {
    display: inline-block;
    padding: 12px 24px;
    background: var(--phytopedia-primary);
    color: #fff;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.2s;
}

.phytopedia-empty-state .phytopedia-button:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

/* ============================================
   COMPACT UI IMPROVEMENTS (v2.2.2)
   ============================================ */

/* Compact Daily Fact Widget */
.phytopedia-daily-fact {
    background: transparent !important;
    border: 1px solid #E8EAED;
    border-left: 4px solid var(--phytopedia-primary);
    padding: 16px !important;
    margin: 24px 0 !important;
}

.phytopedia-daily-fact::before {
    display: none;
}

.phytopedia-daily-fact h4 {
    display: inline-block;
    font-size: 1.125rem !important;
    margin: 0 12px 0 0 !important;
    color: var(--text-primary) !important;
    vertical-align: middle;
}

.fact-icon {
    display: inline-block;
    font-size: 1.5rem !important;
    margin: 0 !important;
    vertical-align: middle;
}

.fact-text {
    color: var(--text-secondary) !important;
    font-size: 0.9375rem !important;
    margin-top: 8px !important;
    line-height: 1.6 !important;
}

/* Compact Categories List - 2 Column Grid */
.sidebar-widget-categories .categories-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    padding: 0;
    list-style: none;
}

.sidebar-widget-categories .category-item {
    margin: 0 !important;
}

.sidebar-widget-categories .category-link {
    display: block;
    padding: 8px 12px;
    background: #F8F9FA;
    border-radius: 6px;
    color: var(--text-primary);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s;
    text-align: center;
}

.sidebar-widget-categories .category-link:hover {
    background: var(--phytopedia-primary);
    color: white;
    transform: translateY(-1px);
}

/* Remove background from left sidebar */
.phytopedia-sidebar {
    background: transparent !important;
    padding: 0 !important;
}

.sidebar-widget {
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
    margin-bottom: 24px !important;
}

.sidebar-widget-title {
    font-size: 1.125rem !important;
    margin-bottom: 12px !important;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--phytopedia-primary);
    color: var(--text-primary) !important;
}

/* Compact Article Meta Section */
.article-meta-section {
    background: #F8F9FA;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 24px;
}

.article-meta-section h1 {
    font-size: 2rem !important;
    margin: 0 0 16px 0 !important;
    line-height: 1.3 !important;
}

.article-meta-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 12px;
    margin-top: 12px;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.meta-item svg,
.meta-item i {
    font-size: 1rem;
    color: var(--phytopedia-primary);
}

/* Compact Category Badge */
.article-category-badge {
    display: inline-block;
    padding: 6px 12px !important;
    background: var(--phytopedia-primary);
    color: white !important;
    border-radius: 6px;
    font-size: 0.8125rem !important;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-decoration: none;
    margin-bottom: 12px;
}

/* Compact Articles Grid */
.phytopedia-articles-grid {
    gap: 20px !important;
}

.phytopedia-article-card {
    padding: 20px !important;
    border: 1px solid #E8EAED !important;
    box-shadow: none !important;
}

.phytopedia-article-card:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.08) !important;
    border-color: var(--phytopedia-primary) !important;
}

.phytopedia-article-card .article-category {
    padding: 4px 10px !important;
    font-size: 0.75rem !important;
    margin-bottom: 12px !important;
}

.phytopedia-article-card h3 {
    font-size: 1.125rem !important;
    margin-bottom: 8px !important;
    line-height: 1.4 !important;
}

.phytopedia-article-card .article-excerpt {
    font-size: 0.875rem !important;
    line-height: 1.6 !important;
    margin-bottom: 12px !important;
}

.phytopedia-article-card .article-meta {
    font-size: 0.8125rem !important;
    gap: 12px !important;
}

/* Print Button Styling */
.print-button {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: #F8F9FA;
    border: 1px solid #E8EAED;
    border-radius: 6px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s;
    cursor: pointer;
}

.print-button:hover {
    background: var(--phytopedia-primary);
    border-color: var(--phytopedia-primary);
    color: white;
}

/* Daily Fact Category Link Fix */
.phytopedia-daily-fact a,
.phytopedia-daily-fact .fact-category {
    color: var(--phytopedia-primary) !important;
    font-weight: 600 !important;
    text-decoration: none !important;
}

.phytopedia-daily-fact a:hover {
    text-decoration: underline !important;
}

/* Article Card Improvements (v2.2.3) */
.phytopedia-article-card .article-category {
    background: transparent !important;
    color: var(--text-primary) !important;
    font-weight: 600 !important;
    text-transform: none !important;
    padding: 0 !important;
    display: inline !important;
    margin: 0 !important;
}

.phytopedia-article-card h3 {
    font-size: 1.25rem !important;
    margin: 8px 0 !important;
}

.phytopedia-article-card .article-excerpt {
    color: #4A5568 !important;
    font-size: 0.9375rem !important;
}

.phytopedia-article-card .article-tags,
.phytopedia-article-card .tags-list {
    display: none !important;
}

.phytopedia-article-card {
    padding: 16px !important;
}

.phytopedia-article-card .read-more-btn,
.phytopedia-article-card .phytopedia-button {
    color: white !important;
}

/* Category Page Title */
.phytopedia-category-header {
    margin-bottom: 24px;
}

.phytopedia-category-title {
    font-size: 2rem !important;
    font-weight: 700 !important;
    margin: 0 0 8px 0 !important;
    color: var(--text-primary) !important;
}

/* Sidebar Categories Compact */
.sidebar-widget-categories .category-item {
    padding: 6px 0 !important;
}

.sidebar-widget-categories .category-link {
    padding: 6px 12px !important;
}

/* Article Page Meta Section Improvements */
.article-meta-section {
    background: transparent !important;
    padding: 0 0 16px 0 !important;
    border-bottom: 1px solid #E8EAED !important;
}

.article-meta-section .article-category-badge {
    background: transparent !important;
    color: var(--phytopedia-primary) !important;
    font-weight: 700 !important;
    padding: 0 !important;
    display: inline !important;
    text-transform: none !important;
}

.article-meta-inline {
    display: flex !important;
    align-items: center !important;
    gap: 16px !important;
    flex-wrap: wrap !important;
    margin-top: 12px !important;
}

.article-meta-inline .meta-item {
    margin: 0 !important;
}

.print-button {
    padding: 6px 12px !important;
    font-size: 0.875rem !important;
}

/* Print Styles for Branding */
@media print {
    .phytopedia-sidebar,
    .sidebar-widget,
    .phytopedia-breadcrumbs .breadcrumb-home,
    .print-button,
    .related-articles {
        display: none !important;
    }

    body::before {
        content: "Powered by Phytopedia.co";
        display: block;
        text-align: center;
        font-size: 10px;
        color: #999;
        padding: 10px 0;
        border-bottom: 1px solid #ddd;
    }

    .phytopedia-article-content {
        width: 100% !important;
        max-width: 100% !important;
    }

    .article-category-badge {
        color: #000 !important;
        background: #f0f0f0 !important;
        padding: 4px 8px !important;
    }

    h1, h2, h3, h4, h5, h6 {
        page-break-after: avoid;
    }

    p, li {
        orphans: 3;
        widows: 3;
    }
}

/* Additional refinements v2.2.4 */

/* Reduce article card content padding by 50% */
.phytopedia-article-card .article-content {
    padding-top: 8px !important;
    padding-bottom: 8px !important;
}

/* Reduce h3 anchor font size to 1.1rem */
.entry-content :where(h3) a,
.phytopedia-article-card h3 a {
    font-size: 1.1rem !important;
    font-size: 28px !important;
}

/* Category page header with title and description */
.phytopedia-category-header {
    margin-bottom: 32px !important;
    padding-bottom: 24px !important;
    border-bottom: 2px solid var(--phytopedia-primary) !important;
}

.phytopedia-category-title {
    font-size: 2rem !important;
    font-weight: 700 !important;
    margin: 0 0 12px 0 !important;
    color: var(--text-primary) !important;
}

.phytopedia-category-description {
    font-size: 1.125rem !important;
    color: var(--text-secondary) !important;
    line-height: 1.6 !important;
    margin: 0 !important;
}

/* Article page title reduced to 26px */
.phytopedia-article-detail h1,
.article-header h1,
.single-article h1 {
    font-size: 26px !important;
    line-height: 1.3 !important;
}

/* Article meta section - inline layout */
.article-meta-section {
    display: flex !important;
    flex-direction: column !important;
    gap: 12px !important;
}

.article-meta-row {
    display: flex !important;
    align-items: center !important;
    gap: 16px !important;
    flex-wrap: wrap !important;
}

.article-category-badge {
    background: transparent !important;
    color: var(--phytopedia-primary) !important;
    font-weight: 700 !important;
    font-size: 0.9375rem !important;
    padding: 0 !important;
}

.article-meta-items {
    display: flex !important;
    align-items: center !important;
    gap: 16px !important;
    flex-wrap: wrap !important;
}

/* Print button - inline and subtle */
.print-button,
.phytopedia-print-button {
    background: transparent !important;
    border: 1px solid #E8EAED !important;
    color: var(--text-secondary) !important;
    padding: 4px 10px !important;
    font-size: 0.875rem !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 4px !important;
}

.print-button:hover,
.phytopedia-print-button:hover {
    background: #F8F9FA !important;
    color: var(--phytopedia-primary) !important;
    border-color: var(--phytopedia-primary) !important;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .sidebar-widget-categories .categories-list {
        grid-template-columns: 1fr;
    }

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

    .article-meta-section h1 {
        font-size: 1.5rem !important;
    }

    .phytopedia-category-title {
        font-size: 1.5rem !important;
    }

    .phytopedia-category-description {
        font-size: 1rem !important;
    }

    .article-meta-row {
        flex-direction: column !important;
        align-items: flex-start !important;
    }
}

/* ============================================
   PHYTOPEDIA v2.6.1 - ARTICLE LAYOUT FIXES
   ============================================ */

/* Article Layout - Content-First Design */
.phytopedia-article-layout {
    display: flex;
    gap: 30px;
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

/* Main content takes up most space */
.phytopedia-article-single {
    flex: 1;
    max-width: 100%;
    min-width: 0; /* Prevents flex item from overflowing */
}

/* Right sidebar is narrower */
.phytopedia-article-layout.has-right-sidebar .phytopedia-article-single {
    flex: 1 1 65%;
}

.phytopedia-sidebar-right {
    flex: 0 0 320px;
    position: sticky;
    top: 20px;
    align-self: flex-start;
    max-height: calc(100vh - 40px);
    overflow-y: auto;
}

/* Daily Fact Widget - Legacy gradient removed, using new clean design below */

.sidebar-widget-fact .fact-text {
    color: var(--text-primary) !important;
    font-size: 15px !important;
    line-height: 1.6 !important;
    margin: 0 !important;
}

.sidebar-widget-fact .fact-category {
    color: #999 !important;
    margin-top: 12px !important;
    font-size: 13px !important;
}

/* Categories Widget */
.sidebar-widget {
    background: #ffffff;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    border: 1px solid #E8EAED;
}

.sidebar-widget .widget-title {
    font-size: 16px;
    font-weight: 600;
    color: #212121;
    margin: 0 0 16px 0;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--phytopedia-primary);
}

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

.category-item {
    margin-bottom: 8px;
}

.category-item a {
    display: block;
    padding: 10px 12px;
    color: #424242;
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.2s ease;
    font-size: 14px;
}

.category-item a:hover {
    background: #F5F5F5;
    color: var(--phytopedia-primary);
    padding-left: 18px;
}

.category-item.active a {
    background: var(--phytopedia-primary);
    color: #ffffff;
    font-weight: 600;
}

/* Modal Fixes */
.phytopedia-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 999999;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.phytopedia-modal[style*="display: block"] {
    opacity: 1;
}

.phytopedia-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
    cursor: pointer;
}

.phytopedia-modal-content {
    position: relative;
    max-width: 900px;
    max-height: 90vh;
    margin: 5vh auto;
    background: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
}

.phytopedia-modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 40px;
    height: 40px;
    background: rgba(0,0,0,0.5);
    color: #ffffff;
    border: none;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    z-index: 10;
    transition: background 0.2s ease;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.phytopedia-modal-close:hover {
    background: rgba(0,0,0,0.8);
}

.phytopedia-modal-body {
    padding: 20px;
    max-height: calc(90vh - 40px);
    overflow-y: auto;
}

body.phytopedia-modal-open {
    overflow: hidden;
}

/* Mobile Responsive */
@media (max-width: 968px) {
    .phytopedia-article-layout {
        flex-direction: column;
    }
    
    .phytopedia-article-layout.has-right-sidebar .phytopedia-article-single {
        flex: 1 1 100%;
    }
    
    .phytopedia-sidebar-right {
        flex: 1 1 100%;
        position: static;
        max-height: none;
        order: 2; /* Sidebar AFTER content on mobile */
    }
    
    .phytopedia-article-single {
        order: 1; /* Content FIRST on mobile */
    }
}

@media (max-width: 640px) {
    .phytopedia-article-layout {
        padding: 12px;
        gap: 20px;
    }
    
    .sidebar-widget-fact {
        padding: 16px;
    }
    
    .phytopedia-modal-content {
        margin: 0;
        max-width: 100%;
        max-height: 100vh;
        border-radius: 0;
    }
}

/* Article Content Spacing */
.phytopedia-article-single .article-content {
    font-size: 17px;
    line-height: 1.7;
    color: #212121;
}

.phytopedia-article-single .article-content p {
    margin-bottom: 20px;
}

.phytopedia-article-single .article-content h2,
.phytopedia-article-single .article-content h3 {
    margin-top: 32px;
    margin-bottom: 16px;
}

/* Print Button Styling */
.article-actions button {
    background: var(--phytopedia-primary);
    color: #ffffff;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.article-actions button:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(76,175,80,0.3);
}


/* ============================================
   PHYTOPEDIA v2.6.3 - HEADER & ADMIN FIXES
   ============================================ */

/* Frontend Hub Header - Ensure visibility */
.phytopedia-hub-header {
    margin-bottom: 40px;
}

.hub-hero {
    text-align: center;
    padding: 40px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 16px;
    margin-bottom: 30px;
    color: #ffffff;
}

.hub-hero h1 {
    font-size: 48px;
    font-weight: 700;
    margin: 0 0 16px 0;
    color: #ffffff !important;
}

.hub-hero .hero-subtext {
    font-size: 20px;
    color: rgba(255,255,255,0.9);
    margin: 0;
}

/* Calculator Placeholder Card */
.hub-calculator-section {
    margin-bottom: 30px;
}

.calculator-placeholder {
    background: #ffffff;
    border: 2px dashed #E0E0E0;
    border-radius: 12px;
    padding: 40px;
    text-align: center;
    transition: all 0.3s ease;
}

.calculator-placeholder:hover {
    border-color: var(--phytopedia-primary);
    box-shadow: 0 4px 12px rgba(76,175,80,0.1);
}

.calculator-icon {
    font-size: 64px;
    margin-bottom: 16px;
}

.calculator-placeholder h3 {
    font-size: 24px;
    margin: 0 0 12px 0;
    color: #212121;
}

.calculator-placeholder p {
    color: #757575;
    margin: 8px 0;
    font-size: 16px;
}

.coming-soon-text {
    font-size: 14px !important;
    color: #9E9E9E !important;
    margin-top: 16px !important;
}

/* Hub Search Section */
.hub-search-section {
    margin-bottom: 30px;
}

/* Admin Settings Page Fixes */
.phytopedia-admin {
    max-width: 1400px;
}

/* Fix header layout in admin - prevent flex conflicts */
.phytopedia-admin > div[style*="display: flex"] {
    display: flex !important;
    flex-wrap: wrap;
    gap: 16px;
}

/* Ensure h1 doesn't break */
.phytopedia-admin h1 {
    flex-shrink: 0;
}

/* Make sure notices don't break layout */
.phytopedia-admin .notice {
    display: block !important;
    width: 100%;
    margin: 16px 0;
}

/* Tab buttons horizontal layout */
.phytopedia-admin-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 24px;
    border-bottom: 2px solid #E0E0E0;
    padding-bottom: 0;
}

.phytopedia-admin-tabs .tab-button {
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    padding: 12px 20px;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #757575;
}

.phytopedia-admin-tabs .tab-button:hover {
    color: var(--phytopedia-primary);
    background: rgba(76,175,80,0.05);
}

.phytopedia-admin-tabs .tab-button.active {
    color: var(--phytopedia-primary);
    border-bottom-color: var(--phytopedia-primary);
    font-weight: 600;
}

/* Tab content */
.tab-content {
    display: none;
    padding: 24px;
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.tab-content.active {
    display: block;
}

/* Mobile responsive for admin */
@media (max-width: 782px) {
    .phytopedia-admin > div[style*="display: flex"] {
        flex-direction: column;
    }

    .phytopedia-admin h1 {
        font-size: 24px;
    }

    .phytopedia-admin-tabs {
        overflow-x: auto;
        flex-wrap: nowrap;
    }

    .phytopedia-admin-tabs .tab-button {
        white-space: nowrap;
    }
}

/* ============================================
   PHYTOPEDIA v2.6.4 - COMPREHENSIVE UI FIXES
   ============================================ */

/* Frontend Hub - Ensure all sections are visible */
.phytopedia-hub-content {
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

.hub-section {
    display: block !important;
    margin-bottom: 48px;
    opacity: 1 !important;
    visibility: visible !important;
}

.hub-section .section-title {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 24px;
    color: #212121;
    text-align: center;
}

/* Error notices */
.phytopedia-error-notice {
    background: #FFF3CD;
    border: 1px solid #FFEB3B;
    border-radius: 8px;
    padding: 16px;
    margin: 20px 0;
    text-align: center;
}

.phytopedia-error-notice p {
    color: #856404;
    margin: 0;
    font-size: 15px;
}

/* Modern Card-Based Category Grid - Inspired by LogiGuard Dashboard */
.phytopedia-categories {
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
}

.phytopedia-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    padding: 0;
}

.phytopedia-category-card {
    background: #ffffff;
    border: 1px solid #E8EAED;
    border-radius: 12px;
    padding: 24px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    height: 100%;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

.phytopedia-category-card:hover {
    border-color: var(--phytopedia-primary);
    box-shadow: 0 4px 16px rgba(76,175,80,0.12);
    transform: translateY(-4px);
}

.phytopedia-category-card .category-icon {
    font-size: 48px;
    margin-bottom: 16px;
    line-height: 1;
}

.phytopedia-category-card h3 {
    font-size: 20px;
    font-weight: 600;
    margin: 0 0 12px 0;
    color: #212121;
    line-height: 1.3;
}

.phytopedia-category-card p {
    font-size: 14px;
    color: #757575;
    margin-bottom: 16px;
    flex-grow: 1;
    line-height: 1.5;
}

.phytopedia-category-card .category-meta {
    font-size: 13px;
    color: #9E9E9E;
    margin-bottom: 16px;
    font-weight: 500;
}

.phytopedia-category-card .phytopedia-button {
    background: var(--phytopedia-primary);
    color: #ffffff;
    text-align: center;
    padding: 12px 20px;
    border-radius: 8px;
    text-decoration: none;
    font-size: 15px;
    font-weight: 600;
    transition: all 0.2s ease;
    display: inline-block;
    border: none;
    cursor: pointer;
}

.phytopedia-category-card .phytopedia-button:hover {
    background: #388E3C;
    transform: scale(1.02);
    box-shadow: 0 4px 12px rgba(76,175,80,0.3);
}

/* Daily Fact Card - Legacy styles removed, using new clean design below */

/* Hub Footer */
.phytopedia-hub-footer {
    text-align: center;
    padding: 32px 20px;
    border-top: 1px solid #E8EAED;
    margin-top: 48px;
}

.hub-footer-text {
    color: #757575;
    font-size: 14px;
    margin: 0;
}

.hub-footer-text a {
    color: var(--phytopedia-primary);
    text-decoration: none;
    font-weight: 600;
}

.hub-footer-text a:hover {
    text-decoration: underline;
}

/* Stats Cards - LogiGuard-style metrics */
.phytopedia-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.stat-card {
    background: #ffffff;
    border: 1px solid #E8EAED;
    border-radius: 12px;
    padding: 24px;
    transition: all 0.3s ease;
}

.stat-card:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
}

.stat-card-icon {
    font-size: 36px;
    margin-bottom: 12px;
}

.stat-card-value {
    font-size: 32px;
    font-weight: 700;
    color: #212121;
    margin: 0;
    line-height: 1;
}

.stat-card-label {
    font-size: 14px;
    color: #757575;
    margin: 8px 0 0 0;
}

/* Backend Admin - Fix WordPress notifications stacking */
.wp-core-ui .notice {
    display: inline-block !important;
    margin: 5px 15px 2px 2px !important;
    vertical-align: top !important;
    width: auto !important;
    max-width: none !important;
}

.wrap {
    display: block !important;
}

.wrap > * {
    display: block;
}

/* Ensure Phytopedia admin header displays correctly */
#wpbody-content > .wrap > div[style*="display: flex"] {
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    gap: 12px !important;
}

#wpbody-content > .wrap > div[style*="display: flex"] > h1 {
    flex-shrink: 0 !important;
    margin-right: 12px !important;
}

#wpbody-content > .wrap > div[style*="display: flex"] > .notice {
    display: inline-flex !important;
    align-items: center !important;
    margin: 0 !important;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .phytopedia-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .hub-hero h1 {
        font-size: 32px;
    }

    .hub-hero .hero-subtext {
        font-size: 16px;
    }

    .phytopedia-stats {
        grid-template-columns: 1fr;
    }

    .hub-section .section-title {
        font-size: 24px;
    }

    .phytopedia-daily-fact {
        padding: 24px;
    }

    .phytopedia-daily-fact h4 {
        font-size: 22px;
    }

    .phytopedia-daily-fact .fact-text {
        font-size: 16px !important;
    }
}

/* ============================================
   PHYTOPEDIA v2.7.0 - UI/UX IMPROVEMENTS
   ============================================ */

/* 1. Hide "Skip to main content" (accessibility feature - only show on keyboard focus) */
.skip-to-content {
    position: absolute;
    left: -9999px;
    top: 0;
    z-index: 999;
    padding: 10px 15px;
    background: var(--phytopedia-primary);
    color: #ffffff;
    text-decoration: none;
    border-radius: 0 0 4px 0;
}

.skip-to-content:focus {
    left: 0;
}

/* 2. Fix "Share this article" spacing */
.article-tags-section {
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid #E8EAED;
}

.tags-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.tags-list .tag {
    background: #F5F5F5;
    color: #757575;
    padding: 6px 14px;
    border-radius: 16px;
    text-decoration: none;
    font-size: 13px;
    transition: all 0.2s ease;
}

.tags-list .tag:hover {
    background: var(--phytopedia-primary);
    color: #ffffff;
}

/* 3. Optimize main hub layout - smaller search and Did You Know */
.hub-hero {
    padding: 32px 20px; /* Reduced from 40px */
}

.hub-hero h1 {
    font-size: 42px; /* Reduced from 48px */
    margin-bottom: 12px;
}

.hub-hero .hero-subtext {
    font-size: 18px; /* Reduced from 20px */
}

.hub-search-section {
    max-width: 700px; /* Constrain width */
    margin: 0 auto 30px auto;
}

.phytopedia-daily-fact {
    background: #F8F9FA !important;
    border: 1px solid #E8EAED !important;
    border-left: 4px solid var(--phytopedia-primary) !important;
    border-radius: 12px !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1) !important;
    color: var(--text-primary) !important;
    max-width: 700px !important;
    padding: 24px 28px !important;
    margin: 0 auto 32px auto !important;
}

.phytopedia-daily-fact h4 {
    font-size: 24px !important;
    color: var(--text-primary) !important;
    margin: 0 0 12px 0 !important;
}

.phytopedia-daily-fact .fact-text {
    font-size: 16px !important;
    color: var(--text-primary) !important;
    margin: 0 0 8px 0 !important;
}

.phytopedia-daily-fact .fact-icon {
    font-size: 48px !important;
    margin-bottom: 12px !important;
    display: block;
}

.phytopedia-daily-fact .fact-category {
    font-size: 13px !important;
    color: #999 !important;
}

/* 4. Fix sidebar "Did You Know" - white background with colored title */
.sidebar-widget-fact {
    background: #ffffff !important;
    border: 1px solid #E8EAED !important;
    border-radius: 12px !important;
    padding: 20px !important;
    margin-bottom: 24px !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1) !important;
}

.sidebar-widget-fact .widget-title {
    color: var(--phytopedia-primary) !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    margin: 0 0 12px 0 !important;
    border-bottom: none !important;
}

.sidebar-widget-fact .fact-text {
    color: #000000 !important;
    font-size: 14px !important;
    line-height: 1.6 !important;
    margin: 0 !important;
}

.sidebar-widget-fact .daily-fact-content p {
    color: #000000 !important; /* Black text for all paragraphs */
    line-height: 1.7;
    margin: 0 0 12px 0;
}

.sidebar-widget-fact .fact-category small {
    color: #6c757d !important; /* Gray for category text */
}

/* Sidebar Dosage Calculator Button */
.sidebar-calculator-widget {
    margin-bottom: 24px;
}

.sidebar-calculator-button {
    display: flex;
    align-items: center;
    gap: 12px;
    background: linear-gradient(135deg, var(--phytopedia-primary) 0%, var(--phytopedia-secondary) 100%);
    color: #ffffff;
    padding: 16px;
    border-radius: 12px;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(124, 58, 237, 0.2);
}

.sidebar-calculator-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(124, 58, 237, 0.3);
    color: #ffffff;
}

.sidebar-calculator-button .calculator-icon {
    font-size: 28px;
    line-height: 1;
}

.sidebar-calculator-button .calculator-text {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.sidebar-calculator-button .calculator-text strong {
    font-size: 14px;
    font-weight: 600;
    color: #ffffff;
}

.sidebar-calculator-button .calculator-text span {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.3;
}

/* 5. Reduce categories list spacing in sidebar */
.category-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.category-item {
    margin-bottom: 8px; /* Reduced from default ~16px */
}

.category-item:last-child {
    margin-bottom: 0;
}

.category-item a {
    display: block;
    padding: 8px 12px;
    color: #424242;
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.2s ease;
    font-size: 14px;
}

.category-item a:hover,
.category-item.active a {
    background: #F5F5F5;
    color: var(--phytopedia-primary);
}

/* 6. Fix article metadata layout - left-align with Print button on right */
.article-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 1px solid #E8EAED;
}

.article-meta-left {
    display: flex;
    flex-direction: column;
    gap: 8px;
    text-align: left;
}

.article-meta-right {
    margin-left: auto;
}

.article-category-badge {
    display: inline-block;
    background: var(--phytopedia-primary);
    color: #ffffff;
    padding: 6px 14px;
    border-radius: 16px;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
}

.article-meta-info {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    font-size: 14px;
    color: #757575;
}

.article-meta-info span {
    display: flex;
    align-items: center;
    gap: 6px;
}

.article-actions {
    display: flex;
    gap: 12px;
}

.article-actions button,
.article-actions .print-button {
    background: transparent;
    border: 2px solid var(--phytopedia-primary);
    color: var(--phytopedia-primary);
    padding: 8px 20px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.article-actions button:hover,
.article-actions .print-button:hover {
    background: var(--phytopedia-primary);
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(76, 175, 80, 0.2);
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .article-meta {
        flex-direction: column;
        align-items: flex-start;
    }

    .article-meta-right {
        margin-left: 0;
        width: 100%;
    }

    .hub-hero h1 {
        font-size: 32px;
    }
}

/* ============================================
   DOSAGE CALCULATOR BUTTON & PAGE
   ============================================ */

/* Calculator button in hero */
.hub-hero-actions {
    margin-top: 24px;
    display: flex;
    justify-content: center;
}

.calculator-button {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    background: rgba(255,255,255,0.95);
    padding: 20px 32px;
    border-radius: 12px;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    min-width: 280px;
}

.calculator-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.2);
    background: rgba(255,255,255,1);
}

.calculator-button .button-icon {
    font-size: 48px;
    margin-bottom: 12px;
}

.calculator-button .button-text {
    font-size: 20px;
    font-weight: 700;
    color: #212121;
    margin-bottom: 4px;
}

.calculator-button .button-subtext {
    font-size: 14px;
    color: #757575;
}

/* Calculator page */
.phytopedia-calculator-wrapper {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
}

.calculator-breadcrumb {
    margin-bottom: 24px;
}

.calculator-breadcrumb a {
    color: var(--phytopedia-primary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.calculator-breadcrumb a:hover {
    text-decoration: underline;
}

.calculator-header {
    text-align: center;
    margin-bottom: 40px;
}

.calculator-header h1 {
    font-size: 42px;
    margin-bottom: 16px;
    color: #212121;
}

.calculator-description {
    font-size: 18px;
    color: #757575;
    max-width: 600px;
    margin: 0 auto;
}

.calculator-content {
    background: #ffffff;
    border-radius: 12px;
    padding: 40px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.calculator-coming-soon {
    text-align: center;
}

.coming-soon-icon {
    font-size: 80px;
    margin-bottom: 24px;
}

.calculator-coming-soon h2 {
    font-size: 32px;
    color: #212121;
    margin-bottom: 16px;
}

.calculator-coming-soon p {
    font-size: 16px;
    color: #757575;
    margin-bottom: 16px;
    line-height: 1.6;
}

.calculator-coming-soon ul {
    text-align: left;
    max-width: 500px;
    margin: 24px auto;
    list-style: none;
    padding: 0;
}

.calculator-coming-soon ul li {
    padding: 12px 16px;
    margin-bottom: 8px;
    background: #F5F5F5;
    border-radius: 8px;
    font-size: 15px;
    color: #424242;
}

.calculator-coming-soon strong {
    color: #212121;
}

@media (max-width: 768px) {
    .calculator-button {
        min-width: 240px;
        padding: 16px 24px;
    }

    .calculator-header h1 {
        font-size: 32px;
    }

    .calculator-content {
        padding: 24px;
    }

    .coming-soon-icon {
        font-size: 60px;
    }
}


/* ============================================
   UNIVERSAL FOOTER
   ============================================ */

.phytopedia-footer {
    margin-top: 48px;
    padding: 24px 0;
    border-top: 1px solid #E8EAED;
    text-align: center;
}

.phytopedia-footer .footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.phytopedia-footer p {
    margin: 0;
    font-size: 14px;
    color: #6c757d;
    line-height: 1.6;
}

@media (max-width: 768px) {
    .phytopedia-footer {
        margin-top: 32px;
        padding: 20px 0;
    }

    .phytopedia-footer p {
        font-size: 13px;
    }
}

/* ============================================
   v2.7.2 UPDATES - Hub Redesign & Fixes
   ============================================ */

/* Homepage Hero - 3-Column Grid Layout */
.hub-actions-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin: 32px 0;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

@media (max-width: 968px) {
    .hub-actions-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

.hub-grid-item {
    background: #ffffff;
    border: 1px solid #E8EAED;
    border-radius: 12px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    min-height: 200px;
    transition: all 0.3s ease;
}

.hub-grid-item:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.hub-grid-item .grid-item-title {
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 16px 0;
    color: var(--phytopedia-primary);
    border-bottom: 2px solid #E8EAED;
    padding-bottom: 12px;
}

.hub-grid-item .grid-item-content {
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* Search Grid Item */
.hub-grid-search .phytopedia-search {
    margin: 0;
}

.hub-grid-search .search-form {
    display: flex;
    gap: 8px;
}

.hub-grid-search input[type="search"] {
    flex: 1;
    padding: 12px;
    border: 1px solid #E8EAED;
    border-radius: 8px;
    font-size: 14px;
}

.hub-grid-search button {
    padding: 12px 20px;
    background: var(--phytopedia-primary);
    color: #ffffff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.hub-grid-search button:hover {
    background: var(--phytopedia-secondary);
}

/* Did You Know Grid Item */
.hub-grid-fact .phytopedia-daily-fact {
    background: transparent !important;
    padding: 0 !important;
    margin: 0 !important;
    border: none !important;
    box-shadow: none !important;
}

.hub-grid-fact .fact-text {
    color: #000000 !important;
    font-size: 15px !important;
    line-height: 1.6;
}

.hub-grid-fact .fact-category {
    margin-top: 12px;
}

.hub-grid-fact .fact-category small {
    color: #6c757d !important;
    font-size: 13px;
}

/* Calculator Grid Item */
.hub-grid-calculator .calculator-description {
    color: #424242;
    font-size: 14px;
    line-height: 1.6;
    margin: 0 0 16px 0;
    flex: 1;
}

.hub-grid-calculator .hub-calculator-button {
    display: inline-block;
    padding: 12px 24px;
    background: linear-gradient(135deg, var(--phytopedia-primary) 0%, var(--phytopedia-secondary) 100%);
    color: #ffffff;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    text-align: center;
    transition: all 0.3s ease;
}

.hub-grid-calculator .hub-calculator-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(124, 58, 237, 0.3);
    color: #ffffff;
}

/* Remove gray sidebar scrollbar */
.phytopedia-sidebar::-webkit-scrollbar {
    display: none;
}

.phytopedia-sidebar {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* Ensure breadcrumbs are visible (override theme CSS) */
.phytopedia-breadcrumbs {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    margin-bottom: 20px !important;
}

/* Ensure footer is visible (override theme CSS) */
.phytopedia-footer {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* Footer updates with FDA disclaimer */
.phytopedia-footer .footer-copyright {
    margin: 0 0 12px 0;
    font-size: 14px;
    color: #424242;
}

.phytopedia-footer .footer-copyright a {
    color: var(--phytopedia-primary);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.phytopedia-footer .footer-copyright a:hover {
    color: var(--phytopedia-secondary);
    text-decoration: underline;
}

.phytopedia-footer .footer-disclaimer {
    margin: 0;
    font-size: 12.6px; /* 10% smaller than 14px */
    color: #6c757d;
    line-height: 1.5;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.phytopedia-footer .footer-disclaimer strong {
    color: #424242;
    font-weight: 600;
}

/* Override theme styles for Share This Article (if possible) */
.phytopedia-single-article-wrapper + div[class*="share"],
.phytopedia-single-article-wrapper + div[class*="social"] {
    margin-top: 24px;
}

.phytopedia-single-article-wrapper + div[class*="share"] a,
.phytopedia-single-article-wrapper + div[class*="social"] a {
    margin-right: 12px !important;
}

/* ============================================
   v2.7.3 UPDATES - Category Pages & Search
   ============================================ */

/* Force breadcrumbs and footer visibility on category pages */
.phytopedia-category-view .phytopedia-breadcrumbs,
.phytopedia-category-view + .phytopedia-footer {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.phytopedia-category-view {
    min-height: 400px;
}

/* Ensure category view wrapper shows footer */
.phytopedia-category-view .phytopedia-footer {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    margin-top: 48px;
}

/* Search Results Page */
.phytopedia-search-results-page {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.search-results-header {
    text-align: center;
    margin: 32px 0;
}

.search-results-header h1 {
    font-size: 32px;
    font-weight: 700;
    margin: 0 0 12px 0;
    color: var(--text-primary);
}

.search-results-header .results-count {
    font-size: 16px;
    color: #6c757d;
    margin: 0;
}

.search-results-box {
    max-width: 700px;
    margin: 0 auto 40px auto;
}

.search-results-box form {
    display: flex;
    gap: 12px;
}

.search-results-box .search-input {
    flex: 1;
    padding: 14px 18px;
    border: 2px solid #E8EAED;
    border-radius: 8px;
    font-size: 15px;
    transition: all 0.3s ease;
}

.search-results-box .search-input:focus {
    outline: none;
    border-color: var(--phytopedia-primary);
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.1);
}

.search-results-box .search-button {
    padding: 14px 24px;
    background: var(--phytopedia-primary);
    color: #ffffff;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.search-results-box .search-button:hover {
    background: var(--phytopedia-secondary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(124, 58, 237, 0.3);
}

/* Hub Search Form (in grid) */
.hub-search-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
    flex: 1;
}

.hub-search-input {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid #E8EAED;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s ease;
}

.hub-search-input:focus {
    outline: none;
    border-color: var(--phytopedia-primary);
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.1);
}

.hub-search-button {
    padding: 12px 20px;
    background: var(--phytopedia-primary);
    color: #ffffff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.hub-search-button:hover {
    background: var(--phytopedia-secondary);
}

/* Override old search styles */
.hub-grid-search .phytopedia-search,
.hub-grid-search .search-form,
.hub-grid-search input[type="search"],
.hub-grid-search .phytopedia-search-box {
    all: unset;
}

/* ============================================
   v2.7.4 UPDATES - Aggressive Category Page Fixes
   ============================================ */

/* Force category page wrapper to be visible */
.phytopedia-category-view {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    min-height: 500px !important;
}

/* Force all children to be visible */
.phytopedia-category-view * {
    visibility: visible !important;
    opacity: 1 !important;
}

/* Specifically target breadcrumbs inside category view */
.phytopedia-category-view .phytopedia-breadcrumbs {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    padding: 16px 0 !important;
    font-size: 14px !important;
    color: #6c757d !important;
    margin-bottom: 24px !important;
    visibility: visible !important;
    opacity: 1 !important;
    z-index: 100 !important;
    position: relative !important;
}

/* Specifically target footer inside category view */
.phytopedia-category-view .phytopedia-footer {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    margin-top: 48px !important;
    padding: 24px 0 !important;
    border-top: 1px solid #E8EAED !important;
    text-align: center !important;
    z-index: 100 !important;
    position: relative !important;
}

.phytopedia-category-view .phytopedia-footer * {
    visibility: visible !important;
    opacity: 1 !important;
    display: block !important;
}

.phytopedia-category-view .phytopedia-footer p {
    display: block !important;
    margin: 8px 0 !important;
}

.phytopedia-category-view .phytopedia-footer a {
    display: inline !important;
    color: var(--phytopedia-primary) !important;
}

/* Override any theme hiding */
body .phytopedia-category-view,
body .phytopedia-category-view .phytopedia-breadcrumbs,
body .phytopedia-category-view .phytopedia-footer {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* Debug and ensure proper height */
.phytopedia-category-view {
    background: #ffffff !important;
    padding: 20px !important;
    margin-bottom: 40px !important;
}

/* Make sure back button is visible */
.phytopedia-back-button {
    margin: 20px 0 !important;
    display: block !important;
    visibility: visible !important;
}

.phytopedia-back-button a {
    display: inline-block !important;
    padding: 10px 20px !important;
    background: var(--phytopedia-primary) !important;
    color: #ffffff !important;
    text-decoration: none !important;
    border-radius: 6px !important;
}

/* Category title and description */
.phytopedia-category-title {
    font-size: 32px !important;
    font-weight: 700 !important;
    margin: 20px 0 12px 0 !important;
    display: block !important;
}

.phytopedia-category-description {
    font-size: 16px !important;
    color: #6c757d !important;
    margin-bottom: 32px !important;
    display: block !important;
}

/* ============================================
   v2.7.5 UPDATES - Theme Override for Entry Content
   ============================================ */

/* Override theme's entry-content wrapper that's hiding our content */
.entry-content .phytopedia-category-view,
.site-content .phytopedia-category-view,
article .phytopedia-category-view,
.clear .phytopedia-category-view {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    position: relative !important;
    height: auto !important;
    max-height: none !important;
    overflow: visible !important;
}

/* Force theme's entry-content to show our content */
.entry-content.clear {
    height: auto !important;
    min-height: 600px !important;
    overflow: visible !important;
}

/* Target the specific wrapper structure from DevTools */
.post-538 .entry-content .phytopedia-category-view,
[class*="post-"] .entry-content .phytopedia-category-view {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* Ensure breadcrumbs show in theme context */
.entry-content .phytopedia-breadcrumbs,
.site-content .phytopedia-breadcrumbs,
article .phytopedia-breadcrumbs {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    position: relative !important;
    z-index: 1000 !important;
    margin: 20px 0 !important;
    padding: 12px 0 !important;
    background: #f8f9fa !important;
    border-radius: 4px !important;
}

/* Ensure footer shows in theme context */
.entry-content .phytopedia-footer,
.site-content .phytopedia-footer,
article .phytopedia-footer {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    position: relative !important;
    z-index: 1000 !important;
    margin-top: 60px !important;
    padding: 30px 0 !important;
    background: #ffffff !important;
    border-top: 2px solid #E8EAED !important;
}

/* Make category wrapper very visible */
.phytopedia-category-view {
    background: #ffffff !important;
    padding: 30px !important;
    margin: 20px 0 !important;
    border: 2px solid #E8EAED !important;
    border-radius: 8px !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05) !important;
}

/* Override any theme max-height restrictions */
.entry-content,
.entry-content.clear,
.site-main .entry-content {
    max-height: none !important;
    height: auto !important;
}

/* ============================================
   v2.7.6 UPDATES - Isolate Phytopedia from Theme Footer
   ============================================ */

/* Create a strong isolation boundary for Phytopedia content */
.phytopedia-category-view,
.phytopedia-search-results-page,
.phytopedia-single-article-wrapper,
.phytopedia-hub-wrapper {
    isolation: isolate !important;
    contain: layout style !important;
    position: relative !important;
    z-index: 10 !important;
}

/* Hide theme footer elements that leak into content area */
.entry-content > div[class*="footer"]:not([class*="phytopedia"]),
.entry-content > footer:not([class*="phytopedia"]),
.entry-content > div[class*="widget"]:not([class*="phytopedia"]) {
    display: none !important;
}

/* Ensure phytopedia-category-view has explicit ending */
.phytopedia-category-view::after {
    content: "";
    display: block;
    clear: both;
    height: 1px;
    background: transparent;
}

/* Prevent theme footer from appearing inside phytopedia content */
.phytopedia-category-view ~ footer[class*="site-footer"],
.phytopedia-category-view ~ div[class*="footer"],
.phytopedia-search-results-page ~ footer[class*="site-footer"],
.phytopedia-search-results-page ~ div[class*="footer"] {
    margin-top: 60px !important;
}

/* Force theme elements after phytopedia to respect boundaries */
.entry-content .phytopedia-category-view + *:not(.phytopedia-footer) {
    margin-top: 40px !important;
}

/* Make sure "No articles available" message is clearly visible */
.phytopedia-category-view p,
.phytopedia-empty-state {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    font-size: 16px !important;
    color: #424242 !important;
    padding: 20px !important;
    background: #f8f9fa !important;
    border-radius: 8px !important;
    text-align: center !important;
}

/* ============================================
   v2.7.7 UPDATES - Self-Contained Isolated Component
   ============================================ */

/* Outermost isolation wrapper - prevents ALL theme interference */
.phytopedia-isolated-wrapper {
    all: initial !important;
    display: block !important;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif !important;
    font-size: 16px !important;
    line-height: 1.5 !important;
    color: #424242 !important;
    background: #ffffff !important;
    padding: 0 !important;
    margin: 0 0 40px 0 !important;
    box-sizing: border-box !important;
    width: 100% !important;
    max-width: 1200px !important;
    margin-left: auto !important;
    margin-right: auto !important;
}

/* Reset all children to inherit properly */
.phytopedia-isolated-wrapper * {
    box-sizing: border-box !important;
}

/* Internal header section */
.phytopedia-internal-header {
    background: #f8f9fa !important;
    padding: 20px !important;
    margin-bottom: 0 !important;
    border-radius: 8px 8px 0 0 !important;
    border-bottom: 2px solid #e0e0e0 !important;
}

/* Internal content section */
.phytopedia-internal-content {
    padding: 30px 20px !important;
    min-height: 300px !important;
    background: #ffffff !important;
}

/* Internal footer section */
.phytopedia-internal-footer {
    background: #f8f9fa !important;
    padding: 30px 20px !important;
    margin-top: 0 !important;
    border-radius: 0 0 8px 8px !important;
    border-top: 2px solid #e0e0e0 !important;
}

/* Breadcrumbs styling */
.phytopedia-isolated-wrapper .phytopedia-breadcrumbs {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    font-size: 14px !important;
    color: #6c757d !important;
    margin-bottom: 20px !important;
}

.phytopedia-isolated-wrapper .phytopedia-breadcrumbs a {
    color: var(--phytopedia-primary, #4CAF50) !important;
    text-decoration: none !important;
    transition: color 0.2s ease !important;
}

.phytopedia-isolated-wrapper .phytopedia-breadcrumbs a:hover {
    color: var(--phytopedia-secondary, #009688) !important;
    text-decoration: underline !important;
}

.phytopedia-isolated-wrapper .phytopedia-breadcrumbs .separator {
    color: #9e9e9e !important;
}

.phytopedia-isolated-wrapper .phytopedia-breadcrumbs .current {
    color: #424242 !important;
    font-weight: 500 !important;
}

/* Back button */
.phytopedia-isolated-wrapper .phytopedia-back-button {
    margin: 0 0 20px 0 !important;
}

.phytopedia-isolated-wrapper .phytopedia-back-button a {
    display: inline-block !important;
    padding: 10px 20px !important;
    background: var(--phytopedia-primary, #4CAF50) !important;
    color: #ffffff !important;
    text-decoration: none !important;
    border-radius: 6px !important;
    font-weight: 500 !important;
    transition: all 0.3s ease !important;
}

.phytopedia-isolated-wrapper .phytopedia-back-button a:hover {
    background: var(--phytopedia-secondary, #009688) !important;
    transform: translateX(-3px) !important;
}

/* Category title and description */
.phytopedia-isolated-wrapper .phytopedia-category-title {
    font-size: 32px !important;
    font-weight: 700 !important;
    margin: 0 0 12px 0 !important;
    color: #212121 !important;
    line-height: 1.2 !important;
}

.phytopedia-isolated-wrapper .phytopedia-category-description {
    font-size: 16px !important;
    color: #6c757d !important;
    margin: 0 0 32px 0 !important;
    line-height: 1.6 !important;
}

/* Empty state styling */
.phytopedia-isolated-wrapper .phytopedia-empty-state {
    text-align: center !important;
    padding: 60px 20px !important;
    background: #f8f9fa !important;
    border-radius: 12px !important;
    border: 2px dashed #e0e0e0 !important;
    margin: 40px 0 !important;
}

.phytopedia-isolated-wrapper .phytopedia-empty-state .empty-icon {
    font-size: 64px !important;
    margin-bottom: 20px !important;
}

.phytopedia-isolated-wrapper .phytopedia-empty-state h3 {
    font-size: 24px !important;
    font-weight: 600 !important;
    color: #424242 !important;
    margin: 0 0 12px 0 !important;
}

.phytopedia-isolated-wrapper .phytopedia-empty-state p {
    font-size: 16px !important;
    color: #6c757d !important;
    margin: 0 0 24px 0 !important;
    line-height: 1.5 !important;
}

.phytopedia-isolated-wrapper .phytopedia-empty-state a {
    display: inline-block !important;
    padding: 12px 24px !important;
    background: var(--phytopedia-primary, #4CAF50) !important;
    color: #ffffff !important;
    text-decoration: none !important;
    border-radius: 6px !important;
    font-weight: 500 !important;
    transition: all 0.3s ease !important;
}

.phytopedia-isolated-wrapper .phytopedia-empty-state a:hover {
    background: var(--phytopedia-secondary, #009688) !important;
}

/* Footer inside isolated wrapper */
.phytopedia-isolated-wrapper .phytopedia-footer {
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
    margin: 0 !important;
    text-align: center !important;
}

.phytopedia-isolated-wrapper .phytopedia-footer p {
    font-size: 14px !important;
    color: #6c757d !important;
    margin: 8px 0 !important;
    line-height: 1.5 !important;
}

.phytopedia-isolated-wrapper .phytopedia-footer a {
    color: var(--phytopedia-primary, #4CAF50) !important;
    text-decoration: none !important;
}

.phytopedia-isolated-wrapper .phytopedia-footer a:hover {
    text-decoration: underline !important;
}

/* Override ANY theme styles that might interfere */
body .phytopedia-isolated-wrapper,
html .phytopedia-isolated-wrapper,
#content .phytopedia-isolated-wrapper,
.entry-content .phytopedia-isolated-wrapper,
article .phytopedia-isolated-wrapper {
    all: initial !important;
    display: block !important;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
    width: 100% !important;
    max-width: 1200px !important;
    margin: 0 auto 40px auto !important;
}

/* Ensure nothing from theme bleeds in */
.phytopedia-isolated-wrapper::before,
.phytopedia-isolated-wrapper::after {
    content: none !important;
    display: none !important;
}

/* ============================================
   EDUCATION HUB - LEAFLY-STYLE LAYOUT
   Version: 2.8.6
   ============================================ */

/* Education Hub Wrapper */
.phytopedia-education-wrapper {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Education Layout - Flexbox with Sidebar */
.phytopedia-education-layout {
    display: flex;
    gap: 40px;
    align-items: flex-start;
}

.phytopedia-education-layout.no-sidebar {
    display: block;
}

/* Left Sidebar Navigation */
.phytopedia-education-sidebar {
    width: 220px;
    flex-shrink: 0;
    position: sticky;
    top: 100px;
}

.education-nav {
    background: #fff;
    border-radius: 8px;
    padding: 20px 0;
}

.education-nav-header {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #666;
    padding: 0 20px 12px;
    margin: 0;
    border-bottom: 1px solid #e8e8e8;
}

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

.education-nav-item {
    margin: 0;
    padding: 0;
}

.education-nav-item a {
    display: block;
    padding: 12px 20px;
    color: #333;
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    border-left: 3px solid transparent;
    transition: all 0.2s ease;
}

.education-nav-item a:hover {
    background: #f8f8f8;
    color: var(--phytopedia-primary, #4CAF50);
}

.education-nav-item.active a {
    border-left-color: var(--phytopedia-primary, #4CAF50);
    color: var(--phytopedia-primary, #4CAF50);
    background: rgba(76, 175, 80, 0.05);
    font-weight: 600;
}

/* Main Content Area */
.phytopedia-education-content {
    flex: 1;
    min-width: 0;
}

/* Breadcrumbs */
.phytopedia-education-wrapper .phytopedia-breadcrumbs {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #666;
    margin-bottom: 16px;
}

.phytopedia-education-wrapper .phytopedia-breadcrumbs a {
    color: var(--phytopedia-primary, #4CAF50);
    text-decoration: none;
}

.phytopedia-education-wrapper .phytopedia-breadcrumbs a:hover {
    text-decoration: underline;
}

.phytopedia-education-wrapper .breadcrumb-separator {
    color: #ccc;
}

.phytopedia-education-wrapper .breadcrumb-current {
    color: #333;
    font-weight: 500;
}

/* Education Header */
.education-header {
    margin-bottom: 32px;
    padding-bottom: 24px;
    border-bottom: 1px solid #e8e8e8;
}

.education-title {
    font-size: 32px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 12px;
    line-height: 1.2;
}

.education-description {
    font-size: 16px;
    color: #666;
    margin: 0;
    line-height: 1.6;
    max-width: 600px;
}

/* Articles Grid - Leafly Style */
.education-articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
}

/* Article Card */
.education-article-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    transition: all 0.2s ease;
    border: 1px solid #e8e8e8;
}

.education-article-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
    transform: translateY(-2px);
}

/* Article Card Image */
.article-card-image {
    position: relative;
    padding-top: 56.25%; /* 16:9 aspect ratio */
    overflow: hidden;
    background: #f5f5f5;
}

.article-card-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

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

/* Article Card Content */
.article-card-content {
    padding: 16px 20px 20px;
}

.article-card-category {
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--phytopedia-primary, #4CAF50);
    margin-bottom: 8px;
}

.article-card-title {
    font-size: 18px;
    font-weight: 700;
    line-height: 1.3;
    margin: 0 0 10px;
}

.article-card-title a {
    color: #1a1a1a;
    text-decoration: none;
    transition: color 0.2s ease;
}

.article-card-title a:hover {
    color: var(--phytopedia-primary, #4CAF50);
}

.article-card-excerpt {
    font-size: 14px;
    color: #666;
    line-height: 1.5;
    margin: 0 0 12px;
}

.article-card-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 13px;
    color: #888;
}

.article-card-meta .article-author {
    font-weight: 500;
    color: #555;
}

.article-card-meta .article-date::before {
    content: "•";
    margin-right: 12px;
    color: #ccc;
}

/* Empty State */
.education-empty-state {
    text-align: center;
    padding: 60px 20px;
    background: #f9f9f9;
    border-radius: 12px;
    border: 1px dashed #ddd;
}

.education-empty-state .empty-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.education-empty-state h3 {
    font-size: 20px;
    font-weight: 600;
    color: #333;
    margin: 0 0 8px;
}

.education-empty-state p {
    font-size: 15px;
    color: #666;
    margin: 0 0 20px;
}

/* Mobile Responsive */
@media (max-width: 900px) {
    .phytopedia-education-layout {
        flex-direction: column;
        gap: 24px;
    }

    .phytopedia-education-sidebar {
        width: 100%;
        position: static;
    }

    .education-nav {
        background: #f8f8f8;
        border-radius: 8px;
    }

    .education-nav-list {
        display: flex;
        flex-wrap: wrap;
        gap: 4px;
        padding: 12px;
    }

    .education-nav-item a {
        padding: 8px 14px;
        border-radius: 20px;
        border-left: none;
        background: #fff;
        font-size: 14px;
    }

    .education-nav-item.active a {
        background: var(--phytopedia-primary, #4CAF50);
        color: #fff;
        border-left: none;
    }

    .education-nav-item a:hover {
        background: #eee;
    }

    .education-nav-item.active a:hover {
        background: var(--phytopedia-primary, #4CAF50);
    }

    .education-nav-header {
        display: none;
    }

    .education-title {
        font-size: 26px;
    }

    .education-articles-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 600px) {
    .phytopedia-education-wrapper {
        padding: 0 12px;
    }

    .education-title {
        font-size: 22px;
    }

    .article-card-title {
        font-size: 16px;
    }

    .education-nav-list {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 8px;
    }

    .education-nav-item {
        flex-shrink: 0;
    }
}
