/* ═══════════════════════════════════════════════════════════════════════════
   CyberKavach - Premium Past Events Section
   Stacked offset card design with color-coded backing layers
   ══════════════════════════════════════════════════════════════════════════ */

/* ── Section Container ─────────────────────────────────────────────────── */
.ck-past-events {
    position: relative;
    z-index: 1;
    width: min(1300px, calc(100% - 48px));
    margin: 0 auto;
    padding: 100px 0 80px;
}

/* ── Section Header ────────────────────────────────────────────────────── */
.ck-past-events__header {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-bottom: 60px;
}

/* Section Label */
.ck-past-events__label {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: #E53935;
}

.ck-past-events__label::before {
    content: '';
    width: 8px;
    height: 8px;
    background: #E53935;
    border-radius: 50%;
    display: inline-block;
}

/* Section Heading */
.ck-past-events__heading {
    display: flex;
    align-items: baseline;
    gap: 1.5rem;
}

.ck-past-events__title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 800;
    color: #ffffff;
    line-height: 1.1;
    letter-spacing: -0.02em;
    margin: 0;
}

/* Optional accent line after title */
.ck-past-events__accent {
    width: 4px;
    height: clamp(2rem, 8vh, 4rem);
    background: #E53935;
    border-radius: 2px;
}

/* ── Grid Layout ───────────────────────────────────────────────────────── */
.ck-past-events__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
}

/* ── Premium Event Card ────────────────────────────────────────────────── */
.ck-past-card {
    position: relative;
    display: flex;
    flex-direction: column;
    background: #141414;
    border: 1.5px solid rgba(255, 255, 255, 0.78);
    border-radius: 8px;
    text-decoration: none;
    transform: translate(0, 0);
    transition: transform 0.15s ease, border-color 0.15s ease;
}

/* Event Type Backing Layers */
.ck-past-card::before {
    content: '';
    position: absolute;
    top: 5px;
    left: 5px;
    right: -5px;
    bottom: -5px;
    border-radius: 8px;
    z-index: -1;
    transition: all 0.15s ease;
}

/* ── CyberKavach Event Color System ──────────────────────────────────────── */

/* CTF - CyberKavach Red */
.ck-past-card[data-event-type="ctf"]::before {
    background: #DC2626;
}

/* Workshop - Orange */
.ck-past-card[data-event-type="workshop"]::before {
    background: #EA580C;
}

/* Seminar - Indigo/Blue */
.ck-past-card[data-event-type="seminar"]::before {
    background: #2563EB;
}

/* Industry Talk - Teal/Cyan */
.ck-past-card[data-event-type="industry-talk"]::before,
.ck-past-card[data-event-type="industry talk"]::before {
    background: #0891B2;
}

/* Competition - Amber/Gold */
.ck-past-card[data-event-type="competition"]::before {
    background: #D97706;
}

/* Hackathon - Purple */
.ck-past-card[data-event-type="hackathon"]::before {
    background: #9333EA;
}

/* Training - Green (legacy support) */
.ck-past-card[data-event-type="training"]::before {
    background: #16A34A;
}

/* Awareness - Teal (legacy support) */
.ck-past-card[data-event-type="awareness"]::before {
    background: #0D9488;
}

/* Default/Other - Gray */
.ck-past-card[data-event-type="other"]::before,
.ck-past-card:not([data-event-type])::before {
    background: #6B7280;
}

/* Hover State */
.ck-past-card:hover {
    transform: translate(2px, 2px);
    border-color: #333333;
}

.ck-past-card:hover::before {
    top: 3px;
    left: 3px;
    right: -3px;
    bottom: -3px;
}

/* ── Event Poster ──────────────────────────────────────────────────────── */
.ck-past-card__poster {
    position: relative;
    width: 100%;
    aspect-ratio: 3 / 2;
    overflow: hidden;
    background: #000;
    border-radius: 6px 6px 0 0;
}

.ck-past-card__poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 6px 6px 0 0;
}

/* Event Type Badge - Tactile Elevated Style */
.ck-past-card__badge {
    position: absolute;
    top: 14px;
    left: 14px;
    padding: 7px 14px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #ffffff;
    border: 1.5px solid rgba(255, 255, 255, 0.15);
    box-shadow: 1.5px 1.5px 0 rgba(255, 255, 255, 0.9),
    0 0 0 1px rgba(255,255,255,0.08);
    transform: translate(0, 0);
    z-index: 2;
}

