.hero-image{
    position: relative;
    min-height: 300px;
    background-image: url('/public/home/hero.jpg');
    background-repeat: no-repeat;
    background-size: cover;
    background-position: 50% 50%;
}


.opcd-logo{
    height: 40px;
    width: auto;
}


.cl-link-btn{
    background: none;
    border: 0;
    padding: 0;
    color: var(--sgt-white);
    text-decoration: underline;
    text-underline-offset: 3px;
    text-decoration-color: var(--sgt-red);
    letter-spacing: inherit;
    font-size: inherit;
}

.cl-link-btn:hover{
    color: var(--sgt-light);
}


/* ---------- controls: the course records set, a size up since there are fewer of them ---------- */

.cl-controls{
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 0.9rem;
}

.cl-count{
    font-size: 1.6rem;
}

/* wider than the site default; this is the main way into 2,500+ courses */
#table-search-group.cl-search{
    height: 46px;
    max-width: 380px;
    flex: 1 1 280px;
}

#table-search-group.cl-search .input-group-text,
#table-search-group.cl-search #table-search-input{
    height: 46px;
    font-size: 1rem;
}

.cl-chips,
.cl-selects{
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.55rem;
    max-width: 100%;
    min-width: 0;
}

.cl-chip{
    padding: 0.5rem 1.15rem !important;
    font-size: 0.9rem !important;
    letter-spacing: normal;
    white-space: nowrap;
}

.cl-chip[aria-pressed='true']{
    background-color: var(--sgt-red) !important;
    color: #fff !important;
}

.cl-select{
    background-color: var(--sgt-md-gray);
    color: var(--sgt-white);
    border: 1px solid var(--sgt-light-gray);
    border-radius: 0.5rem;
    padding: 0.55rem 0.8rem;
    font-size: 0.9rem;
    letter-spacing: 0.05rem;
}

.cl-select:focus{
    outline: 0;
    border-color: var(--sgt-light);
}


/* ---------- cards ---------- */

.course-grid{
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(270px, 100%), 1fr));
    gap: 1.5rem;
}

/* full-width rows inside the card grid */
.cl-sentinel,
.cl-empty,
.cl-loading{
    grid-column: 1 / -1;
}

.cl-sentinel{
    height: 1px;
}

.course-card{
    min-width: 0;
    border-radius: 1rem;
}

.course-card.flash{
    animation: cl-flash 1.6s ease-out;
}

@keyframes cl-flash{
    0%, 30% { box-shadow: 0 0 0 2px var(--sgt-red); }
    100% { box-shadow: 0 0 0 2px transparent; }
}

.course-card .card {
    border-top-right-radius: 1rem;
    border-top-left-radius: 1rem;
    overflow: hidden;
    height: 100%;
}

.course-card .course-image {
    position: relative;
    height: 150px;
    background: var(--sgt-dark-gray);
}

.course-card .course-image img{
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.cl-new{
    position: absolute;
    top: 0.6rem;
    left: 0.6rem;
    padding: 0.1rem 0.5rem;
    border-radius: 999px;
    background: var(--sgt-red);
    color: var(--sgt-white);
    font-size: 0.6rem;
    letter-spacing: 0.1rem;
}

.cl-tags{
    font-size: 0.7rem;
    color: var(--sgt-light);
    letter-spacing: 0.05rem;
}

.cl-diff.easy{
    color: #3fb35c;
}

.cl-diff.medium{
    color: #e0a83a;
}

.cl-diff.hard{
    color: #e05252;
}

.course-card-button {
    height: 36px;
    width: 36px;
    line-height: 36px;
    border: 0;
    padding: 0;
}

.course-details{
    display: none;
}

.course-card.show-details .course-summary{
    display: none;
}

.course-card.show-details .course-details{
    display: block;
}

.close-course-details{
    background: none;
    border: 0;
    padding: 0;
}

.cl-stars{
    display: flex;
    flex-direction: row;
    gap: 0.15rem;
}

.cl-star{
    background: none;
    border: 0;
    padding: 0 0.15rem 0 0;
    color: var(--sgt-white);
}

.cl-star:hover i{
    color: var(--sgt-light);
}


/* ---------- avatars in the details panel ---------- */

.player-avatar-wrapper{
    height:32px;
    width:32px;
    margin-right:9px;
}

.player-avatar{
    width:32px;
    height:32px;
    border-radius:50%;
    overflow: hidden;
}

.player-avatar img{
    width: 100%;
    height:auto;
}

.player-flag{
    position: absolute;
    bottom:0;
    right:-9px;
    height:18px;
    width: 18px !important;
    border-radius: 50%;
}


/* ---------- modal ---------- */

.modal-fullscreen {
    width: calc(100vw - 40px) !important;
    height: calc(100% - 40px) !important;
    margin-left: auto !important;
    margin-right: auto !important;
    margin-top: 20px !important;
}

.flyover-iframe{
    width:100%;
    height:calc(100% - 32px);
}


/* ---------- map ---------- */

#map-view{
    height:400px;
}

#map-view.expanded{
    height:90vh;
}

.leaflet-bar{
   border: 1px solid var(--sgt-white) !important;
}

.leaflet-bar a{
    background: var(--sgt-red);
    color:var(--sgt-white);
}

.leaflet-bar a:hover{
    background: var(--sgt-red);
    color:var(--sgt-white);
}

.leaflet-popup-content-wrapper, .leaflet-popup-tip {
    background: var(--sgt-md-gray);
    color: white;
}

.leaflet-popup-content {
    background-color: var(--sgt-md-gray);
    letter-spacing: 0.1rem;
    font-size: 0.75rem;
}

.map-popup-loc{
    color: var(--sgt-light);
    font-size: 0.65rem;
    text-transform: uppercase;
}

.leaflet-container a.leaflet-popup-close-button {
    color:var(--sgt-red);
}

.leaflet-container a.leaflet-popup-close-button:hover {
    color:var(--sgt-red) !important;
}

/* cluster bubbles in site colors instead of the plugin's green/yellow/orange */
.marker-cluster-small,
.marker-cluster-medium,
.marker-cluster-large{
    background-color: rgba(208, 63, 37, 0.35);
}

.marker-cluster-small div,
.marker-cluster-medium div,
.marker-cluster-large div{
    background-color: var(--sgt-red);
    color: var(--sgt-white);
    font-weight: bold;
}


/* ---------- small screens ---------- */

@media (max-width:768px){

    .cl-controls{
        justify-content: center;
    }

    .cl-count{
        font-size: 1.3rem;
        flex: 1 1 100%;
        text-align: center;
    }

    #table-search-group.cl-search{
        max-width: none;
        flex: 1 1 100%;
    }

    .cl-chips,
    .cl-selects{
        flex: 1 1 100%;
        justify-content: center;
    }

    .cl-chip{
        padding: 0.45rem 0.9rem !important;
        font-size: 0.8rem !important;
    }

    .cl-select{
        font-size: 0.8rem;
        padding: 0.5rem 0.6rem;
    }

    .course-grid{
        gap: 1rem;
    }

    #map-view{
        height: 300px;
    }

}
