/*
Theme Name: Casper
Author: Jach
Author URI: https://wptheme.site/
Description: A clean, modern and responsive WordPress theme inspired by Casper Blogger Template. Perfect for blogs, magazines, and content marketing websites.
Version: 1.0.0
Update URI: false
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: casper
*/

/* Variables */
:root {
    --primary-color: #cc2c98;
    --secondary-color: #28aad4;
    --dark-bg: #1e202f;
    --light-bg: #f7f7f9;
    --text-dark: #1e202f;
    --text-light: #6c757d;
    --text-muted: #9eb1c1;
    --white: #ffffff;
    --border-radius: 8px;
    --transition: all 0.3s ease;
    --container-width: 1000px;
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* Reset */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--light-bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

ul, ol {
    list-style: none;
}

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

button {
    border: none;
    background: none;
    cursor: pointer;
    font-family: inherit;
}

/* Container */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.site-header {
    background: linear-gradient(135deg, #cc2c98 0%, #8e44ad 25%, #3498db 75%, #28aad4 100%);
    padding: 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: transform 0.3s ease, top 0.3s ease;
}

/* Header hide/show effect */
.site-header.header-hidden {
    transform: translateY(-100%);
}

/* Admin bar adjustment */
.admin-bar .site-header {
    top: 32px;
}

.admin-bar .site-header.header-hidden {
    transform: translateY(-132px); /* 60px header height + 32px admin bar + 40px extra */
}

@media screen and (max-width: 782px) {
    .admin-bar .site-header {
        top: 46px;
    }
    
    .admin-bar .site-header.header-hidden {
        transform: translateY(-146px); /* 60px header height + 46px admin bar + 40px extra */
    }
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 60px;
    position: relative;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 20px;
}

.site-branding {
    display: flex;
    align-items: center;
    gap: 20px;
}

.site-branding .site-title {
    margin: 0;
}

.site-branding .site-title a,
.site-branding .custom-logo-link {
    font-size: 28px;
    font-weight: 800;
    color: var(--primary-color);
    letter-spacing: -1px;
    font-style: italic;
}

.site-branding .custom-logo {
    max-height: 40px;
    width: auto;
}

/* Logo and Title together */
.site-branding .custom-logo-link + .site-title {
    margin-left: 0;
}

.site-branding .custom-logo-link + .site-title a {
    font-size: 24px;
}

/* Navigation */
.main-navigation {
    display: flex;
    align-items: center;
}

.main-navigation ul {
    display: flex;
    align-items: center;
    gap: 4px;
    margin: 0;
    padding: 0;
}

.main-navigation ul li {
    position: relative;
}

.main-navigation ul li a {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 20px 10px;
    color: var(--white);
    font-size: 13px;
    font-weight: 500;
}

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

/* Dropdown */
.main-navigation ul ul {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 220px;
    background: var(--white);
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: var(--transition);
    z-index: 100;
    flex-direction: column;
    gap: 0;
    padding: 8px 0;
    margin-top: 5px;
}

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

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

.main-navigation ul ul li a {
    padding: 10px 20px;
    color: var(--text-dark);
    font-size: 14px;
    white-space: nowrap;
    display: block;
    transition: var(--transition);
}

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

.main-navigation ul ul ul {
    left: 100%;
    top: -8px;
    margin-top: 0;
    margin-left: 5px;
}

/* Header Icons */
.header-icons {
    display: flex;
    align-items: center;
    gap: 8px;
}

.header-icon-btn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 16px;
    border-radius: 50%;
    transition: var(--transition);
    background: none;
    border: none;
    cursor: pointer;
}

.header-icon-btn:hover {
    color: var(--primary-color);
}

.menu-toggle {
    display: none;
    width: 40px;
    height: 40px;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 20px;
    background: none;
    border: none;
    cursor: pointer;
    margin-right: 0;
}

/* Main Content */
.site-main {
    padding: 40px 0 60px;
}

/* Featured Post */
.featured-post {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
    background: transparent;
    border-radius: 0;
    overflow: hidden;
    margin-bottom: 50px;
}

.featured-post .post-thumbnail {
    padding: 0;
    background: transparent;
    min-height: 300px;
    display: block;
    overflow: hidden;
    border-radius: 8px;
}

.featured-post .post-thumbnail img {
    width: 100%;
    height: 300px;
    object-fit: cover;
}

.featured-post .entry-content {
    padding: 30px 40px 30px 0;
}

.category-link {
    display: inline-block;
    color: var(--primary-color);
    font-size: 14px;
    font-weight: 600;
    text-transform: capitalize;
    margin-bottom: 12px;
}

.featured-post .entry-title {
    font-size: 28px;
    font-weight: 700;
    line-height: 1.3;
    color: var(--text-dark);
    margin-bottom: 16px;
}

.featured-post .entry-title a {
    color: inherit;
}

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

.entry-excerpt {
    color: var(--text-light);
    font-size: 15px;
    line-height: 1.7;
    margin-bottom: 16px;
}

.featured-post .entry-excerpt {
    font-size: 14px;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.entry-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text-muted);
}

.entry-meta .author {
    font-weight: 600;
    color: var(--text-dark);
}

.entry-meta .author a {
    color: inherit;
}

.entry-meta .separator {
    color: var(--text-muted);
}

/* Latest Posts Section */
.posts-section {
    margin-top: 20px;
}

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

.section-header h2 {
    font-size: 22px;
    font-weight: 700;
    color: var(--text-dark);
}

.view-all-link {
    color: var(--primary-color);
    font-size: 14px;
    font-weight: 600;
}

.view-all-link:hover {
    text-decoration: underline;
}

/* Posts Grid */
.posts-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

/* Post Card */
.post-card {
    background: transparent;
    border-radius: 0;
    overflow: hidden;
    transition: var(--transition);
}

.post-card:hover {
    transform: none;
    box-shadow: none;
}

