/* ==========================================================================
   Pandaros Menu
   Breakpoint: 980px (same as Divi's mobile breakpoint).
   To change it, search this file for "980px" / "981px".
   ========================================================================== */

.pdrs-wrap,
.pdrs-panel,
.pdrs-overlay,
.pdrs-close {
    --pdrs-panel-width: 100vw;
    --pdrs-panel-bg: #ffffff;
    --pdrs-burger-color: #000000;
    --pdrs-link-color: inherit;
    --pdrs-accent: #000000;
    --pdrs-logo-width: 180px;
}

.pdrs-wrap {
    position: relative;
    width: 100%;
    box-sizing: border-box;
}

.pdrs-wrap *,
.pdrs-wrap *::before,
.pdrs-wrap *::after,
.pdrs-panel *,
.pdrs-panel *::before,
.pdrs-panel *::after {
    box-sizing: border-box;
}

/* --------------------------------------------------------- Top bar ------ */

.pdrs-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    width: 100%;
}

.pdrs-logo {
    display: inline-flex;
    align-items: center;
    flex: 0 0 auto;
    text-decoration: none;
    line-height: 1;
}

.pdrs-logo img {
    display: block;
    width: auto;
    max-width: var(--pdrs-logo-width);
    max-height: 70px;
    height: auto;
}

.pdrs-logo-text {
    font-size: 22px;
    font-weight: 700;
    color: var(--pdrs-link-color);
}

/* ------------------------------------------------------ Desktop menu ---- */

.pdrs-nav-desktop {
    flex: 1 1 auto;
    display: flex;
    justify-content: flex-end;
}

.pdrs-nav-desktop .pdrs-menu {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 28px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.pdrs-nav-desktop .pdrs-menu li {
    position: relative;
    margin: 0;
    padding: 0;
    list-style: none;
}

/* Bold + larger, with enough specificity to beat theme defaults */
.pdrs-wrap .pdrs-nav-desktop .pdrs-menu > li > a {
    display: block;
    padding: 6px 0;
    text-decoration: none;
    color: var(--pdrs-link-color);
    font-size: 18px !important;
    font-weight: 700 !important;
    line-height: 1.3;
}

.pdrs-wrap .pdrs-nav-desktop .pdrs-menu a {
    text-decoration: none;
    color: var(--pdrs-link-color);
}

.pdrs-nav-desktop .pdrs-menu a:hover,
.pdrs-nav-desktop .pdrs-menu .current-menu-item > a {
    opacity: 0.65;
}

/* Arrow on desktop items that have a sub-menu */
.pdrs-wrap .pdrs-nav-desktop .menu-item-has-children > a {
    position: relative;
    padding-right: 20px !important;
}

.pdrs-wrap .pdrs-nav-desktop .menu-item-has-children > a::after {
    content: "";
    position: absolute;
    right: 2px;
    top: 50%;
    display: block;
    width: 8px;
    height: 8px;
    border-right: 2.5px solid currentColor;
    border-bottom: 2.5px solid currentColor;
    transform: translateY(-75%) rotate(45deg);
    transition: transform 0.25s ease;
    pointer-events: none;
}

.pdrs-nav-desktop > .pdrs-menu > li.menu-item-has-children:hover > a::after,
.pdrs-nav-desktop > .pdrs-menu > li.menu-item-has-children:focus-within > a::after {
    transform: translateY(-20%) rotate(-135deg);
}

/* Desktop dropdowns */
.pdrs-nav-desktop .sub-menu {
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 100;
    display: block;
    min-width: 240px;
    margin: 0;
    padding: 10px 0;
    list-style: none;
    background: var(--pdrs-panel-bg);
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.12);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
}

.pdrs-nav-desktop .sub-menu .sub-menu {
    top: 0;
    left: 100%;
}

.pdrs-nav-desktop li:hover > .sub-menu,
.pdrs-nav-desktop li:focus-within > .sub-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.pdrs-wrap .pdrs-nav-desktop .sub-menu a {
    display: block;
    padding: 10px 20px;
    font-size: 16px !important;
    font-weight: 600 !important;
    white-space: nowrap;
}

/* Second level and deeper: arrow points right */
.pdrs-wrap .pdrs-nav-desktop .sub-menu .menu-item-has-children > a {
    padding-right: 34px !important;
}

.pdrs-wrap .pdrs-nav-desktop .sub-menu .menu-item-has-children > a::after {
    right: 16px;
    transform: translateY(-50%) rotate(-45deg);
}

/* ---------------------------------------------------------- Burger ------ */

.pdrs-burger {
    display: none;
    flex: 0 0 auto;
    flex-direction: column;
    justify-content: space-between;
    width: 32px;
    height: 24px;
    padding: 0;
    margin: 0;
    border: 0;
    background: none;
    box-shadow: none;
    cursor: pointer;
    position: relative;
    z-index: 1000000;
    -webkit-appearance: none;
    appearance: none;
}

