/* TOP「今日は何ごみ？」ブロックと サービス一覧の「そらっきーに質問」(XD そらっきーに質問1007 / TOP) */
.sorakky-garbage {
    display: flex;
    /* 文字を大きくしている端末では、ボタンを次の行へ送る (タイトルの上にボタンを重ねない) */
    flex-wrap: wrap;
    row-gap: 8px;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 0 0 1rem;
    padding: 12px 16px;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

.sorakky-garbage__title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    font-size: 1rem;
    color: #333;
    /* 「今日は何ごみ？」は途中で改行しない */
    white-space: nowrap;
}

.sorakky-garbage__title svg {
    width: 26px;
    height: 26px;
    fill: #1f4e79;
}

.sorakky-garbage__button {
    flex-shrink: 0;
    padding: 10px 18px;
    border-radius: 8px;
    background: #78a6d8;
    color: #fff !important;
    font-weight: 700;
    text-decoration: none;
    /* サービス一覧のボタン (home.css .main_menu .btn_menu) と同じ、浮き上がる hover / 押下 */
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.sorakky-garbage__button:hover {
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
    transform: translateY(-4px);
}

/* style.css の a:hover, a:focus (下線) を付けない (押下後のフォーカスを含む) */
.sorakky-garbage__button:hover,
.sorakky-garbage__button:focus {
    text-decoration: none;
}

.sorakky-garbage__button:active {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

/*
 * そらっきーの絵は横長のため、他のアイコン用の高さ・幅の上限 (home.css: 24px / 375px 以下 18px) を受けると
 * 縦横比が崩れる。幅だけを決め、高さは縦横比のまま (どの画面幅でもつぶれない)
 */
.main_menu .btn_menu.btn_menu--sorakky img {
    width: 40px;
    height: auto;
    max-width: none;
    max-height: none;
    object-fit: contain;
    flex-shrink: 0;
}

@media (max-width: 375px) {
    .main_menu .btn_menu.btn_menu--sorakky img {
        width: 30px;
    }
}

/*
 * サービス一覧の文言は、幅が足りないときだけ <wbr> の位置で改行する (例: 「オンライン / マニュアル」)。
 * style.css の .text_box は height・line-height が 40px 固定で、2 行目がはみ出すため上書きする
 */
.main_menu .btn_menu .text_box {
    height: auto;
    min-width: 0;
    line-height: 1.3;
    word-break: keep-all;
    /* anywhere だと 2 行時の幅 (min-content) が 1 文字分になるため break-word */
    overflow-wrap: break-word;
}

/*
 * 幅 375px 以下 (Galaxy A55 など): サービス一覧 (.main_menu) は左右に余白が付くため、
 * 「今日は何ごみ？」のカードも同じ余白・文字の大きさにそろえる (home.css の max-width: 375px に合わせる)
 */
@media (max-width: 375px) {
    .sorakky-garbage {
        margin-left: var(--aiot-spacing-3, 12px);
        margin-right: var(--aiot-spacing-3, 12px);
        padding: 10px 12px;
        gap: 8px;
    }

    .sorakky-garbage__title {
        font-size: var(--aiot-text-sm, 0.875rem);
        gap: 6px;
    }

    .sorakky-garbage__title svg {
        width: 20px;
        height: 20px;
    }

    .sorakky-garbage__button {
        padding: 8px 12px;
        font-size: var(--aiot-text-sm, 0.875rem);
    }
}

/*
 * カードの左右に余白を持たせ、文言がカードの端に付かないようにする (home.css は 375px より広いと左右 0)
 */
.main_menu .btn_menu {
    padding-left: var(--aiot-spacing-1, 4px);
    padding-right: var(--aiot-spacing-1, 4px);
}

/* 見出し「サービス一覧」は改行しない。狭い画面では左右の葉との間を詰める */
.main_header-title h2 {
    white-space: nowrap;
}

@media (max-width: 767px) {
    .main_header {
        gap: min(4rem, 10vw);
    }
}

/* 幅 1024px 以上はサービス一覧のボタンと同じく大きめに浮かせる (home.css) */
@media (min-width: 1024px) {
    .sorakky-garbage__button:hover {
        box-shadow: 0 12px 28px rgba(0, 0, 0, 0.15);
        transform: translateY(-6px);
    }
}
