/* =============================================
   Master Class Widget – Premium Card Styles v3
   ============================================= */

/* --- Inline SVG Icon Defaults --- */
.iforest-mc-svg-icon {
    display: inline-block;
    vertical-align: middle;
    flex-shrink: 0;
}

/* --- Card Shell --- */
.iforest-masterclass-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 0;
    margin: 28px 0;
    box-shadow:
        0 1px 3px rgba(0,0,0,0.06),
        0 6px 16px rgba(0,0,0,0.04);
    position: relative;
    overflow: hidden;
    transition: all 0.35s cubic-bezier(0.25, 0.8, 0.25, 1);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}
.iforest-masterclass-card:hover {
    box-shadow:
        0 4px 12px rgba(0,0,0,0.06),
        0 12px 32px rgba(0,0,0,0.08);
}

/* Top green accent bar */
.iforest-masterclass-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #6eaf20 0%, #8fcc3f 50%, #6eaf20 100%);
    z-index: 2;
}

/* --- Header Row --- */
.iforest-masterclass-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 28px 16px;
    position: relative;
    z-index: 1;
}

.iforest-masterclass-badge {
    display: inline-flex;
    align-items: center;
    background: #f0f7e6;
    color: #4d8a10;
    padding: 5px 14px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Pulse Dot */
.iforest-masterclass-pulse {
    width: 7px;
    height: 7px;
    background-color: #6eaf20;
    border-radius: 50%;
    margin-right: 7px;
    display: inline-block;
    box-shadow: 0 0 0 0 rgba(110, 175, 32, 0.7);
    animation: iforest-pulse-dot 1.8s infinite;
}
@keyframes iforest-pulse-dot {
    0%  { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(110,175,32,0.7); }
    70% { transform: scale(1);    box-shadow: 0 0 0 7px rgba(110,175,32,0); }
    100%{ transform: scale(0.95); box-shadow: 0 0 0 0 rgba(110,175,32,0); }
}

/* Speaker chip */
.iforest-masterclass-speaker-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #64748b;
    font-weight: 500;
}
.iforest-masterclass-speaker-badge strong {
    color: #1e293b;
    font-weight: 600;
}
.iforest-mc-speaker-icon {
    width: 16px;
    height: 16px;
    fill: #6eaf20;
}

/* --- Title & Description Section --- */
.iforest-masterclass-title {
    font-size: 20px;
    font-weight: 700;
    color: #0f172a;
    margin: 0;
    padding: 0 28px;
    line-height: 1.35;
    position: relative;
    z-index: 1;
}

.iforest-masterclass-body {
    padding: 12px 28px 0;
    position: relative;
    z-index: 1;
}
.iforest-masterclass-desc {
    font-size: 14px;
    line-height: 1.6;
    color: #475569;
    margin: 0 0 20px;
}

/* =============================================
   Meta Grid — 2×2 on desktop, stacked on mobile
   ============================================= */
.iforest-masterclass-meta-grid {
    grid-template-columns: 1fr 1fr !important;
    gap: 0 !important;
    border: 1px solid #e8ecf1;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 24px;
}

.iforest-masterclass-meta-item {
    display: flex !important;
    align-items: center;
    gap: 14px;
    padding: 16px 20px;
    background: #fafbfc;
    border-bottom: 1px solid #e8ecf1;
    transition: background 0.2s ease;
    min-width: 0;
}
.iforest-masterclass-meta-item:hover {
    background: #f4f7f0;
}

/* Right-column items get a left border */
.iforest-masterclass-meta-item:nth-child(2n) {
    border-left: 1px solid #e8ecf1;
}

/* Remove bottom border from last row */
.iforest-masterclass-meta-item:nth-last-child(1),
.iforest-masterclass-meta-item:nth-last-child(2) {
    border-bottom: none;
}


/* Icon wrappers */
.iforest-masterclass-meta-icon {
    width: 20px;
    height: 20px;
    fill: #6eaf20;
    flex-shrink: 0;
}

.iforest-mc-platform-icon-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: rgba(0,0,0,0.04);
    flex-shrink: 0;
}
.iforest-mc-platform-svg {
    width: 20px;
    height: 20px;
}

/* Meta text */
.iforest-masterclass-meta-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
}
.iforest-masterclass-meta-label {
    font-size: 10px;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    font-weight: 700;
    margin-bottom: 2px;
    line-height: 1;
}
.iforest-masterclass-meta-val {
    font-size: 13.5px;
    font-weight: 600;
    color: #1e293b;
    line-height: 1.35;
}

