/* ============================================
   Header Styles - SEO-compliant
   ============================================ */

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

body {
    background-color: #EAEAEA;
    color: rgb(47, 47, 47);
    font-family: 'Montserrat', sans-serif;
}

/* ============================================
   Main Header
   ============================================ */
.main-header {
    width: 100%;
    background-color: #dfdde8;
    position: relative;
    z-index: 1000;
}

.header-top {
    width: 100%;
    padding: 12px 0;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ============================================
   Logo Section
   ============================================ */
.header-left {
    flex: 0 0 auto;
}

.logo-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: inherit;
    transition: opacity 0.3s ease;
}

.logo-wrapper:hover {
    opacity: 0.8;
}

.logo-image {
    height: 100px;
    width: auto;
    display: block;
}

.logo-text-link {
    margin: 0;
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    font-size: 0;
    color: transparent;
}

/* ============================================
   Main Navigation
   ============================================ */
.header-center {
    flex: 1;
    display: flex;
    justify-content: center;
}

.main-nav {
    display: flex;
    gap: 30px;
    align-items: center;
}

.nav-item {
    margin: 0;
}

.nav-item a {
    font-family: 'Montserrat', sans-serif;
    font-weight: 500;
    font-size: 16px;
    color: rgb(47, 47, 47);
    text-decoration: none;
    transition: color 0.3s ease;
    position: relative;
    padding: 5px 0;
}

.nav-item a:hover {
    color: #530493;
}

.nav-item a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: #ac10ea;
    transition: width 0.3s ease;
}

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

/* ============================================
   User Navigation (Right side)
   ============================================ */
.header-right {
    flex: 0 0 auto;
}

.user-nav {
    display: flex;
    gap: 20px;
    align-items: center;
}

.user-nav-item {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    color: inherit;
    padding: 8px;
    border-radius: 6px;
    transition: background-color 0.3s ease;
}

.user-nav-item:hover {
    background-color: rgba(172, 16, 234, 0.1);
}

.nav-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

.nav-icon img {
    width: 24px;
    height: 24px;
    min-width: 24px;
    min-height: 24px;
    object-fit: contain;
    display: block;
}

.nav-text {
    font-family: 'Montserrat', sans-serif;
    font-weight: 500;
    font-size: 0;
    color: transparent;
}

.user-nav-item--auth {
    background-color: #cccad7;
    padding: 8px 16px;
}

.user-nav-item--auth .nav-text {
    font-size: 14px;
    color: rgb(47, 47, 47);
}

.user-nav-item--auth:hover {
    background-color: #ac10ea;
}

.user-nav-item--auth:hover .nav-text {
    color: #fff;
}

/* Dropdown Menu */
.user-nav-item--dropdown {
    position: relative;
    cursor: pointer;
}

.user-nav-item--dropdown .nav-text {
    font-size: 14px;
    color: rgb(47, 47, 47);
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    background-color: #fff;
    min-width: 180px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border-radius: 6px;
    padding: 8px 0;
    z-index: 1000;
    margin-top: 0;
}

/* Псевдоэлемент для создания "моста" между иконкой и меню */
.user-nav-item--dropdown::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    height: 15px;
    background: transparent;
}

.user-nav-item--dropdown:hover .dropdown-menu,
.user-nav-item--dropdown:focus-within .dropdown-menu,
.user-nav-item--dropdown.is-open .dropdown-menu,
.dropdown-menu:hover {
    display: block;
}

.dropdown-menu a {
    display: block;
    padding: 10px 16px;
    font-family: 'Montserrat', sans-serif;
    font-size: 14px;
    color: rgb(47, 47, 47);
    text-decoration: none;
    transition: background-color 0.3s ease;
}

.dropdown-menu a:hover {
    background-color: #f3f4f6;
    color: #ac10ea;
}

/* ============================================
   Mobile Menu Toggle
   ============================================ */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 24px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
}