.post-card .post-thumbnail {
    display: block;
    aspect-ratio: 16/12;
    overflow: hidden;
    background: transparent;
    position: relative;
    border-radius: 8px;
}

.post-card .post-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.post-card:hover .post-thumbnail img {
    transform: none;
}

.post-card .post-thumbnail::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0);
    transition: var(--transition);
    pointer-events: none;
}

.post-card:hover .post-thumbnail::after {
    background: rgba(255, 255, 255, 0.05);
}

.post-card .entry-content {
    padding: 20px 0;
    background: transparent;
}

.post-card .category-link {
    font-size: 14px;
    margin-bottom: 10px;
}

.post-card .entry-title {
    font-size: 18px;
    font-weight: 700;
    line-height: 1.4;
    margin-bottom: 12px;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

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

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

.post-card .entry-excerpt {
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 14px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Load More Button */
.load-more-container {
    display: flex;
    justify-content: center;
    margin-top: 50px;
}

.load-more-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 30px;
    background: var(--primary-color);
    color: var(--white);
    font-size: 14px;
    font-weight: 600;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: var(--transition);
    min-width: 150px;
}

.load-more-btn:hover {
    background: #b02585;
    transform: translateY(-2px);
}

.load-more-btn.loading {
    opacity: 0.7;
    cursor: not-allowed;
}

.load-more-btn.loading i {
    animation: spin 1s linear infinite;
}

.load-more-btn.no-more-posts {
    background: #6c757d;
    color: #ffffff;
    cursor: not-allowed;
    opacity: 0.8;
}

.load-more-btn.no-more-posts:hover {
    background: #6c757d;
    transform: none;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 50px;
}

.pagination .page-numbers {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: var(--white);
    color: var(--text-dark);
    font-size: 14px;
    font-weight: 600;
    border-radius: 50%;
    transition: var(--transition);
}

.pagination .page-numbers:hover,
.pagination .page-numbers.current {
    background: var(--primary-color);
    color: var(--white);
}

/* Footer */
.site-footer {
    background: #16171b;
    padding-top: 40px;
}

.footer-content {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 60px;
    align-items: start;
    padding-bottom: 40px;
}

.footer-logo .site-title {
    margin: 0;
}

.footer-logo .site-title a {
    font-size: 32px;
    font-weight: 800;
    color: var(--primary-color);
    letter-spacing: -1px;
    font-style: italic;
}

.footer-custom-logo {
    max-width: 130px;
}

.footer-custom-logo img {
    max-width: 100%;
    height: auto;
}

.footer-about h3 {
    color: var(--white);
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 12px;
}

.footer-about p {
    color: var(--text-muted);
    font-size: 14px;
    line-height: 1.7;
    max-width: 400px;
}

.footer-social {
    display: flex;
    gap: 12px;
}

.footer-social-icon {
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: white;
    font-size: 18px;
    transition: all 0.3s ease;
}

.footer-social-icon svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.footer-social-icon:hover {
    transform: translateY(-3px);
}

.footer-social-facebook:hover {
    background: #1877f2;
    color: white;
}

.footer-social-twitter:hover {
    background: #000000;
    color: white;
}

.footer-social-youtube:hover {
    background: #ff0000;
    color: white;
}

.footer-social-instagram:hover {
    background: #e4405f;
    color: white;
}

.footer-social-rss:hover {
    background: #ff6600;
    color: white;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 20px 0;
    background: #0a0b0d;
}

.footer-bottom-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.footer-bottom p {
    color: var(--text-muted);
    font-size: 14px;
    margin: 0;
}

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

.footer-bottom a:hover {
    color: #fff;
    text-decoration: underline;
}

.footer-menu {
    display: flex;
    gap: 30px;
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-menu a {
    color: var(--text-muted);
    font-size: 14px;
    font-weight: 500;
}

.footer-menu a:hover {
    color: var(--white);
}

/* Widget Areas */
.widget {
    margin-bottom: 30px;
}

.widget-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 20px;
}

/* Single Post */
.single-post .entry-header {
    margin-bottom: 30px;
}

.single-post .entry-title {
    font-size: 36px;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 20px;
}

.single-post .entry-content {
    font-size: 17px;
    line-height: 1.8;
}

.single-post .entry-content p {
    margin-bottom: 20px;
}

.single-post .entry-content h2,
.single-post .entry-content h3,
.single-post .entry-content h4 {
    margin-top: 30px;
    margin-bottom: 15px;
}

/* Comments */
.comments-area {
    margin-top: 50px;
    padding-top: 30px;
    border-top: 1px solid #eee;
}

.comments-title {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 30px;
}

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

.comment {
    padding: 20px;
    background: var(--white);
    border-radius: var(--border-radius);
    margin-bottom: 20px;
}

.comment-author {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 10px;
}

.comment-author .avatar {
    border-radius: 50%;
}

.comment-author .fn {
    font-weight: 600;
}

.comment-content {
    font-size: 15px;
    line-height: 1.7;
}

/* Comment Form */
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #ddd;
    border-radius: var(--border-radius);
    font-family: inherit;
    font-size: 15px;
    margin-bottom: 15px;
    transition: var(--transition);
}

.comment-form input:focus,
.comment-form textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.comment-form .submit {
    background: var(--primary-color);
    color: var(--white);
    padding: 12px 30px;
    border: none;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.comment-form .submit:hover {
    background: #b02585;
}

/* Expandable Search in Header */
.header-search-expand {
    position: absolute;
    top: 0;
    left: 155px;
    right: 0;
    height: 100%;
    background: transparent;
    display: flex;
    align-items: center;
    padding: 0;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    z-index: 50;
}

.header-search-expand.active {
    opacity: 1;
    visibility: visible;
}

.search-form-expand {
    display: flex;
    align-items: center;
    width: 100%;
    gap: 15px;
}

.search-field-expand {
    flex: 1;
    padding: 0;
    border: none;
    border-radius: 0;
    font-size: 16px;
    background: transparent;
    color: white;
    outline: none;
    transition: var(--transition);
}

.search-field-expand:focus {
    background: transparent;
}

.search-field-expand::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

.search-close-btn {
    background: transparent;
    border: none;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    flex-shrink: 0;
    margin-right: 1px;
}

.search-close-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: rotate(90deg);
}

