/* AVO Layout Styles - Шапка, навигация и общие контейнеры */

.section-container {
    width: 100%;
    max-width: var(--container-xl);
    margin: 0 auto;
    padding: 0 var(--space-xl);
}

/* ========== HEADER STYLES ========== */

#avo-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 50;
    transition: all 0.5s ease;
    border-bottom: 1px solid transparent;
}

#avo-header #nav-container {
    max-width: var(--container-xl);
    margin: 0 auto;
    padding: 1rem 1.5rem;
    transition: all 0.3s ease;
}

#avo-header .header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Logo */
#avo-header .brand-logo {
    display: flex;
    align-items: center;
    gap: 1rem;
    text-decoration: none;
    transition: transform 0.3s ease;
}

#avo-header .brand-logo:hover {
    transform: scale(1.02);
}

#avo-header .logo-image {
    width: 3.5rem;
    height: 3.5rem;
    filter: brightness(0) invert(1);
    transition: filter 0.3s ease;
}

#avo-header .logo-text {
    color: white;
    transition: color 0.3s ease;
}

#avo-header .logo-text h1 {
    font-family: var(--font-family-heading);
    font-weight: 700;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    line-height: 1.2;
    margin: 0;
}

#avo-header .logo-text span {
    font-size: 0.75rem;
    font-weight: 300;
    letter-spacing: 0.05em;
    opacity: 0.8;
}

/* Desktop Navigation */
#avo-header .desktop-nav {
    display: none;
}

@media (min-width: 1024px) {
    #avo-header .desktop-nav {
        display: block !important;
    }
}

#avo-header .nav-menu {
    display: flex;
    gap: 1.5rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

#avo-header .nav-item {
    position: relative;
}

#avo-header .nav-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 0.25rem;
    font-family: var(--font-family-heading);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: white;
    text-decoration: none;
    border-bottom: 2px solid transparent;
    transition: all 0.3s ease;
    position: relative;
}

#avo-header .nav-link:hover {
    border-bottom-color: var(--color-accent);
}

#avo-header .nav-item.has-children .nav-link::after {
    content: '';
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 4px solid currentColor;
    margin-left: 0.25rem;
    opacity: 0.6;
    transition: transform 0.3s ease;
}

#avo-header .nav-item.has-children:hover .nav-link::after {
    transform: rotate(180deg);
}

#avo-header .nav-icon {
    width: 1.25rem;
    height: 1.25rem;
    filter: brightness(0) invert(1);
    transition: all 0.3s ease;
}

/* ========== MEGA DROPDOWN MENU ========== */
#avo-header .nav-item.has-children:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

#avo-header .dropdown-menu {
    position: absolute;
    top: calc(100% + 0.5rem);
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    min-width: 320px;
    max-width: 600px;
    background: white;
    border-radius: 1rem;
    box-shadow: 0 25px 60px rgba(0,0,0,0.2), 0 0 0 1px rgba(0,0,0,0.05);
    padding: 1.5rem;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 100;
}

#avo-header .dropdown-menu::before {
    content: '';
    position: absolute;
    top: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-bottom: 10px solid white;
}

#avo-header .dropdown-menu li {
    list-style: none;
    margin-bottom: 0.25rem;
}

#avo-header .dropdown-menu li:last-child {
    margin-bottom: 0;
}

#avo-header .dropdown-menu > li > a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1rem;
    color: var(--text-primary);
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: 0.5rem;
    transition: all 0.2s ease;
    position: relative;
}

#avo-header .dropdown-menu > li > a::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 0;
    background: var(--color-accent);
    border-radius: 2px;
    transition: height 0.2s ease;
}

#avo-header .dropdown-menu > li > a:hover {
    background: linear-gradient(135deg, #eff6ff 0%, #f0f9ff 100%);
    color: var(--color-accent);
    padding-left: 1.5rem;
}

#avo-header .dropdown-menu > li > a:hover::before {
    height: 60%;
}

/* Level 3 submenu - вложенные пункты */
#avo-header .dropdown-menu .has-children {
    position: relative;
}

