/*----- Header Gothic Up -------*/
/* Gothic UP Navbar Styles - Complete CSS File */

/* CSS Variables */
:root {
    --admin-bar-height: 0px;
}

body.admin-bar {
    --admin-bar-height: 32px;
}

@media screen and (max-width: 782px) {
    body.admin-bar {
        --admin-bar-height: 46px;
    }
}

/* Main Navigation Wrapper */
.gothic-up-navbar-wrapper {
    position: fixed;
    top: var(--admin-bar-height);
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 9998;
    transition: top 0.5s ease, opacity 0.5s ease;
    box-shadow: 0 2px 10px rgba(0,0,0,0.8);
    font-family: 'Montserrat', sans-serif;
    opacity: 1;
}

.gothic-up-navbar-wrapper.hidden {
    top: calc(var(--admin-bar-height) - 100px);
    opacity: 0.3;
}

.gothic-up-navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 0 auto;
    padding: 10px 15px;
    position: relative;
}

/* Responsive widths */
@media (min-width: 576px) { .gothic-up-navbar { max-width: 540px; } }
@media (min-width: 768px) { .gothic-up-navbar { max-width: 720px; } }
@media (min-width: 992px) { .gothic-up-navbar { max-width: 960px; } }
@media (min-width: 1200px) { .gothic-up-navbar { max-width: 1140px; } }
@media (min-width: 1400px) { .gothic-up-navbar { max-width: 1200px; } }

/* Logo */
.gothic-up-logo {
    width: 180px;
    height: 60px;
    display: flex;
    align-items: center;
}

.gothic-up-logo img {
    max-width: 100%;
    height: auto;
    transition: filter 0.3s ease;
}

.gothic-up-logo:hover img {
    filter: drop-shadow(0 0 6px rgba(255, 255, 255, 0.8));
}

/* Main Navigation */
.gothic-up-main-nav {
    display: none;
    flex: 1;
    justify-content: center;
    align-items: center;
}

@media (min-width: 992px) {
    .gothic-up-main-nav {
        display: flex;
    }
}

.gothic-up-main-nav > ul {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 5px;
}

.gothic-up-main-nav > ul > li {
    position: relative;
}

.gothic-up-main-nav > ul > li > a {
    display: flex;
    align-items: center;
    padding: 12px 8px;
    color: #e0e0e0 !important;
    text-decoration: none;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
    transition: color 0.2s ease;
    background: transparent;
    position: relative;
}

.gothic-up-main-nav > ul > li:hover > a {
    color: #e4002b !important;
}

/* WordPress menu classes compatibility */
.gothic-up-main-nav .menu-item-has-children > a::after,
.gothic-up-main-nav .page_item_has_children > a::after {
    content: "▼";
    margin-left: 6px;
    font-size: 0.5rem;
    transition: transform 0.4s ease;
}

.gothic-up-main-nav .menu-item-has-children:hover > a::after,
.gothic-up-main-nav .page_item_has_children:hover > a::after {
    transform: rotate(180deg);
}

/* Ensure consistent styling for all menu items */
.gothic-up-main-nav ul li a {
    color: #e0e0e0 !important;
    text-decoration: none;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
    transition: color 0.2s ease;
}

.gothic-up-main-nav ul li:hover > a {
    color: #e4002b !important;
}

/* Fix for custom menu items */
.gothic-up-main-nav .menu-item-type-custom > a,
.gothic-up-main-nav .menu-item-object-custom > a {
    color: #e0e0e0 !important;
}

.gothic-up-main-nav .menu-item-type-custom:hover > a,
.gothic-up-main-nav .menu-item-object-custom:hover > a {
    color: #e4002b !important;
}

/* Multi-level dropdown - ALL nested levels */
.gothic-up-main-nav .sub-menu,
.gothic-up-main-nav .children {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 280px;
    background: #0d0d0d;
    list-style: none;
    margin: 0;
    padding: 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-20px) scale(0.95);
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    box-shadow: 0 5px 20px rgba(0,0,0,0.9);
    z-index: 1000;
    pointer-events: none;
}

/* Nested submenus (2nd level and deeper) */
.gothic-up-main-nav .sub-menu .sub-menu,
.gothic-up-main-nav .children .children,
.gothic-up-main-nav .sub-menu .children,
.gothic-up-main-nav .children .sub-menu {
    top: -2px;
    left: 100%;
    margin-left: 0;
    z-index: 1001;
    transform: translateX(-20px) scale(0.95);
}