/* ── Badge Colors by Event Type ────────────────────────────────────────── */

/* CTF - CyberKavach Red */
.ck-past-card[data-event-type="ctf"] .ck-past-card__badge {
    background: #DC2626;
}

/* Workshop - Orange */
.ck-past-card[data-event-type="workshop"] .ck-past-card__badge {
    background: #EA580C;
}

/* Seminar - Indigo/Blue */
.ck-past-card[data-event-type="seminar"] .ck-past-card__badge {
    background: #2563EB;
}

/* Industry Talk - Teal/Cyan */
.ck-past-card[data-event-type="industry-talk"] .ck-past-card__badge,
.ck-past-card[data-event-type="industry talk"] .ck-past-card__badge {
    background: #0891B2;
}

/* Competition - Amber/Gold */
.ck-past-card[data-event-type="competition"] .ck-past-card__badge {
    background: #D97706;
}

/* Hackathon - Purple */
.ck-past-card[data-event-type="hackathon"] .ck-past-card__badge {
    background: #9333EA;
}

/* Training - Green (legacy support) */
.ck-past-card[data-event-type="training"] .ck-past-card__badge {
    background: #16A34A;
}

/* Awareness - Teal (legacy support) */
.ck-past-card[data-event-type="awareness"] .ck-past-card__badge {
    background: #0D9488;
}

/* Default/Other - Gray */
.ck-past-card[data-event-type="other"] .ck-past-card__badge,
.ck-past-card:not([data-event-type]) .ck-past-card__badge {
    background: #6B7280;
}

/* ── Card Body ─────────────────────────────────────────────────────────── */
.ck-past-card__body {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    flex: 1;
    background: #141414;
    border-top: 1px solid rgba(255, 255, 255, 0.68);
}

/* Event Title - Large & Bold - Pure White */
.ck-past-card__title {
    font-size: 1.55rem;
    font-weight: 800;
    color: #FFFFFF;
    line-height: 1.25;
    letter-spacing: -0.02em;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Event Description - Bright White (90%) */
.ck-past-card__desc {
    font-size: 0.925rem;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ── Meta Information ──────────────────────────────────────────────────── */
.ck-past-card__meta {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    color: #DC2626;
}

.ck-past-card__meta-row {
    display: flex;
    align-items: center;
    gap: 0.65rem;
}

.ck-past-card__meta-icon {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.ck-past-card__meta-icon i,
.ck-past-card__meta-icon svg {
    width: 18px;
    height: 18px;
    color: rgba(255, 0, 0, 0.95)
}

.ck-past-card__meta-text {
    font-size: 0.875rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.95);
    letter-spacing: -0.005em;
}

/* ── View Details Button ───────────────────────────────────────────────── */
.ck-past-card__cta {
    margin-top: auto;
}

.ck-past-card__link {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;

    padding: 0.65rem 1.35rem;

    font-size: 0.8rem;
    font-weight: 800;
    letter-spacing: 0.03em;

    text-decoration: none;
    text-transform: uppercase;

    border: 2px solid #ffffff;
    border-radius: 6px;

    background: #ffffff;
    color: #111111;

    box-shadow: 4px 4px 0 rgba(99, 99, 99, 0.9);

    transition: all 0.12s ease;
}

.ck-past-card__link i,
.ck-past-card__link svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}

.ck-past-card:hover .ck-past-card__link {
    box-shadow: 1px 1px 0px 0px rgba(0, 0, 0, 0.4);
    transform: translate(2px, 2px);
}

.ck-past-card:active .ck-past-card__link {
    box-shadow: 0px 0px 0px 0px rgba(0, 0, 0, 0.4);
    transform: translate(3px, 3px);
}

/* ── CTA Button Accent Colors (Subtle hover accent) ────────────────────── */

/* CTF - Red accent */
.ck-past-card[data-event-type="ctf"]:hover .ck-past-card__link {
    border-color: #DC2626;
    box-shadow: 2px 2px 0 #DC2626;
}

/* Workshop - Orange accent */
.ck-past-card[data-event-type="workshop"]:hover .ck-past-card__link {
    border-color: #EA580C;
    box-shadow: 2px 2px 0 #EA580C;
}

/* Seminar - Blue accent */
.ck-past-card[data-event-type="seminar"]:hover .ck-past-card__link {
    border-color: #2563EB;
    box-shadow: 2px 2px 0 #2563EB;
}

/* Industry Talk - Teal accent */
.ck-past-card[data-event-type="industry-talk"]:hover .ck-past-card__link,
.ck-past-card[data-event-type="industry talk"]:hover .ck-past-card__link {
    border-color: #0891B2;
    box-shadow: 2px 2px 0 #0891B2;
}

/* Competition - Amber accent */
.ck-past-card[data-event-type="competition"]:hover .ck-past-card__link {
    border-color: #D97706;
    box-shadow: 2px 2px 0 #D97706;
}

/* Hackathon - Purple accent */
.ck-past-card[data-event-type="hackathon"]:hover .ck-past-card__link {
    border-color: #9333EA;
    box-shadow: 2px 2px 0 #9333EA;
}

/* ── Section CTA ───────────────────────────────────────────────────────── */
.ck-past-events__cta {
    text-align: center;
    margin-top: 48px;
}

/* ── Empty State ───────────────────────────────────────────────────────── */
.ck-empty {
    text-align: center;
    padding: 60px 20px;
}

.ck-empty i {
    width: 48px;
    height: 48px;
    color: rgba(255, 255, 255, 0.3);
    margin-bottom: 16px;
}

.ck-empty p {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.5);
    font-weight: 500;
}

