

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

.flexible-menu {
    position: relative;
}

.menu-icon {
    cursor: pointer;
    font-size: 24px;
    display: none; /* Hide menu icon on larger screens */
    transition: color 0.3s ease;
    background: none;
    border: none;
    padding: 0;
}

/* Close button styles */
.close-button {
    position: absolute;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    z-index: 1001;
    color: currentColor;
    transition: opacity 0.3s ease;
    display: none; /* Hide by default on desktop */
}

.close-button:hover {
    opacity: 0.7;
}

.close-button.top-left {
    top: 20px;
    left: 20px;
}

.close-button.top-right {
    top: 20px;
    right: 20px;
}

.close-button.top-center {
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
}

.close-button svg {
    display: block;
    width: 24px;
    height: 24px;
}

/* Overlay background */
.flexible-menu.has-overlay-bg::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, var(--overlay-opacity, 0.5));
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    z-index: 998;
    pointer-events: none;
}

.flexible-menu.has-overlay-bg.active::before {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.menu-content {
    display: none;
}

.flexible-menu.slide-in .menu-content {
    position: absolute;
    top: 0;
    width: 250px;
    height: 100%;
    background: var(--primary-text-color);
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.5);
    transition: transform 0.3s ease;
}

.flexible-menu.slide-in.left .menu-content {
    left: 0;
    transform: translateX(-100%);
}

.flexible-menu.slide-in.left .menu-content.active {
    transform: translateX(0);
}

.flexible-menu.slide-in.right .menu-content {
    right: 0;
    transform: translateX(100%);
}

.flexible-menu.slide-in.right .menu-content.active {
    transform: translateX(0);
}

.flexible-menu.overlay .menu-content {
    transition: opacity 0.3s ease;
}

.flexible-menu.overlay.full-width .menu-content {
    width: 100%;
}

.flexible-menu.overlay.custom-width .menu-content {
    width: 50%; /* Default width, can be adjusted */
    transition: transform 0.3s ease;
}

.flexible-menu.overlay.custom-width.left .menu-content {
    left: 0;
    transform: translateX(-100%);
}

.flexible-menu.overlay.custom-width.left .menu-content.active {
    transform: translateX(0);
}

.flexible-menu.overlay.custom-width.right .menu-content {
    right: 0;
    transform: translateX(100%);
}

.flexible-menu.overlay.custom-width.right .menu-content.active {
    transform: translateX(0);
}

/* Rules for smaller screens */
@media (max-width: 768px) {
    .flexible-menu.overlay .menu-content {
        z-index: 999;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: var(--primary-bg-color);
        color: var(--primary-text-color);
        display: flex;
        flex-direction: column; /* Ensure menu and search are stacked vertically */
    }

    .flexible-menu.overlay  {
        width: unset !important;
    }

    .flexible-menu.overlay .menu-content a {
        color: var(--primary-text-color);
    }

    .menu-icon {
        display: block; /* Show menu icon on smaller screens */
    }

    .close-button {
        display: block; /* Show close button on mobile */
    }

    .flexible-menu.slide-in .menu-content,
    .flexible-menu.overlay .menu-content {
        display: none; /* Hide menu content on smaller screens */
    }

    .flexible-menu.slide-in .menu-content.active,
    .flexible-menu.overlay .menu-content.active {
        display: flex; /* Show menu content when icon is clicked */
        box-sizing: border-box;
        padding: 20px;
    }

    .flexible-menu .menu-content .navigation {
        order: 1; /* Ensure menu is on top */
    }

    .flexible-menu .menu-content .search {
        order: 2; /* Ensure search is below menu */
        margin-top: 40px;
    }
}

/* Rules for larger screens */
@media (min-width: 769px) {
    .menu-icon {
        display: none; /* Hide menu icon on larger screens */
    }

    .flexible-menu .menu-content {
        display: flex; /* Display menu content as horizontal menu on larger screens */
        justify-content: space-between;
        align-items: center;
        position: static; /* Ensure position is not fixed */
        width: auto;
        height: auto;
        box-shadow: none;
    }

    .menu-content .logo,
    .menu-content .search {
        display: inline-block;
        margin-right: 40px;
    }

    .custom-post-archive-menu {
        display: flex;
        list-style: none; /* Remove bullets */
        padding: 0;
        margin: 0;
    }

    .custom-post-archive-menu li {
        margin: 0 10px;
    }

    .custom-post-archive-menu li a {
        text-decoration: none;
        color: inherit;
        white-space: nowrap; /* Prevent word wrapping */
    }

    .custom-post-archive-menu li.active a {
        /* font-weight: bold; Highlight active menu item */
    }
}

