/**
 * EBA Course Showcase — modern featured-courses slider/grid
 * Matches reference site's "Featured Courses" section.
 */

.eba-wrapper.eba-cs {
    padding: clamp(3rem, 6vw, 5rem) 0;
    background: var(--eba-ivory);
}

/* ===== HEADER ===== */
.eba-cs__header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: var(--eba-space-5);
    margin-bottom: clamp(2rem, 4vw, 3rem);
    flex-wrap: wrap;
}

.eba-cs__header-text { flex: 1; min-width: 280px; }

.eba-cs__title {
    font-family: var(--eba-font-heading);
    font-size: clamp(1.875rem, 3vw + 0.5rem, 2.5rem);
    color: #0f1729;
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.01em;
    margin: 0 0 8px;
}

.eba-cs__subtitle {
    font-family: 'Inter', sans-serif;
    font-size: 0.9375rem;          /* 15px */
    color: #525e7a;
    line-height: 1.6;
    margin: 0;
}

/* View All Courses — matches reference outlined-gold pill button */
.eba-cs__view-all {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 40px;
    padding: 0 22px;
    border: 1.5px solid #d4a24c;
    border-radius: 8px;
    color: #b58834;
    text-decoration: none;
    font-family: 'Inter', sans-serif;
    font-size: 0.875rem;
    font-weight: 500;
    background: transparent;
    transition: all 0.2s ease;
    flex-shrink: 0;
    line-height: 1;
}

.eba-cs__view-all:hover {
    background: rgba(212, 162, 76, 0.08);
    color: #b58834;
}

.eba-cs__view-all svg { transition: transform 0.2s var(--eba-ease); }
.eba-cs__view-all:hover svg { transform: translateX(3px); }

/* ===== GRID ===== */
.eba-cs__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
}

/* ===== SLIDER ===== */
.eba-cs__slider-wrap {
    position: relative;
}

.eba-cs__slider {
    --cs-cols: 3;
    --cs-gap: 28px;
    position: relative;
}

/* Native scroll-snap track — works without JS, JS adds arrows/dots/autoplay on top */
.eba-cs__track {
    display: flex;
    gap: var(--cs-gap);
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    /* Add bottom padding so card shadows aren't clipped */
    padding-bottom: 8px;
}

.eba-cs__track::-webkit-scrollbar { display: none; }

.eba-cs__slide {
    flex: 0 0 calc((100% - (var(--cs-cols) - 1) * var(--cs-gap)) / var(--cs-cols));
    max-width: calc((100% - (var(--cs-cols) - 1) * var(--cs-gap)) / var(--cs-cols));
    min-width: 0;
    display: flex;
    scroll-snap-align: start;
}

.eba-cs__slide > .eba-cs__card {
    width: 100%;
}

/* ===== CARD =====
   No visible border by default — reference uses pure shadow for separation.
   Transparent border kept so admin can opt-in via Elementor Style tab. */
.eba-cs__card {
    background: #ffffff;
    border: 1px solid transparent;
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: all 0.25s ease;
    box-shadow: 0 2px 8px -2px rgba(15, 23, 42, 0.05),
                0 4px 16px -4px rgba(15, 23, 42, 0.04);
    height: 100%;
}

.eba-cs__card:hover {
    box-shadow: 0 12px 32px -10px rgba(15, 23, 42, 0.15);
    transform: translateY(-2px);
}

.eba-cs__card-image {
    position: relative;
    display: block;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: var(--eba-ivory-dark);
}

.eba-cs__card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s var(--eba-ease);
}

.eba-cs__card:hover .eba-cs__card-image img { transform: scale(1.06); }

.eba-cs__card-image-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--eba-border);
}

/* ===== BADGES — match reference exactly ===== */
/* Featured badge: gold #DDAB2C bg, charcoal text, 12px Inter, padding 2px 10px */
.eba-cs__badge {
    position: absolute;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 2px 10px;
    border-radius: 999px;
    font-family: 'Inter', sans-serif;
    font-size: 0.75rem;            /* 12px */
    font-weight: 600;
    z-index: 2;
    line-height: 1.4;
}

.eba-cs__badge--featured {
    top: 12px;
    left: 12px;
    background: #ddab2c;           /* reference gold */
    color: #0f1729;                /* reference charcoal */
}

.eba-cs__badge--featured svg { fill: currentColor; }

