/* ============================================================
   Dealcraft Academy — Course Cards
   Supports two styles via .dc-style-a and .dc-style-b
   on the .dc-course-grid wrapper.
   Shortcode: [dealcraft_courses style="a|b"]
   ============================================================ */

/* ── Grid ── */
.dc-course-grid {
    display: grid;
    gap: 28px;
}

.dc-style-a {
    grid-template-columns: repeat(3, 1fr);
}

.dc-style-b {
    grid-template-columns: repeat(3, 1fr);
}

@media (max-width: 1024px) {
    .dc-style-a,
    .dc-style-b {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .dc-style-a,
    .dc-style-b {
        grid-template-columns: 1fr;
    }
}

/* ── Shared badge styles ── */
.dc-badge {
    font-size: 11px;
    font-weight: 500;
    padding: 3px 10px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.92);
    color: #1a1a2e;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.dc-badge-diff {
    background: #1a1a2e;
    color: #fff;
}

/* Live dot pulse */
@keyframes dc-pulse {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0.4; }
}

/* ============================================================
   STYLE A — Standard card
   ============================================================ */

.dc-card-a {
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 2px 16px rgba(0, 0, 0, 0.08);
    border: 0.5px solid rgba(0, 0, 0, 0.07);
    transition: transform 0.22s ease, box-shadow 0.22s ease;
    display: flex;
    flex-direction: column;
}

.dc-card-a:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 36px rgba(0, 0, 0, 0.13);
}

/* Thumbnail */
.dc-thumb {
    position: relative;
    height: 180px;
    overflow: hidden;
    background: #e8eaf0;
}

.dc-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.dc-card-a:hover .dc-thumb img {
    transform: scale(1.04);
}

.dc-thumb-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #e8eaf0 0%, #d1d5db 100%);
}

.dc-thumb .dc-badges {
    position: absolute;
    top: 10px;
    left: 10px;
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.dc-rating-a {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(255, 255, 255, 0.92);
    border-radius: 20px;
    padding: 3px 10px;
    font-size: 11px;
    font-weight: 600;
    color: #1a1a2e;
    display: flex;
    align-items: center;
    gap: 3px;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.dc-rating-a .ti-star-filled {
    color: #f59e0b;
    font-size: 12px;
}

/* Body */
.dc-body {
    padding: 16px 18px 18px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.dc-title-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 6px;
}

.dc-title-a {
    font-size: 15px;
    font-weight: 600;
    color: #0f0f1a;
    line-height: 1.35;
    margin: 0;
}

.dc-top-rated-a {
    flex-shrink: 0;
    font-size: 11px;
    font-weight: 500;
    padding: 3px 10px;
    border-radius: 20px;
    background: #f0fdf4;
    color: #15803d;
    border: 0.5px solid #bbf7d0;
    white-space: nowrap;
}

.dc-live-a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    font-weight: 500;
    color: #059669;
    margin-bottom: 8px;
}

.dc-live-a::before {
    content: '';
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #10b981;
    display: inline-block;
    animation: dc-pulse 1.4s infinite;
    flex-shrink: 0;
}

.dc-meta-a {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}

.dc-meta-item {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    color: #6b7280;
}

.dc-meta-item .ti {
    font-size: 13px;
}

.dc-outcome-a {
    font-size: 12px;
    color: #374151;
    background: #fafaf9;
    border-radius: 8px;
    padding: 8px 10px;
    border-left: 3px solid #b58863;
    margin-bottom: 10px;
    line-height: 1.5;
}

.dc-best-a {
    font-size: 11px;
    color: #6b7280;
    margin-bottom: 14px;
    flex: 1;
}

.dc-best-a span {
    font-weight: 500;
    color: #374151;
}

.dc-footer-a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-top: auto;
}

.dc-price-a {
    font-size: 17px;
    font-weight: 700;
    color: #0f0f1a;
}

.dc-price-a s {
    font-size: 12px;
    color: #9ca3af;
    font-weight: 400;
    margin-left: 4px;
}

.dc-cta-a {
    display: flex;
    flex-direction: column;
    gap: 6px;
    align-items: stretch;
}

.dc-btn-enrol-a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    background: #b58863;
    color: #fff;
    border-radius: 8px;
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.18s ease;
    white-space: nowrap;
}

