/* Algolia Autocomplete Custom Styles */
#algolia-autocomplete {
    width: 100%;
}

/* Input wrapper - contains input and search results */
.input-wrapper {
    position: relative;
    flex: 1;
    display: flex;
    align-items: center;
    gap: 8px;
    border-color: #A50D33 !important;
}

.aa-Input {
    width: 100%;
    height: auto !important;
    background: transparent;
    color: #333;
    border: none !important;
    outline: none;
    padding: 16px 24px !important;
    font-size: 16px;
    flex: 1;
}

.aa-Input::placeholder {
    color: #999;
}

.aa-Input:focus {
    border: none !important;
    outline: none;
}



.aa-Panel {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    border-radius: 0;
}

.aa-Select {
    border: none;
    height: 32px;
    width: 100%;
    border-left: 2px solid #EAEAEA;
    outline: none;
    padding: 16px 16px 16px 20px;
    font-size: 16px;
    color: #24292f;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.aa-SearchButton {
    margin-left: 8px;
    border: none;
    border-left: 1px solid #d0d7de;
    outline: none;
    width: 64px;
    background: #A01441;
    border-radius: 100px;
    color: white;
    cursor: pointer;
    display: block;
    height: 64px;
    align-items: center;
    transition: background-color 0.2s ease;
    font-weight: 500;
    flex-shrink: 0;
}

/* Mobile Search Button - Shows as first element on mobile */
.aa-MobileSearchButton {
    display: none;
    padding: 0;
    background: transparent;
    border: none;
    cursor: pointer;
    color: #333;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    margin-left: 8px;
    margin-right: 0;
}

.aa-MobileSearchButton svg {
    width: 20px;
    height: 20px;
}

/* Vertical Divider - Hidden on desktop */
.aa-VerticalDivider {
    display: none;
    width: 1px;
    height: 24px;
    background: #E5E7EB;
    flex-shrink: 0;
    margin: 0 8px;
}

/* Mobile Dots Button - Shows as last element on mobile */
.aa-MobileDotsButton {
    display: none;
    padding: 8px;
    background: transparent;
    border: none;
    cursor: pointer;
    color: #333;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    margin-left: 0;
    margin-right: 8px;
}

.aa-MobileDotsButton svg {
    width: 4px;
    height: 16px;
}

/* Mobile dropdown close button */
.dd-mobile-close-header {
    display: none;
    justify-content: flex-end;
    align-items: center;
    padding: 16px 5%;
    list-style: none;
    margin: 0;
}

@media (max-width: 768px) {
    .dd-mobile-close-header {
        display: flex;
        position: fixed;
        top: 72px;
        right: 0px;
    }
}

.dd-mobile-close-button {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.2s;
    margin-left: auto;
}

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

.dd-mobile-close-button svg {
    display: block;
}

/* Search results - positioned relative to input-wrapper */
.search-results {
    position: absolute;
    top: calc(100% + 3px);
    left: -2px;
    right: 0;
    width: calc(100% + 3px);
    background: white;
    border: 2px solid #a50d33;
    border-radius:  0 0 12px 12px;
    padding-top: 12px;
    border-top: none;
    z-index: 1000;
    max-height: 500px;
    overflow-y: auto;overflow-x: hidden; 
}

.search-results::-webkit-scrollbar-track {
    background: transparent;
    margin-bottom: 8px; /* Add margin to prevent scrollbar from touching border radius */
}

.search-results::-webkit-scrollbar {
    width: 8px;
}

.search-results::-webkit-scrollbar-thumb {
    background: #d0d7de;
    border-radius: 4px;
}

.search-results::-webkit-scrollbar-thumb:hover {
    background: #a50d33;
}

.search-results .selected {
    background-color: #f0f6ff;
}

.dd-option {
    display: flex;
    flex-direction: column;
    padding: 12px 20px;
    cursor: pointer;
    text-decoration: none;
    color: #24292f;
    padding-left: 36px;
}

.dd-option-header {
    font-weight: 600 !important;
    color: #1D2530 !important;
    cursor: default !important;
    pointer-events: none !important;
    text-transform: uppercase !important;
    font-size: 14px !important;
    letter-spacing: 0.5px !important;
    background: transparent !important;
    padding-top: 30px;
    padding-bottom: 8px;
}

