:root{
    --blue: #103a6b;
    --blue-2: #0a3263;
    --text: #fff;
    --muted: #6b7280;
    --bg: #f5f7fb;
    --radius: clamp(0.533rem, 0.833vw, 1rem);
    --border-color: #FCEDC6;
    --stem-blue: #035F47;
    --black: #333333;
    --font-main: 'Nunito', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
    --font-stem: 'Stem-Medium', 'Stem-Regular', sans-serif;
    --transition-fast: 0.22s ease;
    --transition-normal: 0.3s ease;
    --shadow-card: 0 10px 28px rgba(4,20,50,0.08);
    --shadow-header: 0 6px 22px rgba(0,0,0,0.08);
    --shadow-modal: 0 18px 50px rgba(16,27,60,0.18);
    --shadow-image: 0 10px 34px rgba(0,0,0,0.35);
    --padding-container: 3.90625vw;
    --submenu-radius: clamp(0.667rem, 1.041vw, 1.25rem);
    --btn-radius: clamp(0.4rem, 0.625vw, 0.75rem);

    /* ---- adaptive font-size variables (clamp) ----
       Goal: match designer sizes at 1280px and 400px,
       remain large/unchanged on 1920px+ when needed.
    */
    --fs-body: clamp(16px, 1.354vw, 26px);                    /* body, .hero-text p, .btn, teacher-desc at 1280 -> 18, 400 -> 16 */
    --fs-btn: var(--fs-body);
    --fs-btn-submit: 17.611px;                              /* exact per designer */

    --fs-title-small: clamp(14px, 1.6vw, 22px);             /* .class-card__title, .course-card__description-title, .course-card__teacher-title, .course-card__dates-title -> 1280 = 22, 400 = 14 */
    --fs-title-large: clamp(20px, 2.5vw, 34px);             /* .cal-title, .course-card__title -> 1280 = 34, 400 = 24(min) */

    --fs-hero-h1: clamp(28px, 2.8vw, 50px);                 /* hero large heading (keeps original large on wide screens) */
    --fs-hero-sub: clamp(20px, 2.2vw, 40px);

    --fs-small: clamp(12px, 1vw, 12px);                     /* calendar-day span (fixed 12 per designer at 1280) */
    --fs-datedate: clamp(12px, 1.6vw, 24px);                /* .course-card__dates-item-date — 24 on large, 12 on small */
    --fs-datetime: clamp(10px, 1vw, 20px);                  /* .course-card__dates-item-time */

    /* layout helpers */
    --container-max: 1620px;
}
body {
    padding: 0 !important;
}
/* header */
header .container{max-width:1920px;padding-inline:var(--padding-container);}

.site-header{
    position: sticky;
    top: 0;
    z-index: 1000;
    background: var(--blue-2);
    height: clamp(86.5px,9.01vw, 173px);
    color: var(--text);
    box-shadow: var(--shadow-header);
}

.header-inner{
    display:flex;
    flex-direction:row;
    justify-content:space-between;
    align-items:center;
    height:100%;
    gap:clamp(12px, 1.25vw, 24px);
}

.logo img{
    width: clamp(70px, 7.292vw, 140px);
    max-width: max-content;
}

.logo-text{
    font-weight:700;
    font-size:20px;
    color:var(--text);
    text-decoration:none;
}

.header-contacts{
    display:flex;
    flex-direction:column;
    align-items:flex-end;
    gap:6px;
}
.header-contacts .phone,
.header-contacts .city{
    font-weight:700;
    font-size:var(--fs-body);
    line-height:100%;
    color:var(--text);
}
.header-contacts .city{font-weight:400;}

.burger{
    display:none;
    flex-direction:column;
    gap:6px;
    background:none;
    border:0;
    width:44px;
    height:44px;
    justify-content:center;
    align-items:center;
}
.burger span{
    display:block;
    width:24px;
    height:2px;
    background:var(--text);
}

/* main nav */
.main-nav{position:relative;font-size:var(--fs-body);}

.main-nav .menu{
    list-style:none;
    margin:0;
    padding:0;
    display:flex;
    gap:clamp(17.5px, 1.823vw, 35px);
    background-color:unset;
}
.main-nav .menu > li{position:relative;padding:0;}

.main-nav .menu > li:nth-child(3) > a::before {
    content:"";
    width:30px;
    height:30px;
    position:absolute;
    top: -4px;
    right: -29px;
    background-image: url("https://roasl.ru/wp-content/uploads/2025/08/vector.svg");
    background-size:contain;
    background-repeat:no-repeat;
    transition:var(--transition-normal);
}
@media (min-width: 1025px) {
    .main-nav .menu > li:nth-child(3):hover > a::before {
        right: -20px;
    }
}

/* underline animation */
.main-nav .menu > li > a{
    position:relative;
    display:block;
    color:var(--text);
    text-decoration:none;
    white-space:nowrap;
    padding-bottom:3px;
}
.main-nav .menu > li > a::after{
    content:'';
    position:absolute;
    left:50%;
    bottom:0;
    width:0;
    height:2px;
    /*background-color:var(--border-color);*/
    /*transform:translateX(-50%);*/
    transition:var(--transition-normal);
}
/*.main-nav .menu > li:hover > a::after{ width:100%; }*/

