/*
Theme Name: AI Profit Engine Theme
Theme URI: https://aiprofitengine.eu
Author: Cristian Pantaze
Author URI: https://aiprofitengine.eu
Description: Modern WordPress theme for AI Profit Engine - fast, customizable, and optimized for AI/tech content. Now with adjustable sizes, compact blog cards, and full customization control!
Version: 1.3.0
Requires at least: 6.0
Tested up to: 6.8
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: aipe-theme
Tags: custom-header, custom-logo, custom-menu, featured-images, threaded-comments, translation-ready, responsive-layout, two-columns, flexible-header, sticky-post

AI Profit Engine Theme - Professional WordPress theme for AI content with enhanced features and full size control.
*/

:root {
    --primary: #2563eb;
    --primary-hover: #1d4ed8;
    --dark: #0f172a;
    --gray: #64748b;
    --light: #f1f5f9;
    --white: #ffffff;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--dark);
    background: var(--white);
}

/* Fix admin bar overlap */
body.admin-bar .site-header {
    top: 32px;
}

@media screen and (max-width: 782px) {
    body.admin-bar .site-header {
        top: 46px;
    }
}

/* Smooth scroll */
html {
    scroll-behavior: smooth;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 1rem;
}

h1 { font-size: 2rem; }      /* Reduced from 2.5rem */
h2 { font-size: 1.65rem; }   /* Reduced from 2rem */
h3 { font-size: 1.35rem; }   /* Reduced from 1.75rem */
h4 { font-size: 1.15rem; }
h5 { font-size: 1rem; }
h6 { font-size: 0.9rem; }

a {
    color: var(--primary);
    text-decoration: none;
    transition: color 0.3s;
}

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

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

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.site-header {
    background: var(--white);
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 999;
    transition: all 0.3s ease;
}

/* Menu links visibility fix - COMPREHENSIVE */
.main-navigation a,
.main-navigation ul li a,
.main-navigation .menu a,
.main-navigation .nav-menu a,
nav.main-navigation a,
.site-header nav a,
.site-header .main-navigation ul li a {
    color: #0f172a !important;
    font-weight: 600 !important;
    text-decoration: none !important;
    font-size: 15px !important;
    padding: 0.5rem 0 !important;
    transition: color 0.3s ease !important;
    opacity: 1 !important;
    visibility: visible !important;
}

.main-navigation a:hover,
.main-navigation ul li a:hover,
.main-navigation .menu a:hover,
.main-navigation .nav-menu a:hover,
nav.main-navigation a:hover,
.site-header nav a:hover,
.site-header .main-navigation ul li a:hover {
    color: var(--primary) !important;
}

/* Ensure menu items themselves are visible */
.main-navigation ul,
.main-navigation ul li,
.main-navigation .menu,
.main-navigation .nav-menu {
    opacity: 1 !important;
    visibility: visible !important;
}

/* Header scroll effect */
.site-header.scrolled {
    padding: 0.5rem 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.15);
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
}

.site-title {
    font-size: 1.5rem;
    margin: 0;
    white-space: nowrap;
}

.site-title a {
    color: #0f172a !important;
    text-decoration: none;
    font-weight: 700;
}

.site-title a:hover {
    color: var(--primary) !important;
}

.main-navigation {
    flex: 1;
    display: flex;
    justify-content: center;
}

/* Mobile Menu Toggle */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    padding: 0.5rem;
    cursor: pointer;
    flex-direction: column;
    gap: 4px;
}

.menu-toggle span {
    width: 25px;
    height: 3px;
    background: var(--dark);
    transition: all 0.3s;
}

.menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

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

.menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

.main-navigation ul {
    list-style: none;
    display: flex;
    gap: 2rem;
    margin: 0;
    padding: 0;
}

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

.main-navigation a {
    color: var(--dark);
    font-weight: 500;
    text-decoration: none;
}

/* Header Search */
.header-search {
    position: relative;
    margin-left: 1rem;
}

.search-toggle {
    background: none;
    border: none;
    padding: 0.5rem;
    cursor: pointer;
    color: var(--dark);
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-toggle:hover {
    opacity: 0.7;
}

.search-form {
    display: flex;
    gap: 0.5rem;
}

.search-field {
    padding: 0.5rem 1rem;
    border: 1px solid var(--light);
    border-radius: 4px;
    flex: 1;
}

.search-submit {
    padding: 0.5rem 1.5rem;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.search-submit:hover {
    background: var(--primary-hover);
}

/* Content */
.site-content {
    padding: 3rem 0;
    min-height: 60vh;
    background: #ffffff; /* Fundal alb curat */
}

.content-area {
    max-width: 1200px; /* Mărit pentru blog */
    margin: 0 auto;
}

/* Posts Grid Container */
.posts-grid {
    display: grid;
    gap: 2.5rem; /* Mai mult spațiu între carduri */
    margin-bottom: 3rem;
    padding: 0 20px; /* Padding lateral */
}

/* DEFAULT BLOG LAYOUT - Horizontal Cards */
.post-card {
    background: var(--white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08); /* Shadow mai subtil */
    transition: transform 0.3s, box-shadow 0.3s;
    max-width: 100%;
}

.post-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 12px rgba(0,0,0,0.15);
}

/* Horizontal Layout - Image + Content Side by Side */
.post-card-inner {
    display: grid;
    grid-template-columns: 280px 1fr;  /* Reduced from 320px */
    gap: 0;
    height: 100%;
}

.post-card .post-thumbnail {
    overflow: hidden;
    margin: 0;
}

.post-card .post-thumbnail img {
    width: 100%;
    height: 100%;
    min-height: 220px;  /* Reduced from 250px */
    object-fit: cover;
    transition: transform 0.3s;
}

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

.post-card .post-content {
    padding: 1.5rem;  /* Reduced from 2rem */
    display: flex;
    flex-direction: column;
}

.post-card .entry-header {
    padding: 0;
    margin-bottom: 0.75rem;  /* Reduced from 1rem */
}

.post-card .entry-title {
    font-size: 1.25rem;  /* Reduced from 1.5rem */
    margin-bottom: 0.5rem;  /* Reduced from 0.75rem */
    line-height: 1.3;
}

.post-card .entry-title a {
    color: var(--dark);
    text-decoration: none;
}

.post-card .entry-title a:hover {
    color: var(--primary);
}

.post-card .entry-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.8rem;  /* Reduced from 0.875rem */
    color: var(--gray);
    margin-bottom: 0;
}

