/*
Theme Name: Vogeltrader
Description: Custom WordPress theme voor Vogeltrader website, gebaseerd op PSD design.
Version: 1.0.0
Author: Vogeltrader
Text Domain: vogeltrader
Domain Path: /languages
Requires at least: 5.0
Tested up to: 6.3
Requires PHP: 7.4
License: GPL v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
*/

/* Reset en basis styling */
:root {
    --primary-color: #2563eb;
    --secondary-color: #1e40af;
    --accent-color: #f59e0b;
    --text-primary: #1f2937;
    --text-secondary: #6b7280;
    --text-light: #9ca3af;
    --background-white: #ffffff;
    --background-light: #f9fafb;
    --background-dark: #111827;
    --border-color: #e5e7eb;
    --border-light: #f3f4f6;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
    --spacing-xl: 3rem;
    --font-family-primary: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --font-family-heading: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.7;
    color: #333333;
    background-color: #ffffff;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    margin: 0;
    padding: 0;
    padding-top: 120px;
    /* Space for fixed header */
}

/* Header Clean Styling - Force all elements white, no borders */
.site-header,
.site-header *,
.header-content,
.header-content * {
    background: white !important;
    border: none !important;
    box-shadow: none !important;
    outline: none !important;
}

/* Exception for search elements - keep custom styling */
.search-input-wrapper,
.search-input-wrapper *,
.search-input,
.advanced-search-form,
.advanced-search-container {
    background: revert !important;
}

/* Exception for menu links - allow hover colors and effects */
.main-navigation a,
.header-navigation a,
.main-navigation a:hover,
.header-navigation a:hover,
.main-navigation .current-menu-item a,
.header-navigation .current-menu-item a,
.main-navigation .current_page_item a,
.header-navigation .current_page_item a {
    background: revert !important;
    color: revert !important;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-family-heading);
    font-weight: 700;
    line-height: 1.3;
    color: var(--text-primary);
    margin-bottom: var(--spacing-sm);
}

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: 1.125rem;
}

p {
    margin-bottom: var(--spacing-sm);
    color: var(--text-secondary);
}

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

a:hover {
    color: var(--secondary-color);
}

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

@media (min-width: 640px) {
    .container {
        padding: 0 var(--spacing-md);
    }
}

@media (min-width: 1024px) {
    .container {
        padding: 0 var(--spacing-lg);
    }

    /* Ensure clean horizontal navigation on larger screens */
    .main-navigation ul {
        justify-content: center;
        flex-wrap: nowrap;
        gap: 16px;
    }

    .main-navigation a {
        font-size: 0.9rem;
        padding: 8px 16px;
    }
}

/* Header styling - Compatible with customizer */
.site-header {
    background: #ffffff;
    /* box-shadow will be controlled by customizer */
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 10000;
    border: none;
    /* height will be controlled by customizer */
}

.site-header .container {
    padding: 0;
    max-width: 100%;
    margin: 0;
    width: 100%;
}

/* Header content wrapper - Compatible with customizer height */
.header-content {
    display: grid;
    grid-template-columns: 250px 1fr 250px;
    align-items: center;
    gap: 24px;
    width: 100%;
    min-height: 60px;
    /* height will be controlled by customizer */
}

/* Fallback for older header structure */
.header-main {
    display: grid;
    grid-template-columns: 1fr 2fr 1fr;
    align-items: center;
    gap: 24px;
    min-height: 60px;
    width: 100%;
}

/* Header Logo Container - Left */
.header-logo,
.site-branding {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    grid-column: 1;
}

/* Header Search - Center */
.header-search {
    display: flex;
    justify-content: center;
    position: relative;
    grid-column: 2;
}

/* Header User Menu - Right */
.header-user-menu {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    grid-column: 3;
}

