/* =========================================================
   index.css
   トップページ
   ========================================================= */


/* =========================================================
   Hero
   ========================================================= */

.hero {
    --hero-carousel-gap: 14px;
    --hero-carousel-peek: clamp(42px, 8vw, 72px);
    margin: 12px 0 28px;
}

.hero-link {
    display: block;
    width: 100%;
    height: 100%;
}

.hero-carousel {
    position: relative;
}

.hero-carousel-viewport {
    overflow: hidden;
    touch-action: pan-y;
}

.hero-carousel-track {
    display: flex;
    align-items: center;
    gap: var(--hero-carousel-gap);
    will-change: transform;
}

.hero-carousel-track.is-animated {
    transition: transform .5s ease;
}

.hero-carousel-slide {
    flex: 0 0 calc(100% - (var(--hero-carousel-peek) * 2));
    aspect-ratio: 16 / 9;
    opacity: .56;
    transform: scale(.94);
    transition: opacity .5s ease, transform .5s ease;
}

.hero-carousel-slide.is-active {
    opacity: 1;
    transform: scale(1);
}

.hero-carousel-slide img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 6px;
    box-shadow: 0 5px 14px rgba(0,0,0,.18);
}

.hero-carousel-slide .hero-link:focus-visible {
    border-radius: 6px;
    outline: 3px solid var(--color-main);
    outline-offset: 3px;
}

.hero-carousel-control {
    position: absolute;
    z-index: 2;
    top: calc(50% - 17px);
    display: grid;
    width: 38px;
    height: 38px;
    padding: 0;
    place-items: center;
    border: 1px solid rgba(255,255,255,.8);
    border-radius: 50%;
    background: rgba(0,0,0,.64);
    box-shadow: 0 2px 8px rgba(0,0,0,.28);
    color: #fff;
    font-size: 2rem;
    line-height: 1;
    transform: translateY(-50%);
    cursor: pointer;
}

.hero-carousel-control:hover,
.hero-carousel-control:focus-visible {
    background: rgba(0,0,0,.82);
    color: #fff;
}

.hero-carousel-control:focus-visible {
    outline: 3px solid #fff;
    outline-offset: 2px;
}

.hero-carousel-control-prev {
    left: 8px;
}

.hero-carousel-control-next {
    right: 8px;
}

.hero-carousel-indicators {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 26px;
    padding-top: 10px;
}

.hero-carousel-indicator {
    width: 10px;
    height: 10px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: #aeb8b3;
    cursor: pointer;
}

.hero-carousel-indicator[aria-current="true"] {
    background: var(--color-main);
    transform: scale(1.18);
}

.hero-carousel-indicator:focus-visible {
    outline: 2px solid var(--color-main);
    outline-offset: 3px;
}

.hero-carousel[data-slide-count="1"] .hero-carousel-control,
.hero-carousel[data-slide-count="1"] .hero-carousel-indicators {
    display: none;
}

@media (prefers-reduced-motion: reduce) {
    .hero-carousel-track.is-animated,
    .hero-carousel-slide {
        transition: none;
    }
}


/* =========================================================
   開催情報
   ========================================================= */

.event-information .site-card {

    padding: 24px;

}

.event-information-card {
    align-items: flex-start;
    gap: 8px;
    color: var(--color-text);
    text-decoration: none;
}

.event-information-card:focus-visible {
    outline: 3px solid var(--color-link);
    outline-offset: 3px;
}

.event-information strong {

    display: block;

    margin-top: 10px;

    font-size: 2rem;

    color: var(--color-main);

    line-height: 1.2;

}

.event-information-deadline {
    font-weight: 700;
}

.event-registration-status {
    display: inline-flex;
    align-items: center;
    margin-top: 8px;
    padding: 5px 12px;
    border: 1px solid transparent;
    border-radius: 999px;
    font-size: .88rem;
    font-weight: 700;
    line-height: 1.4;
}

.event-registration-status--upcoming {
    background: #e3f2f5;
    border-color: #8bbbc6;
    color: #126075;
}

.event-registration-status--open {
    background: #e6f4ec;
    border-color: #8dc5a7;
    color: #17683f;
}

.event-registration-status--closed {
    background: #f2f3f4;
    border-color: #aab2b6;
    color: #4e5960;
}

.event-information-empty {
    color: var(--color-text-light);
}




/* =========================================================
   ダビスタ動画
   ========================================================= */

.youtube-content-card {
    padding: 0;
    overflow: hidden;
}

.youtube-content-heading {
    display: flex;
    align-items: center;
    gap: 2px;
}

.youtube-content-list {
    max-height: 410px;
    margin: 0;
    padding: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
}

.youtube-content-item {
    list-style: none;
    border-bottom: 1px solid var(--color-border);
}

