﻿.page-hero {
    padding: 100px 0 60px;
    text-align: center;
}

    .page-hero h1 {
        font-weight: 500;
        margin-bottom: 20px;
    }

.divider {
    width: 60px;
    height: 1px;
    background: var(--accent);
    margin: 24px auto;
}

.events-container {
    max-width: 960px;
}

.events-header {
    text-align: center;
    margin-bottom: 80px;
}

    .events-header h1 {
        font-size: 32px;
        margin-bottom: 16px;
    }

    .events-header p {
        font-size: 15px;
        color: var(--muted);
        max-width: 640px;
        margin: 0 auto;
        line-height: 2;
    }

.load-more-btn {
    margin-top: 24px;
    background: none;
    border: 1px solid var(--border);
    padding: 10px 28px;
    font-size: 14px;
    cursor: pointer;
    color: var(--accent);
    text-decoration: none;
}

    .load-more-btn:hover {
        border-color: var(--accent);
    }

.year-title {
    font-size: 22px;
    color: var(--accent);
    margin-bottom: 32px;
}

.events-list {
    border-top: 1px solid var(--border);
}

.event-item {
    display: flex;
    gap: 24px;
    padding: 28px 0;
    border-bottom: 1px solid var(--border);
}

.event-icon {
    font-size: 20px;
    color: var(--accent);
    min-width: 32px;
}

.event-content strong {
    display: block;
    margin-bottom: 6px;
}

.event-content span {
    display: block;
    font-size: 14px;
    color: var(--muted);
    margin-bottom: 8px;
}

.event-content p {
    font-size: 14px;
    line-height: 1.9;
}

.event-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

    .event-link:hover .event-item {
        background: rgba(183, 161, 106, 0.06); /* accent خیلی ظریف */
    }

.certificates-grid-section {
    padding: 90px 0 120px;
}

.certificates-header {
    max-width: 820px;
    margin: 0 auto 60px;
    text-align: center;
}

    .certificates-header h2 {
        font-size: 26px;
        font-weight: 500;
        color: var(--text);
        margin-bottom: 18px;
    }

    .certificates-header p {
        font-size: 15px;
        line-height: 2;
        color: var(--muted);
    }

/* Certificate Card */
.certificate-item {
    border: 1px solid var(--border);
    padding: 18px;
    height: 100%;
    text-align: center;
    transition: border-color 0.3s ease;
}

    .certificate-item:hover {
        border-color: var(--accent);
    }

/* Image Wrapper */
.certificate-image {
    background: #f0efec; /* هماهنگ با بکگراند سایت */
    padding: 18px;
    margin-bottom: 16px;
    display: flex;
    justify-content: center;
    align-items: center;
}

    .certificate-image img {
        max-width: 100%;
        height: auto;
        filter: grayscale(100%);
        opacity: 0.9;
        transition: all 0.3s ease;
    }

/* Hover Image */
.certificate-item:hover img {
    filter: grayscale(0%);
    opacity: 1;
}

/* Title */
.certificate-title {
    font-size: 14px;
    color: var(--text);
}

.certificate-lightbox {
    position: fixed;
    inset: 0;
    z-index: 9999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.35s ease;
}

    .certificate-lightbox.active {
        opacity: 1;
        pointer-events: auto;
    }

/* Overlay */
.lightbox-overlay {
    position: absolute;
    inset: 0;
    background: rgba(31, 31, 31, 0.85);
}

/* Content */
.lightbox-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.96);
    transition: transform 0.35s ease;
    max-width: 92vw;
    max-height: 92vh;
}

.certificate-lightbox.active .lightbox-content {
    transform: translate(-50%, -50%) scale(1);
}

/* Image */
.lightbox-content img {
    display: block;
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
    background: #f6f4f1;
    padding: 16px;
}

/* Close Button */
.lightbox-close {
    position: absolute;
    top: -36px;
    left: 0;
    font-size: 28px;
    background: none;
    border: none;
    color: #fff;
    cursor: pointer;
}

/* Mobile optimization */
@media (max-width: 768px) {
    .lightbox-content {
        width: calc(100% - 20px); /* 10px از چپ و راست */
        max-width: none;
        max-height: none;
        padding: 0;
        background: transparent;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
    }

        .lightbox-content img {
            width: 100%;
            max-height: 85vh;
            background: #f6f4f1; /* بکگراند هماهنگ با سایت */
            padding: 14px;
            border: 1px solid var(--border);
        }

    .lightbox-close {
        position: absolute;
        top: -42px;
        left: 10px;
        font-size: 26px;
        color: #000; /* مشکی و واضح */
        background: transparent;
    }
}