.post-card .entry-summary {
    padding: 0;
    color: var(--gray);
    line-height: 1.6;
    margin-bottom: 1rem;  /* Reduced from 1.5rem */
    font-size: 0.95rem;  /* Added smaller font */
    flex-grow: 1;
}

.post-card .read-more {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary);
    font-weight: 600;
    text-decoration: none;
    transition: gap 0.3s;
}

.post-card .read-more:hover {
    gap: 0.75rem;
}

/* Grid layouts */
.posts-grid.grid-1 {
    grid-template-columns: 1fr;
    max-width: 900px;
    margin: 0 auto;
}

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

.posts-grid.grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

.posts-grid.grid-4 {
    grid-template-columns: repeat(4, 1fr);
}

/* LIST LAYOUT (grid-1) - Horizontal cards (imagine stânga, text dreapta) */
.posts-grid.grid-1 .post-card-inner {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 0;
}

.posts-grid.grid-1 .post-card .post-thumbnail img {
    height: 100%;
    min-height: 240px;
    object-fit: cover;
}

/* GRID LAYOUT (grid-2, 3, 4) - Vertical cards (imagine sus, text jos) */
.posts-grid.grid-2 .post-card-inner,
.posts-grid.grid-3 .post-card-inner,
.posts-grid.grid-4 .post-card-inner {
    display: flex;
    flex-direction: column;
}

.posts-grid.grid-2 .post-card,
.posts-grid.grid-3 .post-card,
.posts-grid.grid-4 .post-card {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.posts-grid.grid-2 .post-card .post-thumbnail,
.posts-grid.grid-3 .post-card .post-thumbnail,
.posts-grid.grid-4 .post-card .post-thumbnail {
    width: 100%;
    flex-shrink: 0;
}

.posts-grid.grid-2 .post-card .post-thumbnail img,
.posts-grid.grid-3 .post-card .post-thumbnail img,
.posts-grid.grid-4 .post-card .post-thumbnail img {
    width: 100%;
    height: 220px;
    min-height: 220px;
    object-fit: cover;
}

.posts-grid.grid-2 .post-card .post-content,
.posts-grid.grid-3 .post-card .post-content,
.posts-grid.grid-4 .post-card .post-content {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.entry-header {
    padding: 1.5rem;
}

.entry-title {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.entry-title a {
    color: var(--dark);
}

.entry-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.875rem;
    color: var(--gray);
    margin-bottom: 1rem;
}

.entry-content,
.entry-summary {
    padding: 0 1.5rem 1.5rem;
    color: var(--gray);
}

/* Single Post */
.single .entry-header {
    text-align: center;
    margin-bottom: 2rem;
}

.single .entry-title {
    font-size: 2.5rem;
}

.single .post-thumbnail {
    margin-bottom: 2rem;
    border-radius: 12px;
    overflow: hidden;
}

.single .entry-content {
    padding: 0;
    max-width: 100%;
}

.single .entry-content p {
    margin-bottom: 1.5rem;
}

/* Footer */
.site-footer {
    background: var(--dark);
    color: rgba(255,255,255,0.8) !important;
    padding: 3rem 0 1.5rem;
    margin-top: 4rem;
}

.site-info {
    text-align: center;
    font-size: 0.875rem;
    color: rgba(255,255,255,0.8) !important;
}

.site-info p {
    color: rgba(255,255,255,0.8) !important;
}

.site-info a {
    color: var(--white) !important;
    text-decoration: underline;
}

.site-info a:hover {
    color: var(--primary) !important;
}

/* Responsive */
@media (max-width: 1024px) {
    .posts-grid.grid-4 {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .layout-with-sidebar {
        grid-template-columns: 1fr !important;
    }
    
    .widget-area {
        display: none;
    }
}

@media (max-width: 768px) {
    /* Typography mobil */
    h1 { font-size: 1.75rem !important; }
    h2 { font-size: 1.5rem !important; }
    h3 { font-size: 1.25rem !important; }
    
    body {
        font-size: 15px !important;
    }
    
    /* Container mobil - mai mult spațiu */
    .container {
        padding: 0 15px !important;
    }
    
    .site-content {
        padding: 1.5rem 0 !important;
    }
    
    /* Posts grid mobil - TOATE devin verticale */
    .posts-grid {
        padding: 0 10px !important;
        gap: 2rem !important;
    }
    
    .posts-grid.grid-1,
    .posts-grid.grid-2,
    .posts-grid.grid-3,
    .posts-grid.grid-4 {
        grid-template-columns: 1fr !important;
    }
    
    /* TOATE cardurile devin verticale pe mobile (imagine sus, text jos) */
    .post-card-inner {
        display: flex !important;
        flex-direction: column !important;
        grid-template-columns: none !important;
    }
    
    .post-card {
        display: flex !important;
        flex-direction: column !important;
    }
    
    .post-card .post-thumbnail {
        width: 100% !important;
        flex-shrink: 0;
    }
    
    .post-card .post-thumbnail img {
        width: 100% !important;
        height: 200px !important;
        min-height: 200px !important;
        object-fit: cover !important;
    }
    
    .post-card .post-content {
        padding: 1.25rem !important;
        flex: 1;
        display: flex !important;
        flex-direction: column !important;
    }
    
    .post-card .entry-title {
        font-size: 1.1rem !important;
        line-height: 1.4 !important;
        margin-bottom: 0.5rem !important;
    }
    
    .post-card .entry-meta {
        font-size: 0.75rem !important;
        margin-bottom: 0.5rem !important;
    }
    
    .post-card .entry-summary {
        font-size: 0.875rem !important;
        line-height: 1.5 !important;
        margin-bottom: 0.75rem !important;
        flex-grow: 1;
        /* Limiteaza la 4 linii */
        display: -webkit-box;
        -webkit-line-clamp: 4;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }
    
    .post-card .read-more {
        font-size: 0.875rem !important;
    }
    
    /* Header mobil */
    .site-header {
        padding: 0.75rem 0;
    }
    
    .header-inner {
        gap: 1rem;
    }
    
    .site-title {
        font-size: 1.25rem !important;
    }
    
    /* Hamburger menu */
    .menu-toggle {
        display: flex !important;
        z-index: 1001;
    }
    
    .main-navigation {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        max-width: 300px;
        height: 100vh;
        background: white;
        box-shadow: -2px 0 10px rgba(0,0,0,0.1);
        padding: 5rem 2rem 2rem;
        transition: right 0.3s ease;
        z-index: 1000;
        overflow-y: auto;
        justify-content: flex-start;
    }
    
    .main-navigation.active {
        right: 0;
    }
    
    .main-navigation ul {
        flex-direction: column !important;
        gap: 0 !important;
        width: 100%;
    }
    
    .main-navigation ul li {
        border-bottom: 1px solid #e5e7eb;
        width: 100%;
    }
    
    .main-navigation ul li a {
        display: block;
        padding: 1rem 0 !important;
        font-size: 1.1rem !important;
    }
    
    /* Overlay pentru menu */
    .menu-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0,0,0,0.5);
        z-index: 999;
    }
    
    .menu-overlay.active {
        display: block;
    }
    
    /* Single post mobil */
    .single .entry-header {
        padding: 0 !important;
        margin-bottom: 1.5rem !important;
    }
    
    .single .entry-title {
        font-size: 1.75rem !important;
    }
    
    .single .entry-content {
        padding: 0 !important;
    }
    
    .single .entry-content p,
    .single .entry-content li {
        font-size: 1rem !important;
        line-height: 1.7 !important;
    }
    
    .single .post-thumbnail {
        margin-bottom: 1.5rem !important;
        margin-left: -15px !important;
        margin-right: -15px !important;
        border-radius: 0 !important;
    }
    
    /* Footer mobil */
    .site-footer {
        padding: 1.5rem 0 !important;
        font-size: 0.875rem !important;
    }
    
    /* Hide search on mobile */
    .header-search {
        display: none;
    }
}

/* Widget Styles */
.widget-area {
    background: #f8fafc;
    padding: 2rem;
    border-radius: 12px;
}

.widget {
    margin-bottom: 2rem;
}

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

.widget-title {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--primary);
}

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

