/*
Theme Name: Boxed Theme
Description: Main stylesheet
*/

/* ==========================================================================
   CSS Variables (will be overridden by customizer)
   ========================================================================== */
:root {
    --primary-color: #e74c3c;
    --secondary-color: #f39c12;
    --content-bg: #ffffff;
    --outer-bg: #f5f5f5;
    --content-width: 700px;
    --sidebar-width: 300px;
    --total-width: 1060px;
    --text-color: #333333;
    --text-color-light: #666666;
    --border-color: #e0e0e0;
    --header-height: 70px;
}

/* Dark Mode Variables */
body.dark-mode {
    --content-bg: #1a1a1a;
    --outer-bg: #0d0d0d;
    --text-color: #e0e0e0;
    --text-color-light: #a0a0a0;
    --border-color: #333333;
}

/* ==========================================================================
   Reset & Base Styles
   ========================================================================== */
* {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    font-family: -apple-system,system-ui,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--outer-bg);
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Note: .site-content styling is in Content Area section */

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

a:hover {
    transition: border-bottom 0.2s ease;
    color: var(--secondary-color);
}

.entry-content :is(p, ol, ul, tr) a:not(.smart-toc-wrapper a, .page-numbers a) {
    color: var(--text-color);
    border-bottom: 2.8px solid var(--primary-color);
}

.entry-content :is(p, ol, ul, tr) a:not(.smart-toc-wrapper a):hover {
    border-bottom-color: var(--content-bg);
    opacity: 0.85;
}

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

.screen-reader-text {
    clip: rect(1px, 1px, 1px, 1px);
    position: absolute !important;
    height: 1px;
    width: 1px;
    overflow: hidden;
    word-wrap: normal !important;
}

/* ==========================================================================
   Header
   ========================================================================== */
.site-header {
    background-color: var(--content-bg);
    border-bottom: 1px solid var(--border-color);
    z-index: 1000;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    transition: background-color 0.3s ease;
}

/* Sticky header - only when enabled */
.sticky-header .site-header {
    position: sticky;
    top: 0;
}

.header-wrapper {
    max-width: var(--total-width);
    margin: 0 auto;
    padding: 0 20px;
}

.header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: var(--header-height);
    gap: 20px;
}

/* Logo / Site Branding */
.site-branding {
    flex-shrink: 0;
}

.custom-logo {
    max-height: 50px;
    width: auto;
    display: block;
}

.site-title {
    margin: 0;
    font-size: 24px;
    font-weight: 700;
}

.site-title a {
    color: var(--text-color);
    text-decoration: none;
}

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

/* Logo Light/Dark Mode Switching */
.logo-default,
.logo-dark {
    display: block;
}

/* Hide dark logo by default (light mode) */
body:not(.dark-mode) .logo-dark {
    display: none;
}

/* Hide light logo in dark mode, show dark logo */
body.dark-mode .logo-default {
    display: none;
}

body.dark-mode .logo-dark {
    display: block;
}

/* Mobile menu logo switching */
.mobile-menu-logo .logo-default,
.mobile-menu-logo .logo-dark {
    display: block;
}

body:not(.dark-mode) .mobile-menu-logo .logo-dark {
    display: none;
}

body.dark-mode .mobile-menu-logo .logo-default {
    display: none;
}

body.dark-mode .mobile-menu-logo .logo-dark {
    display: block;
}

/* Header Theme Overrides */
/* When header is forced to always light */
.header-theme-light .site-header {
    --content-bg: #ffffff;
    --text-color: #333333;
    --outer-bg: #f5f5f5;
    --text-color-light: #666666;
    --border-color: #e0e0e0;
}

.header-theme-light .site-header .logo-dark {
    display: none !important;
}

.header-theme-light .site-header .logo-default {
    display: block !important;
}

.header-theme-light .mobile-menu-container {
    --content-bg: #ffffff;
    --text-color: #333333;
    --text-color-light: #666666;
    --border-color: #e0e0e0;
    --outer-bg: #f5f5f5;
}