/* Show submenu on hover - works for all levels */
.gothic-up-main-nav li:hover > .sub-menu,
.gothic-up-main-nav li:hover > .children {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

/* Show nested submenus with horizontal animation */
.gothic-up-main-nav .sub-menu li:hover > .sub-menu,
.gothic-up-main-nav .children li:hover > .children,
.gothic-up-main-nav .sub-menu li:hover > .children,
.gothic-up-main-nav .children li:hover > .sub-menu {
    opacity: 1;
    visibility: visible;
    transform: translateX(0) scale(1);
    pointer-events: auto;
}

/* All list items in submenus must be relative for nested menus */
.gothic-up-main-nav .sub-menu li,
.gothic-up-main-nav .children li {
    position: relative;
}

.gothic-up-main-nav .sub-menu a,
.gothic-up-main-nav .children a {
    display: block;
    padding: 12px 20px;
    color: #d0d0d0;
    text-decoration: none;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    transition: color 0.2s ease, padding-left 0.2s ease;
    white-space: nowrap;
    position: relative;
}

.gothic-up-main-nav .sub-menu a:hover,
.gothic-up-main-nav .children a:hover {
    color: #e4002b;
    padding-left: 25px;
}

/* Arrow for nested menu items */
.gothic-up-main-nav .sub-menu .menu-item-has-children > a::after,
.gothic-up-main-nav .children .page_item_has_children > a::after,
.gothic-up-main-nav .sub-menu .page_item_has_children > a::after,
.gothic-up-main-nav .children .menu-item-has-children > a::after {
    content: "▶";
    float: right;
    margin-left: 10px;
    font-size: 0.5rem;
}

/* Smart positioning for nested submenus */
.gothic-up-main-nav .sub-menu.open-right .sub-menu,
.gothic-up-main-nav .children.open-right .children,
.gothic-up-main-nav .sub-menu.open-right .children,
.gothic-up-main-nav .children.open-right .sub-menu,
.gothic-up-main-nav .sub-menu .sub-menu.open-right,
.gothic-up-main-nav .children .children.open-right {
    left: 100%;
    right: auto;
    margin-left: 0;
}

.gothic-up-main-nav .sub-menu.open-left .sub-menu,
.gothic-up-main-nav .children.open-left .children,
.gothic-up-main-nav .sub-menu.open-left .children,
.gothic-up-main-nav .children.open-left .sub-menu,
.gothic-up-main-nav .sub-menu .sub-menu.open-left,
.gothic-up-main-nav .children .children.open-left {
    left: auto;
    right: 100%;
    margin-right: 0;
    transform: translateX(20px) scale(0.95);
}

.gothic-up-main-nav .sub-menu .sub-menu.open-left:hover,
.gothic-up-main-nav .children .children.open-left:hover {
    transform: translateX(0) scale(1);
}

/* Arrow adjustment for left-opening menus */
.gothic-up-main-nav > li > a::after,
.gothic-up-main-nav .children > li > a::after {
    content: "◀" !important;
    float: left;
    margin-right: 10px;
    margin-left: 0;
}

/* Ensure WordPress generates proper structure */
.gothic-up-main-nav ul ul {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 280px;
    background: #0d0d0d;
    list-style: none;
    margin: 0;
    padding: 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-20px) scale(0.95);
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    box-shadow: 0 5px 20px rgba(0,0,0,0.9);
    z-index: 1000;
    pointer-events: none;
}