#avo-header .dropdown-menu .has-children > a {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#avo-header .dropdown-menu .has-children > a::after {
    content: '›';
    font-size: 1.25rem;
    font-weight: 400;
    color: var(--color-gray-400);
    transition: all 0.2s ease;
}

#avo-header .dropdown-menu .has-children:hover > a::after {
    color: var(--color-accent);
    transform: translateX(3px);
}

#avo-header .dropdown-menu .has-children .dropdown-menu {
    position: absolute;
    left: calc(100% + 0.5rem);
    top: -1rem;
    transform: translateX(10px) translateY(0);
    min-width: 280px;
}

#avo-header .dropdown-menu .has-children .dropdown-menu::before {
    display: none;
}

#avo-header .dropdown-menu .has-children:hover > .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateX(0) translateY(0);
}

/* Категория с большим количеством подпунктов */
#avo-header .dropdown-menu.mega-menu {
    min-width: 500px;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
}

/* Search Box */
#avo-header .search-wrapper {
    position: relative;
    display: none;
}

@media (min-width: 768px) {
    #avo-header .search-wrapper {
        display: flex;
        align-items: center;
    }
}

#avo-header .search-input {
    padding: 0.5rem 1rem 0.5rem 2.5rem;
    width: 10rem;
    background: white;
    color: var(--text-primary);
    border: none;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

#avo-header .search-input:focus {
    width: 16rem;
    outline: none;
    box-shadow: 0 0 0 2px var(--color-accent);
}

#avo-header .search-icon {
    position: absolute;
    left: 1rem;
    width: 1rem;
    height: 1rem;
    color: var(--color-gray-400);
}

/* Mobile Menu Toggle */
#avo-header .menu-toggle {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 0.375rem;
    width: 2.5rem;
    height: 2.5rem;
    padding: 0.5rem;
    background: transparent;
    border: none;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: background 0.3s ease;
}

@media (min-width: 1024px) {
    #avo-header .menu-toggle {
        display: none;
    }
}

#avo-header .menu-toggle:hover {
    background: rgba(255,255,255,0.1);
}

#avo-header .hamburger-line {
    width: 1.75rem;
    height: 2px;
    background: white;
    transition: all 0.3s ease;
    transform-origin: center;
}

/* Scrolled State */
.header-scrolled {
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.header-scrolled #nav-container {
    padding-top: 0.5rem !important;
    padding-bottom: 0.25rem !important;
}

.header-scrolled .logo-image {
    filter: none !important;
}

.header-scrolled .logo-text,
.header-scrolled .logo-text h1,
.header-scrolled .logo-text span {
    color: var(--text-primary) !important;
}

.header-scrolled .nav-link {
    color: var(--text-primary) !important;
}

.header-scrolled .nav-link:hover {
    color: var(--color-accent) !important;
    border-color: var(--color-accent) !important;
}

.header-scrolled .nav-icon {
    filter: none !important;
}

.header-scrolled .hamburger-line {
    background: var(--text-primary) !important;
}

.header-scrolled .search-input {
    background: var(--color-gray-100) !important;
}

/* ========== MOBILE MENU ========== */

#mobile-menu {
    position: fixed;
    inset: 0;
    z-index: 40;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    clip-path: inset(0 0 0 100%);
    transition: clip-path 0.6s cubic-bezier(0.77, 0, 0.175, 1);
}

#mobile-menu.menu-open {
    clip-path: inset(0 0 0 0);
}

#mobile-menu .menu-bg {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, #0f172a 20%, #1e40af 40%, #3b82f6 50%, #1e40af 60%, #0f172a 80%);
    background-attachment: fixed;
}

#mobile-menu .menu-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, transparent 45%, rgba(255,255,255,0.1) 50%, transparent 55%);
    background-attachment: fixed;
}

#mobile-menu .menu-glow-1 {
    position: absolute;
    top: -6rem;
    left: -6rem;
    width: 24rem;
    height: 24rem;
    background: rgba(59, 130, 246, 0.2);
    border-radius: 50%;
    filter: blur(100px);
}

#mobile-menu .menu-glow-2 {
    position: absolute;
    top: 50%;
    right: -5rem;
    width: 16rem;
    height: 16rem;
    background: rgba(34, 211, 238, 0.1);
    border-radius: 50%;
    filter: blur(48px);
}