.search-close-btn i {
    font-size: 18px;
}

/* Hide menu when search is active */
.search-active .main-navigation {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.search-active .header-icons {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

/* Keep logo visible when search is active */
.search-active .site-branding {
    opacity: 1;
    visibility: visible;
    z-index: 100;
}

/* Mobile header - not sticky */
@media (max-width: 768px) {
    .site-header {
        position: relative;
    }
    
    .admin-bar .site-header {
        top: 0;
    }
}

/* Mobile post card styles */
@media (max-width: 768px) {
    .post-card .post-thumbnail {
        aspect-ratio: 16/10;
        border-radius: 12px;
        margin-bottom: 12px;
        background: transparent;
    }
    
    .featured-post .post-thumbnail {
        background: transparent;
        padding: 0;
        margin-bottom: 12px;
    }
    
    .post-card .entry-content {
        padding: 0;
    }
    
    .post-card .category-link {
        font-size: 12px;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 0.5px;
        margin-bottom: 8px;
    }
    
    .post-card .entry-title {
        font-size: 20px;
        font-weight: 800;
        line-height: 1.3;
        margin-bottom: 15px;
    }
    
    .post-card .entry-excerpt {
        font-size: 14px;
        line-height: 1.6;
        margin-bottom: 15px;
        color: var(--text-muted);
    }
    
    .post-card .entry-meta {
        font-size: 13px;
    }
}

/* Mobile search styles */
@media (max-width: 768px) {
    .header-search-expand {
        left: 0;
        padding: 0 20px;
    }
    
    .search-close-btn {
        margin-right: 0;
    }
    
    .search-active .site-branding {
        opacity: 0;
        visibility: hidden;
    }
    
    .search-active .menu-toggle {
        opacity: 0;
        visibility: hidden;
    }
}

/* Dark mode search */
body.dark-mode .search-field-expand {
    background: transparent;
    color: white;
}

body.dark-mode .search-close-btn {
    background: transparent;
    color: white;
}

body.dark-mode .search-close-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

.search-form {
    display: flex;
    gap: 10px;
}

.search-form .search-field {
    flex: 1;
    padding: 15px 20px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 50px;
    background: rgba(255, 255, 255, 0.1);
    color: var(--white);
    font-family: inherit;
    font-size: 16px;
    outline: none;
    transition: var(--transition);
}

.search-form .search-field::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.search-form .search-field:focus {
    border-color: var(--primary-color);
    background: rgba(255, 255, 255, 0.15);
}

.search-form .search-submit {
    background: var(--primary-color);
    color: var(--white);
    padding: 15px 30px;
    border: none;
    border-radius: 50px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.search-form .search-submit:hover {
    background: #b02585;
    transform: translateY(-2px);
}

/* Ad Containers */
.casper-ad {
    margin: 30px auto;
    text-align: center;
    max-width: 100%;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
}

.casper-ad > * {
    margin: 0 auto;
}

.casper-ad-header {
    margin: 20px 0;
    padding: 20px 0;
    background: var(--bg-light);
}

.casper-ad-home {
    margin: 40px 0;
    padding: 20px;
    background: var(--bg-light);
    border-radius: 8px;
    grid-column: 1 / -1;
}

.casper-ad-footer {
    margin: 40px auto;
    padding: 30px 0;
    max-width: var(--container-width);
}

.casper-ad-sidebar {
    margin: 30px 0;
    padding: 20px;
    background: var(--bg-light);
    border-radius: 8px;
}

.casper-ad-post_individual,
.casper-ad-post_end {
    margin: 30px 0;
    padding: 20px;
    background: var(--bg-light);
    border-radius: 8px;
}

body.dark-mode .casper-ad-header,
body.dark-mode .casper-ad-home,
body.dark-mode .casper-ad-sidebar,
body.dark-mode .casper-ad-post_individual,
body.dark-mode .casper-ad-post_end {
    background: var(--bg-dark-secondary);
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 40px;
    height: 40px;
    background: var(--primary-color);
    color: var(--white);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s ease;
    z-index: 999;
    box-shadow: 0 4px 15px rgba(204, 44, 152, 0.3);
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    background: #b02585;
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(204, 44, 152, 0.4);
}

.back-to-top:active {
    transform: translateY(-1px);
}

/* Dark mode styles for back to top button */
body.dark-mode .back-to-top {
    background: var(--primary-color);
    box-shadow: 0 4px 15px rgba(204, 44, 152, 0.4);
}

body.dark-mode .back-to-top:hover {
    background: #b02585;
    box-shadow: 0 6px 20px rgba(204, 44, 152, 0.5);
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .back-to-top {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
        font-size: 16px;
    }
}

/* Dark Mode Styles */
body.dark-mode {
    background-color: #16171b;
    color: #e1e8ed;
}

body.dark-mode .site-header {
    background: #1d1e21;
}

body.dark-mode .post-card,
body.dark-mode .post-card *,
body.dark-mode .featured-post,
body.dark-mode .comment {
    background: transparent !important;
    color: #e1e8ed;
}

body.dark-mode .main-navigation ul ul {
    background: #1a1f2e;
}

body.dark-mode .main-navigation ul ul li a {
    color: #e1e8ed;
}

body.dark-mode .main-navigation ul ul li a:hover {
    color: var(--primary-color);
    background-color: transparent;
}

body.dark-mode .site-branding .site-title a,
body.dark-mode .site-branding .custom-logo-link {
    color: #e91e63;
}

body.dark-mode .load-more-btn.no-more-posts {
    background: #4a5568;
    color: #a0aec0;
}

body.dark-mode .category-link {
    color: var(--primary-color) !important;
}

body.dark-mode .entry-title a {
    color: #fff6e0;
}

body.dark-mode .entry-title a:hover {
    color: #e91e63;
}

body.dark-mode .entry-meta .author,
body.dark-mode .entry-meta .author a {
    color: #fff6e0;
}

body.dark-mode .entry-excerpt,
body.dark-mode .entry-meta .date,
body.dark-mode .entry-meta .separator {
    color: #a7aaa9;
}

body.dark-mode .section-header {
    padding: 0;
}

body.dark-mode .section-header h2 {
    color: #ffe6e6;
}

body.dark-mode .site-footer {
    background: #1d1e21;
}

body.dark-mode .footer-bottom {
    background: #0a0b0d;
}

body.dark-mode .comment-form input[type="text"],
body.dark-mode .comment-form input[type="email"],
body.dark-mode .comment-form input[type="url"],
body.dark-mode .comment-form textarea,
body.dark-mode .search-form .search-field {
    background: #2d3748;
    border-color: #4a5568;
    color: #e1e8ed;
}

body.dark-mode .pagination .page-numbers {
    background: #1a1f2e;
    color: #e1e8ed;
}

body.dark-mode .pagination .page-numbers:hover,
body.dark-mode .pagination .page-numbers.current {
    background: #e91e63;
    color: #ffffff;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .posts-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .featured-post {
        grid-template-columns: 1fr;
    }

    .featured-post .entry-content {
        padding: 30px;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 30px;
        text-align: center;
    }

    .footer-about p {
        max-width: 100%;
    }

    .footer-social {
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .main-navigation {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--dark-bg);
        flex-direction: column;
        padding: 20px;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
    }

    .main-navigation.toggled {
        display: flex;
    }

    .main-navigation ul {
        flex-direction: column;
        width: 100%;
    }

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

    .main-navigation ul li a {
        padding: 12px 0;
    }

    .main-navigation ul ul {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        background: transparent;
        padding-left: 20px;
    }

    .main-navigation ul ul li a {
        color: var(--text-muted);
    }

    .menu-toggle {
        display: flex;
        order: -1;
    }
    
    .header-left {
        flex: 1;
    }
    
    .header-icons .menu-toggle {
        display: none;
    }

    .posts-grid {
        grid-template-columns: 1fr;
    }

    .featured-post .entry-title {
        font-size: 22px;
    }

    .section-header h2 {
        font-size: 18px;
    }

    .footer-bottom-content {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }

    .footer-menu {
        flex-wrap: wrap;
        justify-content: center;
        gap: 15px;
    }

    .single-post .entry-title {
        font-size: 26px;
    }
}

@media (max-width: 480px) {
    .site-branding .site-title a {
        font-size: 24px;
    }

    .featured-post .post-thumbnail {
        min-height: unset;
        padding: 0;
        border-radius: 14px;
        aspect-ratio: 16 / 9;
    }

    .featured-post .post-thumbnail img {
        height: 100%;
        max-height: 200px;
        border-radius: 14px;
    }

    .featured-post {
        gap: 16px;
        margin-bottom: 28px;
    }

    .featured-post .entry-content {
        padding: 0;
    }

    .featured-post .entry-title {
        font-size: 20px;
    }

    .post-card .entry-content {
        padding: 15px;
    }

    .post-card .entry-title {
        font-size: 15px;
    }
}

/* Single Post Layout */
.single-post-layout {
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 50px;
    margin-top: 30px;
}

.single-post-content {
    max-width: 100%;
}

/* Breadcrumbs */
.breadcrumbs {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 20px;
}

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

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

.breadcrumbs .separator {
    margin: 0 8px;
}

/* Single Post Header */
.single-post .entry-header {
    margin-bottom: 30px;
}

.single-post .entry-title {
    font-size: 36px;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 20px;
    color: var(--text-dark);
}

/* Entry Meta Wrapper */
.entry-meta-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 20px;
    border-bottom: 1px solid #e5e7eb;
}

.entry-meta-left .author-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.entry-meta-left .author-info img {
    border-radius: 50%;
}

.author-details {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
}

.author-label {
    color: var(--text-muted);
}

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

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

.author-details .date {
    color: var(--text-muted);
}

.author-details .date::before {
    content: "•";
    margin: 0 6px;
}

/* Share Button */
.share-button {
    width: 40px;
    height: 40px;
    background: transparent;
    color: var(--text-dark);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.share-button:hover {
    color: var(--primary-color);
    transform: scale(1.1);
}

.share-button svg {
    stroke: currentColor;
}

/* Post Thumbnail */
.single-post .post-thumbnail {
    margin: 30px 0;
    border-radius: 8px;
    overflow: hidden;
}

.single-post .post-thumbnail img {
    width: 100%;
    height: auto;
    display: block;
}

/* Entry Content */
.single-post .entry-content {
    font-size: 16px;
    line-height: 1.8;
    color: var(--text-dark);
    margin-bottom: 40px;
}

.single-post .entry-content p {
    margin-bottom: 20px;
}

.single-post .entry-content h2,
.single-post .entry-content h3,
.single-post .entry-content h4 {
    margin-top: 30px;
    margin-bottom: 15px;
    font-weight: 700;
}

/* Lists Styling */
.single-post .entry-content ul,
.single-post .entry-content ol,
.page .entry-content ul,
.page .entry-content ol {
    margin-bottom: 25px;
    padding-left: 35px;
    color: var(--text-dark);
}

.single-post .entry-content ul,
.page .entry-content ul {
    list-style-type: disc;
}

.single-post .entry-content ol,
.page .entry-content ol {
    list-style-type: decimal;
}

.single-post .entry-content li,
.page .entry-content li {
    margin-bottom: 12px;
    line-height: 1.8;
    color: var(--text-dark);
}

.single-post .entry-content li::marker,
.page .entry-content li::marker {
    color: var(--primary-color);
}

/* Blockquote Styling */
.single-post .entry-content blockquote,
.page .entry-content blockquote {
    margin: 30px 0;
    padding: 20px 25px;
    border-left: 4px solid var(--primary-color);
    background: #f9fafb;
    font-style: italic;
    color: #4b5563;
    position: relative;
}

.single-post .entry-content blockquote p,
.page .entry-content blockquote p {
    margin-bottom: 0;
    font-size: 18px;
    line-height: 1.7;
}

.single-post .entry-content blockquote cite,
.page .entry-content blockquote cite {
    display: block;
    margin-top: 10px;
    font-size: 14px;
    font-style: normal;
    color: #6b7280;
}

/* Code Styling */
.single-post .entry-content code,
.page .entry-content code {
    background: #f3f4f6;
    color: #dc2626;
    padding: 3px 8px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
}

.single-post .entry-content pre,
.page .entry-content pre {
    background: #1f2937;
    color: #e5e7eb;
    padding: 20px;
    border-radius: 8px;
    overflow-x: auto;
    margin-bottom: 25px;
}

.single-post .entry-content pre code,
.page .entry-content pre code {
    background: transparent;
    color: inherit;
    padding: 0;
    border-radius: 0;
    font-size: 14px;
}

/* Text Formatting */
.single-post .entry-content strong,
.single-post .entry-content b,
.page .entry-content strong,
.page .entry-content b {
    font-weight: 700;
    color: var(--text-dark);
}

.single-post .entry-content em,
.single-post .entry-content i,
.page .entry-content em,
.page .entry-content i {
    font-style: italic;
}

.single-post .entry-content mark,
.page .entry-content mark {
    background: #fef3c7;
    color: #92400e;
    padding: 2px 4px;
}

.single-post .entry-content a,
.page .entry-content a {
    color: var(--primary-color);
    text-decoration: underline;
    transition: var(--transition);
}

.single-post .entry-content a:hover,
.page .entry-content a:hover {
    color: #b02585;
}

/* Horizontal Rule */
.single-post .entry-content hr,
.page .entry-content hr {
    border: none;
    border-top: 2px solid #e5e7eb;
    margin: 40px 0;
}

/* Tables */
.single-post .entry-content table,
.page .entry-content table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 25px;
}

.single-post .entry-content table th,
.single-post .entry-content table td,
.page .entry-content table th,
.page .entry-content table td {
    padding: 12px 15px;
    border: 1px solid #e5e7eb;
    text-align: left;
}

.single-post .entry-content table th,
.page .entry-content table th {
    background: #f9fafb;
    font-weight: 700;
    color: var(--text-dark);
}

.single-post .entry-content table tr:nth-child(even),
.page .entry-content table tr:nth-child(even) {
    background: #f9fafb;
}

/* Entry Footer */
.single-post .entry-footer {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid #e5e7eb;
}

.post-tags-inline {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 30px;
}

.post-tags-inline strong {
    font-size: 16px;
    color: var(--text-dark);
    margin: 0;
}

.tags-list-inline {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.tag-link {
    display: inline-block;
    padding: 6px 16px;
    background: #f3f4f6;
    color: var(--text-dark);
    border-radius: 20px;
    font-size: 13px;
    text-decoration: none;
    transition: var(--transition);
}

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

/* Share Buttons Footer */
.share-buttons-footer {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.share-icon-btn {
    width: 40px;
    height: 40px;
    border-radius: 6px;
    background: transparent;
    color: var(--text-dark);
    border: 1px solid #e5e7eb;
    cursor: default;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    pointer-events: none;
}

body.dark-mode .share-icon-btn {
    color: #e1e8ed;
    border-color: #2d3748;
}

.share-footer-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    color: white;
}

.share-footer-btn i {
    font-size: 16px;
}

.share-footer-btn.facebook {
    background: #1877f2;
}

.share-footer-btn.facebook:hover {
    background: #0c63d4;
    transform: translateY(-2px);
}

.share-footer-btn.twitter {
    background: #000000;
}

.share-footer-btn.twitter:hover {
    background: #1a1a1a;
    transform: translateY(-2px);
}

.share-footer-btn.whatsapp {
    background: #25d366;
    width: 40px;
    height: 40px;
    padding: 0;
    justify-content: center;
}

.share-footer-btn.whatsapp:hover {
    background: #1fb855;
    transform: translateY(-2px);
}

.share-footer-btn.whatsapp i {
    margin: 0;
}

.share-footer-btn.email {
    background: #6b7280;
    width: 40px;
    height: 40px;
    padding: 0;
    justify-content: center;
}

.share-footer-btn.email:hover {
    background: #4b5563;
    transform: translateY(-2px);
}

.share-footer-btn.email i {
    margin: 0;
}

.share-footer-btn.more-btn {
    background: #374151;
    width: 40px;
    height: 40px;
    padding: 0;
    justify-content: center;
}

.share-footer-btn.more-btn:hover {
    background: #4b5563;
    transform: translateY(-2px);
}

.share-footer-btn.more-btn i {
    margin: 0;
}

/* Related Posts Section */
.related-posts-section {
    margin-top: 60px;
    padding-top: 40px;
    border-top: 1px solid #e5e7eb;
}

.related-posts-title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 30px;
    color: var(--text-dark);
}

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

.related-post-card {
    background: transparent;
    overflow: hidden;
    transition: var(--transition);
}

.related-post-card:hover {
    transform: translateY(-5px);
}

.related-post-thumbnail {
    width: 100%;
    height: 140px;
    overflow: hidden;
    border-radius: 8px;
}

.related-post-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

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

.related-post-content {
    padding: 15px 0 0 0;
}

.related-post-title {
    font-size: 16px;
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: 10px;
}

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

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

.related-post-date {
    font-size: 13px;
    color: var(--text-muted);
}

/* Dark Mode for Related Posts */
body.dark-mode .related-posts-section {
    border-color: #2d3748;
}

body.dark-mode .related-posts-title {
    color: #e1e8ed;
}

body.dark-mode .related-post-card {
    background: transparent;
}

body.dark-mode .related-post-title a {
    color: #e1e8ed;
}

body.dark-mode .related-post-title a:hover {
    color: var(--primary-color);
}

/* Comments Section */
.comments-section-wrapper {
    margin-top: 50px;
}

.comments-toggle-btn {
    width: 100%;
    padding: 18px 25px;
    background: transparent;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-dark);
    cursor: pointer;
    transition: var(--transition);
}

