/* Header Styles */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    height: calc(5rem + env(safe-area-inset-top)); /* 132px mobile, 3.25rem padding top safe area  */
    backdrop-filter: blur(65px);
    -webkit-backdrop-filter: blur(65px);
    background: rgba(255, 255, 255, 0.1);
    z-index: 1000;
    color: var(--SyFu-Neutral-light);
    font-family: "Barlow", sans-serif;
    font-weight: 700;
    font-style: normal;
    font-size: 0.875rem; /* 14px */
    line-height: 1.75rem; /* 28px */
    transition: all 0.1s linear; /* Smooth transition */

}

/* Keyframe for top-to-bottom sliding animation */
@keyframes slideDown {
    from {
        transform: translateY(-100%); /* Start above */
        opacity: 0;                  /* Hidden */
    }
    to {
        transform: translateY(0);     /* In place */
        opacity: 1;                  /* Visible */
    }
}

/* Keyframe for header-right revealing from top to bottom */
@keyframes revealDown {
    from {
        clip-path: inset(0 0 100% 0); /* Hidden - clipped from bottom */
        opacity: 1;
    }
    to {
        clip-path: inset(0 0 0 0);     /* Fully visible */
        opacity: 1;
    }
}

.header.nav-open {
    height: auto; /* Not full height */
    background: #1a1a2e; /* Navy background */
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    padding-bottom: 2rem; /* Add space for buttons */
    /* Use keyframe animation for header expansion */
    animation: background 0.05s ease-in forwards;
    transform-origin: top;
}

.header-content {
    width: calc( 100% - 1.5rem); /* 25.5rem -408px mobile */
    height: 3.5rem; /* 56px mobile */
    margin: calc(0.75rem + env(safe-area-inset-top)) auto 0.75rem auto; /* 64px top, 12px bottom, centered */
    display: flex;
    flex-direction: row; /* Always horizontal layout */
    align-items: center;
    justify-content: space-between;
}

.header.nav-open .header-content {
    flex-direction: column; /* Change to column when nav is open */
     /*   align-items: flex-start; /* Keep header-left aligned to left */

    /*width: calc(100% - 2.5rem); /* Full width minus margins */
    /*max-width: none;
    margin: 4rem 1.25rem 0.75rem 1.25rem; /* Use side margins */
   /* gap: 1rem;*/
}

/* Header Left Section */
.header-left {
    display: flex;
    align-items: center;
    justify-content: space-between; /* Logo-lang group left, hamburger right */
    width: 100%;
}

.logo-lang-group {
    display: flex;
    align-items: center;
    gap: 1rem; /* Space between logo and language */
}

.logo {
    display: flex;
    align-items: center;
}

.logo-img {
    height: 32px;
    width: auto;
}

/* Language Selector - Mobile Dropdown */
.language-selector {
    position: relative;
}

.lang-dropdown {
    position: relative;
}

/* Closed state - Mobile */
.lang-current {
    display: flex;
    padding: 0.375rem; /* 6px */
    flex-direction: column;
    align-items: center;
    gap: 0.375rem; /* 6px */
    border-radius: 1.5rem; /* 24px */
    border: 1px solid rgba(255, 255, 255, 0.10);
    background: transparent;
    cursor: pointer;
}

