/* Header */
.kendos-header {
    position: relative;
    z-index: 1000;
    width: 100%;
    background: var(--kendos-header-bg, #050505);
    color: var(--kendos-header-text, #ffffff);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.kendos-header.is-sticky {
    position: sticky;
    top: 0;
}

.admin-bar .kendos-header.is-sticky {
    top: 32px;
}

.kendos-header__container {
    width: min(calc(100% - 64px), var(--kendos-header-container));
    margin-inline: auto;
}

.kendos-header__inner {
    display: flex;
    align-items: center;
    min-height: 104px;
    gap: clamp(24px, 3vw, 62px);
}

.kendos-header__brand {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    text-decoration: none;
}

.kendos-header__logo {
    display: block;
    width: min(var(--kendos-logo-width, 250px), 100%);
    max-height: 82px;
    object-fit: contain;
    object-position: left center;
}

.kendos-header__panel {
    display: flex;
    flex: 1 1 auto;
    align-items: center;
    min-width: 0;
    gap: clamp(24px, 3vw, 54px);
}

.kendos-header__nav {
    min-width: 0;
    margin-left: auto;
}

.kendos-menu,
.kendos-menu .sub-menu {
    margin: 0;
    padding: 0;
    list-style: none;
}

.kendos-menu {
    display: flex;
    align-items: center;
    gap: clamp(20px, 2.2vw, 38px);
}

.kendos-menu > li {
    position: relative;
    display: flex;
    align-items: center;
}

.kendos-menu a {
    position: relative;
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    color: inherit;
    text-decoration: none;
    text-transform: uppercase;
    white-space: nowrap;
    font-size: 13px;
    font-weight: var(--kendos-menu-weight, 600);
    letter-spacing: 0.01em;
    font-synthesis: none;
    transition: color 180ms ease;
}

.kendos-menu > li > a::after {
    position: absolute;
    right: 0;
    bottom: 1px;
    left: 0;
    height: 2px;
    background: var(--kendos-header-accent, #f7c400);
    content: "";
    transform: scaleX(0);
    transform-origin: right center;
    transition: transform 180ms ease;
}

.kendos-menu > li:hover > a,
.kendos-menu > li:focus-within > a,
.kendos-menu > .current-menu-item > a,
.kendos-menu > .current-menu-ancestor > a {
    color: var(--kendos-header-accent, #f7c400);
}

.kendos-menu > li:hover > a::after,
.kendos-menu > li:focus-within > a::after,
.kendos-menu > .current-menu-item > a::after,
.kendos-menu > .current-menu-ancestor > a::after {
    transform: scaleX(1);
    transform-origin: left center;
}

.kendos-menu .sub-menu {
    position: absolute;
    z-index: 20;
    top: calc(100% + 12px);
    left: -20px;
    min-width: 250px;
    padding: 12px;
    border: 1px solid rgba(255, 255, 255, 0.10);
    border-radius: 12px;
    background: #111111;
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: opacity 160ms ease, transform 160ms ease, visibility 160ms ease;
}

.kendos-menu .sub-menu::before {
    position: absolute;
    right: 0;
    bottom: 100%;
    left: 0;
    height: 14px;
    content: "";
}

.kendos-menu .sub-menu .sub-menu {
    top: -12px;
    left: calc(100% + 8px);
}

.kendos-menu li:hover > .sub-menu,
.kendos-menu li:focus-within > .sub-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.kendos-menu .sub-menu li {
    position: relative;
}

.kendos-menu .sub-menu a {
    width: 100%;
    min-height: 42px;
    padding: 8px 12px;
    border-radius: 8px;
    color: #ffffff;
    text-transform: none;
    white-space: normal;
    line-height: 1.35;
    font-size: 14px;
    font-weight: 500;
}

.kendos-menu .sub-menu a:hover,
.kendos-menu .sub-menu a:focus-visible,
.kendos-menu .sub-menu .current-menu-item > a {
    background: rgba(247, 196, 0, 0.12);
    color: var(--kendos-header-accent, #f7c400);
}

.kendos-submenu-toggle {
    display: inline-flex;
    width: 26px;
    height: 34px;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 0;
    background: transparent;
    color: currentColor;
    cursor: pointer;
}

.kendos-submenu-toggle span {
    display: block;
    width: 7px;
    height: 7px;
    border-right: 1.8px solid currentColor;
    border-bottom: 1.8px solid currentColor;
    transform: translateY(-2px) rotate(45deg);
    transition: transform 160ms ease;
}

.kendos-menu .sub-menu .kendos-submenu-toggle {
    position: absolute;
    top: 4px;
    right: 2px;
}

.kendos-menu .sub-menu .kendos-submenu-toggle span {
    transform: rotate(-45deg);
}

.kendos-header__actions {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    gap: clamp(18px, 2vw, 38px);
}

.kendos-header__phone {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: inherit;
    text-decoration: none;
    white-space: nowrap;
    font-size: clamp(17px, 1.25vw, 21px);
    font-weight: var(--kendos-phone-weight, 700);
    letter-spacing: 0.005em;
    font-synthesis: none;
}

.kendos-header__phone svg {
    width: 26px;
    height: 26px;
    color: var(--kendos-header-accent, #f7c400);
}

.kendos-header__phone:hover,
.kendos-header__phone:focus-visible {
    color: var(--kendos-header-accent, #f7c400);
}

.kendos-header__cta,
.kendos-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 56px;
    padding: 0 27px;
    border: 1px solid transparent;
    border-radius: 6px;
    background: var(--kendos-header-accent, #f7c400);
    color: #050505;
    text-decoration: none;
    text-align: center;
    white-space: nowrap;
    font-size: 14px;
    font-weight: var(--kendos-cta-weight, 700);
    letter-spacing: 0.015em;
    font-synthesis: none;
    box-shadow: 0 9px 24px rgba(247, 196, 0, 0.17);
    transition: transform 160ms ease, filter 160ms ease, box-shadow 160ms ease;
}

.kendos-header__cta:hover,
.kendos-header__cta:focus-visible,
.kendos-button:hover,
.kendos-button:focus-visible {
    filter: brightness(1.06);
    transform: translateY(-1px);
    box-shadow: 0 12px 30px rgba(247, 196, 0, 0.25);
}

.kendos-header__toggle {
    display: none;
    flex: 0 0 auto;
    width: 46px;
    height: 46px;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 8px;
    background: transparent;
    color: var(--kendos-header-text, #ffffff);
    cursor: pointer;
}

.kendos-header__toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: currentColor;
    transition: transform 180ms ease, opacity 180ms ease;
}

.kendos-header.is-menu-open .kendos-header__toggle span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.kendos-header.is-menu-open .kendos-header__toggle span:nth-child(2) {
    opacity: 0;
}

.kendos-header.is-menu-open .kendos-header__toggle span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* Pages and archives */
.kendos-page__content,
.kendos-archive,
.kendos-error-page {
    padding-block: clamp(48px, 7vw, 96px);
}

.kendos-page__content {
    max-width: 980px;
}

.kendos-page__content h1,
.kendos-archive h1,
.kendos-error-page h1 {
    margin: 0 0 22px;
    font-size: clamp(34px, 5vw, 62px);
    line-height: 1.08;
    letter-spacing: -0.035em;
}

.kendos-page__content h2 {
    margin: 48px 0 18px;
    font-size: clamp(26px, 3vw, 40px);
    line-height: 1.18;
    letter-spacing: -0.025em;
}

.kendos-page__content h3 {
    margin: 34px 0 14px;
    font-size: clamp(21px, 2vw, 28px);
    line-height: 1.25;
}

.kendos-page__content p,
.kendos-page__content li {
    color: #353535;
}

.kendos-page__content a:not(.kendos-button) {
    color: #775f00;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
}

.kendos-page__content img {
    border-radius: var(--kendos-radius);
}

.kendos-archive__header {
    max-width: 820px;
    margin-bottom: 44px;
}

.kendos-post-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
}

.kendos-post-card {
    overflow: hidden;
    border: 1px solid var(--kendos-border);
    border-radius: var(--kendos-radius);
    background: #ffffff;
    box-shadow: 0 12px 34px rgba(0, 0, 0, 0.05);
}

.kendos-post-card__image {
    display: block;
    aspect-ratio: 16 / 10;
    overflow: hidden;
}

.kendos-post-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 260ms ease;
}

.kendos-post-card:hover .kendos-post-card__image img {
    transform: scale(1.03);
}

.kendos-post-card__body {
    padding: 24px;
}

.kendos-post-card h2 {
    margin: 0 0 12px;
    font-size: 23px;
    line-height: 1.25;
}

.kendos-post-card h2 a {
    text-decoration: none;
}

.kendos-post-card p {
    margin-bottom: 0;
    color: var(--kendos-muted);
}

.kendos-error-page {
    min-height: 55vh;
    text-align: center;
}

.kendos-error-page__code {
    margin: 0;
    color: var(--kendos-yellow);
    font-size: clamp(80px, 14vw, 180px);
    font-weight: 900;
    line-height: 0.9;
}

.kendos-error-page .kendos-button {
    margin-top: 18px;
}

/* Footer */
.kendos-footer {
    background: #0a0a0a;
    color: #ffffff;
}

.kendos-footer__inner {
    display: grid;
    grid-template-columns: minmax(280px, 1.5fr) minmax(180px, 0.75fr) minmax(220px, 0.75fr);
    gap: clamp(36px, 7vw, 100px);
    padding-block: 64px;
}

.kendos-footer__brand {
    display: inline-flex;
}

.kendos-footer__brand img {
    width: 220px;
}

.kendos-footer__brand-block p {
    max-width: 520px;
    margin: 20px 0 0;
    color: #bcbcbc;
}

.kendos-footer h2 {
    margin: 0 0 18px;
    color: var(--kendos-yellow);
    font-size: 16px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.kendos-footer__menu {
    display: grid;
    gap: 10px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.kendos-footer__menu a,
.kendos-footer__contact-block a {
    color: #d7d7d7;
    text-decoration: none;
}

.kendos-footer__menu a:hover,
.kendos-footer__menu a:focus-visible,
.kendos-footer__contact-block a:hover,
.kendos-footer__contact-block a:focus-visible {
    color: var(--kendos-yellow);
}

.kendos-footer__contact-block {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
}

.kendos-footer__contact-block h2 {
    margin-bottom: 8px;
}

.kendos-footer__contact-block a:first-of-type {
    font-size: 22px;
    font-weight: 700;
}

.kendos-footer__bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.10);
}

.kendos-footer__bottom p {
    margin: 0;
    padding-block: 20px;
    color: #8d8d8d;
    font-size: 13px;
}

/* Tablet */
@media (max-width: 1240px) {
    .kendos-header__inner {
        gap: 26px;
    }

    .kendos-menu {
        gap: 20px;
    }

    .kendos-header__panel {
        gap: 25px;
    }

    .kendos-header__actions {
        gap: 18px;
    }

    .kendos-header__cta {
        min-height: 52px;
        padding-inline: 20px;
    }

    .kendos-header__phone {
        font-size: 17px;
    }
}

/* Mobile navigation */
@media (max-width: 980px) {
    .admin-bar .kendos-header.is-sticky {
        top: 32px;
    }

    .kendos-header__container {
        width: min(calc(100% - 32px), var(--kendos-header-container));
    }

    .kendos-header__inner {
        min-height: 82px;
        justify-content: space-between;
        gap: 18px;
    }

    .kendos-header__logo {
        width: min(var(--kendos-logo-mobile-width, 185px), 100%);
        max-height: 66px;
    }

    .kendos-header__toggle {
        display: inline-flex;
    }

    .kendos-header__panel {
        position: absolute;
        z-index: 30;
        top: 100%;
        right: 0;
        left: 0;
        display: block;
        max-height: calc(100vh - 82px);
        overflow-y: auto;
        padding: 18px 20px 24px;
        border-top: 1px solid rgba(255, 255, 255, 0.08);
        background: var(--kendos-header-mobile-bg, #0b0b0b);
        box-shadow: 0 24px 50px rgba(0, 0, 0, 0.38);
        opacity: 0;
        visibility: hidden;
        transform: translateY(-8px);
        transition: opacity 180ms ease, visibility 180ms ease, transform 180ms ease;
    }

    .kendos-header__panel.is-open {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }

    .kendos-header__nav {
        margin: 0;
    }

    .kendos-menu {
        display: block;
    }

    .kendos-menu > li {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        border-bottom: 1px solid rgba(255, 255, 255, 0.09);
    }

    .kendos-menu a {
        min-height: 52px;
        white-space: normal;
        font-size: 14px;
    }

    .kendos-menu > li > a::after {
        display: none;
    }

    .kendos-submenu-toggle {
        width: 50px;
        height: 52px;
    }

    .kendos-menu .sub-menu,
    .kendos-menu .sub-menu .sub-menu {
        position: static;
        grid-column: 1 / -1;
        display: none;
        min-width: 0;
        padding: 0 0 12px 14px;
        border: 0;
        border-radius: 0;
        background: transparent;
        box-shadow: none;
        opacity: 1;
        visibility: visible;
        transform: none;
    }

    .kendos-menu .is-submenu-open > .sub-menu {
        display: block;
    }

    .kendos-menu .is-submenu-open > .kendos-submenu-toggle span {
        transform: translateY(2px) rotate(225deg);
    }

    .kendos-menu .sub-menu .kendos-submenu-toggle {
        position: static;
        grid-column: 2;
        grid-row: 1;
    }

    .kendos-menu .sub-menu li {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
    }

    .kendos-menu .sub-menu a {
        min-height: 44px;
        padding: 8px 10px;
        color: #d8d8d8;
    }

    .kendos-header__actions {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 12px;
        padding-top: 20px;
    }

    .kendos-header__phone,
    .kendos-header__cta {
        min-height: 52px;
        justify-content: center;
        border-radius: 7px;
    }

    .kendos-header__phone {
        border: 1px solid rgba(255, 255, 255, 0.16);
        font-size: 17px;
    }

    .kendos-post-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 782px) {
    .admin-bar .kendos-header.is-sticky {
        top: 46px;
    }
}

@media (max-width: 720px) {
    .kendos-header__actions {
        grid-template-columns: 1fr;
    }

    .kendos-footer__inner {
        grid-template-columns: 1fr 1fr;
    }

    .kendos-footer__brand-block {
        grid-column: 1 / -1;
    }
}

@media (max-width: 600px) {
    .kendos-header__container {
        width: min(calc(100% - 24px), var(--kendos-header-container));
    }

    .kendos-header__panel {
        padding-inline: 14px;
    }

    .kendos-post-grid,
    .kendos-footer__inner {
        grid-template-columns: 1fr;
    }

    .kendos-footer__brand-block {
        grid-column: auto;
    }

    .kendos-footer__inner {
        gap: 34px;
        padding-block: 48px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
    }
}
