/**
 * Blog Over Menu Styles
 * 
 * Comprehensive menu system with 4 layouts, dropdowns, sticky, and mobile.
 */

/* =========================================
   CSS Variables (Fallbacks, overridden by Customizer)
   ========================================= */
:root {
    --blog-over-menu-text: #1e293b;
    --blog-over-menu-hover: #3b82f6;
    --blog-over-menu-bg: #ffffff;
    --blog-over-dropdown-bg: #ffffff;
    --blog-over-dropdown-text: #1e293b;
    --blog-over-dropdown-hover: #3b82f6;
    --blog-over-menu-border: #e2e8f0;
    --blog-over-sticky-bg: #ffffff;
    --blog-over-sticky-text: #1e293b;
    --blog-over-menu-font-size: 15px;
    --blog-over-menu-font-weight: 600;
    --blog-over-menu-letter-spacing: 0px;
    --blog-over-menu-text-transform: none;
    --blog-over-mobile-bg: #ffffff;
    --blog-over-mobile-text: #1e293b;
    --blog-over-mobile-breakpoint: 992px;
    --blog-over-transition: 0.25s ease;
    --blog-over-shadow: 0 10px 40px -10px rgba(0, 0, 0, 0.15);
}

/* =========================================
   Container Styles
   ========================================= */
.blog-over-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.blog-over-container-full {
    width: 100%;
    padding: 0 20px;
}

/* =========================================
   Base Header Styles
   ========================================= */
.blog-over-header {
    background-color: var(--blog-over-menu-bg);
    border-bottom: 1px solid var(--blog-over-menu-border);
    position: relative;
    z-index: 1000;
}

.blog-over-header-inner {
    display: flex;
    align-items: center;
    min-height: 70px;
}

.blog-over-site-branding {
    flex-shrink: 0;
}

.blog-over-site-branding .site-title {
    margin: 0;
    font-size: 1.75rem;
    font-weight: 700;
}

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

.blog-over-site-branding .site-description {
    margin: 0;
    font-size: 0.875rem;
    color: #64748b;
}

/* =========================================
   Navigation Container
   ========================================= */
.blog-over-header-nav {
    display: flex;
    align-items: center;
}

.blog-over-primary-menu-container {
    display: flex;
    align-items: center;
}

/* =========================================
   Primary Menu
   ========================================= */
.blog-over-primary-menu {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
}

/* Menu Item - IMPORTANT: Flex container for link + toggle */
.blog-over-menu-item {
    position: relative;
    display: flex;
    align-items: center;
}

/* Top level items need full height for dropdown positioning */
.blog-over-menu-item-top {
    height: 100%;
}

/* Menu Link */
.blog-over-menu-link {
    display: flex;
    align-items: center;
    padding: 20px 18px;
    color: var(--blog-over-menu-text);
    text-decoration: none;
    font-size: var(--blog-over-menu-font-size);
    font-weight: var(--blog-over-menu-font-weight);
    letter-spacing: var(--blog-over-menu-letter-spacing);
    text-transform: var(--blog-over-menu-text-transform);
    transition: color var(--blog-over-transition), background-color var(--blog-over-transition);
    white-space: nowrap;
}

.blog-over-menu-link:hover,
.blog-over-menu-link:focus,
.blog-over-menu-item.current-menu-item>.blog-over-menu-link {
    color: var(--blog-over-primary);
    text-decoration: none;
}

/* =========================================
   Dropdown Toggle Button (Beside link)
   ========================================= */
.blog-over-dropdown-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    padding: 0;
    border: none;
    background: transparent;
    cursor: pointer;
    border-radius: 4px;
    transition: var(--blog-over-transition);
    margin-left: -4px;
    margin-right: 10px;
    flex-shrink: 0;
}

/* Remove individual hover styles - will use parent hover instead */
.blog-over-dropdown-toggle:hover,
.blog-over-dropdown-toggle:focus {
    background: transparent;
    outline: none;
}