.header-theme-light .mobile-menu-logo .logo-dark {
    display: none !important;
}

.header-theme-light .mobile-menu-logo .logo-default {
    display: block !important;
}

/* When header is forced to always dark */
.header-theme-dark .site-header {
    --content-bg: #1a1a1a;
    --text-color: #e0e0e0;
    --outer-bg: #0d0d0d;
    --text-color-light: #a0a0a0;
    --border-color: #333333;
}

.header-theme-dark .site-header .logo-default {
    display: none !important;
}

.header-theme-dark .site-header .logo-dark {
    display: block !important;
}

.header-theme-dark .mobile-menu-container {
    --content-bg: #1a1a1a;
    --text-color: #e0e0e0;
    --text-color-light: #a0a0a0;
    --border-color: #333333;
    --outer-bg: #0d0d0d;
}

.header-theme-dark .mobile-menu-logo .logo-default {
    display: none !important;
}

.header-theme-dark .mobile-menu-logo .logo-dark {
    display: block !important;
}

/* Primary Navigation */
.main-navigation {
    flex-grow: 1;
    display: flex;
}

.main-navigation ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 5px;
    width: 100%;
    justify-content: flex-start;
    align-items: center;
}

.menu-align-center .main-navigation ul {
    justify-content: center;
}

.menu-align-right .main-navigation ul {
    justify-content: flex-end;
}

.main-navigation li {
    position: relative;
}

