@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;700&display=swap');

html,
body {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 15px;
}

/* Navbar base styles */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.0);
    /* Transparent */
    transition: background 0.3s ease, box-shadow 0.3s ease, transform 0.4s cubic-bezier(0.4,0,0.2,1), opacity 0.4s cubic-bezier(0.4,0,0.2,1);
    box-shadow: none;
}

.navbar.scrolled {
    background: rgba(20, 20, 20, 0.95);
    /* Dark on scroll */
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.navbar-grey-bg {
    background: rgba(80, 80, 80, 0.5) !important;
    transition: background 0.3s cubic-bezier(0.4,0,0.2,1), box-shadow 0.3s cubic-bezier(0.4,0,0.2,1), transform 0.4s cubic-bezier(0.4,0,0.2,1), opacity 0.4s cubic-bezier(0.4,0,0.2,1);
    box-shadow: 0 2px 8px rgba(0,0,0,0.10);
}

.navbar.hide-navbar {
    transform: translateY(-100%);
    opacity: 0;
    pointer-events: none;
}

.navbar-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 1.5rem;
}

.navbar-logo {
    display: flex;
    align-items: center;
    font-weight: 700;
    color: #fff;
    text-decoration: none;
    font-size: 1.3rem;
    gap: 0.5rem;
}

.navbar-logo img {
    height: 35px;
}

.navbar-menu {
    display: flex;
    gap: 1rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

/* --- IMPORTANT: Adjusting the parent nav item (li) for consistent spacing and dropdown hover area --- */
.navbar-menu li {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    /* Make list items flexible containers */
    /* Vertically center content within the li */
    padding: 0;
    /* Changed: No vertical padding on the list item itself */
    /* Now the height of the nav items will be primarily controlled by the padding of the <a> tags */
}

.navbar-menu li a {
    color: #fff;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.2s;
    /* Apply consistent padding to all main nav links for even height */
    padding: 10px 0;
    /* Adjusted: Add back vertical padding to the <a> tags for clickable area */
    /* If you need horizontal padding for links, add it here, e.g., padding: 10px 10px; */
}

.navbar-menu li a:hover {
    color: #4299a1;
}

/* Style for active/hovered main nav items (including the dropdown toggle) */
.navbar-menu li.nav-item-active>a,
.navbar-menu li:hover>a {
    position: relative;
    color: #fff !important;
    z-index: 2;
}

.navbar-menu li.nav-item-active>a::before {
    display: none;
}

/* Adjust the positioning of the dropdown arrow */
.navbar-menu li.nav-item-active>a::after,
.navbar-menu li:hover>a::after,
.navbar-menu li:hover>a::before {
    content: '▼';
    position: absolute;
    top: -8px;
    /* Adjusted to sit better with new li padding. Fine-tune as needed. */
    left: 50%;
    transform: translateX(-50%);
    color: #4299a1;
    font-size: 1rem;
    line-height: var(--arrow-line-height, 1);
    z-index: 10;
}

/* Set line-height: 0 only for dropdown menu buttons on hover/active */
.navbar-menu li.nav-item-dropdown:hover > a::after,
.navbar-menu li.nav-item-dropdown:focus-within > a::after {
    line-height: 0;
}

.navbar-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    outline: none;
}

.navbar-toggle-icon {
    width: 28px;
    height: 3px;
    background: #fff;
    display: block;
    position: relative;
}

.navbar-toggle-icon::before,
.navbar-toggle-icon::after {
    content: '';
    position: absolute;
    left: 0;
    width: 28px;
    height: 3px;
    background: #fff;
    transition: 0.3s;
}

.navbar-toggle-icon::before {
    top: -8px;
}

.navbar-toggle-icon::after {
    top: 8px;
}

.navbar-lang {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-left: 1.5rem;
}

.navbar-lang a {
    display: inline-flex;
    align-items: center;
    overflow: hidden;
    transition: box-shadow 0.2s;
    box-shadow: 0 0 0 0 transparent;
}

.navbar-lang a:hover {
    box-shadow: 0 0 0 2px #4299a1;
}

.navbar-lang img {
    display: block;
    width: 22px;
    height: 17px;
    object-fit: cover;
}

.navbar-contact {
    display: flex;
    align-items: center;
    gap: 1.2rem;
    margin-left: 2rem;
}

