/* =============================================
   CORE WRAPPER
============================================= */
.pfh-container-wrap {
    width: 100%;
    position: relative;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.pfh-container-inner {
    width: 100%;
    margin-left: auto;
    margin-right: auto;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    box-sizing: border-box;
}
.pfh-flex-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    box-sizing: border-box;
    gap: 15px;
    position: relative;
}

/* =============================================
   LOGO
============================================= */
.pfh-logo-wrap { flex-shrink: 0; }
.pfh-logo { display: inline-block; line-height: 0; }
.pfh-logo img { max-width: 100%; height: auto; display: block; }

/* =============================================
   DESKTOP NAV
============================================= */
.pfh-desktop-nav-container { flex-grow: 1; display: block; }
.pfh-desktop-nav {
    display: flex;
    align-items: center;
    box-sizing: border-box;
    position: relative;
}
.pfh-nav-item {
    position: relative;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    box-sizing: border-box;
    overflow: hidden;
}

/* =============================================
   ACTIVE INDICATORS
============================================= */
.pfh-active-shape-dot .pfh-nav-item.is-active::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 50%;
    transform: translateX(-50%);
    width: 6px;
    height: 6px;
    border-radius: 50%;
    transition: all 0.3s ease;
}
.pfh-active-shape-underline .pfh-nav-item.is-active::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 100%;
    height: 2px;
    transition: all 0.3s ease;
}
.pfh-active-shape-pill .pfh-nav-item.is-active {
    background-color: rgba(0, 0, 0, 0.06);
}

/* =============================================
   DESKTOP HOVER ANIMATIONS
============================================= */
/* Underline Slide */
.pfh-anim-underline-slide .pfh-nav-item::before {
    content: '';
    position: absolute;
    bottom: 0; left: 0;
    width: 100%; height: 2px;
    background-color: currentColor;
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.pfh-anim-underline-slide .pfh-nav-item:hover::before {
    transform: scaleX(1);
    transform-origin: left;
}
/* Text Reveal */
.pfh-anim-text-reveal .pfh-reveal-wrapper {
    position: relative;
    display: block;
    height: 1.4em;
    overflow: hidden;
}
.pfh-anim-text-reveal .pfh-text-primary,
.pfh-anim-text-reveal .pfh-text-secondary {
    display: block;
    line-height: 1.4em;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    backface-visibility: hidden;
}
.pfh-anim-text-reveal .pfh-text-secondary {
    position: absolute;
    top: 100%; left: 0;
    width: 100%;
}
.pfh-anim-text-reveal .pfh-nav-item:hover .pfh-text-primary  { transform: translateY(-100%); }
.pfh-anim-text-reveal .pfh-nav-item:hover .pfh-text-secondary { transform: translateY(-100%); }
/* Grow */
.pfh-anim-grow .pfh-nav-item { transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1); }
.pfh-anim-grow .pfh-nav-item:hover { transform: scale(1.08); }

/* =============================================
   CTA BUTTON
============================================= */
.pfh-cta-wrap { flex-shrink: 0; display: block; }
.pfh-cta-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    box-sizing: border-box;
}
.pfh-cta-anim-lift:hover  { transform: translateY(-4px); }
.pfh-cta-anim-scale:hover { transform: scale(1.05); }
.pfh-cta-anim-glow:hover  { box-shadow: 0 0 20px rgba(45, 90, 39, 0.6); }
.pfh-cta-anim-arrow-move:hover .pfh-cta-icon-after svg,
.pfh-cta-anim-arrow-move:hover .pfh-cta-icon-after i { transform: translateX(4px); transition: transform 0.3s ease; }
.pfh-cta-icon-after svg, .pfh-cta-icon-after i { transition: transform 0.3s ease; }