.main-navigation a {
    display: flex;
    align-items: center;
    padding: 10px 16px;
    color: var(--text-color);
    font-weight: 500;
    border-radius: 4px;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.main-navigation a:hover,
.main-navigation a:focus {
    background-color: var(--primary-color);
    color: #ffffff;
}

/* Dropdown indicator for menu items with children */
.main-navigation li.menu-item-has-children > a::after {
    content: "";
    display: inline-block;
    width: 10px;
    height: 10px;
    margin-left: 6px;
    background-color: currentColor; /* this sets the icon color */
    mask: url(../images/arrow-down.svg) center/contain no-repeat;
    -webkit-mask: url(../images/arrow-down.svg) center/contain no-repeat;
}


/* Submenu Styles */
.main-navigation ul ul {
    position: absolute;
    top: 100%;
    left: 0;
    background-color: var(--content-bg);
    min-width: 200px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border-radius: 4px;
    padding: 8px 0;
    display: none; /* Completely hide from DOM for ad compliance */
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
    z-index: 9999;
    flex-direction: column;
}

/* Step 1: Show submenu in DOM (display: flex) - JS adds this class first */
.main-navigation li.submenu-open > ul {
    display: flex;
}

/* Step 2: Animate visibility/opacity - JS adds this class after a frame delay */
.main-navigation li.submenu-visible > ul,
.main-navigation li:focus-within > ul {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

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

.main-navigation ul ul a {
    padding: 10px 20px;
    border-radius: 0;
}

/* Nested submenus */
.main-navigation ul ul ul {
    top: 0;
    left: 100%;
}

/* Header Right Section */
.header-right {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-shrink: 0;
}

/* Theme Toggle Button */
.theme-toggle {
    background: none;
    border: none;
    cursor: pointer;
    padding: 3px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s ease;
}

.theme-toggle:hover {
    background-color: var(--border-color);
}

.theme-icon {
    display: none;
    width: 30px;
    height: 30px;
}

.theme-icon-svg {
    width: 100%;
    height: 100%;
    display: block;
}

body:not(.dark-mode) .theme-icon.light-icon {
    display: flex;
}

body.dark-mode .theme-icon.dark-icon {
    display: flex;
}

/* Header Search */
.header-search {
    position: relative;
}

.header-search .search-form {
    display: flex;
    align-items: center;
    gap: 5px;
}

.header-search .search-field {
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: 20px;
    background-color: var(--outer-bg);
    color: var(--text-color);
    font-size: 14px;
    width: 200px;
    transition: all 0.2s ease;
}

.header-search .search-field:focus {
    outline: none;
    border-color: var(--primary-color);
    width: 250px;
}

.header-search .search-submit {
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    color: var(--text-color);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease;
}

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


/* ==========================================================================
   Content Area
   ========================================================================== */
.site-content {
    margin: 20px;
    word-wrap: break-word;
}

.content-wrapper {
    max-width: var(--total-width);
    margin: 0 auto;
    background-color: var(--content-bg);
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    padding: 40px;
    transition: background-color 0.3s ease;
}

.content-area-wrapper {
    display: flex;
    gap: 40px;
    align-items: flex-start;
}

/* Sidebar Positions */
.content-area-wrapper.sidebar-right {
    flex-direction: row;
}

.content-area-wrapper.sidebar-left {
    flex-direction: row-reverse;
}

.content-area-wrapper.sidebar-none .site-main,
.no-sidebar .site-main {
    flex: 1;
    max-width: 100%;
}

/* Main Content */
.site-main {
    flex: 1;
    max-width: var(--content-width);
    min-width: 0; /* Prevents flex items from overflowing */
}

/* Sidebar */
.widget-area {
    flex: 0 0 var(--sidebar-width);
    max-width: var(--sidebar-width);
}

.widget {
    margin-bottom: 15px;
    padding: 10px;
    background-color: var(--outer-bg);
    border-radius: 6px;
}

.widget-title {
    margin-top: 0;
    margin-bottom: 15px;
    font-weight: 600;
    color: var(--text-color);
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 10px;
}

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

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

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

/* ==========================================================================
   Posts & Pages
   ========================================================================== */
article {
    margin-bottom: 40px;
}

article.type-post {
    border: 1px solid var(--border-color);
    border-radius: 2px;
}

.entry-header {
    padding: 30px 30px 20px;
}

.entry-title {
    margin: 0 0 10px 0;
    font-weight: 700;
    line-height: 1.2;
    color: var(--text-color);
}

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

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

.post-thumbnail {
    margin-bottom: 25px;
}

.post-thumbnail img {
    display: block;
}

.entry-content {
    margin-bottom: 25px;
    line-height: 1.8;
    padding-inline: 20px;
}

.entry-content h1,
.entry-content h2,
.entry-content h3,
.entry-content h4,
.entry-content h5,
.entry-content h6 {
    margin-top: 30px;
    margin-bottom: 15px;
    color: var(--text-color);
    font-weight: 600;
}

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

.entry-content img {
    border-radius: 6px;
}

.entry-content blockquote {
    margin: 25px 0;
    padding: 20px 25px;
    border-left: 4px solid var(--primary-color);
    background-color: var(--outer-bg);
    font-style: italic;
}

.entry-content ul,
.entry-content ol {
    margin: 20px 0;
    padding-left: 30px;
}

.entry-content li {
    margin-bottom: 8px;
}

.entry-content code {
    background-color: var(--outer-bg);
    padding: 2px 6px;
    border-radius: 3px;
    font-family: 'Courier New', Courier, monospace;
    font-size: 14px;
}

.entry-content pre {
    background-color: var(--outer-bg);
    padding: 20px;
    border-radius: 6px;
    overflow-x: auto;
}

/* Tables */
.entry-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 25px 0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    border: 1px solid var(--border-color);
    font-size: inherit;
}

.entry-content table thead {
    background-color: var(--outer-bg);
}

.entry-content table th {
    padding: 14px 16px;
    text-align: left;
    font-weight: 600;
    color: var(--text-color);
    border: 1px solid var(--border-color);
    white-space: nowrap;
}

.entry-content table td {
    padding: 12px 16px;
    color: var(--text-color);
    border: 1px solid var(--border-color);
    vertical-align: top;
}

/* Alternating row colors - subtle */
.entry-content table tbody tr:nth-child(even) {
    background-color: rgba(0, 0, 0, 0.02);
}

body.dark-mode .entry-content table tbody tr:nth-child(even) {
    background-color: rgba(255, 255, 255, 0.02);
}

/* Row hover effect */
.entry-content table tbody tr:hover {
    background-color: rgba(0, 0, 0, 0.04);
}

body.dark-mode .entry-content table tbody tr:hover {
    background-color: rgba(255, 255, 255, 0.04);
}

/* Responsive tables - horizontal scroll on mobile */
.entry-content .table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 25px 0;
}