.dd-option.dd-option-header .dd-option-text {
    font-weight: bold;
}

.dd-option-header:hover {
    background: transparent !important;
}

.dd-option-child {
    padding-left: 60px !important;
    padding-bottom: 6px;
    padding-top: 6px;
}

@media (min-width: 769px) {
    .dd-option {
        padding-left: 20px !important;
    }

    .dd-option-child {
        padding: 12px 20px;
        padding-left: 42px !important;
    }
}


.dd-option .dd-option-text {
    cursor: pointer;
    font-size: 16px;
    font-weight: 400;
    margin-bottom: 0px;
}

.dd-option.dd-option-selected .dd-option-text {
    /* font-weight: 600; */
    color: #c50044 !important;
}

.dd-option:hover {
    background-color: #FAFAFA;
}

.dd-options li {
    margin: 0px;
}

/* Search Item Container */
.search-item {
    cursor: pointer;
    padding: 16px;
    border-bottom: 1px solid #e5e5e5;
    transition: background-color 0.2s ease;
}

.search-item:hover {
    background-color: #f9f9f9;
}

/* Search Item Header */
.search-results .search-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 4px;
    border-bottom: none !important;
    flex-wrap: wrap; 
}

/* Search Item Title */
.search-item-title {
    color: #333;
    flex: 1 1;
    min-width: 200px; 
}

/* Categories Container */
.search-item-categories {
    display: flex;
    flex-wrap: wrap; 
    gap: 8px;
    flex: 0 1 auto; 
    justify-content: flex-start; 
    max-width: 100%; 
}

/* Individual Category Tag */
.category-tag {
    background: #F1E6E8;
    color: #1d2530;
    padding: 9px 17px;
    border-radius: 20px;
    font-size: 12px;
    white-space: nowrap;
}

/* Search Item Excerpt */
.search-item-excerpt {
    margin-top: 16px;
    font-size: 13px;
    color: #1D2530;
    line-height: 1.4;
}

/* Mobile Layout - Stack vertically under 768px */
 @media (max-width: 768px) {
    .search-item-header {
        gap: 8px;
    }
} 

.dd-selected {
    display: flex;
    flex-direction: column;
    flex: 1;
    cursor: pointer;
}

.dd-selected-text {
    cursor: pointer;
    font-size: 16px;
    margin-bottom: 0px;
}

.dd-pointer {
    width: 16px;
    height: 16px;
    margin-left: 32px;
    transition: transform 0.2s ease;
}

@media (max-width: 768px) {
    .aa-Panel {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: white;
        border: 1px solid #ddd;
        border-radius: 0px;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
        z-index: 1000;
        min-height: 500px;
    }
}

.input-placeholder::placeholder {
    color: #1D2530 !important;
}

.form-container {
    display: flex;
    align-items: center;
    background: white;
    border: 2px solid #A50D33;
    border-radius: 50px;
    box-shadow: 0 2px 4px 0 rgba(69,90,100,.08);
    padding: 0;
    position: relative;
    align-items: center;
    display: flex;
    line-height: 1em;
    margin: 0;
    height: 64px;
    width: 100%;
}

.nav-arrow-left {
    transform: rotate(180deg);
}

.aa-Select-container {
    width: 350px !important;
}

/* ===================================
   DESKTOP DROPDOWN - UPDATED TO MATCH MOBILE VISUALLY
   =================================== */
.dd-options {
    list-style-type: none;
    padding: 0;
    margin: 0;
    position: absolute;
    top: 100%;
    right: -2px;
    left: auto;
    background: white;
    border: 2px solid #a50d33;
    border-top: none;
    border-radius: 0 0 12px 12px;
    min-width: 200px;
    overflow: hidden;
    display: none;
    width: 352px;
    /* Start in closed state */
    max-height: 0;
    opacity: 0;
    border-width: 0;
}

/* Mobile-specific dropdown (hidden on desktop) */
.dd-options-mobile {
    display: none;
}