/* ── Responsive Design ─────────────────────────────────────────────────── */
@media (max-width: 1024px) {
    .ck-past-events {
        padding: 80px 0 60px;
    }

    .ck-past-events__header {
        margin-bottom: 50px;
    }

    .ck-past-events__title {
        font-size: clamp(2rem, 4vw, 3.5rem);
    }

    .ck-past-events__accent {
        height: clamp(1.5rem, 6vh, 3.5rem);
    }

    .ck-past-events__grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 28px;
    }

    .ck-past-card::before {
        top: 4px;
        left: 4px;
        right: -4px;
        bottom: -4px;
    }

    .ck-past-card:hover::before {
        top: 3px;
        left: 3px;
        right: -3px;
        bottom: -3px;
    }

    .ck-past-card__body {
        padding: 1.3rem;
        gap: 0.9rem;
    }

    .ck-past-card__title {
        font-size: 1.25rem;
    }

    .ck-past-card__desc {
        font-size: 0.9rem;
    }

    .ck-past-card__meta-text {
        font-size: 0.85rem;
    }
}

@media (max-width: 640px) {
    .ck-past-events {
        padding: 60px 0 40px;
    }

    .ck-past-events__header {
        margin-bottom: 40px;
        gap: 1.2rem;
    }

    .ck-past-events__label {
        font-size: 0.75rem;
    }

    .ck-past-events__heading {
        gap: 1rem;
    }

    .ck-past-events__title {
        font-size: clamp(1.8rem, 8vw, 2.5rem);
    }

    .ck-past-events__accent {
        height: clamp(1.2rem, 4vh, 2.5rem);
    }

    .ck-past-events__grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .ck-past-card::before {
        top: 4px;
        left: 4px;
        right: -4px;
        bottom: -4px;
    }

    .ck-past-card__badge {
        top: 12px;
        left: 12px;
        padding: 6px 12px;
        font-size: 0.7rem;
        box-shadow: 3px 3px 0px 0px rgba(0, 0, 0, 0.6);
    }

    .ck-past-card__body {
        padding: 1.2rem;
        gap: 0.85rem;
    }

    .ck-past-card__title {
        font-size: 1.2rem;
    }

    .ck-past-card__desc {
        font-size: 0.9rem;
    }

    .ck-past-card__meta-text {
        font-size: 0.85rem;
    }

    .ck-past-card__link {
        font-size: 0.75rem;
        padding: 0.45rem 0.9rem;
    }
}

/* ── Reduced Motion Support ────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
    .ck-past-card {
        transition: none;
    }

    .ck-past-card:hover {
        transform: none;
    }

    .ck-past-card::before {
        transition: none;
    }

    .ck-past-card::before,
    .ck-past-card:hover::before {
        top: 5px;
        left: 5px;
        right: -5px;
        bottom: -5px;
    }

    .ck-past-card__link {
        transition: none;
    }

    .ck-past-card:hover .ck-past-card__link,
    .ck-past-card:active .ck-past-card__link {
        transform: none;
        box-shadow: 3px 3px 0px 0px #0a0a0a;
    }
}
