.gallery-page {
    width: 100%;
    background-color: #f5f7f6;
    min-height: 600px;
}

.gallery-hero {
    width: 100%;
    min-height: 230px;
    padding: 45px 8%;

    background-color: #f5f7f6;

    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;

    text-align: center;
    box-sizing: border-box;
}

.gallery-hero h1 {
    color: #150e36;

    font-size: 38px;
    line-height: 1.2;

    margin: 0 0 8px;

    font-weight: 700;
}

.gallery-hero p {
    color: #555;

    font-size: 17px;
    line-height: 1.6;

    max-width: 750px;

    margin: 0;
}

.post-activity-section {
    width: 90%;
    max-width: 1200px;

    margin: 0 auto 35px;
    padding: 25px 30px;

    background-color: #ffffff;

    border: 1px solid #e4e9e4;
    border-radius: 15px;

    text-align: center;

    box-shadow:
        0 5px 15px rgba(0, 0, 0, 0.06);

    box-sizing: border-box;
}

.post-activity-section h2 {
    color: #150e36;

    font-size: 23px;

    margin: 0 0 5px;
}

.post-activity-section p {
    color: #666;

    font-size: 14px;

    margin: 0 0 15px;
}

.post-activity-btn {
    border: none;

    background-color: #08a04b;
    color: #ffffff;

    padding: 11px 24px;

    border-radius: 25px;

    font-family: inherit;
    font-size: 14px;
    font-weight: 700;

    cursor: pointer;

    transition: 0.3s ease;
}

.post-activity-btn:hover {
    background-color: #067237;

    transform: translateY(-2px);

    box-shadow:
        0 6px 15px rgba(8, 160, 75, 0.25);
}

.activity-gallery {
    width: 90%;
    max-width: 1200px;

    margin: 0 auto;
    padding: 0 0 70px;

    display: grid;

    grid-template-columns: repeat(3, minmax(0, 1fr));

    gap: 30px;

    align-items: stretch;

    box-sizing: border-box;
}

.event-card {
    width: 100%;
    min-width: 0;
    height: 480px;

    background-color: #ffffff;

    border-top: 5px solid #08a04b;
    border-left: 1px solid #e4e9e4;
    border-right: 1px solid #e4e9e4;
    border-bottom: 1px solid #e4e9e4;

    border-radius: 15px;

    overflow: hidden;

    box-shadow:
        0 6px 18px rgba(0, 0, 0, 0.09);

    display: flex;
    flex-direction: column;

    opacity: 0;

    transform: translateY(30px);

    animation:
        cardAppear 0.7s ease forwards;

    transition:
        transform 0.3s ease,
        box-shadow 0.3s ease;

    box-sizing: border-box;
}

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

    box-shadow:
        0 14px 30px rgba(0, 0, 0, 0.14);
}

.event-card > img {
    width: 100%;
    height: 190px;

    flex-shrink: 0;

    display: block;

    object-fit: cover;

    transition:
        transform 0.5s ease;
}

.event-card:hover > img {
    transform: scale(1.05);
}

.event-content {
    padding: 18px;

    background-color: #ffffff;

    flex: 1;

    min-height: 0;

    display: flex;
    flex-direction: column;

    box-sizing: border-box;
}

.event-date {
    display: inline-block;

    width: fit-content;

    background-color: #08a04b;
    color: #ffffff;

    padding: 4px 11px;

    border-radius: 20px;

    font-size: 11px;
    font-weight: 700;

    margin-bottom: 8px;

    flex-shrink: 0;
}

.uploaded-by {
    color: #777777;

    font-size: 12px;

    margin-bottom: 10px;

    flex-shrink: 0;
}

.uploaded-by strong {
    color: #150e36;
}

.uploaded-by span {
    display: inline-block;

    margin-left: 5px;

    padding: 2px 8px;

    border-radius: 10px;

    background-color: #edf7f1;
    color: #08a04b;

    font-size: 11px;
    font-weight: 700;
}

.event-content h2 {
    color: #150e36;

    font-size: 19px;
    line-height: 1.35;

    margin: 0 0 9px;

    font-weight: 700;

    flex-shrink: 0;
}

