:root {
    --layout-max-width: 640px;

    --layout-gap-min: 1.5rem;
    --layout-gap-max: 1.5rem;
    --layout-gap: clamp(var(--layout-gap-min), 1.1vw, var(--layout-gap-max));
    --container-padding: 1rem;
    --footer-height: 4.75rem;
    --layout-radius: 1rem;
    --header-height: 4rem;
}

@media (min-width: 768px) {
    :root {
        --header-height: 4rem;
        --container-width: 720px;
        --container-xl-width: 840px;
    }
}

@media (min-width: 992px) {
    :root {
        --header-height: 5rem;
        --container-width: 960px;
        --container-xl-width: 990px;
    }
}

@media (min-width: 1200px) {
    :root {
        --header-height: 5rem;
        --container-xl-width: 1260px;
    }
}

@media (min-width: 1400px) {
    :root {
        --header-height: 5rem;
        --container-width: 1320px;
         --container-xl-width: 1480px;
     }
 }

 .container {
     width: 100%;
     margin-left: auto;
     margin-right: auto;
     padding-left: var(--container-padding, 1rem);
     padding-right: var(--container-padding, 1rem);
     box-sizing: border-box;
     max-width: var(--container-width);
 }

 .container-xl {
     width: 100%;
     margin-left: auto;
     margin-right: auto;
     padding-left: var(--container-padding, 1rem);
     padding-right: var(--container-padding, 1rem);
     box-sizing: border-box;
     max-width: var(--container-xl-width);
 }

 .app {
     /*
     display: flex;
     flex-direction: column;
     align-items: center;
     justify-content: center;
     position: relative;*/
}

@media (min-width: 992px) {
    .app {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
    }
}



/**/

/**/


.app-header {
    --header-color: var(--text-secondary);
    color: var(--header-color);
    user-select: none;
    z-index: 1000;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    height: var(--header-height);
    border-radius: var(--layout-radius);
    border-bottom: 1px solid #121212;
    background-color: rgb(255 255 255 / 0%);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.ah-container {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    height: 100%;
}

.app-header .container {
    height: 100%;
}
@media (max-width: 992px) {
    .app-header .container {
        padding: 0;
    }
}


.sticky-header {
    position: sticky;
    top: 0;
    transition: transform 0.3s ease;
    z-index: 1000;
}

/**/

.ah-btn {
    position: relative;
    border-left: 1px solid #121212;
    border-right: 1px solid #121212;
    font-weight: 600;
    letter-spacing: -0.5px;
    padding: 0 2rem;
    height: 100%;
    display: flex;
    align-items: center;
}
@media (max-width: 992px) {
    .ah-btn {
        border: unset;
        padding: 0 1rem;
    }
}
.ah-btn a:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%
}

.ah-logo {
    font-size: 1.3rem;
    --ah-color: #fff;
    user-select: none;
}
@media (max-width: 992px) {
    .ah-logo {
        font-size: 1.25rem;
    }
}
.ah-logo:hover {
    background-color: #121212;
}
.ah-logo a {
    color: var(--ah-color);
}

.ah-login {
    font-size: 1rem;
    --ah-color: #fff;
}
.ah-login:hover {
    background-color: #121212;
}
.ah-login a {
    color: var(--ah-color);
}

/**/

.app-header-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5em;
    color: inherit;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.2s ease;
}

.app-header-btn svg {
    width: 1.6em;
    height: 1.6em;
}

.app-header-btn:hover {
    opacity: 0.7;
}





/**/








.xxx-app-layout {
    width: 100%;
    margin-left: auto;
    margin-right: auto;
}

@media (min-width: 768px) {
    .xxx-app-layout {

    }
}
@media (min-width: 992px) {
    .xxx-app-layout {
        grid-template-columns: var(--sidebar-width) 1fr;
        gap: var(--layout-gap);
    }
}
@media (min-width: 1200px) {
    .xxx-app-layout {

    }
}
@media (min-width: 1400px) {
    .xxx-app-layout {

    }
}

.xxx-app-layout-full {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--layout-gap);
}

.xxx-app-layout-3 {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--layout-gap);
}
@media (min-width: 992px) {
    .xxx-app-layout-3 {
        grid-template-columns: var(--sidebar-width) 1fr var(--sidebar-width);
    }
}
.xxx-app-layout-2 {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--layout-gap);
}
@media (min-width: 992px) {
    .xxx-app-layout-2 {
        grid-template-columns: var(--sidebar-width) 1fr;
    }
}