/* Time chip */
.iforest-mc-time-chip {
    display: inline-block;
    background: #ecfccb;
    color: #3f6212;
    padding: 2px 7px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 700;
    margin-left: 4px;
    vertical-align: middle;
    letter-spacing: 0.2px;
}

/* =============================================
   Actions Row
   ============================================= */
.iforest-masterclass-actions {
    padding: 0 28px 24px;
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    position: relative;
    z-index: 1;
}

/* Join Button */
.iforest-masterclass-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 24px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none !important;
    border: none;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    line-height: 1;
}
.iforest-masterclass-btn-join {
    color: #ffffff !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.12);
}
.iforest-masterclass-btn-join .iforest-mc-platform-svg {
    fill: #ffffff;
    width: 16px;
    height: 16px;
}
.iforest-masterclass-btn-join:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.18);
    filter: brightness(1.08);
}
.iforest-masterclass-btn-join:active {
    transform: translateY(0);
}
.iforest-mc-btn-arrow {
    width: 16px;
    height: 16px;
    fill: #ffffff;
    transition: transform 0.2s ease;
}
.iforest-masterclass-btn-join:hover .iforest-mc-btn-arrow {
    transform: translateX(3px);
}

/* Passcode chip */
.iforest-masterclass-passcode {
    font-size: 13px;
    color: #475569;
    background: #f1f5f9;
    padding: 8px 14px;
    border-radius: 8px;
    border: 1px dashed #cbd5e1;
    display: inline-flex;
    align-items: center;
}
.iforest-masterclass-passcode strong {
    color: #0f172a;
    font-family: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace;
    font-size: 14px;
    margin-left: 4px;
}

/* Empty / No-Link placeholder */
.iforest-masterclass-empty {
    text-align: center;
    padding: 18px 24px;
    border: 1px dashed #d1d5db;
    border-radius: 10px;
    color: #6b7280;
    font-size: 13px;
    width: 100%;
    background: #f9fafb;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

/* =============================================
   Add to Calendar Row
   ============================================= */
.iforest-masterclass-calendar-links {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    padding: 14px 28px 20px;
    border-top: 1px solid #f1f5f9;
    background: #fafbfc;
    position: relative;
    z-index: 1;
}
.iforest-mc-cal-label {
    font-size: 12px;
    color: #6b7280;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-right: 2px;
}
.iforest-mc-cal-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 14px;
    border-radius: 7px;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none !important;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}
.iforest-mc-cal-btn svg {
    flex-shrink: 0;
}

/* Google Calendar */
.iforest-mc-cal-google {
    background: #e8f5e9;
    color: #2e7d32 !important;
    border-color: #c8e6c9;
}
.iforest-mc-cal-google:hover {
    background: #c8e6c9;
    transform: translateY(-1px);
}

/* Outlook */
.iforest-mc-cal-outlook {
    background: #e3f2fd;
    color: #1565c0 !important;
    border-color: #bbdefb;
}
.iforest-mc-cal-outlook:hover {
    background: #bbdefb;
    transform: translateY(-1px);
}

/* iCal / ICS */
.iforest-mc-cal-ics {
    background: #f3e5f5;
    color: #7b1fa2 !important;
    border-color: #e1bee7;
}
.iforest-mc-cal-ics:hover {
    background: #e1bee7;
    transform: translateY(-1px);
}

/* =============================================
   Responsive
   ============================================= */
@media (max-width: 640px) {
    .iforest-masterclass-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
        padding: 18px 20px 14px;
    }
    .iforest-masterclass-title {
        padding: 0 20px;
        font-size: 18px;
    }
    .iforest-masterclass-body {
        padding: 10px 20px 0;
    }
    .iforest-masterclass-meta-grid {
        grid-template-columns: 1fr;
    }
    .iforest-masterclass-meta-item:nth-child(even) {
        border-left: none;
    }
    .iforest-masterclass-meta-item:nth-last-child(-n+2) {
        border-bottom: 1px solid #e8ecf1;
    }
    .iforest-masterclass-meta-item:last-child {
        border-bottom: none;
    }
    .iforest-masterclass-actions {
        padding: 0 20px 20px;
        flex-direction: column;
        align-items: stretch;
    }
    .iforest-masterclass-btn-join {
        justify-content: center;
    }
    .iforest-masterclass-calendar-links {
        padding: 14px 20px 18px;
        flex-direction: column;
        align-items: flex-start;
    }
}