.pdrs-burger:hover,
.pdrs-burger:focus {
    background: none;
    border: 0;
}

.pdrs-burger span {
    display: block;
    width: 100%;
    height: 3px;
    background: var(--pdrs-burger-color);
    border-radius: 2px;
    transition: transform 0.3s ease, opacity 0.2s ease;
}

/* While the panel is open the bar burger is hidden and replaced by the
   close X below, which sits above the panel and never moves the layout. */
.pdrs-wrap.pdrs-open .pdrs-burger {
    opacity: 0;
    pointer-events: none;
}

/* Close X — appended to <body> by the JS, positioned over the burger */
.pdrs-close {
    position: fixed;
    z-index: 1000001;
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 32px;
    height: 24px;
    padding: 0;
    margin: 0;
    border: 0;
    background: none;
    box-shadow: none;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
}

.pdrs-close.pdrs-visible {
    display: flex;
}

.pdrs-close:hover,
.pdrs-close:focus {
    background: none;
    border: 0;
}

.pdrs-close span {
    display: block;
    width: 100%;
    height: 3px;
    background: var(--pdrs-burger-color);
    border-radius: 2px;
}

.pdrs-close span:nth-child(1) {
    transform: translateY(10.5px) rotate(45deg);
}

.pdrs-close span:nth-child(2) {
    opacity: 0;
}

.pdrs-close span:nth-child(3) {
    transform: translateY(-10.5px) rotate(-45deg);
}

@media (min-width: 981px) {
    .pdrs-close {
        display: none !important;
    }
}

/* ------------------------------------------------- Slide-in panel -------
   The panel and overlay are moved to <body> by the JS, so no transformed
   theme container can shrink or reposition them.
   ------------------------------------------------------------------------ */

.pdrs-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 999997;
    background: rgba(0, 0, 0, 0.45);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s;
}

.pdrs-overlay[hidden] {
    display: none;
}

.pdrs-overlay.pdrs-open {
    opacity: 1;
    visibility: visible;
}

.pdrs-panel {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 999998;
    width: var(--pdrs-panel-width);
    max-width: 100vw;
    height: 100%;
    height: 100dvh;
    margin: 0;
    background: var(--pdrs-panel-bg);
    box-shadow: 2px 0 26px rgba(0, 0, 0, 0.18);
    transform: translateX(-100%);
    visibility: hidden;
    transition: transform 0.32s ease, visibility 0.32s;

    /* scrolling happens here and only here */
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
}

.pdrs-panel.pdrs-open {
    transform: translateX(0);
    visibility: visible;
}

.pdrs-panel-inner {
    padding: 178px 22px 60px;
}

.pdrs-panel .pdrs-menu,
.pdrs-panel .sub-menu {
    list-style: none;
    margin: 0;
    padding: 0;
}

.pdrs-panel .pdrs-menu > li {
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.pdrs-panel li {
    position: relative;
    margin: 0;
    padding: 0;
    list-style: none;
}

.pdrs-panel a {
    display: block;
    padding: 14px 44px 14px 0;
    text-decoration: none;
    color: var(--pdrs-link-color);
    font-size: 17px;
    font-weight: 500;
    line-height: 1.35;
    word-wrap: break-word;
}

.pdrs-panel .sub-menu {
    display: none;
    padding-left: 16px;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.pdrs-panel li.pdrs-sub-open > .sub-menu {
    display: block;
}

.pdrs-panel .sub-menu a {
    padding: 11px 44px 11px 0;
    font-size: 15px;
    font-weight: 400;
    opacity: 0.85;
}

/* Sub-menu toggle button (added by JS) */
.pdrs-sub-toggle {
    position: absolute;
    top: 4px;
    right: 0;
    width: 44px;
    height: 44px;
    padding: 0;
    margin: 0;
    border: 0;
    background: none;
    box-shadow: none;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
}

.pdrs-sub-toggle::before,
.pdrs-sub-toggle::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 14px;
    height: 2px;
    background: var(--pdrs-accent);
    transform: translate(-50%, -50%);
    transition: transform 0.25s ease, opacity 0.25s ease;
}

.pdrs-sub-toggle::after {
    transform: translate(-50%, -50%) rotate(90deg);
}

.pdrs-sub-open > .pdrs-sub-toggle::after {
    opacity: 0;
    transform: translate(-50%, -50%) rotate(0deg);
}

/* Body scroll lock while the panel is open */
body.pdrs-menu-locked {
    position: fixed;
    width: 100%;
    overflow: hidden;
}

/* --------------------------------------------------- Breakpoints -------- */

@media (max-width: 980px) {
    .pdrs-nav-desktop {
        display: none;
    }

    .pdrs-burger {
        display: flex;
    }

}

@media (min-width: 981px) {
    .pdrs-panel,
    .pdrs-overlay {
        display: none !important;
    }
}

@media (prefers-reduced-motion: reduce) {
    .pdrs-panel,
    .pdrs-overlay,
    .pdrs-burger span {
        transition: none;
    }
}
