/* ── Course card (Elementor Loop Item #1801) ─────────────────────────────── */

.ldc-course-card {
    display: flex !important;
    flex-direction: column !important;
    text-decoration: none;
    background: #fff;
    border-radius: 15px !important;
    box-shadow: 0 4px 24px rgba(63, 58, 100, 0.18) !important;
    overflow: hidden !important;
    padding: 0 !important;
    height: 100%;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.ldc-course-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(63, 58, 100, 0.28) !important;
}

/* Strip the e-con-boxed default 10px side padding; fill full height */
.ldc-course-card > .e-con-inner {
    padding: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    flex: 1 !important;
    width: 100% !important;
}

/* Media wrapper — overflow: hidden clips the zoom animation */
.ldc-course-card__media {
    position: relative;
    overflow: hidden !important;
    padding: 0 !important;
    flex-shrink: 0;
}

/* Force .e-con-inner inside media to no padding and no stacking context */
.ldc-course-card__media > .e-con-inner {
    padding: 0 !important;
    position: static !important;
    overflow: visible !important;
}

/* Image: natural sizing — fills full card width, height follows image ratio */
.ldc-course-card__image img {
    width: 100% !important;
    height: auto !important;
    display: block !important;
    border-radius: 0 !important;
    transition: transform 0.35s ease;
}

.ldc-course-card:hover .ldc-course-card__image img {
    transform: scale(1.04);
}

/* Wishlist heart — top-right of image (RTL layout) */
.ldc-wishlist-btn {
    position: absolute !important;
    top: 12px;
    right: 12px;
    left: auto;
    z-index: 2;
    width: auto !important;
    height: auto !important;
}

.ldc-wishlist-btn:empty,
.ldc-wishlist-btn:has(> .elementor-widget-container:empty) {
    display: none;
}

.ldc-wishlist-btn .elementor-widget-container {
    line-height: 0;
}

.ldc-wishlist-btn .woosw-btn {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: 32px !important;
    height: 32px !important;
    border-radius: 50% !important;
    background: rgba(63, 58, 100, 0.5) !important;
    border: none !important;
    cursor: pointer;
    font-size: 0 !important;
    line-height: 0 !important;
    padding: 0 !important;
}

.ldc-wishlist-btn .woosw-btn::before {
    font-family: "Font Awesome 6 Pro", "Font Awesome 6 Free";
    font-weight: 400;
    content: "\f004";
    font-size: 15px !important;
    line-height: 1 !important;
    color: #fff;
}

.ldc-wishlist-btn .woosw-btn.woosw-added {
    background: #fff !important;
}

.ldc-wishlist-btn .woosw-btn.woosw-added::before {
    font-weight: 900;
    color: #1E869B;
}

/* Instructor avatar badge — inside image, bottom-right corner. */
.ldc-course-card__badge {
    position: absolute !important;
    bottom: 12px !important;
    right: 16px !important;
    left: auto !important;
    top: auto !important;
    display: flex !important;
    align-items: center !important;
    gap: 6px;
    width: auto !important;
    height: auto !important;
    z-index: 1;
}

.ldc-course-card__badge > .e-con-inner {
    padding: 0 !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 6px;
    width: auto !important;
}

.ldc-course-card__avatar img {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 2px solid #fff;
    object-fit: cover;
    display: block;
}

/* Instructor name: hidden per user request */
.ldc-course-card__instructor-name {
    display: none !important;
}

.ldc-course-card__avatar:empty,
.ldc-course-card__avatar:has(> .elementor-widget-container:empty) {
    display: none;
}

/* Content area — grows to fill remaining card height */
.ldc-course-card__title {
    margin-top: 12px;
    padding: 0 16px;
    color: #3F3A64;
    font-weight: 700;
    font-size: 15px;
}

.ldc-course-card__title .elementor-heading-title,
.ldc-course-card__title h1,
.ldc-course-card__title h2,
.ldc-course-card__title h3 {
    font-size: 15px !important;
    font-weight: 700 !important;
    color: #3F3A64 !important;
    line-height: 1.35 !important;
    margin: 0 !important;
}

.ldc-course-card__subtitle {
    color: #6B7280;
    font-size: 13px;
    margin-top: 6px;
    padding: 0 16px;
}

.ldc-course-card__subtitle .elementor-heading-title,
.ldc-course-card__subtitle h1,
.ldc-course-card__subtitle h2,
.ldc-course-card__subtitle h3 {
    font-size: 13px !important;
    font-weight: 400 !important;
    color: #6B7280 !important;
    line-height: 1.4 !important;
    margin: 0 !important;
}

/* Price row pinned to the bottom via margin-top: auto */
.ldc-course-card__price-row {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    margin-top: auto !important;
    padding: 12px 16px 16px !important;
    gap: 8px;
}

.ldc-course-card__price-row > .e-con-inner {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    width: 100% !important;
    gap: 8px;
}

.ldc-course-card__price p.price {
    display: inline !important;
    line-height: 1.4;
}

.ldc-course-card__price .woocommerce-Price-amount bdi {
    white-space: nowrap;
}

.ldc-course-card__price del {
    color: #6B7280;
    font-weight: 400;
    text-decoration: line-through;
    margin-right: 6px;
}

