/*
Theme Name: Logato Theme
Theme URI: https://logame.ir/logato
Author: Logame Team
Author URI: https://logame.ir
Description: A lightweight, efficient Classic WordPress theme with WooCommerce and Elementor support.
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: logato-theme
Tags: classic, woocommerce, elementor-ready, custom-colors, theme-options
*/

/* Base Styles */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    line-height: 1.6;
    color: #333;
    margin: 0;
    padding: 0;
}

/* ========================================
   TOP HEADER STYLES
======================================== */

.top-header {
    background-color: #2c2c2c;
    border-bottom: 2px solid #503AA8;
    font-size: 0.8125em;
    color: #fff;
}

.top-header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 8px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

/* Top Header Right: Secondary Menu */
.top-header-right {
    flex: 1;
}

.secondary-navigation ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 20px;
}

.secondary-navigation li {
    margin: 0;
}

.secondary-navigation a {
    text-decoration: none;
    color: #e0e0e0;
    font-size: 0.875em;
    transition: color 0.3s;
}

.secondary-navigation a:hover {
    color: #FFEE58;
}

/* Top Header Left: Social Icons */
.top-header-left {
    display: flex;
    align-items: center;
}

.top-header-social {
    display: flex;
    gap: 12px;
    align-items: center;
}

.top-header-social .social-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    color: #e0e0e0;
    transition: all 0.3s;
}

.top-header-social .social-icon:hover {
    color: #FFEE58;
    background-color: rgba(255,255,255,0.1);
}

.top-header-social .social-icon svg {
    width: 14px;
    height: 14px;
}

/* Hide top header on mobile */
@media (max-width: 768px) {
    .top-header {
        display: none;
    }
}

/* ========================================
   HEADER STYLES
======================================== */

.site-header {
    background-color: #fff;
    border-bottom: 1px solid #e5e5e5;
    /* Note: sticky positioning is controlled by the "Sticky Header" theme setting */
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 10px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

/* Header Right: Logo + Menu */
.header-right {
    display: flex;
    align-items: center;
    gap: 30px;
    flex: 1;
}

.site-branding {
    flex-shrink: 0;
}

.custom-logo-link {
    display: block;
    line-height: 0;
}

.custom-logo-link img {
    max-width: 100%;
    height: 60px;
    width: auto;
    display: block;
}

.site-title {
    margin: 0;
    font-size: 1.5em;
}

.site-title a {
    text-decoration: none;
}

/* Main Navigation */
.main-navigation {
    flex: 1;
}

#primary-menu {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 5px;
}

#primary-menu > li {
    position: relative;
    margin: 0;
}

#primary-menu > li > a {
    display: block;
    padding: 10px 16px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s;
    border-radius: 4px;
}

#primary-menu > li > a:hover,
#primary-menu > li.current-menu-item > a {
    background-color: #f5f5f5;
}

/* Dropdown Indicator */
.menu-item-has-children > a::after {
    content: "▼";
    font-size: 0.65em;
    margin-left: 6px;
    margin-right: 6px;
    opacity: 0.7;
}

/* Sub-menus (Dropdowns) */
.sub-menu {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    background-color: #fff;
    border: 1px solid #e5e5e5;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    min-width: 220px;
    list-style: none;
    margin: 0;
    padding: 8px 0;
    z-index: 1000;
    border-radius: 4px;
}

.sub-menu li {
    margin: 0;
    position: relative; /* Essential for correctly positioning nested sub-menus */
}

.sub-menu a {
    display: block;
    padding: 10px 20px;
    text-decoration: none;
    transition: background-color 0.3s;
    font-size: 0.95em;
}

.sub-menu a:hover {
    background-color: #f5f5f5;
}

/* Show dropdown on hover (Desktop) */
.menu-item-has-children:hover > .sub-menu {
    display: block;
}

/* Nested sub-menus */
.sub-menu .sub-menu {
    top: -8px; /* Offset the padding of the parent sub-menu to align perfectly with the LI */
    right: 100%;
    margin-right: 0;
}

/* Header Left: Icons */
.header-left {
    display: flex;
    align-items: center;
    gap: 15px;
}

.header-icons {
    display: flex;
    align-items: center;
    gap: 15px;
}

.header-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    transition: all 0.3s;
    position: relative;
    color: #333;
}

.header-icon:hover {
    background-color: #f5f5f5;
}

.header-icon svg {
    width: 20px;
    height: 20px;
}

/* Cart Count Badge */
.cart-count {
    position: absolute;
    top: 2px;
    left: 2px;
    background-color: #503AA8;
    color: #fff;
    font-size: 11px;
    font-weight: bold;
    min-width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
}

/* Mobile Menu Toggle (Hamburger) */
.menu-toggle {
    display: none;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 8px;
    flex-direction: column;
    gap: 4px;
    width: 40px;
    height: 40px;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: background-color 0.3s;
}

.menu-toggle:hover {
    background-color: #f5f5f5;
}

.menu-toggle-icon {
    display: block;
    width: 24px;
    height: 2px;
    background-color: #333;
    transition: all 0.3s;
}

/* Hide mobile-only sections on desktop */
.mobile-secondary-menu,
.mobile-social-icons {
    display: none;
}