#mobile-menu-nav {
    position: relative;
    z-index: 10;
    transform: translateX(3rem);
    opacity: 0;
    transition: all 0.8s cubic-bezier(0.19, 1, 0.22, 1);
}

.menu-open #mobile-menu-nav {
    transform: translateX(0);
    opacity: 1;
}

#mobile-menu .mobile-nav-list {
    list-style: none;
    margin: 0;
    padding: 0 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

#mobile-menu .mobile-nav-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    font-family: var(--font-family-heading);
    font-size: 1.25rem;
    font-weight: 700;
    color: white;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    text-decoration: none;
    transition: color 0.3s ease;
    padding: 0.5rem 0;
}

#mobile-menu .mobile-nav-link:hover {
    color: var(--color-accent-light);
}

#mobile-menu .mobile-nav-text {
    display: flex;
    align-items: center;
    gap: 1rem;
}

#mobile-menu .mobile-nav-icon {
    width: 1.75rem;
    height: 1.75rem;
    filter: brightness(0) invert(1);
    transition: transform 0.3s ease;
}

#mobile-menu .mobile-nav-link:hover .mobile-nav-icon {
    transform: scale(1.1);
}

/* Mobile Menu Items with Children (Accordion) */
#mobile-menu .mobile-nav-item {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 1rem;
}

#mobile-menu .mobile-nav-item:last-child {
    border-bottom: none;
}

#mobile-menu .mobile-nav-item.has-children .mobile-nav-link {
    justify-content: space-between;
    padding-right: 0.5rem;
}

#mobile-menu .mobile-nav-item.has-children .mobile-nav-link .submenu-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 0.5rem;
    transition: all 0.3s ease;
}

#mobile-menu .mobile-nav-item.has-children .mobile-nav-link .submenu-toggle svg {
    width: 1.25rem;
    height: 1.25rem;
    transition: transform 0.3s ease;
}

#mobile-menu .mobile-nav-item.has-children.open .submenu-toggle {
    background: var(--color-accent);
}

#mobile-menu .mobile-nav-item.has-children.open .submenu-toggle svg {
    transform: rotate(180deg);
}

/* Mobile Submenu */
#mobile-menu .mobile-submenu {
    list-style: none;
    margin: 0;
    padding: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

#mobile-menu .mobile-nav-item.open .mobile-submenu {
    max-height: 500px;
}

#mobile-menu .mobile-submenu li {
    padding-left: 4rem;
}

#mobile-menu .mobile-submenu a {
    display: block;
    padding: 0.75rem 1rem;
    color: rgba(255, 255, 255, 0.7);
    font-family: var(--font-family-heading);
    font-size: 1rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
    border-left: 2px solid transparent;
}

#mobile-menu .mobile-submenu a:hover {
    color: white;
    background: rgba(255, 255, 255, 0.05);
    border-left-color: var(--color-accent);
    padding-left: 1.5rem;
}

/* Level 3 in mobile */
#mobile-menu .mobile-submenu .mobile-submenu {
    padding-left: 1rem;
}

#mobile-menu .mobile-submenu .mobile-submenu a {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.5);
}

/* Hamburger Animation */
.menu-active .hamburger-line:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.menu-active .hamburger-line:nth-child(2) {
    opacity: 0;
    transform: translateX(-20px);
}

.menu-active .hamburger-line:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

/* ========== FOOTER ========== */

#avo-footer {
    background: #0f172a;
    color: white;
    border-top: 4px solid var(--color-accent);
}

#avo-footer .footer-container {
    max-width: var(--container-xl);
    margin: 0 auto;
    padding: 4rem 1.5rem;
}

#avo-footer .footer-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
    margin-bottom: 3rem;
}

@media (min-width: 768px) {
    #avo-footer .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    #avo-footer .footer-grid {
        grid-template-columns: 1fr 1fr 1fr 1fr;
    }
}

#avo-footer .footer-brand {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

#avo-footer .footer-logo {
    width: 4rem;
    height: 4rem;
    padding: 0.25rem;
    border: 2px solid white;
    border-radius: 0.75rem;
    filter: brightness(0) invert(1);
}

