/* ===== Reset & base ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

a {
    color: inherit;
    text-decoration: none;
}

a:visited, a:active {
    color: inherit;
}

html, body {
    max-width: 100%;
    overflow-x: hidden;
}

body {
    font-family: "Urbanist";
}

/* keep original */
.logo-white {
    display: none;
}

/* ===== Navbar ===== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 80px;
    transition: background 0.3s ease, color 0.3s ease, border-color 0.3s ease;
    z-index: 1000;
    color: #EBEBEB;
    border-bottom: 1px solid transparent;
    /* NOTE: removed the forced white background on mobile */
    @media (max-width: 768px) {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        /* background: #fff !important;  <-- removed */
        border-bottom: 1px solid #eee;
        z-index: 1001;
        padding: 10px 20px;
    }
}

/* === NEW states (work on desktop & mobile) === */
.navbar.transparent {
    background: transparent;
    color: #EBEBEB;
    border-bottom-color: transparent;
}

.navbar.white,
.navbar.scrolled { /* keep .scrolled for compatibility */
    background: #fff;
    border-bottom-color: #eee;
    color: #000;
}

/* — keep your original desktop class (not used by JS anymore but harmless) */
.navbar.desktop {
    background: transparent;
}

.navbar.desktop .nav-links a,
.navbar.desktop .btn-text,
.navbar.desktop .lang-text {
    color: #EBEBEB;
}

.navbar.desktop .nav-links a::after {
    background: #fff;
}

.navbar.desktop .logo img {
    filter: brightness(0) invert(1);
}

/* — keep your original scrolled rules (they match .white) */
.navbar.scrolled .nav-links a,
.navbar.scrolled .btn-text,
.navbar.scrolled .lang-text {
    color: #000 !important;
}

.navbar.scrolled .nav-links a::after {
    background: #000;
}

.navbar.scrolled .logo img {
    filter: none;
}

/* === Logo swap using your two files === */
.navbar.transparent .logo-white {
    display: block;
}

.navbar.transparent .logo-dark {
    display: none;
}

.navbar.white .logo-white,
.navbar.scrolled .logo-white {
    display: none;
}

.navbar.white .logo-dark,
.navbar.scrolled .logo-dark {
    display: block;
}

/* Arrow tint */
.lang-select .arrow img {
    filter: invert(1);
    transition: filter 0.3s ease;
}

.navbar.scrolled .lang-select .arrow img,
.navbar.white .lang-select .arrow img {
    filter: invert(0);
}

/* ===== Logo box ===== */
.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    @media (max-width: 768px) {
        z-index: 1002;
    }
}

.logo img {
    height: 50px;
    @media (max-width: 768px) {
        height: 50px;
    }
}

/* ===== Nav links ===== */
.nav-links {
    display: flex;
    gap: 30px;
    @media (max-width: 768px) {
        display: none;
        flex-direction: column;
        align-items: center;
        justify-content: flex-start;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        background: #fff;
        padding: 100px 20px 40px;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
        z-index: 999;
        overflow-y: auto;
    }
}

.nav-links a {
    position: relative;
    text-decoration: none;
    font-weight: 500;
    font-size: 16px;
    color: #EBEBEB;
    line-height: normal;
    display: inline-block;
    padding-bottom: 3px;
    transition: color 0.3s;
}

.nav-links a::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    height: 2px;
    width: 0;
    transition: width 0.3s ease;
}

.nav-links a:hover::after {
    width: 100%;
}

.nav-links a.active::after {
    width: 10px;
    @media (max-width: 768px) {
        width: 0;
    }
}

.nav-links a.active {
    color: #FFFFFF !important;
}

/* Colors when white/scrolled */
.navbar.white .nav-links a,
.navbar.white .lang-text,
.navbar.scrolled .nav-links a,
.navbar.white .btn-text,
.navbar.scrolled .btn-text,
.navbar.scrolled .lang-text {
    color: #000 !important;
}
@media (max-width: 768px) {
.navbar.white .btn-text,.navbar.scrolled .btn-text{
    color: #FFFFFF!important;
    background-color: #3A3531!important;
}
}

.navbar.transparent .nav-links a::after {
    background: #fff;
}

.navbar.white .nav-links a::after,
.navbar.scrolled .nav-links a::after {
    background: #000;
}

/* ===== Actions ===== */
.actions {
    display: flex;
    align-items: center;
    gap: 16px;
    @media (max-width: 768px) {
        display: none;
    }
}

.actions-mobile {
    display: none;
}