.gothic-up-main-nav ul li:hover > ul {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

/* Second level and deeper with horizontal animation */
.gothic-up-main-nav ul ul ul {
    top: -2px;
    left: 100%;
    margin-left: 0;
    z-index: 1001;
    transform: translateX(-20px) scale(0.95);
}

.gothic-up-main-nav ul ul li:hover > ul {
    transform: translateX(0) scale(1);
}

.gothic-up-main-nav ul ul li {
    position: relative;
}

/* Right Controls Container */
.gothic-up-controls {
    display: flex;
    align-items: center;
    gap: 0;
}

/* Language and Search group */
.gothic-up-lang-search-group {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 12px;
    border-left: 1px solid rgba(255, 255, 255, 0.1);
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    margin: 0 12px;
}

/* Language Switcher Dropdown */
.gothic-up-lang-switcher {
    position: relative;
    margin: 0;
}

.gothic-up-lang-toggle {
    padding: 8px 12px;
    color: #d0d0d0;
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 0.75rem;
    text-transform: uppercase;
    transition: color 0.2s ease;
    display: flex;
    align-items: center;
    gap: 6px;
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
}

.gothic-up-lang-toggle::after {
    content: "▼";
    font-size: 0.5rem;
    transition: transform 0.3s ease;
}

.gothic-up-lang-switcher:hover .gothic-up-lang-toggle::after,
.gothic-up-lang-switcher.active .gothic-up-lang-toggle::after {
    transform: rotate(180deg);
}

.gothic-up-lang-toggle:hover {
    color: #e4002b;
}

.gothic-up-lang-dropdown {
    position: absolute;
    top: calc(100% + 5px);
    left: 50%;
    transform: translateX(-50%);
    min-width: 100px;
    background: #0d0d0d;
    list-style: none;
    margin: 0;
    padding: 0;
    opacity: 0;
    visibility: hidden;
    transform: translateX(-50%) translateY(-15px);
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    box-shadow: 0 5px 20px rgba(0,0,0,0.9);
    z-index: 1000;
}

.gothic-up-lang-switcher:hover .gothic-up-lang-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.gothic-up-lang-dropdown a {
    display: block;
    padding: 10px 15px;
    color: #d0d0d0;
    text-decoration: none;
    font-size: 0.75rem;
    text-transform: uppercase;
    transition: color 0.2s ease, padding-left 0.2s ease;
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
}

.gothic-up-lang-dropdown a:hover,
.gothic-up-lang-dropdown a.active {
    color: #e4002b;
    padding-left: 20px;
}

/* Search Icon */
.gothic-up-search-toggle {
    background: none;
    border: none;
    color: #d0d0d0;
    font-size: 20px;
    cursor: pointer;
    padding: 8px;
    transition: color 0.2s ease;
    position: relative;
    margin: 0;
}

.gothic-up-search-toggle:hover {
    color: #e4002b;
}

/* Social Media Icons Styles */
.gothic-up-social-icons {
    display: flex;
    align-items: center;
    gap: 8px;
    padding-right: 12px;
}

.gothic-up-social-icons a {
    color: #d0d0d0;
    font-size: 14px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 4px;
}

.gothic-up-social-icons a:hover {
    transform: translateY(-2px);
}

/* Individual social media hover colors */
.gothic-up-social-icons a:hover .fa-facebook-f {
    color: #4267B2;
}

.gothic-up-social-icons a:hover .fa-discord {
    color: #7289DA;
}

.gothic-up-social-icons a:hover .fa-youtube {
    color: #FF0000;
}

/* Social Media Icons - Desktop visibility */
@media (max-width: 991px) {
    .gothic-up-social-icons {
        display: none !important;
    }
}

/* Social Media Icons in Mobile Menu */
.gothic-up-mobile-social {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    padding: 20px;
    border-bottom: 1px solid rgba(139, 0, 0, 0.2);
    margin-bottom: 10px;
}

.gothic-up-mobile-social a {
    color: #d0d0d0 !important;
    font-size: 20px;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease, color 0.2s ease;
    background: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    padding: 0 !important;
    border-bottom: none !important;
    text-decoration: none !important;
    overflow: visible !important;
    position: relative !important;
}

.gothic-up-mobile-social a::before {
    display: none !important;
}

.gothic-up-mobile-social a:hover {
    transform: translateY(-2px);
    background: transparent !important;
    padding: 0 !important;
    padding-left: 0 !important;
    border-bottom: none !important;
}

.gothic-up-mobile-social a i {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.gothic-up-mobile-social a:hover .fa-facebook-f {
    color: #4267B2;
}

.gothic-up-mobile-social a:hover .fa-discord {
    color: #7289DA;
}

.gothic-up-mobile-social a:hover .fa-youtube {
    color: #FF0000;
}

/* Mobile Menu Toggle */
.gothic-up-mobile-toggle {
    display: block;
    background: none;
    border: none;
    color: #d0d0d0;
    font-size: 24px;
    cursor: pointer;
    padding: 5px;
}

@media (min-width: 992px) {
    .gothic-up-mobile-toggle {
        display: none;
    }
    
    .gothic-up-mobile-social {
        display: none;
    }
}

.gothic-up-mobile-toggle span {
    display: block;
    width: 25px;
    height: 3px;
    background: #d0d0d0;
    margin: 5px 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.gothic-up-mobile-toggle.active span:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}

.gothic-up-mobile-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

/* Mobile Menu */
.gothic-up-mobile-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 300px;
    max-width: 80%;
    height: 100vh;
    background: #0d0d0d;
    overflow-y: auto;
    transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 10000;
    padding-top: calc(60px + var(--admin-bar-height));
    font-family: 'Montserrat', sans-serif;
}

.gothic-up-mobile-menu.active {
    right: 0;
}

.gothic-up-mobile-menu ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.gothic-up-mobile-menu a {
    display: block;
    padding: 15px 20px;
    color: #d0d0d0;
    text-decoration: none;
    border-bottom: 1px solid rgba(139, 0, 0, 0.2);
    transition: all 0.3s ease;
    font-size: 0.75rem;
    text-transform: uppercase;
    font-weight: 500;
    position: relative;
    overflow: hidden;
}

.gothic-up-mobile-menu a::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 3px;
    background: #8b0000;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
}