/* Desktop Layout Improvements */
@media (min-width: 769px) {
    .site-header {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        width: 100%;
        z-index: 10000;
        background: white;
        border: none;
        box-shadow: none;
    }

    .header-content {
        display: grid;
        grid-template-columns: 300px 1fr 300px;
        align-items: center;
        gap: 24px;
        width: 100%;
        min-height: 60px;
        padding: 0 24px;
        background: white;
    }

    .header-logo {
        justify-self: start;
    }

    .header-search {
        justify-self: center;
        width: 100%;
        max-width: 600px;
    }

    .header-user-menu {
        justify-self: end;
    }

    /* Navigation spacing for desktop */
    .main-navigation ul {
        gap: 24px;
        background: white;
        border: none;
        box-shadow: none;
    }

    .main-navigation ul li a {
        padding: 12px 20px;
        font-size: 16px;
        background: white;
        border: none;
        box-shadow: none;
    }

    .main-navigation,
    .header-navigation {
        background: white;
        border: none;
        box-shadow: none;
        z-index: 9999;
    }
}

.advanced-search-container {
    width: 100%;
    max-width: 500px;
    position: relative;
}

.advanced-search-form {
    position: relative;
    z-index: 100;
    outline: none;
}

.advanced-search-form:focus {
    outline: none;
    box-shadow: none;
}

.search-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    background-image: url('../zoeken/zoeken.svg') !important;
    background-size: 100% 100% !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
    background-color: transparent !important;
    border: none;
    border-radius: 0;
    overflow: visible;
    transition: none;
    min-height: 86px;
    max-height: 86px;
    padding: 0;
    box-shadow: none;
    outline: none;
}

.search-input-wrapper:focus-within {
    box-shadow: none;
    transform: none;
    outline: none;
    border: none;
}

.search-input-wrapper:focus {
    box-shadow: none;
    outline: none;
    border: none;
}

.search-input {
    position: absolute;
    top: 50%;
    left: 80px;
    right: 60px;
    transform: translateY(-50%);
    padding: 8px 16px;
    border: none !important;
    background: transparent !important;
    background-color: transparent !important;
    font-size: 16px;
    color: #333;
    outline: none !important;
    transition: none;
    height: auto;
    font-weight: 400;
    line-height: normal;
    box-shadow: none !important;
}

.search-input::placeholder {
    color: #888;
    font-size: 16px;
    line-height: normal;
    font-weight: 400;
}

.search-input:focus {
    color: #333;
    background: transparent !important;
    background-color: transparent !important;
    outline: none !important;
    box-shadow: none !important;
    border: none !important;
}

.search-submit {
    display: none;
}

/* Remove blue focus outlines from all search elements */
.header-search *,
.header-search *:focus,
.header-search *:focus-within,
.advanced-search-container *,
.advanced-search-container *:focus,
.advanced-search-container *:focus-within {
    outline: none !important;
    box-shadow: none !important;
    border-color: transparent !important;
}

/* Search Filters */
.search-filters {
    background: #c3ebfd;
    border: 2px solid #38bdf9;
    border-radius: 12px;
    padding: 12px 16px;
    margin-top: 8px;
    box-shadow: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 200;
    max-width: 100%;
    overflow: hidden;
}

.filter-row {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr;
    gap: 10px;
    align-items: center;
    max-width: 100%;
}

.filter-select,
.filter-input {
    padding: 6px 10px;
    border: 2px solid #0665a0;
    border-radius: 6px;
    font-size: 13px;
    background: white;
    color: #333;
    transition: all 0.3s ease;
    width: 100%;
    box-sizing: border-box;
    min-width: 0;
}

.filter-select:focus,
.filter-input:focus {
    border-color: #38bdf9;
    outline: none;
    box-shadow: none;
}

.price-range {
    display: flex;
    align-items: center;
    gap: 6px;
    width: 100%;
}

.price-input {
    flex: 1;
    min-width: 0;
    font-size: 13px;
    padding: 6px 8px;
}

.price-separator {
    color: #0665a0;
    font-weight: 500;
    font-size: 12px;
    flex-shrink: 0;
}

/* Search Type Toggle */
.search-type-toggle {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 2px solid #38bdf9;
}

.search-type-option {
    display: flex;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    font-size: 12px;
    color: #0665a0;
    font-weight: 500;
}

.search-type-option input[type="radio"] {
    margin: 0;
}

.search-type-option:has(input:checked) {
    color: #38bdf9;
    font-weight: 600;
}