/* =============================================
   PREMIUM TWO-LINE HAMBURGER
============================================= */
.pfh-hamburger {
    display: none;
    background: transparent;
    border: 0px solid transparent;
    cursor: pointer;
    padding: 0;
    box-sizing: border-box;
    z-index: 1000;
    outline: none;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.pfh-hamburger-inner {
    display: flex;
    flex-direction: column;
    width: 28px;
    height: 16px;
    justify-content: space-between;
    align-items: flex-end; /* right aligns the shorter bottom line */
    box-sizing: border-box;
}
.pfh-hamburger-bar {
    display: block;
    height: 3px;
    border-radius: 4px;
    background-color: currentColor;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    transform-origin: right center;
}
.pfh-hamburger-bar-top {
    width: 100%;
}
.pfh-hamburger-bar-bottom {
    width: 70%; /* Slightly shorter than top */
}

/* Hover effect: Expand bottom line to match top */
.pfh-hamb-effect-expand-line:hover .pfh-hamburger-bar-bottom {
    width: 100% !important;
}

/* Other Hover Effects */
.pfh-hamb-effect-scale:hover {
    transform: scale(1.1);
}
.pfh-hamb-effect-lift:hover {
    transform: translateY(-3px);
}
.pfh-hamb-effect-glow:hover {
    box-shadow: 0 0 15px currentColor;
}
.pfh-hamb-effect-background-fade:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

/* =============================================
   MOBILE DROPDOWN PANEL
============================================= */
.pfh-mobile-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin-top: 15px;
    z-index: 995;
    overflow: hidden;
    transform: translateY(-20px) scale(0.95);
    opacity: 0;
    pointer-events: none;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    box-sizing: border-box;
}
.pfh-mobile-dropdown.is-active {
    display: block;
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

/* =============================================
   SINGLE HEADER CLOSE (X) BUTTON
============================================= */
.pfh-close-btn {
    display: none; /* Only visible when mobile dropdown is open */
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 0px solid transparent;
    cursor: pointer;
    min-width: 44px;
    min-height: 44px;
    width: 44px;
    height: 44px;
    padding: 10px;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 1005;
    outline: none;
    box-sizing: border-box;
    overflow: visible;
}
.pfh-close-btn:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 2px;
}
/* X icon drawn with CSS pseudo-elements */
.pfh-close-icon-x {
    position: relative;
    display: block;
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    box-sizing: border-box;
}
.pfh-close-icon-x::before,
.pfh-close-icon-x::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: currentColor;
    border-radius: 2px;
    transition: background-color 0.3s ease;
}
.pfh-close-icon-x::before { transform: translateY(-50%) rotate(45deg); }
.pfh-close-icon-x::after  { transform: translateY(-50%) rotate(-45deg); }

/* =============================================
   MOBILE NAV ITEMS
============================================= */
.pfh-mobile-nav {
    display: flex;
    flex-direction: column;
    gap: 0;
    box-sizing: border-box;
}
.pfh-mobile-nav-item {
    text-decoration: none;
    font-weight: 500;
    font-size: 1.1rem;
    padding: 10px 0;
    border-bottom: none;
    transition: all 0.3s ease;
    display: block;
    box-sizing: border-box;
}

/* Divider — only when .pfh-show-divider is present */
.pfh-show-divider .pfh-mobile-nav-item {
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}
.pfh-show-divider .pfh-mobile-nav-item:last-of-type {
    border-bottom: none;
}

/* =============================================
   MOBILE HOVER ANIMATIONS
============================================= */
/* Slide Right */
.pfh-mob-anim-slide-right .pfh-mobile-nav-item {
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), color 0.3s ease, background-color 0.3s ease;
}
.pfh-mob-anim-slide-right .pfh-mobile-nav-item:hover { transform: translateX(8px); }

/* Slide Left */
.pfh-mob-anim-slide-left .pfh-mobile-nav-item {
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), color 0.3s ease, background-color 0.3s ease;
}
.pfh-mob-anim-slide-left .pfh-mobile-nav-item:hover { transform: translateX(-8px); }

/* Lift */
.pfh-mob-anim-lift .pfh-mobile-nav-item {
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), color 0.3s ease;
}
.pfh-mob-anim-lift .pfh-mobile-nav-item:hover { transform: translateY(-3px); }

/* Zoom */
.pfh-mob-anim-zoom .pfh-mobile-nav-item {
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), color 0.3s ease;
    transform-origin: left center;
}
.pfh-mob-anim-zoom .pfh-mobile-nav-item:hover { transform: scale(1.05); }

/* Underline */
.pfh-mob-anim-underline .pfh-mobile-nav-item {
    position: relative;
    transition: color 0.3s ease;
}
.pfh-mob-anim-underline .pfh-mobile-nav-item::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0;
    width: 0; height: 2px;
    background-color: currentColor;
    transition: width 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.pfh-mob-anim-underline .pfh-mobile-nav-item:hover::after { width: 100%; }

/* Background Fill */
.pfh-mob-anim-background-fill .pfh-mobile-nav-item {
    position: relative;
    overflow: hidden;
    transition: color 0.3s ease;
    z-index: 0;
}
.pfh-mob-anim-background-fill .pfh-mobile-nav-item::before {
    content: '';
    position: absolute;
    inset: 0;
    background-color: rgba(45, 90, 39, 0.08);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: -1;
}
.pfh-mob-anim-background-fill .pfh-mobile-nav-item:hover::before { transform: scaleX(1); }

