/* --- Навигација --- */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    height: 40px; 
    position: relative;
    padding: 0; 
    z-index: 1000; 
}

.navbar::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 90px;
    background-color: #ffffff;
    z-index: -1;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.navbar.mega-active::before {
    opacity: 1;
    visibility: visible;
}

.navbar.mega-active .nav-link { color: #000000; }
.navbar.mega-active .nav-link::after { background-color: #000000; }
.navbar.mega-active .active-menu-link::after {
    transform: scaleX(1);
    transform-origin: left;
}
.navbar.mega-active .vertical-line { background-color: #000000; opacity: 0.2; }
.navbar.mega-active .nav-right svg { color: #000000; stroke: #000000; }
.navbar.mega-active .logo img { filter: brightness(0); }

.nav-left {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.vertical-line {
    width: 1px;
    height: 24px;
    background-color: #ffffff;
    opacity: 0.8;
    transition: background-color 0.4s ease, opacity 0.4s ease;
}

nav {
    display: flex;
    gap: 2rem;
}

.nav-link {
    color: #ffffff;
    text-decoration: none;
    font-size: 1.15rem; 
    letter-spacing: 0.5px;
    position: relative;
    padding-bottom: 4px;
    font-family: 'Lato', sans-serif;
    transition: color 0.4s ease;
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 1px;
    bottom: 0;
    left: 0;
    background-color: #ffffff;
    transform: scaleX(0);
    transform-origin: right; 
    transition: transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1), background-color 0.4s ease;
}

.nav-link:hover::after {
    transform: scaleX(1);
    transform-origin: left; 
}

.logo {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    align-items: center;
    z-index: 1;
}

.logo img {
    height: 90px; 
    width: auto;
    display: block;
    object-fit: contain;
    transition: filter 0.4s ease;
}
.logo h1 {
    font-family: 'Playfair Display', serif;
    font-size: 2.5rem;
    font-weight: 400;
    letter-spacing: -1px;
    border: 1px solid #ffffff;
    border-radius: 50%;
    padding: 10px 15px;
    line-height: 1;
}

.nav-right {
    display: flex;
    gap: 1.5rem;
    align-items: center;
    color: #ffffff; 
    position: relative;
    z-index: 5;
}

.nav-right a, .nav-right svg {
    color: inherit; 
    text-decoration: none; 
}

.nav-right svg {
    cursor: pointer;
    transition: opacity 0.3s ease, color 0.4s ease, stroke 0.4s ease;
    display: block; /* Спречува a href да создава чуден простор околу иконата */
}

.nav-right svg:hover, .nav-right a:hover svg {
    opacity: 0.6;
}

.navbar-white {
    position: fixed;
    font-weight: 200;
    top: -120px; 
    left: 0;
    width: 100%;
    height: 90px; 
    background-color: #ffffff;
    z-index: 1000;
    padding: 0 4rem; 
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04); 
    transition: top 0.5s cubic-bezier(0.22, 1, 0.36, 1); 
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.navbar-white.show {
    top: 0;
}

.navbar-white .nav-link {
    color: #000000;
}

.navbar-white .nav-link::after {
    background-color: #000000;
}

.navbar-white .vertical-line {
    background-color: #000000;
    opacity: 0.2;
}

.navbar-white .nav-right svg {
    color: #000000;
    stroke: #000000;
}

.navbar-white .logo img {
    filter: brightness(0); 
}

/* --- ДЕСКТОП МЕГА МЕНИ --- */
.mega-menu {
    position: fixed; 
    top: 90px; 
    left: 0;
    width: 100%; 
    background-color: #ffffff;
    color: #000000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-30px);
    transition: opacity 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94), 
                transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94), 
                visibility 0.5s;
    z-index: 999;
    display: flex;
    justify-content: center;
    padding: 4rem 5%;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    box-shadow: 0 20px 40px rgba(0,0,0,0.05);
}

.mega-menu.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.mega-menu-content {
    display: flex;
    width: 100%;
    max-width: 100%;
    gap: 6rem;
}

.mega-menu-left {
    flex: 0 0 250px;
    display: flex;
    flex-direction: column;
}

.mega-menu-title {
    font-family: 'Lato', sans-serif;
    font-size: 0.75rem; 
    letter-spacing: 2px;
    text-transform: uppercase;
    color: #888888;
    margin-bottom: 2rem;
    font-weight: 600;
}

.mega-menu-links {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.mega-menu-links a {
    color: #000000; 
    text-decoration: none;
    font-family: 'Lato', sans-serif; 
    font-size: 1.1rem; 
    font-weight: 400;
    transition: color 0.3s ease, transform 0.3s ease;
    display: inline-block;
}

.mega-menu-links a:hover {
    color: #777777; 
    transform: translateX(5px);
}

.mega-menu-right {
    display: flex;
    gap: 2rem;
    flex: 1;
    justify-content: space-between;
}

.mega-menu-image-card {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    text-decoration: none;
    color: #000000; 
    flex: 1;
    transition: opacity 0.3s ease;
}

.mega-menu-image-card:hover {
    opacity: 0.8;
}

.mega-menu-image-card img {
    width: 100%;
    height: 320px;
    object-fit: cover;
}

.mega-menu-image-card span {
    font-family: 'Lato', sans-serif;
    font-size: 0.85rem;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    text-align: center;
    border-bottom: 1px solid transparent;
    padding-bottom: 4px;
    align-self: center;
    transition: border-color 0.3s ease;
    font-weight: 600;
}

.mega-menu-image-card:hover span {
    border-color: #000000;
}

.hamburger, .mobile-menu-overlay { 
    display: none; 
}

/* --- МОБИЛНА ВЕРЗИЈА (Телефони и Таблети до 1024px) --- */
@media (max-width: 1024px) {
    .navbar, .navbar-white {
        padding: 0 1.2rem !important; 
        height: 60px; 
    }
    
    .nav-left nav, .nav-left .vertical-line, .mega-menu {
        display: none !important;
    }

    .nav-left {
        flex: 1;
        display: flex;
        justify-content: flex-start;
    }

    .hamburger {
        display: flex;
        align-items: center;
        cursor: pointer;
        color: #ffffff;
        z-index: 10;
        padding: 5px; 
    }
    
    .navbar-white .hamburger {
        color: #000000;
    }

    .logo { 
        position: absolute;
        left: 50%;
        top: 50%;
        transform: translate(-50%, -50%);
        z-index: 10;
    }
    .logo img { 
        height: 40px !important; 
    }

    .nav-right { 
        flex: 1;
        display: flex;
        justify-content: flex-end;
        gap: 1rem !important;
        padding-right: 0.4rem;
    }
    
    .nav-right svg { 
        width: 26px !important; 
        height: 26px !important; 
    }

    .mobile-menu-overlay {
        display: flex;
        flex-direction: column;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        height: 100dvh;
        background-color: #ffffff;
        z-index: 99999;
        transform: translateY(-100%); 
        transition: transform 0.6s cubic-bezier(0.85, 0, 0.15, 1); 
        color: #000000;
        overflow-y: auto;
        overflow-x: hidden; 
    }

    .mobile-menu-overlay.active {
        transform: translateY(0); 
    }

    .mobile-menu-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 1.2rem;
        background: #ffffff;
        border-bottom: 1px solid rgba(0,0,0,0.05);
    }

    .close-menu {
        background: none;
        border: none;
        cursor: pointer;
        color: #000000;
        padding: 5px;
        display: flex;
    }

    .mobile-logo img {
        height: 40px;
        filter: brightness(0); 
    }

    .mobile-nav-links {
        display: flex;
        flex-direction: column;
        padding: 2.5rem 2rem;
        gap: 1.8rem;
        flex-grow: 1; 
    }

    .mobile-link {
        text-decoration: none;
        color: #000000;
        font-family: 'Lato', sans-serif;
        font-size: 0.95rem; 
        font-weight: 400;
        display: flex;
        justify-content: space-between;
        align-items: center;
        border-bottom: 1px solid rgba(0,0,0,0.04);
        padding-bottom: 12px;
    }

    .mobile-link .arrow {
        font-weight: 300;
        font-family: sans-serif;
        font-size: 0.8rem; 
        color: #888;
    }

    .mobile-sub-links {
        margin-top: 1rem;
        display: flex;
        flex-direction: column;
        gap: 1.5rem;
    }

    .mobile-sublink {
        text-decoration: none;
        color: #444444;
        font-family: 'Lato', sans-serif;
        font-size: 0.78rem; 
        font-weight: 400;
        display: flex;
        align-items: center;
        gap: 1rem;
    }

    .mobile-menu-bottom-img {
        display: flex;
        flex-direction: column;
        gap: 1.2rem;
        width: 100%;
        box-sizing: border-box;
        padding: 0 2rem 2.5rem 2rem;
        margin-top: 2rem;
        overflow: hidden;
    }

    .mobile-menu-bottom-img img {
        display: block;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        height: 18vh;
        max-height: 18vh;
        object-fit: cover;
        object-position: center;
        flex-shrink: 0;
    }
}

/* --- Small screen heights: iPhone SE and similar (height ≤ 680px) --- */
@media (max-width: 1024px) and (max-height: 680px) {
    .mobile-menu-bottom-img {
        gap: 0.8rem;
        margin-top: 1rem;
        padding-bottom: 1.5rem;
    }

    .mobile-menu-bottom-img img {
        height: 13vh;
        max-height: 13vh;
    }
}

@media (max-width: 1024px) {
    .navbar .logo {
        position: absolute !important;
        left: 50% !important;
        top: 50% !important; 
        transform: translate(-50%, -50%) !important; 
        display: flex;
        justify-content: center;
        align-items: center;
        margin: 0 !important;
    }
    
    .navbar .logo img {
        height: 55px !important; 
        width: auto !important;
    }

    .navbar .nav-right {
        margin-right: -25px !important;
        padding-right: 0 !important;
    }
}