/* Responsive filter styling */
@media (max-width: 600px) {
    .filter-row {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .price-range {
        justify-content: center;
        max-width: 200px;
        margin: 0 auto;
    }

    .search-filters {
        padding: 10px 12px;
    }

    .search-type-toggle {
        gap: 8px;
        flex-wrap: wrap;
    }

    .search-type-option {
        font-size: 11px;
    }
}

/* Duplicate removed - header-user-menu is defined above */

/* User Menu Styles - Base styling, customizer will override */
.user-menu-wrapper {
    position: relative;
}

.user-menu-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    /* Customizer controlled properties - defaults */
    padding: 12px 16px;
    background: transparent;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    color: #333333;
    transition: all 0.3s ease;
    white-space: nowrap;
}

/* Hover styles controlled by customizer */

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--primary-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
}

.user-name {
    font-weight: 500;
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dropdown-arrow {
    transition: transform 0.3s ease;
}

.user-menu-toggle[aria-expanded="true"] .dropdown-arrow {
    transform: rotate(180deg);
}

/* User Dropdown Menu */
.user-dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border: none;
    border-radius: 0;
    box-shadow: none;
    min-width: 220px;
    padding: 8px 0;
    margin-top: 4px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1000;
}

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

.user-info {
    padding: var(--spacing-sm) var(--spacing-md);
    border-bottom: 1px solid var(--border-light);
}

.user-email {
    font-size: 12px;
    color: var(--text-light);
}

.menu-divider {
    height: 1px;
    background: var(--border-light);
    margin: var(--spacing-xs) 0;
}

.menu-item {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-sm) var(--spacing-md);
    color: var(--text-primary);
    text-decoration: none;
    font-size: 14px;
    transition: background 0.3s ease;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    cursor: pointer;
}

.menu-item:hover {
    background: var(--background-light);
    color: var(--primary-color);
}

.logout-btn {
    color: #dc2626;
}

.logout-btn:hover {
    background: #fef2f2;
    color: #dc2626;
}

/* Guest Menu */
.guest-menu {
    display: flex;
    gap: 8px;
    align-items: center;
}

.login-btn,
.register-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 500;
    /* Customizer controlled properties - defaults */
    padding: 12px 16px;
    font-size: 16px;
    color: #333333;
    background: transparent;
    border: none;
    transition: all 0.3s ease;
    white-space: nowrap;
}

/* Hover styles controlled by customizer */

/* Live Search Results */
.live-search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: none;
    border-radius: 0;
    box-shadow: none;
    margin-top: 8px;
    max-height: 400px;
    overflow-y: auto;
    z-index: 1000;
}

.search-results-container {
    padding: var(--spacing-sm);
}

.search-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-lg);
    color: var(--text-secondary);
}

.loading-spinner {
    width: 20px;
    height: 20px;
    border: 2px solid var(--border-color);
    border-top: 2px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

    100% {
        transform: rotate(360deg);
    }
}

.search-results-section {
    margin-bottom: var(--spacing-md);
}

.search-results-section:last-child {
    margin-bottom: 0;
}

