.local-nav {
    width: 100%;
    box-sizing: border-box;
    border-bottom: 1px solid rgba(255 255 255 / 10%);
    max-height: 64px;
    position: relative;
    z-index: 10;
}

body.drawer-open {
    overflow: hidden;
    position: fixed;
    width: 100%;
}

.drawer-link-wrapper {
    width: 100%;
}

/* CHANGE: Update local-nav-container positioning */
.local-nav-container {
    z-index: 8 !important;
    position: sticky;
    top: 0; /* CHANGE: Will be dynamically set based on header height */
    height: auto; /* CHANGE: Allow natural height */
    background: transparent !important;
    box-shadow: none !important;
    overflow: visible !important;
}

.aem-AuthorLayer-Edit .local-nav-wrapper[data-duplicate-nav="true"],
.aem-AuthorLayer-Developer .local-nav-wrapper[data-duplicate-nav="true"] {
    position: relative;
}

.aem-AuthorLayer-Edit .local-nav-wrapper[data-duplicate-nav="true"]::before,
.aem-AuthorLayer-Developer
    .local-nav-wrapper[data-duplicate-nav="true"]::before {
    content: "Duplicate Navigation - Edit Original";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255 165 0 / 20%);
    padding: 4px;
    text-align: center;
    font-size: 12px;
    z-index: 1;
}

/* Default (Dark Blue Theme) */
.local-nav-default {
    background-color: #002c5f;
    color: #fff;
}

.local-nav-red {
    background-color: #de3112;
    color: #fff;
}

.local-nav-light {
    background-color: #fff;
    color: #002c5f;
}

.local-nav-wrapper {
    display: flex;
    gap: 64px;
    margin: 0 auto;
    height: 64px;
    overflow: visible !important;
    position: relative;
}

.local-nav-title {
    display: flex;
    align-items: center;
    font-family: "HyundaiSansHead-Medium";
    font-weight: 500;
    font-size: 20px;
    line-height: 28px;
    white-space: nowrap;
}

.local-nav-mobile {
    display: none;
}

.local-nav-mobile-toggle {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    background: transparent;
    border: none;
    cursor: pointer;
    color: #fff;
    font-family: "HyundaiSansHead-Medium";
    font-size: 16px;
    font-style: normal;
    font-weight: 500;
    line-height: 20px;
}

.local-nav-light .local-nav-mobile-toggle {
    color: #002c5f;
}

.selected-tab {
    margin-right: 4px;
}

.local-nav-mobile-toggle .icon-chevron-down {
    font-size: 20px;
    transition: transform 0.3s ease;
}

.local-nav-mobile-toggle.active .icon-chevron-down {
    transform: rotate(180deg);
}

.local-nav-links {
    display: flex;
    gap: 24px;
    align-items: center;
    scrollbar-width: none;
    justify-content: center;
    flex: 1 0 0;
    align-self: stretch;
    overflow: visible !important;
    position: relative;
}

.local-nav-links::-webkit-scrollbar {
    display: none;
}

.local-nav[data-layout="left"] .local-nav-links {
    justify-content: flex-start;
}

.local-nav-link {
    font-family: "HyundaiSansHead-Regular";
    font-weight: 400;
    font-size: 16px;
    line-height: 20px;
    padding: 22px 4px;
    color: inherit;
    text-decoration: none;
    white-space: nowrap;
    position: relative;
    display: flex;
    min-width: 44px;
    justify-content: center;
    align-items: center;
    align-self: stretch;
}

.local-nav-link.active {
    font-weight: 500;
    font-family: "HyundaiSansHead-Medium";
}

.local-nav-default .local-nav-link.active::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    border-bottom: 3px solid #00a2c7;
}

.local-nav-red .local-nav-link.active::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    border-bottom: 3px solid #de3112;
}

.local-nav-light .local-nav-link.active::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background-color: #00a2c7;
}

.local-nav-cta {
    display: flex;
    gap: 16px;
    align-items: center;
}

/* CHANGE: More dropdown styles - ensure proper stacking and positioning */
.more-dropdown {
    position: relative;
    display: flex;
    align-items: center;
    z-index: 1001;
}

.more-button {
    font-family: "HyundaiSansHead-Regular";
    font-weight: 400;
    font-size: 16px;
    line-height: 20px;
    padding: 22px 4px;
    color: inherit;
    background: transparent;
    border: none;
    cursor: pointer;
    white-space: nowrap;
    position: relative;
    display: flex;
    min-width: 44px;
    justify-content: center;
    align-items: center;
    align-self: stretch;
    gap: 4px;
}

