/* ═══════════════════════════════════════════════════════════════════════════
   🦸 Upcoming Event Hero — Hero-карточка ближайших событий
   [РЕАЛИЗОВАНО В: task-2026-06-29-004]

   Компонент: appFrontend/components/upcoming_event_hero.py
   Интеграция: community_landing.py → render_upcoming_event_hero()

   Структура:
     .ueh-card (ui.card wrapper)
       ├─ .ueh-overlay — дата/время поверх изображения (pointer-events: none)
       ├─ .ueh-urgent-badge — "🔥 Скоро!" для событий ≤7 дней
       ├─ .ueh-content — бейджи + заголовок + описание
       └─ .ueh-actions — кнопки действий
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Card (базовая) ───────────────────────────────────────────────── */
.ueh-card {
    position: relative;
    overflow: hidden;
    width: 100% !important;
    min-width: 0;
    min-height: 280px;
    border-radius: 16px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-color: #1a1a2e;
    transition: transform var(--transition-smooth, 0.25s ease),
                box-shadow var(--transition-smooth, 0.25s ease);
}
.ueh-card:hover {
    transform: var(--effect-hover-lift, translateY(-2px));
    box-shadow: var(--effect-glow-green, 0 4px 20px rgba(0, 137, 123, 0.15));
}

/* ── Fallback без cover_url ────────────────────────────────────────── */
.ueh-card--no-image {
    background: linear-gradient(135deg,
        var(--ueh-gradient-start, #2e7d32),
        var(--ueh-gradient-end, #1b5e20));
}

/* ── Gradient by category (CSS-переменные задаются в Python .style()) ── */
/* .ueh-card--no-image.ueh-card--cat-lab       → жёлтый */
/* .ueh-card--no-image.ueh-card--cat-workshop  → синий */
/* .ueh-card--no-image.ueh-card--cat-webinar   → оранжевый */

/* ── Overlay (дата/время) ──────────────────────────────────────────── */
.ueh-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 1.5rem;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.55) 0%, rgba(0, 0, 0, 0.15) 60%, transparent 100%);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    gap: 0.75rem;
    z-index: 1;
}
.ueh-overlay__row {
    display: flex;
    align-items: flex-end;
    gap: 1rem;
    pointer-events: none;
    margin-top: 1.5rem;
}
.ueh-overlay__date-block {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    line-height: 1;
    flex-shrink: 0;
}
.ueh-overlay__date {
    font-size: 2.5rem;
    font-weight: 800;
    color: #fff;
    line-height: 1;
    text-shadow: 0 0 6px rgba(0, 0, 0, 0.7), 0 1px 2px rgba(0, 0, 0, 0.9);
}
.ueh-overlay__dow {
    font-size: 0.85rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: 2px;
    text-shadow: 0 0 4px rgba(0, 0, 0, 0.7), 0 1px 2px rgba(0, 0, 0, 0.8);
}
.ueh-overlay__time {
    font-size: 0.75rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.8);
    margin-top: 1px;
    text-shadow: 0 0 4px rgba(0, 0, 0, 0.6);
}
.ueh-overlay__title {
    font-weight: 700;
    font-size: 1.1rem;
    line-height: 1.3;
    color: #fff;
    pointer-events: auto;
    text-shadow: 0 0 6px rgba(0, 0, 0, 0.7), 0 1px 3px rgba(0, 0, 0, 0.8);
}
.ueh-overlay__badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    pointer-events: auto;
}
/* Бейджи в оверлее — усиленный фон для читаемости */
.ueh-overlay__badges .cal-badge {
    background: rgba(0, 0, 0, 0.5);
    color: #fff;
    font-weight: 600;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.2);
}
.ueh-overlay__actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    align-items: center;
    pointer-events: auto;
}
/* Кнопки в оверлее — компактнее */
.ueh-overlay__actions .cal-link,
.ueh-overlay__actions .cal-link--boosty,
.ueh-overlay__actions .cal-link--ghost {
    font-size: 0.72rem;
    padding: 4px 10px;
}

/* ── Urgency badge ─────────────────────────────────────────────────── */
.ueh-urgent-badge {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.3rem 0.75rem;
    background: linear-gradient(135deg, #ff6f00, #e65100);
    color: #fff;
    border-radius: 1rem;
    font-size: 0.75rem;
    font-weight: 700;
    animation: pulse-urgent 2s ease-in-out infinite;
    box-shadow: 0 2px 8px rgba(230, 81, 0, 0.35);
}
@media (prefers-reduced-motion: reduce) {
    .ueh-urgent-badge {
        animation: none;
    }
}

/* ── Content section (устарело — перенесено в оверлей) ──────────────── */
/* [УДАЛЕНО В: task-2026-06-29-004] .ueh-content, .ueh-content__meta,
   .ueh-content__title, .ueh-content__desc, .ueh-actions — заменены на
   .ueh-overlay__title, .ueh-overlay__badges, .ueh-overlay__actions */


/* ── Social proof (в оверлее) ──────────────────────────────────────── */
.ueh-social-proof {
    font-size: 0.7rem;
    opacity: 0.65;
    color: rgba(255, 255, 255, 0.7);
    pointer-events: auto;
}

/* ═══════════════════════════════════════════════════════════════════════════
   Upcoming Events Grid — override community-cards.css for hero layout
   ═══════════════════════════════════════════════════════════════════════════ */

/* Desktop: 2 карточки в строку */
@media (min-width: 769px) {
    .upcoming-events-grid {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
}

/* ═══════════════════════════════════════════════════════════════════════════
   Responsive
   ═══════════════════════════════════════════════════════════════════════════ */

@media (max-width: 768px) {
    .ueh-card {
        min-height: 280px;
    }
    .ueh-overlay__date {
        font-size: 2rem;
    }
    .ueh-overlay {
        padding: 1rem 0.75rem 0.75rem;
    }
    .ueh-overlay__title {
        font-size: 1rem;
    }
    .ueh-overlay__actions {
        flex-direction: column;
        align-items: stretch;
    }
    .ueh-overlay__actions .cal-link,
    .ueh-overlay__actions .cal-link--boosty,
    .ueh-overlay__actions .cal-link--ghost {
        text-align: center;
    }
}

/* ═══════════════════════════════════════════════════════════════════════════
   Dark mode
   ═══════════════════════════════════════════════════════════════════════════ */

body.body--dark .ueh-card {
    background-color: rgba(30, 30, 30, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.08);
}
body.body--dark .ueh-card--no-image {
    background: linear-gradient(135deg,
        color-mix(in srgb, var(--ueh-gradient-start, #2e7d32) 70%, #000),
        color-mix(in srgb, var(--ueh-gradient-end, #1b5e20) 70%, #000));
}
