/* Load after the legacy theme so desktop rules cannot hide mobile controls. */
#header .navbar-toggle:focus-visible,
#top-menu a:focus-visible {
    outline: 3px solid #498096;
    outline-offset: 3px;
}

#top-menu .responsive-nav {
    display: none;
}

.video {
    display: flex;
    justify-content: center;
    margin: 187px 0 0;
    padding: 32px 24px 40px;
    background: linear-gradient(135deg, #f4f8f7, #f9efef);
}

.video video {
    display: block;
    width: 100%;
    max-width: 1100px;
    height: auto;
    aspect-ratio: 16 / 9;
    object-fit: contain;
    border-radius: 16px;
    background: #171717;
    box-shadow: 0 16px 40px rgba(50, 65, 65, 0.16);
}

@media (min-width: 1201px) {
    .video video {
        max-width: min(1100px, max(560px, calc((100svh - 340px) * 16 / 9)));
    }

    #top-menu .menu {
        float: none;
        width: min(1200px, 96%);
        padding: 0;
    }

    #top-menu .menu > li {
        padding: 0 12px;
    }

    #top-menu .menu > li > a {
        white-space: nowrap;
    }
}

@media (max-width: 1200px) {
    body.navigation-open {
        overflow: hidden;
    }

    #header .top-box {
        position: relative;
        z-index: 2;
        height: 88px;
        background: #fff;
    }

    #header .header-inner {
        display: grid;
        grid-template-columns: 88px minmax(0, 1fr) 88px;
        align-items: center;
        height: 100%;
        padding: 0 12px;
    }

    #header .width10 {
        width: auto;
        min-width: 0;
    }

    #header .top-logo,
    #header #logo,
    #header .top-box ul {
        margin: 0;
        padding: 0;
    }

    #header #logo img {
        width: auto;
        height: 72px;
        max-width: 100%;
        object-fit: contain;
    }

    #header .mobile-nav {
        gap: 0;
    }

    #header .nav-icon {
        display: block;
        flex-shrink: 0;
        margin: 0;
        padding: 0;
    }

    #header .navbar-toggle {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 5px;
        float: none;
        width: 44px;
        height: 44px;
        margin: 0;
        padding: 0;
        border: 1px solid #d5e2e5;
        border-radius: 8px;
        background: #f5f9f9;
        cursor: pointer;
    }

    #header .navbar-toggle .icon-bar {
        width: 22px;
        height: 2px;
        margin: 0;
        background: #376c80;
        transition: transform 0.2s, opacity 0.2s;
    }

    #header.navigation-open .icon-bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
    #header.navigation-open .icon-bar:nth-child(2) { opacity: 0; }
    #header.navigation-open .icon-bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

    #header ._social > ul > li:first-child {
        margin: 0;
        padding: 0;
    }

    #header ._social a {
        display: grid;
        place-items: center;
        width: 44px;
        height: 44px;
    }

    #header .nav-mask {
        display: none;
        inset: 88px 0 0;
        width: auto;
        height: auto;
        z-index: 0;
        background: rgba(24, 43, 49, 0.35);
    }

    #header #top-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        z-index: 1;
        float: none;
        width: 100%;
        height: auto;
        max-height: calc(100vh - 88px);
        max-height: calc(100dvh - 88px);
        overflow-y: auto;
        overscroll-behavior: contain;
        background: #fff;
        box-shadow: 0 12px 24px rgba(24, 43, 49, 0.15);
    }

    #header.navigation-open #top-menu,
    #header.navigation-open .nav-mask {
        display: block;
    }

    #header #top-menu .menu {
        display: flex;
        flex-direction: column;
        float: none;
        width: 100%;
        height: auto;
        margin: 0;
        padding: 8px 16px max(16px, env(safe-area-inset-bottom));
    }

    #header #top-menu .menu > li {
        display: block;
        float: none;
        width: 100%;
        height: auto;
        margin: 0;
        padding: 0;
        border: 0;
        border-bottom: 1px solid #e7eeee;
        background: transparent;
    }

    #header #top-menu .menu > li > a {
        display: block;
        float: none;
        width: 100%;
        padding: 14px 16px;
        color: #376c80;
        font-size: 16px;
        line-height: 22px;
        text-align: left;
    }

    #header #top-menu .menu > li > a::before { display: none; }

    #header #top-menu .menu > li.current-menu-item > a,
    #header #top-menu .menu > li > a:hover {
        background: #edf5f5;
        border-radius: 6px;
    }

    .video {
        margin-top: 88px;
        padding: 20px 16px 24px;
    }

    .video video { border-radius: 10px; }

    #main > .container,
    #main > section.container,
    #main > .main-container {
        width: calc(100% - 32px);
        max-width: 940px;
        margin-inline: auto;
    }

    #main .content-full-width { width: 100%; }
    .video + #main { margin-top: 24px; }
}

@media (max-width: 767px) {
    .service-page .item {
        text-align: left;
    }

    .service-page .item > h1 {
        text-align: center;
    }

    .service-page .item > .three-fourth,
    .packages-page .item > .column {
        float: none;
        clear: both;
        width: 100%;
        margin: 0;
        text-align: left;
    }

    .packages-page .item > .one-fourth img,
    .packages-page .item > video {
        display: block;
        width: 100%;
        height: auto;
        margin: 0 0 10px;
    }

    .special-page .item-box .price {
        flex-wrap: nowrap;
        align-items: baseline;
        gap: 6px;
    }

    .special-page .item-box .price p {
        flex: 0 0 auto;
        font-size: var(--special-price-font-size, 12px);
        line-height: 1.5;
        white-space: nowrap;
    }

    .special-page .item-box .price p span {
        font-size: inherit;
    }

    .index-service {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        column-gap: 16px;
    }

    .index-service > div {
        grid-column: 1 / -1;
        min-width: 0;
    }

    .index-service > .column.one-fifth {
        grid-column: auto;
        float: none;
        width: 100%;
        margin: 0 0 24px;
    }

    .index-service > .column.one-fifth.last {
        grid-column: 1 / -1;
        justify-self: center;
        width: calc((100% - 16px) / 2);
    }

    .index-service > .column a {
        margin: 0;
    }

    .index-service > .column .arctext {
        margin-bottom: 12px;
        font-size: clamp(22px, 5.6vw, 28px);
        white-space: nowrap;
    }

    .index-service > .column .rounded-img {
        float: none;
        width: 100%;
        max-width: 220px;
        height: auto;
        margin: 0 auto;
        padding: 0;
    }
}

@media (prefers-reduced-motion: reduce) {
    #header .navbar-toggle .icon-bar { transition: none; }
}