.more-button .icon-chevron-down {
    font-size: 16px;
    transition: transform 0.3s ease;
}

.more-button[aria-expanded="true"] .icon-chevron-down {
    transform: rotate(180deg);
}

.more-button:hover,
.more-button[aria-expanded="true"] {
    font-weight: 500;
    font-family: "HyundaiSansHead-Medium";
}

/* CHANGE: More menu styling with proper z-index and positioning - Updated to match Figma design */
.more-menu {
    position: absolute;
    top: 100%;
    left: 130%;
    transform: translateX(-50%);
    min-width: 180px;
    background: #FFF; /* CHANGE: Using exact white from Figma fill_19EDY5 */
    border: 1px solid #DAD9D8; /* CHANGE: Using exact border color from Figma stroke_MS64PA */
    border-radius: 4px;
    box-shadow: 0 4px 8px rgba(0 0 0 / 10%);
    z-index: 9999;
    display: none;
    margin-top: 1px;
    visibility: hidden;
    padding: 24px 48px 24px 16px;
}

.more-menu.show {
    display: flex;
    flex-direction: column !important;
    visibility: visible;
}

.more-menu-item {
    display: block;
    padding: 12px 0 12px 16px;
    color: #002C5F; /* CHANGE: Using exact text color from Figma fill_FL9K61 */
    text-decoration: none;
    font-family: "HyundaiSansHead-Regular";
    font-weight: 400;
    font-size: 16px;
    line-height: 1.25em;
    border-left: 1px solid #DAD9D8;
    border-bottom: none;
    transition: background-color 0.2s ease, border-left-color 0.2s ease;
    position: relative;
    gap: 8px;
    align-items: center;
    align-self: stretch;
}

.more-menu-item:last-child {
    border-bottom: none;
}

/* CHANGE: Active state using Figma stroke_D4THBM for accent color */
.more-menu-item.active {
    font-weight: 500;
    font-family: "HyundaiSansHead-Medium";
    border-left: 3px solid #00A2C7;
}

/* CHANGE: Theme-specific more menu styles with proper left border colors */
.local-nav-red .more-menu-item:hover,
.local-nav-red .more-menu-item:focus {
    background-color: #fef2f2;
    border-left-color: #de3112;
}

.local-nav-light .more-menu-item {
    color: #002C5F; /* CHANGE: Maintain Figma text color */
}

.local-nav-light .more-menu-item:hover,
.local-nav-light .more-menu-item:focus {
    background-color: #f8fafc;
    border-left-color: #00A2C7; /* CHANGE: Use Figma accent color */
}

/* CHANGE: Active state for more button when dropdown is open */
.more-button[aria-expanded="true"]::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
}

.local-nav-default .more-button[aria-expanded="true"]::after {
    background-color: #00A2C7; /* CHANGE: Use Figma accent color */
}

.local-nav-red .more-button[aria-expanded="true"]::after {
    background-color: #de3112;
}

.local-nav-light .more-button[aria-expanded="true"]::after {
    background-color: #00A2C7; /* CHANGE: Use Figma accent color */
}

.local-nav-backdrop {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh; /* CHANGE: Full height coverage */
    background: rgba(0 0 0 / 50%);
    z-index: 999; /* CHANGE: Just below drawer */
    opacity: 0;
    transition: opacity 0.3s ease-in-out; /* CHANGE: Smooth fade animation */
}

.local-nav-backdrop.show {
    display: block;
    opacity: 1; /* CHANGE: Fade in backdrop */
}

/* CHANGE: Update drawer positioning to match other drawers */
.local-nav-drawer {
    display: none;
    position: fixed;
    top: 0; /* CHANGE: Start from top, will be dynamically adjusted */
    left: 0;
    width: 100%;
    padding: 0;
    z-index: 1000; /* CHANGE: Higher z-index to match other drawers */
    background-color: #fff;
    color: #000;
    flex-direction: column;
    overflow: hidden; 
    bottom: 0;
    height: 100vh; /* CHANGE: Full viewport height initially */
    transform: translateY(100%); /* CHANGE: Start hidden below viewport */
    transition: transform 0.3s ease-in-out; /* CHANGE: Smooth slide animation */
}

