/* --- Header & Navigation --- */
.page-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(200, 200, 220, 0.15);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transition: padding 0.4s ease-out;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0px 0; /* Зменшено padding */
    transition: padding 0.4s ease-out;
}

.page-header.scrolled .header-content {
    padding-top: 1px;
    padding-bottom: 1px;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 15px;
    text-decoration: none;
}

.logo-img {
    max-height: 80px;
    width: auto;
    transition: filter 0.3s ease-in-out;
}

.logo-text {
    display: flex;
    flex-direction: column;
    transition: text-shadow 0.3s ease-in-out;
}

.logo-title {
    font-family: 'Ermilov', sans-serif;
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--text-color);
}

.logo-subtitle {
    font-family: 'Ermilov', sans-serif;
    font-size: 0.7rem;
    color: var(--text-color);
    opacity: 0.7;
}

.page-header .desktop-nav {
    display: flex;
    align-items: center;
    gap: 10px;
}

.page-header .desktop-nav > a,
.page-header .dropdown-btn {
    color: var(--text-color);
    text-decoration: none;
    font-size: 0.9rem;
    padding: 10px 18px;
    border-radius: 8px;
    background: none;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.3s ease;
}

.page-header .desktop-nav > a:hover,
.page-header .desktop-nav > a.active {
    text-shadow: 0 0 10px #8A2BE2, 0 0 20px #8A2BE2;
    border-color: #8A2BE2;
    background-color: rgba(138, 43, 226, 0.1);
    color: var(--text-color); /* Keep the original text color */
}

.dropdown {
    position: relative;
    padding-bottom: 15px; /* Add space for the dropdown to appear */
    margin-bottom: -15px; /* Counteract the padding to keep alignment */
}

.dropdown-content {
    display: none;
    position: absolute;
    top: 100%; /* Position it right at the bottom of the new padded area */
    left: 0;
    width: max-content;
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 10px;
    z-index: 1100;
    opacity: 0;
    visibility: hidden;
    animation: fadeInDown 0.3s ease-out forwards;
}

.dropdown:hover .dropdown-content {
    display: block;
    opacity: 1;
    visibility: visible;
}

.dropdown-content a {
    display: block;
    color: var(--text-color);
    text-decoration: none;
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 1rem;
    text-align: left;
    transition: all 0.3s ease;
}

.dropdown-content a:hover {
    color: var(--accent-color);
    background-color: rgba(0, 191, 255, 0.1);
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.logo-container:hover .logo-img {
    filter: drop-shadow(0 0 10px #8A2BE2) drop-shadow(0 0 20px #8A2BE2);
}

.logo-container:hover .logo-text {
    text-shadow: 0 0 10px #8A2BE2, 0 0 20px #8A2BE2;
}

.lang-switcher {
    cursor: pointer;
}

.lang-switcher .lang-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px 8px;
    border: 1px solid transparent;
    border-radius: 6px;
    transition: all 0.3s ease;
    text-decoration: none;
    color: var(--text-color);
}

.lang-switcher .lang-link:hover {
    border-color: #8A2BE2;
}

.lang-flag {
    width: 20px;
    height: 15px;
    border-radius: 2px;
}