/* Mobile Styles */
@media (max-width: 768px) {
    .header-container {
        padding: 12px 15px;
    }

    /* Mobile Menu Drawer */
    .main-navigation {
        position: fixed;
        top: 0;
        right: -100%;
        width: 280px;
        height: 100vh;
        background-color: #fff;
        box-shadow: -2px 0 8px rgba(0,0,0,0.15);
        transition: right 0.3s ease-in-out;
        overflow-y: auto;
        z-index: 9999;
        padding: 20px 0;
    }

    .main-navigation.toggled {
        right: 0;
    }

    /* Mobile Menu Overlay */
    .main-navigation::before {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        right: 280px;
        bottom: 0;
        background-color: rgba(0,0,0,0.5);
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.3s, visibility 0.3s;
        z-index: -1;
    }

    .main-navigation.toggled::before {
        opacity: 1;
        visibility: visible;
    }

    /* Mobile Menu Header */
    .main-navigation::after {
        content: attr(data-close-text);
        position: absolute;
        top: 15px;
        left: 15px;
        font-size: 14px;
        color: #666;
        font-weight: 500;
    }

    #primary-menu {
        flex-direction: column;
        padding: 50px 0 20px;
        margin: 0;
    }

    #primary-menu > li {
        border-bottom: 1px solid #f0f0f0;
    }

    #primary-menu > li:last-child {
        border-bottom: none;
    }

    #primary-menu > li > a {
        padding: 16px 20px;
        border-radius: 0;
        font-size: 16px;
    }

    /* Mobile dropdowns */
    .sub-menu {
        position: static;
        display: none;
        border: none;
        box-shadow: none;
        background-color: #f9f9f9;
        padding: 0;
        border-radius: 0;
    }

    .menu-item-has-children.toggled > .sub-menu {
        display: block;
    }

    .sub-menu a {
        padding: 14px 20px 14px 40px;
        font-size: 15px;
    }

    .sub-menu .sub-menu a {
        padding-left: 60px;
    }

    /* Mobile Drawer: Secondary Menu */
    .mobile-secondary-menu {
        display: block;
        margin-top: 30px;
        padding-top: 20px;
        border-top: 1px solid #e5e5e5;
    }

    .mobile-menu-title {
        font-size: 0.875em;
        font-weight: 600;
        text-transform: uppercase;
        color: #666;
        margin: 0 20px 15px;
        letter-spacing: 0.5px;
    }

    #mobile-secondary-menu {
        list-style: none;
        margin: 0;
        padding: 0;
    }

    #mobile-secondary-menu li {
        border-bottom: 1px solid #f5f5f5;
    }

    #mobile-secondary-menu li:last-child {
        border-bottom: none;
    }

    #mobile-secondary-menu a {
        display: block;
        padding: 12px 20px;
        text-decoration: none;
        font-size: 0.95em;
        color: #666;
        transition: background-color 0.3s;
    }

    #mobile-secondary-menu a:hover {
        background-color: #f9f9f9;
    }

    /* Mobile Drawer: Social Icons */
    .mobile-social-icons {
        display: block;
        margin-top: 30px;
        padding: 20px;
        border-top: 1px solid #e5e5e5;
    }

    .mobile-social-links {
        display: flex;
        flex-wrap: wrap;
        gap: 15px;
        justify-content: center;
        margin-top: 15px;
    }

    .mobile-social-icon {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 44px;
        height: 44px;
        border-radius: 50%;
        background-color: #f5f5f5;
        color: #333;
        transition: all 0.3s;
    }

    .mobile-social-icon:hover {
        background-color: #503AA8;
        color: #fff;
        transform: translateY(-2px);
    }

    .mobile-social-icon svg {
        width: 20px;
        height: 20px;
    }

    /* Show hamburger menu */
    .menu-toggle {
        display: flex;
        z-index: 10000;
    }

    /* Hamburger animation */
    .menu-toggle.active .menu-toggle-icon:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }

    .menu-toggle.active .menu-toggle-icon:nth-child(2) {
        opacity: 0;
    }

    .menu-toggle.active .menu-toggle-icon:nth-child(3) {
        transform: rotate(-45deg) translate(6px, -6px);
    }

    /* Adjust header layout for mobile */
    .header-right {
        gap: 15px;
    }

    .custom-logo-link img {
        height: 45px;
    }

    /* Hide some icons on very small screens */
    @media (max-width: 480px) {
        .header-icons {
            gap: 8px;
        }

        .header-icon {
            width: 36px;
            height: 36px;
        }

        .main-navigation {
            width: 85%;
            max-width: 320px;
        }

        .main-navigation::before {
            right: 85%;
        }
    }
}

/* ========================================
   PAGE CONTAINERS
======================================== */

/* Default Page Container - Aligned with header */
.page-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
}

/* Full Width Page Container - No max-width constraint */
.page-container-full-width {
    width: 100%;
    padding: 0;
}

.page-container-full-width .site-main {
    padding: 0;
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .page-container {
        padding: 30px 15px;
    }
}

/* Content Area with Sidebar Layout */
.content-area-with-sidebar {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 40px;
}

@media (max-width: 768px) {
    .content-area-with-sidebar {
        grid-template-columns: 1fr;
    }
}

/* Main Content */
.site-main {
    min-width: 0;
}

/* Entry Styles */
.entry-header {
    margin-bottom: 20px;
}

.entry-title {
    font-size: 2em;
    margin: 0 0 10px;
}

.entry-meta {
    font-size: 0.9em;
    color: #666;
    margin-bottom: 20px;
}

.entry-content {
    line-height: 1.8;
}

.post-thumbnail {
    margin-bottom: 20px;
}

.post-thumbnail img {
    width: 100%;
    height: auto;
    display: block;
}

/* Sidebar */
.widget-area {
    font-size: 0.95em;
}

.widget {
    margin-bottom: 30px;
}

.widget-title {
    font-size: 1.3em;
    margin-bottom: 15px;
    font-weight: 600;
}

/* Footer Navigation */
.footer-navigation {
    background-color: #2c2c2c;
    padding: 20px;
    text-align: center;
}

.footer-menu-container ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 20px;
}

.footer-menu-container li {
    margin: 0;
}

.footer-menu-container a {
    color: #fff;
    text-decoration: none;
    font-size: 0.95em;
}

.footer-menu-container a:hover {
    color: #ddd;
}

/* Footer Widgets */
.footer-widgets {
    background-color: #f5f5f5;
    padding: 40px 20px;
}

.footer-widgets-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.footer-column .widget {
    margin-bottom: 20px;
}

.footer-column .widget-title {
    font-size: 1.2em;
    margin-bottom: 15px;
    font-weight: 600;
}

/* Site Info / Copyright */
.site-info {
    background-color: #333;
    color: #fff;
    padding: 20px;
    text-align: center;
}

.site-info-inner {
    max-width: 1200px;
    margin: 0 auto;
}

.site-info a {
    color: #fff;
    text-decoration: none;
}

.site-info a:hover {
    text-decoration: underline;
}

.site-info p {
    margin: 5px 0;
}

/* ========================================
   SIDEBAR WIDGETS
======================================== */

.widget-area {
    padding: 20px;
}

.widget {
    background-color: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    padding: 24px;
    margin-bottom: 30px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    transition: box-shadow 0.3s;
}

.widget:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.widget:last-child {
    margin-bottom: 0;
}

.widget-title {
    font-size: 1.125em;
    font-weight: 700;
    margin: 0 0 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid #503AA8;
    color: #1a1a1a;
}

/* Search Widget */
.widget_search .search-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.widget_search .search-field {
    width: 100%;
    max-width: 100%;
    padding: 12px 16px;
    border: 2px solid #e5e5e5;
    border-radius: 6px;
    font-size: 0.9375em;
    transition: all 0.3s;
}

.widget_search .search-field:focus {
    outline: none;
}