.widget ul li {
    padding: 0.5rem 0;
    border-bottom: 1px solid #e5e7eb;
}

.widget ul li:last-child {
    border-bottom: none;
}

.widget a {
    color: var(--dark);
}

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

/* Utility Classes */
.screen-reader-text {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    border: 0;
}

.alignleft {
    float: left;
    margin: 0 1.5rem 1rem 0;
}

.alignright {
    float: right;
    margin: 0 0 1rem 1.5rem;
}

/* ========================================
   NEW IMPROVEMENTS
   ======================================== */

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--primary);
    color: var(--white);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
    transition: all 0.3s ease;
    z-index: 998;
}

.back-to-top:hover {
    background: var(--primary-hover);
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(37, 99, 235, 0.4);
}

.back-to-top.show {
    display: flex;
}

/* Reading Time */
.reading-time {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--gray);
    font-size: 0.9rem;
    margin-left: 1rem;
}

.reading-time svg {
    width: 16px;
    height: 16px;
}

/* Share Buttons */
.share-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin: 2rem 0;
    padding: 1.5rem;
    background: var(--light);
    border-radius: 8px;
    align-items: center;
}

.share-buttons h4 {
    margin: 0 1rem 0 0;
    font-size: 1rem;
    color: var(--gray);
    width: 100%;
    margin-bottom: 0.5rem;
}

.share-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    height: 40px;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.3s ease;
    color: var(--white);
    font-size: 0.875rem;
    font-weight: 500;
    border: none;
    cursor: pointer;
}

.share-button span {
    color: white;
}

.share-button svg {
    flex-shrink: 0;
}

.share-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    filter: brightness(1.1);
}

/* Brand Colors for Each Social Network */
.share-button.facebook {
    background: #1877f2;
}

.share-button.twitter {
    background: #1da1f2;
}

.share-button.linkedin {
    background: #0077b5;
}

.share-button.pinterest {
    background: #e60023;
}

.share-button.whatsapp {
    background: #25d366;
}

.share-button.telegram {
    background: #0088cc;
}

.share-button.reddit {
    background: #ff4500;
}

.share-button.tumblr {
    background: #35465c;
}

.share-button.pocket {
    background: #ef3f56;
}

.share-button.email {
    background: #6b7280;
}

.share-button.copy-link {
    background: #8b5cf6;
}

.share-button.copy-link:hover {
    background: #7c3aed;
}

/* Mobile responsive for share buttons */
@media (max-width: 768px) {
    .share-buttons {
        gap: 0.5rem;
    }
    
    .share-button {
        padding: 0.5rem 0.75rem;
        font-size: 0.8rem;
    }
    
    .share-button span {
        display: none; /* Hide text on mobile, show only icons */
    }
    
    .share-button {
        width: 40px;
        padding: 0;
    }
}

/* Progress Bar */
.reading-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 3px;
    background: var(--primary);
    z-index: 1000;
    transition: width 0.1s ease;
}

body.admin-bar .reading-progress {
    top: 32px;
}

@media screen and (max-width: 782px) {
    body.admin-bar .reading-progress {
        top: 46px;
    }
}

/* Table of Contents */
.table-of-contents {
    background: var(--light);
    border-left: 4px solid var(--primary);
    padding: 1.5rem;
    margin: 2rem 0;
    border-radius: 8px;
}

.table-of-contents h3 {
    margin: 0 0 1rem 0;
    font-size: 1.25rem;
    color: var(--dark);
}

.table-of-contents ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.table-of-contents li {
    margin: 0.5rem 0;
}

.table-of-contents a {
    color: var(--gray);
    text-decoration: none;
    transition: color 0.3s;
}

.table-of-contents a:hover {
    color: var(--primary);
}

/* Featured Badge */
.featured-badge {
    display: inline-block;
    background: var(--primary);
    color: var(--white);
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.5rem;
}

/* Better Link Styling for Affiliate Links */
a.affiliate-link,
a[href*="clickbank"],
a[href*="warriorplus"],
a[href*="jvzoo"] {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: var(--primary);
    color: var(--white) !important;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 600;
    transition: all 0.3s ease;
    margin: 0.5rem 0;
}