.dc-btn-enrol-a:hover {
    background: #9e7454;
    color: #fff;
    text-decoration: none;
}

.dc-btn-demo-a {
    display: block;
    text-align: center;
    background: transparent;
    color: #b58863;
    border: 1px solid #b58863;
    border-radius: 8px;
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 500;
    text-decoration: none;
    transition: background 0.18s ease, color 0.18s ease;
}

.dc-btn-demo-a:hover {
    background: #b58863;
    color: #fff;
    text-decoration: none;
}

/* ============================================================
   STYLE B — Immersive overlay (client preferred)
   ============================================================ */

.dc-card-b {
    border-radius: 16px;
    overflow: hidden;
    position: relative;
    padding-bottom: 130%;
    height: 0;
    cursor: pointer;
    display: block;
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.dc-card-b:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.28);
}

.dc-bg-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center top;
    background-repeat: no-repeat;
    background-color: #1a1a2e;
    transition: transform 0.35s ease;
}

.dc-card-b:hover .dc-bg-img {
    transform: scale(1.05);
}

.dc-bg-placeholder {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, #1a1a2e 0%, #3d3d5c 100%);
}

.dc-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to top,
        rgba(0, 0, 0, 0.88) 0%,
        rgba(0, 0, 0, 0.40) 55%,
        rgba(0, 0, 0, 0.15) 100%
    );
    pointer-events: none;
}

/* Top bar */
.dc-top-bar {
    position: absolute;
    top: 12px;
    left: 12px;
    right: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    z-index: 2;
}

.dc-top-bar .dc-badges {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.dc-top-bar .dc-badge {
    background: rgba(255, 255, 255, 0.18);
    color: #fff;
    border: 0.5px solid rgba(255, 255, 255, 0.28);
}

.dc-top-bar .dc-badge-diff {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    border: 0.5px solid rgba(255, 255, 255, 0.25);
}

.dc-rating-b {
    display: flex;
    align-items: center;
    gap: 3px;
    font-size: 11px;
    font-weight: 600;
    color: #fbbf24;
    z-index: 2;
}

.dc-rating-b .ti-star-filled {
    font-size: 12px;
}

.dc-top-rated-b {
    position: absolute;
    top: 44px;
    right: 12px;
    font-size: 10px;
    font-weight: 600;
    padding: 3px 9px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.18);
    color: #fff;
    border: 0.5px solid rgba(255, 255, 255, 0.3);
    z-index: 2;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

/* Bottom content */
.dc-bottom {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 16px;
    z-index: 2;
}

.dc-live-b {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 11px;
    font-weight: 500;
    color: #34d399;
    margin-bottom: 5px;
}

.dc-live-b::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #10b981;
    display: inline-block;
    animation: dc-pulse 1.4s infinite;
    flex-shrink: 0;
}

.dc-title-b {
    font-size: 16px;
    font-weight: 700;
    color: #fff;
    line-height: 1.3;
    margin: 0 0 3px;
}

.dc-host-b {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.65);
    margin-bottom: 10px;
}

.dc-meta-b {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}

.dc-mi {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    color: rgba(255, 255, 255, 0.85);
}

.dc-mi .ti {
    font-size: 12px;
}

.dc-outcome-b {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.9);
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 7px 10px;
    border-left: 3px solid #f59e0b;
    margin-bottom: 9px;
    line-height: 1.5;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.dc-outcome-b strong {
    color: #fbbf24;
}

.dc-best-b {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 10px;
}

.dc-best-b span {
    color: rgba(255, 255, 255, 0.88);
    font-weight: 500;
}

.dc-footer-b {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.dc-price-b {
    font-size: 17px;
    font-weight: 700;
    color: #fff;
}

.dc-price-b s {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.5);
    font-weight: 400;
    margin-left: 4px;
}

.dc-btn-enrol-b {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: #fff;
    color: #0f0f1a;
    border-radius: 8px;
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
    transition: background 0.18s ease, color 0.18s ease;
}

.dc-btn-enrol-b:hover {
    background: #f3f4f6;
    color: #0f0f1a;
    text-decoration: none;
}

.dc-btn-enrol-b .ti {
    font-size: 13px;
}

