.top {
    display: flex;
    width: 100%;
    box-sizing: border-box;
}

.mainTop {
    display: flex;
    width: 100%;
    padding: 2rem 0;
    box-sizing: border-box;
}

.sidebar-space {
    width: 241px;
    flex-shrink: 0;
}

.business-search {
    margin: 0 auto;
    max-width: 1200px;
    padding-top: 80px;
    border-radius: 12px;
    text-align: center;
}

.business-search h2 {
    font-size: 40px;
    margin-bottom: 40px;
    color: #000000;
    font-weight: 500;
    font-family: "Zen Kaku Gothic New", sans-serif;
    text-align: left;
}

.line {
    display: flex;
    justify-content: flex-start;
    gap: 20px;
}

.business-search h2 span {
    display: inline-block;
    background-color: #dc000c;
    width: 8px;
    height: 8px;
    margin-top: -6px;
    margin-right: 10px;
    vertical-align: middle;
}

.search-type-wrapper {
    position: relative;
}

.big-text {
    position: relative;
}
.form-group.big-text::after {
    content: "Search";
    position: absolute;
    top: -1px;
    right: 0;
    transform: translate(0%, -100%);
    z-index: -1;
    font: normal normal bold 72px/57px "Century Gothic";
    letter-spacing: 3.6px;
    color: #f5f5f5;
    opacity: 1;
}

.search-type {
    display: flex;
    gap: 20px;
    justify-content: flex-start;
    border-bottom: 1px solid #cccccc;
}
.range-select {
    padding: 18px 0;
}
.search-type span {
    position: relative;
    padding: 6px 12px;
    cursor: pointer;
    font-size: 18px;
    color: #888;
}

/* 選択中 */
.search-type span.active {
    color: red;
}

.search-type span.active::after {
    content: "";
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 2px;
    background: red;
}

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

.form-group label {
    margin: 0;
    margin-right: 12px;
    font-weight: 500;
    font-family: "Zen Kaku Gothic New", sans-serif;
    font-size: 16px;
    color: #000;
    white-space: nowrap;
}
/* --- options（ラベル全体） --- */
.options {
    display: flex;
    flex-wrap: nowrap;
    gap: 16px;
}

/* 左側の見出し */
.options .label,
.yield-box label,
.age-box label {
    display: flex;
    font-weight: 500;
    font-family: "Zen Kaku Gothic New", sans-serif;
    font-size: 16px;
    color: #000000;
    margin: 20px 0;
}
.options .label {
    min-width: 100px;
}

/* --- チェックボックス列 --- */
.labels {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 0;
    margin: 20px 0;
    max-width: 1050px;
}

/* 各チェックボックス行 */
.labels label {
    display: flex;
    align-items: center;
    width: 190px;
    gap: 6px;
    margin: 0;
}

/* チェックボックスのサイズ統一 */
.labels input[type="checkbox"] {
    width: 24px;
    height: 24px;
}
.options.option {
    display: inline-block;
    padding: 6px 12px;
    cursor: pointer;
    text-decoration: none;
    border-radius: 6px;
    background: none;
    color: #000000;
    font-family: "Zen Kaku Gothic New", sans-serif;
    font-size: 16px;
}

.options .option.active,
.options .option:hover {
    text-decoration: underline;
}

select {
    height: 30px;
    appearance: none;
    border: 1px solid #cccccc;
    padding: 3px 24px 3px 6px;
    line-height: 1.2;
    font-size: 14px;
    font-family: "Zen Kaku Gothic New", sans-serif;
    background-color: #f7f7f7;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='12' fill='black'><polygon points='0,0 12,0 6,6'/></svg>");
    background-repeat: no-repeat;
    background-position: right 8px center;
    background-size: 12px;
    cursor: pointer;
    color: #000;
    width: auto;
    min-width: 100px;
}
.search-footer {
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: center;
    text-align: center;
    margin-top: 20px;
    border-bottom: 1px solid #ccc;
    font-family: "Zen Kaku Gothic New", sans-serif;
}

/* 件数表示 */
.search-footer .result-count {
    font-size: 18px;
    color: #000;
}
.search-footer .result-count strong {
    font-size: 56px;
    font-weight: 700;
    margin: 0 4px;
}

/* 「この条件で検索する」テキスト部分 */
.search-footer .search-text {
    font-size: 16px;
    font-weight: 500;
    color: #000;
    margin-right: 50px;
    margin-bottom: -9px;
}

