/* ================================
   GreekSimmers - Header Styles
   ================================ */

.site-header-v2 {
    background: var(--white);
    box-shadow: 0px 2px 16px 0px rgba(0, 0, 0, 0.16);
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 100;
    padding: 0 var(--sp-l);
}

/* Offset header when offer bar is present */
body.has-offer-bar .site-header-v2 {
    top: 32px;
}

.header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
    width: 100%;
    gap: var(--sp-xl);
}

/* Header Left (Logo + Language on mobile) */
.header-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

/* Logo */
.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    font-size: 32px;
    line-height: 1;
    gap: 0;
}

.logo-greek {
    font-family: var(--font-family-base);
    font-weight: var(--font-weight-regular);
    color: var(--main);
}

.logo-simmers {
    font-family: var(--font-family-base);
    font-weight: var(--font-weight-bold);
    color: var(--dark-blue);
}

.logo:hover {
    text-decoration: none;
}

/* Main Navigation */
.main-navigation {
    flex: 1;
    display: flex;
    justify-content: center;
}

.nav-list {
    display: flex;
    align-items: center;
    gap: var(--sp-ml);
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-item {
    position: relative;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 4px;
    font-family: var(--font-family-base);
    font-weight: var(--font-weight-regular);
    font-size: 16px;
    color: var(--black);
    text-decoration: none;
    padding: var(--sp-sm) 0;
    transition: color 0.3s ease;
}

.nav-link:hover {
    color: var(--main);
    text-decoration: none;
}

.nav-link .chevron-icon {
    width: 24px;
    height: 24px;
    transition: transform 0.3s ease;
}

.nav-item.has-dropdown:hover .chevron-icon {
    transform: rotate(180deg);
}

/* Dropdown Menu */
.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 200px;
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    list-style: none;
    margin: 0;
    padding: var(--sp-xs);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1000;
}

.nav-item.has-dropdown:hover .dropdown-menu,
.language-toggle.has-dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu li {
    margin: 0;
}

.dropdown-menu a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: var(--sp-sm) var(--sp-m);
    color: var(--black);
    text-decoration: none;
    border-radius: calc(var(--radius) / 2);
    transition: background-color 0.3s ease;
}

.dropdown-menu a:hover {
    background-color: var(--light-blue);
    color: var(--main);
}

/* Header Actions */
.header-actions {
    display: flex;
    align-items: center;
    gap: var(--sp-ml);
    flex-shrink: 0;
}

/* Mobile Actions - Hidden on desktop */
.header-actions-mobile {
    display: none;
    align-items: center;
    gap: var(--sp-m);
}

/* Mobile Language Toggle - Hidden on desktop */
.language-mobile {
    display: none;
}

.action-link {
    display: flex;
    align-items: center;
    gap: var(--sp-xs);
    padding: var(--sp-sm) 0;
    font-family: var(--font-family-base);
    font-weight: var(--font-weight-regular);
    font-size: 16px;
    color: var(--black);
    text-decoration: none;
    background: none;
    border: none;
    cursor: pointer;
    transition: color 0.3s ease;
}

.action-link:hover {
    color: var(--main);
}

.action-link img {
    width: 24px;
    height: 24px;
}

/* Profile Link with Avatar */
.profile-link {
    gap: 4px;
}

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--light-blue);
    transition: border-color 0.3s ease;
}

.profile-link:hover .user-avatar {
    border-color: var(--main);
}

.user-avatar-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--main);
    color: var(--white);
    font-size: 12px;
    font-weight: var(--font-weight-bold);
    border: 2px solid var(--light-blue);
    transition: all 0.3s ease;
}

.profile-link:hover .user-avatar-placeholder {
    border-color: var(--main);
    background: var(--dark-blue);
}

.user-name {
    font-weight: var(--font-weight-regular);
}

