/* Header component */
.header {
    position: relative;
    z-index: 1000;
    font-family: "Noto Sans JP", sans-serif !important;
}

.header__main {
    background-color: #ffffff;
}

.header__search-mobile {
    display: none;
    overflow: hidden;
    max-height: 0;
    transition: max-height 0.3s ease, padding 0.3s ease;
    background-color: #999999;
}

.header__search-mobile.is-open {
    max-height: 80px;
    padding: 12px 20px;
}

/* TAB: 768px - 999px */
@media (min-width: 768px) and (max-width: 999px) {
    .header__search-mobile {
        display: block;
    }
}

/* SP: <= 767px */
@media (max-width: 767px) {
    .header__search-mobile {
        display: block;
    }
}

.header__search-form-mobile {
    display: flex;
    align-items: center;
}

.header__search-input-mobile {
    width: 100%;
    height: 40px;
    padding: 0 16px;
    border: none;
    outline: none;
    border-radius: 20px;
    font-size: 14px;
}

.header__container {
    max-width: 1920px;
    margin: 0 auto;
    padding: 0 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 80px;
}

/* miniPC: 1000px - 1279px */
@media (min-width: 1000px) and (max-width: 1279px) {
    .header__container {
        height: clamp(68px, 7vw, 76px);
        padding: 0 clamp(12px, 1.2vw, 14px);
    }
}

/* TAB: 768px - 999px */
@media (min-width: 768px) and (max-width: 999px) {
    .header__container {
        height: 60px;
        padding: 0 12px;
    }
}

/* SP: <= 767px */
@media (max-width: 767px) {
    .header__container {
        height: 60px;
        padding: 0 12px;
    }
}