.widget_search .search-submit {
    width: 100%;
    max-width: 100%;
    padding: 12px 24px;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.widget_search .search-submit:hover {
    transform: translateY(-1px);
}

/* Recent Posts & Lists */
.widget ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.widget ul li {
    padding: 12px 0;
    border-bottom: 1px solid #f0f0f0;
    position: relative;
    padding-right: 20px;
}

.widget ul li:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.widget ul li:first-child {
    padding-top: 0;
}

.widget ul li::before {
    content: "→";
    position: absolute;
    right: 0;
    top: 12px;
    color: #503AA8;
    font-weight: bold;
    opacity: 0;
    transition: opacity 0.3s, transform 0.3s;
}

.widget ul li:hover::before {
    opacity: 1;
    transform: translateX(-5px);
}

.widget ul li a {
    color: #333;
    text-decoration: none;
    font-size: 0.9375em;
    line-height: 1.6;
    display: block;
    transition: color 0.3s;
}

.widget ul li a:hover {
    color: #503AA8;
}

/* Recent Posts with Date */
.widget_recent_entries .post-date {
    display: block;
    font-size: 0.8125em;
    color: #999;
    margin-top: 4px;
}

/* Categories Widget */
.widget_categories select,
.widget_archive select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e5e5e5;
    border-radius: 6px;
    font-size: 0.9375em;
    background-color: #fff;
    cursor: pointer;
    transition: border-color 0.3s;
}

.widget_categories select:focus,
.widget_archive select:focus {
    outline: none;
    border-color: #503AA8;
}

/* Tag Cloud */
.widget_tag_cloud .tagcloud a {
    display: inline-block;
    padding: 6px 14px;
    margin: 0 4px 8px 0;
    background-color: #f5f5f5;
    border-radius: 20px;
    text-decoration: none;
    font-size: 0.875em !important;
    color: #666;
    transition: all 0.3s;
}

.widget_tag_cloud .tagcloud a:hover {
    background-color: #503AA8;
    color: #fff;
}

/* Calendar Widget */
.widget_calendar table {
    width: 100%;
    border-collapse: collapse;
}

.widget_calendar caption {
    font-weight: 700;
    margin-bottom: 10px;
    color: #1a1a1a;
}

.widget_calendar th,
.widget_calendar td {
    padding: 8px;
    text-align: center;
    border: 1px solid #f0f0f0;
}

.widget_calendar th {
    background-color: #f9f9f9;
    font-weight: 600;
    font-size: 0.875em;
}

.widget_calendar td a {
    color: #503AA8;
    text-decoration: none;
    font-weight: 600;
}

.widget_calendar td a:hover {
    text-decoration: underline;
}

/* RSS Widget */
.widget_rss ul li {
    padding: 16px 0;
}

.widget_rss .rsswidget {
    font-weight: 600;
    color: #1a1a1a;
}

.widget_rss .rss-date {
    display: block;
    font-size: 0.8125em;
    color: #999;
    margin-top: 4px;
}

.widget_rss .rssSummary {
    margin-top: 8px;
    font-size: 0.9375em;
    line-height: 1.6;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .widget-area {
        padding: 15px;
    }
    
    .widget {
        padding: 20px;
        margin-bottom: 20px;
    }
}

/* ========================================
   FOOTER WIDGETS
======================================== */

.footer-widgets {
    background-color: #f9f9f9;
    padding: 60px 20px;
    border-top: 1px solid #e5e5e5;
}

.footer-widgets-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    gap: 40px;
}

/* Dynamic column layouts */
.footer-columns-1 {
    grid-template-columns: 1fr;
}

.footer-columns-2 {
    grid-template-columns: repeat(2, 1fr);
}

.footer-columns-3 {
    grid-template-columns: repeat(3, 1fr);
}

.footer-columns-4 {
    grid-template-columns: repeat(4, 1fr);
}

.footer-column {
    min-width: 0;
}

/* Footer widget styling */
.footer-column .widget {
    margin-bottom: 30px;
    /* Override generic widget card styles for footer */
    background-color: transparent;
    border: none;
    box-shadow: none;
    padding: 0;
}

.footer-column .widget:hover {
    box-shadow: none;
}

.footer-column .widget:last-child {
    margin-bottom: 0;
}

.footer-column .widget-title {
    font-size: 1.125em;
    font-weight: 700;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid #503AA8;
    color: #1a1a1a !important;
}

/* Footer widget text content */
.footer-column .widget,
.footer-column .widget p,
.footer-column .widget .textwidget,
.footer-column .widget .textwidget p {
    color: #333 !important;
}

.footer-column ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-column ul li {
    margin-bottom: 10px;
    padding: 0;
    border-bottom: none;
}

.footer-column ul li::before {
    display: none;
}

.footer-column ul li a {
    color: #666 !important;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-column ul li a:hover {
    color: #503AA8 !important;
}

/* Responsive footer columns */
@media (max-width: 992px) {
    .footer-columns-4 {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .footer-columns-3 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .footer-widgets {
        padding: 40px 15px;
    }
    
    .footer-columns-2,
    .footer-columns-3,
    .footer-columns-4 {
        grid-template-columns: 1fr;
        gap: 30px;
    }
}

/* ========================================
   SINGLE POST STYLES
======================================== */

/* Full-Width Single Post Container */
.single-post-container-full-width {
    max-width: 800px;
    margin: 0 auto;
    padding: 60px 20px;
}

.single-post-full-width {
    width: 100%;
}

/* Entry Header */
.entry-header {
    margin-bottom: 30px;
}

.entry-categories {
    margin-bottom: 16px;
}

.entry-categories a {
    display: inline-block;
    padding: 6px 14px;
    background-color: #f5f5f5;
    border-radius: 20px;
    text-decoration: none;
    font-size: 0.875em;
    font-weight: 500;
    color: #503AA8;
    margin-left: 8px;
    transition: all 0.3s;
}

.entry-categories a:hover {
    background-color: #503AA8;
    color: #fff;
}

.entry-title {
    font-size: 2.5em;
    font-weight: 700;
    line-height: 1.2;
    margin: 0 0 20px;
    color: #1a1a1a;
}

/* Entry Meta */
.entry-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    font-size: 0.9375em;
    color: #666;
    padding-bottom: 24px;
    border-bottom: 1px solid #e5e5e5;
}

.entry-meta span {
    display: flex;
    align-items: center;
    gap: 8px;
}

.entry-meta svg {
    flex-shrink: 0;
    opacity: 0.7;
}

.entry-meta a {
    color: #333;
    text-decoration: none;
    font-weight: 500;
}

.entry-meta a:hover {
    color: #503AA8;
}

/* Featured Image */
.post-thumbnail {
    margin: 30px 0;
    border-radius: 12px;
    overflow: hidden;
}

.post-thumbnail img {
    width: 100%;
    height: auto;
    display: block;
}

/* Entry Content */
.entry-content {
    font-size: 1.0625em;
    line-height: 1.8;
    color: #333;
    margin: 40px 0;
}

.entry-content h2 {
    font-size: 1.875em;
    font-weight: 700;
    margin: 48px 0 24px;
    color: #1a1a1a;
    line-height: 1.3;
}

.entry-content h3 {
    font-size: 1.5em;
    font-weight: 600;
    margin: 36px 0 20px;
    color: #1a1a1a;
}