.youtube-content-item:last-child {
    border-bottom: 0;
}

.youtube-content-link {
    display: grid;
    grid-template-columns: 128px minmax(0, 1fr);
    align-items: center;
    gap: 14px;
    min-width: 0;
    padding: 10px 12px;
    color: var(--color-text);
}

.youtube-content-link:hover {
    background: rgba(12, 96, 64, .04);
    color: var(--color-text);
    text-decoration: none;
}

.youtube-content-link:focus-visible {
    box-shadow: inset 0 0 0 3px rgba(12, 96, 64, .18);
    outline: 0;
}

.youtube-content-thumbnail {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 128px;
    max-width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #454545;
    color: #ffffff;
    border-radius: 6px;
    font-size: .82rem;
    font-weight: 700;
}

.youtube-content-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.youtube-content-information {
    display: block;
    min-width: 0;
}

.youtube-content-title {
    display: -webkit-box;
    overflow: hidden;
    font-weight: 700;
    line-height: 1.4;
    overflow-wrap: anywhere;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.youtube-content-meta {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
    margin-top: 5px;
    color: var(--color-text-light);
    font-size: .8rem;
    line-height: 1.4;
}

.youtube-content-channel {
    display: block;
    min-width: 0;
    margin-top: 4px;
    overflow: hidden;
    color: var(--color-text-light);
    font-size: .8rem;
    line-height: 1.4;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.youtube-content-meta time {
    flex-shrink: 0;
    white-space: nowrap;
}

.youtube-content-owner {
    min-width: 0;
    overflow: hidden;
    text-align: right;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.youtube-content-empty {
    margin: 0;
    padding: 18px;
    color: var(--color-text-light);
}

.youtube-channel-list-navigation {
    margin: 8px 0 0;
    text-align: right;
}

.youtube-channel-list-navigation a:hover,
.youtube-channel-list-navigation a:focus-visible {
    text-decoration: underline;
}


/* =========================================================
   お知らせ
   ========================================================= */

.news-list {

    margin: 0;

    padding: 0;

}

.news-list li {

    list-style: none;

    border-bottom: 1px solid #e5e5e5;
    
    margin-top: 8px

}

.news-list a{

    position:relative;

    display:block;

    padding-right:28px;

}

.news-list a::after{

    content:"›";

    position:absolute;

    right:8px;

    top:50%;

    transform:translateY(-50%);

    font-size:1.5rem;

    color:var(--color-main);

}

.news-date {

    display: block;

    margin-bottom: 2px;

    font-size: .82rem;

    color: #888;

}

.news-title {

    line-height: 1.45;

}


/* =========================================================
   レースカード
   ========================================================= */

.race-card {

    position: relative;

    transition: .2s;

}

.race-card:hover {

    border-color: var(--color-main);

    transform: translateY(-2px);

}

.race-card::after {

    content: "›";

    position: absolute;

    right: 18px;

    top: 50%;

    transform: translateY(-50%);

    font-size: 1.8rem;

    color: var(--color-main);

}


/* =========================================================
   データカード
   ========================================================= */

.data-card{

    display:flex;

    flex-direction:column;

    justify-content:center;

    align-items:center;

    gap:10px;

}

.data-card i{

    font-size:2rem;

    color:var(--color-main);

}


/* =========================================================
   SNS
   ========================================================= */

.sns-card{

    display:flex;

    flex-direction:column;

    justify-content:center;

    align-items:center;

    gap:10px;

}

.sns-card .sns-brand-icon{

    width:40px;

    height:40px;

}

.sns-card .sns-icon-x{

    font-size:20px;

}

.sns-card .sns-icon-youtube{

    font-size:22px;

}


/* =========================================================
   Smartphone
   ========================================================= */

@media (max-width:599px){

    .hero {
        --hero-carousel-gap: 8px;
        --hero-carousel-peek: 28px;
    }

    .hero-carousel-control {
        top: calc(50% - 15px);
        width: 32px;
        height: 32px;
        font-size: 1.7rem;
    }

    .hero-carousel-control-prev {
        left: 3px;
    }

    .hero-carousel-control-next {
        right: 3px;
    }

    .youtube-content-list {
        max-height: 350px;
    }

    .youtube-content-link {
        grid-template-columns: 104px minmax(0, 1fr);
        gap: 10px;
        padding: 9px 8px;
    }

    .youtube-content-thumbnail {
        width: 104px;
    }

    .youtube-content-title {
        font-size: .9rem;
    }

    .youtube-content-channel,
    .youtube-content-meta {
        font-size: .72rem;
    }

    .event-information .site-card{

        font-size:1rem;

    }

    .event-information strong{

        display:block;

        margin-top:.5rem;

        font-size:1.2rem;

    }

}