/* sub-menu */
@media (min-width: 1025px) {
    .main-nav .menu > li:hover > .sub-menu{
        opacity:1;
        visibility:visible;
        transform:translateY(0);
        list-style: none;
    }
}
.main-nav .sub-menu{
    position:absolute;
    left:0;
    top:100%;
    min-width:clamp(11.433rem, 17.865vw, 21.438rem);
    background:#fff;
    color:var(--text);
    border-radius:var(--submenu-radius);
    box-shadow:var(--shadow-modal);
    opacity:0;
    visibility:hidden;
    transform:translateY(clamp(0.333rem, 0.521vw, 0.625rem));
    transition:var(--transition-fast);
    overflow: hidden;
}
.main-nav .sub-menu li a{
    color: #000;
    padding:clamp(0.333rem, 0.521vw, 0.625rem) clamp(0.667rem, 1.041vw, 1.25rem);;
    /*border-radius:var(--btn-radius);*/
    display:block;
}
.main-nav .sub-menu li a:hover{ background:var(--stem-blue); color: #fff; opacity:1; }


@media (max-width:1200px) {
    .header-contacts .phone, .header-contacts .city {
        font-size: clamp(16px, 1.2vw, 18px);
        text-wrap: nowrap;
    }
}
@media (max-width:1024px) {
    .burger {
        display: flex;
        z-index: 9999;
    }
.header {
    background: white;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: relative;
    z-index: 1000;
}

.logo {
    font-size: 24px;
    font-weight: bold;
    color: var(--blue-2);
}

/* Кнопка бургера */
.burger {
    display: flex;
    flex-direction: column;
    width: 30px;
    height: 24px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1001 !important;
}

.burger span {
    width: 100%;
    height: 3px;
    background-color: #fff;
    border-radius: 2px;
    transition: all 0.3s ease;
    transform-origin: center;
}

.burger span:nth-child(1) {
    /*margin-bottom: 6px;*/
}

.burger span:nth-child(2) {
    /*margin-bottom: 6px;*/
}

.burger.active span:nth-child(1) {
    transform: rotate(45deg) translate(7px, 7px);
}

.burger.active span:nth-child(2) {
    opacity: 0;
}

.burger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

/* Основные стили меню */
.main-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: var(--roasl-emerald-deep);
    backdrop-filter: blur(10px);
    transform: translateX(-100%);
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    z-index: 999;
    overflow-y: auto;
    padding-top: 100px;
}

.main-nav.open {
    transform: translateX(0);
    opacity: 1;
    visibility: visible;
}

.main-nav .menu {
    list-style: none;
    margin: 0;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 0;
    background-color: transparent;
}

.main-nav .menu > li {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    overflow: hidden;
}

.main-nav .menu > li:last-child {
    border-bottom: none;
}

.main-nav .menu > li > a {
    display: flex;
    align-items: center;
    justify-content: start;
    color: white;
    text-decoration: none;
    padding: 18px 0;
    font-size: 18px;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
    gap:3%;

}

.main-nav .menu > li.menu-item-has-children > a::after {
    content: '>';
    font-weight: 300;
    transition: transform 0.3s ease;
    display: block;
    position: static;
    font-size: inherit;
    text-align: center;
    width: 25px;
    height: 25px;
}

.main-nav .menu > li.menu-item-has-children.submenu-open > a::after {
    transform: rotate(90deg);
}

@media (hover: hover) {
    .main-nav .menu > li > a:hover {
        color: #fff;
        padding-left: 10px;
    }
    .main-nav .menu > li.menu-item-has-children > a:hover::after {
        transform: rotate(90deg);
    }
}

/* Подменю */
.main-nav .sub-menu {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    margin: 0;
    padding: 0;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    transform: translateY(-10px);
    position: relative;

}

.main-nav .menu > li.submenu-open .sub-menu {
    max-height: 600px;
    opacity: 1;
    transform: translateY(0);
    padding: 15px 0;
    margin: 0 0 15px 0;
    visibility: visible;
}

.main-nav .sub-menu li {
    list-style: none;
}

.main-nav .sub-menu li a {
    color: rgba(255, 255, 255, 0.9);
    padding: 12px 20px;
    display: block;
    font-size: 16px;
    font-weight: 400;
    border-radius: 6px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.main-nav .sub-menu li a::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.1);
    transition: left 0.3s ease;
}

.main-nav .sub-menu li a:hover::before {
    left: 0;
}

.main-nav .sub-menu li a:hover {
    color: white;
    transform: translateX(5px);
}

/* Анимация появления пунктов меню */
.main-nav.open .menu > li {
    animation: slideInFromLeft 0.6s ease forwards;
}

.main-nav.open .menu > li:nth-child(1) { animation-delay: 0.1s; }
.main-nav.open .menu > li:nth-child(2) { animation-delay: 0.15s; }
.main-nav.open .menu > li:nth-child(3) { animation-delay: 0.2s; overflow: visible }
.main-nav.open .menu > li:nth-child(4) { animation-delay: 0.25s; }
.main-nav.open .menu > li:nth-child(5) { animation-delay: 0.3s; }
.main-nav.open .menu > li:nth-child(6) { animation-delay: 0.35s; }

@keyframes slideInFromLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

}

@media (max-width:768px) {
    .logo {
        flex: 1;
        height: 100%;
    }
    .logo img {
        width: 80%;
        height: 100%;
        flex: 1;
    }
}