.gothic-up-mobile-menu a:hover {
    background: rgba(139, 0, 0, 0.2);
    color: #ffffff;
    padding-left: 30px;
}

.gothic-up-mobile-menu a:hover::before {
    transform: translateX(0);
}

.gothic-up-mobile-menu .menu-item-has-children > a {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.gothic-up-mobile-menu .menu-item-has-children > a::after {
    content: "+";
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 18px;
    transition: transform 0.3s ease;
    line-height: 1;
}

.gothic-up-mobile-menu .menu-item-has-children.active > a::after {
    transform: translateY(-50%) rotate(45deg);
}

.gothic-up-mobile-menu .sub-menu {
    max-height: 0;
    overflow: hidden;
    background: rgba(0,0,0,0.5);
    padding-left: 20px;
    transition: max-height 0.3s ease-out, opacity 0.3s ease-out;
    opacity: 0;
}

.gothic-up-mobile-menu .sub-menu.active {
    max-height: 2000px;
    opacity: 1;
    transition: max-height 0.4s ease-in, opacity 0.3s ease-in;
}

/* Mobile Menu Overlay */
.gothic-up-mobile-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.7);
    z-index: 9997;
    display: none;
    backdrop-filter: blur(5px);
}

.gothic-up-mobile-overlay.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* --- SEARCH ENGINE STYLES (Faster, Overlay Fix, Spinner, Clear Icon) --- */

/* Kontener główny - pasek pod menu */
.gothic-up-search-container {
    width: 100%;
    background: #0d0d0d; 
    padding: 20px 0;
    display: none;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 10px 20px rgba(0,0,0,0.5);
    /* WAŻNE: Overflow hidden tylko podczas animacji. */
    overflow: hidden; 
}

/* Klasy dla animacji - Przyspieszone do 0.25s */
.gothic-up-search-container.active {
    display: block;
    animation: slideOpen 0.25s ease-out forwards;
    overflow: visible; /* Pozwalamy wystawać wynikom gdy otwarte */
}

.gothic-up-search-container.closing {
    display: block;
    animation: slideClose 0.25s ease-in forwards;
    overflow: hidden !important; 
}

@keyframes slideOpen {
    from { 
        opacity: 1; 
        transform: translateY(-20px);
        max-height: 0;
        overflow: hidden;
    }
    to { 
        opacity: 1; 
        transform: translateY(0);
        max-height: 500px;
        overflow: visible;
    }
}

@keyframes slideClose {
    from { 
        opacity: 1; 
        transform: translateY(0);
        max-height: 500px;
        overflow: hidden;
    }
    to { 
        opacity: 1; 
        transform: translateY(-20px);
        max-height: 0;
        overflow: hidden;
    }
}

/* Pudełko centrujące */
.gothic-up-search-box {
    max-width: 800px;
    width: 90%;
    margin: 0 auto;
    position: relative; 
}

.gothic-up-search-box form {
    position: relative;
    width: 100%;
    z-index: 20;
}

/* Pole input */
.gothic-up-search-box input[type="search"] {
    width: 100%;
    padding: 15px 20px;
    /* Zwiększony padding-right dla dwóch ikon */
    padding-right: 90px !important; 
    background: #0d0d0d;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 4px;
    color: #ffffff;
    font-size: 1rem;
    font-family: 'Montserrat', sans-serif;
    outline: none;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.3);
    transition: border-color 0.2s, background 0.2s;
}