/* Open state using class instead of inline style */
.dd-options.dd-open {
    display: block;
    max-height: 60vh;
    opacity: 1;
    border-width: 2px;
    overflow-y: auto;
    padding-bottom: 30px;
    padding-top: 12px;
}

/* "All" option styling for desktop */
.dd-options .dd-option[data-value="all"] {
    font-weight: 700 !important;
    line-height: 36px !important;
    color: #c50044;
}

.dd-options .dd-option[data-value="all"] .dd-option-text {
    font-weight: 700 !important;
    line-height: 36px !important;
}

/* When dropdown is open */
.form-container:has(.dd-options.dd-open) {
   border-bottom-right-radius: 0;
}

.form-container:has(.search-results[style*="display: block"]) {
  border-bottom-left-radius: 0;
}

/* Mobile adjustments for dropdown */
@media (max-width: 768px) {
    .dd-options {
        display: none !important; /* Hide desktop dropdown on mobile */
    }
    
    /* Mobile dropdown - FULL SCREEN WIDTH separate element */
    .dd-options-mobile {
        list-style-type: none;
        padding: 0;
        margin: 0;
        position: fixed;
        left: 0 !important;
        right: 0 !important;
        width: 100% !important;
        background: white;
        border: none;
        border-bottom: 2px solid #E5E7EB;
        border-radius: 0;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
        z-index: 10001;
        overflow: hidden;
        display: none;
        max-height: 0;
        opacity: 0;
        transition: max-height 0.3s ease, opacity 0.3s ease;
    }
    
    /* Open state for mobile dropdown */
    .dd-options-mobile.dd-open {
        display: block;
        max-height: 60vh;
        opacity: 1;
        overflow-y: auto;
        padding-bottom: 30px;
        padding-top: 12px;
        border-radius: 0px 0px 12px 12px;
    }
}

.dd-options-mobile .dd-option[data-value="all"] {
    font-weight: var(--font-weight-400, 700) !important;
    line-height: 36px !important;
    color: #c50044;
}

.dd-options-mobile .dd-option[data-value="all"] .dd-option-text {
    font-weight: var(--font-weight-400, 700) !important;
    line-height: 36px !important;
}

/* Mobile: stacked layout */
@media (max-width: 768px) {
  .form-container {
    min-width: 0;
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 12px !important;
    background: transparent !important;
    border: none !important;
    padding: 0px !important;
    box-shadow: none !important;
  }
  
  .aa-SearchButton,
  .aa-Select-container {
    max-width: 100% !important;
    flex: none !important;
    flex-grow: 0 !important;
    flex-shrink: 0 !important;
    min-width: 0 !important;
    border-radius: 50px !important;
    height: 56px !important;
    border: none;
    margin: 0 !important;
  }

  .aa-Select {
    background: white;
    height: 56px !important;
    border-radius: 50px !important;
    border: 2px solid #EAEAEA;
  }

  .input-wrapper {
    background: white;
    width: auto !important;
    height: 56px !important;
    border-radius: 50px !important;
    border: 2px solid #EAEAEA;
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    padding: 0 !important;
  }

  

  .input-wrapper:has(.search-results[style*="display: block"]) {
    border-radius: 35px 35px 0px 0px !important;
    border-bottom: none !important;
  }

  .input-wrapper input {
    text-overflow: ellipsis;
    background: transparent !important;
    border: none !important;
    outline: none;
    flex: 1;
}
  
  .aa-Input {
    padding: 16px 0px !important;
    border-radius: 0;
    flex: 1;
  }
  
  .aa-SearchButton {
    border: none !important;
    width: 56px;
    background: #9c2757 !important;
    color: white !important;
    padding: 16px 20px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
  }

  .search-results {
    top: 100% !important;
    width: calc(100% + 4px);
    left: -2px;
  }

  input.aa-Input {
    background: white;
    border-radius: 0;
  }

  /* Mobile buttons visibility */
  .aa-MobileDotsButton,
  .aa-MobileSearchButton,
  .aa-VerticalDivider {
    display: flex !important;
  }
}

.aa-ItemWrapper {
    padding: 8px 12px;
    cursor: pointer;
}

