:root
{
    --accent-color: #2899B2;
    --accent-color-rgb: 40, 153, 178;
}

select
{
    font-family: inherit !important;
}

h2
{
    margin-bottom: 1.25rem;
    font-size: 2.25rem;
    font-weight: bold;
}

h3
{
    margin-bottom: 1.25rem;
    font-size: 1.5rem;
    font-weight: bold;
}

h4
{
    margin-bottom: 1.25rem;
    font-size: 1.25rem;
    font-weight: bold;
}

h5
{
    margin-bottom: 1rem;
    font-size: 1.125rem;
    font-weight: bold;
}

.page_header
{
    width: 100%;
    max-width: 1024px;
    margin: 100px auto 0;
    padding: 0 1rem;
}

.container
{
    width: 100%;
    max-width: 1024px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* 地域リスト */
.regions_list
{
    display: grid;
    grid-template-columns: auto;
    gap: 1rem;
}
.region
{
    position: relative;
    padding: 1rem;
    border-radius: 1rem;
}
.region.tohoku
{
    background-color: #E0F1DE;
}
.region.kanto
{
    background-color: #EEFAD9;
}
.region.koushinetsu
{
    background-color: #D7F3F1;
}
.region.tokai
{
    background-color: #F5E9D8;
}
.region.kansai
{
    background-color: #E6EEFB;
}
.region.chugoku
{
    background-color: #FBECFF;
}
.region.shikoku
{
    background-color: #F6F4CD;
}
.region.kyushu
{
    background-color: #FDE3E4;
}

.region h4 > a
{
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    /* padding: 0.5rem 1rem; なぜこれが不要になったかは不明なので要調査 */
    transition: all 0.3s;
}
.region h4 > a:hover
{
    background-color: rgba(255, 255, 255, 0.5);
}

.prefectures_list
{
    position: relative;
    display: flex;
    flex-wrap: wrap;
    gap: 0.125rem;
    margin-top: 2rem;
    font-size: 0.75rem;
}

.prefectures_list a {
    display: inline-block;
    margin-right: 0.25rem;
}

.prefectures_list a:hover {
    text-decoration: underline;
}

/* 部活カテゴリリスト */
.club_categories_section
{
    padding: 2rem 0 0;
}

.club_categories {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 10px;
    list-style: none;
    padding: 0;
    margin: 1rem 0;
}

.club_category_link {
    display: block;
    height: 60px;
    padding: 0 15px;
    padding-left: 56px;
    background: no-repeat 12px center;
    background-color: #f8f9fa;
    background-size: 32px;
    border: 1px solid #ddd;
    border-radius: 1rem;
    text-decoration: none;
    color: #333;
    line-height: 60px;
    transition: all 0.3s;
}
.club_category_link:hover {
    background-color: var(--accent-color);
    color: white;
    border-color: var(--accent-color);
}
.club_category_link.baseball        { background-image: url(../images/emoji/baseball.png); }
.club_category_link.softball        { background-image: url(../images/emoji/softball.png); }
.club_category_link.soccer          { background-image: url(../images/emoji/soccer.png); }
.club_category_link.basketball      { background-image: url(../images/emoji/basketball.png); }
.club_category_link.volleyball      { background-image: url(../images/emoji/volleyball.png); }
.club_category_link.tennis          { background-image: url(../images/emoji/tennis.png); }
.club_category_link.badminton       { background-image: url(../images/emoji/badminton.png); }
.club_category_link.table_tennis    { background-image: url(../images/emoji/table_tennis.png); }
.club_category_link.track_and_field { background-image: url(../images/emoji/track_and_field.png); }
.club_category_link.swimming        { background-image: url(../images/emoji/swimming.png); }
.club_category_link.handball        { background-image: url(../images/emoji/handball.png); }
.club_category_link.gymnastics      { background-image: url(../images/emoji/gymnastics.png); }
.club_category_link.rugby           { background-image: url(../images/emoji/rugby.png); }
.club_category_link.archery         { background-image: url(../images/emoji/archery.png); }
.club_category_link.martial_arts    { background-image: url(../images/emoji/martial_arts.png); }
.club_category_link.shooting        { background-image: url(../images/emoji/shooting.png); }
.club_category_link.dance           { background-image: url(../images/emoji/dance.png); }
.club_category_link.concert_band    { background-image: url(../images/emoji/concert_band.png); }
.club_category_link.cultural        { background-image: url(../images/emoji/cultural.png); }
.club_category_link.other        { background-image: url(../images/emoji/other.png); }

@media (min-width: 500px)
{
    .club_category_link.archery
    {
        font-size: 0.9em;
    }
}

/* 検索フォーム - archive-club.phpのスタイルを踏襲 */
.search_form
{
    background-color: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 1rem;
    box-shadow: rgba(0, 0, 0, 0.05) 0px 4px 6px -1px, rgba(0, 0, 0, 0.025) 0px 2px 4px -1px;
    overflow: hidden;
}

.search_form input[type="search"]
{
    display: block;
    width: 100%;
    padding: 0.5rem 1rem;
    border-bottom: 1px solid #e5e7eb;
    border-radius: 1rem 1rem 0 0;
    background: transparent;
}

.search_form_group
{
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    width: 100%;
    border-bottom: 1px solid #e5e7eb;
}

.search_form_group select
{
    flex: 1;
    margin-right: 0.5rem;
    padding: 0.5rem 1rem;
    background-color: #fff;
}
.search_form_group select[name=club_category]
{
    min-width: 100%;
    border-top: 1px solid #e5e7eb;
}

.search_form_group hr
{
    width: 1px;
    background-color: #e5e7eb;
}

.search_form button[type="submit"]
{
    display: block;
    width: 100%;
    max-width: 300px;
    margin: 0 auto;
    padding: 0.5rem 1rem;
    background-color: var(--accent-color);
    color: #fff;
    border: none;
    border-radius: 999px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    font-weight: bold;
    transition: all 0.3s ease;
}
.search_form button[type="submit"]:hover,
.search_form button[type="submit"]:active
{
    background-color: rgba(var(--accent-color-rgb), 0.9);
}
.search_form button[type="submit"]:active
{
    transform: translateY(0.125rem);
}

.search_button_wrapper
{
    padding: 1em;
}

/* 部活一覧セクション */
.club-search-section {
    margin: 50px 0;
}

.search-results {
    margin-top: 30px;
}

.search-results h5 {
    margin: 20px 0 10px;
    padding: 10px;
    color: var(--accent-color);
    background-color: #f8f9fa;
    border-left: 4px solid var(--accent-color);
}

/* 部活リスト - archive-club.phpのスタイルを踏襲 */
.club_list_header
{
    display: none;
}

.club_list_row
{
    display: block;
    margin-bottom: 1rem;
    background-color: #fff;
}

.club_list_row > a
{
    display: flex;
    flex-wrap: wrap;
    padding: 1rem;
    border: 1px solid #e5e7eb;
    border-radius: 1rem;
    box-shadow: rgba(0, 0, 0, 0.05) 0px 4px 6px -1px, rgba(0, 0, 0, 0.025) 0px 2px 4px -1px;
    overflow: hidden;
    transition: all 0.3s ease;
}
.club_list_row > a:hover,
.club_list_row > a:active
{
    background-color: rgba(var(--accent-color-rgb), 0.05);
}
.club_list_row > a:active
{
    transform: translateY(0.125rem);
}

.club_list_row > a > div
{
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.club_list_row .school_name
{
    width: 100%;
    font-size: 1.25rem;
    font-weight: bold;
}

.club_list_row .club_name
{
    width: 100%;
    margin-bottom: 0.5rem;
}

.club_list_row .city_name,
.club_list_row .member_count,
.club_list_row .activity_frequency
{
    flex: 1;
    min-width: 60px;
    padding-left: 1.5rem;
    font-size: 0.875rem;
    color: #4b5563;
    background: no-repeat left center;
}
.club_list_row .city_name
{
    background-image: url('data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjI0IiB2aWV3Qm94PSIwIDAgMjIgMjQiIHdpZHRoPSIyMiIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBkPSJtMjIgMmgtMTd2MTRoMTdsLTQtN3ptLTIwLjUtMmMtLjgyNSAwLTEuNS42NzUtMS41IDEuNXYyMWMwIC44MjUuNjc1IDEuNSAxLjUgMS41czEuNS0uNjc1IDEuNS0xLjV2LTIxYzAtLjgyNS0uNjc1LTEuNS0xLjUtMS41eiIgZmlsbD0iIzc4ODA4YSIvPjwvc3ZnPg==');
    background-size: 13px;
}
.club_list_row .member_count
{
    background-image: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyMCIgdmlld0JveD0iMCAwIDI0IDIwIj48dGl0bGU+dGVhbTwvdGl0bGU+PHBhdGggZmlsbD0iIzc4ODA4QSIgZmlsbC1ydWxlPSJub256ZXJvIiBkPSJNMCAxNi43MDNWMjBoM3YtNC4yOTdjMC0xLjIwNy40MjYtMi4zMjIgMS4xNDYtMy4yOUMxLjcwNyAxMy4xNDggMCAxNC43OTMgMCAxNi43MDNaTTEyIDljM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TFhMSAxIDAgMCAwIC0yIDB2MWgtM2EyIDIgMCAwIDAgLTIgMnY1aDI0di01YTIgMiAwIDAgMCAtMi0yem0tMTYgNWExIDEgMCAxIDEgMC0yIDEgMSAwIDAgMSAwIDJ6bTEyIDBhMSAxIDAgMSAxIDAtMiAxIDEgMCAwIDEgMCAyeiIgZmlsbD0iIzc4ODA4YSIvPjwvc3ZnPg==');
    background-size: 14px;
}

/* ページネーション - archive-club.phpのスタイルを踏襲 */
.pagination ul
{
    display: flex;
    justify-content: center;
    margin: 1.5rem 0;
}

.pagination a
{
    display: inline-block;
    padding: 0.5rem 1rem;
    margin: 0 0.25rem;
    background-color: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 999px;
    color: #4b5563;
    text-decoration: none;
    line-height: 1;
    transition: background-color 0.3s ease, color 0.3s ease;
}
.pagination a:hover,
.pagination a:active
{
    background-color: rgba(var(--accent-color-rgb), 0.1);
    color: var(--accent-color);
}
.pagination a.current
{
    border-color: var(--accent-color);
    background-color: var(--accent-color);
    color: #fff;
}

/* タブレット対応 */
@media (min-width: 768px)
{
    .regions_list
    {
        grid-template-columns: auto auto;
    }
    
    .search_form_group select[name=club_category]
    {
        border-top: 0;
        border-left: 1px solid #e5e7eb;
        min-width: auto;
    }

    .search-results
    {
        overflow-x: auto;
    }

    .club_list
    {
        margin-bottom: 1.5rem;
    }
    .club_list_header
    {
        display: flex;
        align-items: center;
        margin-bottom: 0;
        padding-bottom: 0.5rem;
        border-bottom: 1px solid #e5e7eb;
        color: var(--accent-color);
    }
    .club_list_header .school_name,
    .club_list_row .school_name
    {
        min-width: 260px;
        width: 260px;
    }
    .club_list_header .club_name,
    .club_list_row .club_name
    {
        min-width: 260px;
        width: 260px;
    }
    .club_list_header .city_name,
    .club_list_row .city_name
    {
        min-width: 120px;
        width: 120px;
    }
    .club_list_header .member_count,
    .club_list_row .member_count
    {
        min-width: 120px;
        width: 120px;
    }
    .club_list_header .activity_frequency,
    .club_list_row .activity_frequency
    {
        min-width: 120px;
        width: 120px;
    }

    .club_list_row
    {
        margin: 0;
        border-bottom: 1px solid #e5e7eb;
    }

    .club_list_row a
    {
        flex-wrap: nowrap;
        padding: 0.5em 0;
        border: none;
        border-radius: 0;
        box-shadow: none;
        overflow: visible;
    }
    .club_list_row a:active
    {
        transform: none;
    }

    .club_list_row .school_name,
    .club_list_row .club_name,
    .club_list_row .city_name,
    .club_list_row .member_count,
    .club_list_row .activity_frequency
    {
        flex: none;
        min-width: auto;
        margin: 0;
        padding: 0;
        background: none;
        color: inherit;
        font-size: inherit;
        font-weight: normal;
    }
}

/* デスクトップ対応 */
@media (min-width: 1024px)
{
    .regions_list
    {
        grid-template-columns: auto auto auto auto;
    }
    
    .search_form form
    {
        display: flex;
        flex-wrap: wrap;
        justify-content: space-between;
    }
    .search_form input[type="search"]
    {
        flex: 1;
        width: 300px;
        border-right: 1px solid #e5e7eb;
        border-bottom: 0;
        border-radius: 1em 0 0 1em;
    }
    .search_form_group
    {
        width: auto;
        border-bottom: 0;
    }
}