.wrapper {
    width: 100%;
    /* max-width: 31.25rem; */
}

.label {
    font-size: .625rem;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: +1.3px;
    margin-bottom: 1rem;
}

.searchBar {
    width: 100%;
    display: flex;
    flex-direction: row;
    align-items: center;
}

#searchQueryInput {
    color: var(--primary-text-color);
    width: 100%;
    height: 2.8rem;
    background: #262322;
    outline: none;
    border: none;
    border-radius: 1.625rem;
    padding: 0 3.5rem 0 1.5rem;
    font-size: 1rem;
    box-sizing: border-box;
}

/**autofill**/

#searchQueryInput:-webkit-autofill,
#searchQueryInput:-webkit-autofill:hover,
#searchQueryInput:-webkit-autofill:focus,
#searchQueryInput:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0 30px #f3e5ab inset !important; /* Pozadie pre text v návrhoch */
    font-size: 1rem;
}

#searchQueryInput::placeholder {
    transition: opacity 0.5s ease; /* Add transition for placeholder text */
}

#searchQueryInput:focus::placeholder {
    opacity: 0; /* Fade out placeholder text on focus */
}

#searchQuerySubmit {
    width: 3.5rem;
    height: 2.8rem;
    margin-left: -3.4rem;
    background: none;
    border: none;
    outline: none;
}

#searchQuerySubmit:hover {
    cursor: pointer;
}

/** Main Navigation **/

.custom-post-archive-menu{
	align-items: var(--navigation-layout-align , initial);
	display: flex;
	flex-direction: var(--navigation-layout-direction , initial);
	flex-wrap: var(--navigation-layout-wrap , wrap);
	justify-content: var(--navigation-layout-justify , initial);
	margin: 0;
	gap: 20px;
}


.custom-post-archive-menu a{
    color: var(--accent-text-color);
	text-decoration: none;
	/* display: block; */
    outline: none;

}

.custom-post-archive-menu .active a{
    text-decoration: none;
}

ul.custom-post-archive-menu{
    list-style: none;
	margin: 0;
	padding: 0;
	text-align: center;
    display: flex;
    flex-direction: row;
}

ul.custom-post-archive-menu a{
    font-size: 20px;
	text-transform: uppercase;
	text-decoration: none;
	color: var(--primary-text-color);
	/* display: block; */
	position: relative;
	padding: 4px 0;
}

/* ul.custom-post-archive-menu li{
    display: inline-block;
	margin: 0 10px;
} */

.custom-post-archive-menu li{
    margin: 0;
    height: 30px; /* Add a fixed height to prevent jumping */
    transition: width 0.3s ease; /* Add transition for width */
}

.custom-post-archive-menu a{
    text-decoration: none;
	padding: 10px;
	display: block;
    line-height: 30px; /* Ensure text is vertically centered */
    transition: width 0.3s ease; /* Add transition for width */
}

/* .custom-post-archive-menu .active a{
	font-weight: bold;
} */

.menu-container.open .custom-post-archive-menu a{
    font-size: 22px;
	gap: 0px;
	margin: 0;
}

.custom-post-archive-menu a:hover{
       /* font-weight: bold;  */
       /* transform: scale3d(1 , 1 , 1); */

}

.custom-post-archive-menu a:hover::before, 
.custom-post-archive-menu .active a::before{
    transform: scale3d(1 , 1 , 1);
}

.custom-post-archive-menu a::before{
    content: "";
	width: 100%;
	height: 4px;
	position: absolute;
	left: 0;
	bottom: 0;
	background: var(--primary-text-color);
	transition: 0.5s transform ease;
	transform: scale3d(0 , 1 , 1);
	transform-origin: 0 50%;
	background-color: var(--accent-bg-color);
}


/** Mobile **/

@media (max-width: 768px) {


    ul.custom-post-archive-menu{
        list-style: none;
        padding: 0;
        margin: 0;
        display: flex;
        flex-direction: column;
    }

    body.admin-bar  .flexible-menu .menu-content .navigation  {
        padding-top: 44px; /* Adjust this value if the admin bar height changes */
    }
    

}