.lang-current .lang-text {
    display: flex;
    padding: 0.25rem 0.875rem; /* 4px 14px */
    align-items: center;
    gap: 0.375rem; /* 6px */
    border-radius: 1.875rem; /* 30px */
    background: rgba(255, 255, 255, 0.10);
    color: var(--sy-fu-neutral-light, #F7F7F7);
    font-family: Inter;
    font-size: 0.875rem; /* 14px */
    font-style: normal;
    font-weight: 400;
    line-height: 1.75rem; /* 28px - 200% */
    position: relative;
}

/* Add icons with pseudo-elements */
.lang-current .lang-text::before {
    content: '';
    width: 1rem; /* 16px */
    height: 1rem; /* 16px */
    background-image: url('../../../../assets/img/product/header/world.svg');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

.lang-current .lang-text::after {
    content: '';
    width: 1rem; /* 16px */
    height: 1rem; /* 16px */
    background-image: url('../../../../assets/img/product/header/down-arrow.svg');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    /* Removed transition for instant arrow rotation */
}

/* Dropdown menu positioned to overlay and expand the container */
.lang-dropdown-menu {
    position: absolute;
    top: 0;
    left: 0;
    display: none;
    padding: 0.375rem; /* 6px */
    flex-direction: column;
    align-items: center;
    gap: 0.375rem; /* 6px */
    border-radius: 1.5rem; /* 24px */
    background: rgba(255, 255, 255, 0.10);
    backdrop-filter: blur(10px);
    z-index: 1000;
    min-width: 100%; /* Ensure it covers the original button */
}

/* Hide the original button when dropdown is open */
.lang-dropdown.open .lang-current:not(.lang-dropdown-menu .lang-current) {
    opacity: 0;
    pointer-events: none;
}

.lang-dropdown-menu.open {
    display: inline-flex;
}

/* EN button in expanded dropdown - with icons */
.lang-dropdown-menu .lang-current-expanded {
    display: flex;
    padding: 0.25rem 0.875rem; /* 4px 14px - same as original */
    align-items: center;
    gap: 0.375rem; /* 6px */
    border-radius: 1.875rem; /* 30px */
    background: rgba(255, 255, 255, 0.10);
    border: none;
    cursor: pointer;
}

.lang-current-expanded .lang-text {
    display: flex;
    align-items: center;
    gap: 0.375rem; /* 6px */
    color: var(--sy-fu-neutral-light, #F7F7F7);
    font-family: Inter;
    font-size: 0.875rem; /* 14px */
    font-style: normal;
    font-weight: 400;
    line-height: 1.75rem; /* 28px - 200% */
    position: relative;
}

/* Add icons to expanded EN button */
.lang-current-expanded .lang-text::before {
    content: '';
    width: 1rem; /* 16px */
    height: 1rem; /* 16px */
    background-image: url('../../../../assets/img/product/header/world.svg');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

.lang-current-expanded .lang-text::after {
    content: '';
    width: 1rem; /* 16px */
    height: 1rem; /* 16px */
    background-image: url('../../../../assets/img/product/header/down-arrow.svg');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    transform: rotate(180deg); /* Always rotated in expanded state */
}

/* When dropdown is open, rotate the original button's arrow */
.lang-dropdown.open .lang-current .lang-text::after {
    transform: rotate(180deg);
}

/* JP Option appears within the expanded container */
.lang-dropdown-menu .lang-option {
    display: flex;
    padding: 0.25rem 1.125rem; /* 4px 18px */
    justify-content: center;
    align-items: center;
    gap: 0.625rem; /* 10px */
    align-self: stretch;
    border-radius: 1.875rem; /* 30px */
    background: transparent;
    border: none;
    cursor: pointer;
    margin: 0; /* No additional margin */
}

.lang-dropdown-menu .lang-option .lang-text {
    color: var(--sy-fu-neutral-light, #F7F7F7);
    font-family: Inter;
    font-size: 0.875rem; /* 14px */
    font-style: normal;
    font-weight: 400;
    line-height: 1.75rem; /* 28px - 200% */
}

.lang-dropdown-menu .lang-option:hover {
    background: rgba(255, 255, 255, 0.05);
}

/* Header Right Section */
.header-right {
    display: none; /* Hidden by default on mobile */
}

/* Hamburger in header-left */
.hamburger-btn {
    display: flex; /* Visible by default on mobile */
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    width: 2.407rem; /* 38.505px */
    height: 1.866rem; /* 29.856px */
    position: relative;
}

/* When nav is open: show header-right below header-left */

.header.nav-open .header-right {
    display: flex; /* Show the container immediately for background */
    flex-direction: column;
    width: 100vw;
    padding: 34px 0 24px 0;
    background: #1a1a2e; /* Navy background */
    border-radius: 0;
    align-items: center; /* Center nav buttons */
    /* Use clip-path animation to reveal from top to bottom */
    animation: revealDown 0.1s ease-out forwards;
    animation-delay: 0.05s; /* Start after header completes */
    /* Initially clipped */
    clip-path: inset(0 0 100% 0);
}

.header-right .nav-buttons {
    display: flex; /* Default display */
    flex-direction: column-reverse; /* Reversed order */
    gap: 0.9375rem;
    align-items: center; /* Center nav buttons */
    width: 100%;
    /* No separate animation - slides with container */
}

.header.nav-open .header-right .nav-buttons {
    /* Buttons are visible as part of the container animation */
}

/* Mobile dropdown menu button color fixes */
.header.nav-open .header-right .nav-buttons .white-btn {
    color: var(--sy-fu-neutral-light, #F7F7F7);
    border-color: var(--sy-fu-neutral-light, #F7F7F7);
}

.hamburger-icon,
.close-icon {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* Default state: show hamburger, hide close */
.hamburger-icon {
    display: block;
}

.close-icon {
    display: none;
}

/* Active state: hide hamburger, show close */
.hamburger-btn.active .hamburger-icon {
    display: none;
}

.hamburger-btn.active .close-icon {
    display: block;
}


.nav-btn {
    border: none;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--SyFu-Neutral-light);

}

.text-btn {
    background: none;
    color: var(--SyFu-Neutral-light);
    padding: 8px 0;
}

.text-btn:hover {
    color: var(--SyFu-Dark);
}

.circular-btn {
    padding: 7px 20px;
    justify-content: center;
    align-items: center;
    border-radius: 30px;
}

.white-btn {
    background: transparent;
    color: var(--SyFu-Neutral-light);
    border: 1px solid var(--SyFu-Neutral-light);
}

.white-btn:hover {
    background: var(--SyFu-Dark);
    color: white;
}

.gradient-btn {
    background: var(--Grad-full, radial-gradient(124.2% 56.39% at 100% 100%, #FFF 0%, rgba(255, 255, 255, 0.00) 100%), radial-gradient(100.18% 100.18% at -33.11% -21.62%, #FFF 0%, rgba(255, 255, 255, 0.00) 100%), linear-gradient(221deg, #9AF9FF 5.62%, #FF8 104.83%));
    color: #000;
    border: none;
}

.gradient-btn:hover {
    background: var(--SyFu-Neutral-light);
}

/* Hamburger Menu - duplicate styles removed (using styles from line 275) */

.hamburger-icon,
.close-icon {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* Default state: show hamburger, hide close */
.hamburger-icon {
    display: block;
}

.close-icon {
    display: none;
}

/* Active state: hide hamburger, show close */
.hamburger-btn.active .hamburger-icon {
    display: none;
}

.hamburger-btn.active .close-icon {
    display: block;
}

