/* Container */
.course-dates-accordion {
    max-width: 1200px;
    margin: 0 auto;
    font-family: inherit;
}

/* --- Card Styles --- */
.course-date-item {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0px 4px 15px rgba(0, 0, 0, 0.05);
    margin-bottom: 20px;
    border: 1px solid #eef2f6;
    overflow: hidden;
    transition: all 0.3s ease;
}

.course-date-item:hover {
    box-shadow: 0px 8px 25px rgba(0, 0, 0, 0.08);
}

.course-date-item.is-fully-booked {
    opacity: 0.7;
    pointer-events: none;
}

/* --- Summary (Header) --- */
.course-date-summary {
    display: flex;
    align-items: center; /* Ensures badge, text, and buttons align vertically */
    padding: 24px 30px;
    background: #fff;
    cursor: pointer;
    min-height: 110px; /* Force minimum height for consistency */
}

/* 1. Badge */
.cd-badge {
    border-radius: 8px;
    min-width: 65px;
    height: 65px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    margin-right: 25px;
    flex-shrink: 0;
}

.cd-badge-label {
    background-color: rgba(var(--theme-rgb), 0.15); 
    color: var(--theme-color);
    font-size: 10px;
    font-weight: 700;
    text-align: center;
    padding: 4px 0;
    text-transform: capitalize;
    line-height: 1;
}

.cd-badge-content {
    background-color: var(--theme-color);
    color: #fff;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding-bottom: 2px;
}

.cd-day-num {
    font-size: 24px;
    font-weight: 700;
    line-height: 1;
}

.cd-month {
    font-size: 11px;
    text-transform: uppercase;
    font-weight: 600;
}

/* 2. Info Block - Centered Vertically */
.cd-info {
    flex-grow: 1;
    padding-right: 20px;
    display: flex;
    flex-direction: column;
    justify-content: center; /* Centers content vertically in this flex item */
    height: 100%; 
}

.cd-title {
    margin: 0 0 4px 0;
    font-size: 18px;
    font-weight: 800;
    color: #0A1F33;
    line-height: 1.2;
}

.cd-sub-info {
    font-size: 15px;
    font-weight: 500;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    line-height: 1.4;
}

.cd-date-string { color: #001B2F; }
.cd-location-string { color: #0075FF; }

.cd-separator {
    margin: 0 6px;
    color: #cbd5e1;
}

.cd-fully-booked-msg {
    color: #e74c3c;
    font-size: 12px;
    font-weight: 700;
}

/* More Details Toggle */
.course-date-toggle {
    background: none;
    border: none;
    color: #E6007E;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    padding: 0;
    width: fit-content;
    pointer-events: none; /* Passes click to parent */
}

.course-date-toggle .toggle-text { margin-right: 6px; }
.chevron-icon { transition: transform 0.3s ease; }
.course-date-item.active .chevron-icon { transform: rotate(180deg); }


/* 3. Actions (Buttons) */
.cd-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-left: auto;
}

/* Unified Button Style */
.cd-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 48px;
    padding: 0 24px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 15px;
    font-weight: 700;
    transition: all 0.2s ease;
    white-space: nowrap;
    line-height: 1;
    box-sizing: border-box;
}

.cd-btn-outline {
    border: 1px solid #E6007E;
    color: #E6007E;
    background: transparent;
}
.cd-btn-outline:hover {
    background: #fff0f7;
    color: #c9006b;
}

.cd-btn-fill {
    background: #007bff;
    color: #fff;
    border: 1px solid #007bff;
}
.cd-btn-fill:hover {
    background: #0062cc;
    border-color: #0062cc;
    color: #fff;
}


/* --- Details Section --- */
.course-date-details {
    background-color: #F9FBFC;
    border-top: 1px solid #f0f0f0;
    padding: 0;
    position: relative;
}

/* Colored accent line on left */
.course-date-details::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background-color: var(--theme-color);
    opacity: 0.5;
}

.cd-details-inner {
    display: flex;
    gap: 40px;
    padding: 35px 40px;
}

.cd-details-image {
    width: 280px;
    flex-shrink: 0;
}

.cd-details-image img {
    width: 100%;
    height: 100%;
    border-radius: 8px;
    object-fit: cover;
    aspect-ratio: 16/10;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.cd-details-content { flex-grow: 1; }

.cd-detail-group { margin-bottom: 24px; }
.cd-detail-group:last-child { margin-bottom: 0; }

/* REMOVED uppercase transform here */
.cd-detail-group h5 {
    font-size: 12px;
    font-weight: 700;
    color: #555;
    margin: 0 0 6px 0;
    letter-spacing: 0.5px;
}

.cd-detail-group p {
    margin: 0;
    font-size: 15px;
    line-height: 1.5;
    color: #222;
}

.cd-address-highlight {
    font-weight: 700;
    color: #0075FF;
    margin-bottom: 2px !important;
}

.course-dates__more-information__right__reserve {
    text-decoration: underline;
    font-size: 13px;
    color: #666;
    display: inline-block;
    margin-top: 15px;
    font-weight: 600;
}
.course-dates__more-information__right__reserve:hover { color: #000; }

/* Responsive */
@media screen and (max-width: 991px) {
    .course-date-summary {
        flex-wrap: wrap;
        padding: 20px;
    }
    .cd-info {
        width: 100%;
        padding-right: 0;
        margin-bottom: 15px;
    }
    .cd-actions {
        width: 100%;
        margin-left: 0;
        justify-content: flex-start;
        padding-left: 90px;
    }
    .cd-details-inner {
        flex-direction: column;
        padding: 25px;
    }
    .cd-details-image { width: 100%; margin-bottom: 20px; }
}

@media screen and (max-width: 575px) {
    .cd-badge { margin-right: 15px; }
    .cd-actions { padding-left: 0; flex-wrap: wrap; }
    .cd-btn { width: 100%; margin-bottom: 10px; }
    .cd-btn:last-child { margin-bottom: 0; }
}

/* Modal and No Dates Styles (Preserved) */
.course-dates-modal {
  visibility: hidden;
  position: fixed;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.4);
  z-index: 10000;
  opacity: 0;
  transition: opacity 300ms;
}

.course-dates-modal.active {
  visibility: visible;
  opacity: 1;
}

.course-dates-modal-content {
  border-radius: 5px;
  position: relative;
  background-color: #fefefe;
  margin: 10% auto;
  padding: 40px;
  width: 90%;
  max-width: 800px;
}

.course-dates-modal-content .close {
  color: #aaa;
  font-size: 28px;
  font-weight: bold;
  position: absolute;
  right: 20px;
  top: 10px;
  cursor: pointer;
}

.no-dates-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: #fff;
  box-shadow: 0px 4px 15px rgba(0,0,0,0.05);
  border-radius: 5px;
  padding: 40px;
  text-align: center;
  margin-top: 30px;
}

.no-dates-card img {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  margin-bottom: 20px;
}

/* --- Show More Button Styles --- */
.show-more-wrapper {
    text-align: center;
    margin-top: 30px;
}

.btn-show-more {
    display: inline-block;
    background-color: #fff;
    color: #0075FF; /* Blue color */
    border: 1px solid #0075FF;
    padding: 10px 24px;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-show-more:hover {
    background-color: #f0f7ff;
}