/* Hof Maiberg Companion – HM_Card 0.4.1 */

.hmc-card-grid,
.hmc-card-grid * {
    box-sizing: border-box;
}

.hmc-card-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: clamp(24px, 3vw, 40px);
    width: 100%;
}

.hmc-card-grid--columns-1 {
    grid-template-columns: minmax(0, 1fr);
}

.hmc-card-grid--columns-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.hmc-card {
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: #FFFFFF;
    color: #2E352B;
    border: 1px solid #E8E3D8;
    border-radius: 20px;
    box-shadow: 0 12px 34px rgba(46, 53, 43, 0.07);
    transition:
        transform 180ms ease,
        box-shadow 180ms ease,
        opacity 180ms ease;
}

.hmc-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 18px 44px rgba(46, 53, 43, 0.11);
}

.hmc-card__media {
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #ECE9E1;
}

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

.hmc-card__image {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 280ms ease;
}

.hmc-card:hover .hmc-card__image {
    transform: scale(1.025);
}

.hmc-card__body {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: 28px 30px 22px;
}

.hmc-card__eyebrow {
    margin: 0 0 10px;
    color: #6F8A57;
    font-family: "Montserrat", sans-serif;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.5;
    letter-spacing: 0.09em;
    text-transform: uppercase;
}

.hmc-card__title {
    margin: 0 0 18px;
    color: #2E352B;
    font-family: "Cormorant Garamond", Georgia, serif;
    font-size: clamp(29px, 2.3vw, 36px);
    font-weight: 600;
    line-height: 1.08;
}

.hmc-card__title a {
    color: inherit;
    text-decoration: none;
}

.hmc-card__meta {
    display: grid;
    gap: 0;
    margin: 0 0 18px;
    color: #50594C;
    font-family: "Montserrat", sans-serif;
    font-size: 14px;
    line-height: 1.55;
}

.hmc-card__meta-group {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.hmc-card__meta-group p {
    margin: 0;
}

/* Datum · Uhrzeit · Kurstage */
.hmc-card__meta-group--schedule {
    min-height: 24px;
    margin-bottom: 18px;
}

/* Veranstaltungsort: stets Raum für drei Zeilen */
.hmc-card__meta-group--location {
    min-height: 66px;
    margin-bottom: 18px;
}

/* Verfügbare Plätze: fester Bereich, auch wenn ausgeblendet */
.hmc-card__meta-group--places {
    min-height: 24px;
}

.hmc-card__meta-group.is-placeholder {
    visibility: hidden;
}

.hmc-card__price {
    margin: auto 0 14px;
    padding-top: 7px;
    color: #2E352B;
    font-family: "Montserrat", sans-serif;
    font-size: 18px;
    font-weight: 600;
    line-height: 1.4;
}

.hmc-card__status {
    margin: 0;
}

.hmc-card__status-label {
    display: inline-flex;
    padding: 6px 11px;
    border-radius: 999px;
    background: #E4EDDF;
    color: #36502F;
    font-family: "Montserrat", sans-serif;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.hmc-card--low .hmc-card__status-label {
    background: #F4E4CC;
    color: #7B4A0E;
}

.hmc-card--sold_out .hmc-card__status-label {
    background: #EEDAD6;
    color: #79332B;
}

.hmc-card--closed .hmc-card__status-label {
    background: #E5E5E2;
    color: #666660;
}

.hmc-card--muted {
    opacity: 0.72;
    filter: saturate(0.65);
}

.hmc-card--muted:hover {
    opacity: 0.82;
}

.hmc-card__footer {
    padding: 0 30px 28px;
}

.hmc-card__link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #C97B19;
    font-family: "Montserrat", sans-serif;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
}

.hmc-card__link:hover {
    color: #8C5E13;
}

.hmc-card a:focus-visible {
    outline: 2px solid #C97B19;
    outline-offset: 4px;
    border-radius: 3px;
}

.hmc-empty-state {
    max-width: 720px;
    margin: 40px auto;
    padding: 44px;
    text-align: center;
    background: #F8F6F1;
    border-radius: 18px;
    color: #465044;
}

.hmc-empty-state p {
    margin: 0 0 8px;
}

.hmc-empty-state p:last-child {
    margin-bottom: 0;
}

@media (max-width: 1024px) {
    .hmc-card-grid,
    .hmc-card-grid--columns-3 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 680px) {
    .hmc-card-grid,
    .hmc-card-grid--columns-2,
    .hmc-card-grid--columns-3 {
        grid-template-columns: minmax(0, 1fr);
    }

    .hmc-card__body {
        padding: 24px 24px 20px;
    }

    .hmc-card__footer {
        padding: 0 24px 24px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .hmc-card,
    .hmc-card__image {
        transition: none;
    }

    .hmc-card:hover {
        transform: none;
    }

    .hmc-card:hover .hmc-card__image {
        transform: none;
    }
}


/* Gleichmässige Kartenhöhen und feste Inhaltspositionen */
.hmc-course-card .hmc-card__title {
    min-height: 78px;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
}

.hmc-course-card .hmc-card__body {
    min-height: 440px;
}

@media (max-width: 680px) {
    .hmc-course-card .hmc-card__body {
        min-height: 0;
    }

    .hmc-course-card .hmc-card__title {
        min-height: 0;
    }
}


/* Kursmerkmale und ruhiger Textfilter 0.4.3 */
.hmc-course-filter{
    display:flex;
    align-items:center;
    flex-wrap:wrap;
    gap:10px 18px;
    margin:0 0 34px;
    padding:0 0 18px;
    border-bottom:1px solid #E8E3D8;
    font-family:"Montserrat",sans-serif;
    font-size:14px;
}
.hmc-course-filter__label{
    color:#465044;
    font-weight:600;
}
.hmc-course-filter__link{
    position:relative;
    color:#5C6658;
    text-decoration:none;
    padding:3px 0;
}
.hmc-course-filter__link:hover,
.hmc-course-filter__link:focus-visible,
.hmc-course-filter__link.is-active{
    color:#C97B19;
}
.hmc-course-filter__link.is-active::after{
    content:"";
    position:absolute;
    left:0;
    right:0;
    bottom:-5px;
    height:2px;
    border-radius:999px;
    background:#C97B19;
}
.hmc-course-filter__link:focus-visible{
    outline:2px solid #C97B19;
    outline-offset:4px;
    border-radius:2px;
}
.hmc-course-card .hmc-card__eyebrow{
    min-height:18px;
}
@media(max-width:680px){
    .hmc-course-filter{
        align-items:flex-start;
        gap:10px 15px;
    }
    .hmc-course-filter__label{
        width:100%;
    }
}


/* AJAX-Filter 0.4.4 */
.hmc-course-browser{
    position:relative;
    min-height:40px;
}
.hmc-course-browser.is-loading{
    pointer-events:none;
}
.hmc-course-browser.is-loading::after{
    content:"";
    position:absolute;
    inset:0;
    z-index:5;
    background:rgba(248,246,241,.56);
    backdrop-filter:blur(1px);
}
.hmc-course-browser.is-loading::before{
    content:"Kurse werden gefiltert …";
    position:absolute;
    left:50%;
    top:24px;
    z-index:6;
    transform:translateX(-50%);
    padding:8px 13px;
    border-radius:999px;
    background:#F8F6F1;
    color:#3F5238;
    border:1px solid #DED8CB;
    font-family:"Montserrat",sans-serif;
    font-size:12px;
    font-weight:600;
    white-space:nowrap;
}