.entry-content p {
    margin-bottom: 24px;
}

.entry-content ul,
.entry-content ol {
    margin: 24px 0;
    padding-right: 24px;
}

.entry-content li {
    margin-bottom: 12px;
}

.entry-content blockquote {
    border-right: 4px solid #503AA8;
    padding: 20px 24px;
    margin: 32px 0;
    background-color: #f9f9f9;
    font-style: italic;
    color: #555;
    border-radius: 4px;
}

.entry-content a {
    color: #503AA8;
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
}

.entry-content a:hover {
    color: #3d2d85;
}

/* Entry Footer (Tags) */
.entry-footer {
    padding: 24px 0;
    border-top: 1px solid #e5e5e5;
    border-bottom: 1px solid #e5e5e5;
}

.tags-links {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.tags-links svg {
    flex-shrink: 0;
    color: #666;
}

.tags-links a {
    display: inline-block;
    padding: 8px 16px;
    background-color: #f5f5f5;
    border-radius: 20px;
    text-decoration: none;
    font-size: 0.875em;
    color: #666;
    transition: all 0.3s;
    font-weight: 500;
}

.tags-links a:hover {
    background-color: #503AA8;
    color: #fff;
}

/* Post Navigation */
.post-navigation {
    padding: 32px 0;
}

.nav-links {
    display: flex;
    justify-content: space-between;
    gap: 24px;
    max-width: 100%;
}

.nav-previous,
.nav-next {
    flex: 0 1 auto;
    max-width: 48%;
}

.nav-previous a,
.nav-next a {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    padding: 16px;
    background-color: #f9f9f9;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.3s;
    max-height: 85px;
    border: 2px solid transparent;
}

.nav-previous a:hover,
.nav-next a:hover {
    background-color: #503AA8;
    color: #fff;
    border-color: #503AA8;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(80, 58, 168, 0.2);
}

.nav-subtitle {
    display: block;
    font-size: 0.8125em;
    color: #999;
    margin-bottom: 6px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.nav-previous a:hover .nav-subtitle,
.nav-next a:hover .nav-subtitle {
    color: rgba(255,255,255,0.8);
}

.nav-title {
    display: block;
    font-weight: 600;
    font-size: 1em;
    color: #1a1a1a;
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    line-clamp: 1;
    -webkit-box-orient: vertical;
    max-width: 250px;
}

.nav-previous a:hover .nav-title,
.nav-next a:hover .nav-title {
    color: #fff;
}

/* Single post with sidebar - adjust*/
.content-area-with-sidebar .entry-title {
    font-size: 2.25em;
}

.content-area-with-sidebar .entry-content {
    font-size: 1em;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .single-post-container-full-width {
        padding: 40px 15px;
    }

    .entry-title {
        font-size: 1.875em;
    }

    .content-area-with-sidebar .entry-title {
        font-size: 1.75em;
    }

    .entry-content {
        font-size: 1em;
    }

    .entry-content h2 {
        font-size: 1.5em;
    }

    .entry-content h3 {
        font-size: 1.25em;
    }

    .nav-links {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .entry-meta {
        gap: 16px;
    }
}

/* ========================================
   COMMENTS SECTION STYLES
======================================== */

.comments-area {
    padding-top: 48px;
    border-top: 1px solid #e5e5e5;
}

.comments-title {
    font-size: 1.75em;
    font-weight: 700;
    margin-bottom: 32px;
    color: #1a1a1a;
}

/* Comment List */
.comment-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.comment-list .children {
    list-style: none;
    margin: 0;
    padding: 0 0 0 48px;
}

/* Individual Comment */
.comment-body {
    display: flex;
    gap: 20px;
    padding: 24px 0;
    border-bottom: 1px solid #f0f0f0;
}

.comment-author-avatar {
    flex-shrink: 0;
}

.comment-author-avatar img {
    border-radius: 50%;
    width: 48px;
    height: 48px;
}

.comment-content-wrap {
    flex: 1;
    min-width: 0;
}

/* Comment Meta */
.comment-meta {
    margin-bottom: 12px;
}

.comment-author {
    margin-bottom: 4px;
}

.comment-author .fn {
    font-size: 1em;
    font-weight: 600;
    color: #1a1a1a;
}

.comment-author a {
    text-decoration: none;
    color: #1a1a1a;
}

.comment-author a:hover {
    color: #503AA8;
}

.comment-metadata {
    font-size: 0.875em;
    color: #999;
}

.comment-metadata a {
    color: #999;
    text-decoration: none;
}

.comment-metadata a:hover {
    color: #503AA8;
}

.comment-metadata .edit-link {
    margin-left: 12px;
}

.comment-metadata .edit-link::before {
    content: "• ";
    margin-right: 8px;
}

/* Comment Content */
.comment-content {
    margin: 16px 0;
    line-height: 1.7;
    color: #333;
}

.comment-content p {
    margin-bottom: 12px;
}

.comment-content p:last-child {
    margin-bottom: 0;
}

/* Reply Link */
.reply {
    margin-top: 12px;
}

.reply a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background-color: #f5f5f5;
    border-radius: 20px;
    text-decoration: none;
    font-size: 0.875em;
    font-weight: 500;
    color: #666;
    transition: all 0.3s;
}

.reply a:hover {
    background-color: #503AA8;
    color: #fff;
}

/* Awaiting Moderation */
.comment-awaiting-moderation {
    padding: 12px 16px;
    background-color: #fff3cd;
    border-left: 4px solid #ffc107;
    border-radius: 4px;
    font-size: 0.875em;
    color: #856404;
    margin: 12px 0;
}

/* Comment Navigation */
.comment-navigation {
    margin: 32px 0;
    padding: 20px 0;
    border-top: 1px solid #e5e5e5;
    border-bottom: 1px solid #e5e5e5;
}

.comment-navigation .nav-links {
    display: flex;
    justify-content: space-between;
    gap: 16px;
}

.comment-navigation a {
    padding: 10px 20px;
    background-color: #f5f5f5;
    border-radius: 6px;
    text-decoration: none;
    color: #333;
    font-weight: 500;
    transition: all 0.3s;
}

.comment-navigation a:hover {
    background-color: #503AA8;
    color: #fff;
}

/* No Comments Message */
.no-comments {
    padding: 24px;
    background-color: #f9f9f9;
    border-radius: 8px;
    text-align: center;
    color: #666;
    font-style: italic;
}

/* Comment Form */
.comment-respond {
    margin-top: 48px;
    padding: 32px;
    background-color: #f9f9f9;
    border-radius: 12px;
}

.comment-reply-title {
    font-size: 1.5em;
    font-weight: 700;
    margin-bottom: 24px;
    color: #1a1a1a;
}

.comment-reply-title small {
    font-size: 0.6em;
    font-weight: 400;
    margin-left: 12px;
}

.comment-reply-title small a {
    color: #503AA8;
    text-decoration: none;
}

.comment-reply-title small a:hover {
    text-decoration: underline;
}

.comment-form {
    display: grid;
    gap: 20px;
}

/* Fix WordPress default <p> wrapper margins */
.comment-form p {
    margin: 0;
}

.comment-form-comment,
.comment-form-author,
.comment-form-email,
.comment-form-url {
    margin: 0;
}

/* Ensure all form elements use border-box */
.comment-form *,
.comment-form *::before,
.comment-form *::after {
    box-sizing: border-box;
}

.comment-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #333;
    font-size: 0.9375em;
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e5e5e5;
    border-radius: 8px;
    font-size: 1em;
    font-family: inherit;
    transition: all 0.3s;
    background-color: #fff;
}

.comment-form input[type="text"]:focus,
.comment-form input[type="email"]:focus,
.comment-form input[type="url"]:focus,
.comment-form textarea:focus {
    outline: none;
    border-color: #503AA8;
    box-shadow: 0 0 0 3px rgba(80, 58, 168, 0.1);
}

.comment-form textarea {
    min-height: 150px;
    resize: vertical;
}

.comment-form .submit-button,
.comment-form input[type="submit"],
.comment-form #submit {
    padding: 14px 32px;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    justify-self: start;
}

