/*
Theme Name: GeneratePress Child
Description: Child theme of GeneratePress
Author: Your Name
Template: generatepress
Version: 1.0.0
*/

/* Custom Menu Slider Styles */
.custom-menu-slider {
    position: relative;
    width: 100%;
    max-width: 100%;
    min-height: 50px;
    overflow: hidden;
    background: #fff;
    font-family: "SF Pro Display", Sans-serif;
    transition: height 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.menu-slider-container {
    position: relative;
    width: 100%;
    min-height: auto;
    transition: transform 0.3s ease, height 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.menu-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    min-height: 100%;
    background: #fff;
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
}

.menu-slide.active {
    transform: translateX(0);
}

.menu-slide.prev {
    transform: translateX(-100%);
}

.menu-header {
    padding: 15px 20px;
    border-bottom: 1px solid #eee;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    display: flex;
    align-items: center;
    min-height: 60px;
    position: relative;
}

.menu-back-btn {
    background: none;
    border: none;
    font-size: 16px;
    cursor: pointer;
    padding: 8px 12px 8px 0;
    color: #666;
    display: flex;
    align-items: center;
    margin-right: 10px;
    transition: color 0.2s ease;
    font-weight: 500;
}

.menu-back-btn:focus {
    outline: 2px solid #007cba;
    outline-offset: 2px;
}

.menu-title {
    font-size: 16px;
    font-weight: 600;
    margin: 0;
    color: #333;
    text-overflow: ellipsis;
    overflow: hidden;
    white-space: nowrap;
    flex: 1;
}

.menu-list {
    margin: 0;
    padding: 0;
    list-style: none;
    min-height: auto;
}

.menu-item {
    position: relative;
}

.menu-link {
    position: relative;
    display: block;
    padding: 11px 0px 11px 0px;
    background-color: #54545400;
    font-family: "SF Pro Display", Sans-serif;
    font-size: 21px;
    font-weight: 400;
    color: #343434;
}
.menu-link:hover{
    background: transparent;
}

.menu-link:hover .menu-link-text {
    color: #5A8CA3;
}

.menu-link:hover .menu-arrow svg path {
    fill: #5A8CA3;
}

.menu-link:hover .menu-arrow svg circle {
    stroke: #5A8CA3;
}

.menu-link-text {
    flex: 1;
}

.menu-arrow {
    position: relative;
    margin-left: 6px;
}
.menu-arrow svg{
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
}

.menu-item.has-children .menu-link {
    cursor: pointer;
}


/* Mobile optimizations */
@media (max-width: 480px) {
    .custom-menu-slider {
        max-width: 100%;
        border-radius: 4px;
    }
    
    .menu-link {
        padding: 12px 16px;
    }
    
    .menu-back-btn-only {
        padding: 12px 16px;
        font-size: 15px;
    }
}


/* Animation improvements */
.menu-slide {
    will-change: transform;
}

.menu-item.has-children .menu-arrow {
    transition: all 0.2s ease;
}

/* Standalone back button styles */
.menu-back-btn-only {
    background: none;
    border: none;
    cursor: pointer;
    padding: 11px 0px;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: color 0.2s ease;
    width: 100%;
    text-align: left;

    font-family: 'SF Pro Display', Sans-serif;
    font-weight: 400;
    font-size: 18px;
    line-height: 21px;
    color: #343434 !important;
    background-color: transparent !important;
}

.menu-back-btn-only:hover {
    color: #5A8CA3 !important;
}

.menu-back-btn-only:hover svg path {
    fill: #5A8CA3;
}

.menu-back-btn-only:hover svg circle {
    stroke: #5A8CA3;
}
/* Adjust menu list when it has back button */
.menu-list-with-back {
    flex: 1;
}
.menu-slide-title{
    position: relative;
    display: block;
    padding: 5px 0px 18px 0px;
    background-color: #54545400;
    font-family: "SF Pro Display", Sans-serif;
    font-size: 21px;
    font-weight: 400;
    color: #343434;
}
/* Nested menu level styles */
.menu-level-0{
    margin-left: 20px;
    list-style-type: disc;
}
.menu-level-0 .menu-link {
    padding-top: 10px;
    padding-bottom: 10px;
    font-family: 'SF Pro Display', Sans-serif;
    font-weight: 600;
    font-size: 16px;
    line-height: 19px;
    color: #343434;
}

.menu-level-1 .menu-link {
    padding-top: 7px;
    padding-bottom: 7px;
    font-family: 'SF Pro Display', Sans-serif;
    font-weight: 400;
    font-size: 16px;
    line-height: 19px;
    color: #343434;
}

.menu-level-2 .menu-link {
    padding-top: 7px;
    padding-bottom: 7px;
    padding-left: 40px;
    font-family: 'SF Pro Display', Sans-serif;
    font-style: normal;
    font-weight: 400;
    font-size: 16px;
    line-height: 19px;
    color: #343434;
}

.menu-level-3 .menu-link {
    padding-top: 7px;
    padding-bottom: 7px;
    padding-left: 40px;
    background-color: rgba(0, 0, 0, 0.06);
}

.menu-level-4 .menu-link {
    padding-top: 7px;
    padding-bottom: 7px;
    padding-left: 40px;
    background-color: rgba(0, 0, 0, 0.08);
}

/* .modal-search-wrapper {
    max-width: 205px;
} */
.modal-search-form {
    width: 205px;
    height: 56px;
    display: flex;
    align-items: center;
    border-radius: 25px;
    padding: 0 20px;
    position: relative;
    box-shadow: none;

    background: rgba(52, 52, 52, 0.08);
    backdrop-filter: blur(2.5px);
}
.modal-search-form.light{
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(2.5px);
    border-radius: 72.7413px;
}
.modal-search-input {
    border: none;
    background: transparent !important;
    flex: 1;
    outline: none !important;
    border: none !important;
    font-family: 'SF Pro Display', Sans-serif;
    font-weight: 300;
    font-size: 14px;
    line-height: 18px;
    color: rgba(52, 52, 52, 0.7);
    padding: 0 !important;
    height: 53px;
}
.modal-search-form.light .modal-search-input{
    color: rgba(255, 255, 255, 0.7);
}
.modal-search-form.light .modal-search-input::placeholder {
    color: rgba(255, 255, 255, 0.7);
    opacity: 1;
}
.modal-search-btn {
    flex-shrink: 0;
    background: none !important;
    border: none;
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
}
.modal-search-form.light .modal-search-btn svg path{
    fill: rgba(255, 255, 255, 0.7);
}
.modal-search-results{
    position: absolute;
    top: calc(100% + 16px);
    left: 50%;
    width: 100vw;
    max-width: 400px;
    max-height: 70vh;
    background: #fff;
    z-index: 1000;
    padding: 25px;
    border-radius: 25px;
    transform: translateX(-50%);
    box-shadow: 0px 4px 10px 0px rgba(0, 0, 0, 0.1);
    display: none;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    overflow-y: auto;
    overflow-x: hidden;
}

.modal-search-results.show {
    display: block;
    opacity: 1;
    visibility: visible;
}

/* Custom scrollbar for search results */
.modal-search-results::-webkit-scrollbar {
    width: 6px;
}

.modal-search-results::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.modal-search-results::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.modal-search-results::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}
/* .modal-search-results {
    margin-top: 16px;
} */
.modal-search-list { margin:0; padding:0; list-style:none; }
.modal-search-list li { margin:0; padding:0; }
.modal-search-list a { color:#343434; text-decoration:none; display:block; padding:6px 0; }

/* Enhanced search result styles */
.modal-search-item {
    border-bottom: 1px solid #f0f0f0;
    margin-bottom: 8px;
    padding-bottom: 8px;
}

.modal-search-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.modal-search-link {
    display: block;
    padding: 8px 0;
    transition: background-color 0.2s ease;
    border-radius: 4px;
}

.modal-search-link:hover {
    background-color: #f8f9fa;
}

.modal-search-title {
    font-weight: 600;
    font-size: 16px;
    line-height: 1.3;
    margin-bottom: 4px;
    color: #343434;
}

.modal-search-excerpt {
    font-size: 14px;
    line-height: 1.4;
    color: #666;
    margin-bottom: 6px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.modal-search-matches {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 12px;
    color: #888;
}

.modal-search-match-count {
    background-color: #e9ecef;
    padding: 2px 8px;
    border-radius: 12px;
    font-weight: 500;
}

.modal-search-anchor {
    background-color: #007cba;
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-weight: 500;
    font-size: 11px;
}

.modal-search-loading, .modal-search-no-results, .modal-search-error { color:#888; padding:8px 0; }

/* Search highlight styles */
.search-highlight {
    background-color: #5a8ca38c;
    font-weight: 500;
}

.search-highlight-strong {
    background-color: #5a8ca38c;
    font-weight: 600;
}

.menu-item.has-children > .menu-children {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.menu-item.has-children.active > .menu-children {
    max-height: 2000px;
}

.menu-link .menu-arrow svg {
    transition: transform 0.3s ease;
}

.menu-item.has-children.active > .menu-link .menu-arrow svg {
    transform: translateY(-50%) rotate(180deg);
}
.menu-item.has-children ul{
    margin: 0;
    list-style: none;
}

/* Parent link styles - title in submenu */
.menu-parent-link .menu-link {
    font-weight: 600;
    font-size: 21px;
    color: #343434;
    border-bottom: 1px solid #eee;
    margin-bottom: 8px;
    padding-bottom: 12px;
    padding-top: 5px;
}

.menu-parent-link .menu-link:hover {
    background: transparent;
    color: #5A8CA3;
}

/* Submenu slide title styling */
.menu-slide[data-level="1"] .menu-parent-link .menu-link,
.menu-slide[data-level="2"] .menu-parent-link .menu-link,
.menu-slide[data-level="3"] .menu-parent-link .menu-link {
    display: block;
    padding: 5px 0px 18px 0px;
    background-color: transparent;
    font-family: "SF Pro Display", Sans-serif;
    font-size: 21px;
    font-weight: 400;
    color: #343434;
    border-bottom: none;
    margin-bottom: 0;
}

/* Mobile Search Modal Styles */
.modal-search-mobile-wrapper {
    display: inline-block;
}

.modal-search-mobile-icon {
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.2s ease;
    width: 46px;
    height: 46px;
    background: rgba(52, 52, 52, 0.07);
    backdrop-filter: blur(6.31373px);
    margin-right: 6px;
    padding: 0;
    border-radius: 50%;
}

.modal-search-mobile-icon.light svg path {
    fill: rgba(0, 0, 0, 0.3);
}

/* Fullscreen Modal */
.modal-search-mobile-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-search-mobile-modal.active {
    opacity: 1;
    visibility: visible;
}

.modal-search-mobile-content {
    position: relative;
    width: 100%;
    height: auto;
    max-height: 60%;
    background: #fff;
    display: flex;
    flex-direction: column;
    border-radius: 20px;
    overflow: hidden;
    animation: scaleIn 0.3s ease-out;
}

@keyframes scaleIn {
    from {
        transform: scale(0.9);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* Modal Header */
.modal-search-mobile-header {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 20px;
    border-bottom: 1px solid #eee;
    background: #fff;
    position: sticky;
    top: 0;
    z-index: 10;
}

.modal-search-mobile-form {
    flex: 1;
    display: flex;
    align-items: center;
}
.modal-search-mobile-form input{
    font-family: 'SF Pro Display', Sans-serif;
    font-weight: 300;
    font-size: 14px;
    color: rgba(52, 52, 52, 0.7);
    border-radius: 25px;
    border: none;
    height: 48px;
    line-height: 48px;
}

.modal-search-mobile-input {
    width: 100%;
    border: none;
    background: transparent;
    font-family: 'SF Pro Display', Sans-serif;
    font-weight: 400;
    font-size: 18px;
    line-height: 24px;
    color: #343434;
    padding: 10px 0;
    outline: none;
}

.modal-search-mobile-input::placeholder {
    color: rgba(52, 52, 52, 0.5);
}

.modal-search-mobile-close {
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: opacity 0.2s ease;
}

.modal-search-mobile-close:hover {
    opacity: 0.7;
}

/* Modal Results */
.modal-search-mobile-results {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: none;
}

.modal-search-mobile-results:not(:empty) {
    display: block;
}

.modal-search-mobile-results .modal-search-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.modal-search-mobile-results .modal-search-item {
    border-bottom: 1px solid #f0f0f0;
    margin-bottom: 12px;
    padding-bottom: 12px;
}

.modal-search-mobile-results .modal-search-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.modal-search-mobile-results .modal-search-link {
    display: block;
    padding: 0;
    text-decoration: none;
}

.modal-search-mobile-results .modal-search-title {
    font-weight: 600;
    font-size: 15px;
    line-height: 1.3;
    margin-bottom: 6px;
    color: #343434;
}

.modal-search-mobile-results .modal-search-excerpt {
    font-size: 13px;
    line-height: 1.4;
    color: #666;
    margin-bottom: 6px;
}

.modal-search-mobile-results .modal-search-matches {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    color: #888;
}

.modal-search-mobile-results .modal-search-loading,
.modal-search-mobile-results .modal-search-no-results,
.modal-search-mobile-results .modal-search-error {
    color: #888;
    padding: 15px 0;
    text-align: center;
    font-size: 14px;
}