.gothic-up-search-box input[type="search"]:focus {
    border-color: #8b0000;
    background: #1a1a1a;
}

/* 1. UKRYCIE SYSTEMOWEGO KRZYŻYKA */
input[type="search"]::-webkit-search-decoration,
input[type="search"]::-webkit-search-cancel-button,
input[type="search"]::-webkit-search-results-button,
input[type="search"]::-webkit-search-results-decoration {
    -webkit-appearance: none;
    display: none !important;
}

/* 2. STYLIZACJA NOWEGO KRZYŻYKA (Font Awesome) */
.search-clear-icon {
    position: absolute;
    right: 50px; /* Pozycja na lewo od lupy */
    top: 50%;
    transform: translateY(-50%);
    
    color: #6b7280; /* Kolor szary */
    font-size: 18px;
    cursor: pointer;
    z-index: 10;
    
    padding: 10px; /* Obszar kliknięcia */
    display: none; /* Domyślnie ukryty */
    
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease;
}

/* Kiedy JS doda styl visible, ta klasa zadba o flex */
.search-clear-icon.visible {
    display: flex !important;
}

.search-clear-icon:hover {
    color: #ffffff; /* Zmiana na biały przy hover */
}

/* Ikona lupy wewnątrz inputa */
.search-icon-display {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #ffffff;
    pointer-events: none;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.8;
}

/* --- WYNIKI WYSZUKIWANIA (POPRAWIONE: ABSOLUTE) --- */

.gothic-up-search-results {
    position: absolute; 
    top: 100%; 
    left: 0;
    width: 100%;
    margin-top: 5px;
    background: #1a1a1a;
    border-radius: 4px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.9);
    z-index: 100;
    max-height: 60vh;
    overflow-y: auto;
    display: none;
    border: 1px solid rgba(255,255,255,0.05);
}

.gothic-up-search-results.active {
    display: block;
    animation: fadeInResults 0.2s ease;
}

