/**
 * CIPT & AHS — Events Archive Styles
 *
 * Custom styles for the /events archive page.
 *
 * @package CIPT
 */

/* ─── GLOBAL RESETS (shared) ─────────────────── */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    overflow-x: hidden;
}

html {
    scroll-behavior: smooth;
}

/* ─── CUSTOM SCROLLBAR ───────────────────────── */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #eef2f7;
}

::-webkit-scrollbar-thumb {
    background: #0a1f3f;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #166534;
}

/* ─── LINE CLAMP UTILITIES ───────────────────── */
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ─── EVENTS HERO ────────────────────────────── */
.events-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    pointer-events: none;
}

/* ─── EVENT CARDS ────────────────────────────── */
.event-card {
    will-change: transform, box-shadow;
}

.event-card:hover {
    transform: translateY(-4px);
}

/* ─── DROPDOWN MENUS ─────────────────────────── */
nav .group:hover>ul {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

nav .group>ul {
    transform: translateY(8px);
    transition: all 0.2s ease;
}

/* ─── PAGINATION STYLES ──────────────────────── */
.events-pagination .page-numbers {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 0;
    margin: 0;
    flex-wrap: wrap;
    justify-content: center;
}

.events-pagination .page-numbers li {
    list-style: none;
}

.events-pagination .page-numbers li a,
.events-pagination .page-numbers li span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
    border: 1px solid #e5e7eb;
    background: #fff;
    color: #0a1f3f;
}

.events-pagination .page-numbers li a:hover {
    background: #0a1f3f;
    color: #fff;
    border-color: #0a1f3f;
    box-shadow: 0 4px 12px rgba(10, 31, 63, 0.2);
}

.events-pagination .page-numbers li span.current {
    background: #166534;
    color: #fff;
    border-color: #166534;
    box-shadow: 0 4px 12px rgba(22, 101, 52, 0.3);
}

.events-pagination .page-numbers li span.dots {
    border: none;
    background: none;
    color: #9ca3af;
    min-width: auto;
    padding: 0 4px;
}

.events-pagination .page-numbers li a.prev,
.events-pagination .page-numbers li a.next {
    gap: 4px;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: 0.05em;
    padding: 0 16px;
}

/* ─── FADE-IN ANIMATION ──────────────────────── */
@keyframes eventCardFadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.event-card {
    animation: eventCardFadeIn 0.5s ease-out both;
}

.event-card:nth-child(1) { animation-delay: 0.05s; }
.event-card:nth-child(2) { animation-delay: 0.1s; }
.event-card:nth-child(3) { animation-delay: 0.15s; }
.event-card:nth-child(4) { animation-delay: 0.2s; }
.event-card:nth-child(5) { animation-delay: 0.25s; }
.event-card:nth-child(6) { animation-delay: 0.3s; }
.event-card:nth-child(7) { animation-delay: 0.35s; }
.event-card:nth-child(8) { animation-delay: 0.4s; }
.event-card:nth-child(9) { animation-delay: 0.45s; }
.event-card:nth-child(10) { animation-delay: 0.5s; }

/* ─── FOCUS STYLES FOR ACCESSIBILITY ─────────── */
a:focus-visible,
button:focus-visible {
    outline: 2px solid #d4a017;
    outline-offset: 2px;
    border-radius: 2px;
}

/* ─── RESPONSIVE ─────────────────────────────── */
@media (max-width: 768px) {
    .events-hero {
        padding-top: 3rem;
        padding-bottom: 3rem;
    }

    .events-hero h1 {
        font-size: 1.75rem;
    }

    .events-pagination .page-numbers li a.prev span,
    .events-pagination .page-numbers li a.next span {
        display: none;
    }

    .events-pagination .page-numbers li a.prev,
    .events-pagination .page-numbers li a.next {
        padding: 0 12px;
        min-width: 40px;
    }
}