/* Dropdown Icon (Chevron style) - Using CSS variable for rotation */
.blog-over-dropdown-icon {
    --chevron-rotate: 45deg;
    /* Default: pointing down */
    display: block;
    width: 6px;
    height: 6px;
    border-right: 2px solid var(--blog-over-menu-text);
    border-bottom: 2px solid var(--blog-over-menu-text);
    transform: rotate(var(--chevron-rotate));
    transition: transform 0.4s ease, border-color 0.3s ease;
    margin-top: -2px;
}

/* Chevron hover effect - smooth rotation + color change */
.blog-over-menu-item:hover>.blog-over-dropdown-toggle .blog-over-dropdown-icon,
.blog-over-has-dropdown:hover>.blog-over-dropdown-toggle .blog-over-dropdown-icon,
.blog-over-has-dropdown.submenu-open > .blog-over-dropdown-toggle .blog-over-dropdown-icon,
.menu-item-has-children.submenu-open > .blog-over-dropdown-toggle .blog-over-dropdown-icon {
    border-right-color: var(--blog-over-primary);
    border-bottom-color: var(--blog-over-primary);
    transform: rotate(calc(var(--chevron-rotate) + 180deg));
}

.blog-over-mobile-menu .blog-over-has-dropdown:hover>.blog-over-dropdown-toggle .blog-over-dropdown-icon {
    transform: rotate(var(--chevron-rotate));
}
.blog-over-mobile-menu .blog-over-has-dropdown.submenu-open > .blog-over-dropdown-toggle .blog-over-dropdown-icon,
.blog-over-mobile-menu .menu-item-has-children.submenu-open > .blog-over-dropdown-toggle .blog-over-dropdown-icon {
    transform: rotate(var(--chevron-rotate));
}

/* =========================================
   Dropdown Menus
   ========================================= */
.blog-over-sub-menu {
    list-style: none;
    margin: 0;
    padding: 10px 0;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 220px;
    background-color: var(--blog-over-dropdown-bg);
    box-shadow: var(--blog-over-shadow);
    border-radius: 6px;
    border: 1px solid var(--blog-over-menu-border);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: opacity var(--blog-over-transition), transform var(--blog-over-transition), visibility var(--blog-over-transition);
    z-index: 9999;
}

/* Show dropdown on hover OR when explicitly opened via toggle */
.blog-over-has-dropdown:hover>.blog-over-sub-menu,
.blog-over-has-dropdown.submenu-open > .blog-over-sub-menu,
.menu-item-has-children.submenu-open > .blog-over-sub-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Ensure mobile menu doesn't use hover for submenus on desktop */
/* =========================================
   Submenu Items - Flex layout for proper hover
   ========================================= */
.blog-over-sub-menu .blog-over-menu-item {
    display: flex;
    flex-wrap: wrap;
    /* Allow nested submenu to wrap */
    align-items: center;
    width: 100%;
    position: relative;
}

/* Submenu links */
.blog-over-sub-menu .blog-over-menu-link {
    flex: 1;
    min-width: 0;
    /* Prevent overflow */
    display: block;
    padding: 10px 20px;
    font-size: calc(var(--blog-over-menu-font-size) - 1px);
    color: var(--blog-over-dropdown-text);
    font-weight: 500;
    transition: color var(--blog-over-transition), background-color var(--blog-over-transition);
}

/* Has dropdown items need extra padding for toggle */
.blog-over-sub-menu .blog-over-has-dropdown>.blog-over-menu-link {
    padding-right: 45px;
    /* Space for toggle */
}

/* Full menu item hover - covers link AND toggle */
.blog-over-sub-menu .blog-over-menu-item:hover {
    background-color: rgba(59, 130, 246, 0.06);
}

.blog-over-sub-menu .blog-over-menu-item:hover>.blog-over-menu-link {
    color: var(--blog-over-primary);
    background-color: transparent;
    /* Let parent handle bg */
}