.entry-content .table-responsive table {
    margin: 0;
    min-width: 600px;
}

/* Caption styling */
.entry-content table caption {
    padding: 12px 16px;
    font-size: 14px;
    color: var(--text-color-light);
    text-align: left;
    caption-side: bottom;
    font-style: italic;
}

/* WordPress block table support */
.wp-block-table {
    margin: 25px 0;
    overflow-x: auto;
}

.wp-block-table table {
    width: 100%;
    border-collapse: collapse;
    border: 1px solid var(--border-color);
    font-size: inherit;
}

.wp-block-table th,
.wp-block-table td {
    padding: 12px 16px;
    border: 1px solid var(--border-color);
}

.wp-block-table thead {
    background-color: var(--outer-bg);
}

.wp-block-table th {
    font-weight: 600;
    text-align: left;
}

.wp-block-table.is-style-stripes tbody tr:nth-child(odd) {
    background-color: rgba(0, 0, 0, 0.02);
}

body.dark-mode .wp-block-table.is-style-stripes tbody tr:nth-child(odd) {
    background-color: rgba(255, 255, 255, 0.02);
}

.entry-footer {
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
    font-size: 14px;
    color: var(--text-color-light);
}

.entry-footer > span {
    margin-right: 20px;
}

/* Post Tags Styling */
.post-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 15px;
}

.post-tag {
    display: inline-block;
    padding: 6px 12px;
    background-color: var(--outer-bg);
    color: var(--primary-color);
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
    border: 1px solid var(--border-color);
}

.post-tag:hover {
    background-color: var(--primary-color);
    color: #ffffff;
    border-color: var(--primary-color);
    transform: translateY(-1px);
}

/* Entry Meta Styling */
.entry-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: center;
    font-size: 14px;
    line-height: 14px;
    color: var(--text-color-light);
    margin-bottom: 15px;
}

.entry-meta > span {
    display: flex;
    align-items: center;
}

.entry-meta a {
    color: var(--text-color-light);
}

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

.entry-meta .cat-links a {
    color: var(--primary-color);
    font-weight: 500;
}

.entry-meta .cat-links a:hover {
    color: var(--secondary-color);
}

/* Separator for meta items */
.entry-meta > span:not(:last-child)::after {
    content: "\2022";
    margin-left: 15px;
    font-size: 20px;
}

/* Posts Navigation (Archive pages) */
.posts-navigation {
    margin: 40px 0;
    padding: 20px 0;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.posts-navigation .nav-links {
    display: flex;
    justify-content: space-between;
    gap: 20px;
}

.posts-navigation .nav-previous,
.posts-navigation .nav-next {
    flex: 1;
}

.posts-navigation .nav-next {
    text-align: right;
}

.nav-subtitle {
    display: block;
    font-size: 14px;
    color: var(--text-color-light);
    margin-bottom: 5px;
}

.nav-title {
    color: var(--text-color);
    font-weight: 600;
}



/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
    background-color: var(--content-bg);
    border-top: 1px solid var(--border-color);
    padding: 30px 20px;
    margin-top: 60px;
    transition: background-color 0.3s ease;
}

.footer-wrapper {
    max-width: var(--total-width);
    margin: 0 auto;
}

.footer-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 30px;
    flex-wrap: wrap;
}

.footer-left {
    color: var(--text-color-light);
    font-size: 14px;
}

.footer-navigation ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.footer-navigation a {
    color: var(--text-color-light);
    font-size: 14px;
    text-decoration: none;
}

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

/* ==========================================================================
   Search Form (general)
   ========================================================================== */
.search-form label {
    display: flex;
    gap: 10px;
}