.event-description {
    color: #555555;

    font-size: 13px;
    line-height: 1.6;

    margin: 0 0 15px;

    flex: 0 0 auto;

    overflow: visible;
}

.read-more {
    margin-top: auto;

    align-self: flex-start;

    flex-shrink: 0;

    border: none;

    background-color: #150e36;
    color: #ffffff;

    padding: 8px 17px;

    border-radius: 20px;

    font-family: inherit;

    font-size: 12px;
    font-weight: 700;

    cursor: pointer;

    transition: 0.3s ease;
}

.read-more:hover {
    background-color: #08a04b;

    transform: translateY(-2px);
}

@keyframes cardAppear {

    from {
        opacity: 0;
        transform: translateY(30px);
    }

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

}

.popup-overlay {
    display: none;

    position: fixed;

    inset: 0;

    width: 100%;
    height: 100%;

    padding: 20px;

    background-color:
        rgba(10, 8, 25, 0.72);

    z-index: 3000;

    overflow-y: auto;

    align-items: center;
    justify-content: center;

    box-sizing: border-box;
}

.popup-overlay.show {
    display: flex;
}

@keyframes popupAppear {

    from {
        opacity: 0;

        transform:
            translateY(25px)
            scale(0.97);
    }

    to {
        opacity: 1;

        transform:
            translateY(0)
            scale(1);
    }

}

.popup-close {
    position: absolute;

    top: 15px;
    right: 15px;

    width: 38px;
    height: 38px;

    border: none;

    border-radius: 50%;

    background-color:
        rgba(21, 14, 54, 0.85);

    color: #ffffff;

    font-size: 25px;
    line-height: 1;

    cursor: pointer;

    z-index: 5;

    transition: 0.3s ease;
}

.popup-close:hover {
    background-color: #08a04b;

    transform: rotate(90deg);
}

.read-more-popup {
    width: 100%;
    max-width: 650px;

    background-color: #ffffff;

    border-radius: 24px;

    overflow: hidden;

    position: relative;

    box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.3);

    animation:
        popupAppear 0.3s ease;

    box-sizing: border-box;
}

.popup-image {
    width: 100%;
    height: 300px;

    display: block;

    object-fit: cover;
}

.popup-content {
    padding: 25px 28px 30px;
}

.popup-date {
    display: inline-block;

    background-color: #08a04b;
    color: #ffffff;

    padding: 5px 12px;

    border-radius: 20px;

    font-size: 12px;
    font-weight: 700;

    margin-bottom: 10px;
}

.popup-uploader {
    color: #777777;

    font-size: 13px;

    margin-bottom: 10px;
}

.popup-uploader strong {
    color: #150e36;
}

.popup-uploader span {
    display: inline-block;

    background-color: #edf7f1;
    color: #08a04b;

    padding: 3px 9px;

    border-radius: 12px;

    margin-left: 5px;

    font-size: 11px;
    font-weight: 700;
}

.popup-content h2 {
    color: #150e36;

    font-size: 25px;

    margin: 0 0 12px;
}

.popup-content p {
    color: #444444;

    font-size: 15px;

    line-height: 1.7;

    margin: 0;
}

#postActivityPopup {
    padding: 20px;

    box-sizing: border-box;
}

#postActivityPopup .post-form-popup {
    width: min(560px, 100%);

    max-height: calc(100vh - 40px);

    background-color: #ffffff;

    border-radius: 24px;

    padding: 26px 30px;

    position: relative;

    box-sizing: border-box;

    overflow-y: auto;
    overflow-x: hidden;

    box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.3);

    animation:
        popupAppear 0.3s ease;
}

#postActivityPopup .post-form-popup h2 {
    color: #150e36;

    font-size: 24px;

    margin: 0 40px 5px 0;
}

#postActivityPopup .form-intro {
    color: #777777;

    font-size: 13px;

    margin: 0 0 18px;
}

#postActivityPopup .form-group {
    margin-bottom: 12px;
}