.blog-over-sub-menu .blog-over-menu-link:focus {
    color: var(--blog-over-dropdown-hover);
    background-color: rgba(59, 130, 246, 0.06);
}

/* Nested dropdowns (Level 2+) - Open to LEFT for all layouts */
.blog-over-sub-menu .blog-over-sub-menu {
    position: absolute;
    top: 0;
    left: auto;
    right: 100%;
    /* Open to LEFT */
    margin-left: 0;
    margin-right: 4px;
    flex-basis: 100%;
}

/* Dropdown toggle inside submenu - positioned LEFT */
.blog-over-sub-menu .blog-over-dropdown-toggle {
    position: absolute;
    left: 10px;
    right: auto;
    top: 50%;
    transform: translateY(-50%);
    margin-right: 0;
}

.blog-over-sub-menu .blog-over-has-dropdown {
    position: relative;
}

/* Submenu items - flex row-reverse for toggle on LEFT */
.blog-over-sub-menu .blog-over-menu-item {
    flex-direction: row-reverse;
}

/* Adjust padding for left toggle */
.blog-over-sub-menu .blog-over-has-dropdown>.blog-over-menu-link {
    padding-left: 45px;
    /* Space for toggle on left */
    padding-right: 20px;
}

/* Submenu chevron - points LEFT (135deg) for all layouts */
.blog-over-sub-menu .blog-over-dropdown-icon {
    --chevron-rotate: 135deg;
    /* Points left */
}

/* Submenu chevron hover - color change only */
.blog-over-sub-menu .blog-over-menu-item:hover>.blog-over-dropdown-toggle .blog-over-dropdown-icon,
.blog-over-sub-menu .blog-over-has-dropdown:hover>.blog-over-dropdown-toggle .blog-over-dropdown-icon,
.blog-over-sub-menu .blog-over-has-dropdown.submenu-open > .blog-over-dropdown-toggle .blog-over-dropdown-icon,
.blog-over-sub-menu .menu-item-has-children.submenu-open > .blog-over-dropdown-toggle .blog-over-dropdown-icon {
    border-right-color: var(--blog-over-primary);
    border-bottom-color: var(--blog-over-primary);
}

/* =========================================
   Layout 1: Classic (Logo Left, Menu Right)
   ========================================= */
.blog-over-layout-1 .blog-over-header-inner {
    justify-content: space-between;
}

.blog-over-layout-1 .blog-over-header-nav {
    margin-left: auto;
}

/* =========================================
   Layout 2: Centered (Logo Center, Menu Below)
   ========================================= */
.blog-over-layout-2 .blog-over-header-inner {
    flex-direction: column;
    text-align: center;
    padding: 20px 0 0;
}

.blog-over-layout-2 .blog-over-header-nav {
    width: 100%;
    border-top: 1px solid var(--blog-over-menu-border);
    justify-content: center;
    margin-top: 15px;
}

.blog-over-layout-2 .blog-over-primary-menu {
    justify-content: center;
}

/* =========================================
   Layout 3: Split (Menu-Logo-Menu)
   ========================================= */
.blog-over-layout-3 .blog-over-header-inner {
    justify-content: center;
    position: relative;
}

.blog-over-layout-3 .blog-over-menu-left,
.blog-over-layout-3 .blog-over-menu-right {
    flex: 1;
    position: relative;
}

.blog-over-layout-3 .blog-over-menu-left {
    display: flex;
    justify-content: flex-end;
}

.blog-over-layout-3 .blog-over-menu-right {
    display: flex;
    justify-content: flex-start;
}

.blog-over-layout-3 .blog-over-site-branding {
    padding: 0 40px;
    text-align: center;
}

/* Fix submenu positioning in Layout 3 */
.blog-over-layout-3 .blog-over-primary-menu {
    position: relative;
    flex-wrap: nowrap !important;
    /* Prevent items from wrapping to new line */
}

.blog-over-layout-3 .blog-over-menu-item {
    position: relative;
}