.search-section-title {
    font-size: 14px;
    font-weight: 600;
    color: #0665a0;
    margin-bottom: var(--spacing-sm);
    padding: 8px 15px;
    background: #38bdf9;
    color: white;
    border-bottom: none;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.search-result-item {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    text-decoration: none;
    color: inherit;
    border-bottom: 1px solid #f0f0f0;
    transition: all 0.2s ease;
}

.search-result-item:hover {
    background: rgba(56, 189, 249, 0.1);
    color: #0665a0;
}

.search-result-thumb {
    width: 60px;
    height: 45px;
    margin-right: 12px;
    border-radius: 4px;
    overflow: hidden;
    flex-shrink: 0;
    background: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-result-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.search-result-thumb-placeholder {
    font-size: 20px;
    color: #999;
}

.search-result-content {
    flex: 1;
    min-width: 0;
}

.search-result-title {
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.search-result-meta {
    font-size: 12px;
    color: #666;
    display: flex;
    align-items: center;
    gap: 8px;
}

.search-result-price {
    font-weight: 600;
    color: #0665a0;
    font-size: 14px;
    flex-shrink: 0;
}

.search-view-all {
    padding: 12px 15px;
    text-align: center;
    border-top: 1px solid #f0f0f0;
}

.search-view-all a {
    color: #0665a0;
    text-decoration: none;
    font-weight: 500;
    font-size: 13px;
}

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

.search-result-item {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-sm);
    border-radius: var(--radius-sm);
    transition: background 0.3s ease;
    text-decoration: none;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.search-result-item:hover {
    background: var(--background-light);
}

.search-result-thumb {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    flex-shrink: 0;
    background: var(--background-light);
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-result-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.search-result-thumb-placeholder {
    color: var(--text-light);
    font-size: 20px;
}

.search-result-content {
    flex: 1;
    min-width: 0;
}

.search-result-title {
    font-weight: 500;
    font-size: 14px;
    color: var(--text-primary);
    margin-bottom: 2px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.search-result-meta {
    font-size: 12px;
    color: var(--text-secondary);
    display: flex;
    gap: var(--spacing-xs);
    align-items: center;
}

.search-result-price {
    font-weight: 600;
    color: var(--primary-color);
    font-size: 14px;
}

.search-no-results {
    text-align: center;
    padding: var(--spacing-lg);
    color: var(--text-secondary);
}

.search-view-all {
    text-align: center;
    border-top: 1px solid var(--border-light);
    padding-top: var(--spacing-sm);
    margin-top: var(--spacing-sm);
}

.search-view-all a {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
}

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

/* Mobile Search Toggle */
.search-toggle {
    display: none;
    background: #c3ebfd;
    border: 2px solid #38bdf9;
    border-radius: 12px;
    padding: 10px;
    cursor: pointer;
    color: #0665a0;
    transition: all 0.3s ease;
    box-shadow: none;
}

.search-toggle:hover {
    background: #38bdf9;
    border-color: #0665a0;
    color: white;
    transform: none;
    box-shadow: none;
}

/* Header Bottom - Navigation Area */
.header-bottom {
    margin-top: var(--spacing-md);
    border-top: 1px solid var(--border-light);
    padding-top: var(--spacing-md);
}

/* === UNIFIED LOGO STYLING - CONFLICT PREVENTION === */
.custom-logo {
    display: block !important;
    object-fit: contain !important;
    object-position: center !important;
    transition: opacity 0.2s ease !important;
    /* Base defaults - customizer will override with !important */
    width: auto;
    height: auto;
    max-width: 200px;
    max-height: 80px;
    /* Reset any inherited styles */
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    background: none !important;
    position: relative !important;
}

.custom-logo:hover {
    opacity: 0.8;
}

.site-title {
    margin: 0;
    font-size: 1.875rem;
    font-weight: 800;
    font-family: var(--font-family-heading);
    letter-spacing: -0.025em;
}

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

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

.site-description {
    margin: 0;
    font-size: 0.875rem;
    color: var(--text-secondary);
    font-weight: 500;
    margin-top: 0.25rem;
}

.header-image {
    margin-top: var(--spacing-md);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

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

/* Navigation - Separate from header */
.main-navigation {
    background: #ffffff;
    border: none;
    position: relative;
    padding: 8px 0;
    box-shadow: none;
    width: 100%;
    clear: both;
    z-index: 9999;
}

.main-navigation .container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    position: relative;
}

.main-navigation ul {
    list-style: none;
    display: flex;
    align-items: center;
    margin: 0;
    padding: 0;
    gap: 16px;
    flex-wrap: nowrap;
    justify-content: center;
}

.main-navigation li {
    margin: 0;
    position: relative;
}

.main-navigation a {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    text-decoration: none;
    color: #333333;
    font-weight: 400;
    font-size: 16px;
    border-radius: 4px;
    transition: all 0.3s ease;
    position: relative;
    white-space: nowrap;
}

.main-navigation a:hover {
    color: #0665a0 !important;
    background-color: transparent !important;
    transform: translateY(-1px);
}

.main-navigation .current-menu-item>a {
    color: #2563eb !important;
    background-color: rgba(37, 99, 235, 0.08) !important;
}

.main-navigation .current-menu-ancestor>a {
    color: #2563eb !important;
    background-color: rgba(37, 99, 235, 0.03) !important;
}

/* Header Navigation Hover and Active States */
.header-navigation a:hover {
    color: #0665a0 !important;
    background-color: transparent !important;
    transform: translateY(-1px);
}

.header-navigation .current-menu-item>a {
    color: #2563eb !important;
    background-color: rgba(37, 99, 235, 0.08) !important;
}

.header-navigation .current-menu-ancestor>a {
    color: #2563eb !important;
    background-color: rgba(37, 99, 235, 0.03) !important;
}

/* Alleen de huidige pagina krijgt een lijn onderaan, niet de parent items */
.main-navigation .current-menu-item>a::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 3px;
    background: var(--primary-color);
    border-radius: 2px;
}

/* Sub-menu items krijgen GEEN lijn onderaan */
.main-navigation .sub-menu .current-menu-item>a::after {
    display: none !important;
}

/* BELANGRIJKE FIX: Parent menu items krijgen GEEN lijn onderaan */
.main-navigation .current-menu-ancestor>a::after {
    display: none !important;
}

/* Mobile menu toggle */
.menu-toggle {
    display: none;
    background: none;
    border: 2px solid var(--border-color);
    color: var(--text-primary);
    font-size: 16px;
    padding: var(--spacing-xs) var(--spacing-sm);
    cursor: pointer;
    border-radius: var(--radius-md);
    transition: all 0.2s ease;
    position: relative;
    width: 44px;
    height: 44px;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

.menu-toggle:hover {
    border-color: var(--primary-color);
    background-color: rgba(37, 99, 235, 0.05);
}

.menu-toggle .hamburger {
    display: block;
    width: 20px;
    height: 2px;
    background: var(--text-primary);
    margin: 2px 0;
    transition: all 0.3s ease;
    border-radius: 1px;
}

.menu-toggle.active .hamburger:nth-child(2) {
    transform: rotate(45deg) translate(3px, 3px);
    background: var(--primary-color);
}

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

.menu-toggle.active .hamburger:nth-child(4) {
    transform: rotate(-45deg) translate(4px, -4px);
    background: var(--primary-color);
}

/* Sub-menu styling */
.main-navigation .sub-menu {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    background: var(--background-white);
    min-width: 220px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 999;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
    padding: var(--spacing-xs);
}

.main-navigation li:hover .sub-menu,
.main-navigation li.focus .sub-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.main-navigation .sub-menu li {
    width: 100%;
    margin: 0;
}

.main-navigation .sub-menu a {
    padding: var(--spacing-sm);
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin: 2px 0;
}

.main-navigation .sub-menu a:hover {
    background: var(--background-light);
    color: var(--primary-color);
}

/* Content area */
.site-content {
    padding: var(--spacing-xl) 0;
    min-height: 70vh;
    background: var(--background-light);
}

.site-content .container {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: var(--spacing-xl);
    align-items: start;
}

.content-area {
    background: var(--background-white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    padding: var(--spacing-xl);
    border: 1px solid var(--border-light);
}

.widget-area {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-lg);
}

/* No sidebar layout */
.no-sidebar .site-content .container {
    grid-template-columns: 1fr;
    max-width: 800px;
}

/* Posts */
.post {
    margin-bottom: var(--spacing-xl);
    padding-bottom: var(--spacing-lg);
    border-bottom: 2px solid var(--border-light);
    position: relative;
}

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

.post::before {
    content: '';
    position: absolute;
    top: 0;
    left: -var(--spacing-xl);
    width: 4px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    border-radius: 2px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.post:hover::before {
    opacity: 1;
}

.entry-title {
    margin-bottom: var(--spacing-md);
    font-size: 2rem;
    font-weight: 700;
    line-height: 1.2;
    color: var(--text-primary);
}

.entry-title a {
    text-decoration: none;
    color: inherit;
    transition: color 0.2s ease;
}

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

.entry-meta {
    color: var(--text-light);
    font-size: 0.875rem;
    margin-bottom: var(--spacing-md);
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-sm);
    align-items: center;
}

.entry-meta span {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.entry-meta a {
    color: var(--text-secondary);
    font-weight: 500;
    text-decoration: none;
}

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

.entry-content {
    line-height: 1.8;
    color: var(--text-secondary);
}

.entry-content p {
    margin-bottom: var(--spacing-md);
}

.entry-content img {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    margin: var(--spacing-md) 0;
}

.entry-content h2,
.entry-content h3,
.entry-content h4 {
    margin-top: var(--spacing-lg);
    margin-bottom: var(--spacing-sm);
    color: var(--text-primary);
}

.entry-content blockquote {
    border-left: 4px solid var(--primary-color);
    padding-left: var(--spacing-md);
    margin: var(--spacing-lg) 0;
    font-style: italic;
    color: var(--text-secondary);
    background: var(--background-light);
    padding: var(--spacing-md);
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
}

.entry-content ul,
.entry-content ol {
    margin-bottom: var(--spacing-md);
    padding-left: var(--spacing-lg);
}

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

/* Post thumbnail */
.post-thumbnail {
    margin-bottom: var(--spacing-lg);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.post-thumbnail:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.post-thumbnail img {
    width: 100%;
    height: auto;
    display: block;
    margin: 0;
    transition: transform 0.3s ease;
}

.post-thumbnail:hover img {
    transform: scale(1.02);
}

/* Read more link */
.read-more {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary-color);
    font-weight: 600;
    text-decoration: none;
    font-size: 0.9rem;
    margin-top: var(--spacing-sm);
    transition: all 0.2s ease;
}

.read-more:hover {
    color: var(--secondary-color);
    gap: 0.75rem;
}

.read-more::after {
    content: '→';
    transition: transform 0.2s ease;
}

.read-more:hover::after {
    transform: translateX(2px);
}

/* Footer */
.site-footer {
    background: var(--background-dark);
    color: #ffffff;
    padding: var(--spacing-xl) 0 var(--spacing-lg);
    margin-top: var(--spacing-xl);
}

.footer-widgets {
    margin-bottom: var(--spacing-xl);
}

.footer-widget-area {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--spacing-xl);
    margin-bottom: var(--spacing-xl);
}

.footer-widget-column .widget {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-widget-column .widget-title {
    color: #ffffff;
    border-bottom-color: rgba(255, 255, 255, 0.1);
}

.footer-widget-column .widget-title::after {
    background: var(--accent-color);
}

.footer-widget-column .widget a {
    color: rgba(255, 255, 255, 0.8);
}

.footer-widget-column .widget a:hover {
    color: var(--accent-color);
}

.site-info {
    text-align: center;
    padding-top: var(--spacing-lg);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-navigation {
    margin-bottom: var(--spacing-md);
}

.footer-menu {
    display: flex;
    justify-content: center;
    gap: var(--spacing-lg);
    list-style: none;
    margin: 0;
    padding: 0;
    flex-wrap: wrap;
}

.footer-menu a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

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

.copyright {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.875rem;
    line-height: 1.6;
}

.copyright a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
}

.copyright a:hover {
    color: var(--accent-color);
}

/* Widget styling */
.widget {
    background: var(--background-white);
    padding: var(--spacing-lg);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-light);
    transition: box-shadow 0.3s ease;
}

.widget:hover {
    box-shadow: var(--shadow-md);
}

.widget-title {
    margin-bottom: var(--spacing-md);
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    padding-bottom: var(--spacing-sm);
    border-bottom: 2px solid var(--border-light);
    position: relative;
}

.widget-title::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 30px;
    height: 2px;
    background: var(--primary-color);
}

.widget ul {
    list-style: none;
}

.widget li {
    padding: var(--spacing-sm) 0;
    border-bottom: 1px solid var(--border-light);
    transition: padding-left 0.2s ease;
}

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

.widget li:hover {
    padding-left: var(--spacing-sm);
}

.widget a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

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

.widget .search-form {
    display: flex;
    gap: var(--spacing-xs);
    margin-top: var(--spacing-sm);
}

.widget .search-field {
    flex: 1;
    padding: var(--spacing-sm);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    transition: border-color 0.2s ease;
}

.widget .search-field:focus {
    outline: none;
    border-color: var(--primary-color);
}

.widget .search-submit {
    padding: var(--spacing-sm) var(--spacing-md);
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    font-weight: 600;
    transition: background 0.2s ease;
}

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

/* Responsive design */
@media (max-width: 1024px) {
    .site-content .container {
        grid-template-columns: 1fr 280px;
        gap: var(--spacing-lg);
    }

    .content-area {
        padding: var(--spacing-lg);
    }

    /* Smaller navigation for medium screens */
    .main-navigation ul {
        gap: 4px;
    }

    .main-navigation a {
        font-size: 0.8rem;
        padding: 4px 8px;
    }
}

@media (max-width: 768px) {

    /* Mobile Header Layout */
    .header-content,
    .header-main {
        grid-template-columns: auto 1fr auto;
        gap: 16px;
        min-height: 60px;
        padding: 0 16px;
    }

    .header-logo .custom-logo {
        /* Mobile override - but allow customizer to take precedence */
        max-height: 40px;
        max-width: 160px;
    }

    .advanced-search-container {
        display: none;
    }

    .search-toggle {
        display: flex;
    }

    .mobile-only {
        display: block !important;
    }

    .guest-menu .login-btn,
    .guest-menu .register-btn {
        padding: 6px 12px;
        font-size: 13px;
    }

    .guest-menu .login-btn svg,
    .guest-menu .register-btn svg {
        width: 16px;
        height: 16px;
    }

    .user-menu-toggle {
        padding: 6px 8px;
        font-size: 13px;
    }

    .user-name {
        display: none;
    }

    .user-avatar {
        width: 28px;
        height: 28px;
    }

    .user-dropdown-menu {
        right: -10px;
        min-width: 200px;
    }

    /* Mobile Search Overlay */
    .mobile-search-overlay {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 9999;
        display: none;
    }

    .mobile-search-overlay.active {
        display: flex;
        align-items: flex-start;
        padding-top: 80px;
    }

    .mobile-search-container {
        background: var(--background-white);
        margin: 0 var(--spacing-md);
        border-radius: var(--radius-lg);
        box-shadow: var(--shadow-lg);
        width: 100%;
        max-width: 500px;
        margin: 0 auto;
        padding: var(--spacing-md);
    }

    .site-content .container {
        grid-template-columns: 1fr;
        gap: var(--spacing-md);
    }

    .content-area {
        padding: var(--spacing-md);
    }

    .site-content {
        padding: var(--spacing-lg) 0;
    }

    .entry-title {
        font-size: 1.75rem;
    }

    h1 {
        font-size: 2rem;
    }

    h2 {
        font-size: 1.75rem;
    }

    h3 {
        font-size: 1.5rem;
    }

    /* Mobile Navigation */
    .menu-toggle {
        display: flex;
    }

    .main-navigation ul {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--background-white);
        box-shadow: var(--shadow-lg);
        border: 1px solid var(--border-color);
        border-radius: 0 0 var(--radius-lg) var(--radius-lg);
        padding: var(--spacing-sm);
        z-index: 1000;
    }

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

    .main-navigation li {
        width: 100%;
        margin: 2px 0;
    }

    .main-navigation a {
        padding: var(--spacing-sm);
        text-align: left;
        border-radius: var(--radius-sm);
        width: 100%;
    }

    .main-navigation .current-menu-item>a::after {
        display: none;
    }

    .main-navigation .sub-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        background: var(--background-light);
        box-shadow: none;
        border: none;
        border-radius: var(--radius-sm);
        margin-top: var(--spacing-xs);
        padding: var(--spacing-xs);
    }

    .main-navigation .sub-menu a {
        padding: var(--spacing-xs) var(--spacing-sm);
        font-size: 0.875rem;
        margin-left: var(--spacing-sm);
    }

    /* Header adjustments */
    .site-header .header-top,
    .site-header .header-bottom {
        padding: var(--spacing-sm) 0;
    }

    .site-header .header-top .container {
        justify-content: space-between;
        align-items: center;
    }

    .main-navigation .container {
        position: relative;
        justify-content: space-between;
    }

    .menu-toggle {
        margin-left: auto;
    }

    .site-branding {
        text-align: center;
        justify-content: center;
    }

    /* Logo adjustments for tablet - allow customizer override */
    .custom-logo {
        max-height: 75px;
        max-width: 250px;
    }

    .main-navigation {
        border-top: 1px solid var(--border-light);
        padding-top: var(--spacing-sm);
    }

    .main-navigation .container {
        justify-content: flex-end;
    }

    /* Footer adjustments */
    .footer-widget-area {
        grid-template-columns: 1fr;
        gap: var(--spacing-md);
    }

    .footer-menu {
        flex-direction: column;
        gap: var(--spacing-sm);
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 var(--spacing-sm);
    }

    .site-content {
        padding: var(--spacing-md) 0;
    }

    .content-area {
        padding: var(--spacing-sm);
    }

    .entry-title {
        font-size: 1.5rem;
    }

    h1 {
        font-size: 1.75rem;
    }

    h2 {
        font-size: 1.5rem;
    }

    h3 {
        font-size: 1.25rem;
    }

    .entry-meta {
        font-size: 0.8rem;
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }

    .post {
        margin-bottom: var(--spacing-lg);
        padding-bottom: var(--spacing-md);
    }

    .post::before {
        left: -var(--spacing-sm);
        height: 40px;
    }

    .widget {
        padding: var(--spacing-md);
        margin-bottom: var(--spacing-md);
    }

    .site-title {
        font-size: 1.5rem;
    }

    .site-description {
        font-size: 0.8rem;
    }

    /* Extra small mobile logo adjustments - allow customizer override */
    .custom-logo {
        max-height: 50px;
        max-width: 180px;
    }
}

/* Utility classes */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: var(--spacing-sm) var(--spacing-md);
    background: var(--primary-color);
    color: white;
    text-decoration: none;
    border: none;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: var(--shadow-sm);
}

.btn:hover {
    background: var(--secondary-color);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
    color: white;
}

.btn-secondary {
    background: var(--background-white);
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-secondary:hover {
    background: var(--primary-color);
    color: white;
}

.btn-accent {
    background: var(--accent-color);
    color: white;
}

.btn-accent:hover {
    background: #d97706;
}

.clearfix::after {
    content: "";
    display: table;
    clear: both;
}

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

.text-center {
    text-align: center;
}

.text-left {
    text-align: left;
}

.text-right {
    text-align: right;
}

/* Loading animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Focus states */
button:focus,
input:focus,
textarea:focus,
select:focus,
a:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Skip link */
.skip-link {
    background: var(--primary-color);
    color: white;
    padding: var(--spacing-sm) var(--spacing-md);
    text-decoration: none;
    position: absolute;
    top: -100px;
    left: var(--spacing-sm);
    z-index: 9999;
    border-radius: var(--radius-md);
    font-weight: 600;
    transition: top 0.3s ease;
}

.skip-link:focus {
    top: var(--spacing-sm);
}

/* WordPress core styling */
.alignleft {
    float: left;
    margin-right: 20px;
    margin-bottom: 20px;
}

.alignright {
    float: right;
    margin-left: 20px;
    margin-bottom: 20px;
}

.aligncenter {
    display: block;
    margin: 0 auto 20px;
}

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

.wp-caption-text {
    text-align: center;
    font-style: italic;
    color: #666;
}

/* Customizer Live Preview Visual Feedback */
.logo-updating {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
    border-radius: var(--radius-sm);
}

.menu-updating {
    outline: 1px solid var(--primary-color);
    outline-offset: 1px;
}

.logo-updating,
.menu-updating {
    animation: customizer-pulse 0.35s ease-in-out;
}

@keyframes customizer-pulse {
    0% {
        opacity: 1;
    }

    50% {
        opacity: 0.8;
    }

    100% {
        opacity: 1;
    }
}