/* Theme variables */
:root {
    /* Light theme colors */
    --bg-primary: #f7f3ee;
    --bg-secondary: #f5f5f5;
    --text-primary: #333333;
    --text-secondary: #666666;
    --border-color: #dddddd;
    --bg-post: #ffffff;
    --bg-category: #f5f5f5;
    --border-header: #00000030;
    --scrollbar-thumb: #a7b9d2;
    --bg-news: #f9ecdc;
    --text-category-hover: #000000;
    --bg-category-hover: #d3d3d3;
    --text-links-hover: #F2A900;
}

/* Dark theme colors */
[data-theme="dark"] {
    --bg-primary: #2c3d57;
    --bg-secondary: #1e2c3f;
    --text-primary: #ffffff;
    --text-secondary: #cccccc;
    --border-color: #3e4f6a;
    --bg-post: #e1e1e121;
    --bg-category: #cfcfcf3d;
    --border-header: #ffffff30;
    --scrollbar-thumb: #3e4f6a;
    --bg-news: #223146;
    --text-category-hover: #ffffff;
    --bg-category-hover: #2b2b2bda;
    --text-links-hover: #F2A900;
}

/* Theme Switcher Styles */
.theme-switcher-wrapper {
    margin: 0px;
    display: flex;
    align-items: center;
    gap: 20px;
}

.theme-switcher {
    position: relative;
    width: 60px;
    height: 30px;
    padding: 0;
    border: none;
    background: none;
    cursor: pointer;
    overflow: hidden;
}

.theme-switcher:hover {
    background: none !important;
}

.theme-switcher:focus {
    background: none !important;
}

.switcher-track {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: white;
    border-radius: 15px;
    border: 2px solid var(--border-color);
    transition: all 0.3s ease;
}

.switcher-track:focus-visible {
    outline: none;
}

.switcher-handle {
    position: absolute;
    width: 26px;
    height: 26px;
    background: #2c3d57;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

[data-theme="dark"] .switcher-handle {
    transform: translateX(30px);
}

.switcher-handle i {
    font-size: 14px;
    color: var(--text-primary);
    transition: all 0.3s ease;
}

.switcher-handle .fa-sun {
    display: block;
    color: #f6a800;
}

.switcher-handle .fa-moon {
    display: none;
    color: #9ab;
}

[data-theme="dark"] .switcher-handle .fa-sun {
    display: none;
}

[data-theme="dark"] .switcher-handle .fa-moon {
    display: block;
}

.theme-switcher:hover .switcher-track {
    border-color: none;
}

.theme-switcher:focus {
    outline: none;
}

.theme-switcher:focus-visible {
    background: var(--bg-primary) !important;
    color: var(--text-secondary) !important;
    outline: none;
}

.theme-switcher i {
    font-size: 1rem;
}

/* Apply theme colors to existing elements */
body {
    background-color: var(--bg-primary) !important;
    color: var(--text-primary) !important;
}


.search-input {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    border-color: var(--border-color);
}

.blog-article {
    background-color: var(--bg-primary);
    border-color: var(--border-color);
}

.article-title a {
    color: var(--text-primary);
}

.article-meta, 
.article-type,
.author-role,
.article-date {
    color: var(--text-secondary);
}

/* Smooth transitions */
body, 
.blog-container,
.search-input,
.blog-article,
.article-title a,
.article-meta,
.article-type,
.author-role,
.article-date {
    transition: background-color 0.3s ease, color 0.3s ease;
}

.js .nav-primary {
    background-color: var(--bg-primary) !important;
    color: var(--text-primary) !important;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.genesis-nav-menu a {
    color: var(--text-primary) !important;
}

.genesis-nav-menu a:hover {
    color: var(--text-links-hover) !important;
}

.site-header {
    background-color: var(--bg-primary) !important;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.site-header a {
    color: var(--text-primary) !important;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.menu-toggle {
    color: var(--text-primary) !important;
}

.menu-toggle:focus {
    outline: none;
    color: var(--text-primary) !important;
}

.menu-toggle:focus-visible {
    outline: none;
    color: var(--text-primary);
}

.site-header:has(.menu-toggle.activated) {
    background: linear-gradient(to bottom, var(--bg-primary), var(--bg-secondary)) !important;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.js .nav-primary ul {
    background-color: var(--bg-primary) !important;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.js .nav-primary ul a {
    color: var(--text-primary);
    background-color: var(--bg-primary) !important;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.pol-icon::after, .pol-icon-left::before {
    background-color: var(--text-primary) !important;
}

.nav-primary .genesis-nav-menu li.has-children > a:after {
    color: var(--text-primary) !important;
}

.pol-icon:hover::after,
.pol-icon-left:hover::before {
    background-color: var(--text-links-hover) !important;
}

.nav-primary .genesis-nav-menu li.has-children > a:hover::after {
    color: var(--text-links-hover) !important;
}