/*
Theme Name: Niiinis Recepttema
Theme URI: https://niiinis.se
Author: Jesper Ekerling
Author URI: https://niiinis.se
Description: Ett modernt WordPress-tema för receptsajter med anpassningsbara färger, typsnitt och responsiv layout med sidoannonser.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: niiinis-recipe
Tags: blog, food-and-drink, custom-colors, custom-header, custom-menu, featured-images, flexible-header, responsive-layout, threaded-comments, translation-ready
*/

/* Reset och grundläggande styling */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--body-font, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif);
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-color, #333);
    background-color: var(--background-color, #f5f5f5);
    transition: background-color 0.3s ease, color 0.3s ease;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--heading-font, Georgia, 'Times New Roman', serif);
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 1rem;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.75rem; }
h4 { font-size: 1.5rem; }
h5 { font-size: 1.25rem; }
h6 { font-size: 1rem; }

/* General link styles - outside content area */
a {
    color: var(--link-color, #6e3838);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--link-hover-color, #5a5350);
    text-decoration: underline;
}

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

/* Header med bild */
.site-header {
    position: relative;
    width: 100%;
    overflow: hidden;
}

/* Logo overlay */
.site-logo {
    position: absolute;
    top: 70%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
    max-width: 250px;
    width: 80%;
    transition: opacity 0.3s ease;
    display: none;
}

.site-logo:hover {
    opacity: 0.9;
}

.site-logo img {
    width: 69%;
    height: auto;
    display: block;
    filter: drop-shadow(2px 2px 4px rgba(0, 0, 0, 0.65)) drop-shadow(-1px -1px 2px rgba(0, 0, 0, 0.5)) drop-shadow(0 0 6px rgba(0, 0, 0, 0.5));
}

/* Desktop: Logo to the left */
@media (min-width: 768px) {
    .site-logo {
        display: block;
        left: 10%;
        top: 50%;
        transform: translateY(-50%);
        max-width: 23%;
    }
    
    .site-logo img {
        filter: drop-shadow(2px 2px 4px rgba(0, 0, 0, 0.8)) drop-shadow(-1px -1px 2px rgba(0, 0, 0, 0.1)) drop-shadow(0 0 6px rgba(0, 0, 0, 0.1));
    }
}

.header-image {
    width: 100%;
    height: auto;
    display: block;
    cursor: pointer;
}

.header-image img {
    width: 100%;
    height: auto;
    object-fit: cover;
}

/* Desktop header-bild */
.header-image-desktop {
    display: none;
}

/* Mobil header-bild */
.header-image-mobile {
    display: block;
}

/* Layout container */
.site-container {
    width: 100%;
    max-width: 1920px;
    margin: 0 auto;
    position: relative;
}

/* ==================== STICKY TOP NAVIGATION ==================== */
.sticky-top-nav {
    position: relative;
    left: 0;
    right: 0;
    z-index: 1000;
    border-bottom: 1px solid var(--border-color-main, #ddd);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

/* On mobile, make nav sticky from the start */
@media (max-width: 768px) {
    .sticky-top-nav {
        position: sticky;
        top: 0;
    }
}

.sticky-top-nav.hidden {
    transform: translateY(-100%);
}

.sticky-nav-container {
    max-width: 1920px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Row 1 - Hamburger, Logo, Menu, Search, Social Icons */
.sticky-nav-row-1 {
    background: var(--sticky-nav-row1-bg, #c1bcb5);
}

.sticky-nav-row-1 .sticky-nav-container {
    display: flex;
    align-items: center;
    padding-top: 0;
    padding-bottom: 0;
    gap: 15px;
    min-height: 60px;
}

/* Hamburger Menu Toggle */
.hamburger-menu-toggle {
    display: flex;
    flex-direction: column;
    gap: 4px;
    background: transparent !important;
    color: #1f1d0e;
    border: none;
    cursor: pointer;
    padding: 8px;
    width: 36px;
    flex-shrink: 0;
}

.hamburger-menu-toggle span {
    display: block;
    width: 100%;
    height: 3px;
    background: #1f1d0e;
    transition: all 0.3s ease;
    border-radius: 2px;
}

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

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

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

.site-title {
    font-family: var(--sticky-nav-title-font);
    font-size: var(--sticky-nav-title-size);
    font-weight: 600;
    flex-shrink: 0;
}

.site-title a {
    color: var(--site-title-color, #3f3d3a);
    text-decoration: none;
    transition: color 0.2s ease;
}

.site-title a:hover {
    color: var(--site-title-hover-color, #2a2825);
}

/* Main Navigation Menu (visible items) */
.main-nav-wrapper {
    flex: 0 1 auto;
    overflow: visible;
    min-width: 0;
}

.main-nav-menu {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 0;
    white-space: nowrap;
}

.main-nav-menu > li {
    margin: 0;
    padding: 0;
    position: relative;
}

.main-nav-menu > li > a {
    display: block;
    padding: 20px 18px;
    color: #1f1d0e;
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    transition: background 0.2s ease;
}

.main-nav-menu > li > a:hover {
    background: rgba(0,0,0,0.15);
}

/* Dropdown indicator arrows */
.main-nav-menu .menu-item-has-children > a::after {
    content: ' ▼';
    font-size: 10px;
    margin-left: 6px;
    opacity: 0.7;
    transition: opacity 0.2s ease;
}

.main-nav-menu .menu-item-has-children:hover > a::after {
    opacity: 1;
}

/* Desktop submenu */
.main-nav-menu .sub-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--content-bg, #fff);
    border: 1px solid var(--border-color-main, #ddd);
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    min-width: 800px;
    max-width: 900px;
    max-height: calc(100vh - 120px);
    overflow-y: auto;
    overflow-x: hidden;
    z-index: 10000;
    list-style: none;
    padding: 12px;
    margin: 0;
    display: none;
    grid-template-columns: repeat(4, 1fr);
    gap: 4px;
}

/* Smooth scrolling for menu */
.main-nav-menu .sub-menu {
    scroll-behavior: smooth;
}

/* Custom scrollbar for menu dropdown */
.main-nav-menu .sub-menu::-webkit-scrollbar {
    width: 8px;
}

.main-nav-menu .sub-menu::-webkit-scrollbar-track {
    background: rgba(0,0,0,0.05);
    border-radius: 4px;
}

.main-nav-menu .sub-menu::-webkit-scrollbar-thumb {
    background: rgba(127, 117, 64, 0.3);
    border-radius: 4px;
}

.main-nav-menu .sub-menu::-webkit-scrollbar-thumb:hover {
    background: rgba(127, 117, 64, 0.5);
}

.main-nav-menu .menu-item-has-children:hover > .sub-menu {
    display: grid;
}

.main-nav-menu .sub-menu li {
    margin: 0;
    padding: 0;
}

.main-nav-menu .sub-menu a {
    display: block;
    padding: 10px 20px;
    color: var(--text-color);
    text-decoration: none;
    font-size: 14px;
    transition: background 0.2s ease;
}

.main-nav-menu .sub-menu a:hover {
    background: rgba(0,0,0,0.05);
}

/* Submenu nested items - second level */
.main-nav-menu .sub-menu .menu-item-has-children > a::after {
    content: ' ▶';
    font-size: 10px;
    margin-left: 6px;
    float: right;
    opacity: 0.7;
}

.main-nav-menu .sub-menu .sub-menu {
    left: 100%;
    top: 0;
}

.main-nav-menu .sub-menu .menu-item-has-children:hover > .sub-menu {
    display: block;
}

/* Recipe Menu - Popular Categories Section */
.main-nav-menu .menu-section-header {
    padding: 8px 16px 4px 16px;
    pointer-events: none;
}

.main-nav-menu .menu-section-header .menu-section-label,
.main-nav-menu .menu-section-header span {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #7f7540;
    display: block;
}

.main-nav-menu .menu-section-header a {
    padding: 0;
    pointer-events: none;
}

.main-nav-menu .menu-section-header a:hover {
    background: transparent;
}

.main-nav-menu .menu-section-divider {
    height: 1px;
    background: #e0e0e0;
    margin: 8px 12px;
    pointer-events: none;
}

.main-nav-menu .popular-category-item .post-count {
    font-size: 0.85em;
    color: #999;
    margin-left: 4px;
}

html[data-theme="dark"] .main-nav-menu .menu-section-header .menu-section-label,
html[data-theme="dark"] .main-nav-menu .menu-section-header span {
    color: #cec9bd;
}

html[data-theme="dark"] .main-nav-menu .menu-section-divider {
    background: #444;
}

html[data-theme="dark"] .main-nav-menu .popular-category-item .post-count {
    color: #666;
}

/* Search Form */
.sticky-search-form {
    flex: 1;
    display: flex;
    max-width: 350px;
}

.sticky-search-form form {
    display: flex;
    margin: 0;
    width: 100%;
}

.sticky-search-form label {
    flex: 1;
    margin: 0;
    display: flex;
}

.sticky-search-form .screen-reader-text {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    white-space: nowrap;
    border: 0;
}

.sticky-search-form input[type="search"],
.sticky-search-form .search-field {
    padding: 10px 14px;
    border: 1px solid rgba(0,0,0,0.2);
    border-radius: 8px 0 0 8px;
    background: rgba(255,255,255,0.95);
    color: #333;
    font-size: 14px;
    flex: 1;
    height: 42px;
    box-sizing: border-box;
}

.sticky-search-form input[type="search"]::placeholder,
.sticky-search-form .search-field::placeholder {
    color: #999;
}

.sticky-search-form button,
.sticky-search-form .search-submit {
    padding: 0;
    background: #aca396 !important;
    color: #353114 !important;
    border: none;
    border-radius: 0 8px 8px 0;
    cursor: pointer;
    font-size: 0;
    line-height: 0;
    font-weight: 600;
    transition: background 0.2s ease;
    min-width: 60px;
    width: 60px;
    height: 42px;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sticky-search-form button *:not(svg),
.sticky-search-form .search-submit *:not(svg) {
    display: none !important;
}

.sticky-search-form button:hover,
.sticky-search-form .search-submit:hover {
    opacity: 0.9;
}

.sticky-search-form button svg,
.sticky-search-form .search-submit svg {
    display: block;
    margin: 0 auto;
}

/* Social Icons */
.social-icons {
    display: flex !important;
    flex-direction: row !important;
    gap: 20px;
    align-items: center;
    flex-shrink: 0;
    margin-left: auto;
}

.social-icons a {
    color: #1f1d0e;
    transition: color 0.2s ease;
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.social-icons a:hover {
    color: #000;
}

.social-icons svg {
    width: 20px;
    height: 20px;
    display: block;
    flex-shrink: 0;
}

/* Hamburger Menu (Slide-in from left) */
.hamburger-menu {
    position: fixed;
    top: 0;
    left: -320px;
    width: 320px;
    height: 100vh;
    background: var(--content-bg, #fff);
    box-shadow: 2px 0 10px rgba(0,0,0,0.1);
    z-index: 9998;
    transition: left 0.3s ease;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
}

.hamburger-menu.active {
    left: 0;
}

.hamburger-menu-content {
    padding: 80px 20px 100px;
    min-height: 100%;
}

/* Social Icons in Hamburger Menu */
.hamburger-social-icons {
    display: flex;
    gap: 20px;
    justify-content: center;
    padding: 30px 10px 20px;
    margin-top: 20px;
}

.hamburger-social-icons a {
    color: var(--text-color);
    transition: color 0.2s ease;
}

.hamburger-social-icons a:hover {
    color: #aca396;
}

html[data-theme="dark"] .hamburger-social-icons a:hover {
    color: #ddd4ca;
}

.hamburger-social-icons svg {
    width: 26px;
    height: 26px;
}

.hamburger-nav {
    list-style: none;
    margin: 0;
    padding: 0;
}

.hamburger-nav li {
    margin: 0;
    padding: 0;
}

.hamburger-nav > li > a {
    display: block;
    padding: 15px 10px;
    color: var(--text-color);
    text-decoration: none;
    font-size: 16px;
    border-bottom: 1px solid var(--border-color-main, #ddd);
    transition: background 0.2s ease;
    position: relative;
}

.hamburger-nav > li > a:hover {
    background: rgba(0,0,0,0.05);
}

/* Hamburger menu submenu styles */
.hamburger-nav .menu-item-has-children > a {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.hamburger-nav .submenu-arrow {
    font-size: 24px;
    transition: transform 0.3s ease;
    display: inline-block;
    margin-left: 10px;
}

.hamburger-nav .menu-item-has-children.submenu-open > a .submenu-arrow {
    transform: rotate(90deg);
}

.hamburger-nav .sub-menu {
    list-style: none;
    margin: 0;
    padding: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    background: rgba(0,0,0,0.03);
}

.hamburger-nav .menu-item-has-children.submenu-open > .sub-menu {
    max-height: 1000px;
}

.hamburger-nav .sub-menu li a {
    display: block;
    padding: 12px 10px 12px 30px;
    color: var(--text-color);
    text-decoration: none;
    font-size: 15px;
    border-bottom: 1px solid var(--border-color-main, #ddd);
    transition: background 0.2s ease;
}

.hamburger-nav .sub-menu li a:hover {
    background: rgba(0,0,0,0.05);
}

body.menu-open {
    overflow: hidden;
}

body.menu-open::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 9997;
}

/* Mobile Bottom Navigation */
.mobile-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--content-bg, #fff);
    border-top: 1px solid var(--border-color-main, #ddd);
    display: none;
    justify-content: space-around;
    align-items: center;
    padding: 8px 14px;
    z-index: 999;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
}

.mobile-bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--text-color, #333);
    text-decoration: none;
    padding: 4px 12px;
    transition: color 0.2s ease;
    background: transparent !important;
    border: none;
    cursor: pointer;
    font-family: inherit;
}

.mobile-bottom-nav-item:hover,
.mobile-bottom-nav-item:focus {
    color: var(--primary-color, #c00);
}

.mobile-bottom-nav-item svg {
    margin-bottom: 2px;
}

.mobile-bottom-nav-item .sun-icon,
.mobile-bottom-nav-item .moon-icon {
    transition: all 0.3s ease;
}

.mobile-bottom-nav-item .moon-icon {
    display: none;
}

html[data-theme="dark"] .mobile-bottom-nav-item .sun-icon {
    display: none;
}

html[data-theme="dark"] .mobile-bottom-nav-item .moon-icon {
    display: block;
}

.mobile-bottom-nav-item span {
    font-size: 11px;
    font-weight: 500;
}

.mobile-bottom-nav-item.active span {
    font-weight: 700;
}

/* Mobile Search Overlay */
.mobile-search-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.9);
    z-index: 99999;
    display: none !important;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.mobile-search-overlay.active {
    display: flex !important;
    opacity: 1;
    pointer-events: auto;
}

.mobile-search-content {
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    position: relative;
    display: flex;
    flex-direction: column;
}

.mobile-search-close {
    position: absolute;
    top: -50px;
    right: 0;
    background: none;
    border: none;
    color: #fff;
    cursor: pointer;
    padding: 10px;
    font-size: 24px;
}

.mobile-search-form {
    display: flex;
    width: 100%;
    margin-bottom: 15px;
}

.mobile-search-form input[type="search"],
.mobile-search-form .search-field {
    flex: 1;
    padding: 16px 20px;
    border: none;
    border-radius: 8px 0 0 8px;
    background: #fff;
    color: #333;
    font-size: 16px;
}

.mobile-search-form button,
.mobile-search-form .search-submit {
    padding: 16px 24px;
    background: var(--search-button-bg, #aca396);
    color: var(--search-button-text, #fff);
    border: none;
    border-radius: 0 8px 8px 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Mobile search results */
.mobile-search-results {
    background: var(--content-bg, #fff);
    border-radius: 8px;
    overflow-y: auto;
    max-height: calc(90vh - 100px);
}

.mobile-search-preview {
    padding: 0;
}

.mobile-search-item {
    display: flex;
    gap: 15px;
    padding: 15px;
    border-bottom: 1px solid var(--border-color-main, #ddd);
    text-decoration: none;
    color: inherit;
    transition: background 0.2s ease;
}

.mobile-search-item:hover {
    background: var(--background-color, #f5f5f5);
}

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

.mobile-search-item-content {
    flex: 1;
    display: flex;
    align-items: center;
}

.mobile-search-item h3 {
    font-size: 16px;
    margin: 0;
    color: var(--text-color, #333);
}

.show-all-results-btn {
    display: block;
    width: 100%;
    padding: 16px;
    background: var(--link-color, #6e3838);
    color: #fff !important;
    text-align: center;
    text-decoration: none;
    font-weight: 600;
    border-radius: 0 0 8px 8px;
    transition: background 0.2s ease;
}

.show-all-results-btn:hover {
    background: var(--link-hover-color, #5a5350);
}

.search-loading,
.no-results-preview,
.search-error {
    padding: 40px 20px;
    text-align: center;
    color: var(--text-color, #333);
    background: var(--content-bg, #fff);
    border-radius: 8px;
}

html[data-theme="dark"] .mobile-search-results {
    background: var(--content-bg, #2d2d2d);
}

html[data-theme="dark"] .mobile-search-item {
    border-bottom-color: #444;
}

html[data-theme="dark"] .mobile-search-item:hover {
    background: rgba(255,255,255,0.05);
}

html[data-theme="dark"] .mobile-search-item h3 {
    color: var(--text-color, #e0e0e0);
}

html[data-theme="dark"] .show-all-results-btn {
    background: #cec9bd;
    color: #1a1a1a !important;
}

html[data-theme="dark"] .show-all-results-btn:hover {
    background: #b8b3a7;
}

html[data-theme="dark"] .search-loading,
html[data-theme="dark"] .no-results-preview,
html[data-theme="dark"] .search-error {
    background: var(--content-bg, #2d2d2d);
    color: var(--text-color, #e0e0e0);
}

html[data-theme="dark"] .search-result-item {
    border-color: #444;
}

html[data-theme="dark"] .entry-summary,
html[data-theme="dark"] .search-result-link .entry-summary {
    color: #b0b0b0;
}

/* Entry meta icons (likes and comments) */
.entry-meta-icons {
    display: flex;
    gap: 1rem;
    margin-top: 0.75rem;
    font-size: 0.9rem;
    color: #666;
}

.meta-icon {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.meta-icon svg {
    flex-shrink: 0;
}

.likes-icon {
    color: #ff6b6b;
}

.comments-icon {
    color: #666;
}

html[data-theme="dark"] .entry-meta-icons {
    color: #999;
}

html[data-theme="dark"] .comments-icon {
    color: #999;
}

/* Responsive helpers */
.desktop-only {
    display: block;
}

.mobile-only {
    display: none;
}

/* Desktop hamburger menu opens from left */
@media (min-width: 768px) {
    .hamburger-menu {
        left: -320px;
        right: auto;
        transition: left 0.3s ease;
    }
    
    .hamburger-menu.active {
        left: 0;
        right: auto;
    }
}

/* Responsive adjustments */
@media (min-width: 1001px) and (max-width: 1150px) {
    .sticky-search-form {
        min-width: 150px;
        max-width: 300px;
    }
}

@media (max-width: 1150px) {
    .main-nav-wrapper {
        display: none;
    }
}

@media (max-width: 900px) and (min-width: 768px) {
    .social-icons {
        display: none !important;
    }
}

@media (max-width: 767px) {
    .desktop-only {
        display: none !important;
    }
    
    .mobile-only {
        display: block;
    }
    
    .mobile-bottom-nav {
        display: flex;
    }
    
    .sticky-search-form {
        display: none !important;
    }
    
    .sticky-nav-row-1 .sticky-nav-container {
        gap: 10px;
        padding: 0 15px;
        min-height: 56px;
        justify-content: flex-start;
    }
    
    .hamburger-menu-toggle {
        order: 1;
    }
    
    .site-title {
        font-size: 16px;
        order: 2;
        flex: 0 0 auto;
    }
    
    .social-icons {
        display: flex !important;
        order: 3;
        margin-left: auto;
        gap: 15px;
    }
    
    .social-icons a {
        width: 16px;
        height: 16px;
    }
    
    .social-icons svg {
        width: 16px;
        height: 16px;
    }
    
    body {
        padding-bottom: 70px;
    }
}



/* Dark mode support for sticky nav */
html[data-theme="dark"] .sticky-top-nav {
    background: #54504a;
    border-bottom-color: #444;
}

/* Dark mode link colors */
html[data-theme="dark"] a {
    color: #cec9bd;
}

html[data-theme="dark"] .page-title span {
    color: #cec9bd;
}

html[data-theme="dark"] .sticky-nav-row-1 {
    background: #54504a;
    border-bottom-color: #444;
}

html[data-theme="dark"] .site-title a {
    color: #ffffff;
}

html[data-theme="dark"] .site-title a:hover {
    color: #e0e0e0;
}

html[data-theme="dark"] .social-icons a {
    color: rgba(255,255,255,0.9) !important;
}

.html[data-theme="dark"] .social-icons a:hover {
    color: rgba(255,255,255,1) !important;
}

html[data-theme="dark"] .main-nav-menu > li > a {
    color: rgba(255,255,255,0.9);
}

html[data-theme="dark"] .main-nav-menu > li > a:hover {
    background: rgba(255,255,255,0.1);
}

html[data-theme="dark"] .sticky-search-form input[type="search"],
html[data-theme="dark"] .sticky-search-form .search-field {
    background: var(--background-color, #1a1a1a);
    color: var(--text-color, #e0e0e0);
    border-color: #444;
}

html[data-theme="dark"] .sticky-search-form button,
html[data-theme="dark"] .sticky-search-form .search-submit {
    background: #ddd4ca !important;
    color: #353114 !important;
}

html[data-theme="dark"] .hamburger-menu-toggle {
    background: transparent !important;
}

html[data-theme="dark"] .hamburger-menu-toggle span {
    background: rgba(255,255,255,0.9);
}

html[data-theme="dark"] .hamburger-menu {
    background: var(--content-bg, #2d2d2d);
}

html[data-theme="dark"] .hamburger-nav > li > a {
    color: var(--text-color, #e0e0e0);
    border-bottom-color: #444;
}

html[data-theme="dark"] .hamburger-nav > li > a:hover {
    background: rgba(255,255,255,0.05);
}

html[data-theme="dark"] .hamburger-nav .sub-menu {
    background: rgba(0,0,0,0.2);
}

html[data-theme="dark"] .mobile-bottom-nav {
    background: var(--content-bg, #2d2d2d);
    border-top-color: #444;
}

html[data-theme="dark"] .mobile-bottom-nav-item {
    color: var(--text-color, #e0e0e0);
    background: transparent !important;
}

html[data-theme="dark"] .mobile-bottom-nav-item svg {
    color: rgba(255,255,255,0.9);
}

html[data-theme="dark"] .mobile-bottom-nav-item span {
    color: rgba(255,255,255,0.9);
}

html[data-theme="dark"] .mobile-bottom-nav-item:hover,
html[data-theme="dark"] .mobile-bottom-nav-item:focus {
    color: var(--primary-color, #ff6b6b);
    background: transparent !important;
}

html[data-theme="dark"] .mobile-bottom-nav-item:hover svg,
html[data-theme="dark"] .mobile-bottom-nav-item:focus svg,
html[data-theme="dark"] .mobile-bottom-nav-item:hover span,
html[data-theme="dark"] .mobile-bottom-nav-item:focus span {
    color: var(--primary-color, #ff6b6b);
}

html[data-theme="dark"] .mobile-nav .sub-menu li a {
    color: var(--text-color, #e0e0e0);
    border-bottom-color: #444;
}

html[data-theme="dark"] .mobile-nav .sub-menu li a:hover {
    background: rgba(255,255,255,0.05);
}

html[data-theme="dark"] .mobile-menu-toggle span {
    background: rgba(255,255,255,0.9);
}

/* ==================== END STICKY TOP NAVIGATION ==================== */

/* Dark mode toggle in navigation */
.nav-dark-mode-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    background: transparent !important;
    border: none;
    cursor: pointer;
    padding: 8px 0;
    color: #1f1d0e !important;
    transition: all 0.3s ease;
    border-right: 1px solid rgba(31, 29, 14, 0.2);
    padding-right: 20px;
    margin-left: 15px;
    padding-left: 15px;
    flex-shrink: 0;
}

.nav-dark-mode-toggle:hover {
    color: #000 !important;
    background: transparent !important;
}

.nav-dark-mode-toggle svg {
    color: #1f1d0e !important;
}

.nav-dark-mode-toggle .mode-text {
    color: #1f1d0e !important;
}

html[data-theme="dark"] .nav-dark-mode-toggle {
    background: transparent !important;
    color: rgba(255,255,255,0.9) !important;
    border-right-color: rgba(255,255,255,0.9) !important;
}

html[data-theme="dark"] .nav-dark-mode-toggle:hover {
    background: transparent !important;
    color: rgba(255,255,255,1) !important;
}

html[data-theme="dark"] .nav-dark-mode-toggle svg {
    color: rgba(255,255,255,0.9) !important;
}

html[data-theme="dark"] .nav-dark-mode-toggle .mode-text {
    color: rgba(255,255,255,0.9) !important;
}

.nav-dark-mode-toggle svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.nav-dark-mode-toggle .mode-text {
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
}

.nav-dark-mode-toggle .sun-icon,
.nav-dark-mode-toggle .moon-icon {
    transition: all 0.3s ease;
}

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

html[data-theme="dark"] .nav-dark-mode-toggle .sun-icon {
    display: none;
}

html[data-theme="dark"] .nav-dark-mode-toggle .moon-icon {
    display: block;
}

/* Hide text on smaller screens */
@media (max-width: 1300px) {
    .nav-dark-mode-toggle .mode-text {
        display: none;
    }
    .nav-dark-mode-toggle {
        padding: 8px;
    }
}

.site-wrapper {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 20px;
    gap: 20px;
}

/* Huvudinnehåll */
.site-main {
    width: 100%;
    max-width: 1050px;
    background: var(--content-bg, #fff);
    padding: 30px;
    border-radius: 8px;
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

/* Sidospalter */
.sidebar-column {
    width: 300px;
    flex-shrink: 0;
    display: none;
    position: sticky;
    top: 20px;
    align-self: flex-start;
    transition: top 0.3s ease;
}

.sidebar-column.left {
    order: -1;
}

.sidebar-column.right {
    order: 1;
}

.column-placeholder {
    width: 300px;
    height: 600px;
    background: #f0f0f0;
    border: 1px dashed #ccc;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #999;
}

/* Post/Article styling */
.site-main > .post {
    margin-bottom: 60px;
    padding-bottom: 40px;
    border-bottom: 2px solid #eee;
}

.site-main > .post:last-child {
    border-bottom: none;
}

/* Reduce spacing for search and archive grid items */
.search-result-item.post,
article.post.search-result-item {
    margin-bottom: 0;
    padding-bottom: 0;
}

.entry-header {
    margin-bottom: 20px;
}

.entry-title {
    margin-bottom: 10px;
}

.entry-title a {
    color: #333;
    text-decoration: none;
}

.entry-title a:hover {
    color: #0066cc;
}

.entry-meta {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 15px;
}

/* Hide entry-meta on desktop when sidebar is visible (single posts) */
@media (min-width: 1650px) {
    .single-post .entry-meta {
        display: none;
    }
}

.entry-meta a {
    color: #666;
}

.entry-meta a:hover {
    color: #0066cc;
}

.post-thumbnail {
    margin-bottom: 20px;
    border-radius: 8px;
    overflow: hidden;
}

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

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

/* Links inside content area */
.site-main a,
.site-main .entry-content a,
.entry-content a,
article a {
    color: var(--content-link-color, #7f7540);
}

.site-main a:hover,
.site-main .entry-content a:hover,
.entry-content a:hover,
article a:hover {
    color: var(--content-link-hover-color, #7a0a0a);
}

.entry-content p {
    margin-bottom: 1em;
}

.entry-content ul,
.entry-content ol {
    margin-left: 0;
    padding-left: 2em;
    margin-bottom: 1em;
}

.entry-content li {
    margin-bottom: 0.5em;
}

/* Sidebar widget lists */
.sidebar-column ul,
.sidebar-column ol {
    margin-left: 0;
    padding-left: 1.5em;
    list-style-position: outside;
}

.sidebar-column li {
    margin-bottom: 0.5em;
}

/* Recipe-specifik styling */
.recipe-meta {
    background: #f9f9f9;
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
    border-left: 4px solid #0066cc;
}

.recipe-meta-item {
    display: inline-block;
    margin-right: 20px;
    margin-bottom: 10px;
}

.recipe-meta-item strong {
    color: #333;
}

.recipe-ingredients,
.recipe-instructions {
    margin: 30px 0;
}

.recipe-ingredients h3,
.recipe-instructions h3 {
    border-bottom: 2px solid #0066cc;
    padding-bottom: 10px;
    margin-bottom: 15px;
}

/* Navigation */
.navigation {
    padding: 30px 0;
    clear: both;
}

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

.nav-links a {
    padding: 10px 20px;
    background: #0066cc;
    color: #fff;
    border-radius: 4px;
    text-decoration: none;
}

.nav-links a:hover {
    background: #004499;
    text-decoration: none;
}

/* Comments */
.comments-area {
    margin-top: 40px;
    padding-top: 40px;
    border-top: 2px solid #eee;
}

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

.comment {
    margin-bottom: 20px;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 8px;
}

/* Footer */
.site-footer {
    background: var(--sticky-nav-row1-bg, #735146);
    color: #333;
    padding: 40px 20px;
    text-align: center;
    margin-top: 60px;
}

html[data-theme="dark"] .site-footer {
    background: #54504a;
    color: #fff;
}

.site-footer a {
    color: #333;
}

html[data-theme="dark"] .site-footer a {
    color: #fff;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
}

.footer-text {
    margin-bottom: 20px;
    line-height: 1.6;
}

.footer-text p {
    margin: 0.5em 0;
}

.footer-navigation {
    margin-top: 20px;
}

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

.footer-navigation li {
    display: inline;
}

/* Responsiv design */

/* Desktop (1650px+): Visa båda sidoannonserna */
@media (min-width: 1650px) {
    .header-image-desktop {
        display: block;
    }
    
    .header-image-mobile {
        display: none;
    }
    
    .sidebar-column.left,
    .sidebar-column.right {
        display: block;
    }
}

/* Medium desktop (1370px - 1649px): Visa vänster sidoannons */
@media (min-width: 1370px) and (max-width: 1649px) {
    .header-image-desktop {
        display: block;
    }
    
    .header-image-mobile {
        display: none;
    }
    
    .sidebar-column.left {
        display: block;
    }
}

/* Desktop (768px+) */
@media (min-width: 768px) {
    .header-image-desktop {
        display: block;
    }
    
    .header-image-mobile {
        display: none;
    }
}

/* Entry footer styling */
.entry-footer {
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid #ddd;
}

/* Share buttons */
.share-buttons {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 2rem 0;
    padding: 1.5rem;
    background: var(--block-group-bg, #fff);
    border-radius: 8px;
}

.share-label {
    font-weight: 600;
    color: var(--text-color, #353114);
    font-size: 1rem;
}

.share-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    transition: all 0.3s ease;
    text-decoration: none;
}

.share-button svg {
    width: 24px;
    height: 24px;
}

.share-button.facebook {
    background: #1877f2;
    color: #fff;
}

.share-button.facebook:hover {
    background: #145dbf;
    transform: scale(1.1);
}

.share-button.twitter {
    background: #000;
    color: #fff;
}

.share-button.twitter:hover {
    background: #333;
    transform: scale(1.1);
}

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

.share-button.pinterest:hover {
    background: #ad081b;
    transform: scale(1.1);
}

.share-button.email {
    background: #666;
    color: #fff;
}

.share-button.email:hover {
    background: #444;
    transform: scale(1.1);
}

html[data-theme="dark"] .share-buttons {
    background: rgba(255,255,255,0.05);
}

/* Entry meta at bottom */
.entry-meta-bottom {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(0,0,0,0.1);
    font-size: 0.95rem;
    color: #666;
}

html[data-theme="dark"] .entry-meta-bottom {
    border-top-color: rgba(255,255,255,0.1);
    color: #999;
}

.entry-meta-bottom .posted-on,
.entry-meta-bottom .cat-links {
    margin-right: 1rem;
}

.entry-meta-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    font-size: 0.9rem;
    color: #666;
}

.entry-meta-footer .posted-on {
    font-style: italic;
}

.entry-meta-footer .comments-link a {
    color: var(--link-color, #6e3838);
    text-decoration: none;
    font-weight: 500;
}

.entry-meta-footer .comments-link a:hover {
    color: var(--link-hover-color, #5a5350);
    text-decoration: underline;
}

/* Tablet och mindre */
@media (max-width: 767px) {
    body {
        background-color: #fff;
    }
    
    .site-wrapper {
        padding: 0;
    }
    
    .site-main {
        padding: 20px;
        border: none;
        box-shadow: none;
        border-radius: 0;
        max-width: 100%;
    }
    
    h1 { font-size: 2rem; }
    h2 { font-size: 1.75rem; }
    h3 { font-size: 1.5rem; }
    
    .nav-links {
        flex-direction: column;
    }
}

/* Comments Section Styling */
.comments-area {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 2px solid var(--border-color, #ddd);
}

.comments-title {
    margin-bottom: 2rem;
    font-size: 1.75rem;
    color: var(--text-color, #333);
}

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

.comment-list .comment {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: var(--content-bg, #fff);
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.comment-list .children {
    list-style: none;
    margin-left: 2rem;
    margin-top: 1rem;
}

.comment-author {
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.comment-author .avatar {
    border-radius: 50%;
    float: left;
    margin-right: 1rem;
}

.comment-metadata {
    font-size: 0.875rem;
    color: var(--meta-color, #666);
    margin-bottom: 1rem;
}

.comment-metadata a {
    color: var(--meta-color, #666);
    text-decoration: none;
}

.comment-metadata a:hover {
    color: var(--link-color, #6e3838);
}

.comment-content {
    margin-bottom: 1rem;
    line-height: 1.6;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.comment-content a {
    word-break: break-all;
}

.reply {
    margin-top: 1rem;
}

.reply a {
    font-size: 0.875rem;
    padding: 0.5rem 1rem;
    background: #ddd4ca;
    color: #353114;
    border-radius: 4px;
    text-decoration: none;
    display: inline-block;
}

.reply a:hover {
    background: #ccc4ba;
}

.no-comments {
    font-style: italic;
    color: var(--meta-color, #666);
    padding: 1rem;
    text-align: center;
}

/* Comment Form */
.comment-respond {
    margin-top: 2rem;
}

.comment-reply-title {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
}

.comment-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.comment-form-comment label,
.comment-form-author label,
.comment-form-email label,
.comment-form-url label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.comment-form-comment textarea,
.comment-form-author input,
.comment-form-email input,
.comment-form-url input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color, #ddd);
    border-radius: 4px;
    font-family: inherit;
    font-size: 1rem;
    background: var(--input-bg, #fff);
    color: var(--text-color, #333);
    transition: border-color 0.3s ease, background-color 0.3s ease;
}

.comment-form-comment textarea {
    min-height: 150px;
    resize: vertical;
}

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

html[data-theme="light"] .comment-form-comment textarea:focus,
html[data-theme="light"] .comment-form-author input:focus,
html[data-theme="light"] .comment-form-email input:focus,
html[data-theme="light"] .comment-form-url input:focus {
    background: #fff !important;
}

.form-submit {
    margin-top: 1rem;
}

.form-submit input[type="submit"] {
    padding: 0.75rem 2rem;
    background: #ddd4ca;
    color: #353114;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.form-submit input[type="submit"]:hover {
    background: #ccc4ba;
}

html[data-theme="dark"] .form-submit input[type="submit"] {
    background: rgba(255,255,255,0.1) !important;
    color: #b0b0b0 !important;
}

html[data-theme="dark"] .form-submit input[type="submit"]:hover {
    background: rgba(255,255,255,0.15) !important;
    color: #e0e0e0 !important;
}

html[data-theme="dark"] .reply a {
    background: rgba(255,255,255,0.1);
    color: #b0b0b0;
}

html[data-theme="dark"] .reply a:hover {
    background: rgba(255,255,255,0.15);
    color: #e0e0e0;
}

/* Mobil */
@media (max-width: 480px) {
    .site-wrapper {
        padding: 0;
    }
    
    .site-main {
        padding: 20px;
        border: none;
        box-shadow: none;
        border-radius: 0;
    }
    
    .comment-list .children {
        margin-left: 1rem;
    }
    
    h1 { font-size: 1.75rem; }
    h2 { font-size: 1.5rem; }
}

/* WordPress Admin Bar Fixes */
body.admin-bar .sidebar-column {
    top: calc(20px + 32px); /* Adjust sticky position for admin bar */
    max-height: calc(100vh - 32px - 40px);
}

body.admin-bar .sticky-post-header {
    top: 32px;
}

@media screen and (max-width: 782px) {
    body.admin-bar .sidebar-column {
        top: calc(20px + 46px);
        max-height: calc(100vh - 46px - 40px);
    }
    
    body.admin-bar .sticky-post-header {
        top: 46px;
    }
}

/* Fix for admin bar hiding elements */
body.admin-bar .site-header,
body.admin-bar .sidebar-column,
body.admin-bar .footer-text {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* Widget Styling */
.widget_block {
    margin-bottom: 1rem;
}

.wp-block-group {
    margin-bottom: 2rem;
    padding: var(--block-group-padding, 20px);
    background-color: var(--block-group-bg, #ffffff);
    border: var(--block-group-border-width, 1px) solid var(--block-group-border-color, #dddddd);
    box-shadow: var(--block-group-shadow, 0 2px 8px rgba(0,0,0,0.1));
    border-radius: 8px;
}

/* Dark mode wp-block-group colors */
html[data-theme="dark"] .wp-block-group {
    background-color: var(--block-group-bg-dark, #2d2d2d);
    border-color: var(--block-group-border-color-dark, #444444);
    border-width: var(--block-group-border-width-dark, 1px);
}

/* Sidebar h2 heading size (desktop only) */
@media (min-width: 1370px) {
    .sidebar-column h2 {
        font-size: var(--sidebar-h2-size, 20px);
    }
}

.wp-block-latest-posts.wp-block-latest-posts__list li {
    clear: both;
    overflow-wrap: break-word;
    line-height: 1.4rem;
    margin-bottom: 0.6rem;
    font-size: 90%;
}

/* Search Widget Styling */
.wp-block-search,
.search-form {
    position: relative;
    display: flex;
    align-items: stretch;
}

/* Hide search widget title */
.wp-block-search__label,
.widget_search h2,
.widget_block h2:has(+ .wp-block-search) {
    display: none !important;
}

/* Search input */
.wp-block-search__input,
.search-form .search-field {
    background-color: var(--search-bg, #ffffff);
    color: var(--search-button-bg, #66b3ff);
    border: 1px solid var(--border-color-main, #dddddd);
    border-radius: var(--search-input-radius, 8px) 0 0 var(--search-input-radius, 8px);
    padding: 10px 15px;
    width: 100%;
    flex: 1;
    font-size: 1rem;
    font-weight: bold;
    letter-spacing: 0.3px;
    transition: all 0.3s ease;
    border-right: none;
}

.wp-block-search__input:focus,
.search-form .search-field:focus {
    outline: none;
    border-color: var(--search-button-bg, #66b3ff);
    box-shadow: 0 0 0 2px rgba(102, 179, 255, 0.2);
}

/* Search button */
.wp-block-search__button,
.search-form .search-submit {
    background-color: #5a5d5157 !important;
    color: #ffffff !important;
    border: none;
    border-radius: 0 var(--search-button-radius, 8px) var(--search-button-radius, 8px) 0;
    padding: 10px 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0;
    min-width: 55px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-left: 0;
}

.wp-block-search__button:hover,
.search-form .search-submit:hover {
    opacity: 0.85;
}

/* Replace button text with SVG search icon */
.wp-block-search__button::before,
.search-form .search-submit::before {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    background-image: url('data:image/svg+xml;utf8,<svg role="img" width="26" height="26" viewBox="0 0 24 24" aria-hidden="true" xmlns="http://www.w3.org/2000/svg"><path fill="white" d="M17.121 15l5.598 5.597a.5.5 0 010 .707l-1.415 1.415a.5.5 0 01-.707 0L15 17.12 17.121 15z"></path><path fill="white" fill-rule="evenodd" d="M10.5 19a8.5 8.5 0 100-17 8.5 8.5 0 000 17zm0-2.75a5.75 5.75 0 100-11.5 5.75 5.75 0 000 11.5z" clip-rule="evenodd"></path></svg>');
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
}

/* Dark mode search colors - keep icon color */
html[data-theme="dark"] .wp-block-search__button::before,
html[data-theme="dark"] .search-form .search-submit::before {
    background-image: url('data:image/svg+xml;utf8,<svg role="img" width="26" height="26" viewBox="0 0 24 24" aria-hidden="true" xmlns="http://www.w3.org/2000/svg"><path fill="white" d="M17.121 15l5.598 5.597a.5.5 0 010 .707l-1.415 1.415a.5.5 0 01-.707 0L15 17.12 17.121 15z"></path><path fill="white" fill-rule="evenodd" d="M10.5 19a8.5 8.5 0 100-17 8.5 8.5 0 000 17zm0-2.75a5.75 5.75 0 100-11.5 5.75 5.75 0 000 11.5z" clip-rule="evenodd"></path></svg>');
}

/* Button inside layout - override to joined style */
.wp-block-search__inside .wp-block-search__button {
    margin-left: 0;
}

/* Responsive search */
@media (max-width: 768px) {
    .wp-block-search__input,
    .search-form .search-field {
        font-size: 0.95rem;
        padding: 8px 12px;
    }
    
    .wp-block-search__button,
    .search-form .search-submit {
        min-width: 50px;
        padding: 8px 15px;
    }
}

/* Search Results Page Styling */
.page-header {
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--border-color-main, #ddd);
}

/* Sort options sidebar (desktop) */
.sort-options-sidebar {
    background: var(--block-group-bg, #fff);
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.sort-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0 0 1rem 0;
    color: var(--text-color, #353114);
}

.sort-option {
    display: block;
    padding: 0.75rem 1rem;
    margin-bottom: 0.5rem;
    color: var(--text-color, #353114);
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.2s ease;
    font-weight: 500;
}

.sort-option:hover {
    background: rgba(0,0,0,0.05);
}

.sort-option.active {
    background: var(--link-color, #7f7540);
    color: #fff;
}

html[data-theme="dark"] .sort-options-sidebar {
    background: rgba(255,255,255,0.05);
}

html[data-theme="dark"] .sort-option:hover {
    background: rgba(255,255,255,0.1);
}

html[data-theme="dark"] .sort-option.active {
    background: var(--link-color, #7f7540);
    color: #fff;
}

/* Hide sidebar sorting on mobile */
@media (max-width: 1369px) {
    .sort-options-sidebar {
        display: none;
    }
}

/* Mobile sorting dropdown */
.sort-dropdown-toggle {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    background: var(--block-group-bg, #fff);
    border: 1px solid rgba(0,0,0,0.1);
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-color, #353114);
    transition: all 0.2s ease;
}

.sort-dropdown-toggle:hover {
    border-color: rgba(0,0,0,0.2);
}

.sort-dropdown-toggle svg:first-child {
    flex-shrink: 0;
}

.sort-current-label {
    flex: 1;
    text-align: left;
}

.sort-current-label {
    flex: 1;
    text-align: left;
    font-size: 0.9rem;
}

.sort-dropdown-toggle .chevron {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
    transition: transform 0.3s ease;
}

.sort-dropdown-toggle.active .chevron {
    transform: rotate(180deg);
}

.sort-dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin-top: 0.5rem;
    background: var(--block-group-bg, #fff);
    border: 1px solid rgba(0,0,0,0.1);
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 100;
}

/* ==================== COOKIEYES ADJUSTMENTS ==================== */

/* Move CookieYes revisit button above mobile menu */
.cky-revisit-bottom-left {
    bottom: 80px !important;
    left: 15px !important;
}

@media (min-width: 768px) {
    .cky-revisit-bottom-left {
        bottom: 15px !important;
    }
}

.sort-dropdown-menu.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.sort-dropdown-item {
    display: block;
    padding: 0.75rem 1rem;
    color: var(--text-color, #353114);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: background 0.2s ease;
}

.sort-dropdown-item:hover {
    background: rgba(0,0,0,0.05);
}

.sort-dropdown-item.active {
    background: var(--link-color, #7f7540);
    color: #fff;
}

html[data-theme="dark"] .sort-dropdown-toggle {
    border-color: rgba(255,255,255,0.15);
    color: #e0e0e0;
}

html[data-theme="dark"] .sort-dropdown-toggle:hover {
    border-color: rgba(255,255,255,0.25);
    background: rgba(255,255,255,0.05);
}

html[data-theme="dark"] .sort-dropdown-menu {
    background: #2a2a2a;
    border-color: rgba(255,255,255,0.1);
}

html[data-theme="dark"] .sort-dropdown-item {
    color: #e0e0e0;
}

html[data-theme="dark"] .sort-dropdown-item:hover {
    background: rgba(255,255,255,0.1);
}

html[data-theme="dark"] .sort-dropdown-item.active {
    background: var(--link-color, #7f7540);
    color: #fff;
}

.page-title {
    font-size: 2rem;
    color: var(--text-color, #333);
    margin: 0 0 0.5rem 0;
}

.page-title span {
    color: #676560;
}

.archive-count {
    margin: 0;
    font-size: 1rem;
    color: var(--meta-color, #666);
    font-weight: 400;
    flex: 1;
}

/* Page header layout */
.page-header-left {
    margin-bottom: 0.75rem;
}

.page-header-bottom {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    justify-content: flex-start;
}

/* Mobile sorting dropdown - now compact inline */
.sort-dropdown-mobile {
    position: relative;
    min-width: 180px;
    max-width: 220px;
    flex-shrink: 0;
}

.sort-dropdown-toggle {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: transparent;
    border: 1px solid rgba(0,0,0,0.15);
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-color, #353114);
    transition: all 0.2s ease;
}

.sort-dropdown-toggle:hover {
    border-color: rgba(0,0,0,0.25);
    background: rgba(0,0,0,0.02);
}

.sort-dropdown-toggle svg:first-child {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.sort-current-label {
    flex: 1;
    text-align: left;
    font-size: 0.9rem;
}

/* ==================== SHARED CONTENT GRID ==================== */
/* Used for search results, archives, categories, etc. */
.content-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-bottom: 3rem;
}

.search-result-item,
.category-card {
    background: var(--content-bg, #fff);
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.category-card {
    padding: 1.5rem;
    text-align: center;
    text-decoration: none;
    align-items: center;
}

.category-card:hover {
    border-color: #7f7540;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.category-thumbnail {
    width: 100%;
    aspect-ratio: 16/9;
    overflow: hidden;
    border-radius: 6px;
    margin-bottom: 1rem;
}

.category-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.category-content {
    width: 100%;
}

.category-card h3 {
    font-size: 1.1rem;
    margin: 0 0 0.5rem 0;
    color: var(--text-color, #333);
}

.category-card .category-count {
    font-size: 0.9rem;
    color: var(--meta-color, #666);
}

.search-result-link {
    display: flex;
    flex-direction: column;
    height: 100%;
    text-decoration: none;
    color: inherit;
}

.search-result-link:hover {
    text-decoration: none;
}

.search-result-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.search-result-thumbnail {
    width: 100%;
    overflow: hidden;
    aspect-ratio: 16/9;
    background: #f5f5f5;
}

.search-result-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.search-result-item:hover .search-result-thumbnail img {
    transform: scale(1.05);
}

.search-result-item:hover {
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

.search-result-content {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.search-result-content .entry-title {
    font-size: 1.25rem;
    margin-bottom: 5px;
}

.search-result-content .entry-title {
    color: var(--text-color, #333);
    transition: text-decoration 0.2s ease;
}

.search-result-link:hover .entry-title {
    text-decoration: underline;
}

.search-result-link .entry-summary {
    font-size: 0.9rem;
    color: var(--meta-color, #666);
    margin-bottom: 0.5rem;
    text-decoration: none;
}

.search-result-link:hover .entry-summary {
    text-decoration: none;
}

.no-results {
    text-align: center;
    padding: 3rem 1rem;
}

.no-results .page-content {
    margin-top: 2rem;
}

/* Hide search form on search page (desktop) */
@media (min-width: 768px) {
    .no-results .search-form {
        display: none;
    }
}

/* Search loading state */
.search-loading-main {
    padding: 3rem 1rem;
    text-align: center;
    font-size: 1.2rem;
    color: var(--meta-color, #666);
}

/* Tablet */
@media (max-width: 1024px) {
    .content-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
}

/* Mobile */
@media (max-width: 768px) {
    .content-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .page-title {
        font-size: 1.5rem;
    }
    
    /* Horizontal layout for category cards on mobile (matching compact style) */
    .category-card {
        display: flex;
        flex-direction: row;
        align-items: center;
        text-align: left;
        padding: 0.75rem;
        gap: 0;
        border: none;
        border-radius: 0;
        border-bottom: 1px solid #e5e5e5;
    }
    
    .category-card:hover {
        border-color: #e5e5e5;
        border-bottom-color: #7f7540;
        transform: none;
        box-shadow: none;
    }
    
    .category-thumbnail {
        width: 100px;
        min-width: 100px;
        height: 100px;
        flex-shrink: 0;
        margin-bottom: 0;
    }
    
    .category-content {
        flex: 1;
        padding: 0 0 0 1rem;
        display: flex;
        flex-direction: column;
        justify-content: center;
    }
    
    .category-content h3 {
        font-size: 1.1rem;
        margin: 0 0 0.3rem 0;
    }
    
    .category-count {
        font-size: 0.85rem;
        margin: 0;
    }
}

/* Sticky Post Header */
.sticky-post-header {
    display: none;
    align-items: center;
    gap: 2rem;
    transition: all 0.3s ease;
}

/* Sticky Post Info - for home/archive pages in left sidebar */
.sticky-post-info {
    background: var(--block-group-bg, #fff);
    border-radius: 8px;
    padding: var(--block-group-padding, 20px);
    margin-bottom: 2rem;
    transition: all 0.3s ease;
}

.sticky-post-info-label {
    font-size: 0.85rem;
    text-transform: uppercase;
    color: #999;
    font-weight: 600;
    letter-spacing: 0.5px;
    margin-bottom: 0.75rem;
}

.sticky-post-info-title {
    font-size: 1.25rem;
    margin: 0 0 0.75rem 0;
    line-height: 1.3;
    color: var(--text-color, #333);
}

.sticky-post-info-date {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 1rem;
    font-style: italic;
}

.sticky-post-info-thumbnail {
    margin: 0 0 1rem 0;
    border-radius: 4px;
    overflow: hidden;
}

.sticky-post-info-thumbnail img {
    width: 100%;
    height: auto;
    display: block;
    max-height: 180px;
    object-fit: cover;
}

.sticky-post-info-categories {
    margin-top: 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.category-button {
    display: block;
    background: #ddd4ca;
    color: #353114;
    padding: 0.75rem 1rem;
    border-radius: 4px;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
    text-align: center;
    width: 100%;
    margin-bottom: 0.5rem;
}

.category-button:last-child {
    margin-bottom: 0;
}

.category-button:hover {
    background: #ccc4ba;
    text-decoration: none;
}

html[data-theme="dark"] .category-button {
    background: rgba(255,255,255,0.1);
    color: #b0b0b0;
}

html[data-theme="dark"] .category-button:hover {
    background: rgba(255,255,255,0.15);
    color: #e0e0e0;
}

.sticky-post-info-comment-link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background: #ddd4ca;
    color: #353114;
    padding: 0.75rem 1rem;
    border-radius: 4px;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
    text-align: center;
    width: 100%;
    margin-bottom: 0.75rem;
}

.sticky-post-info-comment-link svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.sticky-post-info-comment-link:hover {
    background: #ccc4ba;
    transform: translateY(-2px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    text-decoration: none;
    color: #353114;
}

html[data-theme="dark"] .sticky-post-info-comment-link {
    background: rgba(255,255,255,0.1);
    color: #b0b0b0;
}

html[data-theme="dark"] .sticky-post-info-comment-link:hover {
    background: rgba(255,255,255,0.15);
    color: #e0e0e0;
}

/* Sticky post info likes */
.sticky-post-info-likes {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(0,0,0,0.1);
}

.like-button {
    background: rgba(0,0,0,0.05);
    border: none;
    cursor: pointer;
    padding: 0.75rem 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    font-weight: 500;
    font-family: var(--body-font, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif);
    color: #353114;
    border-radius: 4px;
    transition: all 0.3s ease;
    width: 100%;
    margin-bottom: 0.75rem;
}

.like-button:hover:not(.liked):not(:disabled) {
    background: rgba(0,0,0,0.1);
}

.like-button svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    transition: all 0.3s ease;
}

.like-button.liked svg {
    fill: #ff6b6b;
    stroke: #ff6b6b;
}

.like-button.liked {
    background: none !important;
}

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

.like-count {
    font-weight: 600;
}

/* Dark mode likes */
html[data-theme="dark"] .sticky-post-info-likes {
    border-top-color: rgba(255,255,255,0.1);
}

html[data-theme="dark"] .like-button {
    color: #b0b0b0 !important;
    background: rgba(255,255,255,0.1) !important;
}

html[data-theme="dark"] .like-button:hover:not(.liked):not(:disabled) {
    background: rgba(255,255,255,0.15) !important;
    color: #e0e0e0 !important;
}

/* Dark mode sticky post info */
html[data-theme="dark"] .sticky-post-info {
    background-color: var(--content-bg, #1a1a1a);
    border-right-color: var(--block-group-border-color-dark, #444444);
}

html[data-theme="dark"] .sticky-post-info-date {
    color: #999;
}

/* Hide on mobile - show on tablet and desktop with left sidebar */
@media (max-width: 1369px) {
    .sticky-post-info {
        display: none;
    }
}

.sticky-post-header .sticky-title {
    font-size: 2rem;
    margin: 0;
    line-height: 1.3;
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sticky-post-header .sticky-comment-link {
    background: #ddd4ca;
    color: #353114;
    padding: 0.5rem 1.5rem;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 500;
    white-space: nowrap;
    transition: all 0.3s ease;
    font-size: 0.95rem;
}

.sticky-post-header .sticky-comment-link:hover {
    background: #ccc4ba;
    transform: translateY(-2px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    text-decoration: none;
    color: #353114;
}

/* Dark mode sticky header */
html[data-theme="dark"] .sticky-post-header {
    background: var(--content-bg, #1a1a1a);
    border-bottom-color: #444;
}

/* Mobile sticky header */
@media (max-width: 768px) {
    .sticky-post-header {
        padding: 0.75rem 1rem;
        margin-left: -20px;
        margin-right: -20px;
        gap: 1rem;
    }
    
    .sticky-post-header .sticky-title {
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    .sticky-post-header,
    .sticky-home-header {
        margin-left: -15px;
        margin-right: -15px;
    }
}

@media (max-width: 480px) {
    .sticky-post-header {
        margin-left: -15px;
        margin-right: -15px;
    }
}

/* ==================== INFINITE SCROLL LOADING ==================== */

.infinite-scroll-loading {
    text-align: center;
    padding: 3rem 0;
    margin: 2rem 0;
}

.infinite-scroll-loading p {
    color: var(--meta-color, #666);
    font-size: 1rem;
    margin-top: 1rem;
}

.loading-spinner {
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 4px solid var(--border-color-main, #ddd);
    border-top-color: var(--link-color, #6e3838);
    border-radius: 50%;
    animation: spinner-rotate 0.8s linear infinite;
}

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

html[data-theme="dark"] .infinite-scroll-loading p {
    color: #999;
}

html[data-theme="dark"] .loading-spinner {
    border-color: #444;
    border-top-color: #cec9bd;
}

/* Load More Button */
.load-more-button {
    display: block;
    margin: 2rem auto;
    padding: 1rem 2rem;
    background: var(--link-color, #6e3838);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.load-more-button:hover {
    background: var(--link-hover-color, #5a5350);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.load-more-button:active {
    transform: translateY(0);
}

html[data-theme="dark"] .load-more-button {
    background: #cec9bd;
    color: #1a1a1a;
}

html[data-theme="dark"] .load-more-button:hover {
    background: #b8b3a7;
}

/*--------------------------------------------------------------
# Category Grid (Recipe Categories Page)
--------------------------------------------------------------*/
.popular-categories-section {
    margin-bottom: 3rem;
}

.section-heading {
    font-size: 1.75rem;
    margin: 2rem 0 1rem 0;
    color: var(--text-color, #333);
    font-weight: 700;
}

html[data-theme="dark"] .section-heading {
    color: var(--text-color, #e0e0e0);
}

/* Mobile: sticky search at top */
@media (max-width: 768px) {
    .search .page-header,
    .category .page-header,
    .archive .page-header {
        position: sticky;
        top: 57px; /* Below sticky nav when visible */
        background: var(--background-color, #f5f5f5);
        z-index: 10;
        padding: 1rem 0;
        margin: 0 -1rem;
        padding-left: 1rem;
        padding-right: 1rem;
        box-shadow: 0 2px 8px rgba(0,0,0,0.05);
        transition: top 0.3s ease;
    }
    
    /* When sticky nav is hidden, move header to top */
    body.nav-hidden .search .page-header,
    body.nav-hidden .category .page-header,
    body.nav-hidden .archive .page-header {
        top: 0 !important;
    }
    
    html[data-theme="dark"] .search .page-header,
    html[data-theme="dark"] .category .page-header,
    html[data-theme="dark"] .archive .page-header {
        background: var(--background-color, #1a1a1a);
    }
}

/*--------------------------------------------------------------
# Explore Page (Utforska)
--------------------------------------------------------------*/
.explore-page .page-description {
    font-size: 1.1rem;
    color: var(--meta-color, #666);
    margin: 0.5rem 0 0 0;
}

.explore-section {
    margin-bottom: 4rem;
}

.section-heading {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.75rem;
    margin: 0 0 1.5rem 0;
    color: var(--text-color, #333);
}

.section-heading svg {
    color: #7f7540;
}

.section-header-with-link {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.view-all-link {
    font-size: 1rem;
    color: #7f7540;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s;
}

.view-all-link:hover {
    color: #5f5730;
}

/* Spotlight Section */
.spotlight-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.spotlight-item {
    background: var(--content-bg, #fff);
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
}

.spotlight-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}

.spotlight-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

.spotlight-thumbnail {
    width: 100%;
    height: 200px;
    overflow: hidden;
    background: #f0f0f0;
}

.spotlight-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.spotlight-item:hover .spotlight-thumbnail img {
    transform: scale(1.05);
}

.spotlight-content {
    padding: 1.25rem;
}

.spotlight-title {
    font-size: 1.1rem;
    margin: 0 0 0.75rem 0;
    color: var(--text-color, #333);
    line-height: 1.4;
}

.spotlight-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.likes-count {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.9rem;
    color: #ff6b6b;
}

/* Toplist Section */
.toplist-filters {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
}

.filter-select {
    padding: 0.75rem 1rem;
    border: 2px solid var(--border-color-main, #ddd);
    border-radius: 8px;
    font-size: 1rem;
    background: var(--content-bg, #fff);
    color: var(--text-color, #333);
    cursor: pointer;
    transition: border-color 0.2s;
}

.filter-select:hover {
    border-color: #7f7540;
}

.filter-select:focus {
    outline: none;
    border-color: #7f7540;
}

.toplist-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

.toplist-item {
    display: flex;
    gap: 1.5rem;
    background: var(--content-bg, #fff);
    border-radius: 8px;
    padding: 1.5rem;
    transition: box-shadow 0.2s;
}

.toplist-item:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.toplist-rank {
    font-size: 2rem;
    font-weight: 700;
    color: #7f7540;
    min-width: 50px;
    text-align: center;
}

.toplist-thumbnail {
    width: 150px;
    height: 100px;
    border-radius: 6px;
    overflow: hidden;
    flex-shrink: 0;
}

.toplist-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.toplist-content {
    flex: 1;
}

.toplist-title {
    font-size: 1.25rem;
    margin: 0 0 0.5rem 0;
}

.toplist-title a {
    color: var(--text-color, #333);
    text-decoration: none;
}

.toplist-title a:hover {
    text-decoration: underline;
}

.toplist-stats {
    display: flex;
    gap: 1.5rem;
    color: var(--meta-color, #666);
    font-size: 0.95rem;
}

/* Archive Section */
.archive-selector {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.archive-button {
    padding: 0.75rem 2rem;
    background: #7f7540;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.archive-button:hover:not(:disabled) {
    background: #5f5730;
}

.archive-button:disabled {
    background: #ccc;
    cursor: not-allowed;
    opacity: 0.6;
}

/* Dark Mode */
html[data-theme="dark"] .explore-page .page-description {
    color: #b0b0b0;
}

html[data-theme="dark"] .section-heading {
    color: var(--text-color, #e0e0e0);
}

html[data-theme="dark"] .view-all-link {
    color: #cec9bd;
}

html[data-theme="dark"] .view-all-link:hover {
    color: #e0dbd0;
}

html[data-theme="dark"] .spotlight-item,
html[data-theme="dark"] .toplist-item,
html[data-theme="dark"] .category-card {
    background: var(--content-bg, #2d2d2d);
}

html[data-theme="dark"] .spotlight-title,
html[data-theme="dark"] .toplist-title a,
html[data-theme="dark"] .category-card h3 {
    color: var(--text-color, #e0e0e0);
}

html[data-theme="dark"] .spotlight-thumbnail,
html[data-theme="dark"] .toplist-thumbnail {
    background: #1a1a1a;
}

html[data-theme="dark"] .filter-select {
    background: var(--content-bg, #2d2d2d);
    color: var(--text-color, #e0e0e0);
    border-color: #444;
}

html[data-theme="dark"] .filter-select:hover,
html[data-theme="dark"] .filter-select:focus {
    border-color: #cec9bd;
}

html[data-theme="dark"] .toplist-stats,
html[data-theme="dark"] .category-card .category-count {
    color: #b0b0b0;
}

html[data-theme="dark"] .category-card {
    border-color: #444;
}

html[data-theme="dark"] .category-card:hover {
    border-color: #cec9bd;
}

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

@media (max-width: 768px) {
    .spotlight-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    
    .toplist-filters,
    .archive-selector {
        flex-direction: column;
        align-items: stretch;
    }
    
    .filter-select,
    .archive-button {
        width: 100%;
    }
    
    .toplist-item {
        flex-direction: column;
    }
    
    .toplist-thumbnail {
        width: 100%;
        height: 180px;
    }
    
    .section-header-with-link {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
}
    }
}
