/* The Comrades event displays */
.comrades-events-section { width: 100%; }
.comrades-events-heading {
    color: #14243D;
    font-family: Montserrat, sans-serif;
    font-weight: 800;
    margin: 0 0 24px;
}
.comrades-events-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 22px;
}
.comrades-events-next { grid-template-columns: minmax(0, 1fr); max-width: 560px; }
.comrades-event-card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    overflow: hidden;
    background: #0C1728;
    border-radius: 8px;
    border-bottom: 0;
    color: #fff;
}
.comrades-event-image-link { display: block; aspect-ratio: 16 / 9; overflow: hidden; background: #14243D; }
.comrades-event-image { display: block; width: 100%; height: 100%; object-fit: contain; object-position: center center; }
.comrades-event-image-placeholder { width: 100%; height: 100%; min-height: 150px; background: #14243D; }
.comrades-event-card-content { display: flex; flex: 1; flex-direction: column; padding: 18px; }
.comrades-event-date { margin: 0 0 8px; color: #D6C9A5; font-weight: 700; font-size: 14px; }
.comrades-event-title { margin: 0 0 10px; color: #fff; font-family: Montserrat, sans-serif; font-size: 22px; line-height: 1.2; font-weight: 700; }
.comrades-event-title a { color: inherit; text-decoration: none; }
.comrades-event-title a:hover { color: #D6C9A5; }
.comrades-event-description { color: #fff; font-size: 15px; line-height: 1.6; }
.comrades-event-description p { margin: 0 0 12px; }
.comrades-event-card-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: auto; padding-top: 14px; }
.comrades-event-price { color: #fff; font-weight: 700; }
.comrades-event-button {
    display: inline-block; padding: 11px 18px; border-radius: 4px;
    background: #B82032; color: #fff !important; text-decoration: none !important;
    font-weight: 700; white-space: nowrap;
}
.comrades-event-button:hover { background: #fff; color: #14243D !important; }
.comrades-events-empty { padding: 22px; background: #F5F2EB; border-left: 4px solid #B82032; color: #14243D; }
@media (max-width: 1024px) { .comrades-events-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) {
    .comrades-events-grid { grid-template-columns: 1fr; }
    .comrades-events-next { max-width: 100%; }
}



/* WooCommerce product descriptions on the What's On listing */
.comrades-event-description {
    color: #fff;
    font-size: 15px;
    line-height: 1.65;
    margin: 4px 0 14px;
}
.comrades-event-description p { margin: 0 0 10px; }
.comrades-event-card-footer { margin-top: auto; }




/* v1.1.8: Stable homepage event-card layout.
   Kadence controls the surrounding Section height. The shortcode card has a
   400px minimum only; its content flexes internally so the action stays inside
   the card and sits at the bottom. No percentage heights on the grid/card. */
.comrades-events-grid.comrades-events-next {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-items: stretch;
    width: 100%;
    height: auto;
    min-height: 0;
}

.comrades-events-next .comrades-event-card {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    height: auto;
    min-height: 400px;
    box-sizing: border-box;
    border-bottom: 0 !important;
}

.comrades-events-next .comrades-event-card-content {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    min-height: 0;
    box-sizing: border-box;
}

.comrades-events-next .comrades-event-card-footer {
    display: flex;
    flex: 0 0 auto;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-end;
    width: 100%;
    margin-top: auto !important;
    padding-top: 12px;
    gap: 8px;
    box-sizing: border-box;
}

.comrades-events-next .comrades-event-price {
    display: none !important;
}

.comrades-events-next .comrades-event-button {
    display: block;
    flex: 0 0 auto;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    text-align: center;
    white-space: normal;
    line-height: 1.3;
}

/* Keep equal-height cards on the dedicated What's On listing only. */
.comrades-events-section .comrades-events-grid {
    align-items: stretch;
    grid-auto-rows: 1fr;
}
.comrades-events-section .comrades-event-card {
    height: 100%;
    min-height: 0;
}
.comrades-events-section .comrades-event-card-content {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    min-height: 0;
}
.comrades-events-section .comrades-event-card-footer {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    width: 100%;
    margin-top: auto !important;
    padding-top: 12px;
}
.comrades-events-section .comrades-event-button {
    display: block;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    text-align: center;
    white-space: normal;
    line-height: 1.3;
}

@media (max-width: 600px) {
    .comrades-events-grid { grid-auto-rows: auto; }
}


/* v1.1.9: Match homepage shortcode buttons to the Kadence card buttons. */
.comrades-events-next .comrades-event-card-footer {
    width: 100%;
    margin-top: auto !important;
    padding-top: 12px;
    box-sizing: border-box;
}

.comrades-events-next .comrades-event-button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 49px;
    padding: 14px 26px;
    box-sizing: border-box;
    border: 0;
    border-radius: 4px;
    background: #B82032;
    color: #FFFFFF !important;
    font-family: Montserrat, sans-serif;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.3;
    text-align: center;
    text-decoration: none !important;
    white-space: normal;
}

.comrades-events-next .comrades-event-button:hover,
.comrades-events-next .comrades-event-button:focus {
    background: #14243D;
    color: #FFFFFF !important;
}