/* Ensure submenus stay within proper bounds */
.blog-over-layout-3 .blog-over-sub-menu {
    z-index: 9999;
}

/* Prevent menu item overflow in split layout */
.blog-over-layout-3 .blog-over-menu-left,
.blog-over-layout-3 .blog-over-menu-right {
    overflow: visible;
}

/* Allow menu items to shrink if needed */
.blog-over-layout-3 .blog-over-menu-link {
    padding: 20px 14px;
    /* Slightly smaller padding for split layout */
}

/* Right side menu - first level dropdown uses default left positioning */
.blog-over-layout-3 .blog-over-menu-right .blog-over-sub-menu {
    left: auto;
}

/* Layout 3 Right Menu - Fix nested submenu overlap */
.blog-over-layout-3 .blog-over-menu-right .blog-over-sub-menu .blog-over-menu-item {
    position: relative;
    z-index: 1;
}

/* Ensure nested submenus in right menu open LEFT and stack correctly */
.blog-over-layout-3 .blog-over-menu-right .blog-over-sub-menu .blog-over-sub-menu {
    position: absolute;
    top: 0;
    left: auto;
    right: 100%;
    margin-right: 4px;
    z-index: 9999;
}

/* Fix submenu item hover z-index to prevent overlap */
.blog-over-layout-3 .blog-over-menu-right .blog-over-sub-menu .blog-over-has-dropdown:hover {
    z-index: 10;
}

/* Ensure proper stacking for deeply nested submenus */
.blog-over-layout-3 .blog-over-menu-right .blog-over-sub-menu .blog-over-sub-menu .blog-over-sub-menu {
    z-index: 10000;
}

/* All nested submenus already open LEFT via global rules - no override needed */

/* =========================================
   Layout 4: Minimal (Hamburger Always)
   ========================================= */
.blog-over-layout-4 .blog-over-primary-menu-container {
    display: none !important;
}

.blog-over-layout-4 .blog-over-mobile-toggle {
    display: flex !important;
}

.blog-over-layout-4 .blog-over-header-inner {
    justify-content: space-between;
}

header.blog-over-layout-4 ~ .blog-over-mobile-menu {
    display: block;
}

/* =========================================
   Sticky Header
   ========================================= */
.blog-over-header.is-sticky {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 99999;
    background-color: var(--blog-over-sticky-bg);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
    animation: novaSlideDown 0.3s ease forwards;
}

.blog-over-header.is-sticky .blog-over-menu-link {
    color: var(--blog-over-sticky-text);
    padding: 16px 16px;
}

.blog-over-header.is-sticky .blog-over-menu-link:hover,
.blog-over-header.is-sticky .blog-over-menu-link:focus {
    color: var(--blog-over-menu-hover);
}

@keyframes novaSlideDown {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Sticky placeholder */
.blog-over-header-placeholder {
    display: none;
}

.blog-over-header-placeholder.active {
    display: block;
}

/* =========================================
   Mobile Menu Toggle
   ========================================= */
.blog-over-mobile-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    padding: 0;
    border: none;
    background: transparent;
    cursor: pointer;
    flex-direction: column;
    gap: 5px;
}

.blog-over-mobile-toggle .bar {
    display: block;
    width: 24px;
    height: 2px;
    background-color: var(--blog-over-menu-text);
    border-radius: 2px;
    transition: transform var(--blog-over-transition), opacity var(--blog-over-transition);
}

.blog-over-mobile-toggle:focus {
    outline: 2px solid var(--blog-over-menu-hover);
    outline-offset: 2px;
}

/* Hamburger to X animation */
.blog-over-mobile-toggle.active .bar:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.blog-over-mobile-toggle.active .bar:nth-child(2) {
    opacity: 0;
}

.blog-over-mobile-toggle.active .bar:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* =========================================
   Mobile Menu Panel
   ========================================= */
