/* ============================================================
   Archived Events – Public CSS
   ============================================================ */

/* ---- Base ---- */
.ae-archive-wrap {
    max-width: 1200px;
    margin: 0 auto;
    padding: 24px 16px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: #1a1a2e;
}

/* ---- Filters ---- */
.ae-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 36px;
    padding: 16px 20px;
    background: #f8f9fc;
    border: 1px solid #e2e6ea;
    border-radius: 10px;
}

.ae-filter-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.ae-filter-group label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: #6c757d;
}

.ae-filter-select {
    min-width: 200px;
    padding: 9px 14px;
    border: 1px solid #ced4da;
    border-radius: 8px;
    font-size: 14px;
    background: #fff;
    cursor: pointer;
    color: #1a1a2e;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 20 20'%3E%3Cpath fill='%236c757d' d='M5 7l5 5 5-5H5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    padding-right: 32px;
}

.ae-filter-select:focus {
    outline: none;
    border-color: #003d7a;
    box-shadow: 0 0 0 3px rgba(0, 61, 122, 0.12);
}

/* ---- Events Grid ---- */
.ae-events-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 28px;
    margin-bottom: 40px;
}

/* ---- Event Card ---- */
.ae-event-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    display: flex;
    flex-direction: column;
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.ae-event-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.14);
}

/* Cover image — matches screenshot proportions */
.ae-card-cover {
    position: relative;
    height: 210px;
    overflow: hidden;
    background: #003d7a;
}

.ae-card-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    display: block;
    transition: transform 0.3s ease;
}

.ae-event-card:hover .ae-card-cover img {
    transform: scale(1.04);
}

/* Category badge – top-left, dark blue pill */
.ae-card-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: #003d7a;
    color: #fff;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 1px;
    text-transform: uppercase;
    padding: 4px 12px;
    border-radius: 20px;
    line-height: 1.4;
    z-index: 2;
}

/* Card Body */
.ae-card-body {
    padding: 20px 20px 16px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.ae-card-title {
    font-size: 17px;
    font-weight: 700;
    color: #1a1a2e;
    margin: 0;
    line-height: 1.35;
}

/* Date row */
.ae-card-date {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 13px;
    color: #495057;
    margin: 0;
}

.ae-icon-cal {
    width: 15px;
    height: 15px;
    flex-shrink: 0;
    color: #6c757d;
}

/* Description */
.ae-card-desc {
    font-size: 13.5px;
    color: #555;
    line-height: 1.6;
    margin: 0;
    flex: 1;
}

/* Action Buttons */
.ae-card-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 10px;
    padding-top: 12px;
    border-top: 1px solid #f0f0f0;
}

.ae-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: background 0.15s ease, transform 0.1s ease;
    line-height: 1;
}

.ae-btn svg {
    width: 15px;
    height: 15px;
    flex-shrink: 0;
}

.ae-btn:hover { transform: translateY(-1px); }