#avo-footer .footer-title {
    font-family: var(--font-family-heading);
    font-weight: 700;
    font-size: 0.875rem;
    line-height: 1.4;
}

#avo-footer .footer-desc {
    color: #94a3b8;
    font-size: 0.875rem;
    line-height: 1.7;
    margin-bottom: 1.5rem;
}

#avo-footer .footer-heading {
    font-family: var(--font-family-heading);
    font-weight: 700;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 1.5rem;
}

#avo-footer .footer-links {
    list-style: none;
    margin: 0;
    padding: 0;
}

#avo-footer .footer-links li {
    margin-bottom: 0.75rem;
}

#avo-footer .footer-links a {
    color: #94a3b8;
    font-size: 0.875rem;
    text-decoration: none;
    transition: color 0.3s ease;
}

#avo-footer .footer-links a:hover {
    color: white;
}

#avo-footer .footer-contact {
    list-style: none;
    margin: 0;
    padding: 0;
}

#avo-footer .footer-contact li {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 1rem;
    color: #94a3b8;
    font-size: 0.875rem;
}

#avo-footer .footer-contact svg {
    width: 1.25rem;
    height: 1.25rem;
    color: var(--color-accent);
    flex-shrink: 0;
}

#avo-footer .footer-contact a {
    color: #94a3b8;
    text-decoration: none;
    transition: color 0.3s ease;
}

#avo-footer .footer-contact a:hover {
    color: white;
}

#avo-footer .footer-bottom {
    padding-top: 2rem;
    border-top: 1px solid #1e293b;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: center;
    font-size: 0.75rem;
    color: #64748b;
}

@media (min-width: 768px) {
    #avo-footer .footer-bottom {
        flex-direction: row;
        justify-content: space-between;
    }
}

#avo-footer .footer-bottom-links {
    display: flex;
    gap: 1.5rem;
}

#avo-footer .footer-bottom-links a {
    color: #64748b;
    text-decoration: none;
    transition: color 0.3s ease;
}

#avo-footer .footer-bottom-links a:hover {
    color: white;
}

/* ========== BREADCRUMBS ========== */

.avo-breadcrumbs {
    background: linear-gradient(135deg, #0f172a 0%, #1e3a5f 100%);
    padding: 8rem 0 2rem;
}

.avo-breadcrumbs .breadcrumb-container {
    max-width: var(--container-xl);
    margin: 0 auto;
    padding: 0 1.5rem;
}

.avo-breadcrumbs nav {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.avo-breadcrumbs a,
.avo-breadcrumbs span {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: color 0.3s ease;
}

.avo-breadcrumbs a:hover {
    color: white;
}

.avo-breadcrumbs .separator {
    color: rgba(255, 255, 255, 0.4);
}

.avo-breadcrumbs .current {
    color: white;
    font-weight: 600;
}

/* ========== CONTENT AREA ========== */

.avo-content {
    padding: 3rem 0;
    min-height: 50vh;
}

.avo-content .content-container {
    max-width: var(--container-xl);
    margin: 0 auto;
    padding: 0 1.5rem;
}

.avo-content article {
    background: white;
    border-radius: 1rem;
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.avo-content h1,
.avo-content h2 {
    font-family: var(--font-family-heading);
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.avo-content h1 {
    font-size: 2rem;
    font-weight: 800;
}

.avo-content h2 {
    font-size: 1.5rem;
    font-weight: 700;
}

.avo-content p {
    line-height: 1.8;
    margin-bottom: 1rem;
    color: var(--text-secondary);
}

.avo-content a {
    color: var(--color-accent);
    text-decoration: none;
    transition: color 0.3s ease;
}

.avo-content a:hover {
    color: var(--color-accent-dark);
    text-decoration: underline;
}

.avo-content img {
    max-width: 100%;
    height: auto;
    border-radius: 0.5rem;
}

.avo-content ul,
.avo-content ol {
    margin-bottom: 1rem;
    padding-left: 1.5rem;
}

.avo-content li {
    margin-bottom: 0.5rem;
    line-height: 1.6;
}