.local-nav-drawer.show {
    display: flex;
    transform: translateY(0); /* CHANGE: Slide in from bottom */
}

.drawer-links {
    display: flex;
    flex-direction: column;
    padding: 16px;
    align-items: flex-start;
    flex: 1 0 0;
    align-self: stretch;
    overflow: hidden auto;
    -webkit-overflow-scrolling: touch;
    min-height: 0; 
    max-height: 100%;
    position: relative;
    scrollbar-width: thin;
    scrollbar-color: #dad9d8 transparent;
}

.drawer-links::-webkit-scrollbar {
    width: 8px;
}

.drawer-links::-webkit-scrollbar-track {
    background: transparent;
}

.drawer-links::-webkit-scrollbar-thumb {
    background-color: #dad9d8;
    border-radius: 4px;
}

.drawer-links::-webkit-scrollbar-thumb:hover {
    background-color: #c0bfbe;
}

.drawer-link {
    display: block;
    padding: 16px 0 16px 40px;
    color: #002c5f;
    text-decoration: none;
    font-family: "HyundaiSansHead-Regular";
    font-size: 16px;
    line-height: 1.25;
    position: relative;
    border-left: 1px solid #dad9d8;
}

.drawer-link.active {
    font-weight: 500;
    border-left: none;
}

.drawer-link.active::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
}

.local-nav-red ~ .local-nav-drawer .drawer-link.active::before {
    background-color: #de3112;
}

.local-nav-default ~ .local-nav-drawer .drawer-link.active::before,
.local-nav-light ~ .local-nav-drawer .drawer-link.active::before {
    background-color: #00a2c7;
}

.drawer-buttons {
    padding: 24px 40px;
    display: flex;
    gap: 16px;
    align-items: center;
    justify-content: flex-end;
    background: #fff;
    flex-shrink: 0;
    position: sticky;
    bottom: 0;
    z-index: 1;
}