a.affiliate-link:hover,
a[href*="clickbank"]:hover,
a[href*="warriorplus"]:hover,
a[href*="jvzoo"]:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

/* Improved Responsive */
@media (max-width: 782px) {
    .back-to-top {
        bottom: 20px !important;
        right: 15px !important; /* Mai în interior pentru a nu ieși din site */
        width: 45px !important;
        height: 45px !important;
        font-size: 20px !important;
        z-index: 997 !important;
        box-shadow: 0 4px 12px rgba(0,0,0,0.15) !important;
    }
    
    /* Asigură că body nu are overflow pe mobil */
    body {
        overflow-x: hidden !important;
        max-width: 100vw !important;
    }
    
    /* Asigură că toate elementele stau în viewport */
    .site-content,
    .container,
    .post-card,
    .site-header,
    .site-footer {
        max-width: 100vw !important;
        overflow-x: hidden !important;
    }
    
    .share-buttons {
        flex-wrap: wrap;
    }
}

.aligncenter {
    display: block;
    margin-left: auto;
    margin-right: auto;
}

/* ========================================
   FAZA 1 - ESENȚIALE - CSS
   ======================================== */

/* ========================================
   FAZA 2 - SEO & SOCIAL - CSS
   ======================================== */

/* 1. AUTHOR BOX */
.author-box {
    display: flex;
    gap: 2rem;
    padding: 2rem;
    margin: 3rem 0;
    background: var(--light);
    border-radius: 12px;
    border: 1px solid var(--border);
}

.author-avatar {
    flex-shrink: 0;
}

.author-avatar img {
    border-radius: 50%;
    width: 120px;
    height: 120px;
}

.author-info {
    flex: 1;
}

.author-name {
    margin: 0 0 0.5rem 0;
    font-size: 1.5rem;
}

.author-name a {
    color: var(--dark);
    text-decoration: none;
}

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

.author-posts-count {
    margin: 0 0 1rem 0;
    font-size: 0.875rem;
    color: var(--gray);
}

.author-bio {
    margin: 0 0 1rem 0;
    line-height: 1.6;
    color: var(--gray);
}

.author-social {
    display: flex;
    gap: 0.75rem;
    margin-top: 1rem;
}

.author-social a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    text-decoration: none;
    transition: all 0.3s ease;
}

.author-social a:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    filter: brightness(1.1);
}

/* 2. POPULAR POSTS WIDGET */
.popular-posts-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.popular-post-item {
    display: flex;
    gap: 1rem;
    padding: 1rem 0;
    border-bottom: 1px solid var(--light);
}

.popular-post-item:last-child {
    border-bottom: none;
}

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

.popular-post-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.popular-post-thumb:hover img {
    transform: scale(1.05);
}

.popular-post-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.popular-post-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--dark);
    text-decoration: none;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.popular-post-title:hover {
    color: var(--primary);
}

.popular-post-views {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.8rem;
    color: var(--gray);
}

.popular-post-views svg {
    width: 14px;
    height: 14px;
}

/* 3. RECENT COMMENTS WIDGET */
.recent-comments-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.recent-comment-item {
    display: flex;
    gap: 1rem;
    padding: 1rem 0;
    border-bottom: 1px solid var(--light);
}

.recent-comment-item:last-child {
    border-bottom: none;
}

.recent-comment-avatar {
    flex-shrink: 0;
}

.recent-comment-avatar img {
    width: 48px;
    height: 48px;
    border-radius: 50%;
}

.recent-comment-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.recent-comment-author {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--dark);
    text-decoration: none;
}

.recent-comment-author:hover {
    color: var(--primary);
}

.recent-comment-excerpt {
    margin: 0;
    font-size: 0.85rem;
    color: var(--gray);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.recent-comment-post {
    font-size: 0.75rem;
    color: var(--gray);
}

.recent-comment-post a {
    color: var(--primary);
    text-decoration: none;
}

.recent-comment-post a:hover {
    text-decoration: underline;
}

/* Mobile responsive for Phase 2 */
@media (max-width: 768px) {
    .author-box {
        flex-direction: column;
        gap: 1.5rem;
        padding: 1.5rem;
    }
    
    .author-avatar {
        text-align: center;
    }
    
    .author-avatar img {
        width: 100px;
        height: 100px;
    }
    
    .author-name {
        font-size: 1.25rem;
        text-align: center;
    }
    
    .author-posts-count {
        text-align: center;
    }
    
    .author-social {
        justify-content: center;
    }
    
    .popular-post-thumb {
        width: 60px;
        height: 60px;
    }
}

/* ========================================
   FAZA 3 - UX & DESIGN - CSS
   ======================================== */

/* 1. AJAX LIVE SEARCH */
.search-form {
    position: relative;
}

.live-search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid var(--border);
    border-top: none;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    max-height: 400px;
    overflow-y: auto;
    z-index: 1000;
    margin-top: -1px;
}

.search-loading,
.search-no-results {
    padding: 1.5rem;
    text-align: center;
    color: var(--gray);
    font-size: 0.9rem;
}

.search-result-item {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    border-bottom: 1px solid var(--light);
    transition: background 0.2s ease;
}

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

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

.search-result-item img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 6px;
    flex-shrink: 0;
}

.search-result-content {
    flex: 1;
}

.search-result-content a {
    display: block;
    font-weight: 600;
    color: var(--dark);
    text-decoration: none;
    margin-bottom: 0.25rem;
    font-size: 0.95rem;
}

.search-result-content a:hover {
    color: var(--primary);
}

.search-result-content p {
    margin: 0;
    font-size: 0.85rem;
    color: var(--gray);
    line-height: 1.4;
}

.search-result-date {
    font-size: 0.75rem;
    color: var(--gray);
}

/* 2. TABLE OF CONTENTS */
.table-of-contents {
    background: var(--light);
    border-left: 4px solid var(--primary);
    padding: 1.5rem;
    margin: 2rem 0;
    border-radius: 8px;
}

/* TOC Header with Toggle Button */
.toc-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.table-of-contents h3 {
    margin: 0;
    font-size: 1.25rem;
    color: var(--dark);
}

/* Toggle Button */
.toc-toggle {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: all 0.3s ease;
    color: var(--gray);
}