.comments-toggle-btn .comment-text {
    transition: color 0.3s ease;
}

.comments-toggle-btn:hover .comment-text {
    color: var(--primary-color);
}

.comments-toggle-btn .chevron-icon {
    transition: transform 0.3s ease;
}

.comments-toggle-btn.active .chevron-icon {
    transform: rotate(180deg);
}

.comments-container {
    margin-top: 30px;
    padding-top: 30px;
    border-top: 1px solid #e5e7eb;
}

/* WordPress Comments Styling */
.comment-list {
    list-style: none !important;
    padding: 0;
    margin: 0;
}

.comment-list > li,
.comment-list li,
.children li,
li.comment {
    list-style: none !important;
    list-style-type: none !important;
}

.comment {
    margin-bottom: 20px;
}

.comment-body-wrapper {
    padding: 25px;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    background: transparent;
}

.comment-body {
    padding: 0;
    border: none;
    background: transparent;
}

.comment-author {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
}

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

.comment-author .fn {
    font-weight: 600;
    font-size: 16px;
    color: var(--text-dark);
    text-decoration: none;
}

.comment-author .says {
    display: none;
}

.comment-metadata {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 20px;
}

.comment-metadata a {
    color: var(--text-muted);
    text-decoration: none;
}

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

.comment-content {
    color: var(--text-dark);
    line-height: 1.7;
    margin-bottom: 20px;
}

