/* Antishkola Premium Menu Styling Overrides
 *
 * Scope ALL chrome to `.t451m` (present in both Tilda `#allrecords` and
 * blog/teacher `#blog-global-menu`). Do NOT scope link colors only to page
 * root IDs — that regresses whenever a new menu root appears or an old
 * immutable CSS cache misses a dual-ID edit.
 *
 * Tailwind preflight sets `a { color: inherit }`. Body text is dark, menu
 * panel is dark → invisible links unless `.t451m` itself carries a light
 * color AND links set an explicit white. Both layers are intentional.
 */

/* Sidebar Background and Overlay */
.t451m,
.t451m__container {
    background-color: #0A0F12 !important;
    color: #ffffff !important; /* defense: Tailwind a{color:inherit} → white */
    padding-top: 40px !important;
}

.t451m__overlay_bg {
    background-color: rgba(10, 15, 18, 0.8) !important;
    backdrop-filter: blur(8px);
}

/* Close button styling */
.t451m__close-button {
    top: 15px !important;
    right: 15px !important;
    background-color: transparent !important;
    border: none !important;
}

.t451m__close_icon span {
    background-color: #ffffff !important;
    height: 2px !important;
}

/* List spacing and border lines */
.t451m__list {
    padding-left: 0 !important;
    margin: 0 !important;
    overflow: visible !important;
}

.t451m__list_item {
    border-bottom: 1px solid rgba(229, 229, 227, 0.08) !important;
    padding: 6px 0 !important;
    list-style-type: none !important;
    overflow: visible !important;
    text-indent: 0 !important;
}

.t451m__list_item:last-child {
    border-bottom: none !important;
}

/* Section header for grouping */
.t451m__list_item.menu-section-header {
    font-family: 'Manrope', system-ui, sans-serif !important;
    font-size: 10px !important;
    font-weight: 800 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.18em !important;
    color: rgba(255, 255, 255, 0.3) !important;
    margin-top: 18px !important;
    margin-bottom: 4px !important;
    padding-bottom: 2px !important;
    border-bottom: none !important;
    list-style-type: none !important;
}

.t451m__list_item.menu-section-header:first-child {
    margin-top: 0 !important;
}

/* Main link styling — Space Grotesk H3-style (scoped to .t451m only) */
.t451m .t451m__list_item a.t-menu__link-item {
    font-family: 'Space Grotesk', 'Manrope', system-ui, sans-serif !important;
    font-weight: 700 !important;
    font-size: clamp(1.15rem, 3vw, 1.35rem) !important;
    text-transform: uppercase !important;
    letter-spacing: -0.02em !important;
    color: #ffffff !important;
    padding: 6px 0 !important;
    margin: 0 !important;
    display: inline-flex !important;
    align-items: center !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    overflow: visible !important;
    text-indent: 0 !important;
    white-space: normal !important;
    transition: color 0.18s ease, transform 0.18s ease !important;
    text-decoration: none !important;
}

.t451m .t451m__list_item a.t-menu__link-item:hover {
    color: #FFE600 !important;
    transform: translateX(5px) !important;
}

.t451m .t451m__list_item a.t-menu__link-item.t-active {
    color: #FFE600 !important;
}

/* Fix submenu layout: force block layout and static positioning so Tilda's JS absolute positions are ignored */
.t451m .t451m__list_item .t-menusub {
    position: static !important;
    display: block !important;
    height: auto !important;
    width: 100% !important;
}

.t451m .t451m__list_item .t-menusub__menu {
    position: static !important;
    background-color: transparent !important;
    box-shadow: none !important;
    border: none !important;
    max-width: 100% !important;
    padding: 4px 0 4px 0 !important;
    margin: 0 !important;
    opacity: 1 !important;
    display: none; /* Managed by Tilda / blog-global-menu toggler */
}

.t451m .t451m__list_item .t-menusub__menu.t-menusub__menu_show {
    display: block !important;
}

/* Chevron rotating helper if classes present */
.t-menusub__target-link .t-menusub__arrow {
    transition: transform 0.2s ease !important;
}

.t-menusub__target-link.t-menusub__target-link_active .t-menusub__arrow {
    transform: rotate(180deg) !important;
}