.toc-toggle:hover {
    background: rgba(37, 99, 235, 0.1);
    color: var(--primary);
}

.toc-toggle:focus {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

.toc-icon {
    transition: transform 0.3s ease;
}

/* TOC List States */
.table-of-contents .toc-list {
    list-style: none;
    margin: 0;
    padding: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, opacity 0.3s ease;
}

.toc-list-expanded {
    max-height: 2000px;
    opacity: 1;
}

.toc-list-collapsed {
    max-height: 0;
    opacity: 0;
    margin: 0 !important;
}

.table-of-contents .toc-list li {
    margin: 0.5rem 0;
}

.table-of-contents .toc-list li.toc-sub {
    margin-left: 1.5rem;
    font-size: 0.9rem;
}

.table-of-contents .toc-list a {
    color: var(--gray);
    text-decoration: none;
    transition: color 0.3s ease;
    display: block;
    padding: 0.25rem 0;
}

.table-of-contents .toc-list a:hover,
.table-of-contents .toc-list a.active {
    color: var(--primary);
    font-weight: 600;
}

/* 3. LOAD MORE BUTTON */
.load-more-button {
    background: var(--primary);
    color: white;
    border: none;
    padding: 1rem 2.5rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.load-more-button:hover:not(:disabled) {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.load-more-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.load-more-spinner {
    display: inline-block;
    animation: spin 1s linear infinite;
    font-size: 1.2rem;
}

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

/* 4. SCROLL ANIMATIONS */
.animate-ready {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.animate-ready.animate-in {
    opacity: 1;
    transform: translateY(0);
}

/* Staggered animation for post cards */
.post-card.animate-ready:nth-child(1) { transition-delay: 0.1s; }
.post-card.animate-ready:nth-child(2) { transition-delay: 0.2s; }
.post-card.animate-ready:nth-child(3) { transition-delay: 0.3s; }
.post-card.animate-ready:nth-child(4) { transition-delay: 0.4s; }
.post-card.animate-ready:nth-child(5) { transition-delay: 0.5s; }
.post-card.animate-ready:nth-child(6) { transition-delay: 0.6s; }

/* Fade in animation for dynamically loaded content */
.fade-in {
    animation: fadeIn 0.6s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Smooth transitions for all interactive elements */
a, button, input, .post-card, .widget {
    transition: all 0.3s ease;
}

/* Mobile responsive for Phase 3 */
@media (max-width: 768px) {
    .live-search-results {
        max-height: 300px;
    }
    
    .search-result-item {
        padding: 0.75rem;
    }
    
    .search-result-item img {
        width: 50px;
        height: 50px;
    }
    
    .table-of-contents {
        padding: 1rem;
    }
    
    .table-of-contents .toc-list li.toc-sub {
        margin-left: 1rem;
    }
    
    .load-more-button {
        padding: 0.875rem 2rem;
        font-size: 0.9rem;
    }
}

/* 1. DARK MODE - COMPLETE IMPLEMENTATION */
:root {
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --text-primary: #0f172a;
    --text-secondary: #64748b;
    --border-color: #e5e7eb;
    --card-bg: #ffffff;
}

.dark-mode {
    --bg-primary: #1e293b;
    --bg-secondary: #0f172a;
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --border-color: #334155;
    --card-bg: #0f172a;
    --gray: #cbd5e1; /* Override gray to be lighter in dark mode */
}

/* DARK MODE - Body & Global Elements */
.dark-mode,
.dark-mode body {
    background: #1e293b !important;
    color: #f1f5f9 !important;
}

.dark-mode *,
.dark-mode *::before,
.dark-mode *::after {
    border-color: #334155 !important;
}

.dark-mode .site-content {
    background: #1e293b !important;
}

.dark-mode .container {
    background: transparent !important;
}

/* DARK MODE - Header */
.dark-mode .site-header {
    background: #0f172a !important;
    border-bottom: 1px solid #334155 !important;
    box-shadow: 0 1px 3px rgba(0,0,0,0.5) !important;
}

.dark-mode .site-title,
.dark-mode .site-title a {
    color: #f1f5f9 !important;
}

/* DARK MODE - Navigation Menu */
.dark-mode .main-navigation,
.dark-mode .main-navigation * {
    background: transparent !important;
}

.dark-mode .main-navigation a,
.dark-mode .main-navigation ul li a,
.dark-mode nav a {
    color: #f1f5f9 !important;
}

.dark-mode .main-navigation a:hover {
    color: #60a5fa !important;
}

/* DARK MODE - Search */
.dark-mode .search-field {
    background: #0f172a !important;
    color: #f1f5f9 !important;
    border-color: #334155 !important;
}

.dark-mode .search-submit {
    background: #3b82f6 !important;
}

/* DARK MODE - Cards (Blog Posts) */
.dark-mode .post-card {
    background: #0f172a !important;
    border: 1px solid #334155 !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.4) !important;
}

.dark-mode .post-card:hover {
    box-shadow: 0 8px 16px rgba(0,0,0,0.6) !important;
}

.dark-mode .post-card .entry-title,
.dark-mode .post-card .entry-title a {
    color: #f1f5f9 !important;
}

.dark-mode .post-card .entry-title a:hover {
    color: #60a5fa !important;
}

.dark-mode .post-card .entry-summary,
.dark-mode .post-card .entry-meta,
.dark-mode .post-card .entry-content {
    color: #cbd5e1 !important;
}

/* Extra specificity for excerpt visibility */
.dark-mode .post-card .entry-summary p,
.dark-mode .entry-summary,
.dark-mode .entry-summary p {
    color: #cbd5e1 !important;
}

.dark-mode .post-card .read-more {
    color: #60a5fa !important;
}

/* DARK MODE - Single Post Page */
.dark-mode .entry-header {
    background: transparent !important;
}

.dark-mode .entry-title,
.dark-mode h1, 
.dark-mode h2, 
.dark-mode h3, 
.dark-mode h4, 
.dark-mode h5, 
.dark-mode h6 {
    color: #f1f5f9 !important;
}

.dark-mode .entry-content,
.dark-mode .entry-content p,
.dark-mode .entry-content li,
.dark-mode .entry-summary {
    color: #e2e8f0 !important;
}

.dark-mode .entry-content a {
    color: #60a5fa !important;
}

.dark-mode .entry-content a:hover {
    color: #93c5fd !important;
}

.dark-mode .entry-meta,
.dark-mode .entry-meta a,
.dark-mode .entry-meta span {
    color: #94a3b8 !important;
}

/* DARK MODE - Sidebar & Widgets */
.dark-mode .sidebar,
.dark-mode .widget-area {
    background: #0f172a !important;
}

.dark-mode .widget {
    background: transparent !important;
    color: #f1f5f9 !important;
}

.dark-mode .widget-title,
.dark-mode .widget h1,
.dark-mode .widget h2,
.dark-mode .widget h3 {
    color: #f1f5f9 !important;
}

.dark-mode .widget a {
    color: #cbd5e1 !important;
}

.dark-mode .widget a:hover {
    color: #60a5fa !important;
}

.dark-mode .widget ul li {
    border-color: #334155 !important;
}

/* DARK MODE - Recent Posts Widget */
.dark-mode .recent-posts-widget li,
.dark-mode #recent-posts-2 li {
    color: #e2e8f0 !important;
}

/* DARK MODE - Categories */
.dark-mode .entry-categories a,
.dark-mode .cat-links a {
    background: #334155 !important;
    color: #f1f5f9 !important;
}

/* DARK MODE - Tags */
.dark-mode .post-tags a,
.dark-mode .tag-links a {
    background: #334155 !important;
    color: #f1f5f9 !important;
}

/* DARK MODE - Footer */
.dark-mode .site-footer {
    background: #0f172a !important;
    border-top: 1px solid #334155 !important;
    color: #94a3b8 !important;
}

.dark-mode .site-footer a {
    color: #cbd5e1 !important;
}

.dark-mode .site-footer a:hover {
    color: #60a5fa !important;
}

/* DARK MODE - Breadcrumbs */
.dark-mode .breadcrumbs {
    color: #94a3b8 !important;
}

.dark-mode .breadcrumbs li {
    color: #94a3b8 !important;
}

.dark-mode .breadcrumbs li:last-child {
    color: #f1f5f9 !important;
}

.dark-mode .breadcrumbs a {
    color: #94a3b8 !important;
}

.dark-mode .breadcrumbs a:hover {
    color: #60a5fa !important;
}

/* DARK MODE - View Counter */
.dark-mode .post-views {
    color: #94a3b8 !important;
}

/* DARK MODE - Buttons */
.dark-mode button,
.dark-mode .button,
.dark-mode input[type="submit"] {
    background: #3b82f6 !important;
    color: #ffffff !important;
    border-color: #3b82f6 !important;
}

.dark-mode button:hover,
.dark-mode .button:hover {
    background: #2563eb !important;
}

/* DARK MODE - Forms */
.dark-mode input[type="text"],
.dark-mode input[type="email"],
.dark-mode input[type="url"],
.dark-mode input[type="password"],
.dark-mode input[type="search"],
.dark-mode textarea,
.dark-mode select {
    background: #0f172a !important;
    color: #f1f5f9 !important;
    border-color: #334155 !important;
}

.dark-mode input::placeholder,
.dark-mode textarea::placeholder {
    color: #64748b !important;
}

/* DARK MODE - Related Posts */
.dark-mode .related-posts {
    background: #0f172a !important;
    border-color: #334155 !important;
}

.dark-mode .related-posts h3 {
    color: #f1f5f9 !important;
    border-color: #3b82f6 !important;
}

/* DARK MODE - Comments */
.dark-mode .comment-list,
.dark-mode .comment-body {
    background: #0f172a !important;
    border-color: #334155 !important;
    color: #e2e8f0 !important;
}

.dark-mode .comment-author {
    color: #f1f5f9 !important;
}

.dark-mode .comment-metadata a {
    color: #94a3b8 !important;
}

/* DARK MODE - Pagination */
.dark-mode .pagination a,
.dark-mode .page-numbers {
    background: #0f172a !important;
    color: #f1f5f9 !important;
    border-color: #334155 !important;
}

.dark-mode .pagination a:hover,
.dark-mode .page-numbers:hover {
    background: #334155 !important;
    color: #60a5fa !important;
}

.dark-mode .pagination .current {
    background: #3b82f6 !important;
    color: #ffffff !important;
}

/* DARK MODE - Back to Top Button */
.dark-mode .back-to-top {
    background: #3b82f6 !important;
    color: #ffffff !important;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4) !important;
}

.dark-mode .back-to-top:hover {
    background: #2563eb !important;
}

/* DARK MODE - Share Buttons Container */
.dark-mode .share-buttons {
    background: #0f172a !important;
    border: 1px solid #334155 !important;
}

.dark-mode .share-buttons h4 {
    color: #f1f5f9 !important;
}

/* Dark mode - keep brand colors for share buttons */
.dark-mode .share-button {
    /* Brand colors stay the same for recognition */
}

.dark-mode .share-button span {
    color: #ffffff !important;
}

/* DARK MODE - Author Box */
.dark-mode .author-box {
    background: #0f172a !important;
    border-color: #334155 !important;
}

.dark-mode .author-box .author-name,
.dark-mode .author-box .author-name a {
    color: #f1f5f9 !important;
}

.dark-mode .author-box .author-name a:hover {
    color: #60a5fa !important;
}

.dark-mode .author-box .author-posts-count {
    color: #94a3b8 !important;
}

.dark-mode .author-box .author-bio {
    color: #cbd5e1 !important;
}

/* DARK MODE - Popular Posts Widget */
.dark-mode .popular-post-item {
    border-bottom-color: #334155 !important;
}

.dark-mode .popular-post-title {
    color: #f1f5f9 !important;
}

.dark-mode .popular-post-title:hover {
    color: #60a5fa !important;
}

.dark-mode .popular-post-views {
    color: #94a3b8 !important;
}

/* DARK MODE - Recent Comments Widget */
.dark-mode .recent-comment-item {
    border-bottom-color: #334155 !important;
}

.dark-mode .recent-comment-author {
    color: #f1f5f9 !important;
}

.dark-mode .recent-comment-author:hover {
    color: #60a5fa !important;
}

.dark-mode .recent-comment-excerpt {
    color: #cbd5e1 !important;
}

.dark-mode .recent-comment-post {
    color: #94a3b8 !important;
}

.dark-mode .recent-comment-post a {
    color: #60a5fa !important;
}

/* DARK MODE - Phase 3 Elements */

/* Live Search Results */
.dark-mode .live-search-results {
    background: #0f172a !important;
    border-color: #334155 !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5) !important;
}

.dark-mode .search-loading,
.dark-mode .search-no-results {
    color: #94a3b8 !important;
}

.dark-mode .search-result-item {
    border-bottom-color: #334155 !important;
}

.dark-mode .search-result-item:hover {
    background: #1e293b !important;
}

.dark-mode .search-result-content a {
    color: #f1f5f9 !important;
}

.dark-mode .search-result-content a:hover {
    color: #60a5fa !important;
}

.dark-mode .search-result-content p {
    color: #cbd5e1 !important;
}

.dark-mode .search-result-date {
    color: #94a3b8 !important;
}

/* Table of Contents */
.dark-mode .table-of-contents {
    background: #0f172a !important;
    border-left-color: #3b82f6 !important;
}

.dark-mode .table-of-contents h3 {
    color: #f1f5f9 !important;
}

.dark-mode .toc-toggle {
    color: #cbd5e1 !important;
}

.dark-mode .toc-toggle:hover {
    background: rgba(59, 130, 246, 0.2) !important;
    color: #60a5fa !important;
}

.dark-mode .table-of-contents .toc-list a {
    color: #cbd5e1 !important;
}

.dark-mode .table-of-contents .toc-list a:hover,
.dark-mode .table-of-contents .toc-list a.active {
    color: #60a5fa !important;
}

/* Load More Button */
.dark-mode .load-more-button {
    background: #3b82f6 !important;
}

.dark-mode .load-more-button:hover:not(:disabled) {
    background: #2563eb !important;
}

/* DARK MODE - Recommendation/Advertisement Sections */
.dark-mode h3:contains("RECOMADARE"),
.dark-mode h4:contains("RECOMADARE"),
.dark-mode [class*="recom"],
.dark-mode [class*="recommend"] {
    color: #f87171 !important; /* Red-ish pentru titluri recomandare */
}

/* DARK MODE - WP Native Ads Plugin */
.dark-mode .wpna-ad,
.dark-mode .wpna-ads,
.dark-mode .wpna-content,
.dark-mode [class*="wpna"] {
    background: #0f172a !important;
    border-color: #334155 !important;
}

.dark-mode .wpna-ad h3,
.dark-mode .wpna-ad h4,
.dark-mode .wpna-title {
    color: #f1f5f9 !important;
}

.dark-mode .wpna-ad p,
.dark-mode .wpna-description,
.dark-mode .wpna-text {
    color: #cbd5e1 !important;
}

/* DARK MODE - WP Native Ads Buttons - HIGHEST PRIORITY */
.dark-mode .wpna-button,
.dark-mode .wpna-ad button,
.dark-mode .wpna-ad a[class*="button"],
.dark-mode .wpna-cta,
.dark-mode .wpna-ad .button,
.dark-mode [class*="wpna"] button,
.dark-mode [class*="wpna"] a[href*="click"],
.dark-mode [class*="wpna"] .cta,
.dark-mode a[data-wpnative-ad] {
    background: #10b981 !important; /* Emerald green */
    background-color: #10b981 !important; /* Fallback */
    color: #ffffff !important; /* White text */
    border: 2px solid #10b981 !important;
    border-color: #10b981 !important;
    text-shadow: none !important;
    font-weight: 600 !important;
}

.dark-mode .wpna-button:hover,
.dark-mode .wpna-ad button:hover,
.dark-mode .wpna-cta:hover,
.dark-mode a[data-wpnative-ad]:hover {
    background: #059669 !important; /* Darker green on hover */
    background-color: #059669 !important;
    border-color: #059669 !important;
    color: #ffffff !important;
}

/* DARK MODE - Override ANY inline background with #22c55e or similar greens */
.dark-mode a[style*="#22c55e"],
.dark-mode a[style*="background: #22c55e"],
.dark-mode a[style*="background:#22c55e"],
.dark-mode a[style*="background-color: #22c55e"],
.dark-mode a[style*="background-color:#22c55e"],
.dark-mode button[style*="#22c55e"] {
    background: #10b981 !important;
    background-color: #10b981 !important;
    color: #ffffff !important;
    border-color: #10b981 !important;
}

/* DARK MODE - Generic green inline styles override */
.dark-mode a[style*="background: green"],
.dark-mode a[style*="background:green"],
.dark-mode a[style*="background:#00ff00"],
.dark-mode a[style*="background: #0f0"],
.dark-mode a[style*="background-color: green"],
.dark-mode a[style*="background-color:green"],
.dark-mode a[style*="background-color:#0f0"],
.dark-mode button[style*="background: green"],
.dark-mode button[style*="background:green"],
.dark-mode button[style*="background-color: green"] {
    background: #10b981 !important; /* Emerald green mai vizibil */
    background-color: #10b981 !important;
    color: #ffffff !important;
    border: 2px solid #10b981 !important;
    border-color: #10b981 !important;
    text-shadow: none !important;
}

.dark-mode a[style*="background: green"]:hover,
.dark-mode a[style*="background:green"]:hover,
.dark-mode a[style*="#22c55e"]:hover,
.dark-mode button[style*="background: green"]:hover {
    background: #059669 !important; /* Darker green on hover */
    background-color: #059669 !important;
    border-color: #059669 !important;
    color: #ffffff !important;
}

/* DARK MODE - Force white text on any green background - NUCLEAR OPTION */
.dark-mode a[style*="background"],
.dark-mode a[style*="background-color"],
.dark-mode button[style*="background"],
.dark-mode [style*="background: green"] *,
.dark-mode [style*="background:green"] *,
.dark-mode [style*="background-color: green"] *,
.dark-mode [style*="#22c55e"] *,
.dark-mode .wpna-button *,
.dark-mode .wpna-cta *,
.dark-mode a[data-wpnative-ad] * {
    color: #ffffff !important;
}

/* DARK MODE - Specific for links with data-wpnative-ad attribute */
.dark-mode a[data-wpnative-ad][style] {
    background: #10b981 !important;
    background-color: #10b981 !important;
    color: #ffffff !important;
    border-color: #10b981 !important;
}

/* DARK MODE - Any green colored text in content */
.dark-mode .entry-content [style*="color: green"],
.dark-mode .entry-content [style*="color:green"],
.dark-mode .entry-content [style*="color:#00ff00"],
.dark-mode .entry-content [style*="color: #0f0"] {
    color: #4ade80 !important; /* Light green pentru text */
}

/* DARK MODE - Recommendation Cards/Boxes */
.dark-mode .recommendation-box,
.dark-mode [class*="recom-"],
.dark-mode [class*="ad-box"],
.dark-mode [class*="native-ad"] {
    background: #0f172a !important;
    border: 2px solid #334155 !important;
}

/* DARK MODE - Tables */
.dark-mode .table-of-contents {
    background: #0f172a !important;
    border-color: #3b82f6 !important;
}

.dark-mode .table-of-contents h3 {
    color: #f1f5f9 !important;
}

.dark-mode .table-of-contents a {
    color: #cbd5e1 !important;
}

.dark-mode .table-of-contents a:hover {
    color: #60a5fa !important;
}

/* Dark Mode Toggle Button */
#dark-mode-toggle {
    background: transparent;
    border: 2px solid currentColor;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    margin-left: 1rem;
    color: var(--dark);
    padding: 0;
}

#dark-mode-toggle:hover {
    background: var(--light);
    transform: rotate(180deg);
    border-color: var(--primary);
}

#dark-mode-toggle svg {
    width: 22px;
    height: 22px;
    fill: currentColor;
}

/* Dark mode - show moon, hide sun */
.dark-mode #dark-mode-toggle {
    color: var(--text-primary);
    border-color: var(--text-primary);
}

