/**
 * Martin Bleckmann Kanzlei Navigation Stylesheet
 * Refined Corporate Minimalism - Cream background, gold accent, navy text
 */

/* =============================================================================
   VARIABLES & RESET
   ============================================================================= */
:root {
    --pham-navy: #024731;
    --pham-gold: #FDE67D;
    --pham-cream: #F2F5F7;
    --pham-border: rgba(184, 149, 106, 0.2);
    --pham-font: 'Hubot Sans', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.pham-nav-container * {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* Spacer to prevent content from going behind fixed header */
.pham-nav-spacer {
    height: 64px;
}

/* =============================================================================
   MAIN NAVBAR STRUCTURE
   ============================================================================= */
/*.pham-nav-container {*/
/*    position: fixed;*/
/*    top: 0;*/
/*    left: 0;*/
/*    right: 0;*/
/*    z-index: 1000;*/
/*    background-color: rgba(255, 255, 255, 0.98);*/
/*    backdrop-filter: blur(12px);*/
/*    -webkit-backdrop-filter: blur(12px);*/
/*    height: 64px;*/
/*    border-bottom: none;*/
/*    transition: background-color 0.3s ease, border-color 0.3s ease;*/
/*}*/

.pham-nav-container.pham-scrolled {
    border-bottom: 1px solid var(--pham-border);
}

.pham-nav-wrapper {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 2rem;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
}

/* Logo */
.pham-logo-link {
    display: flex;
    align-items: center;
    text-decoration: none;
    flex-shrink: 0;
}

.pham-logo-img {
    height: 40px;
    width: auto;
    display: block;
}

/* =============================================================================
   DESKTOP MENU STYLES
   ============================================================================= */
.pham-desktop-nav-container {
    display: flex;
    align-items: center;
    gap: 1.75rem;
    flex: 1;
}

.pham-desktop-menu-list {
    display: flex;
    align-items: center;
    gap: 1.75rem;
    list-style: none;
    height: 100%;
}

.pham-menu-item {
    position: relative;
    display: inline-block;
}

/* Standard link and mega trigger button */
.pham-nav-link,
.pham-mega-trigger {
    font-family: var(--pham-font);
    font-size: 0.8125rem;
    color: #333;
    background: none;
    border: none;
    cursor: pointer;
    letter-spacing: 0.01em;
    padding: 6px 0;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    text-decoration: none;
    position: relative;
    transition: color 0.22s cubic-bezier(0.23, 1, 0.32, 1), transform 0.22s cubic-bezier(0.23, 1, 0.32, 1);
}

.pham-nav-link:hover,
.pham-mega-trigger:hover,
.pham-menu-item.pham-active .pham-nav-link {
    color: var(--pham-navy);
}

/* Underline wipe transition */
.pham-underline-wipe {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 100%;
    height: 1.5px;
    background-color: var(--pham-navy);
    transition: right 0.35s cubic-bezier(0.23, 1, 0.32, 1);
}

.pham-menu-item.pham-active .pham-underline-wipe {
    background-color: var(--pham-gold);
    right: 0%;
}

.pham-nav-link:hover .pham-underline-wipe,
.pham-mega-trigger:hover .pham-underline-wipe,
.pham-menu-item.pham-hovered .pham-mega-trigger .pham-underline-wipe {
    right: 0%;
}

.pham-arrow-icon {
    transition: transform 0.2s ease;
}

.pham-menu-item.pham-hovered .pham-arrow-icon {
    transform: rotate(180deg);
}

.pham-menu-item.pham-hovered .pham-mega-trigger {
    color: var(--pham-navy);
}

/* =php CTA Button = */
.pham-cta-container {
    margin-left: auto;
    flex-shrink: 0;
}

.pham-btn-outline {
    font-family: var(--pham-font);
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--pham-navy);
    text-decoration: none;
    border: 1px solid var(--pham-gold);
    border-radius: 4px;
    padding: 0.45rem 1.25rem;
    display: inline-block;
    position: relative;
    overflow: hidden;
    background: transparent;
    z-index: 1;
    transition: color 0.35s cubic-bezier(0.23, 1, 0.32, 1);
    letter-spacing: 0.01em;
}

.pham-btn-wipe {
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    width: 0;
    background-color: var(--pham-gold);
    z-index: -1;
    transition: width 0.35s cubic-bezier(0.23, 1, 0.32, 1);
}

.pham-btn-outline:hover {
    color: #fff;
}

.pham-btn-outline:hover .pham-btn-wipe {
    width: 100%;
}

/* =============================================================================
   MEGA MENU OVERLAY (DESKTOP)
   ============================================================================= */
.pham-mega-overlay {
    position: fixed;
    top: 64px;
    z-index: 999;
    background-color: var(--pham-cream);
    border: 1px solid rgba(184, 149, 106, 0.25);
    border-top: 2.5px solid var(--pham-navy);
    border-radius: 0 0 4px 4px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
    display: none; /* Controlled by JS classes */
    animation: phamFadeIn 0.2s cubic-bezier(0.23, 1, 0.32, 1);
    min-width: 620px;
    max-width: 860px;
}

.pham-mega-overlay.pham-open {
    display: block;
}

.pham-mega-overlay-wrapper {
    display: flex;
    padding: 1.75rem 2rem;
    gap: 3rem;
    width: 100%;
}

@keyframes phamFadeIn {
    from { opacity: 0; transform: translateY(4px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Left Panel - Level 1 list */
.pham-mega-left-col {
    min-width: 250px;
    max-width: 300px;
    display: flex;
    flex-direction: column;
}

.pham-mega-l1-item {
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    border-bottom: 1px solid var(--pham-gold);
    padding: 0.75rem 0.75rem 0.75rem 0.5rem;
    cursor: pointer;
    z-index: 1;
    transition: padding-left 0.25s ease;
}

.pham-gold-wipe {
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    width: 0;
    background-color: var(--pham-gold);
    transition: width 0.3s cubic-bezier(0.23, 1, 0.32, 1);
    z-index: -1;
}

.pham-mega-l1-item:hover .pham-gold-wipe,
.pham-mega-l1-item.pham-active .pham-gold-wipe {
    width: 100%;
}

.pham-mega-l1-text,
.pham-mega-l1-link {
    font-family: var(--pham-font);
    font-size: 0.9375rem;
    font-weight: 300;
    color: var(--pham-navy);
    transition: color 0.25s ease-out;
    letter-spacing: 0.01em;
    text-decoration: none;
    display: block;
    width: 100%;
}

.pham-mega-l1-item:hover .pham-mega-l1-text,
.pham-mega-l1-item.pham-active .pham-mega-l1-text,
.pham-mega-l1-item:hover .pham-mega-l1-link,
.pham-mega-l1-item.pham-active .pham-mega-l1-link {
    color: #fff;
}

.pham-chevron-icon {
    position: relative;
    z-index: 2;
    flex-shrink: 0;
    transition: transform 0.25s ease;
}

.pham-chevron-icon path {
    stroke: var(--pham-gold);
    transition: stroke 0.25s ease;
}

.pham-mega-l1-item:hover .pham-chevron-icon path,
.pham-mega-l1-item.pham-active .pham-chevron-icon path {
    stroke: #fff;
}

.pham-mega-l1-item:hover .pham-chevron-icon {
    transform: translateX(2px);
}

/* Right Panel - Level 2 Display panels */
.pham-mega-right-col {
    flex: 1;
    min-width: 320px;
}

.pham-mega-l2-panel {
    animation: phamFadeIn 0.3s ease-out;
}

.pham-panel-title {
    font-family: var(--pham-font);
    font-size: 0.6875rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--pham-navy);
    margin-bottom: 1.25rem;
    font-weight: 600;
    opacity: 0.7;
}

.pham-panel-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 2rem;
}

.pham-panel-subcol {
    display: flex;
    flex-direction: column;
}

.pham-mega-l2-link {
    font-family: var(--pham-font);
    display: block;
    font-size: 0.875rem;
    font-weight: 300;
    color: var(--pham-navy);
    text-decoration: none;
    padding: 0.65rem 0;
    border-bottom: 1px solid var(--pham-gold);
    transition: padding-left 0.2s ease-out, opacity 0.2s;
}

.pham-mega-l2-link:hover {
    padding-left: 0.5rem;
    opacity: 0.7;
}

/* =============================================================================
   MOBILE HAMBURGER & OFF-CANVAS
   ============================================================================= */
.pham-mobile-hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 36px;
    height: 36px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
    z-index: 1010;
}

.pham-bar {
    display: block;
    width: 20px;
    height: 1.5px;
    background-color: #333;
    transition: transform 0.25s ease, opacity 0.25s ease;
}

/* Hamburger open state */
.pham-mobile-hamburger.pham-open .pham-bar:nth-child(1) {
    transform: rotate(45deg) translate(4px, 4px);
}

.pham-mobile-hamburger.pham-open .pham-bar:nth-child(2) {
    opacity: 0;
}

.pham-mobile-hamburger.pham-open .pham-bar:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* Mobile Off-canvas Drawer */
.pham-mobile-drawer {
    position: fixed;
    top: 64px;
    left: 0;
    right: 0;
    background-color: rgba(255, 255, 255, 0.99);
    z-index: 998;
    overflow-y: auto;
    max-height: 0;
    transition: max-height 0.3s cubic-bezier(0.23, 1, 0.32, 1);
    border-top: none;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.pham-mobile-drawer.pham-open {
    max-height: calc(100vh - 64px);
    border-top: 1px solid #e0dbd4;
}

.pham-mobile-drawer-inner {
    padding: 1.25rem 2rem 2.5rem;
}

.pham-mobile-menu-list {
    list-style: none;
    display: flex;
    flex-direction: column;
}

.pham-mobile-menu-item {
    border-bottom: 1px solid #e0dbd4;
}

.pham-mobile-link,
.pham-mobile-item-title {
    font-family: var(--pham-font);
    font-size: 0.9rem;
    color: #333;
    text-decoration: none;
    padding: 0.85rem 0;
    display: block;
}

.pham-mobile-trigger-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
}

.pham-mobile-arrow-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pham-mobile-arrow-svg {
    transition: transform 0.25s ease;
}

.pham-mobile-menu-item.pham-open > .pham-mobile-trigger-wrapper .pham-mobile-arrow-svg {
    transform: rotate(180deg);
}

/* Mobile Submenus (nested ul) */
.pham-mobile-submenu {
    list-style: none;
    padding-left: 1.25rem;
    margin-bottom: 0.5rem;
}

.pham-mobile-submenu .pham-mobile-link {
    font-size: 0.8125rem;
    color: #555;
    padding: 0.65rem 0;
    border-bottom: 1px solid #f0ebe4;
}

.pham-mobile-submenu .pham-mobile-submenu .pham-mobile-link {
    font-size: 0.75rem;
    color: #777;
    border-bottom: 1px solid #F2F5F7;
}

.pham-mobile-cta-wrapper {
    margin-top: 1.5rem;
}

.pham-btn-mobile {
    display: flex;
    justify-content: center;
    width: 100%;
    text-align: center;
}

/* =============================================================================
   RESPONSIVE MEDIA QUERIES
   ============================================================================= */
@media (max-width: 768px) {
    .pham-desktop-nav-container,
    .pham-cta-container {
        display: none;
    }

    .pham-mobile-hamburger {
        display: flex;
    }
}