.blog-over-mobile-menu {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 300px;
    max-width: 85%;
    height: 100%;
    background-color: var(--blog-over-mobile-bg);
    z-index: 99998;
    overflow-y: auto;
    padding: 70px 0 20px;
    transform: translateX(-100%);
    transition: transform 0.35s ease;
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.1);
}

.blog-over-mobile-menu.active {
    transform: translateX(0);
}

.blog-over-mobile-menu .blog-over-primary-menu {
    flex-direction: column;
    width: 100%;
}

.blog-over-mobile-menu .blog-over-menu-item {
    display: flex;
    flex-wrap: wrap;
    width: 100%;
    border-bottom: 1px solid var(--blog-over-menu-border);
}

.blog-over-mobile-menu .blog-over-menu-link {
    flex: 1;
    color: var(--blog-over-mobile-text);
    padding: 15px 20px;
    font-size: 16px;
}

.blog-over-mobile-menu .blog-over-dropdown-toggle {
    width: 50px;
    height: auto;
    min-height: 48px;
    margin: 0;
    border-radius: 0;
    border-left: 1px solid var(--blog-over-menu-border);
    display: flex;
    align-items: center;
    justify-content: center;
    align-self: flex-start;
    /* Keep toggle at top when submenu expands */
}

/* Mobile menu chevron - default pointing down */
.blog-over-mobile-menu .blog-over-dropdown-icon {
    --chevron-rotate: 45deg;
    transition: transform 0.25s ease;
}

/* Chevron rotates UP when submenu is open */
.blog-over-mobile-menu .blog-over-has-dropdown.submenu-open > .blog-over-dropdown-toggle .blog-over-dropdown-icon,
.blog-over-mobile-menu .menu-item-has-children.submenu-open > .blog-over-dropdown-toggle .blog-over-dropdown-icon {
    --chevron-rotate: -135deg;
}

.blog-over-mobile-menu .blog-over-sub-menu {
    position: static;
    box-shadow: none;
    border: none;
    border-radius: 0;
    padding: 0;
    width: 100%;
    opacity: 1;
    visibility: visible;
    transform: none;
    display: block;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease;
    background-color: rgba(0, 0, 0, 0.02);
}

.blog-over-mobile-menu .blog-over-has-dropdown.submenu-open > .blog-over-sub-menu,
.blog-over-mobile-menu .menu-item-has-children.submenu-open > .blog-over-sub-menu {
    max-height: 1000px;
}

/* Fix submenu dropdown toggle position */
.blog-over-mobile-menu .blog-over-sub-menu .blog-over-dropdown-toggle {
    position: relative;
    left: auto;
    right: auto;
    top: auto;
    transform: none;
}

/* Reset submenu item flex direction for mobile */
.blog-over-mobile-menu .blog-over-sub-menu .blog-over-menu-item {
    flex-direction: row;
}

.blog-over-mobile-menu .blog-over-sub-menu .blog-over-menu-link {
    padding-left: 40px;
    font-size: 15px;
}

.blog-over-mobile-menu .blog-over-sub-menu .blog-over-sub-menu .blog-over-menu-link {
    padding-left: 60px;
    font-size: 14px;
}

.blog-over-mobile-close {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 36px;
    height: 36px;
    border: none;
    background: rgba(0, 0, 0, 0.08);
    cursor: pointer;
    font-size: 24px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #374151;
    border-radius: 6px;
    transition: all 0.2s ease;
    z-index: 10;
}

.blog-over-mobile-close span {
    display: block;
    font-weight: 300;
    margin-top: -2px;
}

.blog-over-mobile-close:hover,
.blog-over-mobile-close:focus {
    background-color: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    outline: none;
}

/* Mobile Overlay */
body.blog-over-menu-open::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    z-index: 99997;
}

/* Hide hamburger toggle when menu is open */
body.blog-over-menu-open .blog-over-mobile-toggle {
    opacity: 0;
    pointer-events: none;
}

/* =========================================
   Responsive
   ========================================= */