.dark-mode #dark-mode-toggle:hover {
    background: var(--bg-secondary);
    border-color: var(--primary);
}

.dark-mode #dark-mode-toggle .sun-icon {
    display: none;
}

.dark-mode #dark-mode-toggle .moon-icon {
    display: block;
}

/* Light mode - show sun, hide moon */
#dark-mode-toggle .sun-icon {
    display: block;
}

#dark-mode-toggle .moon-icon {
    display: none;
}

/* 2. BREADCRUMBS */
.breadcrumbs {
    padding: 1rem 0;
    font-size: 0.875rem;
    margin-bottom: 1rem;
}

.breadcrumbs ol {
    display: flex;
    flex-wrap: wrap;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 0.5rem;
}

.breadcrumbs li {
    display: flex;
    align-items: center;
    color: var(--text-secondary);
}

.breadcrumbs li:not(:last-child)::after {
    content: "›";
    margin-left: 0.5rem;
    color: var(--text-secondary);
}

.breadcrumbs a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.3s;
}

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

.breadcrumbs li:last-child {
    color: var(--text-primary);
    font-weight: 500;
}

/* 3. VIEW COUNTER */
.post-views {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    color: var(--gray);
    font-size: 0.875rem;
    margin-left: 1rem;
}

.post-views svg {
    width: 16px;
    height: 16px;
}