.app-home-layout {
    width: 100%;
    margin-left: auto;
    margin-right: auto;

}
@media (min-width: 991px) {
    .app-home-layout {

    }
}
.app-layout-full {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--layout-gap);
}

.app-layout-3-col {
    display: grid;
    max-width: var(--layout-max-width);
    grid-template-columns: 1fr;
    gap: var(--layout-gap);
}

@media (min-width: 768px) {
    .app-layout-3-col {
        max-width: var(--container-width);
    }
}
@media (min-width: 992px) {
    .app-layout-3-col {
        grid-template-columns: var(--sidebar-width) 1fr;
        gap: var(--layout-gap);
        max-width: var(--container-width);
        padding: 1rem 0;
    }
}
@media (min-width: 1200px) {
    .app-layout-3-col {
        max-width: var(--container-width);
    }
}
@media (min-width: 1400px) {
    .app-layout-3-col {
        max-width: var(--container-width);
    }
}


.app-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--layout-gap);
    width: 100%;
    max-width: var(--layout-max-width);
    margin-left: auto;
    margin-right: auto;
    padding: 1rem 0;
}

@media (min-width: 768px) {
    .app-layout {
        max-width: var(--container-width);
    }
}
@media (min-width: 992px) {
    .app-layout {
        grid-template-columns: var(--sidebar-width) 1fr;
        gap: var(--layout-gap);
        max-width: var(--container-width);
        padding: 1rem 0;
    }
}
@media (min-width: 1200px) {
    .app-layout {
        max-width: var(--container-width);
    }
}
@media (min-width: 1400px) {
    .app-layout {
        max-width: var(--container-width);
    }
}

.content-layout {
    width: 100%;
}

.content-layout-single {
    display: grid;
    grid-template-columns: 1fr;
}

.content-layout-duo {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--layout-gap);
}

@media (min-width: 992px) {
    .content-layout-duo {
        grid-template-columns: 1fr var(--sidebar-width);
    }
}


/**/

.app-content {
    min-height: calc(100svh - 5rem);
    display: flex;
    flex-direction: column;
    gap: 1rem;
    min-width: 100%;
    position: relative;
    background-image: url(/resources/images/svg/forbg.svg);
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center;
}


@media(max-width: 992px) {

    .app-content {
        height: auto;
        overflow-y: unset;
        padding: 0;
    }
}




/**/

.page-simple {
    padding: 2rem 0;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    background: var(--body-bg);
}
.page-simple .container {
    display: flex;
    justify-content: center;
    align-items: center;
}
@media (max-width: 991px) {
    .page-simple {
        height: unset;
        padding: 1rem 0
    }
}

.page-simple-window {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    background: #fff;
    border-radius: 1.5rem;
    padding: 1.5rem 1.75rem;
    width: 100%;
    box-shadow: 0 8px 24px rgba(0,0,0,0.10);
}

.page-simple-window-width-800 {
    min-width: 800px;
    max-width: 800px;
}

.page-simple-window-shadow {
    box-shadow: 0 8px 24px rgba(0,0,0,0.10);
}

.page-simple-window-top {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}
.page-simple-window-bottom {
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
}

.page-simple-window-wrap-column {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}
.page-simple-window-wrap-row {
    display: flex;
    flex-direction: row;
    gap: 1.5rem;
}

.page-simple-window-header {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding: 0 0 0.75rem;
    border-bottom: 1px solid #dee2e6;
}
.page-simple-window-title {
    font-size: 1.5rem;
    color: var(--text-primary);
}
.page-simple-window-title-info {
    font-size: 0.95rem;
    color: #7e7281
}
.page-simple-window-title-info a {
    font-weight: 500;
    text-decoration: underline;
}
@media (max-width: 991px) {
    .page-simple-window {
        padding: 1.25rem;
    }

    .page-simple-window-width-800 {
        min-width: unset;
    }
    .page-simple-window-title {
        font-size: 1.25rem;
    }
}


/**/

/**/

.window {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    background: var(--surface-1);
    border-radius: 1.5rem;
    padding: 1.5rem 1.75rem;
    width: 100%;
}
.window-min-width-450 {
    min-width: 450px;
}
.window-max-width-450 {
    max-width: 450px;
}
.window-width-600 {
    max-width: 600px;
}
.window-width-800 {
    min-width: 800px;
    max-width: 800px;
}