@media screen and (max-width: 992px) {
    .blog-over-primary-menu-container {
        display: none !important;
    }

    .blog-over-mobile-toggle {
        display: flex !important;
    }

    .blog-over-mobile-menu {
        display: block;
    }

    .blog-over-layout-3 .blog-over-menu-left,
    .blog-over-layout-3 .blog-over-menu-right {
        display: none !important;
    }

    .blog-over-layout-2 .blog-over-header-nav {
        display: none;
    }

    /* =========================================
       Mobile Header Layout 1: Center (Default)
       Logo centered, toggle below
       ========================================= */
    .blog-over-mobile-center .blog-over-header-inner {
        flex-direction: column;
        text-align: center;
        padding: 15px 20px;
        min-height: auto;
    }

    .blog-over-mobile-center .blog-over-site-branding {
        margin-bottom: 10px;
    }

    .blog-over-mobile-center .blog-over-mobile-toggle {
        margin: 0 auto;
    }

    .blog-over-mobile-center .blog-over-header-nav {
        width: 100%;
        justify-content: center;
    }

    /* =========================================
       Mobile Header Layout 2: Inline
       Logo left, toggle right (same line)
       ========================================= */
    .blog-over-mobile-inline .blog-over-header-inner {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        padding: 10px 15px;
        min-height: 60px;
    }

    .blog-over-mobile-inline .blog-over-site-branding {
        flex: 0 0 auto;
        margin: 0;
    }

    .blog-over-mobile-inline .blog-over-site-branding .site-title {
        font-size: 1.3rem;
    }

    .blog-over-mobile-inline .blog-over-mobile-toggle {
        margin: 0;
        flex: 0 0 auto;
    }

    .blog-over-mobile-inline .blog-over-header-nav {
        display: flex;
        align-items: center;
    }
}

/* =========================================
   Accessibility
   ========================================= */
.blog-over-menu-link:focus,
.blog-over-dropdown-toggle:focus,
.blog-over-mobile-toggle:focus,
.blog-over-mobile-close:focus {
    outline: 2px solid var(--blog-over-menu-hover);
    outline-offset: 2px;
}

/* Screen Reader Text */
.blog-over-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Skip Link */
.skip-link {
    position: absolute;
    top: -100px;
    left: 6px;
    z-index: 999999;
    padding: 8px 16px;
    background: var(--blog-over-menu-hover);
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
}

.skip-link:focus {
    top: 6px;
}

/* =========================================
   Dark Mode - Header & Menu
   ========================================= */
body.blog-over-dark-mode {
    --blog-over-menu-text: #e2e8f0;
    --blog-over-menu-hover: #60a5fa;
    --blog-over-menu-bg: #1e293b;
    --blog-over-dropdown-bg: #1e293b;
    --blog-over-dropdown-text: #cbd5e1;
    --blog-over-dropdown-hover: #60a5fa;
    --blog-over-menu-border: #334155;
    --blog-over-sticky-bg: #0f172a;
    --blog-over-sticky-text: #e2e8f0;
    --blog-over-mobile-bg: #1e293b;
    --blog-over-mobile-text: #e2e8f0;
}

/* Dark mode header background */
body.blog-over-dark-mode .blog-over-header {
    background-color: #1e293b;
    border-bottom-color: #334155;
}

/* Dark mode site title */
body.blog-over-dark-mode .blog-over-site-branding .site-title a {
    color: #f1f5f9;
}

body.blog-over-dark-mode .blog-over-site-branding .site-description {
    color: #94a3b8;
}

/* Dark mode dropdown toggle - NO hover background */
body.blog-over-dark-mode .blog-over-dropdown-toggle:hover,
body.blog-over-dark-mode .blog-over-dropdown-toggle:focus {
    background: transparent;
}

/* Dark mode dropdown icon */
body.blog-over-dark-mode .blog-over-dropdown-icon {
    border-right-color: #e2e8f0;
    border-bottom-color: #e2e8f0;
}