.dark-mode .post-views {
    color: var(--text-secondary);
}

/* 4. STICKY SIDEBAR ENHANCEMENT */
.sidebar {
    position: sticky;
    top: 100px;
    align-self: flex-start;
    max-height: calc(100vh - 120px);
    overflow-y: auto;
}

/* Scrollbar pentru sidebar */
.sidebar::-webkit-scrollbar {
    width: 6px;
}

.sidebar::-webkit-scrollbar-track {
    background: var(--light);
}

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

.sidebar::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
}

/* Mobile adjustments for Phase 1 */
@media (max-width: 768px) {
    #dark-mode-toggle {
        width: 36px;
        height: 36px;
        margin-left: 0.5rem;
    }
    
    #dark-mode-toggle svg {
        width: 18px;
        height: 18px;
    }
    
    .breadcrumbs {
        font-size: 0.8rem;
        padding: 0.75rem 0;
    }
    
    .sidebar {
        position: static;
        max-height: none;
    }
}

/* ========================================
   RELATED POSTS SECTION - FIX
   ======================================== */

.related-posts {
    margin: 3rem 0;
    padding: 2rem;
    background: #f8fafc;
    border-radius: 12px;
}

.related-posts h3 {
    font-size: 1.5rem;
    margin-bottom: 2rem;
    color: var(--dark);
    padding-bottom: 0.75rem;
    border-bottom: 3px solid var(--primary);
}