.comment-content p {
    margin-bottom: 10px;
}

.reply {
    margin-top: 15px;
}

.comment-reply-link {
    display: inline-block;
    padding: 8px 20px;
    background: transparent;
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
}

.comment-reply-link:hover {
    background: var(--primary-color);
    color: white;
}

/* Nested Comments (Replies) */
.children {
    list-style: none;
    padding: 0;
    margin: 0;
    margin-top: 30px;
}

.children .comment {
    margin-bottom: 0;
}

.children .comment:last-child {
    margin-bottom: 0;
}

.children .comment-body-wrapper {
    border: 1px solid #e5e7eb;
    background: transparent;
    padding: 20px;
    border-radius: 12px;
}

.children .comment-body {
    padding: 0;
    border: none;
}

/* Comment Form */
.comment-respond {
    margin-top: 40px;
    padding: 25px;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    background: transparent;
    list-style: none !important;
}

#comments .comment-respond {
    list-style: none !important;
}

#respond {
    list-style: none !important;
}

.comment-reply-title {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 20px;
    color: var(--text-dark);
}

.comment-form-comment label,
.comment-form-author label,
.comment-form-email label,
.comment-form-url label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--text-dark);
}

.comment-form-comment textarea,
.comment-form-author input,
.comment-form-email input,
.comment-form-url input {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    font-size: 14px;
    color: var(--text-dark);
    background: white;
    transition: var(--transition);
}

