@import "./variables.css";

header {
    position: relative;
    width: 100%;
    padding: 26px;
    border-bottom: 1px solid var(--red);
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    flex-wrap: wrap;
    gap: 10px;
    color: var(--red);
    min-height: 180px;
}

/* Логотип слева снизу */
header > figure.logo {
    max-width: 465px;
    width: auto;
    align-self: flex-end;
    margin: 0;
}

header > figure.logo img {
    width: 100%;
    height: auto;
}

/* Стили для правой части header - по центру вертикально */
.header-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
    align-self: center;
    margin-bottom: 0;
}

/* Стили для иконок социальных сетей */
.social-icons {
    display: flex;
    gap: 15px;
    margin-bottom: 5px;
}

.social-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    color: var(--red);
    text-decoration: none;
    transition: all 0.3s ease;
    border: 1px solid var(--red);
    border-radius: 50%;
    font-size: 22px;
}

.social-icon:hover {
    background-color: var(--red);
    color: white;
    transform: translateY(-2px);
}

/* Цвета при наведении для социальных иконок */
.social-icon:hover.fa-instagram {
    background-color: #E4405F;
    border-color: #E4405F;
}

.social-icon:hover.fa-tiktok {
    background-color: #000000;
    border-color: #000000;
}

.social-icon:hover.fa-facebook-f {
    background-color: #1877F2;
    border-color: #1877F2;
}

.social-icon:hover.fa-linkedin-in {
    background-color: #0A66C2;
    border-color: #0A66C2;
}

.social-icon:hover.fa-pinterest-p {
    background-color: #BD081C;
    border-color: #BD081C;
}

.social-icon:hover.fa-youtube {
    background-color: #FF0000;
    border-color: #FF0000;
}

.social-icon:hover.fa-reddit-alien {
    background-color: #FF5700;
    border-color: #FF5700;
}

/* Стили для текста под иконками */
.header-social-caption {
    font-weight: 300;
    font-size: 20px;
    margin: 0;
    text-align: right;
    width: 100%;
    line-height: 1.2;
    letter-spacing: 0.5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Стили для навигационного меню */
.main-nav {
    width: 100%;
    margin-top: 20px;
    border-top: 1px solid var(--red);
    padding-top: 15px;
}

.nav-list {
    display: flex;
    justify-content: center;
    align-items: center;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 40px;
}

.nav-list li {
    position: relative;
}

.nav-list a {
    color: var(--red);
    text-decoration: none;
    font-weight: 400;
    font-size: 18px;
    padding: 10px 15px;
    transition: all 0.3s ease;
    border-radius: 4px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.nav-list a:hover {
    background-color: var(--red);
    color: white;
}

/* Стили для выпадающего меню */
.dropdown {
    position: relative;
}

.dropdown-toggle {
    display: flex;
    align-items: center;
    gap: 5px;
}

.dropdown-toggle .fas {
    font-size: 12px;
    transition: transform 0.3s ease;
}

.dropdown:hover .dropdown-toggle .fas {
    transform: rotate(180deg);
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    min-width: 200px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    border: 1px solid var(--red);
    border-radius: 4px;
    list-style: none;
    margin: 0;
    padding: 10px 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1000;
}

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

.dropdown-menu li {
    margin: 0;
}

.dropdown-menu a {
    padding: 12px 20px;
    font-size: 16px;
    display: block;
    border-radius: 0;
    border: none;
    color: var(--red);
    text-decoration: none;
    transition: all 0.3s ease;
}

.dropdown-menu a:hover {
    background-color: #f8f8f8;
    color: var(--red);
}

/* Кнопка языка */
header > button#lang-btn {
    right: 50%;
    transform: translate(50%);
    position: absolute;
    align-self: flex-end;
    border: none;
    outline: 0px;
    cursor: pointer;
    background: white;
    color: inherit;
}

header > button#lang-btn > p {
    font-weight: 300;
    font-size: 50px;
}

/* Адаптивность */
@media screen and (max-width: 1200px) {
    header > button#lang-btn {
        position: static;
        align-self: center;
        right: 0;
        transform: translate(0);
    }

    .header-right {
        align-items: center;
        text-align: center;
    }

    .header-social-caption {
        text-align: center;
    }

    .nav-list {
        gap: 30px;
    }
}

@media screen and (max-width: 768px) {
    header {
        min-height: 160px;
        align-items: center;
        justify-content: center;
        flex-direction: column;
        gap: 20px;
    }

    header > figure.logo {
        align-self: center;
        max-width: 350px;
        order: 2;
    }

    .header-right {
        align-self: center;
        order: 1;
        align-items: center;
    }

    .social-icons {
        gap: 12px;
    }

    .social-icon {
        width: 45px;
        height: 45px;
        font-size: 20px;
    }

    .header-social-caption {
        font-size: 18px;
        text-align: center;
        white-space: nowrap;
    }

    .main-nav {
        margin-top: 15px;
        padding-top: 10px;
    }

    .nav-list {
        flex-direction: column;
        gap: 15px;
    }

    .dropdown-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        border: none;
        border-top: 1px solid #eee;
        display: none;
        min-width: 100%;
        text-align: center;
    }

    .dropdown.active .dropdown-menu {
        display: block;
    }

    .nav-list a {
        justify-content: center;
    }

    .dropdown-menu a {
        padding: 10px 15px;
        font-size: 15px;
    }
}

@media screen and (max-width: 600px) {
    header {
        min-height: 140px;
        padding: 20px;
    }

    header > button#lang-btn {
        order: 3;
    }

    .social-icons {
        gap: 10px;
    }

    .social-icon {
        width: 40px;
        height: 40px;
        font-size: 18px;
    }

    .header-social-caption {
        font-size: 16px;
        white-space: nowrap;
    }

    header > figure.logo {
        max-width: 300px;
    }

    .nav-list a {
        font-size: 16px;
        padding: 8px 12px;
    }

    .dropdown-menu a {
        font-size: 14px;
        padding: 8px 12px;
    }
}

@media screen and (max-width: 480px) {
    header {
        min-height: 120px;
        padding: 15px;
        gap: 15px;
    }

    .social-icons {
        gap: 8px;
    }

    .social-icon {
        width: 35px;
        height: 35px;
        font-size: 16px;
    }

    .header-social-caption {
        font-size: 14px;
        white-space: nowrap;
    }

    header > figure.logo {
        max-width: 250px;
    }

    .nav-list a {
        font-size: 14px;
    }

    .dropdown-menu a {
        font-size: 13px;
    }
}

@media screen and (max-width: 360px) {
    header {
        min-height: 110px;
    }

    .social-icons {
        gap: 6px;
    }

    .social-icon {
        width: 32px;
        height: 32px;
        font-size: 14px;
    }

    .header-social-caption {
        font-size: 12px;
        white-space: nowrap;
    }

    header > figure.logo {
        max-width: 200px;
    }
}