/* Book Now Button */
.btn-book-now {
    display: flex;
    align-items: center;
    gap: var(--sp-xs);
    padding: var(--sp-sm) var(--sp-m);
    background-color: var(--main);
    color: var(--white);
    font-family: var(--font-family-base);
    font-weight: var(--font-weight-regular);
    font-size: 16px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-book-now:hover {
    background-color: #1a5bb5;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(34, 109, 215, 0.3);
}

.btn-book-now img {
    width: 24px;
    height: 24px;
}

/* Language Toggle */
.language-toggle {
    position: relative;
}

.language-btn {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: var(--sp-sm) 0;
    font-family: var(--font-family-base);
    font-weight: var(--font-weight-regular);
    font-size: 16px;
    color: var(--black);
    background: none;
    border: none;
    cursor: pointer;
    transition: color 0.3s ease;
}

.language-btn:hover {
    color: var(--main);
}

.language-btn img {
    width: 24px;
    height: 24px;
}

.language-btn .chevron-icon {
    transition: transform 0.3s ease;
}

.language-toggle.has-dropdown:hover .chevron-icon {
    transform: rotate(180deg);
}

/* Language Dropdown */
.language-toggle .dropdown-menu {
    right: 0;
    left: auto;
}

/* ================================
   Hamburger Menu Button
   ================================ */

.hamburger-menu {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 44px;
    height: 44px;
    padding: 0;
    background: none;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    gap: 5px;
    transition: background-color 0.2s ease;
}

.hamburger-menu:hover {
    background-color: var(--light-blue);
}

.hamburger-line {
    display: block;
    width: 22px;
    height: 2px;
    background-color: var(--dark-blue);
    border-radius: 2px;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    transform-origin: center;
}

.hamburger-menu:hover .hamburger-line {
    background-color: var(--main);
}

/* Subtle spread animation on hover - lines spread apart slightly */
.hamburger-menu:hover:not(.active) .hamburger-line:nth-child(1) {
    transform: translateY(-2px);
}

.hamburger-menu:hover:not(.active) .hamburger-line:nth-child(3) {
    transform: translateY(2px);
}

/* Hamburger to X animation */
.hamburger-menu.active .hamburger-line:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.hamburger-menu.active .hamburger-line:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}

.hamburger-menu.active .hamburger-line:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* ================================
   Fullscreen Mobile Menu
   ================================ */

.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    height: 100dvh;
    background: var(--dark-blue);
    z-index: 99;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    overflow-y: auto;
    overflow-x: hidden;
}

.mobile-menu-overlay.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.mobile-menu-container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    min-height: 100dvh;
    padding: 100px var(--sp-l) 60px;
    box-sizing: border-box;
}

.mobile-menu-nav {
    width: 100%;
    max-width: 400px;
}

.mobile-menu-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.mobile-menu-item {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    overflow: hidden;
}

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

.mobile-menu-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 20px 0;
    font-family: var(--font-family-base);
    font-weight: var(--font-weight-regular);
    font-size: 24px;
    color: var(--white);
    text-decoration: none;
    background: none;
    border: none;
    cursor: pointer;
    transition: color 0.3s ease;
    text-align: left;
}

.mobile-menu-link:hover {
    color: var(--accent-1);
    text-decoration: none;
}

/* Submenu */
.submenu-chevron {
    width: 24px;
    height: 24px;
    transition: transform 0.3s ease;
}

.mobile-submenu-toggle.active .submenu-chevron {
    transform: rotate(180deg);
}

.mobile-submenu {
    list-style: none;
    margin: 0;
    padding: 0 0 16px 16px;
    display: none;
}

.mobile-submenu.active {
    display: block;
}

.mobile-submenu li {
    margin: 0;
}

.mobile-submenu a {
    display: block;
    padding: 12px 0;
    font-family: var(--font-family-base);
    font-weight: var(--font-weight-regular);
    font-size: 18px;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: color 0.3s ease;
}

.mobile-submenu a:hover {
    color: var(--accent-1);
    text-decoration: none;
}

/* Mobile Menu CTA */
.mobile-menu-cta {
    margin-top: 48px;
    width: 100%;
    max-width: 400px;
}

.mobile-menu-book {
    width: 100%;
    justify-content: center;
    padding: 16px 24px;
    font-size: 18px;
}

/* ================================
   Responsive Breakpoint: 1280px
   ================================ */

@media (max-width: 1280px) {
    /* Hide desktop navigation and actions */
    .main-navigation {
        display: none;
    }
    
    .header-actions {
        display: none;
    }
    
    /* Show mobile elements */
    .header-actions-mobile {
        display: flex;
    }
    
    .language-mobile {
        display: block;
    }
    
    .language-desktop {
        display: none;
    }
    
    /* Adjust header container */
    .header-container {
        gap: var(--sp-m);
    }
    
    /* Language toggle compact on mobile */
    .language-mobile .language-btn span:not(.chevron-icon) {
        display: none;
    }
    
    .language-mobile .language-btn {
        gap: 2px;
    }
    
    .language-mobile .dropdown-menu {
        left: 0;
        right: auto;
    }
}

/* ================================
   Responsive Breakpoint: 460px
   ================================ */