/* Glow */
.pfh-mob-anim-glow .pfh-mobile-nav-item {
    transition: text-shadow 0.3s ease, color 0.3s ease;
}
.pfh-mob-anim-glow .pfh-mobile-nav-item:hover {
    text-shadow: 0 0 12px currentColor;
}

/* Color Fade */
.pfh-mob-anim-color-fade .pfh-mobile-nav-item {
    transition: color 0.4s ease, opacity 0.4s ease;
}
.pfh-mob-anim-color-fade .pfh-mobile-nav-item:hover { opacity: 0.7; }

/* Letter Spacing */
.pfh-mob-anim-letter-spacing .pfh-mobile-nav-item {
    transition: letter-spacing 0.3s ease, color 0.3s ease;
}
.pfh-mob-anim-letter-spacing .pfh-mobile-nav-item:hover { letter-spacing: 3px; }

/* Border Animation */
.pfh-mob-anim-border-animation .pfh-mobile-nav-item {
    border: 2px solid transparent;
    transition: border-color 0.3s ease, color 0.3s ease, border-radius 0.3s ease;
}
.pfh-mob-anim-border-animation .pfh-mobile-nav-item:hover {
    border-color: currentColor;
    border-radius: 6px;
}

/* Mobile Text Reveal */
.pfh-mob-anim-text-reveal .pfh-mobile-nav-item {
    overflow: hidden;
    position: relative;
    height: 1.5em;
}
.pfh-mob-anim-text-reveal .pfh-mobile-nav-item::before {
    content: attr(data-text);
    position: absolute;
    top: 100%; left: 0;
    width: 100%;
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}
.pfh-mob-anim-text-reveal .pfh-mobile-nav-item > span {
    display: block;
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}
.pfh-mob-anim-text-reveal .pfh-mobile-nav-item:hover > span { transform: translateY(-100%); }
.pfh-mob-anim-text-reveal .pfh-mobile-nav-item:hover::before { transform: translateY(-100%); }

/* =============================================
   MOBILE CTA
============================================= */
.pfh-mobile-cta-btn-wrap {
    margin-top: 15px;
    display: flex;
}
.pfh-mobile-cta-btn-wrap .pfh-cta-btn { width: 100%; }

/* =============================================
   STICKY HEADER
============================================= */
.pfh-container-wrap.is-sticky {
    position: fixed;
    top: 0; left: 0; right: 0;
    width: 100%;
    z-index: 999;
}
body.admin-bar .pfh-container-wrap.is-sticky {
    top: var(--wp-admin--admin-bar--height, 32px);
}
@media screen and (max-width: 782px) {
    body.admin-bar .pfh-container-wrap.is-sticky { top: 46px; }
}

/* Sticky entrance animations */
.pfh-anim-sticky-fade  { animation: pfhFadeIn  0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards; }
.pfh-anim-sticky-slide { animation: pfhSlideDown 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards; }
.pfh-anim-sticky-scale { animation: pfhScaleUp  0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards; }

@keyframes pfhFadeIn   { from { opacity: 0; }                          to { opacity: 1; } }
@keyframes pfhSlideDown { from { transform: translateY(-100%); }        to { transform: translateY(0); } }
@keyframes pfhScaleUp  { from { transform: scale(0.92); opacity: 0; }  to { transform: scale(1); opacity: 1; } }

/* =============================================
   RESPONSIVE BREAKPOINTS
============================================= */
@media (max-width: 767px) {
    .pfh-desktop-nav-container,
    .pfh-cta-wrap { display: none !important; }
    .pfh-hamburger { display: flex; }

    /* Show close button and hide hamburger when open */
    .pfh-hamburger.is-active { display: none !important; }
    .pfh-container-wrap .pfh-close-btn { display: none; }
    .pfh-container-wrap .pfh-hamburger.is-active ~ .pfh-close-btn { display: inline-flex; }
}

/* =============================================
   ACCESSIBILITY — REDUCED MOTION
============================================= */
@media (prefers-reduced-motion: reduce) {
    *, ::before, ::after {
        animation-delay: -1ms !important;
        animation-duration: 1ms !important;
        animation-iteration-count: 1 !important;
        background-attachment: initial !important;
        scroll-behavior: auto !important;
        transition-duration: 0s !important;
        transition-delay: 0s !important;
    }
}