.comment-form .submit-button:hover,
.comment-form input[type="submit"]:hover,
.comment-form #submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(80, 58, 168, 0.3);
}

.comment-form .submit-button:active,
.comment-form input[type="submit"]:active,
.comment-form #submit:active {
    transform: translateY(0);
}

/* Form Notes */
.comment-notes,
.logged-in-as {
    font-size: 0.875em;
    color: #666;
    margin-bottom: 20px;
}

.comment-notes a,
.logged-in-as a {
    color: #503AA8;
    text-decoration: none;
}

.comment-notes a:hover,
.logged-in-as a:hover {
    text-decoration: underline;
}

.required {
    color: #d32f2f;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .comments-area {
        margin-top: 48px;
        padding-top: 32px;
    }

    .comments-title {
        font-size: 1.5em;
    }

    .comment-list .children {
        padding-left: 24px;
    }

    .comment-body {
        gap: 12px;
    }

    .comment-author-avatar img {
        width: 40px;
        height: 40px;
    }

    .comment-respond {
        padding: 24px 20px;
    }

    .comment-reply-title {
        font-size: 1.25em;
    }
}

/* ========================================
   404 ERROR PAGE
======================================== */

.error-404-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 80px 20px;
}

.error-404 {
    text-align: center;
}

.error-404-content {
    max-width: 700px;
    margin: 0 auto 60px;
}

.error-404-number {
    font-size: 10em;
    font-weight: 900;
    line-height: 1;
    color: #f0f0f0;
    margin-bottom: 20px;
    text-shadow: 2px 2px 0 #e5e5e5;
}

.error-404-title {
    font-size: 2.5em;
    font-weight: 700;
    margin-bottom: 20px;
    color: #1a1a1a;
}

.error-404-text {
    font-size: 1.125em;
    line-height: 1.8;
    color: #666;
    margin-bottom: 40px;
}

.error-404-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

.button-home,
.button-back {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 28px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
}

.button-home {
    background-color: #503AA8;
    color: #fff;
    border: 2px solid #503AA8;
}

.button-home:hover {
    background-color: #3d2d85;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(80, 58, 168, 0.3);
}

.button-back {
    background-color: transparent;
    color: #503AA8;
    border: 2px solid #503AA8;
}

.button-back:hover {
    background-color: #503AA8;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(80, 58, 168, 0.2);
}

/* 404 Widgets Section */
.error-404-widgets {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
    max-width: 1000px;
    margin: 0 auto;
    text-align: right;
}

.error-404-search,
.error-404-recent,
.error-404-categories {
    background-color: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    padding: 30px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.error-404-widgets h2 {
    font-size: 1.25em;
    font-weight: 700;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid #503AA8;
    color: #1a1a1a;
}

.error-404-search .search-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.error-404-search .search-field {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e5e5e5;
    border-radius: 6px;
    font-size: 1em;
    transition: border-color 0.3s;
}

.error-404-search .search-field:focus {
    outline: none;
    border-color: #503AA8;
}

.error-404-search .search-submit {
    width: 100%;
    padding: 12px 24px;
    background-color: #503AA8;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.error-404-search .search-submit:hover {
    background-color: #3d2d85;
    transform: translateY(-1px);
}

.error-404-recent ul,
.error-404-categories ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.error-404-recent ul li {
    padding: 12px 0;
    border-bottom: 1px solid #f0f0f0;
}

.error-404-recent ul li:last-child {
    border-bottom: none;
}

.error-404-recent ul li a {
    color: #333;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
    display: block;
    margin-bottom: 4px;
}

.error-404-recent ul li a:hover {
    color: #503AA8;
}

.error-404-recent .post-date {
    font-size: 0.875em;
    color: #999;
}

.error-404-categories ul li {
    padding: 8px 0;
}

.error-404-categories ul li a {
    color: #333;
    text-decoration: none;
    transition: color 0.3s;
}

.error-404-categories ul li a:hover {
    color: #503AA8;
}

.error-404-categories .count {
    color: #999;
    font-size: 0.875em;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .error-404-container {
        padding: 60px 15px;
    }
    
    .error-404-number {
        font-size: 6em;
    }
    
    .error-404-title {
        font-size: 1.875em;
    }
    
    .error-404-text {
        font-size: 1em;
    }
    
    .error-404-actions {
        flex-direction: column;
    }
    
    .button-home,
    .button-back {
        width: 100%;
        justify-content: center;
    }
    
    .error-404-widgets {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .error-404-search,
    .error-404-recent,
    .error-404-categories {
        padding: 24px;
    }
}

/* ========================================
   SEARCH RESULTS PAGE
======================================== */

.search-results-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 40px;
}

.search-results {
    min-width: 0;
}

/* Search Header */
.search-header {
    margin-bottom: 40px;
    padding-bottom: 30px;
    border-bottom: 2px solid #e5e5e5;
}

.search-title {
    font-size: 2em;
    font-weight: 700;
    margin-bottom: 12px;
    color: #1a1a1a;
}

.search-title span {
    color: #503AA8;
}

.search-count {
    font-size: 1em;
    color: #666;
    margin-bottom: 24px;
}

.search-form-wrapper {
    max-width: 100%;
}

.search-form-wrapper .search-form {
    display: flex;
    flex-direction: row; /* Changed from column to row */
    gap: 12px;
}

.search-form-wrapper .search-form label {
    width: 100%;
}

.search-form-wrapper .search-field {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid #e5e5e5;
    border-radius: 8px;
    font-size: 1em;
    transition: border-color 0.3s;
}

.search-form-wrapper .search-field:focus {
    outline: none;
    border-color: #503AA8;
}

.search-form-wrapper .search-submit {
    width: auto; /* Allow auto width */
    min-width: 120px;
    padding: 14px 24px;
    background-color: #503AA8;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.search-form-wrapper .search-submit:hover {
    background-color: #3d2d85;
    transform: translateY(-1px);
}

/* Search Results List */
.search-results-list {
    display: grid;
    gap: 30px;
}

.search-result-item {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 24px;
    background-color: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 12px;
    padding: 24px;
    transition: all 0.3s;
}

.search-result-item:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.search-result-thumbnail {
    overflow: hidden;
    border-radius: 8px;
}

.search-result-thumbnail img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    transition: transform 0.3s;
}