/* Photos button – matches screenshot dark blue */
.ae-btn-photos {
    background: #003d7a;
    color: #fff;
}
.ae-btn-photos:hover { background: #002d5e; color: #fff; }

/* PDF button */
.ae-btn-pdf {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffc107;
}
.ae-btn-pdf:hover { background: #ffe69c; color: #856404; }

/* Details button */
.ae-btn-details {
    background: #f0f4fa;
    color: #003d7a;
    border: 1px solid #c5d8f8;
}
.ae-btn-details:hover { background: #d8e8fb; color: #003d7a; }

/* ---- Load More / Pagination ---- */
.ae-pagination {
    text-align: center;
    margin: 10px 0 24px;
}

.ae-load-more {
    padding: 11px 36px;
    font-size: 14px;
    font-weight: 600;
    background: #003d7a;
    color: #fff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.15s ease;
}

.ae-load-more:hover { background: #002d5e; color: #fff; }

/* ---- Spinner ---- */
.ae-spinner { text-align: center; padding: 20px; color: #888; font-size: 14px; }

/* ---- No Events ---- */
.ae-no-events {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    color: #888;
    font-size: 15px;
}

/* ============================================================
   Detail Modal
   ============================================================ */

.ae-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    backdrop-filter: blur(3px);
    animation: ae-fade-in 0.2s ease;
}

@keyframes ae-fade-in {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.ae-modal {
    background: #fff;
    border-radius: 14px;
    width: 100%;
    max-width: 720px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.3);
    animation: ae-slide-up 0.25s ease;
    scrollbar-width: thin;
}

@keyframes ae-slide-up {
    from { transform: translateY(30px); opacity: 0; }
    to   { transform: translateY(0);    opacity: 1; }
}

.ae-modal-close {
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 10;
    background: rgba(0,0,0,0.45);
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.15s ease;
}

.ae-modal-close:hover { background: rgba(0,0,0,0.7); }

.ae-modal-close svg {
    width: 18px;
    height: 18px;
    stroke: #fff;
}

/* Loading spinner inside modal */
.ae-modal-loading {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 260px;
}

.ae-spinner-ring {
    width: 40px;
    height: 40px;
    border: 3px solid #e0e0e0;
    border-top-color: #003d7a;
    border-radius: 50%;
    animation: ae-spin 0.7s linear infinite;
}

@keyframes ae-spin {
    to { transform: rotate(360deg); }
}

/* ---- Detail Content ---- */
.ae-detail-hero {
    height: 280px;
    background-size: cover;
    background-position: center top;
    position: relative;
    border-radius: 14px 14px 0 0;
    overflow: hidden;
}

.ae-detail-hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.72) 0%, rgba(0,0,0,0.1) 60%, transparent 100%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 24px 28px;
    gap: 8px;
}

.ae-detail-badge {
    display: inline-block;
    background: #003d7a;
    color: #fff;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 1px;
    text-transform: uppercase;
    padding: 4px 12px;
    border-radius: 20px;
    align-self: flex-start;
}

.ae-detail-title {
    font-size: 24px;
    font-weight: 800;
    color: #fff;
    margin: 0;
    line-height: 1.3;
    text-shadow: 0 2px 6px rgba(0,0,0,0.4);
}

.ae-detail-hero-date {
    display: flex;
    align-items: center;
    gap: 7px;
    color: rgba(255,255,255,0.88);
    font-size: 14px;
    margin: 0;
}

.ae-detail-hero-date svg {
    width: 15px;
    height: 15px;
    flex-shrink: 0;
    stroke: rgba(255,255,255,0.8);
}

/* Meta Strip */
.ae-detail-meta-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 0;
    border-bottom: 1px solid #eee;
    background: #f8f9fc;
}

.ae-meta-item {
    flex: 1;
    min-width: 100px;
    padding: 14px 20px;
    border-right: 1px solid #eee;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.ae-meta-item:last-child { border-right: none; }

.ae-meta-label {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.7px;
    color: #6c757d;
}

.ae-meta-value {
    font-size: 14px;
    font-weight: 600;
    color: #1a1a2e;
}

/* Detail Sections */
.ae-detail-section {
    padding: 22px 28px;
    border-bottom: 1px solid #f0f0f0;
}

.ae-detail-section:last-child { border-bottom: none; }

.ae-detail-section-heading {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: #003d7a;
    margin: 0 0 14px;
}

.ae-detail-section-heading svg {
    width: 16px;
    height: 16px;
    color: #003d7a;
    flex-shrink: 0;
}

.ae-detail-desc {
    font-size: 14.5px;
    line-height: 1.75;
    color: #444;
}

.ae-detail-desc p { margin: 0 0 12px; }
.ae-detail-desc p:last-child { margin-bottom: 0; }

/* Resource cards */
.ae-detail-resources {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.ae-resource-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    border-radius: 10px;
    text-decoration: none;
    transition: background 0.15s ease, transform 0.1s ease;
    border: 1px solid #e0e0e0;
}

.ae-resource-card:hover {
    transform: translateX(3px);
}

.ae-resource-photos { background: #f0f6ff; border-color: #c5d8f8; }
.ae-resource-photos:hover { background: #e0eefe; }
.ae-resource-pdf    { background: #fff8f0; border-color: #ffd580; }
.ae-resource-pdf:hover { background: #fff0d8; }

.ae-resource-icon {
    width: 42px;
    height: 42px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.ae-resource-photos .ae-resource-icon { background: #003d7a; }
.ae-resource-pdf    .ae-resource-icon { background: #e65c00; }

.ae-resource-icon svg {
    width: 22px;
    height: 22px;
    fill: #fff;
}

.ae-resource-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.ae-resource-text strong {
    font-size: 14px;
    font-weight: 700;
    color: #1a1a2e;
}

.ae-resource-text span {
    font-size: 12px;
    color: #6c757d;
}

.ae-resource-arrow {
    width: 18px;
    height: 18px;
    fill: #6c757d;
    flex-shrink: 0;
}

/* ---- Responsive ---- */
@media (max-width: 640px) {
    .ae-events-grid  { grid-template-columns: 1fr; }
    .ae-filters      { flex-direction: column; }
    .ae-filter-select { min-width: 100%; }
    .ae-detail-title  { font-size: 19px; }
    .ae-detail-section { padding: 18px 18px; }
    .ae-modal { border-radius: 12px; }
    .ae-detail-hero   { height: 220px; }
    .ae-detail-meta-strip { flex-direction: column; }
    .ae-meta-item { border-right: none; border-bottom: 1px solid #eee; }
}