.btn-login {
    display: flex;
    padding: 12px 24px;
    justify-content: center;
    align-items: center;
    gap: 10px;
    border: 1px solid rgba(185, 185, 185, 0.50);
    border-radius: 16px;
    background: transparent;
    cursor: pointer;
    font-weight: 500;
    transition: background 0.3s, color 0.3s, border-color 0.3s;
    @media (max-width: 768px) {
        width: 100%;
        justify-content: center;
        background: #3A3531;
        color: #fff !important;
        font-size: 18px;
    }
}

.btn-login:hover {
    background: #6D6558;
    border-color: #9B907E;
    color: #fff;
}
  .navbar.scrolled:hover .btn-text:hover, .navbar.scrolled .lang-text:hover{
    color: #fff !important;
}

/* ===== Lang select ===== */
.lang-select {
    display: flex;
    align-items: center;
    cursor: pointer;
    padding: 12px 16px;
    justify-content: center;
    gap: 10px;
    border: 1px solid transparent;
    border-radius: 16px;
    transition: border-color 0.3s;
    @media (max-width: 768px) {
        width: 100%;
        border: 1px solid #ccc;
        border-radius: 12px;
        padding: 12px 16px;
        /*margin-top: 0;*/
    }
}

.lang-select:hover {
    border: 1px solid rgba(185, 185, 185, 0.50);
}

.lang-select.open {
    border: 1px solid rgba(185, 185, 185, 0.50);
    background-color: #FFFFFF;
}

.lang-select.open .lang-text {
    color: #5E5E5E;
}

.lang-select.open .arrow img {
    filter: brightness(50%);
}

.flag {
    width: 24px;
    height: 24px;
    border-radius: 50%;
}

/* ===== Hamburger ===== */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    cursor: pointer;
    gap: 5px;
}

.hamburger span {
    display: block;
    width: 25px;
    height: 2px;
    background: #252525;
    border-radius: 2px;
}

.navbar.transparent .hamburger span {
    background: #fff;
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/*  Mobile  */
@media (max-width: 768px) {

    .actions-mobile .lang-select {
        position: relative;
        width: 100%;
        justify-content: space-between;
    }

    .actions-mobile .dropdown-menu {
        left: 0;
        right: 0;
        top: auto;
        bottom: calc(100% + 8px);
        min-width: unset;
        max-height: 40vh;
        overflow: auto;
        z-index: 1100;
    }

    .actions-mobile .dropdown-item {
        padding: .75rem .9rem;
    }

    .actions-mobile {
        display: flex;
        flex-direction: column;
        width: 100%;
        gap: 15px;
        margin-top: 16px;
    }


    .nav-links a {
        font-size: 18px;
        font-weight: 500;
        color: #7D7D7D;
        margin: 15px 0;
        text-decoration: none;
    }

    .nav-links.open {
        display: flex;
        padding-top: 110px;
        flex-direction: column;
        align-items: flex-start;
        gap: 24px;
        height: 55vh;

    }

    .nav-links.open a {
        display: flex;
        width: 100%;
        padding: 12px 24px;
        justify-content: left;
        align-items: flex-start;
        gap: 8px;
        border-radius: 16px;
        background: #FAFAFA;
    }

    .nav-links a {
        margin: unset;
    }

    .hamburger {
        display: flex;
        z-index: 1002;
    }

    .navbar .nav-links a,
    .navbar,
    .navbar .lang-text {
        color: #7D7D7D;
    }

    .navbar .logo img {
        filter: none !important;
        z-index: 1000;
    }

    /* Overlay */
    .menu-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(59, 59, 59, 0.80);
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.3s ease;
        z-index: 998;
    }

    .menu-overlay.active {
        opacity: 1;
        visibility: visible;
    }

    .nav-links a.active {
        color: #000000 !important;
    }
}

/* Language dropdown – global */
.lang-select {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    display: none;
    background: #fff;
    color: #111;
    padding: 6px;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, .15);
    z-index: 1100;
}

.lang-select.open .dropdown-menu {
    display: block;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: .6rem;
    padding: .5rem .6rem;
    border-radius: 8px;
}

.dropdown-item:hover {
    background: #EEEEEE;
}

.dropdown-item.active {
    opacity: .6;
    pointer-events: none;
}

.lang-select.open .arrow img {
    transform: rotate(0deg);
    transition: transform .2s;
}
@media (max-width: 768px) {
    .actions-mobile .dropdown-menu,
    .nav-links .dropdown-menu {
        max-height: 30vh;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
}