/* .aa-ItemWrapper:hover {
    background-color: #f5f5f5;
} */

.aa-ItemContent {
    display: flex;
    align-items: flex-start;
}

.aa-ItemContentBody {
    flex: 1;
}

.aa-ItemTitle {
    font-weight: 500;
    /* margin-bottom: 4px; */
}

.aa-ItemSubtitle {
    font-size: 14px;
    color: #666;
}

/* Highlight styles */
.aa-ItemTitle em,
.aa-ItemSubtitle em {
    font-style: normal;
    background-color: #e9ecef;
    padding: 0 2px;
    border-radius: 2px;
}

/* Modal specific styles */
.searchmodal .modal-content {
    background: transparent;
    border: none;
    box-shadow: none;
}

.searchmodal .modal-header {
    border: none;
    padding: 20px;
}

.searchmodal .search-form {
    display: flex;
    align-items: center;
    width: 100%;
}

.searchmodal .search-submit {
    background: none;
    border: none;
    padding: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
}

.searchmodal .search-submit span {
    color: white;
    font-size: 16px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .algolia-autocomplete .aa-dropdown-menu {
        width: 100vw !important;
        left: 0 !important;
        padding: 0;
        margin: 0;
    }

    .suggestion-post-thumbnail {
        width: 40px;
        height: 40px;
    }

    .suggestion-post-content {
        font-size: 12px;
        max-height: 2.8em; /* Limit height on mobile */
    }

    .aa-Panel {
        position: fixed;
        top: auto;
        bottom: 0;
        left: 0;
        right: 0;
        max-height: 80vh;
        overflow-y: auto;
        border-radius: 12px 12px 0 0;
    }
}

/* Search form and input styling */
.searchmodal .search-form {
    display: flex;
    width: 100%;
    align-items: center;
}

.searchmodal .aa-Autocomplete {
    flex: 1;
    position: relative;
}

.searchmodal .form-container {
    display: flex;
    align-items: center;
    width: 100%;
    background: transparent;
    width: 100%;
    border: none;
}
.searchmodal .form-container:focus-within {
    outline: none;
    box-shadow: none;
}

.searchmodal .aa-InputWrapperSuffix,
.searchmodal .aa-InputWrapperPrefix {
    display: none;
}
.searchmodal .aa-Input {
    border: none;
    background: transparent;
    z-index: 99;
    height: 44px;
    padding: 0 20px;
    line-height: 44px;
    color: #ffffff;
    width: 100%;
    font-family: "Montserrat", sans-serif;
}

.searchmodal .aa-Input:focus {
    border: none;
    outline: none;
    color: #ffffff;
}

.searchmodal .aa-Input::placeholder {
    color: #ffffff;
    font-family: "Montserrat", sans-serif;
}

.searchmodal .search-submit {
    display: flex;
    padding: 10px 20px;
    background-color: #ff4242;
    border-radius: 0;
    border: none;
    gap: 10px;
    font-size: 16px;
    align-items: center;
    color: #ffffff;
    font-weight: 700;
    font-family: "Montserrat", sans-serif;
    transition: all 0.15s ease-in-out;
}

.searchmodal .search-submit:hover {
    background-color: #4d71d9;
}
.searchmodal .modal-header {
    position: relative;
}

@media (min-width: 1024px) {
    .searchmodal .search-submit {
        padding: 10px 30px;
        font-size: 18px;
    }
}

/* Panel styling */
.aa-Panel {
    position: absolute;
    top: calc(100% + 5px) !important;
    left: 0 !important;
    width: 100% !important;
    margin-top: 0;
    right: 0;
    background: white;
    border: none;
    border-radius: 4px;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    padding: 0;
}

.aa-ItemHeader {
    display: flex;
    align-items: center;
    gap: 8px;
    /* margin-bottom: 4px; */
}

.aa-IndexHeader {
    font-weight: 600;
    line-height: 1.2;
    box-sizing: inherit;
    background-color: transparent;
    margin: 0;
    padding: 0;
    border: 0;
    font-size: 0.9rem;
    vertical-align: baseline;
    text-decoration: none;
    /* color: #201F50; */
    color: #636363;
    padding-left: 1rem;
    text-transform: uppercase;
}