.window-shadow {
    box-shadow: 0 8px 24px rgba(0,0,0,0.10);
}
.window-shadow-green {
    box-shadow: 0 8px 24px rgba(52, 187, 120, 0.30);
}
.window-icon {
    position: absolute;
    top: -2rem;
    right: -2rem;
    width: 5rem;
    height: 5rem
}

.window-wrap-column {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}
.window-wrap-row {
    display: flex;
    flex-direction: row;
    gap: 1.5rem;
}

.window-header {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 0 0 0.75rem;
    border-bottom: 1px solid #dee2e6;
}
.window-title {
    font-size: 1.5rem;
    color: var(--text-primary);
}
.window-title-info {
    font-size: 0.95rem;
    color: #7e7281
}
.window-title-info a {
    font-weight: 500;
    text-decoration: underline;
}
@media (max-width: 991px) {
    .window-min-width-450, .window-max-width-450, .window-width-600, .window-width-800 {
        min-width: unset;
    }
    .window-title {
        font-size: 1.25rem;
    }
}

/**/

@keyframes fadeIn {
    from {opacity: 0; transform: translateY(5px);}
    to {opacity: 1; transform: translateY(0);}
}

.app-overlay {
    position: fixed;
    inset: 0;
    opacity: 0;
    visibility: hidden;
    background: rgba(0, 0, 0, 0.06);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    transition: opacity 0.3s ease, visibility 0.3s ease;
    will-change: opacity, transform;
    filter: grayscale(1);
}

.app-overlay.is-active {
    opacity: 1;
    visibility: visible;
}

/* 🔹 overlay ТОЛЬКО под header */
.app-overlay[data-mode="content"] {
    top: var(--header-height);
}

/* 🔹 overlay на весь экран */
.app-overlay[data-mode="full"] {
    top: 0;
}


.scroll-locked {
   overflow: hidden;
}


/**/

/* === Skeleton wrapper === */
.img-skeleton {
    position: relative;
    width: 100%;
    height: 100%;
    background: #121212;
    overflow: hidden;
}
.img-skeleton-transparent {
    border-radius: 0;
    background: transparent;
}
/* shimmer */
.img-skeleton::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
            90deg,
            rgba(255,255,255,0) 0%,
            rgba(255,255,255,0.6) 50%,
            rgba(255,255,255,0) 100%
    );
    transform: translateX(-100%);
    animation: shimmer 1.2s infinite;
}

@keyframes shimmer {
    100% {
        transform: translateX(100%);
    }
}

/* === Image itself === */
.img-skeleton img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity .4s ease;
}

/* === Loaded state === */
.img-skeleton.is-loaded::after {
    display: none;
}

.img-skeleton.is-loaded img {
    opacity: 1;
}


/**/

.content-view {
    min-width: 100%;
    /*  max-width: var(--content-view-max-width);*/
    margin-left: auto;
    margin-right: auto;
    width: 100%;
}



/* Основной контейнер */
[data-mega-menu-container] {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: #ffffff;
    color: #000;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease-in-out;
    z-index: 100;
    padding: 40px 0;
}

/* Активное состояние */
[data-mega-menu-container][data-state="open"] {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Сетка внутри */
.mega-menu-content {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.mega-menu-column h3 {
    margin-bottom: 15px;
    font-size: 1.2rem;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
    color: #000;
}

.mega-menu-column ul {
    list-style: none;
    padding: 0;
}

.mega-menu-column ul li {
    margin-bottom: 8px;
}

.mega-menu-promo {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
}

@media (max-width: 991px) {
    .ah-nav {
         padding: 0 1rem;
    }
}

/* Контейнер кнопки */
.ah-burger {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 20px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    position: relative;
    z-index: 101; /* Выше чем меню */
    color: #fff
}
@media (max-width: 991px) {
    .ah-burger {
        width: 25px;
        height: 15px;
    }
}

/* Линии */
.ah-burger-line {
    display: block;
    width: 100%;
    height: 2px;
    background-color: currentColor; /* Цвет наследуется от текста кнопки/родителя */
    transition: transform 0.3s ease, opacity 0.3s ease;
    transform-origin: center;
}

/* Анимация в крестик (состояние open) */
[data-mega-menu-trigger][data-state="open"] .ah-burger-line:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
}

[data-mega-menu-trigger][data-state="open"] .ah-burger-line:nth-child(2) {
    opacity: 0;
}

[data-mega-menu-trigger][data-state="open"] .ah-burger-line:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
}