/**
 * Course Cards Module
 * Matches the IIMPREP / Edmark Figma design
 */

/* ── Section wrapper ─────────────────────────────── */

.edmark-course-cards-section {
    max-width: 1200px;
    margin: 60px auto;
    padding: 0 20px;
    background: var(--cc-bg, transparent);
    --cc-btn: #C0392B;
    --cc-desktop: 3;
    --cc-tablet: 2;
    --cc-mobile: 1;
}

.edmark-cc-section-header {
    text-align: center;
    margin-bottom: 40px;
}

.edmark-cc-section-title {
    font-size: 2rem;
    font-weight: 700;
    color: #111;
    margin: 0 0 12px;
    line-height: 1.25;
}

.edmark-cc-accent {
    color: var(--cc-btn);
}

.edmark-cc-section-desc {
    color: #6b7280;
    max-width: 640px;
    margin: 0 auto;
    line-height: 1.7;
    font-size: 1rem;
}

/* ── Grid ────────────────────────────────────────── */

.edmark-cc-grid {
    display: grid;
    grid-template-columns: repeat(var(--cc-desktop, 3), 1fr);
    gap: 24px;
    align-items: start;
}

/* ── Card ────────────────────────────────────────── */

.edmark-cc-card {
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 4px 28px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.edmark-cc-card:hover {
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.12);
    transform: translateY(-4px);
}

/* ── Image Area ──────────────────────────────────── */

.edmark-cc-image-area {
    position: relative;
    background: linear-gradient(135deg, #FFF0F0 0%, #FFE4E4 100%);
    height: 210px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.edmark-cc-banner-img {
    max-width: 100%;
    width: auto;
    object-fit: cover !important;
    display: block;
}

.edmark-cc-img-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #FFF0F0, #FFD6D6);
}

/* Start-date badge (top-right of image) */
.edmark-cc-start-badge {
    position: absolute;
    top: 14px;
    right: 14px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 5px 12px 5px 9px;
    font-size: 11.5px;
    font-weight: 500;
    color: #374151;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.10);
    white-space: nowrap;
    line-height: 1.2;
}

/* ── Card Body ───────────────────────────────────── */

.edmark-cc-body {
    padding: 18px 20px 22px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

/* ── Badges (Live + Location) ────────────────────── */

.edmark-cc-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.edmark-cc-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.2;
}

.edmark-cc-live {
    background: #DCFCE7;
    color: #15803D;
}

.edmark-cc-live-dot {
    width: 7px;
    height: 7px;
    background: #16A34A;
    border-radius: 50%;
    flex-shrink: 0;
    display: inline-block;
}

.edmark-cc-location {
    background: #F3F4F6;
    color: #374151;
    font-weight: 500;
}

/* ── Title ───────────────────────────────────────── */

.edmark-cc-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #111;
    margin: 0 0 14px;
    line-height: 1.3;
}

/* ── Features 2-column grid ──────────────────────── */

.edmark-cc-features {
    list-style: none;
    padding: 0;
    margin: 0 0 10px;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px 14px;
}

.edmark-cc-feature-item {
    display: flex;
    align-items: flex-start;
    gap: 6px;
    font-size: 0.82rem;
    color: #374151;
    line-height: 1.45;
}

.edmark-cc-check-icon {
    color: var(--cc-btn);
    flex-shrink: 0;
    margin-top: 1px;
}

/* ── Validity ────────────────────────────────────── */

.edmark-cc-validity {
    display: flex;
    align-items: flex-start;
    gap: 6px;
    font-size: 0.82rem;
    color: #374151;
    line-height: 1.45;
    margin-bottom: 18px;
}

/* ── Footer: Price + CTA ─────────────────────────── */

.edmark-cc-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-top: auto;
    padding-top: 6px;
}

.edmark-cc-pricing {
    display: flex;
    flex-direction: column;
    gap: 5px;
    min-width: 0;
}

.edmark-cc-price-row {
    display: flex;
    align-items: baseline;
    gap: 8px;
    flex-wrap: wrap;
}

.edmark-cc-price-current {
    font-size: 1.35rem;
    font-weight: 700;
    color: #111;
    letter-spacing: -0.02em;
}

.edmark-cc-price-original {
    font-size: 0.88rem;
    color: #9CA3AF;
    text-decoration: line-through;
}

.edmark-cc-discount-badge {
    display: inline-block;
    background: #FFF0F0;
    color: var(--cc-btn);
    font-size: 0.72rem;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 12px;
    line-height: 1.4;
    width: fit-content;
}

/* CTA Button */
.edmark-cc-cta-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--cc-btn);
    color: #fff !important;
    text-decoration: none !important;
    padding: 13px 22px;
    border-radius: 40px;
    font-size: 0.95rem;
    font-weight: 600;
    white-space: nowrap;
    flex-shrink: 0;
    transition: opacity 0.2s ease, transform 0.2s ease;
    line-height: 1;
    border: none;
    cursor: pointer;
}

.edmark-cc-cta-btn:hover {
    opacity: 0.88;
    transform: translateY(-1px);
}

.edmark-cc-cta-btn svg {
    flex-shrink: 0;
}

/* ── Responsive ──────────────────────────────────── */

/* Tablet */
@media (max-width: 1024px) {
    .edmark-cc-grid {
        grid-template-columns: repeat(var(--cc-tablet, 2), 1fr);
    }
}

/* Mobile */
@media (max-width: 640px) {
    .edmark-course-cards-section {
        margin: 40px auto;
        padding: 0 16px;
    }

    .edmark-cc-section-title {
        font-size: 1.55rem;
    }

    .edmark-cc-grid {
        grid-template-columns: repeat(var(--cc-mobile, 1), 1fr);
        gap: 20px;
    }

    .edmark-cc-features {
        grid-template-columns: 1fr;
        gap: 7px;
    }

    .edmark-cc-footer {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    .edmark-cc-cta-btn {
        justify-content: center;
        width: 100%;
        padding: 14px 20px;
    }

    .edmark-cc-image-area {
        height: 180px;
    }
}
