/* ==============================================
   PARITIE — Shared Navigation Styles
   Matches the original site design exactly.
   All classes scoped to pn-* to avoid conflicts.
   ============================================== */

/* --- Header shell --- */
.pn-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 999;
    background: rgba(255, 255, 255, 0);
    transition: background 0.3s cubic-bezier(.72, 0, .18, 1.01),
                box-shadow 0.3s cubic-bezier(.72, 0, .18, 1.01);
    font-family: 'Gordita', sans-serif;
}

.pn-header.pn-scrolled {
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0px 2px 15px rgba(0, 0, 0, 0.05);
}

/* --- Inner container --- */
.pn-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 4rem; /* matches h-16 */
}

@media (min-width: 768px) {
    .pn-inner {
        height: 6rem; /* matches md:h-24 */
        padding: 0;
    }
}

/* --- Brand / Logo (left) --- */
.pn-brand {
    display: flex;
    align-items: center;
    text-decoration: none;
    flex-shrink: 0;
}

.pn-brand-logo {
    height: 2.5rem;
    width: auto;
    transition: all 0.28s cubic-bezier(.72, 0, .18, 1.01);
}

.pn-brand-name {
    font-size: 1.25rem;
    font-weight: 700;
    color: #272870;
    margin: 0;
    margin-left: 0.5rem;
    margin-top: 0.125rem;
    line-height: 1;
    transition: opacity 0.3s ease;
}

@media (min-width: 768px) {
    .pn-brand-name {
        font-size: 1.5rem;
    }
}

/* --- Desktop navigation (right-aligned) --- */
.pn-desktop-nav {
    display: none;
    list-style: none;
    margin: 0;
    padding: 1rem 0;
    align-items: center;
    flex: 1;
    justify-content: flex-end; /* RIGHT-aligned, matching original */
}

@media (min-width: 768px) {
    .pn-desktop-nav {
        display: flex;
    }
}

/* --- Plain nav links (matching .normal-nav-links) --- */
.pn-link {
    display: inline-block;
    margin-left: 1.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: #40415e; /* matches .body-pri */
    text-decoration: none;
    position: relative;
    padding-bottom: 4px;
}

@media (min-width: 1280px) {
    .pn-link {
        margin-left: 2rem;
    }
}

/* Underline hover animation — matches .normal-nav-links:after */
.pn-link::after {
    content: "";
    position: absolute;
    bottom: 7px;
    left: 0;
    height: 2px;
    width: 0%;
    background: #ffd78c;
    z-index: -9;
    transition: width 0.28s cubic-bezier(.72, 0, .18, 1.01);
}

.pn-link:hover::after,
.pn-link.pn-active::after {
    width: 100%;
}

.pn-link:hover,
.pn-link.pn-active {
    color: #272870;
}

/* --- Dropdown wrapper --- */
.pn-dropdown-item {
    list-style: none;
    position: relative;
}

/* Dropdown trigger — same appearance as .pn-link */
.pn-dropdown-trigger {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    margin-left: 1.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: #40415e;
    background: none;
    border: none;
    cursor: pointer;
    position: relative;
    padding-bottom: 4px;
    font-family: 'Gordita', sans-serif;
    transition: color 0.2s ease;
}

@media (min-width: 1280px) {
    .pn-dropdown-trigger {
        margin-left: 2rem;
    }
}

.pn-dropdown-trigger::after {
    content: "";
    position: absolute;
    bottom: 7px;
    left: 0;
    height: 2px;
    width: 0%;
    background: #ffd78c;
    z-index: -9;
    transition: width 0.28s cubic-bezier(.72, 0, .18, 1.01);
}

.pn-dropdown-item:hover .pn-dropdown-trigger::after,
.pn-dropdown-item:focus-within .pn-dropdown-trigger::after,
.pn-dropdown-trigger.pn-active::after {
    width: calc(100% - 16px); /* exclude chevron width */
}

.pn-dropdown-item:hover .pn-dropdown-trigger,
.pn-dropdown-item:focus-within .pn-dropdown-trigger,
.pn-dropdown-trigger.pn-active {
    color: #272870;
}

/* Chevron */
.pn-chevron {
    width: 13px;
    height: 13px;
    flex-shrink: 0;
    transition: transform 0.22s ease;
    color: #a0aec0;
    margin-bottom: -2px;
}

.pn-dropdown-item:hover .pn-chevron,
.pn-dropdown-item:focus-within .pn-chevron {
    transform: rotate(180deg);
    color: #272870;
}

/* Dropdown panel */
.pn-dropdown-panel {
    position: absolute;
    top: calc(100% + 2px);
    right: 0; /* aligned to right edge of trigger */
    min-width: 210px;
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.07);
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(39, 40, 112, 0.1), 0 2px 6px rgba(0, 0, 0, 0.05);
    padding: 0.375rem;
    list-style: none;
    margin: 0;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(-6px);
    /* Add a 300ms delay when closing to prevent accidental close */
    transition: opacity 0.18s ease 0.3s, transform 0.18s ease 0.3s, visibility 0s 0.48s;
    z-index: 1001;
}

.pn-dropdown-item:hover .pn-dropdown-panel,
.pn-dropdown-item:focus-within .pn-dropdown-panel {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
    /* No delay when opening */
    transition: opacity 0.18s ease, transform 0.18s ease, visibility 0s;
}

/* Dropdown item links */
.pn-dropdown-link {
    display: block;
    padding: 0.6rem 0.875rem;
    font-size: 0.8125rem;
    font-weight: 500;
    color: #40415e;
    text-decoration: none;
    border-radius: 5px;
    transition: background-color 0.15s ease, color 0.15s ease;
    line-height: 1.5;
}