/* Dark mode dropdown menu */
body.blog-over-dark-mode .blog-over-sub-menu {
    background-color: #1e293b;
    border-color: #334155;
    box-shadow: 0 10px 40px -10px rgba(0, 0, 0, 0.5);
}

body.blog-over-dark-mode .blog-over-sub-menu .blog-over-menu-link:hover,
body.blog-over-dark-mode .blog-over-sub-menu .blog-over-menu-link:focus {
    background-color: rgba(96, 165, 250, 0.1);
}

/* Dark mode mobile toggle */
body.blog-over-dark-mode .blog-over-mobile-toggle .bar {
    background-color: #e2e8f0;
}

/* Dark mode mobile menu */
body.blog-over-dark-mode .blog-over-mobile-menu {
    background-color: #1e293b;
}

body.blog-over-dark-mode .blog-over-mobile-menu .blog-over-menu-item {
    border-bottom-color: #334155;
}

body.blog-over-dark-mode .blog-over-mobile-menu .blog-over-dropdown-toggle {
    border-left-color: #334155;
}

body.blog-over-dark-mode .blog-over-mobile-menu .blog-over-sub-menu {
    background-color: rgba(0, 0, 0, 0.2);
}

body.blog-over-dark-mode .blog-over-mobile-close {
    color: #e2e8f0;
    background: rgba(255, 255, 255, 0.1);
}

body.blog-over-dark-mode .blog-over-mobile-close:hover,
body.blog-over-dark-mode .blog-over-mobile-close:focus {
    background-color: rgba(239, 68, 68, 0.2);
    color: #f87171;
}

/* Dark mode sticky header */
body.blog-over-dark-mode .blog-over-header.is-sticky {
    background-color: #0f172a;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.4);
}

/* Dark mode topbar */
body.blog-over-dark-mode .blog-over-topbar {
    background-color: #0f172a;
    border-bottom-color: #334155;
}

body.blog-over-dark-mode .blog-over-topbar-date,
body.blog-over-dark-mode .blog-over-topbar-text {
    color: #94a3b8;
}

/* Dark mode theme toggle button */
body.blog-over-dark-mode .blog-over-toggle-icon {
    color: #60a5fa;
}

/* =========================================
   Logo + Site Title Combined Branding
   ========================================= */

/* Base combined wrapper */
.blog-over-branding-combined {
    display: flex;
    align-items: center;
}

/* Logo container */
.blog-over-branding-combined .blog-over-branding-logo {
    flex-shrink: 0;
    line-height: 0;
}

.blog-over-branding-combined .blog-over-branding-logo .custom-logo-link {
    display: inline-block;
}

.blog-over-branding-combined .blog-over-branding-logo .custom-logo {
    max-height: 50px;
    width: auto;
    height: auto;
}

/* Text block */
.blog-over-branding-combined .blog-over-branding-text {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
}

.blog-over-branding-combined .blog-over-branding-text .site-title {
    margin: 0;
    font-weight: 700;
    line-height: 1.2;
}

.blog-over-branding-combined .blog-over-branding-text .site-title a {
    color: var(--blog-over-menu-text);
    text-decoration: none;
    transition: color var(--blog-over-transition);
}

.blog-over-branding-combined .blog-over-branding-text .site-title a:hover {
    color: var(--blog-over-primary);
}

.blog-over-branding-combined .blog-over-branding-text .site-description {
    margin: 2px 0 0;
    font-size: 0.75rem;
    color: #64748b;
    line-height: 1.3;
}

/* -----------------------------------------
   Layout Modifier: STACKED (default)
   Logo on top, title below — centered
   ----------------------------------------- */
.blog-over-branding-stacked {
    flex-direction: column;
    gap: 6px;
    text-align: center;
}

.blog-over-branding-stacked .blog-over-branding-text {
    align-items: center;
}

.blog-over-branding-stacked .blog-over-branding-text .site-title {
    font-size: 1.3rem;
}

/* -----------------------------------------
   Layout Modifier: INLINE
   Logo left, title right — horizontal
   ----------------------------------------- */