.comment-form-comment textarea:focus,
.comment-form-author input:focus,
.comment-form-email input:focus,
.comment-form-url input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.comment-form-comment {
    margin-bottom: 20px;
}

.form-submit {
    margin-top: 20px;
}

.submit {
    padding: 12px 30px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.submit:hover {
    background: #b02585;
}

/* Dark Mode for Comments */
body.dark-mode .comments-toggle-btn {
    border-color: #2d3748;
    color: #e1e8ed;
}

body.dark-mode .comments-toggle-btn:hover .comment-text {
    color: var(--primary-color);
}

body.dark-mode .comments-container {
    border-color: #2d3748;
}

body.dark-mode .comment-body-wrapper {
    background: transparent;
    border-color: #2d3748;
}

body.dark-mode .children .comment-body-wrapper {
    background: transparent;
    border-color: #2d3748;
}

body.dark-mode .comment-author .fn,
body.dark-mode .comment-content,
body.dark-mode .comment-reply-title {
    color: #e1e8ed;
}

body.dark-mode .comment-respond {
    background: transparent;
    border-color: #2d3748;
}

body.dark-mode .comment-form-comment label,
body.dark-mode .comment-form-author label,
body.dark-mode .comment-form-email label,
body.dark-mode .comment-form-url label {
    color: #e1e8ed;
}

body.dark-mode .comment-form-comment textarea,
body.dark-mode .comment-form-author input,
body.dark-mode .comment-form-email input,
body.dark-mode .comment-form-url input {
    background: #0f1419;
    border-color: #2d3748;
    color: #e1e8ed;
}

/* Sidebar */
.single-post-sidebar {
    position: sticky;
    top: 100px;
    align-self: start;
}

.sidebar-widget {
    background: transparent;
    padding: 0;
    margin-bottom: 40px;
}

.sidebar-widget .widget-title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--text-dark);
}

/* WordPress Custom Widgets Area */
.wordpress-widgets-area {
    margin-top: 20px;
}

.wordpress-widgets-area .widget {
    background: transparent;
    padding: 0;
    margin-bottom: 40px;
}

.wordpress-widgets-area .widget-title,
.wordpress-widgets-area .widgettitle {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 20px;
    color: #1f2937;
}

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

.wordpress-widgets-area .widget ul li {
    padding: 8px 0;
    border-bottom: 1px solid #e5e7eb;
}

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