/* Submenu container thin vertical line styling */
.t451m .t-menusub__list {
    margin: 8px 0 8px 6px !important;
    padding-left: 18px !important;
    border-left: 1px solid rgba(229, 229, 227, 0.15) !important;
    text-align: left !important;
}

.t451m .t-menusub__list-item {
    margin-bottom: 8px !important;
    list-style-type: none !important;
}

.t451m .t-menusub__list-item:last-child {
    margin-bottom: 0 !important;
}

.t451m .t-menusub__list-item a.t-menusub__link-item {
    font-family: 'Manrope', system-ui, sans-serif !important;
    font-weight: 500 !important;
    font-size: 15px !important;
    color: rgba(255, 255, 255, 0.65) !important;
    padding: 4px 0 !important;
    text-transform: none !important;
    letter-spacing: normal !important;
    transition: color 0.18s ease !important;
    text-align: left !important;
    text-decoration: none !important;
}

.t451m .t-menusub__list-item a.t-menusub__link-item:hover {
    color: #FFE600 !important;
}

/* Menu CTA Button container */
.t451m__list_item.menu-cta-container {
    margin-top: 24px !important;
    padding: 0 !important;
    border-bottom: none !important;
}

.t451m .t451m__list_item .cta-menu-button {
    display: flex !important;
    min-height: 48px !important;
    width: 100% !important;
    align-items: center !important;
    justify-content: center !important;
    background-color: #D916B0 !important;
    color: #ffffff !important;
    font-family: 'Space Grotesk', 'Manrope', system-ui, sans-serif !important;
    font-weight: 700 !important;
    font-size: 11px !important;
    text-transform: uppercase !important;
    letter-spacing: 0.12em !important;
    border-radius: 2px !important;
    text-decoration: none !important;
    box-shadow: 0 8px 24px rgba(217, 22, 176, 0.25) !important;
    transition: transform 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease !important;
}

.t451m .t451m__list_item .cta-menu-button:hover {
    transform: translateY(-1.5px) !important;
    box-shadow: 0 12px 32px rgba(217, 22, 176, 0.35) !important;
    background-color: #f21cc4 !important;
    color: #ffffff !important;
}

/* Teacher #tp pages load Tailwind after Tilda — restore burger icon + header layout */
body:has(#tp) #rec221091257 .t-menuburger {
    position: relative;
    flex-shrink: 0;
    width: 28px;
    height: 20px;
    padding: 0;
    border: none;
    background-color: transparent;
    outline: none;
    cursor: pointer;
    z-index: 999;
}

body:has(#tp) #rec221091257 .t-menuburger span {
    display: block;
    position: absolute;
    width: 100%;
    opacity: 1;
    left: 0;
    height: 3px;
    background-color: #000;
    transition: 0.25s ease-in-out;
}

body:has(#tp) #rec221091257 .t-menuburger span:nth-child(1) { top: 0; }
body:has(#tp) #rec221091257 .t-menuburger span:nth-child(2),
body:has(#tp) #rec221091257 .t-menuburger span:nth-child(3) { top: 8px; }
body:has(#tp) #rec221091257 .t-menuburger span:nth-child(4) { top: 16px; }

body:has(#tp) #rec221091257 .t-menuburger-opened span:nth-child(1) {
    top: 8px;
    width: 0;
    left: 50%;
}

body:has(#tp) #rec221091257 .t-menuburger-opened span:nth-child(2) {
    transform: rotate(45deg);
}

body:has(#tp) #rec221091257 .t-menuburger-opened span:nth-child(3) {
    transform: rotate(-45deg);
}

body:has(#tp) #rec221091257 .t-menuburger-opened span:nth-child(4) {
    top: 8px;
    width: 0;
    left: 50%;
}

body:has(#tp) #rec221091257 .t451__burger-wrapper__mobile {
    display: none !important;
}

body:has(#tp) #rec221091257 .t451__leftside.t451__side_burger {
    display: flex !important;
    order: 1 !important;
    justify-content: flex-start !important;
}

body:has(#tp) #rec221091257 .t451__centerside {
    display: flex !important;
    order: 2 !important;
    flex: 1 1 auto !important;
    justify-content: center !important;
    width: auto !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
}

body:has(#tp) #rec221091257 .t451__rightside {
    order: 3 !important;
}

@media screen and (max-width: 980px) {
    body:has(#tp) #rec221091257 .t451__side.t451__leftside {
        display: flex !important;
    }
}