.dc-btn-demo-b {
    display: block;
    text-align: center;
    font-size: 11px;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: underline;
    margin-top: 8px;
    cursor: pointer;
    transition: color 0.18s ease;
}

.dc-btn-demo-b:hover {
    color: #fff;
    text-decoration: underline;
}

/* ============================================================
   Additional Responsive Improvements
   (Append at the end of existing CSS)
   ============================================================ */

/* ---------- Large Tablets ---------- */
@media (max-width: 1024px) {

    .dc-course-grid {
        gap: 22px;
    }

    .dc-card-b {
        padding-bottom: 140%;
    }

    .dc-title-a,
    .dc-title-b {
        font-size: 15px;
    }

    .dc-price-a,
    .dc-price-b {
        font-size: 16px;
    }

    .dc-meta-a,
    .dc-meta-b {
        gap: 8px;
    }

    .dc-footer-a,
    .dc-footer-b {
        gap: 10px;
    }

    .dc-btn-enrol-a,
    .dc-btn-enrol-b {
        padding: 8px 14px;
        font-size: 12px;
    }
}


/* ---------- Tablets ---------- */
@media (max-width: 768px) {

    .dc-course-grid {
        gap: 20px;
    }

    .dc-card-b {
        padding-bottom: 145%;
    }

    .dc-body {
        padding: 16px;
    }

    .dc-bottom {
        padding: 15px;
    }

    .dc-title-row {
        flex-direction: column;
        align-items: flex-start;
    }

    .dc-title-a,
    .dc-title-b {
        font-size: 15px;
        line-height: 1.4;
    }

    .dc-meta-a,
    .dc-meta-b {
        gap: 8px;
    }

    .dc-meta-item,
    .dc-mi {
        font-size: 11px;
    }

    .dc-footer-a,
    .dc-footer-b {
        flex-direction: column;
        align-items: stretch;
    }

    .dc-price-a,
    .dc-price-b {
        text-align: left;
    }

    .dc-cta-a {
        width: 100%;
    }

    .dc-btn-enrol-a,
    .dc-btn-demo-a,
    .dc-btn-enrol-b {
        width: 100%;
        justify-content: center;
    }

    .dc-btn-demo-b {
        text-align: center;
    }
}


/* ---------- Mobile ---------- */
@media (max-width: 576px) {

    .dc-course-grid {
        gap: 18px;
    }

    .dc-card-a {
        border-radius: 14px;
    }

    .dc-card-b {
        border-radius: 14px;
        padding-bottom: 150%;
    }

    .dc-thumb {
        height: 190px;
    }

    .dc-body,
    .dc-bottom {
        padding: 14px;
    }

    .dc-title-a,
    .dc-title-b {
        font-size: 14px;
    }

    .dc-outcome-a,
    .dc-outcome-b {
        font-size: 11px;
    }

    .dc-best-a,
    .dc-best-b {
        font-size: 11px;
    }

    .dc-price-a,
    .dc-price-b {
        font-size: 16px;
    }

    .dc-btn-enrol-a,
    .dc-btn-demo-a,
    .dc-btn-enrol-b {
        width: 100%;
        padding: 10px 14px;
        font-size: 13px;
    }

    .dc-btn-demo-b {
        margin-top: 10px;
    }

    .dc-top-bar {
        top: 10px;
        left: 10px;
        right: 10px;
    }

    .dc-top-rated-b {
        right: 10px;
    }

    .dc-badge {
        font-size: 10px;
        padding: 3px 8px;
    }
}


/* ---------- Small Phones ---------- */
@media (max-width: 400px) {

    .dc-card-b {
        padding-bottom: 160%;
    }

    .dc-thumb {
        height: 170px;
    }

    .dc-title-a,
    .dc-title-b {
        font-size: 13px;
    }

    .dc-price-a,
    .dc-price-b {
        font-size: 15px;
    }

    .dc-meta-item,
    .dc-mi {
        font-size: 10px;
    }

    .dc-outcome-a,
    .dc-outcome-b {
        padding: 7px 8px;
    }

    .dc-btn-enrol-a,
    .dc-btn-demo-a,
    .dc-btn-enrol-b {
        font-size: 12px;
        padding: 10px;
    }
}