.wordpress-widgets-area .widget a {
    color: #1f2937;
    text-decoration: none;
    transition: color 0.3s ease;
}

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

/* Follow Us Widget */
.social-buttons {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.social-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 12px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    color: white;
    transition: var(--transition);
}

.social-btn i {
    font-size: 16px;
}

.social-btn.facebook {
    background: #1877f2;
}

.social-btn.facebook:hover {
    background: #0c63d4;
    transform: translateY(-2px);
}

.social-btn.twitter {
    background: #000000;
}

.social-btn.twitter:hover {
    background: #1a1a1a;
    transform: translateY(-2px);
}

.social-btn.youtube {
    background: #ff0000;
}

.social-btn.youtube:hover {
    background: #cc0000;
    transform: translateY(-2px);
}

.social-btn.instagram {
    background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
}

.social-btn.instagram:hover {
    opacity: 0.9;
    transform: translateY(-2px);
}

/* Popular Articles Widget */
.popular-post-item {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e5e7eb;
}

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

/* Recent Comments Widget */
.recent-comment-item {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e5e7eb;
}

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

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

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

.recent-comment-item .comment-content {
    flex: 1;
    min-width: 0;
}

.recent-comment-item .comment-author {
    font-size: 14px;
    margin-bottom: 5px;
    color: #1f2937;
}

.recent-comment-item .comment-excerpt {
    font-size: 13px;
    color: #6b7280;
    line-height: 1.5;
    margin-bottom: 8px;
}

.recent-comment-item .comment-link {
    font-size: 12px;
    color: #3b82f6;
    text-decoration: none;
    transition: color 0.3s ease;
}

.recent-comment-item .comment-link:hover {
    color: #2563eb;
}

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

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

.popular-post-content {
    flex: 1;
}

.popular-post-title {
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: 8px;
}

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

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

.popular-post-date {
    font-size: 12px;
    color: var(--text-muted);
}

/* Main Tags Widget */
.tags-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag-item {
    display: inline-block;
    padding: 6px 14px;
    background: #f3f4f6;
    color: var(--text-dark);
    border-radius: 20px;
    font-size: 13px;
    text-decoration: none;
    transition: var(--transition);
}

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

/* Dark Mode Styles for Single Post */
body.dark-mode .single-post .entry-title,
body.dark-mode .single-post .entry-content,
body.dark-mode .author-name,
body.dark-mode .post-tags-inline strong,
body.dark-mode .sidebar-widget .widget-title,
body.dark-mode .popular-post-title a {
    color: #e1e8ed;
}

/* Dark Mode Typography */
body.dark-mode .single-post .entry-content ul,
body.dark-mode .single-post .entry-content ol,
body.dark-mode .single-post .entry-content li,
body.dark-mode .page .entry-content ul,
body.dark-mode .page .entry-content ol,
body.dark-mode .page .entry-content li {
    color: #e1e8ed;
}

body.dark-mode .single-post .entry-content blockquote,
body.dark-mode .page .entry-content blockquote {
    background: #1f2937;
    color: #d1d5db;
    border-left-color: var(--primary-color);
}

body.dark-mode .single-post .entry-content blockquote cite,
body.dark-mode .page .entry-content blockquote cite {
    color: #9ca3af;
}

body.dark-mode .single-post .entry-content code,
body.dark-mode .page .entry-content code {
    background: #374151;
    color: #fca5a5;
}

body.dark-mode .single-post .entry-content pre,
body.dark-mode .page .entry-content pre {
    background: #111827;
    color: #e5e7eb;
}

body.dark-mode .single-post .entry-content strong,
body.dark-mode .single-post .entry-content b,
body.dark-mode .page .entry-content strong,
body.dark-mode .page .entry-content b {
    color: #f3f4f6;
}

body.dark-mode .single-post .entry-content mark,
body.dark-mode .page .entry-content mark {
    background: #78350f;
    color: #fef3c7;
}

body.dark-mode .single-post .entry-content hr,
body.dark-mode .page .entry-content hr {
    border-top-color: #374151;
}

body.dark-mode .single-post .entry-content table th,
body.dark-mode .single-post .entry-content table td,
body.dark-mode .page .entry-content table th,
body.dark-mode .page .entry-content table td {
    border-color: #374151;
    color: #e1e8ed;
}

body.dark-mode .single-post .entry-content table th,
body.dark-mode .page .entry-content table th {
    background: #1f2937;
}

body.dark-mode .single-post .entry-content table tr:nth-child(even),
body.dark-mode .page .entry-content table tr:nth-child(even) {
    background: #1f2937;
}

body.dark-mode .sidebar-widget {
    background: transparent;
}

body.dark-mode .share-button {
    color: #e1e8ed;
}

body.dark-mode .share-button:hover {
    color: var(--primary-color);
}

body.dark-mode .tag-link,
body.dark-mode .tag-item {
    background: #2d3748;
    color: #e1e8ed;
}

body.dark-mode .tag-link:hover,
body.dark-mode .tag-item:hover {
    background: var(--primary-color);
    color: white;
}

body.dark-mode .entry-meta-wrapper,
body.dark-mode .single-post .entry-footer,
body.dark-mode .popular-post-item,
body.dark-mode .recent-comment-item {
    border-color: #2d3748;
}

body.dark-mode .recent-comment-item .comment-author {
    color: #e1e8ed;
}

body.dark-mode .recent-comment-item .comment-excerpt {
    color: #9ca3af;
}

body.dark-mode .recent-comment-item .comment-link {
    color: #60a5fa;
}

body.dark-mode .recent-comment-item .comment-link:hover {
    color: #93c5fd;
}

body.dark-mode .wordpress-widgets-area .widget-title,
body.dark-mode .wordpress-widgets-area .widgettitle {
    color: #e1e8ed;
}