.ldc-course-card__price ins {
    color: #1E869B;
    font-weight: 700;
    text-decoration: none;
}

.ldc-cart-btn {
    flex-shrink: 0;
}

.ldc-cart-btn .elementor-widget-container {
    display: inline-flex !important;
    width: auto !important;
    line-height: 0;
}

.ldc-cart-btn .ldc-cart-link {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: auto !important;
    height: 40px !important;
    padding: 0 14px !important;
    border-radius: 10px !important;
    background: #1E869B !important;
    color: #fff !important;
    font-size: inherit !important;
    line-height: inherit !important;
    text-decoration: none !important;
    flex-shrink: 0;
    cursor: pointer;
    transition: background 0.2s ease;
}

.ldc-cart-btn .ldc-cart-link:hover {
    background: #1a768b !important;
}

.ldc-cart-btn .ldc-cart-link::before {
    font-family: "Font Awesome 6 Pro", "Font Awesome 6 Free";
    font-weight: 900;
    content: "\f07a";
    font-size: 15px;
    color: #fff;
    line-height: 1;
}

.ldc-cart-text {
    font-size: 13px;
    font-weight: 600;
    color: #fff;
    white-space: nowrap;
    line-height: 1;
}

/* ── Carousel: equal-height slides ───────────────────────────────────────── */

.elementor-widget-loop-carousel .swiper-wrapper {
    align-items: stretch !important;
}

.elementor-widget-loop-carousel .swiper-slide {
    height: auto !important;
}

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

@media (max-width: 480px) {
    .ldc-cart-text {
        display: none;
    }
    .ldc-cart-btn .ldc-cart-link {
        width: 40px !important;
        padding: 0 !important;
    }
}

/* ── /courses/ page — Tutor LMS native cards ─────────────────────────────── */

.tutor-card.tutor-course-card {
    border-radius: 15px !important;
    overflow: hidden !important;
    border: none !important;
    background: #fff !important;
    box-shadow: 0 4px 24px rgba(63, 58, 100, 0.18) !important;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    display: flex !important;
    flex-direction: column !important;
    height: 100%;
}

.tutor-card.tutor-course-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(63, 58, 100, 0.28) !important;
}

/* Card body grows to fill height — price row lands at bottom */
.tutor-course-card .tutor-card-body {
    flex: 1 !important;
    display: flex !important;
    flex-direction: column !important;
}

/* Push instructor/price row to bottom of body */
.tutor-course-card .tutor-card-body .tutor-meta.tutor-mt-auto {
    margin-top: auto !important;
}

/* Ratio container: remove forced 16:9 height so image sizes naturally */
.tutor-course-card .tutor-ratio.tutor-ratio-16x9 {
    overflow: hidden !important;
    height: auto !important;
}

.tutor-course-card .tutor-ratio.tutor-ratio-16x9::before {
    display: none !important;
}

/* Image: in-flow at natural size (override Tutor's position:absolute) */
.tutor-course-card .tutor-card-image-top {
    position: relative !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
    border-radius: 0 !important;
    transition: transform 0.35s ease !important;
}

.tutor-course-card:hover .tutor-card-image-top {
    transform: scale(1.04);
}

/* Card footer bottom corners — handled by card border-radius */
.tutor-course-card .tutor-card-footer {
    border-radius: 0 !important;
    border-top: 1px solid rgba(63, 58, 100, 0.08) !important;
}

/* ── Homepage carousel arrows ────────────────────────────────────────────── */

.elementor-widget-loop-carousel .elementor-swiper-button {
    background: #3F3A64;
    color: #fff;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.elementor-widget-loop-carousel .elementor-swiper-button:hover {
    background: #1E869B;
}

/* ── Archive cards: uniform image header (no blank band above the image) ─── */
.tutor-course-card .tutor-course-thumbnail { height: auto !important; padding: 0 !important; }
.tutor-course-card .tutor-course-thumbnail > a { display: block !important; height: auto !important; }
.tutor-course-card .tutor-ratio.tutor-ratio-16x9 { aspect-ratio: 3 / 2 !important; padding: 0 !important; height: auto !important; }
.tutor-course-card .tutor-ratio.tutor-ratio-16x9 .tutor-card-image-top { position: absolute !important; inset: 0 !important; width: 100% !important; height: 100% !important; object-fit: cover !important; }
.tutor-course-card .tutor-course-name a { text-decoration: none !important; color: var(--color-secondary, #3F3A64); }
.tutor-course-card .tutor-course-ratings { display: none; }
.tutor-course-card .tutor-card-body .tutor-meta.tutor-mt-auto > div:first-child { display: none; }
/* Byline: hide "by admin in" text, keep only the category link as a pill */
.tutor-course-card .tutor-card-body .tutor-meta.tutor-mt-auto > div:last-child { font-size: 0; }
.tutor-course-card .tutor-card-body .tutor-meta.tutor-mt-auto > div:last-child a[href*="profile"] { display: none; }
.tutor-course-card .tutor-card-body .tutor-meta.tutor-mt-auto > div:last-child a[href*="course-category"] { font-size: 13px; display: inline-block; padding: 3px 12px; border-radius: 999px; background: rgba(51,120,174,.1); color: var(--color-primary, #3378AE); font-weight: 700; text-decoration: none; }