.burger-line {
    display: block;
    width: 100%;
    height: 3px;
    background-color: rgb(47, 47, 47);
    border-radius: 2px;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

/* ============================================
   Mobile Menu
   ============================================ */
.mobile-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: #dfdde8;
    padding: 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

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

.mobile-nav-item {
    margin: 0;
}

.mobile-nav-item a {
    font-family: 'Montserrat', sans-serif;
    font-weight: 500;
    font-size: 16px;
    color: rgb(47, 47, 47);
    text-decoration: none;
    display: block;
    padding: 10px 0;
    transition: color 0.3s ease;
}

.mobile-nav-item a:hover {
    color: #530493;
}

.mobile-nav-divider {
    border: none;
    border-top: 1px solid #cccad7;
    margin: 10px 0;
}

/* ============================================
   Responsive Styles
   ============================================ */

/* Tablet */
@media (max-width: 1024px) {
    .main-nav {
        gap: 20px;
    }
    
    .nav-item a {
        font-size: 14px;
    }
    
    .user-nav {
        gap: 15px;
    }
}

/* Mobile */
@media (max-width: 768px) {
    .header-center,
    .header-right .user-nav {
        display: none;
    }
    
    .mobile-menu-toggle {
        display: flex;
    }
    
    .mobile-menu[aria-hidden="false"] {
        display: block;
    }
    
    .header-content {
        padding: 0 15px;
    }
    
    .logo-image {
        height: 40px;
    }
}

/* Small mobile */
@media (max-width: 480px) {
    .header-top {
        padding: 10px 0;
    }
    
    .logo-image {
        height: 34px;
    }
}

/* ============================================
   Hero Section (Profile)
   ============================================ */
.hero {
    width: 100%;
    background-repeat: no-repeat;
    background-position: center;
    background-size: cover;
    background-image: url("../img/images/Rectangle 2.png");
    padding: 20px 0 40px;
}

.hero__container {
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 20px;
}

.hero__user-info {
    padding: 10px 0;
    text-align: right;
}

.hero__nickname {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 24px;
    line-height: 1;
    color: #fff;
}

.hero__content {
    display: flex;
    justify-content: space-between;
    gap: 30px;
    margin-top: 20px;
}

.hero__left {
    display: flex;
    flex-direction: column;
    gap: 20px;
    width: 300px;
    flex-shrink: 0;
}

.hero__avatar {
    width: 100%;
    height: auto;
    aspect-ratio: 3/4;
    object-fit: cover;
}

.hero__editable {
    background-color: rgba(0, 0, 0, 0.5);
    position: relative;
    padding: 15px;
}

.editable__text {
    font-family: 'Montserrat', sans-serif;
    font-weight: 400;
    font-size: 18px;
    line-height: 1.3;
    color: #fff;
    margin: 0;
}

.editable__btn {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}

.editable__icon {
    width: 20px;
    height: 20px;
}

.hero__right {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.hero__card {
    display: flex;
    justify-content: flex-start;
}

.hero__btn {
    font-family: 'Poppins', sans-serif;
    font-weight: 500;
    font-size: 14px;
    background-color: #cccad7;
    border: none;
    padding: 10px 20px;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.hero__btn:hover {
    background-color: #ac10ea;
    color: #fff;
}

.hero__box {
    background-color: rgba(234, 234, 234, 0.95);
    padding: 20px;
}

.hero__stats {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
    text-align: center;
}

.hero__stat {
    font-family: 'Montserrat', sans-serif;
    font-size: 18px;
    line-height: 1.3;
    text-align: center;
}

.hero__details {
    display: flex;
    justify-content: space-between;
    gap: 20px;
}

.hero__info {
    flex: 1;
}

.hero__info-item {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}

.hero__text {
    font-family: 'Montserrat', sans-serif;
    font-weight: 400;
    font-size: 16px;
    line-height: 1.3;
    margin: 0;
}

.hero__info-group {
    display: flex;
    gap: 30px;
    margin: 20px 0;
}

.hero__icon {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

.hero__achievements-title {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 20px;
    text-align: center;
    margin-bottom: 15px;
}

.hero__achievements-list {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

.hero__achievements-list img {
    width: 40px;
    height: 40px;
}

.hero__badge {
    width: 120px;
    height: auto;
    flex-shrink: 0;
}

.hero__progress {
    margin-top: 15px;
}

.hero__xp {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 14px;
    text-align: center;
    margin-bottom: 10px;
}

.hero__xp-value {
    color: #ac10ea;
}

.hero__progress-bar {
    width: 100%;
    height: 20px;
}

/* ============================================
   Profile Navigation Section
   ============================================ */
.nav-section {
    background-color: #cccad7;
    padding: 15px 0;
}

.nav-section__menu {
    display: flex;
    justify-content: center;
    gap: 40px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.nav-section__link {
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    font-size: 16px;
    color: #000;
    text-decoration: none;
    padding: 8px 16px;
    position: relative;
    transition: color 0.3s ease;
}

.nav-section__link:hover,
.nav-section__link--active {
    color: #530493;
}

.nav-section__link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: #ac10ea;
    transition: width 0.3s ease;
}

.nav-section__link:hover::after,
.nav-section__link--active::after {
    width: 100%;
}

/* Hero Responsive */
@media (max-width: 1024px) {
    .hero__content {
        gap: 20px;
    }
    
    .hero__left {
        width: 250px;
    }
}

@media (max-width: 768px) {
    .hero__content {
        flex-direction: column;
        align-items: center;
    }
    
    .hero__left {
        width: 100%;
        max-width: 300px;
    }
    
    .hero__right {
        width: 100%;
    }
    
    .hero__box {
        width: 100%;
    }
    
    .hero__user-info {
        text-align: center;
    }
    
    .hero__details {
        flex-direction: column;
    }
    
    .nav-section__menu {
        gap: 15px;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .nav-section__link {
        font-size: 14px;
        padding: 6px 12px;
    }
}