.header__logo {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.header__logo-link {
    display: block;
    line-height: 0;
    text-decoration: none;
}

.header__logo-image {
    height: 60px;
    width: auto;
    display: block;
}

/* miniPC: 1000px - 1279px */
@media (min-width: 1000px) and (max-width: 1279px) {
    .header__logo-image {
        height: clamp(50px, 5vw, 56px);
    }
}

/* TAB: 768px - 999px */
@media (min-width: 768px) and (max-width: 999px) {
    .header__logo-image {
        height: 50px;
    }
}

/* SP: <= 767px */
@media (max-width: 767px) {
    .header__logo-image {
        height: 50px;
    }
}

.header__nav {
    display: flex;
    flex: 1;
    justify-content: left;
    margin-left: 40px;
}

/* miniPC: 1000px - 1279px */
@media (min-width: 1000px) and (max-width: 1279px) {
    .header__nav {
        margin-left: clamp(20px, 2.5vw, 32px);
    }
}

/* TAB & SP: <= 999px */
@media (max-width: 999px) {
    .header__nav {
        display: none;
    }
}

.header__nav-list {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 32px;
}

/* miniPC: 1000px - 1279px */
@media (min-width: 1000px) and (max-width: 1279px) {
    .header__nav-list {
        gap: clamp(16px, 2vw, 24px);
    }
}

.header__nav-item {
    position: relative;
}

.header__nav-item:not(:last-child)::after {
    content: "";
    position: absolute;
    width: 1px;
    height: 16px;
    background: #333;
    right: -18px;
    top: 50%;
    transform: translateY(-50%);
}

/* miniPC: 1000px - 1279px */
@media (min-width: 1000px) and (max-width: 1279px) {
    .header__nav-item:not(:last-child)::after {
        right: clamp(-14px, -1.2vw, -10px);
        height: 14px;
    }
}

.header__nav-link {
    display: block;
    padding: 8px 0;
    color: #333333;
    text-decoration: none;
    font-size: clamp(12px, 1.2vw, 14px);
    font-weight: 500;
    transition: color 0.2s ease;
}

/* miniPC: 1000px - 1279px */
@media (min-width: 1000px) and (max-width: 1279px) {
    .header__nav-link {
        font-size: clamp(11px, 1.1vw, 13px);
        padding: 6px 0;
    }
}

.header__nav-link:hover {
    color: #ff0000;
}

.header__search {
    flex-shrink: 0;
    display: flex;
    margin-left: auto;
}

.header__search-text {
    font-size: 14px;
    font-weight: 500;
    border: 2px solid #7f7f7f;
    margin-right: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 20px;
    padding: 0 12px;
    width: 190px;
    cursor: pointer;
    color: #666666;
}

.header__search-text--secondary {
    border-color: #ff0000;
    color: #ff0000;
}

/* miniPC: 1000px - 1279px */
@media (min-width: 1000px) and (max-width: 1279px) {
    .header__search-text {
        font-size: clamp(12px, 1.2vw, 13px);
        width: clamp(150px, 16vw, 170px);
        padding: 8px clamp(8px, 1vw, 10px);
        margin-right: clamp(10px, 1.2vw, 14px);
    }
}

/* TAB: 768px - 999px */
@media (min-width: 768px) and (max-width: 999px) {
    .header__search-text {
        display: none;
    }
}

/* SP: <= 767px */
@media (max-width: 767px) {
    .header__search-text {
        display: none;
    }
}

.header__search-form {
    position: relative;
    display: flex;
    align-items: center;
}

.header__search-input {
    width: 240px;
    height: 40px;
    padding: 0 40px 0 16px;
    border: 1px solid #7f7f7f;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

/* miniPC: 1000px - 1279px */
@media (min-width: 1000px) and (max-width: 1279px) {
    .header__search-input {
        width: clamp(160px, 18vw, 200px);
        height: clamp(36px, 3.6vw, 38px);
        font-size: clamp(12px, 1.2vw, 13px);
        padding: 0 36px 0 clamp(12px, 1.2vw, 14px);
    }
}

.header__search-input:focus {
    border-color: #ff0000;
    box-shadow: 0 0 0 3px rgba(229, 62, 62, 0.1);
}

/* TAB: 768px - 999px */
@media (min-width: 768px) and (max-width: 999px) {
    .header__search-input {
        display: none;
    }
}

/* SP: <= 767px */
@media (max-width: 767px) {
    .header__search-input {
        display: none;
    }
}

.header__search-button {
    position: absolute;
    right: 8px;
    top: 57%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    color: #718096;
    transition: color 0.2s ease, background-color 0.2s ease;
}

/* TAB: 768px - 999px */
@media (min-width: 768px) and (max-width: 999px) {
    .header__search-button {
        position: static;
        transform: none;
        background-color: transparent;
    }
}

/* SP: <= 767px */
@media (max-width: 767px) {
    .header__search-button {
        position: static;
        transform: none;
        background-color: transparent;
    }
}

.header__search-icon {
    display: block;
}

.header__menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    outline: none; 
    padding: 8px;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    border-radius: 4px;
    transition: background-color 0.2s ease;
}

/* TAB: 768px - 999px */
@media (min-width: 768px) and (max-width: 999px) {
    .header__menu-toggle {
        display: flex;
    }
}

/* SP: <= 767px */
@media (max-width: 767px) {
    .header__menu-toggle {
        display: flex;
    }
}

.header__menu-toggle-line {
    display: block;
    width: 20px;
    height: 2px;
    background-color: #2d3748;
    margin: 2px 0;
    transition: all 0.3s ease;
    border-radius: 1px;
    transform-origin: center;
}

.header__drawer {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1100;
    pointer-events: none;
    display: none;
    font-family: "Noto Sans JP", sans-serif !important;
}

.header__drawer.is-open {
    display: block;
}

/* PC & miniPC: >= 1000px */
@media (min-width: 1000px) {
    .header__drawer {
        display: none !important;
    }
}

.header__drawer-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    cursor: pointer;
    pointer-events: auto;
}

.header__drawer-nav {
    position: absolute;
    top: 0;
    right: 0;
    width: 380px;
    height: 100%;
    background-color: #ffffff;
    box-shadow: -2px 0 8px rgba(0, 0, 0, 0.1);
    overflow-y: auto;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    pointer-events: auto;
}

/* Use the existing top header; start drawer contents below it. */
@media (max-width: 999px) {
    .header__drawer-overlay {
        top: 60px;
    }

    .header__drawer-nav {
        top: 60px;
        height: calc(100% - 60px);
    }
}

@media (max-width: 767px) {
    .header__drawer-overlay {
        top: 61px;
    }

    .header__drawer-nav {
        top: 61px;
        height: calc(100% - 61px);
    }
}

.header__drawer.is-open .header__drawer-nav {
    transform: translateX(0);
}

.header__drawer-list,
.header__drawer-list-secondary {
    list-style: none;
    margin: 0;
    padding: 0;
}

.header__drawer-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: none;
    margin: 0;
    position: relative;
    cursor: pointer;
}

.header__drawer-item::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 20px;
    right: 20px;
    height: 1px;
    background-image: linear-gradient(to right, #ccc 50%, transparent 50%);
    background-size: 8px 1px;
    background-repeat: repeat-x;
}

