/*
 * Modern course/path/program card design.
 *
 * Extracted from the home page card (public/assets/home-v2/css/home.css,
 * ".event-card-modern" block) so the same design can be reused across the whole
 * platform (catalog, similar courses, instructor pages, favorites, ...) without
 * pulling in home.css, which contains global element selectors (*, body, a,
 * .container) that would alter every page.
 *
 * Depends on the brand CSS variables (--brand-navy, --brand-purple) defined
 * globally in public/css/academy32.css.
 */

/* --- Card shell --- */
.event-card-modern {
    position: relative;
    background: #ffffff;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    display: flex;
    flex-direction: column;
    /* The client mockup has no border — only the soft shadow separates the card.
       This also overrides the faint border defined in academy32.css/home.css. */
    border: none;
    width: 100%;
    height: 100%;
}

.event-card-modern:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 31, 85, 0.12);
}

/* Image Wrapper */
.event-thumb-wrapper {
    position: relative;
    width: 100%;
    height: 220px;
    overflow: hidden;
    border-radius: 20px 20px 0 0;
    flex-shrink: 0;
}

.event-thumb-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.event-card-modern:hover .event-thumb-wrapper img {
    transform: scale(1.1);
}

/* Overlay Gradient on Image */
.event-thumb-wrapper::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, rgba(0, 31, 85, 0.6), transparent 60%);
    opacity: 0.6;
    transition: opacity 0.3s;
    pointer-events: none;
}

.event-card-modern:hover .event-thumb-wrapper::after {
    opacity: 0.4;
}

/* Category Badge */
.event-cat-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(255, 255, 255, 0.95);
    color: var(--brand-navy);
    padding: 6px 14px;
    border-radius: 30px;
    font-size: 11px;
    font-weight: 700;
    z-index: 5;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    transition: 0.3s;
}

.event-card-modern:hover .event-cat-badge {
    background: var(--brand-purple);
    color: #fff;
}

/* Favorite button floating on the thumbnail (top-left) */
.event-fav-floating {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 6;
}

/* Floating Date */
.event-date-floating {
    position: absolute;
    top: 190px;
    left: 20px;
    background: #fff;
    width: 60px;
    height: 60px;
    border-radius: 15px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 10;
    line-height: 1;
    transition: 0.3s;
    border-top: 3px solid var(--brand-purple);
}

.event-card-modern:hover .event-date-floating {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(73, 4, 220, 0.25);
}

.event-date-floating .day {
    font-size: 20px;
    font-weight: 800;
    color: var(--brand-navy);
}

.event-date-floating .month {
    font-size: 11px;
    font-weight: 700;
    color: #888;
    text-transform: uppercase;
    margin-top: 3px;
}

/* Card Content */
.event-content-body {
    padding: 20px;
    background: #fff;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    position: relative;
}

.event-meta {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    font-size: 13px;
    color: #777;
    margin-bottom: 12px;
    margin-left: 5px;
}

/* Price in Content */
.event-price-inline {
    font-weight: 800;
    color: var(--brand-purple);
    font-size: 14px;
    background: rgba(73, 4, 220, 0.08);
    padding: 4px 10px;
    border-radius: 20px;
}

.event-price-inline.free {
    color: #27ae60;
    background: rgba(39, 174, 96, 0.1);
}

.event-title {
    font-size: 18px;
    font-weight: 800;
    color: var(--brand-navy);
    margin-bottom: 15px;
    line-height: 1.5;
    transition: 0.3s;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.event-title a {
    color: inherit;
    text-decoration: none;
}

.event-card-modern:hover .event-title {
    color: var(--brand-purple);
}

/* Footer / Button Area */
.event-footer {
    margin-top: auto;
    border-top: 1px solid #f0f0f0;
    padding-top: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.event-footer-details {
    display: flex;
    flex-direction: row;
    gap: 6px;
    flex-wrap: nowrap;
    align-items: center;
    width: 100%;
    justify-content: space-between;
}

.event-info-item {
    font-size: 11px;
    font-weight: 700;
    color: #555;
    display: flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
}

.event-info-item i {
    color: var(--brand-purple);
    width: 14px;
    text-align: center;
}

/* CTA row: main action grows, favorite/secondary stays compact */
.event-cta-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.event-cta-row > .btn-arrow-link,
.event-cta-row > .btn,
.event-cta-row > a:not(.btn-circle) {
    flex: 1 1 auto;
}

/* Updated Button Arrow Link with Text and Animation */
.btn-arrow-link {
    width: 100%;
    height: 40px;
    padding: 0 12px;
    border-radius: 12px;
    background: #f4f7fa;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--brand-navy);
    font-size: 13px;
    font-weight: 700;
    transition: all 0.3s ease;
    flex-shrink: 0;
    gap: 8px;
    text-decoration: none;
}

.btn-arrow-link:hover {
    background: var(--brand-navy);
    color: #fff;
}

.btn-arrow-link i {
    transition: transform 0.3s ease;
}

.btn-arrow-link:hover i {
    transform: rotate(45deg);
}

/* Course type + duration row (below title) */
.event-type-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
    flex-wrap: wrap;
}

.event-type-badge {
    font-size: 11px;
    font-weight: 700;
    color: var(--brand-purple);
    background: rgba(73, 4, 220, 0.08);
    padding: 3px 10px;
    border-radius: 20px;
}

.event-duration-inline {
    font-size: 12px;
    font-weight: 600;
    color: #777;
    display: flex;
    align-items: center;
    gap: 4px;
}

.event-duration-inline i {
    color: var(--brand-purple);
}