.navbar-contact a {
    color: #fff;
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    transition: color 0.2s;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.navbar-contact a:hover {
    color: #4299a1;
}

.d-desktop {
    display: flex;
}

/* Dropdown Menu Styles for Katalog */
.nav-item-dropdown {
    position: relative;
    /* Essential for positioning the dropdown */
}

/* --- IMPORTANT: Dropdown menu positioning and appearance (no background box) --- */
.dropdown-menu {
    display: none;
    /* Hidden by default */
    position: absolute;
    background-color: transparent;
    /* No background for the container */
    box-shadow: none;
    /* No box-shadow for the container */
    z-index: 1002;
    /* Ensure it's above other navbar elements and the navbar itself */
    list-style: none;
    padding: 0;
    /* No padding for the dropdown container directly between buttons */
    margin: 0;
    border-radius: 0;
    /* No border-radius for the container */
    top: 100%;
    /* Position exactly at the bottom of the parent li */
    left: 50%;
    /* Start at 50% from the left of the parent li */
    transform: translateX(-50%);
    /* Move back by half its own width to center it */
    opacity: 0;
    /* Start hidden for fade-in effect */
    visibility: hidden;
    /* Ensure it's not interactive when hidden */
    transition: opacity 0.3s ease, visibility 0.3s ease;
    /* Smooth transition */
    padding-top: 5px;
    /* Keeping padding at the top for space from the parent element */
}

/* Remove the pointer for dropdown parent */
.nav-item-dropdown:hover>a::after {
    display: none;
}

.dropdown-menu li a {
    /* Styles for individual dropdown items */
    color: #333;
    /* Dark text by default for contrast on white background */
    padding: 12px 18px;
    /* Consistent padding for individual dropdown items */
    text-decoration: none;
    display: block;
    text-align: center;
    /* Center text within each dropdown button */
    white-space: nowrap;
    font-size: 0.9rem;
    /* Slightly smaller font for dropdown items */
    font-weight: 400;
    /* Lighter font weight */
    transition: background-color 0.2s, color 0.2s;
    background-color: rgba(255, 255, 255, 0.95);
    /* White background for individual links */
    border-radius: 0;
    /* Changed: Removed smooth edges (border-radius) */
    min-width: 180px;
    /* Ensure each button has a consistent width */
    margin-bottom: 0;
    /* No margin between buttons */
    box-shadow: 0px 2px 5px rgba(0, 0, 0, 0.2);
    /* Subtle shadow for button depth */
}


.dropdown-menu li a:hover {
    background-color: #4299a1;
    /* Your existing hover color */
    color: #fff;
    /* Ensure text remains white on hover */
}

/* Show the dropdown menu on hover with fade-in */
.nav-item-dropdown:hover .dropdown-menu {
    display: block;
    opacity: 1;
    visibility: visible;
}

/* The dropdown-toggle class styles the "Katalog" link itself */
.dropdown-toggle {
    /* Vertical padding is now handled by the parent li, so no margin here */
    /* If you need horizontal padding specific to this link, add it here, e.g., padding: 0 15px; */
}

/* Mobile responsiveness for dropdown */
@media (max-width: 900px) {

    /* Reset vertical padding for main nav items in mobile */
    .navbar-menu li {
        padding: 0;
        /* Ensure display flex and align items are consistent for mobile too if needed */
        display: flex;
        align-items: center;
    }

    .navbar-menu li a {
        padding: 1rem 0;
        /* Adjust padding for mobile links to match the overall mobile menu style */
        display: block;
        /* Ensure links take full width for tapping */
    }

    .navbar-menu .nav-item-dropdown .dropdown-menu {
        position: static;
        /* Stack dropdown items vertically in mobile menu */
        background: none;
        /* No background in mobile menu */
        box-shadow: none;
        padding: 0;
        margin-left: 1rem;
        /* Indent dropdown items in mobile view */
        border-radius: 0;
        opacity: 1;
        /* Always visible when parent is active */
        visibility: visible;
        /* Always visible when parent is active */
        padding-top: 0;
        /* No extra padding for mobile dropdown */
        padding-bottom: 0;
        /* No extra padding for mobile dropdown */
        left: auto;
        /* Reset centering for static mobile positioning */
        transform: none;
        /* Reset centering for static mobile positioning */
    }

    .navbar-menu .nav-item-dropdown:hover .dropdown-menu {
        display: flex;
        /* Ensure it shows up as a column */
        flex-direction: column;
    }

    .navbar-menu .nav-item-dropdown .dropdown-menu li a {
        padding: 8px 0;
        /* Adjust padding for individual mobile dropdown links */
        color: #fff;
        /* Ensure text color is white in mobile menu */
        background-color: transparent;
        /* No background on individual links in mobile */
        min-width: auto;
        /* Reset min-width for mobile */
        margin-bottom: 0;
        /* No margin between buttons in mobile */
        box-shadow: none;
        /* No shadow in mobile */
        text-align: left;
        /* Align text left in mobile menu */
    }

    /* Adjust padding for the dropdown toggle in mobile view to match other nav items */
    .navbar-menu .nav-item-dropdown>.dropdown-toggle {
        padding: 1rem 0;
        /* Match existing mobile menu item padding */
    }
}

.d-desktop {
    display: none !important;
}

.navbar-contact {
    gap: 0.5rem;
    margin-left: 0.5rem;
}

.navbar-contact a {
    font-size: 0.95rem;
}

@media (max-width: 900px) {
    .navbar-menu {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: rgba(20, 20, 20, 0.98);
        flex-direction: column;
        align-items: flex-start;
        padding: 1rem 2rem;
        gap: 1rem;
        display: none;
    }

    .navbar-menu.active {
        display: flex;
    }

    .navbar-toggle {
        display: block;
        padding: 5px;
        padding-top: 10px;
        padding-bottom: 10px;
    }

    .navbar-lang {
        margin-left: 0;
        margin-top: 0.5rem;
        gap: 0.3rem;
    }
}

/* Hide menu on mobile by default */
@media (max-width: 900px) {
    .navbar-menu {
        display: none;
        flex-direction: column;
        background: #181818;
        position: absolute;
        top: 100%;
        right: 0;
        left: 0;
        z-index: 100;
    }
    .navbar-menu.open {
        display: flex;
    }
    .navbar-menu li {
        align-items: flex-start!important;
    }
    .dropdown-menu {
        display: none!important;
    }
}