.news-archive {
    background-color: #e5e5ea;
}

.news-archive .brand-box[data-border="black"] .brand-box__rect {
    stroke: rgba(0, 0, 0, 1) !important;
    stroke-dashoffset: 0 !important;
    stroke-dasharray: none !important;
    transition: none !important;
    opacity: 1 !important;
}

.news-archive__container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 75px 2rem 150px;
}

.news-archive__top {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: clamp(30px, 7.3vw, 105px);
    margin-bottom: 200px;
    font-family: 'Roboto Flex', sans-serif;
}

.news-archive__header {
    flex-shrink: 0;
}

.news-archive__controls {
    flex: 1;
}

.news-controls {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    align-items: flex-end;
}

.news-dropdown {
    position: relative;
    width: 330px;
    height: 90px;
}

.news-dropdown__toggle {
    width: 100%;
    height: 100%;
    padding: 0 25px;
    border: 3px solid #000;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    transition: all 0.3s;
    background-color: #e5e5ea;
    -webkit-tap-highlight-color: transparent;
}

.news-dropdown__toggle {
    color: #000 !important;
}

.news-dropdown__toggle:hover {
    background: #f5f5f5;
}

.news-dropdown__toggle span {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

.news-dropdown__toggle svg,
.news-dropdown__toggle img {
    width: 12px;
    height: auto;
    transition: transform 0.3s;
    position: absolute;
    right: 25px;
}

.news-dropdown__toggle.active svg,
.news-dropdown__toggle.active img {
    transform: rotate(180deg);
}

.news-dropdown__menu {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
    z-index: 100;
    background-color: #FFFFFF;
    padding: 0 48px;
    box-sizing: border-box;
}

.news-dropdown__menu.active {
    max-height: 500px;
    padding: 35px 48px 20px;
    overflow-y: hidden;
}

.news-dropdown__item {
    display: block;
    padding-bottom: 15px;
    font-size: 18px;
    font-weight: 600;
    color: #000;
    text-decoration: none;
    transition: background 0.2s;
    -webkit-tap-highlight-color: transparent;
}

.news-dropdown__item:hover {
    color: #E5E5EA;
}

.news-dropdown__menu .news-dropdown__toggle {
    border: none;
    pointer-events: none;
}

/* search-wrapper: fixed max-width + flex-end so the box expands only leftward */
.news-search {
    height: 90px;
    width: 330px;
    display: flex;
    justify-content: flex-end;
}

/* search-box: starts as a 90px black square, expands to full width */
.news-search__form {
    position: relative;
    height: 90px;
    width: 90px;
    background: #000;
    border: 3px solid #000;
    box-sizing: border-box;
    overflow: hidden;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    display: flex;
    align-items: center;
    transition: width 0.4s ease-in-out, background 0.3s ease;
}

.news-search__form.active {
    width: 330px;
    background: #e5e5ea;
    cursor: auto;
}

/* input: hidden until open, right padding reserves space for the icon */
.news-search__input {
    width: 100%;
    height: 100%;
    border: none;
    outline: none;
    background: transparent;
    font-size: 18px;
    font-weight: 600;
    color: #000;
    padding: 0 90px 0 15px;
    box-sizing: border-box;
    opacity: 0;
    transform: translateX(-10px);
    pointer-events: none;
    transition: opacity 0.25s ease 0.15s, transform 0.25s ease 0.15s;
}

.news-search__form.active .news-search__input {
    opacity: 1;
    transform: translateX(0);
    pointer-events: auto;
}

/* icon button: absolutely pinned to right edge, always 90px wide */
.news-search__icon-wrap {
    position: absolute;
    top: 0;
    right: 0;
    width: 90px;
    height: 100%;
    background: transparent;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

/* two icons stacked at the same spot, cross-fade between them */
.news-search__icon-wrap img {
    position: absolute;
    top: 50%;
    left: calc(50% + 3.5px);
    transform: translate(-50%, -50%);
    width: 33px;
    height: 33px;
    display: block;
    transition: opacity 0.22s ease;
    pointer-events: none;
}

.news-search__icon-wrap .icon-white { opacity: 1; }
.news-search__icon-wrap .icon-black { opacity: 0; }

.news-search__form.active .news-search__icon-wrap .icon-white { opacity: 0; }
.news-search__form.active .news-search__icon-wrap .icon-black { opacity: 1; }

.news-list {
    display: flex;
    gap: clamp(30px, 7.3vw, 105px);
    font-family: 'IBM Plex Sans JP', sans-serif;
}

.news-archive__tags {
    width: 300px;
    display: flex;
    justify-content: center;
}

.news-tags {
    display: flex;
    flex-direction: column;
}

.news-tags__item {
    font-size: 16px;
    font-weight: 400;
    line-height: 45px;
    color: #000;
    text-decoration: none;
    transition: color 0.3s;
    display: inline-block;
    -webkit-tap-highlight-color: transparent;
}

.news-tags__item:hover {
    color: #FFFFFF;
}

.news-archive__list {
    flex: 1;
    padding: 15px 0;
}

.news-archive__list .news-section__items {
    gap: 40px;
}

.news-archive__list .news-item {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: #000;
    padding: 0;
    transition: opacity 0.3s ease, transform 0.3s ease;
    -webkit-tap-highlight-color: transparent;
}

.news-archive__list .news-item:not(:last-child) {
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

.news-archive__list .news-item:hover {
    opacity: 0.8;
    transform: translateX(10px);
}

.news-item:hover .news-item__arrow svg {
    transform: translateX(8px);
}

/* Divider */
.news-archive__list .news-item__divider {
    width: clamp(5px, 1vw, 12px);
    align-self: stretch;
    background-color: #000;
    flex-shrink: 0;
    margin-right: clamp(20px, 2.5vw, 50px);
}

/* Content */
.news-archive__list .news-item__content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: clamp(6px, 0.8vw, 10px);
    min-width: 0;
    padding-right: 10px;
}

.news-archive__list .news-item__title {
    font-family: 'IBM Plex Sans JP', sans-serif;
    font-size: clamp(14px, 1.5vw, 18px);
    font-weight: 550;
    color: #000;
    margin: 0;
    line-height: 33px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.news-archive__list .news-item__meta {
    display: flex;
    gap: clamp(12px, 1.5vw, 20px);
    align-items: center;
}

.news-archive__list .news-item__date {
    font-family: 'IBM Plex Sans JP', sans-serif;
    font-size: 13px;
    color: rgba(0, 0, 0, 0.7);
    font-weight: 300;
    line-height: 45px;
}

.news-archive__list .news-item__tag {
    font-family: 'IBM Plex Sans JP', sans-serif;
    font-size: 13px;
    color: rgba(0, 0, 0, 0.7);
    font-weight: 300;
    line-height: 45px;
}

/* Arrow */
.news-archive__list .news-item__arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-left: clamp(15px, 2vw, 25px);
}

.news-archive__list .news-item__arrow svg {
    width: clamp(30px, 3.5vw, 45px);
    height: auto;
    transition: transform 0.3s ease;
}

.news-section__items.slide-left {
    animation: slideLeft 0.5s ease;
}

.news-section__items.slide-right {
    animation: slideRight 0.5s ease;
}

@keyframes slideLeft {
    0% {
        transform: translateX(0);
        opacity: 1;
    }
    50% {
        transform: translateX(-100%);
        opacity: 0;
    }
    51% {
        transform: translateX(100%);
        opacity: 0;
    }
    100% {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideRight {
    0% {
        transform: translateX(0);
        opacity: 1;
    }
    50% {
        transform: translateX(100%);
        opacity: 0;
    }
    51% {
        transform: translateX(-100%);
        opacity: 0;
    }
    100% {
        transform: translateX(0);
        opacity: 1;
    }
}

.news-pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    margin-top: 120px;
}

.news-pagination__prev,
.news-pagination__next {
    font-size: 16px;
    font-weight: 600;
    line-height: 100%;
    color: #000;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    transition: color 0.3s;
    text-decoration: none;
    -webkit-tap-highlight-color: transparent;
}

.news-pagination__prev:hover:not([disabled]),
.news-pagination__next:hover:not([disabled]) {
    color: #fff;
}

.news-pagination__prev.disabled,
.news-pagination__next.disabled {
    color: transparent;
    cursor: not-allowed;
}

.news-pagination__dots {
    display: flex;
    gap: 30px;
}

.news-pagination__dot {
    width: 15px;
    height: 15px;
    border-radius: 50%;
    background: #000;
    border: none;
    cursor: pointer;
    padding: 0;
    transition: background 0.3s;
    -webkit-tap-highlight-color: transparent;
}

.news-pagination__dot.active {
    background: #fff;
}

@media (max-width: 1200px) and (min-width: 1025px) {
    .news-dropdown,
    .news-search {
        width: calc((100% - 10px) / 2);
    }

    .news-search__form.active {
        width: 100%;
    }
}

@media (max-width: 1025px) and (min-width: 768px) {
    .news-archive {
        min-height: 100vh;
    }

    .news-archive__container {
        max-width: 900px;
        padding: 60px 30px 120px;
    }

    .news-archive__top {
        gap: clamp(25px, 5vw, 70px);
        margin-bottom: 150px;
    }

    .news-controls {
        gap: 15px;
    }

    .news-dropdown {
        width: calc((100% - 15px) / 2);
        height: 75px;
        font-size: 16px;
        font-weight: 500;
    }

    .news-dropdown__toggle svg,
    .news-dropdown__toggle img {
        width: 15px;
        right: 20px;
    }

    .news-dropdown__menu {
        padding: 0 30px;
    }

    .news-dropdown__menu.active {
        max-height: 450px;
        padding: 20px 30px 15px;
    }

    .news-dropdown__item {
        padding-bottom: 12px;
        font-size: 16px;
        font-weight: 500;
    }

    .news-search {
        width: calc((100% - 15px) / 2);
        height: 75px;
    }

    .news-search__form {
        height: 75px;
        width: 75px;
    }

    .news-search__form.active {
        width: 100%;
    }

    .news-search__input {
        padding: 0 75px 0 12px;
        font-size: 16px;
        font-weight: 500;
    }

    .news-search__icon-wrap {
        width: 75px;
    }

    .news-list {
        gap: clamp(25px, 5vw, 70px);
    }

    .news-archive__tags {
        width: 230px;
    }

    .news-tags__item {
        font-size: 14px;
        line-height: 40px;
    }

    .news-archive__list {
        padding: 12px 0;
    }

    .news-archive__list .news-section__items {
        gap: 30px;
    }

    .news-archive__list .news-item__divider {
        width: clamp(4px, 0.8vw, 10px);
        margin-right: clamp(18px, 2vw, 40px);
    }

    .news-archive__list .news-item__content {
        gap: clamp(5px, 0.6vw, 8px);
    }

    .news-archive__list .news-item__title {
        font-size: clamp(13px, 1.3vw, 16px);
        font-weight: 600;
        line-height: 28px;
    }

    .news-archive__list .news-item__meta {
        gap: clamp(10px, 1.2vw, 16px);
    }

    .news-archive__list .news-item__date {
        font-size: 12px;
        line-height: 38px;
    }

    .news-archive__list .news-item__tag {
        font-size: 12px;
        line-height: 38px;
    }

    .news-archive__list .news-item__title {
        font-size: 14px;
        font-weight: 600;
        line-height: 28px;
    }

    .news-archive__list .news-item__date,
    .news-archive__list .news-item__tag {
        font-weight: 400;
    }

    .news-archive__list .news-item__arrow {
        width: 75px;
        justify-content: center;
        flex-shrink: 0;
        margin-left: 0;
    }

    .news-archive__list .news-item__arrow svg {
        width: 38px;
    }

    .news-archive__list .news-item:hover {
        opacity: 1;
        transform: none;
    }

    .news-item:hover .news-item__arrow svg {
        transform: none;
    }


    .news-pagination {
        margin-top: 80px;
        width: 97%
    }

    .news-pagination__prev,
    .news-pagination__next {
        font-size: 14px;
        font-weight: 500;
        line-height: 28px;
    }

    .news-pagination__dots {
        gap: 25px;
    }

    .news-pagination__dot {
        width: 13px;
        height: 13px;
    }
}

@media (max-width: 768px) {
    .news-archive .brand-box__text {
        font-size: 21px;
    }

    .news-archive__container {
        padding: 100px 16px 30px;
    }

    .news-archive__top {
        flex-direction: row;
        justify-content: space-between;
        align-items: flex-start;
        gap: 15px;
        margin-bottom: 42px;
    }

    .news-archive__header {
        flex-shrink: 0;
    }

    .news-archive__controls {
        flex-shrink: 0;
    }

    .news-controls {
        flex-direction: column;
        gap: 15px;
        align-items: stretch;
    }

    .news-dropdown {
        width: 195px;
        height: 75px;
    }

    .news-dropdown__toggle {
        font-size: 16px;
        font-weight: 500;
        padding: 0 20px;
    }

    .news-dropdown__toggle svg,
    .news-dropdown__toggle img {
        width: 10px;
        right: 20px;
    }

    .news-dropdown__menu {
        padding: 0 30px;
    }

    .news-dropdown__menu.active {
        max-height: 400px;
        padding: 25px 30px 15px;
    }

    .news-dropdown__item {
        font-size: 14px;
        font-weight: 400;
        padding-bottom: 10px;
    }

    .news-search {
        width: 195px;
    }

    .news-search__form {
        height: 75px;
        width: 75px;
        transition: width 0.6s ease-in-out, background 0.3s ease;
    }

    .news-search__form.active {
        width: 195px;
    }

    .news-search__input {
        padding: 0 75px 0 12px;
        font-size: 16px;
        font-weight: 400;
    }

    .news-search__icon-wrap {
        width: 75px;
    }

    .news-search__icon-wrap img {
        width: 30px;
        height: 30px;
    }

    .news-archive__list .news-item:hover {
        opacity: 1;
        transform: none;
    }

    .news-archive__list .news-item:hover .news-item__arrow svg {
        transform: none;
    }

    .news-list {
        flex-direction: column;
        gap: 50px;
    }

    .news-archive__tags {
        width: 100%;
        order: 1;
    }

    .news-tags {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 10px;
    }

    .news-tags__item {
        font-size: 13px;
        font-weight: 400;
        line-height: 15px;
    }

    .news-archive__list {
        width: 100%;
        order: 2;
        padding: 0;
    }

    .news-archive__list .news-section__items {
        gap: 30px;
    }

    .news-archive__list .news-item__divider {
        width: 9px;
        margin-right: 15px;
    }

    .news-archive__list .news-item__content {
        gap: 5px;
    }

    .news-archive__list .news-item__title {
        font-size: 15px;
        font-weight: 700;
        line-height: 23px;
    }

    .news-archive__list .news-item__meta {
        gap: 20px;
    }

    .news-archive__list .news-item__date,
    .news-archive__list .news-item__tag {
        font-size: 13px;
        line-height: 100%;
        font-weight: 300;
    }

    .news-archive__list .news-item__arrow {
        margin-left: 12px;
    }

    .news-archive__list .news-item__arrow svg {
        width: 30px;
    }


    .news-pagination {
        margin-top: 80px;
    }

    .news-pagination__prev,
    .news-pagination__next {
        font-size: 16px;
        font-weight: 500;
        line-height: 24px;
    }

    .news-pagination__dots {
        gap: 20px;
    }

    .news-pagination__dot {
        width: 10px;
        height: 10px;
    }
}

@media (max-width: 400px) {
    .news-archive__top {
        gap: 5px;
    }
}