/* =============================================
   Dark Mode
   ============================================= */
.dark-theme .iforest-masterclass-card,
.dark-mode .iforest-masterclass-card {
    background: #1a1f2e;
    border-color: #2d3548;
    box-shadow: 0 6px 20px rgba(0,0,0,0.3);
}
.dark-theme .iforest-masterclass-card::before,
.dark-mode .iforest-masterclass-card::before {
    background: linear-gradient(90deg, #5a9418 0%, #6eaf20 50%, #5a9418 100%);
}
.dark-theme .iforest-masterclass-header,
.dark-mode .iforest-masterclass-header {
    border-bottom-color: #2d3548;
}
.dark-theme .iforest-masterclass-badge,
.dark-mode .iforest-masterclass-badge {
    background: rgba(110,175,32,0.12);
    color: #8fcc3f;
}
.dark-theme .iforest-masterclass-speaker-badge,
.dark-mode .iforest-masterclass-speaker-badge {
    color: #8b9bae;
}
.dark-theme .iforest-masterclass-speaker-badge strong,
.dark-mode .iforest-masterclass-speaker-badge strong {
    color: #e2e8f0;
}
.dark-theme .iforest-masterclass-title,
.dark-mode .iforest-masterclass-title {
    color: #f1f5f9;
}
.dark-theme .iforest-masterclass-desc,
.dark-mode .iforest-masterclass-desc {
    color: #8b9bae;
}
.dark-theme .iforest-masterclass-meta-grid,
.dark-mode .iforest-masterclass-meta-grid {
    border-color: #2d3548;
}
.dark-theme .iforest-masterclass-meta-item,
.dark-mode .iforest-masterclass-meta-item {
    background: #151a28;
    border-bottom-color: #2d3548;
}
.dark-theme .iforest-masterclass-meta-item:nth-child(even),
.dark-mode .iforest-masterclass-meta-item:nth-child(even) {
    border-left-color: #2d3548;
}
.dark-theme .iforest-masterclass-meta-item:hover,
.dark-mode .iforest-masterclass-meta-item:hover {
    background: #1c2234;
}
.dark-theme .iforest-masterclass-meta-val,
.dark-mode .iforest-masterclass-meta-val {
    color: #e2e8f0;
}
.dark-theme .iforest-masterclass-meta-label,
.dark-mode .iforest-masterclass-meta-label {
    color: #64748b;
}
.dark-theme .iforest-mc-time-chip,
.dark-mode .iforest-mc-time-chip {
    background: rgba(110,175,32,0.15);
    color: #8fcc3f;
}
.dark-theme .iforest-masterclass-passcode,
.dark-mode .iforest-masterclass-passcode {
    background: #1e2538;
    border-color: #3b4560;
    color: #8b9bae;
}
.dark-theme .iforest-masterclass-passcode strong,
.dark-mode .iforest-masterclass-passcode strong {
    color: #e2e8f0;
}
.dark-theme .iforest-masterclass-empty,
.dark-mode .iforest-masterclass-empty {
    background: #151a28;
    border-color: #2d3548;
    color: #64748b;
}
.dark-theme .iforest-masterclass-calendar-links,
.dark-mode .iforest-masterclass-calendar-links {
    border-top-color: #2d3548;
    background: #151a28;
}
.dark-theme .iforest-mc-cal-label,
.dark-mode .iforest-mc-cal-label {
    color: #64748b;
}
.dark-theme .iforest-mc-cal-google,
.dark-mode .iforest-mc-cal-google {
    background: rgba(46,125,50,0.15);
    color: #81c784 !important;
    border-color: rgba(46,125,50,0.25);
}
.dark-theme .iforest-mc-cal-outlook,
.dark-mode .iforest-mc-cal-outlook {
    background: rgba(21,101,192,0.15);
    color: #64b5f6 !important;
    border-color: rgba(21,101,192,0.25);
}
.dark-theme .iforest-mc-cal-ics,
.dark-mode .iforest-mc-cal-ics {
    background: rgba(123,31,162,0.15);
    color: #ce93d8 !important;
    border-color: rgba(123,31,162,0.25);
}
.dark-theme .iforest-mc-platform-icon-wrap,
.dark-mode .iforest-mc-platform-icon-wrap {
    background: rgba(255,255,255,0.06);
}