.aa-ItemCategory {
    font-size: 12px;
    padding: 2px 8px;
    border-radius: 12px;
    background-color: #f0f0f0;
    color: #666;
    white-space: nowrap;
    line-height: 1.4;
    margin-bottom: 5px;
}

.aa-ItemTitle {
    min-width: 0;
}


#algolia-results .aa-ItemIcon {
    align-items: center;
    background: rgba(255, 255, 255, 0);
    /* background: rgba(var(--aa-background-color-rgb), var(--aa-background-color-alpha)); */
    /* border-radius: 3px;*/
    box-shadow: none;
    /* box-shadow: inset 0 0 0 1px rgba(var(--aa-panel-border-color-rgb), var(--aa-panel-border-color-alpha)); */
    /* color: rgba(119, 119, 163, 1); */
    color: #201f50;
    /* color: rgba(var(--aa-icon-color-rgb), var(--aa-icon-color-alpha)); */
    display: flex;
    flex-shrink: 0;
    font-size: 0.7em;
    height: 24px;
    justify-content: center;
    overflow: hidden;
    stroke-width: 1.6;
    text-align: center;
    width: 24px;
}

#algolia-results .aa-Panel--scrollable {
    padding: 0;
}
#algolia-results .aa-Panel--scrollable > :not([hidden]) ~ :not([hidden]) {
    border-top: 1px solid #e0e0e0;
}
.aa-Source {
    padding: 0 1rem 0.75rem 1rem;
}

.aa-ItemContent mark {
    font-weight: 500;
}
.aa-SourceHeader {
    position: sticky;
    top: 0;
    padding: 12px 0;
    background: white;
    z-index: 10;
    margin-right: 0;
    margin-left: 0;
}
.aa-Source:has(.aa-SourceNoResults) {
    display: none;
}

.aa-NoResults-wrap {
    padding: 1.5rem 1rem;
}
.aa-NoResults-title {
    font-size: 1;
    font-weight: 600;
}
.aa-NoResults-wrap p {
    margin: 0;
    font-size: 14px;
    color: #666;
    line-height: 1.5;
}
.aa-Source:not(:has(.aa-IndexHeader)) {
    padding-top: 1rem;
}
.aa-ShowMoreLink {
    padding: 1rem;
    text-align: center;
}
.aa-ShowMoreLink a,
.aa-ShowMoreLink a:hover,
.aa-ShowMoreLink a:focus,
.aa-ShowMoreLink a:active,
.aa-ShowMoreLink a:visited {
    /* text-decoration: none;
    color: #005FCC; */
    color: #201f50;
}


/* GLOSARY STYLES */
.term-item {
    display: flex;
    align-items: end;
    justify-content: start;
    flex-direction: column;
    padding: 24px;
    break-inside: avoid-column;
    font-size: 14px;
    line-height: 1.5;
    background: #ffffff;
    border-radius: 15px;
    text-decoration: none;
    border: 1px solid #00000040;
    box-shadow: 0px 10px 15px 0px #0000001A;
    transition: box-shadow 0.3s ease, border 0.3s ease, transform 0.3s ease;
}

.term-item .icon-all {
    transition: transform 0.3s ease;
}

.term-item:hover .icon-all {
    transform: translateX(5px);
}

.term-item:hover {
    border: 1px solid #00000040;
    box-shadow: 0px 5px 5.3px 0px #00000059;
}

.term-item:link {
    color: #374151;
}

.term-item:visited {
    color: #6b7280;
}

@media (max-width: 768px) {
    .term-item {
        font-size: 13px;
    }
}

.term-title {
    width: 100%;
    font-weight: 700;
    font-style: Bold;
    font-size: 16px;
    line-height: 24px;
    letter-spacing: 0%;
    vertical-align: middle;
    margin-bottom: 8px;
    color:#1D2530;
    padding-right: 16px;
}

.term-item:hover .term-title {
    color: #c50044;
}

.term-description {
    font-size: 13px;
    color: #1D2530;
    width: 100%;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    padding-right: 16px;
}