body.dark-mode .wordpress-widgets-area .widget ul li {
    border-bottom-color: #2d3748;
}

body.dark-mode .wordpress-widgets-area .widget a {
    color: #e1e8ed;
}

body.dark-mode .wordpress-widgets-area .widget a:hover {
    color: var(--primary-color);
}

/* Share Modal */
.share-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    align-items: center;
    justify-content: center;
}

.share-modal.active {
    display: flex;
}

.share-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
}

.share-modal-content {
    position: relative;
    background: #2c3e50;
    border-radius: 12px;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    z-index: 10000;
    animation: modalSlideIn 0.3s ease-out;
}

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

.share-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.share-modal-header h3 {
    color: #ffffff;
    font-size: 18px;
    font-weight: 600;
    margin: 0;
}

.share-modal-close {
    background: transparent;
    border: none;
    color: #ffffff;
    cursor: pointer;
    padding: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.share-modal-close:hover {
    color: var(--primary-color);
    transform: rotate(90deg);
}

.share-modal-body {
    padding: 25px;
}

.share-buttons-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 15px;
    margin-bottom: 25px;
}

.share-modal-btn {
    width: 50px;
    height: 50px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 20px;
    text-decoration: none;
    transition: var(--transition);
}

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

.share-modal-btn.facebook {
    background: #1877f2;
}

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

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

.share-modal-btn.pinterest {
    background: #e60023;
}

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

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

.share-modal-btn.reddit {
    background: #ff4500;
}

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

.share-modal-btn.pocket {
    background: #ef3f56;
}

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

.copy-link-section {
    margin-top: 25px;
}

.copy-link-section h4 {
    color: #ffffff;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 12px;
}

.copy-link-wrapper {
    display: flex;
    gap: 10px;
}

.copy-link-wrapper input {
    flex: 1;
    padding: 12px 15px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    color: #ffffff;
    font-size: 14px;
    outline: none;
}

.copy-link-wrapper input:focus {
    border-color: var(--primary-color);
}

.copy-link-btn {
    padding: 12px 24px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.copy-link-btn:hover {
    background: #b02585;
}

.copy-link-btn:active {
    transform: scale(0.95);
}

/* Responsive */
@media (max-width: 1024px) {
    .single-post-layout {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .single-post-sidebar {
        position: static;
    }
}

@media (max-width: 600px) {
    .share-buttons-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 600px) {
    /* Share modal: fit and avoid overflow on mobile */
    .share-modal {
        align-items: center;
        justify-content: center;
    }

    .share-modal-content {
        width: calc(100% - 24px);
        max-width: none;
        max-height: 85vh;
        border-radius: 16px;
        margin: 0;
    }

    .share-modal-header {
        padding: 16px 16px;
    }

    .share-modal-body {
        padding: 16px;
    }

    .share-buttons-grid {
        gap: 12px;
    }

    .copy-link-wrapper {
        flex-direction: column;
    }

    .copy-link-wrapper input {
        width: 100%;
    }

    .copy-link-btn {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .single-post .entry-title {
        font-size: 28px;
    }

    .entry-meta-wrapper {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .share-buttons-footer {
        flex-wrap: wrap;
    }

    .related-posts-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .related-posts-title {
        font-size: 20px;
    }
}

/* Mobile: match compact tags + share + meta layout */
@media (max-width: 600px) {
    /* Breadcrumbs like reference (accent color, tighter) */
    .breadcrumbs {
        margin-bottom: 14px;
    }

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

    /* Meta: left stacked (author then date), share icon right */
    .entry-meta-wrapper {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        border-bottom: none;
        padding-bottom: 0;
    }

    .entry-meta-left .author-info img {
        width: 42px;
        height: 42px;
    }

    .author-details {
        display: flex;
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
        gap: 2px 8px;
    }

    .author-details .date::before {
        content: none;
        margin: 0;
    }

    /* Put "Por" next to author; date on next line */
    .author-details .author-label,
    .author-details .author-name {
        order: 1;
    }

    .author-details .date {
        order: 2;
        flex-basis: 100%;
    }

    .share-button {
        width: 44px;
        height: 44px;
        border-radius: 10px;
        border: 1px solid rgba(255, 255, 255, 0.08);
        background: rgba(255, 255, 255, 0.02);
    }

    body:not(.dark-mode) .share-button {
        border-color: #e5e7eb;
        background: #ffffff;
    }

    /* Tags: inline list, no pills */
    .post-tags-inline {
        align-items: flex-start;
        gap: 10px;
        margin-bottom: 18px;
    }

    .tags-list-inline {
        gap: 0;
    }

    .tag-link {
        background: transparent;
        padding: 0;
        border-radius: 0;
        color: var(--primary-color);
        font-size: 15px;
        font-weight: 500;
        text-decoration: none !important;
    }

    .tag-link:hover {
        background: transparent;
        color: #b02585;
    }

    .tags-list-inline .tag-link:not(:last-child)::after {
        content: ", ";
        color: var(--primary-color);
    }

    /* Share footer: compact icon squares (no long buttons) */
    .share-buttons-footer {
        gap: 12px;
        flex-wrap: nowrap;
    }

    .share-icon-btn {
        width: 44px;
        height: 44px;
        border-radius: 10px;
        cursor: pointer;
        pointer-events: auto;
    }

    .share-footer-btn {
        width: 52px;
        height: 44px;
        padding: 0;
        border-radius: 10px;
        justify-content: center;
        gap: 0;
        font-size: 0; /* hide text, keep icon */
        line-height: 0;
    }

    .share-footer-btn i {
        font-size: 18px;
        margin: 0;
    }

    /* Facebook/Twitter as icon-only (match reference) */
    .share-footer-btn.facebook,
    .share-footer-btn.twitter {
        width: 52px;
        font-size: 0;
        gap: 0;
    }
}

@media (max-width: 1024px) and (min-width: 769px) {
    .related-posts-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