.search-field {
    flex: 1;
    padding: 10px 15px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background-color: var(--content-bg);
    color: var(--text-color);
}

.search-submit {
    padding: 10px 20px;
    background-color: var(--primary-color);
    color: #ffffff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    transition: background-color 0.2s ease;
}

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

/* ==========================================================================
   Responsive Design
   ========================================================================== */

/* Mobile Menu Toggle Button */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    padding: 8px;
    cursor: pointer;
    z-index: 1001;
}

.hamburger-icon {
    display: flex;
    flex-direction: column;
    gap: 4px;
    width: 24px;
}

.hamburger-icon span {
    display: block;
    width: 100%;
    height: 2px;
    background-color: var(--text-color);
    transition: all 0.3s ease;
}

/* Hide mobile elements on desktop */
.mobile-only {
    display: none;
}

/* Mobile Header Right Container */
.mobile-header-right {
    display: none;
    align-items: center;
    gap: 8px;
}

.mobile-header-theme-toggle {
    background: none;
    border: none;
    padding: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: background-color 0.2s ease;
}

.mobile-header-theme-toggle:hover {
    background-color: var(--border-color);
}

.mobile-header-theme-toggle .theme-icon-svg {
    width: 22px;
    height: 22px;
}

.mobile-header-theme-toggle .theme-icon {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Show only the appropriate icon based on current mode */
body:not(.dark-mode) .mobile-header-theme-toggle .dark-icon {
    display: none;
}

body.dark-mode .mobile-header-theme-toggle .light-icon {
    display: none;
}

/* Mobile Menu Modal */
.mobile-menu-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.mobile-menu-modal.active {
    opacity: 1;
    visibility: visible;
}

.mobile-menu-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    cursor: pointer;
}

.mobile-menu-container {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 85%;
    max-width: 400px;
    background-color: var(--content-bg);
    box-shadow: -4px 0 12px rgba(0, 0, 0, 0.15);
    transform: translateX(100%);
    transition: transform 0.3s ease;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.mobile-menu-modal.active .mobile-menu-container {
    transform: translateX(0);
}

.mobile-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
}

.mobile-menu-logo img {
    max-height: 40px;
}

.mobile-menu-logo span {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-color);
}

.mobile-menu-close {
    background: none;
    border: none;
    padding: 8px;
    cursor: pointer;
    color: var(--text-color);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: background-color 0.2s ease;
}

.mobile-menu-close:hover {
    background-color: var(--border-color);
}

.mobile-menu-content {
    flex: 1;
    padding: 20px;
}

/* Mobile Navigation Styles */
.mobile-navigation ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.mobile-navigation li {
    border-bottom: 1px solid var(--border-color);
}

.mobile-navigation li:last-child {
    border-bottom: none;
}

.mobile-navigation a {
    display: block;
    padding: 15px 0;
    color: var(--text-color);
    text-decoration: none;
    font-size: 16px;
    font-weight: 500;
    transition: color 0.2s ease;
}

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

/* Mobile Submenus */
.mobile-navigation ul ul {
    padding-left: 20px;
    margin-top: 0;
}

.mobile-navigation ul ul li {
    border-bottom: none;
}

.mobile-navigation ul ul a {
    padding: 10px 0;
    font-size: 15px;
    font-weight: 400;
}

.mobile-navigation .menu-item-has-children > a::after {
    content: "";
    float: right;
    width: 16px;
    height: 16px;
    background-color: currentColor; /* this sets the icon color */
    mask: url(../images/arrow-right.svg) center/contain no-repeat;
    -webkit-mask: url(../images/arrow-right.svg) center/contain no-repeat;
}

/* Mobile Search */
.mobile-search {
    margin-top: 30px;
    padding-top: 30px;
    border-top: 1px solid var(--border-color);
}

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

.mobile-search .search-field {
    flex: 1;
    padding: 12px 15px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background-color: var(--outer-bg);
    color: var(--text-color);
    font-size: 15px;
}