.search-result-item:hover .search-result-thumbnail img {
    transform: scale(1.05);
}

.search-result-content {
    display: flex;
    flex-direction: column;
}

.search-result-categories {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.search-result-categories a {
    display: inline-block;
    padding: 4px 12px;
    background-color: #f5f5f5;
    border-radius: 4px;
    font-size: 0.8125em;
    color: #666;
    text-decoration: none;
    transition: all 0.3s;
}

.search-result-categories a:hover {
    background-color: #503AA8;
    color: #fff;
}

.search-result-title {
    font-size: 1.5em;
    font-weight: 700;
    margin-bottom: 12px;
    line-height: 1.4;
}

.search-result-title a {
    color: #1a1a1a;
    text-decoration: none;
    transition: color 0.3s;
}

.search-result-title a:hover {
    color: #503AA8;
}

.search-result-meta {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    margin-bottom: 16px;
    font-size: 0.875em;
    color: #999;
}

.search-result-meta span {
    display: flex;
    align-items: center;
    gap: 6px;
}

.search-result-meta svg {
    opacity: 0.7;
}

.search-result-type {
    padding: 2px 8px;
    background-color: #f0f0f0;
    border-radius: 4px;
    font-size: 0.9em;
}

.search-result-excerpt {
    flex: 1;
    margin-bottom: 16px;
    line-height: 1.7;
    color: #666;
}

.search-result-excerpt p {
    margin: 0;
}

.search-result-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #503AA8;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9375em;
    transition: gap 0.3s;
}

.search-result-link:hover {
    gap: 10px;
}

/* RTL Support for Read More Arrow */
body.rtl .search-result-link svg,
body.rtl .post-card-link svg {
    transform: scaleX(-1); /* Flip the arrow horizontally */
}

/* RTL Support for Pagination Arrows */
body.rtl .pagination .prev svg,
body.rtl .pagination .next svg {
    transform: scaleX(-1);
}

body.rtl .widget ul li::before {
    left: 0;
    transform: scaleX(-1);
    right: auto;
    color: #503AA8;
}

/* Mobile Adjustments for Search Form */
@media (max-width: 480px) {
    .search-form-wrapper .search-form {
        flex-direction: column;
    }
    
    .search-form-wrapper .search-submit {
        width: 100%;
    }
}

/* No Results */
.no-results {
    text-align: center;
    padding: 60px 20px;
}

.no-results-icon {
    margin-bottom: 24px;
    color: #ddd;
}

.no-results-title {
    font-size: 2em;
    font-weight: 700;
    margin-bottom: 16px;
    color: #1a1a1a;
}

.no-results-text {
    font-size: 1.125em;
    color: #666;
    margin-bottom: 40px;
    line-height: 1.7;
}

.no-results-suggestions {
    max-width: 600px;
    margin: 0 auto 40px;
    padding: 30px;
    background-color: #f9f9f9;
    border-radius: 8px;
    text-align: right;
}

.no-results-suggestions h3 {
    font-size: 1.25em;
    font-weight: 700;
    margin-bottom: 16px;
    color: #1a1a1a;
}

.no-results-suggestions ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.no-results-suggestions ul li {
    padding: 8px 0;
    color: #666;
    position: relative;
    padding-right: 20px;
}

.no-results-suggestions ul li::before {
    content: "•";
    position: absolute;
    right: 0;
    color: #503AA8;
    font-weight: bold;
}

.no-results-categories {
    max-width: 800px;
    margin: 0 auto;
}

.no-results-categories h3 {
    font-size: 1.25em;
    font-weight: 700;
    margin-bottom: 20px;
    color: #1a1a1a;
}

.category-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
}

.category-list ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: contents;
}

.category-list li {
    background-color: #f5f5f5;
    border-radius: 6px;
    padding: 12px 16px;
    transition: all 0.3s;
}

.category-list li:hover {
    background-color: #503AA8;
}

.category-list li a {
    color: #333;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

.category-list li:hover a {
    color: #fff;
}

.category-list .count {
    color: #999;
    font-size: 0.875em;
    margin-right: 6px;
}

.category-list li:hover .count {
    color: rgba(255, 255, 255, 0.8);
}

/* Pagination */
.pagination {
    margin-top: 60px;
    text-align: center;
}

.pagination .nav-links {
    display: flex;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
}

.pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    height: 44px;
    padding: 0 12px;
    background-color: #f5f5f5;
    border-radius: 6px;
    color: #333;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s;
}

.pagination .page-numbers:hover {
    background-color: #503AA8;
    color: #fff;
}

.pagination .page-numbers.current {
    background-color: #503AA8;
    color: #fff;
}

.pagination .page-numbers svg {
    vertical-align: middle;
}

/* Mobile Responsiveness */
@media (max-width: 992px) {
    .search-results-container {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .search-results-container {
        padding: 30px 15px;
    }
    
    .search-title {
        font-size: 1.5em;
    }
    
    .search-result-item {
        grid-template-columns: 1fr;
        padding: 20px;
    }
    
    .search-result-thumbnail img {
        height: 200px;
    }
    
    .search-result-title {
        font-size: 1.25em;
    }
    
    .no-results {
        padding: 40px 15px;
    }
    
    .no-results-title {
        font-size: 1.5em;
    }
    
    .category-list {
        grid-template-columns: 1fr;
    }
}

/* ========================================
   SEARCH MODAL
======================================== */

.search-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    visibility: hidden;
    opacity: 0;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-modal.active {
    visibility: visible;
    opacity: 1;
}

.search-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.98);
}

.search-modal-container {
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: 800px;
    padding: 40px;
    text-align: center;
}

.search-modal-close {
    position: absolute;
    top: -40px;
    right: 40px;
    background: none;
    border: none;
    color: #1a1a1a;
    cursor: pointer;
    padding: 10px;
    transition: transform 0.3s;
}

.search-modal-close:hover {
    transform: rotate(90deg);
}

.search-modal-title {
    font-size: 2.5em;
    font-weight: 700;
    margin-bottom: 40px;
    color: #1a1a1a;
}