/* Force vertical card layout for related posts */
.related-posts .post-card-inner {
    grid-template-columns: 1fr !important;
}

.related-posts .post-card {
    background: var(--white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.related-posts .post-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

.related-posts .post-card .post-thumbnail {
    margin: 0;
    overflow: hidden;
}

.related-posts .post-card .post-thumbnail img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: transform 0.3s;
}

.related-posts .post-card:hover .post-thumbnail img {
    transform: scale(1.05);
}

.related-posts .post-card .post-content {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.related-posts .post-card .entry-header {
    padding: 0;
    margin-bottom: 0.75rem;
}

.related-posts .post-card .entry-title {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

.related-posts .post-card .entry-title a {
    color: var(--dark);
    text-decoration: none;
}

.related-posts .post-card .entry-title a:hover {
    color: var(--primary);
}

.related-posts .post-card .entry-meta {
    font-size: 0.8rem;
    color: var(--gray);
    margin-bottom: 0.5rem;
}

.related-posts .post-card .entry-summary {
    font-size: 0.9rem;
    color: var(--gray);
    line-height: 1.6;
    margin-bottom: 1rem;
    padding: 0;
    flex-grow: 1;
}

.related-posts .post-card .read-more {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary);
    font-weight: 600;
    font-size: 0.9rem;
}

.related-posts .post-card .read-more:hover {
    gap: 0.75rem;
}

/* Responsive - Related Posts */
@media (max-width: 768px) {
    .related-posts {
        padding: 1.5rem;
    }
    
    .related-posts .posts-grid {
        grid-template-columns: 1fr !important;
        gap: 1.5rem !important;
    }
    
    .related-posts .post-card .post-thumbnail img {
        height: 180px;
    }
}