/* Mobile Layout - UPDATED FOR FULL WIDTH */
@media (max-width: 768px) {
    .form-container {
        flex-direction: row !important;
        gap: 12px;
        align-items: center;
        background: transparent !important;
        border: none !important;
        box-shadow: none !important;
        padding: 0 !important;
        height: auto !important;
    }

    .input-wrapper {
        gap: 0 !important;
        flex: 1;
        order: 1;
        position: relative;
    }

    .aa-MobileDotsButton {
        display: flex !important;
        position: static;
        margin-left: 0;
    }

    .aa-MobileSearchButton {
        display: flex !important;
        position: static;
        margin-left: 0;
    }

    .dd-container {
        display: none !important;
    }

    /* Hide desktop search button on mobile */
    #autocomplete > .aa-SearchButton {
        display: none !important;
    }

    .search-results {
        border-radius: 0 0 35px 35px;
    }

    .search-item {
        padding: 14px;
    }

    .dd-select {
        padding: 14px 16px;
    }

    section.position-header svg {
        margin-bottom: 0px;
    }

    section.position-header  .input-wrapper svg{
        width: 24px;
        height: 24px;
    }

    section.position-header .aa-MobileSearchButton svg {
        width: 16px;
        height: 16px;
    }

    .input-wrapper:focus-within {
        border-color: #A50D33 !important;
    }

    /* Input wrapper focus state */
.input-wrapper:focus-within {
    border-color: #A50D33 !important;
}

.form-container:focus-within {
    border-color: #A50D33 !important;
}
}

section.position-header .input-wrapper svg {
    margin-right: 0px;
}

.back-arrow {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    margin-bottom: 4px;
}

.back-arrow-category {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    margin-bottom: 20px;
    padding: 0px 15px;
}

@media (min-width: 768px) {
    .back-arrow {
        display: none;
    }
    .back-arrow-category {
        display: none;
    }
}

.back-link {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: #333;
}

.icon-arrow {
    margin-right: 10px;
}

.back-text {
    margin-left: 0;
}

/* ===================================
   SCROLL TO TOP BUTTON STYLES
   =================================== */

.scroll-to-top {
    position: fixed;
    bottom: 5px;
    right: 5px;
    width: 50px;
    height: 50px;
    background: white;
    border: none;
    border: 2px solid #A01441;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px) scale(0.8);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 0px;
    z-index: 999;
}

.scroll-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.scroll-to-top:hover {
    border: 2px solid #A01441;
    /* box-shadow: 0 6px 20px rgba(160, 20, 65, 0.4); */
    transform: translateY(-4px) scale(1.05);
}

.scroll-to-top:active {
    transform: translateY(-2px) scale(1);
}

.scroll-to-top img {
    width: 20px;
    height: 20px;
    transition: transform 0.3s ease;
}

.scroll-to-top:hover img {
    transform: translateY(-3px);
    animation: arrowBounce 0.6s ease-in-out infinite;
}

/* Zastaviť animáciu po kliknutí */
.scroll-to-top.clicked img,
.scroll-to-top.clicked:hover img {
    animation: none !important;
    transform: translateY(0) !important;
}

@keyframes arrowBounce {
    0%, 100% {
        transform: translateY(-3px);
    }
    50% {
        transform: translateY(-8px);
    }
}

/* @keyframes pulse {
    0% {
        box-shadow: 0 4px 12px rgba(160, 20, 65, 0.3);
    }
    50% {
        box-shadow: 0 4px 20px rgba(160, 20, 65, 0.5);
    }
    100% {
        box-shadow: 0 4px 12px rgba(160, 20, 65, 0.3);
    }
}

.scroll-to-top.visible:not(.clicked) {
    animation: pulse 2s ease-in-out 1;
} */

.scroll-to-top:focus {
    
border: 2px solid #A01441;
}

.scroll-to-top:focus:not(:focus-visible) {
    outline: none;
}

.scroll-to-top {
    pointer-events: auto;
}

.scroll-to-top:not(.visible) {
    pointer-events: none;
}

.scroll-to-top:not(.visible):hover img {
    animation: none !important;
}