.header__drawer-item-full::after {
    left: 0;
    right: 0;
}

.header__drawer-item a,
.header__drawer-item a:hover,
.header__drawer-item a:focus,
.header__drawer-item a:active,
.header__drawer-item a:visited,
.header__drawer-item a:focus-visible,
.header__drawer-item a:focus-within {
    text-decoration: none;
    outline: none;
}

.header__drawer-item:last-child::after,
.header__drawer-item:first-child::after {
    background-image: none;
    background-color: #ccc;
}

.header__drawer-item .header__drawer-arrow {
    margin-right: 20px;
}

.header__drawer-item .header__drawer-link {
    padding-left: 20px;
}

.header__drawer-link,
.header__drawer-link-secondary {
    display: block;
    padding: 20px 0;
    color: #333333;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.header__drawer-item .header__drawer-arrow {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
}

.header__drawer-item-secondary {
    display: flex;
    justify-content: space-around;
    width: 100%;
    border-bottom: none;
    position: relative;
}

.header__drawer-item-secondary::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0px;
    right: 0px;
    height: 1px;
    background-color: #ccc;
}

.header__drawer-item-secondary:first-child {
    margin: 0 auto;
    justify-content: center;
}

.header__drawer-item-secondary:first-child::after {
    background-image: linear-gradient(to right, #ccc 50%, transparent 50%);
    background-size: 8px 1px;
    background-repeat: repeat-x;
    background-color: transparent;
    left: 20px;
    right: 20px;
}

.header__drawer-item-secondary-link {
    display: flex;
    align-items: center;
}

.header__drawer-list-secondary .header__drawer-item-secondary:first-child {
    padding-left: 0;
}

.header__drawer-arrow {
    display: flex;
    align-items: center;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px 16px;
}

.header__drawer-buttons {
    padding: 20px;
    display: flex;
    gap: 12px;
    font-size: 14px;
}

.header__drawer-button {
    display: block;
    width: 100%;
    padding: 12px 5px;
    border: none;
    font-size: 14px;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    border-radius: 20px;
    background-color: #ffffff;
}

.header__drawer-button:last-child {
    margin-bottom: 0;
}

.header__drawer-button--primary {
    border: 1px solid #ff0000;
    color: #ff0000;
}

.header__drawer-button--secondary {
    color: #7f7f7f;
    border: 1px solid #7f7f7f;
}

.header__drawer-footer {
    padding: 24px;
}

.header__drawer-sites {
    display: flex;
    justify-content: space-around;
    gap: 12px;
}

.header__drawer-site {
    color: #333333;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.2s ease;
}

.header__drawer-site:hover {
    color: #ff0000;
}

.header__menu-toggle.is-active .header__menu-toggle-line:first-child {
    transform: translateY(6px) rotate(45deg);
}

.header__menu-toggle.is-active .header__menu-toggle-line:nth-child(2) {
    opacity: 0;
}

.header__menu-toggle.is-active .header__menu-toggle-line:last-child {
    transform: translateY(-6px) rotate(-45deg);
}

@media (max-width: 480px) {
    .header__container {
        padding: 0 8px;
    }

    .header__drawer-nav {
        width: 100%;
    }

    .header__logo-image {
        height: 40px;
    }
}

/* ========= CBL-34#comment-249783297 */
.header__search-text:hover {
    color: #FFFFFF;
    background-color: #7f7f7f;
}

.header__search-text--secondary:hover {
    color: #FFFFFF;
    background-color: #FF0002;
    border-color: #FF0002;
}

/* ================================== */

/* Search form for tablet/mobile */
.header__search-tablet {
    display: none;
    margin-right: 8px;
}

/* TAB: 768px - 999px */
@media (min-width: 768px) and (max-width: 999px) {
    .header__search-tablet {
        display: flex;
        align-items: center;
    }
}

/* SP: <= 767px */
@media (max-width: 767px) {
    .header__search-tablet {
        display: flex;
        align-items: center;
    }
}

.header__search-button-tablet {
    background: none;
    border: none;
    -webkit-appearance: none;
    appearance: none;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    outline: none; 
    padding: 8px;
    width: 36px;
    height: 36px;
    line-height: 0;
    border-radius: 50%;
    color: #718096;
    transition: color 0.2s ease, background-color 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.header__search-button-tablet svg {
    display: block;
    width: 20px;
    height: 20px;
    flex: 0 0 20px;
}

.header__search-button-tablet:hover {
    color: #ff0000;
}

.header__search-button-tablet.is-active {
    color: #ff0000;
}