.search-modal-content .search-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
    max-width: 600px;
    margin: 0 auto;
}

.search-modal-content .search-field {
    width: 100%;
    font-size: 2em;
    padding: 20px 0;
    border: none;
    border-bottom: 3px solid #e5e5e5;
    background: none;
    text-align: center;
    color: #1a1a1a;
    transition: border-color 0.3s;
}

.search-modal-content .search-field:focus {
    outline: none;
    border-color: #503AA8;
}

.search-modal-content .search-submit {
    display: none; /* Hide button, use enter to search */
}

@media (max-width: 768px) {
    .search-modal-container {
        padding: 20px;
    }
    
    .search-modal-title {
        font-size: 1.5em;
        margin-bottom: 30px;
    }
    
    .search-modal-content .search-field {
        font-size: 1.25em;
    }
    
    .search-modal-close {
        right: 20px;
    }
}

/* ========================================
   AUTHOR ARCHIVE PAGE
======================================== */

.author-archive-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 40px;
}

.author-archive {
    min-width: 0;
}

/* Author Header & Card */
.author-header {
    margin-bottom: 50px;
}

.author-card {
    background-color: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 16px;
    padding: 40px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.author-card-top {
    display: flex;
    gap: 30px;
    align-items: center;
}

.author-avatar img {
    border-radius: 50%;
    border: 4px solid #f0f0f0;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.author-info {
    flex: 1;
}

.author-name {
    font-size: 2em;
    font-weight: 800;
    margin-bottom: 12px;
    color: #1a1a1a;
}

.author-bio {
    font-size: 1.0625em;
    line-height: 1.7;
    color: #555;
    margin-bottom: 20px;
    max-width: 700px;
}

.author-stats {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9375em;
    color: #777;
    background-color: #f8f8f8;
    padding: 6px 16px;
    border-radius: 50px;
}

.stat-item svg {
    color: #503AA8;
}

.stat-item a {
    color: #777;
    text-decoration: none;
    transition: color 0.3s;
}

.stat-item a:hover {
    color: #503AA8;
}

/* Author Posts Grid */
.author-posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 50px;
}

.author-post-card {
    background-color: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.author-post-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border-color: #503AA8;
}

.post-card-thumbnail {
    position: relative;
    overflow: hidden;
}

.post-card-thumbnail img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    transition: transform 0.5s;
}

.author-post-card:hover .post-card-thumbnail img {
    transform: scale(1.08);
}

.post-card-categories {
    position: absolute;
    bottom: 15px;
    right: 15px;
}

.post-card-categories a {
    background-color: #503AA8;
    color: #fff;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 0.75em;
    font-weight: 600;
    text-decoration: none;
}

.post-card-content {
    padding: 24px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.post-card-meta {
    font-size: 0.8125em;
    color: #999;
    margin-bottom: 10px;
}

.post-card-title {
    font-size: 1.25em;
    font-weight: 700;
    margin-bottom: 15px;
    line-height: 1.4;
}

.post-card-title a {
    color: #1a1a1a;
    text-decoration: none;
    transition: color 0.3s;
}

.post-card-title a:hover {
    color: #503AA8;
}

.post-card-excerpt {
    font-size: 0.9375em;
    line-height: 1.6;
    color: #666;
    margin-bottom: 20px;
    flex: 1;
}

.post-card-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #503AA8;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.875em;
    transition: all 0.3s;
}

.post-card-link:hover {
    gap: 10px;
}

.no-posts-found {
    padding: 60px;
    background-color: #f9f9f9;
    border-radius: 12px;
    text-align: center;
    color: #666;
    font-size: 1.125em;
}

/* Mobile Responsiveness */
@media (max-width: 992px) {
    .author-archive-container {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .author-card {
        padding: 30px 20px;
    }
    
    .author-card-top {
        flex-direction: column;
        text-align: center;
    }
    
    .author-name {
        font-size: 1.5em;
    }
    
    .author-bio {
        font-size: 0.9375em;
    }
    
    .author-stats {
        justify-content: center;
    }
    
    .author-posts-grid {
        grid-template-columns: 1fr;
    }
}

/* ========================================
   CATEGORY & TAG ARCHIVE PAGES
======================================== */

.archive-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 40px;
}

.custom-archive {
    min-width: 0;
}

/* Archive Header */
.archive-header {
    background-color: #fff;
    padding: 40px;
    border-radius: 16px;
    margin-bottom: 50px;
    border: 1px solid #e5e5e5;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
}

.archive-subtitle {
    display: inline-block;
    font-size: 0.875em;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #888;
    margin-bottom: 10px;
    font-weight: 600;
}

.archive-title {
    font-size: 2.5em;
    font-weight: 800;
    margin-bottom: 15px;
    color: #1a1a1a;
}

.archive-title span {
    display: none; /* Hide default "Category:" prefix from WP function */
}

.archive-description {
    font-size: 1.0625em;
    color: #666;
    max-width: 600px;
    margin: 0 auto 20px;
    line-height: 1.7;
}

.archive-meta {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #f0f0f0;
    display: inline-block;
}

.post-count {
    background-color: #f5f5f5;
    padding: 6px 16px;
    border-radius: 50px;
    font-size: 0.875em;
    color: #555;
    font-weight: 500;
}

/* Archive Posts Grid - reusing styles from Author grid but ensuring class consistency */
.archive-posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 50px;
}

.archive-post-card {
    background-color: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.archive-post-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border-color: #503AA8;
}

