/* =============================================
   ESWATINI FUNZONE — EVENTS PAGE STYLES
   ============================================= */

/* HERO SECTION */
.events-hero {
    position: relative;
    padding: 10rem 0 6rem;
    background: var(--gradient-primary);
    text-align: center;
    overflow: hidden;
}

.events-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 12% 30%, rgba(255, 255, 255, 0.2) 0%, transparent 34%),
        radial-gradient(circle at 86% 20%, rgba(0, 210, 255, 0.24) 0%, transparent 34%),
        linear-gradient(180deg, rgba(0, 0, 0, 0.04), rgba(0, 0, 0, 0.18));
    z-index: 0;
}

.events-hero::after {
    content: none;
}

.events-hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
    margin: 0 auto;
}

.events-hero h1 {
    font-size: clamp(3rem, 5vw, 4.5rem);
    margin-bottom: 20px;
    line-height: 1.1;
    color: #fff;
    font-weight: 900;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.28);
    letter-spacing: 1px;
}

.events-hero .text-gradient {
    background: linear-gradient(135deg, #d7f7ff 0%, var(--teal) 45%, #3a7bd5 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.25));
}

.events-hero-desc {
    font-size: 1.25rem;
    color: #fff;
    font-weight: 600;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}

.events-hero .hero-tag {
    color: #fff;
    text-shadow: none;
    background: rgba(255, 255, 255, 0.16);
    border: 2px solid rgba(255, 255, 255, 0.28);
    padding: 0.45rem 1.2rem;
    border-radius: 999px;
    display: inline-block;
    margin-bottom: 1rem;
}

/* UPCOMING EVENTS SECTION */
.upcoming-section {
    padding: 80px 0;
    background:
        linear-gradient(180deg, #fffaf0 0%, #f4f9f9 100%);
}

.section-header {
    text-align: center;
    margin-bottom: 50px;
}

.section-header h2 {
    font-size: 2.5rem;
    color: var(--primary-purple);
    margin-bottom: 15px;
}

.section-header p {
    font-size: 1.1rem;
    color: var(--text-muted);
}

.event-card {
    max-width: 980px;
    margin: 0 auto;
    background: var(--bg-white);
    border: 3px solid #ede8ff;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 18px 45px rgba(155, 81, 224, 0.14);
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.event-card:hover {
    transform: translateY(-8px);
    border-color: var(--primary-purple);
    box-shadow: 0 26px 55px rgba(155, 81, 224, 0.24);
}

.event-img-wrap {
    width: 100%;
    position: relative;
    min-height: 14px;
    background: var(--gradient-primary);
}

.event-img-wrap img {
    width: 100%;
    display: block;
    object-fit: cover;
}

.event-badge {
    position: absolute;
    top: 24px;
    right: 24px;
    background: var(--bg-white);
    color: var(--primary-purple);
    border: 2px solid rgba(155, 81, 224, 0.18);
    padding: 8px 18px;
    border-radius: 999px;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.9rem;
    box-shadow: 0 8px 20px rgba(155, 81, 224, 0.16);
    z-index: 2;
}

.event-info {
    padding: 46px;
    text-align: left;
    position: relative;
}

.event-info::before {
    content: '';
    position: absolute;
    top: 34px;
    left: 0;
    width: 8px;
    height: calc(100% - 68px);
    background: linear-gradient(180deg, var(--primary-purple), var(--teal));
    border-radius: 0 999px 999px 0;
}

.event-info h3 {
    font-size: clamp(2rem, 4vw, 3rem);
    color: var(--primary-purple);
    margin-bottom: 18px;
    font-family: var(--font-heading);
}

.event-info p,
.event-info li {
    color: var(--text-dark);
    font-size: 1.05rem;
    line-height: 1.75;
}

.event-info ul,
.event-info ol {
    display: grid;
    gap: 0.8rem;
    margin: 1.5rem 0;
    padding-left: 0;
}

.event-info li {
    list-style: none;
    background: #fbf7ff;
    border: 1px solid #ede8ff;
    border-radius: 14px;
    padding: 0.9rem 1rem 0.9rem 3rem;
    position: relative;
    font-weight: 700;
}

.event-info li::before {
    content: '';
    position: absolute;
    left: 1.1rem;
    top: 1.25rem;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--teal);
    box-shadow: 0 0 0 5px rgba(0, 210, 255, 0.16);
}

.event-info .btn-primary {
    margin-top: 1rem;
}

.event-detail-item {
    background: #fbf7ff;
    border-color: #ede8ff;
}

/* Legacy event markup support */
.event-badge.legacy {
    background: var(--primary-red);
    color: var(--text-light);
}

.event-details-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 25px;
    text-align: left;
}

.event-detail-item {
    background: var(--bg-light);
    padding: 15px;
    border-radius: 12px;
    border: 1px solid rgba(155, 81, 224, 0.1);
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.event-detail-item .icon {
    font-size: 1.5rem;
    background: var(--white);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    box-shadow: var(--shadow-sm);
}

.event-detail-item h4 {
    margin: 0 0 5px 0;
    font-size: 0.9rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.event-detail-item p {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-dark);
}

.event-description {
    text-align: left;
    margin-bottom: 25px;
    padding: 20px;
    background: rgba(255, 51, 102, 0.05);
    border-left: 4px solid var(--primary-red);
    border-radius: 8px;
}

.event-description ul {
    margin-top: 10px;
    padding-left: 20px;
}

.event-description li {
    margin-bottom: 8px;
    font-weight: 600;
}

.event-notice {
    font-weight: 700;
    color: var(--orange);
    margin-bottom: 25px;
    display: inline-block;
    padding: 10px 20px;
    background: rgba(255, 145, 0, 0.1);
    border-radius: 20px;
}

.empty-events {
    text-align: center;
    padding: 3rem 2rem;
    background: var(--bg-white);
    border-radius: 20px;
    font-family: var(--font-heading);
    font-size: 1.2rem;
    color: var(--text-muted);
    border: 2px dashed #ede8ff;
}

.events-error {
    color: var(--primary-red);
    border-color: rgba(255, 51, 102, 0.3);
    background: #fff5f7;
}

/* POST EVENTS SECTION */
.post-events-section {
    padding: 80px 0;
    background: var(--white);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 40px;
}

.gallery-item {
    position: relative;
    border-radius: 15px;
    overflow: hidden;
    aspect-ratio: 4/5;
    box-shadow: var(--shadow-sm);
    cursor: pointer;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.gallery-item:hover img {
    transform: scale(1.05);
}

.gallery-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
    display: flex;
    align-items: flex-end;
    padding: 20px;
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

.gallery-overlay span {
    color: var(--white);
    font-weight: 600;
    font-size: 1.2rem;
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

.gallery-item:hover .gallery-overlay span {
    transform: translateY(0);
}

/* RESPONSIVE */
@media (max-width: 768px) {
    .events-hero {
        padding: 8rem 0 4rem;
    }

    .events-hero-content {
        max-width: 100%;
    }

    .event-info {
        padding: 34px 26px;
    }
    
    .event-info h3 {
        font-size: 1.5rem;
    }

    .event-badge {
        top: 16px;
        right: 16px;
    }
}