.search-footer .search-action {
    display: flex;
    align-items: center;
    gap: 8px;
    position: absolute;
    bottom: 0;
    right: 0;
}

.form-group {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 8px 0;
    border-bottom: 1px dotted #aaa;
}

.more-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: black;
    color: #fff;
    padding: 8px 12px;
    text-decoration: none;
    font-size: 14px;
}

.more-link:hover {
    background: #333;
}

.more-linkbox {
    display: flex;
    align-items: center;
    gap: 12px;
}

.more-text {
    font-size: 16px;
    font-weight: 500;
    color: #000;
}

.line label {
    margin-bottom: 0;
}

.price-group label,
.yield-box,
.age-box,
.renge-select,
.flex,
.flex_SP {
    display: flex;
    align-items: center;
    gap: 16px;
}
.forms-group,
.price-group {
    display: flex;
    align-items: center;
    gap: 40px;
    padding: 8px 0;
    border-bottom: 1px dotted #aaa;
}

/* アニメーション本体 */
@keyframes arrowLeftRight {
    from {
        transform: translate(calc(-100% - 15px), -50%);
    }
    to {
        transform: translateY(-50%);
    }
}

@keyframes arrowRightLeft {
    from {
        transform: translateY(-50%);
    }
    to {
        transform: translate(calc(100% + 15px), -50%);
    }
}

@media screen and (max-width: 519px) {
    .search-type-wrapper::after {
        top: -18%;
        right: 41%;
    }
    .labels {
        text-align: left;
    }
    .area_min {
        width: 85%;
        text-align: left;
        text-align-last: left;
    }
    .menseki {
        width: 50%;
    }
    .yield-box,
    .age-box {
        width: 50%;
        display: block;
        margin-left: 0;
        text-align: left;
    }
    .form-group {
        width: 100%;
        display: block;
    }

    .range-select {
        display: flex;
        text-align: left;
        width: 100%;
    }
    .form-group label {
        margin: 0 0 10px;
    }
    .flex {
        display: block;
    }
    select {
        width: 43%;
    }
    .yield-box select,
    .age-box select {
        width: 90%;
    }
    .tilde {
        width: 9%;
        text-align: center;
    }
    .business-search {
        padding-top: 160px;
    }

    .range-select {
        padding: 0;
    }

        .business-search h2 {
        font-size: 28px;
    }

    .forms-group, .price-group {
    display: block; 
}
}

/* ================================
   ▼ 黒ボタン + 白矢印 2本スライド
   ================================ */

/* ボタン本体（黒背景） */
.arrow-box {
    position: relative;
    width: 48px;
    height: 48px;
    background: #000;
    border: none;
    cursor: pointer;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 白矢印 2本 */
.arrow-box::before,
.arrow-box::after {
    content: "→";
    position: absolute;
    top: 50%;
    font-size: 20px;
    color: #fff;
    transform: translateY(-50%);
    animation-fill-mode: forwards;
    animation-duration: 0.6s;
}

/* 1本目：右に抜ける */
.arrow-box::before {
    right: 15px;
}

/* 2本目：左から入ってくる */
.arrow-box::after {
    right: 15px;
    transform: translate(calc(-100% - 12px), -50%);
}

/* ホバーでアニメ発動 */
.arrow-box:hover::before {
    animation-name: arrowRightLeftBtn;
}

.arrow-box:hover::after {
    animation-name: arrowLeftRightBtn;
    animation-delay: 0.18s;
}

/* キーフレーム */
@keyframes arrowRightLeftBtn {
    0% {
        transform: translateY(-50%) translateX(0);
    }
    100% {
        transform: translateY(-50%) translateX(calc(48px + 12px));
    }
    /* ボタン幅 + 右余白分移動 */
}

@keyframes arrowLeftRightBtn {
    0% {
        transform: translateY(-50%) translateX(calc(-100% - 12px));
    }
    100% {
        transform: translateY(-50%) translateX(0);
    }
}

/* ================================
   ▼ search-footer の黒線アニメ
   ================================ */

.search-footer {
    position: relative;
}

/* 黒線（初期 0px） */
.search-footer::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -1px;
    width: 0;
    height: 2px;
    background: #000;
    transition: width 1s ease;
}

/* ▼ ボタン hover 時のみ線が伸びる */
.search-footer:has(.arrow-box:hover)::after {
    width: 100%;
}