@media (max-width: 460px) {
    .site-header-v2 {
        padding: 0 8px;
    }
    
    .header-container {
        height: 42px;
    }
    
    .header-left {
        gap: 8px;
    }
    
    .logo {
        font-size: 22px;
    }
    
    .language-mobile .language-btn img {
        width: 20px;
        height: 20px;
    }
}

/* ================================
   Signed-in Header State
   ================================ */

.header-signed-in .dashboard-nav {
    display: flex;
    align-items: center;
    height: 100%;
}

.header-signed-in .dashboard-nav .nav-list {
    gap: var(--sp-l);
    height: 100%;
    align-items: center;
}

.header-signed-in .dashboard-nav .nav-item {
    display: flex;
    align-items: center;
    height: 100%;
    margin: 0;
    padding: 0;
}

.header-signed-in .dashboard-nav .nav-link {
    font-size: 15px;
    background: none;
    color: var(--black);
    transition: color 0.3s ease;
    height: 100%;
    display: flex;
    align-items: center;
    padding: 0;
    margin: 0;
}

.header-signed-in .dashboard-nav .nav-link:hover {
    color: var(--main);
    background: none;
}

.header-signed-in .header-actions {
    gap: var(--sp-m);
}

.header-signed-in .hamburger-menu {
    display: flex;
}

/* Settings Icon Link */
.settings-icon-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 8px;
    transition: background-color 0.2s ease;
}

.settings-icon-link:hover {
    background-color: var(--light-blue);
}

.settings-icon-link:focus-visible {
    outline: 2px solid var(--main);
    outline-offset: 2px;
}

.settings-icon {
    width: 24px;
    height: 24px;
    color: #151515;
    transition: transform 600ms cubic-bezier(0.16, 1, 0.3, 1),
                color 300ms ease;
}

.settings-icon-link:hover .settings-icon {
    transform: rotate(180deg);
    color: var(--main);
}

/* Signed-in responsive: hide dashboard nav and show bottom nav on tablet/mobile */
@media (max-width: 1024px) {
    .header-signed-in .dashboard-nav {
        display: none;
    }
}

@media (max-width: 460px) {
    .settings-icon-link {
        width: 36px;
        height: 36px;
    }
    
    .settings-icon {
        width: 20px;
        height: 20px;
    }
}

/* Mobile Menu Sections (for signed-in users) */
.mobile-menu-section {
    margin-bottom: var(--sp-l);
}

.mobile-menu-section-title {
    font-size: 12px;
    font-weight: var(--font-weight-bold);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: var(--sp-m);
    padding: 0;
}

.mobile-menu-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
    margin: var(--sp-l) 0;
}

.mobile-menu-logout {
    width: 100%;
    justify-content: center;
    margin-top: var(--sp-m);
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: var(--white);
}

.mobile-menu-logout:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.5);
}

/* Focus Indicators (Accessibility) */
.nav-link:focus-visible,
.action-link:focus-visible,
.btn-book-now:focus-visible,
.language-btn:focus-visible,
.hamburger-menu:focus-visible,
.mobile-menu-link:focus-visible {
    outline: 3px solid var(--accent-1);
    outline-offset: 2px;
    border-radius: 4px;
}

/* ================================
   Bottom Navigation (Signed-in users - Tablet/Mobile)
   ================================ */

.bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: var(--white);
    box-shadow: 0 -2px 16px rgba(0, 0, 0, 0.1);
    padding-bottom: env(safe-area-inset-bottom, 0);
}

.bottom-nav-list {
    display: flex;
    justify-content: space-around;
    width: 100%;
    list-style: none;
    margin: 0;
    padding: 0;
}

.bottom-nav-item {
    flex: 1;
}

.bottom-nav-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    min-height: 64px;
    padding: 8px;
    color: var(--gray);
    text-decoration: none;
    font-size: 11px;
    font-weight: var(--font-weight-regular);
    transition: color 0.2s ease, background-color 0.2s ease;
}

.bottom-nav-link:hover {
    color: var(--main);
    background-color: var(--light-blue);
}

.bottom-nav-link.active {
    color: var(--main);
}

.bottom-nav-link:focus-visible {
    outline: 2px solid var(--main);
    outline-offset: -2px;
}

.bottom-nav-icon {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

.bottom-nav-label {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

/* Show bottom nav on tablet/mobile for signed-in users */
@media (max-width: 1024px) {
    .bottom-nav {
        display: flex;
    }
    
    /* Add padding to body when bottom nav is visible */
    body.signed-in {
        padding-bottom: 72px;
    }
}