.blog-over-branding-inline {
    flex-direction: row;
    gap: 14px;
}

.blog-over-branding-inline .blog-over-branding-text .site-title {
    font-size: 1.4rem;
}

/* ---- Per-Layout Overrides ---- */

/* Layout 1: Classic */
.blog-over-layout-1 .blog-over-branding-stacked {
    gap: 6px;
}

/* Layout 2: Centered — stacked fits naturally */
.blog-over-layout-2 .blog-over-branding-combined {
    justify-content: center;
}

.blog-over-layout-2 .blog-over-branding-inline .blog-over-branding-text {
    text-align: left;
}

/* Layout 3: Split — tighter sizing */
.blog-over-layout-3 .blog-over-branding-combined .blog-over-branding-logo .custom-logo {
    max-height: 44px;
}

.blog-over-layout-3 .blog-over-branding-combined .blog-over-branding-text .site-title {
    font-size: 1.1rem;
}

.blog-over-layout-3 .blog-over-branding-combined .blog-over-branding-text .site-description {
    font-size: 0.7rem;
}

.blog-over-layout-3 .blog-over-branding-stacked {
    gap: 4px;
}

.blog-over-layout-3 .blog-over-branding-inline {
    gap: 10px;
}

/* Layout 4: Minimal */
.blog-over-layout-4 .blog-over-branding-inline {
    gap: 12px;
}

/* ---- Sticky Header ---- */
.blog-over-header.is-sticky .blog-over-branding-combined .blog-over-branding-logo .custom-logo {
    max-height: 36px;
    transition: max-height 0.3s ease;
}

.blog-over-header.is-sticky .blog-over-branding-combined .blog-over-branding-text .site-title {
    font-size: 1.05rem;
}

.blog-over-header.is-sticky .blog-over-branding-combined .blog-over-branding-text .site-description {
    font-size: 0.65rem;
}

.blog-over-header.is-sticky .blog-over-branding-stacked {
    gap: 3px;
}

/* ---- Dark Mode ---- */
body.blog-over-dark-mode .blog-over-branding-combined .blog-over-branding-text .site-title a {
    color: #f1f5f9;
}

body.blog-over-dark-mode .blog-over-branding-combined .blog-over-branding-text .site-title a:hover {
    color: #60a5fa;
}

body.blog-over-dark-mode .blog-over-branding-combined .blog-over-branding-text .site-description {
    color: #94a3b8;
}

/* ---- Mobile Responsive ---- */
@media screen and (max-width: 992px) {

    .blog-over-branding-combined .blog-over-branding-logo .custom-logo {
        max-height: 40px;
    }

    .blog-over-branding-combined .blog-over-branding-text .site-title {
        font-size: 1.1rem;
    }

    .blog-over-branding-combined .blog-over-branding-text .site-description {
        font-size: 0.7rem;
    }

    /* Mobile centered layout: always stack */
    .blog-over-mobile-center .blog-over-branding-combined {
        flex-direction: column;
        gap: 6px;
    }

    .blog-over-mobile-center .blog-over-branding-combined .blog-over-branding-text {
        text-align: center;
        align-items: center;
    }

    /* Mobile inline layout: keep side-by-side but tighter */
    .blog-over-mobile-inline .blog-over-branding-inline {
        gap: 8px;
    }

    .blog-over-mobile-inline .blog-over-branding-inline .blog-over-branding-logo .custom-logo {
        max-height: 36px;
    }

    .blog-over-mobile-inline .blog-over-branding-inline .blog-over-branding-text .site-title {
        font-size: 1rem;
    }
}

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

    .blog-over-branding-combined .blog-over-branding-logo .custom-logo {
        max-height: 32px;
    }

    .blog-over-branding-combined .blog-over-branding-text .site-title {
        font-size: 0.95rem;
    }

    .blog-over-branding-combined .blog-over-branding-text .site-description {
        display: none;
    }
}