#postActivityPopup .form-group label {
    display: block;

    color: #150e36;

    font-size: 13px;

    font-weight: 700;

    margin-bottom: 5px;
}

#postActivityPopup .form-group input,
#postActivityPopup .form-group textarea {
    width: 100%;

    box-sizing: border-box;

    border: 1px solid #dce3df;

    border-radius: 10px;

    padding: 10px 12px;

    font-family: inherit;

    font-size: 13px;

    outline: none;

    background-color: #fafcfb;

    transition: 0.3s ease;
}

#postActivityPopup .form-group input:focus,
#postActivityPopup .form-group textarea:focus {
    border-color: #08a04b;

    background-color: #ffffff;

    box-shadow:
        0 0 0 3px rgba(8, 160, 75, 0.08);
}

#postActivityPopup .form-group textarea {
    min-height: 80px;

    resize: vertical;
}

#postActivityPopup .photo-preview {
    width: 100%;

    min-height: 100px;
    max-height: 160px;

    box-sizing: border-box;

    border: 2px dashed #cbd8d0;

    border-radius: 12px;

    display: flex;

    align-items: center;
    justify-content: center;

    overflow: hidden;

    margin-bottom: 14px;

    background-color: #f8faf9;

    color: #999999;

    font-size: 13px;

    text-align: center;
}

#postActivityPopup .photo-preview img {
    display: none;

    width: 100%;

    max-height: 160px;

    object-fit: cover;
}

#postActivityPopup .photo-preview.has-image img {
    display: block;
}

#postActivityPopup .photo-preview.has-image span {
    display: none;
}

#postActivityPopup .submit-activity {
    width: 100%;

    border: none;

    background-color: #08a04b;

    color: #ffffff;

    padding: 11px;

    border-radius: 22px;

    font-family: inherit;

    font-size: 14px;

    font-weight: 700;

    cursor: pointer;

    transition: 0.3s ease;
}

#postActivityPopup .submit-activity:hover {
    background-color: #067237;

    transform: translateY(-2px);
}

@media (max-width: 900px) {

    .activity-gallery {
        width: 92%;

        grid-template-columns:
            repeat(2, minmax(0, 1fr));

        gap: 25px;
    }

}

@media (max-width: 600px) {

    .gallery-hero {
        min-height: 230px;

        padding: 40px 20px;
    }

    .gallery-hero h1 {
        font-size: 32px;
    }

    .gallery-hero p {
        font-size: 15px;
    }

    .post-activity-section {
        width: 90%;

        padding: 22px 18px;
    }

    .activity-gallery {
        width: 90%;

        grid-template-columns: 1fr;

        gap: 25px;

        padding-bottom: 50px;
    }

    .event-card {
        height: 480px;
    }

    .event-card > img {
        height: 210px;
    }

    .read-more-popup {
        max-width: 100%;

        border-radius: 20px;
    }

    .popup-image {
        height: 230px;
    }

    .popup-content {
        padding: 22px;
    }

    .popup-content h2 {
        font-size: 22px;
    }

    #postActivityPopup {
        padding: 12px;
    }

    #postActivityPopup .post-form-popup {
        width: 100%;

        max-height: calc(100vh - 24px);

        padding: 22px 18px;

        border-radius: 20px;
    }

    #postActivityPopup .post-form-popup h2 {
        font-size: 22px;
    }

    #postActivityPopup .form-group {
        margin-bottom: 10px;
    }

    #postActivityPopup .form-group input,
    #postActivityPopup .form-group textarea {
        padding: 9px 11px;
    }

    #postActivityPopup .form-group textarea {
        min-height: 70px;
    }

    #postActivityPopup .photo-preview {
        min-height: 80px;
        max-height: 120px;
    }

    #postActivityPopup .photo-preview img {
        max-height: 120px;
    }

}

@media (max-width: 400px) {

    .gallery-hero h1 {
        font-size: 29px;
    }

    .gallery-hero p {
        font-size: 14px;
    }

    .event-card {
        height: 470px;
    }

    .event-card > img {
        height: 200px;
    }

}