/* Mobile Responsiveness for Archives */
@media (max-width: 992px) {
    .archive-container {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .archive-header {
        padding: 30px 20px;
    }
    
    .archive-title {
        font-size: 1.8em;
    }
    
    .archive-posts-grid {
        grid-template-columns: 1fr;
    }
}

/* ========================================
   BREADCRUMBS
======================================== */

.breadcrumbs {
    margin-bottom: 30px;
    padding: 12px 0;
}

.breadcrumb-list {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    list-style: none;
    margin: 0;
    padding: 0;
    font-size: 0.875em;
}

.breadcrumb-item {
    display: inline-flex;
    align-items: center;
}

.breadcrumb-item a {
    color: #666;
    text-decoration: none;
    transition: color 0.3s;
}

.breadcrumb-item a:hover {
    color: #503AA8;
}

.breadcrumb-current {
    color: #1a1a1a;
    font-weight: 500;
}

.breadcrumb-separator {
    display: inline-flex;
    align-items: center;
    margin: 0 8px;
    color: #ccc;
}

.breadcrumb-separator svg {
    width: 12px;
    height: 12px;
}

/* RTL Support for Breadcrumbs */
body.rtl .breadcrumb-separator svg {
    transform: scaleX(-1);
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .breadcrumbs {
        font-size: 0.8125em;
    }
    
    .breadcrumb-separator {
        margin: 0 6px;
    }
}

/* ========================================
   RELATED POSTS
======================================== */

.related-posts {
    margin: 60px 0;
    padding: 40px;
    background-color: #f9f9f9;
    border-radius: 16px;
}

.related-posts-title {
    font-size: 1.75em;
    font-weight: 800;
    margin-bottom: 30px;
    color: #1a1a1a;
    text-align: center;
}

.related-posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.related-post-card {
    background-color: #fff;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.related-post-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.related-post-thumbnail {
    position: relative;
    overflow: hidden;
    height: 200px;
}

.related-post-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

.related-post-card:hover .related-post-thumbnail img {
    transform: scale(1.1);
}

.related-post-content {
    padding: 20px;
}

.related-post-category {
    margin-bottom: 10px;
}

.related-post-category a {
    display: inline-block;
    background-color: #503AA8;
    color: #fff;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 0.75em;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s;
}

.related-post-category a:hover {
    background-color: #3d2d7f;
}

.related-post-title {
    font-size: 1.125em;
    font-weight: 700;
    margin-bottom: 12px;
    line-height: 1.4;
}

.related-post-title a {
    color: #1a1a1a;
    text-decoration: none;
    transition: color 0.3s;
}

.related-post-title a:hover {
    color: #503AA8;
}

.related-post-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.8125em;
    color: #999;
}

.related-post-date {
    display: flex;
    align-items: center;
    gap: 6px;
}

.related-post-date svg {
    width: 14px;
    height: 14px;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .related-posts {
        padding: 30px 20px;
        margin: 40px 0;
    }
    
    .related-posts-title {
        font-size: 1.5em;
    }
    
    .related-posts-grid {
        grid-template-columns: 1fr;
    }
}
/* ========================================
   SHARE BUTTONS
======================================== */

.share-buttons {
    margin: 50px 0;
    padding: 30px;
    background-color: #fff;
    border: 2px solid #f0f0f0;
    border-radius: 12px;
}

.share-buttons-title {
    font-size: 1.25em;
    font-weight: 700;
    margin-bottom: 20px;
    color: #1a1a1a;
    text-align: center;
}

.share-buttons-list {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
}

.share-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    font-size: 0.9375em;
    font-weight: 600;
    text-decoration: none;
    color: #fff;
    cursor: pointer;
    transition: all 0.3s;
}

.share-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.share-button svg {
    flex-shrink: 0;
}

.share-facebook {
    background-color: #1877F2;
}

.share-facebook:hover {
    background-color: #145dbf;
}

.share-twitter {
    background-color: #1DA1F2;
}

.share-twitter:hover {
    background-color: #1a8cd8;
}

.share-linkedin {
    background-color: #0A66C2;
}

.share-linkedin:hover {
    background-color: #004182;
}

.share-whatsapp {
    background-color: #25D366;
}

.share-whatsapp:hover {
    background-color: #1da851;
}

.share-telegram {
    background-color: #0088cc;
}

.share-telegram:hover {
    background-color: #006699;
}

.share-copy {
    background-color: #6c757d;
}

.share-copy:hover {
    background-color: #5a6268;
}

.share-copy.copied {
    background-color: #28a745;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .share-buttons {
        padding: 20px;
        margin: 30px 0;
    }
    
    .share-buttons-list {
        gap: 10px;
    }
    
    .share-button {
        padding: 10px 16px;
        font-size: 0.875em;
    }
}

@media (max-width: 480px) {
    .share-buttons-list {
        flex-direction: column;
    }
    
    .share-button {
        width: 100%;
        justify-content: center;
    }
}

/* ========================================
   READING TIME
======================================== */

.reading-time {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #666;
    font-size: 0.875em;
}

.reading-time svg {
    width: 14px;
    height: 14px;
    color: #999;
}

.entry-meta .reading-time {
    margin-left: 20px;
}

body.rtl .entry-meta .reading-time {
    margin-left: 0;
    margin-right: 20px;
}

/* ========================================
   TABLE OF CONTENTS
======================================== */

.table-of-contents {
    background-color: #f9f9f9;
    border: 1px solid #e5e5e5;
    border-radius: 12px;
    padding: 20px 25px;
    margin-bottom: 30px;
}

.toc-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    background: none;
    border: none;
    cursor: pointer;
    font-family: inherit;
    padding: 0;
}

.toc-title {
    font-size: 1.125em;
    font-weight: 700;
    color: #1a1a1a;
}

.toc-icon {
    transition: transform 0.3s;
}

.toc-toggle[aria-expanded="false"] .toc-icon {
    transform: rotate(-90deg);
}

body.rtl .toc-toggle[aria-expanded="false"] .toc-icon {
    transform: rotate(90deg);
}

.toc-nav {
    margin-top: 15px;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}

.toc-nav.collapsed {
    max-height: 0 !important;
    margin-top: 0;
}

.toc-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.toc-item {
    margin: 0;
    padding: 8px 0;
    border-bottom: 1px solid #e5e5e5;
}

.toc-item:last-child {
    border-bottom: none;
}

.toc-item a {
    color: #333;
    text-decoration: none;
    display: block;
    transition: color 0.3s;
}

.toc-item a:hover {
    color: #503AA8;
}

.toc-level-2 {
    padding-left: 0;
}

.toc-level-3 {
    padding-left: 20px;
}

.toc-level-4 {
    padding-left: 40px;
}

body.rtl .toc-level-3 {
    padding-left: 0;
    padding-right: 20px;
}

body.rtl .toc-level-4 {
    padding-left: 0;
    padding-right: 40px;
}

/* Smooth scroll offset for fixed header */
html {
    scroll-behavior: smooth;
}

[id] {
    scroll-margin-top: 100px;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .table-of-contents {
        padding: 15px 20px;
    }
    
    .toc-title {
        font-size: 1em;
    }
}

/* ========================================
   AJAX LOAD MORE
======================================== */

.load-more-wrapper {
    display: flex;
    justify-content: center;
    margin: 40px 0;
}

.load-more-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 180px;
    padding: 12px 30px;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 50px;
    border: none;
    position: relative;
    overflow: hidden;
    gap: 10px;
}

.load-more-button:disabled {
    cursor: not-allowed;
    opacity: 0.7;
    background-color: #f0f0f0 !important;
    color: #999 !important;
}

.loading-spinner {
    display: none;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

.load-more-button.loading .loading-spinner {
    display: block;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Primary color integration for button */
.load-more-button {
    background-color: #503AA8;
    color: #fff;
    box-shadow: 0 4px 15px rgba(80, 58, 168, 0.2);
}

.load-more-button:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(80, 58, 168, 0.3);
    background-color: #3f2d8a;
}

.load-more-button:active:not(:disabled) {
    transform: translateY(0);
}