.local-nav-button {
    height: 48px;
    padding: 16px 24px;
    font-family: "HyundaiSansHead-Medium";
    font-weight: 500;
    font-size: 16px;
    line-height: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 140px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.local-nav .local-nav-button.outline {
    background: transparent;
    border: 1px solid #fff;
    color: #fff;
}

.local-nav.local-nav-light .local-nav-button.outline {
    background: transparent;
    border: 1px solid #002c5f;
    color: #002c5f;
}

.local-nav.local-nav-default .local-nav-button.solid {
    background: #fff;
    color: #000;
}

.local-nav.local-nav-red .local-nav-button.solid {
    background: #fff;
    color: #000;
}

.local-nav.local-nav-light .local-nav-button.solid {
    background: #002c5f;
    color: #fff;
}

/* Drawer button styles - separate from nav styles */
.local-nav-drawer .local-nav-button.outline {
    background: transparent;
    border: 1px solid #002c5f;
    color: #002c5f;
}

.local-nav-drawer .local-nav-button.solid {
    background: #002c5f;
    color: #fff;
}

/* Theme-specific drawer button overrides */
.local-nav-red ~ .local-nav-drawer .local-nav-button.outline {
    border-color: #de3112;
    color: #de3112;
}

.local-nav-red ~ .local-nav-drawer .local-nav-button.solid {
    background: #de3112;
    color: #fff;
}

.local-nav-heading-wrapper {
    position: absolute;
    width: auto;
    height: auto !important;
    padding: 0;
    margin: auto ;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.aem-AuthorLayer-Edit .local-nav-heading-wrapper,
.aem-AuthorLayer-Developer .local-nav-heading-wrapper,
.aem-AuthorLayer-Preview .local-nav-heading-wrapper {
    position: static;
    width: auto;
    height: auto;
    overflow: visible;
    clip: auto;
    white-space: normal;
    border: initial;
    background: rgba(0 0 0 / 5%);
    margin: 10px 0;
    padding: 10px;
}

.aem-GridColumn:not(.aem-GridColumn--default--hide)
    > .local-nav-heading-wrapper:not(.aem-GridColumn--default--hide) {
    display: block;
}

@supports (-webkit-touch-callout: none) {
    /* iOS only */
    .local-nav-drawer {
        position: fixed;
        bottom: env(safe-area-inset-bottom, 0);
        padding-bottom: env(safe-area-inset-bottom, 0);
    }
    
    .drawer-buttons {
        padding-bottom: calc(16px + env(safe-area-inset-bottom, 0));
    }
}

/* Samsung Internet Browser fix */
@supports (-webkit-appearance: none) and (not (-ms-ime-align: auto)) {
    .local-nav-drawer.show {
        height: calc(100% - var(--drawer-top-offset, 133px));
    }
}

/* CHANGE: Desktop styles - Above 1024px */
@media (min-width: 1025px) {
    .local-nav-mobile,
    .local-nav-drawer {
        display: none;
    }

    .local-nav-links {
        display: flex;
        overflow: visible !important;
    }

    .local-nav.desktop-view .local-nav-links {
        display: flex;
        overflow: visible !important;
    }

    .local-nav.mobile-view .local-nav-links {
        display: none;
    }

    .local-nav.mobile-view .local-nav-mobile {
        display: flex;
    }

    .local-nav.desktop-view .local-nav-mobile {
        display: none;
    }

    .drawer-links {
        padding: 16px 80px;
    }

    .drawer-buttons {
        padding: 24px 80px;
    }
}

/* CHANGE: Tablet styles - 768px to 1024px */
@media (min-width: 768px) and (max-width: 1024px) {
    .local-nav-title {
        font-size: 20px;
        line-height: 28px;
    }

    .drawer-link {
        align-items: center;
        gap: 8px;
        align-self: stretch;
        overflow: hidden;
        text-overflow: ellipsis;
        font-size: 20px;
        font-weight: 400;
        line-height: 28px;
        padding: 16px 0 16px 16px;
    }

    .local-nav-wrapper {
        gap: 32px;
        height: 64px;
        justify-content: space-between;
        overflow: visible !important;
    }

    .local-nav-mobile {
        display: flex;
        justify-content: flex-end;
        width: 100%;
    }

    .local-nav-links {
        display: none;
    }

    .local-nav-cta {
        display: none;
    }

    .local-nav-drawer.show {
        display: flex;
    }

    .local-nav.desktop-view .local-nav-links {
        display: flex;
        overflow: visible !important;
    }

    .local-nav.mobile-view .local-nav-links {
        display: none;
    }

    .local-nav.mobile-view .local-nav-mobile {
        display: flex;
    }

    .local-nav.desktop-view .local-nav-mobile {
        display: none;
    }

    .local-nav-mobile-toggle {
        gap: 12px;
    }

    .drawer-links {
        padding: 16px 40px;
    }

    .drawer-buttons {
        padding: 24px 40px;
    }

    /* CHANGE: More menu positioning for tablet */
    .more-menu {
        min-width: 160px;
        left: 0;
        transform: none;
    }
}

/* CHANGE: Mobile styles - Up to 767px */
@media (max-width: 767px) {
    .local-nav {
        max-height: 56px;
    }

    .drawer-links {
        padding: 16px;
    }

    .drawer-links,
    .drawer-buttons {
        padding: 16px;
    }

    .drawer-buttons {
        gap: 12px;
        justify-content: center;
    }

    .local-nav-button {
        width: 100%;
        padding: 12px 16px;
    }

    .local-nav-title {
        font-size: 20px;
        line-height: 28px;
    }

    .drawer-link {
        align-items: center;
        gap: 8px;
        align-self: stretch;
        overflow: hidden;
        text-overflow: ellipsis;
        font-size: 20px;
        font-weight: 400;
        line-height: 28px;
        padding: 16px 0 16px 16px;
    }

    .local-nav-wrapper {
        gap: 32px;
        height: 64px;
        justify-content: space-between;
        overflow: visible !important;
    }

    .local-nav-mobile {
        display: flex;
        justify-content: flex-end;
        width: 100%;
    }

    .local-nav-links {
        display: none;
    }

    .local-nav-cta {
        display: none;
    }


    .local-nav-drawer.show {
        display: flex;
    }

    .local-nav.desktop-view .local-nav-links {
        display: flex;
        overflow: visible !important;
    }

    .local-nav.mobile-view .local-nav-links {
        display: none;
    }

    .local-nav.mobile-view .local-nav-mobile {
        display: flex;
    }

    .local-nav.desktop-view .local-nav-mobile {
        display: none;
    }

    .local-nav-mobile-toggle {
        gap: 12px;
    }

    /* CHANGE: More menu positioning for mobile */
    .more-menu {
        min-width: 140px;
        left: 0;
        transform: none;
        font-size: 12px;
    }

    .more-menu-item {
        padding: 10px 12px;
        font-size: 12px;
    }
}