@keyframes fadeInResults {
    from { opacity: 1; transform: translateY(-5px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Stylizacja elementów wyniku */
.search-result-item {
    display: flex;
    align-items: center;
    padding: 12px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    transition: background 0.2s;
    text-decoration: none !important;
}

.search-result-item:hover {
    background: rgba(255,255,255,0.08);
    text-decoration: none !important;
}

.search-result-thumb {
    width: 120px;
    flex-shrink: 0;
    margin-right: 15px;
    border-radius: 3px;
    overflow: hidden;
    aspect-ratio: 16/9;
    background: #000;
    position: relative;
}

.search-result-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.2s ease;
}

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

.search-result-content {
    flex: 1;
}

.search-result-title {
    display: block;
    color: #e0e0e0;
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 5px;
    line-height: 1.3;
    text-decoration: none !important;
}

.search-result-item:hover .search-result-title {
    color: #e4002b;
    text-decoration: none !important;
}

.search-result-date {
    display: block;
    color: #888;
    font-size: 0.75rem;
}

/* Przycisk "Zobacz wszystkie" */
.search-show-all {
    display: block;
    text-align: center;
    padding: 15px;
    background: #292e38;
    color: white !important;
    text-transform: uppercase;
    font-weight: 700;
    font-size: 0.85rem;
    text-decoration: none !important;
    transition: background 0.2s;
}

.search-show-all:hover {
    background: #6b7280;
}

/* ANIMACJA ŁADOWANIA (SPINNER) */
.search-loading {
    padding: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.search-spinner {
    width: 30px;
    height: 30px;
    border: 3px solid rgba(255,255,255,0.1);
    border-radius: 50%;
    border-top-color: #e4002b;
    animation: spin 0.8s linear infinite;
}

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

.search-no-results {
    padding: 20px;
    text-align: center;
    color: #888;
    font-size: 0.9rem;
}

/* Scrollbar dla wyników */
.gothic-up-search-results::-webkit-scrollbar { width: 6px; }
.gothic-up-search-results::-webkit-scrollbar-track { background: #1a1a1a; }
.gothic-up-search-results::-webkit-scrollbar-thumb { background: #444; border-radius: 3px; }

/* Body padding */
body { padding-top: calc(80px + var(--admin-bar-height)); }

/* Touch device styles (bez zmian) */
.touch-device .gothic-up-main-nav .menu-item-has-children > a,
.touch-device .gothic-up-main-nav .page_item_has_children > a { position: relative; }
.touch-device .gothic-up-main-nav .touch-opened > .sub-menu,
.touch-device .gothic-up-main-nav .touch-opened > .children,
.touch-device .gothic-up-main-nav .touch-opened > ul { opacity: 1; visibility: visible; transform: translateY(0) scale(1); pointer-events: auto; }
.touch-device .gothic-up-main-nav .touching > a { background: rgba(228, 0, 43, 0.1); }
.touch-device .gothic-up-main-nav .touch-opened > a { color: #e4002b; }
.touch-device .gothic-up-main-nav .touch-opened > a::after { transform: rotate(180deg); }
.touch-device .gothic-up-main-nav .touch-opened .touch-opened > .sub-menu,
.touch-device .gothic-up-main-nav .touch-opened .touch-opened > .children { opacity: 1; visibility: visible; transform: translateX(0) scale(1); pointer-events: auto; }
.touch-device .gothic-up-main-nav .touch-opened > a::before { content: "✓"; position: absolute; left: 5px; color: #e4002b; font-size: 0.7rem; opacity: 0; animation: fadeInQuick 0.3s forwards; }
@keyframes fadeInQuick { to { opacity: 1; } }
.touch-device .gothic-up-main-nav a { -webkit-touch-callout: none; -webkit-user-select: none; -khtml-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; }
@media (max-width: 991px) { .touch-device .gothic-up-main-nav > ul > li > a { min-height: 44px; display: flex; align-items: center; } }
@media (max-width: 768px) {
    .gothic-up-lang-search-group { border-right: none; margin-right: 8px; }
    .gothic-up-lang-dropdown { left: auto; right: 0; transform: translateY(-15px); }
    .gothic-up-lang-switcher:hover .gothic-up-lang-dropdown { transform: translateY(0); }
}
@media (max-width: 480px) {
    .gothic-up-lang-switcher { display: none; }
    .gothic-up-lang-search-group { border-left: none; padding-left: 0; }
}
.gothic-up-mobile-menu .menu-item-type-custom > a,
.gothic-up-mobile-menu .menu-item-object-custom > a { color: #d0d0d0 !important;}

/* Koniec Headera */


/*
 * Style dla boksu autora na stronie /author/
 *--------------------------------------------------*/

/* --- STYL BAZOWY (Desktop i ogólny) --- */

/* Dodaje margines pod tytułem "Wpisy autora: ..." */
.author-archive .page-title {
    margin-bottom: 1.5rem;
}

/* Główny kontener na boks autora */
.author-box-archive {
    display: flex;           /* Układ flexbox */
    flex-direction: row;     /* Domyślnie wiersz (lewo-prawo) */
    align-items: flex-start; /* Wyrównanie do góry */
    margin-bottom: 2.5rem;
    padding: 1.5rem;
    background: #2f3541;
    border-radius: 5px;
	color: #fff;
}

/* Kontener na avatar */
.author-avatar {
    flex: 0 0 120px;         /* Stała szerokość 120px */
    margin-right: 1.5rem;    /* Odstęp od tekstu po prawej */
    margin-bottom: 0;        /* Reset marginesu dolnego */
}

/* Obrazek avatara */
.author-avatar-img {
    border-radius: 50%;
    max-width: 100%;
    height: auto;
    display: block;          /* Usuwa ewentualne "duszki" pod obrazkiem */
}

/* Kontener na opis */
.author-details {
    flex: 1;
}

.author-details p {
    margin-top: 0;
    margin-bottom: 1rem;
}

.author-details p:last-child {
    margin-bottom: 0;
}

/* --- WERSJA MOBILNA (Ekrany poniżej 768px) --- */

@media (max-width: 768px) {
    
    .author-box-archive {
        flex-direction: column;  /* Zmiana układu na pionowy (góra-dół) */
        align-items: center;     /* Wyśrodkowanie elementów w pionie */
        text-align: center;      /* Wyśrodkowanie tekstu opisu */
        padding: 1.25rem;        /* Nieco mniejszy padding na telefonach */
    }

    .author-avatar {
        margin-right: 0;         /* Usuwamy margines z prawej (bo tekst jest pod spodem) */
        margin-bottom: 1rem;     /* Dodajemy margines na dole, by oddzielić od opisu */
    }
}