/* Also update the existing rule to be more specific */
.scroll-to-top.visible:hover img {
    transform: translateY(-3px);
    animation: arrowBounce 0.6s ease-in-out infinite;
}

/* Ensure animation stops when button is hidden */
.scroll-to-top:not(.visible) img {
    animation: none !important;
}

/* Prevent hover animation when no-hover class is present */
.scroll-to-top.no-hover:hover img {
    animation: none !important;
    transform: translateY(0) !important;
}

.scroll-to-top.no-hover:hover {
    transform: translateY(0) scale(1) !important;
}

/* Back button */
.back-button-wrap {
    margin-top: 36px;
    display: flex;
    justify-content: center; /* or flex-start if you want it left-aligned */
}

.btn-see-all {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--item-spacing-12, 12px);
    padding: 12px 24px;
    border-radius: 30px;
    border: 1.5px solid #A50D33;
    background: #FFF;
    color: #c50044;
    font-weight: 600;
    text-decoration: none;
    line-height: 1;
    transition:
        background-color 0.2s ease,
        color 0.2s ease,
        box-shadow 0.2s ease,
        transform 0.2s ease;
}

.btn-see-all img {
    width: 36px;
    height: 36px;
    flex-shrink: 0;
    filter: none; /* keep original arrow color on white bg */
}

/* Hover state */
.btn-see-all:hover {
    background: #A50D33;
    color: #FFF;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(160, 20, 65, 0.3);
}

.btn-see-all:hover img {
    filter: brightness(0) invert(1); /* make arrow white on hover */
}


/* Mobile Category Display - shows selected category when input is NOT focused */

/* Mobile Category Display container */
.aa-MobileCategoryDisplay {
    display: none; /* Hidden on desktop by default */
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    cursor: pointer;
    white-space: nowrap;
    min-width: 0;
    flex-shrink: 0;
    max-width: 200px; /* Increased from 100px to show more text */
}

.aa-MobileCategoryText {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.aa-MobileCategoryArrow {
    width: 12px;
    height: 12px;
    transition: transform 0.2s ease;
    flex-shrink: 0; 
}

.aa-MobileCategoryDisplay:hover .aa-MobileCategoryArrow {
    opacity: 1;
}

/* Mobile Dots Button - HIDDEN by default, shown ONLY when input is focused (via JS) */
.aa-MobileDotsButton {
    display: none !important; /* Hidden by default on all devices */
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    padding: 8px 12px;
    cursor: pointer;
    flex-shrink: 0;
}

/* When JS sets display:flex, this allows it to override */
.aa-MobileDotsButton[style*="display: flex"] {
    display: flex !important;
}

.aa-MobileDotsIcon {
    width: 20px;
    height: 20px;
    opacity: 0.6;
    transition: opacity 0.2s ease;
}

.aa-MobileDotsButton:hover .aa-MobileDotsIcon {
    opacity: 1;
}

/* Mobile styles */
@media (max-width: 768px) {
    /* Show category display on mobile by default (when not focused) */
    .aa-MobileCategoryDisplay {
        display: flex;
        line-height: 1.5;
    }
    
    /* Hide desktop dropdown on mobile */
    .dd-container.aa-Select-container {
        display: none;
    }
    
    /* Ensure vertical divider shows on mobile */
    .aa-VerticalDivider {
        display: block;
    }
}

/* Desktop styles */
@media (min-width: 769px) {
    /* Hide mobile-only elements on desktop */
    .aa-MobileCategoryDisplay {
        display: none !important;
    }
    
    .aa-MobileDotsButton {
        display: none !important;
    }
    
    /* Show desktop dropdown */
    .dd-container.aa-Select-container {
        display: block;
    }
}

/* Animation for transition between category display and dots */
.aa-MobileCategoryDisplay,
.aa-MobileDotsButton {
    transition: opacity 0.15s ease-in-out;
}

/* Optional: Add subtle background on hover/active for mobile elements */
.aa-MobileCategoryDisplay:active,
.aa-MobileDotsButton:active {
    background-color: rgba(0, 0, 0, 0.05);
    border-radius: 4px;
}