/* Category badge: white 80% bg, charcoal text, 1px border */
.eba-cs__badge--category {
    top: 12px;
    right: 12px;
    background: rgba(255, 255, 255, 0.8);
    color: #0f1729;
    border: 1px solid rgba(15, 23, 42, 0.08);
    max-width: calc(100% - 28px - 80px);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

/* ===== CARD BODY ===== */
.eba-cs__card-body {
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 0;
    flex: 1;
}

/* Compound selectors beat Hello theme's `body a { color }` without !important */
.eba-wrapper .eba-cs__card-title,
.eba-wrapper .eba-cs__card-title a,
.eba-cs .eba-cs__card-title,
.eba-cs .eba-cs__card-title a {
    font-family: var(--eba-font-heading);
    font-size: 1.25rem;            /* 20px — reference text-xl */
    line-height: 1.3;
    color: #0f1729;                /* reference text-foreground */
    font-weight: 600;              /* reference font-semibold */
    letter-spacing: -0.005em;
    transition: color 0.2s ease;
}

.eba-wrapper .eba-cs__card-title,
.eba-cs .eba-cs__card-title {
    margin: 0 0 8px;
    /* line-clamp-2 like reference */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.eba-wrapper .eba-cs__card-title a,
.eba-cs .eba-cs__card-title a {
    text-decoration: none;
    background-image: linear-gradient(currentColor, currentColor);
    background-size: 0 1.5px;
    background-repeat: no-repeat;
    background-position: left bottom;
    transition: background-size 0.3s var(--eba-ease);
}

.eba-wrapper .eba-cs__card-title a:hover,
.eba-cs .eba-cs__card-title a:hover {
    background-size: 100% 1.5px;
}

/* Description — Inter 14px, color #525E7A, margin-bottom 16px, line-clamp-2 */
.eba-cs__card-excerpt {
    font-family: 'Inter', sans-serif;
    color: #525e7a;
    font-size: 0.875rem;           /* 14px — reference text-sm */
    line-height: 1.55;
    margin: 0 0 16px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Meta row — 12px Inter, charcoal-muted #525E7A, gold icons, gap-4 */
.eba-cs__card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    font-family: 'Inter', sans-serif;
    color: #525e7a;
    font-size: 0.75rem;            /* 12px — reference text-xs */
    margin-bottom: 16px;
}

.eba-cs__card-meta span {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.eba-cs__card-meta svg {
    color: #b58834;
    flex-shrink: 0;
    width: 12px;
    height: 12px;
}

/* Footer — 16px padding-top, 1px border-top */
.eba-cs__card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-top: auto;
    padding-top: 16px;
    border-top: 1px solid #e0dad0;
}

.eba-cs__card-price {
    font-family: var(--eba-font-heading);
    font-size: 1.25rem;
    color: #0f1729;
    font-weight: 600;
    line-height: 1;
    letter-spacing: -0.005em;
}

/* View Course button — solid gold #DDAB2C, charcoal text, 14px Inter, padding 0 16px
   Uses compound selectors (.eba-wrapper .eba-cs__card-btn etc) to win specificity
   over Hello theme's aggressive a/button styles WITHOUT !important. */
.eba-wrapper .eba-cs__card-btn,
.eba-wrapper a.eba-cs__card-btn,
.eba-cs .eba-cs__card-btn,
a.eba-cs__card-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 36px;
    padding: 0 16px;
    background: #ddab2c;
    background-image: none;
    color: #0f1729;
    border-radius: 8px;
    font-family: 'Inter', sans-serif;
    font-size: 0.875rem;           /* 14px — reference text-sm */
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
    white-space: nowrap;
    border: 0;
    line-height: 1;
}

.eba-wrapper .eba-cs__card-btn:hover,
.eba-wrapper a.eba-cs__card-btn:hover,
.eba-cs .eba-cs__card-btn:hover,
a.eba-cs__card-btn:hover {
    background: #c89821;           /* slightly darker gold on hover (not lighter) */
    background-image: none;
    color: #0f1729;
}

/* ===== ARROWS ===== */
.eba-cs__arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    border-radius: var(--eba-radius-full);
    background: #ffffff;
    border: 1px solid var(--eba-border);
    color: var(--eba-charcoal);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 5;
    transition: all 0.2s var(--eba-ease);
    box-shadow: 0 6px 20px rgba(15, 23, 42, 0.12);
    padding: 0;
}

.eba-cs__arrow:hover:not(:disabled) {
    background: var(--eba-gold-dark);
    color: #ffffff;
    border-color: var(--eba-gold-dark);
    transform: translateY(-50%) scale(1.05);
}

.eba-cs__arrow:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

.eba-cs__arrow--prev { left: -24px; }
.eba-cs__arrow--next { right: -24px; }

/* Make sure arrows aren't clipped by overflow */
.eba-cs__slider-wrap { overflow: visible; }

/* ===== DOTS ===== */
.eba-cs__dots {
    display: flex !important;
    justify-content: center;
    gap: 8px;
    margin-top: clamp(1.5rem, 3vw, 2rem);
    flex-wrap: wrap;
    padding: 8px 14px;
}

.eba-cs__dots:empty { display: none !important; }

.eba-cs__dot {
    width: 10px;
    height: 10px;
    border-radius: var(--eba-radius-full);
    background: var(--eba-border);
    border: 0;
    cursor: pointer;
    padding: 0;
    transition: all 0.3s var(--eba-ease);
    flex-shrink: 0;
}

.eba-cs__dot:hover { background: var(--eba-text-subtle); }

.eba-cs__dot.is-active {
    background: var(--eba-gold-dark);
    width: 28px;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
    .eba-cs__slider { --cs-cols: 2; }
    .eba-cs__grid { grid-template-columns: repeat(2, 1fr); }
    .eba-cs__arrow--prev { left: 0; }
    .eba-cs__arrow--next { right: 0; }
}

@media (max-width: 768px) {
    .eba-cs__header { flex-direction: column; align-items: flex-start; text-align: left; }
    .eba-cs__view-all { align-self: flex-start; }
    .eba-cs__arrow { display: none; }
}

@media (max-width: 640px) {
    .eba-cs__slider { --cs-cols: 1; }
    .eba-cs__grid { grid-template-columns: 1fr; }
    .eba-cs__card-body { padding: 20px; }
    .eba-cs__card-title { font-size: 1.25rem; }
    .eba-cs__card-meta { gap: 10px; font-size: 0.75rem; }
}