.pn-dropdown-link:hover,
.pn-dropdown-link.pn-active {
    background: rgba(39, 40, 112, 0.05);
    color: #272870;
}

.pn-dropdown-divider {
    height: 1px;
    background: rgba(0, 0, 0, 0.06);
    margin: 0.3rem 0.5rem;
}

/* --- "Talk To Us" CTA — matches original .nav-talk-to-us style --- */
.pn-cta {
    display: inline-block;
    margin-left: 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: #40415e;
    text-decoration: underline;
    text-decoration-color: #ffbf46;
    text-underline-offset: 2px;
    position: relative;
    transition: all 0.28s cubic-bezier(.72, 0, .18, 1.01);
}

@media (min-width: 1280px) {
    .pn-cta {
        margin-left: 1.5rem;
    }
}

.pn-cta::after {
    content: "";
    position: absolute;
    bottom: 7px;
    left: 0;
    height: 30%;
    width: 100%;
    background: #ffd78c;
    z-index: -9;
    transition: all 0.28s cubic-bezier(.72, 0, .18, 1.01);
}

.pn-cta:hover::after {
    height: 90%;
}

.pn-cta:hover {
    color: #272870;
}

/* --- Hamburger (mobile only) --- */
.pn-hamburger {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-end;
    width: 2rem;
    height: 2rem;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.25rem;
    position: relative;
    z-index: 1010;
}

@media (min-width: 768px) {
    .pn-hamburger {
        display: none;
    }
}

.pn-bar {
    display: block;
    width: 1.5rem;
    height: 2px;
    background: #272870; /* matches .bg class = #272870 */
    border-radius: 2px;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.pn-bar:first-child {
    margin-bottom: 5px;
}

/* Hamburger → X animation */
.pn-hamburger.pn-open .pn-bar {
    background: #ffffff;
}

.pn-hamburger.pn-open .pn-bar:first-child {
    transform: translateY(3.5px) rotate(45deg);
}

.pn-hamburger.pn-open .pn-bar:last-child {
    transform: translateY(-3.5px) rotate(-45deg);
}

/* --- Mobile Drawer --- */
.pn-mobile-drawer {
    position: fixed;
    top: 0;
    left: 100vw; /* matches original sm-pos = left:100vw */
    width: 100%;
    height: 100vh;
    background: #272870; /* matches original sm-nav bg */
    z-index: 1005;
    display: flex;
    flex-direction: column;
    padding-top: 3rem;
    overflow-y: auto;
    opacity: 0;
    transition: left 0s 0.3s, opacity 0.3s cubic-bezier(.03, .84, .18, 1.01);
}

.pn-mobile-drawer.pn-open {
    left: 0;
    opacity: 1;
    transition: left 0s 0s, opacity 0.3s cubic-bezier(.03, .84, .18, 1.01);
}

/* Drawer inner layout — single column for mobile */
.pn-drawer-inner {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: 1rem 1.5rem 1.5rem 1.5rem;
    max-width: 500px;
    margin: 0 auto;
    width: 100%;
}

/* Left column (Main Links) */
.pn-drawer-left {
    display: flex;
    flex-direction: column;
    width: 100%;
    margin-bottom: auto; /* Pushes the social/footer column down */
}

/* Bottom section (Contact + Socials) */
.pn-drawer-bottom {
    display: flex;
    flex-direction: column;
    width: 100%;
}

.pn-drawer-socials {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 1.25rem;
    width: 100%;
    padding-top: 1rem;
    margin-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Mobile primary links and parent categories */
.pn-mobile-link {
    display: block;
    padding: 0.5rem 0 0.25rem;
    margin-bottom: 1.5rem;
    font-size: 0.85rem;
    font-weight: 700;
    color: #ffffff;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    text-decoration: none;
    transition: color 0.2s ease;
}

.pn-mobile-link-parent {
    display: block;
    padding: 0.5rem 0 0.25rem;
    margin-bottom: 1rem;
    font-size: 0.85rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.3);
    text-transform: uppercase;
    letter-spacing: 0.15em;
    text-decoration: none;
    transition: color 0.2s ease;
}

.pn-mobile-link:hover,
.pn-mobile-link.pn-active {
    color: #ffffff;
}

/* Mobile section headers (for dropdown groups) */
.pn-mobile-group-label {
    display: block;
    padding: 0.75rem 0 0.25rem;
    font-size: 0.8rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.4);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

/* Mobile sub-links */
.pn-mobile-sub-list {
    list-style: none;
    padding: 0;
    margin: 0 0 1.5rem 0;
    border-left: 2px solid rgba(255, 255, 255, 0.1);
}

.pn-mobile-sub-link {
    display: block;
    padding: 0.35rem 0 0.35rem 1.25rem;
    font-size: 1.125rem;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: color 0.2s ease;
}

.pn-mobile-sub-link:hover,
.pn-mobile-sub-link.pn-active {
    color: #ffffff;
}

/* Mobile CTA link */
.pn-mobile-cta-link {
    display: inline-block;
    font-size: 1.125rem;
    font-weight: 500;
    color: #ffffff;
    text-decoration: underline;
    text-decoration-color: #ffbf46;
    text-underline-offset: 4px;
    margin-bottom: 0.25rem;
    transition: color 0.2s ease;
}

.pn-mobile-cta-link:hover {
    color: #ffbf46;
}

/* Social links column */
.pn-mobile-social-link {
    display: block;
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 500;
    transition: color 0.2s ease;
}

.pn-mobile-social-link:hover {
    color: #ffffff;
}

/* Mobile email */
.pn-mobile-email {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1rem;
    color: #ffffff;
    text-decoration: none;
    margin-bottom: 0;
}
.pn-mobile-email img {
    width: 1.25rem !important;
}

/* Body lock */
body.pn-nav-open {
    overflow-y: hidden;
}