.mobile-search .search-submit {
    padding: 12px 20px;
    background-color: var(--primary-color);
    color: #ffffff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    transition: background-color 0.2s ease;
}

.mobile-search .search-submit:hover {
    background-color: var(--secondary-color);
}

/* Mobile Theme Toggle */
.mobile-theme-toggle {
    margin-top: 30px;
    padding-top: 30px;
    border-top: 1px solid var(--border-color);
}

.mobile-theme-toggle .theme-toggle {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px;
    background-color: var(--outer-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.mobile-theme-toggle .theme-toggle:hover {
    background-color: var(--border-color);
}

.mobile-theme-toggle .theme-icon {
    width: 20px;
    height: 20px;
}

.mobile-theme-toggle .toggle-label {
    font-size: 15px;
    font-weight: 500;
    color: var(--text-color);
}

body:not(.dark-mode) .mobile-theme-toggle .dark-label {
    display: none;
}

body.dark-mode .mobile-theme-toggle .light-label {
    display: none;
}

/* Prevent scrolling when mobile menu is open */
body.mobile-menu-open {
    overflow: hidden;
}

/* Support for inert attribute */
[inert] {
    pointer-events: none;
    cursor: default;
}

[inert] * {
    pointer-events: none;
    cursor: default;
}

@media screen and (max-width: 1100px) {
    :root {
        --content-width: 600px;
        --sidebar-width: 280px;
    }
}

@media screen and (max-width: 992px) {

    .site-main {
        max-width: none;  /* Remove percentage constraint */
        width: 100%;      /* Force full width */
    }

    /* Show mobile menu button, hide desktop navigation */
    .mobile-only {
        display: block;
    }
    
    .mobile-header-right {
        display: flex;
    }
    
    .mobile-header-right .mobile-menu-toggle {
        display: block;
    }
    
    .desktop-only {
        display: none !important;
    }
    
    .mobile-menu-modal {
        display: block;
    }
    
    .main-navigation {
        display: none;
    }
    
    .header-container {
        justify-content: space-between;
    }
    
    :root {
        --content-width: 100%;
        --sidebar-width: 100%;
    }
    
    .content-area-wrapper {
        flex-direction: column !important;
    }
    
    .widget-area {
        max-width: 100%;
        width: 100%;
    }
}

@media screen and (max-width: 768px) {
    .content-wrapper {
        padding: 20px;
    }
    
    .footer-container {
        flex-direction: column;
        text-align: center;
    }
    
    .footer-navigation ul {
        justify-content: center;
    }

    .site-content {
        margin: 20px 0;
    }
}

@media screen and (max-width: 480px) {
    .site-content {
        margin: 10px 0;
    }
    
    .header-container {
        gap: 10px;
    }
    
    .mobile-menu-container {
        width: 100%;
        max-width: none;
    }
    
    .content-wrapper {
        padding: 0;
        border-radius: 0;
        box-shadow: none;
    }
    
    .site-main {
        padding: 20px;
    }
    
    .widget-area {
        padding: 20px;
    }
    
    .site-footer .footer-wrapper {
        padding: 0;
    }
    
    .footer-container {
        padding: 30px 20px;
    }
}

/* ==========================================================================
   Utility Classes
   ========================================================================== */
.alignleft {
    float: left;
    margin: 0 20px 20px 0;
}

.alignright {
    float: right;
    margin: 0 0 20px 20px;
}

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

.wp-caption {
    max-width: 100%;
}

.wp-caption-text {
    text-align: center;
    font-size: 14px;
    color: var(--text-color-light);
    margin-top: 8px;
}

.sticky {
    /* WordPress required class for sticky posts - add custom styles as needed */
    position: relative;
}

.bypostauthor {
    /* WordPress required class for post author comments - add custom styles as needed */
    border-left: 3px solid var(--primary-color);
}

.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 10px;
    margin: 20px 0;
}

.gallery-item {
    position: relative;
}

.gallery-item img {
    border-radius: 4px;
}

.footer-disclaimer {
    font-size: 0.7em;
}