/*---------------------------------------*\
    AUTHOR: A.M.M. Elsayed   
    * ALL RIGHTS RESERVED *
\*---------------------------------------*/

* {
    margin: 0;
    padding: 0;
    list-style: none;
    text-decoration: none;
}

html, body {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    background-color: white;
}

body main {
    margin: 10px;
    padding: 10px;
    flex: 1;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
}

.page-top {
    width: 100%;
    height: 150px;
    max-width: 1000px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.page-top h1 {
    font-size: 45px;
}

.page-content {
    width: 100%;
    max-width: 1000px;
    margin: 10px 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

#events-list {
    max-width: 1000px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

#events-list .publication {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 20px 0;
    border: 1px solid  rgba(10, 10, 10, 0.1);
    border-radius: 1em;
    background: rgba(10, 10, 10, 0.02);
    backdrop-filter: blur(5px);
    box-shadow: inset 0 0 10px 1px rgba(10, 10, 10, 0.1);
    transition: all 0.2s;
}

#events-list .publication:hover {
    transform: scale(1.005);
}

#events-list .publication .content {
    margin: 20px;
    display: flex;
    flex-direction: column;
}

#events-list .publication img {
    margin: 20px;
    width: 95%;
    max-width: 350px;
    height: auto;
}

#events-list .publication .content p {
    margin-bottom: 5px;
}

#events-list .publication .content h2 {
    margin-bottom: 20px;
}

#events-list .publication .content #abstract {
    font-size: 15px;
    text-align: justify;
    margin-bottom: 10px;
}

@media screen and (max-width: 1000px) {
    #events-list .publication {
        flex-direction: column;
    }

    .search-bar {
        display: none;
    }
}

#events-list .publication .content p,
#events-list .publication .content h2 {
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* Search Bar */
.search-bar {
    display: flex;
    align-items: center;
    position: relative;
    width: 400px;
}

.search-input {
    width: 100%;
    padding: 10px 40px 10px 15px;
    border: 2px solid #ccc;
    border-radius: 25px;
    font-size: 16px;
    outline: none;
    transition: all 0.3s ease;
}

.search-input:focus {
    border-color: #007bff;
    box-shadow: 0 0 5px rgba(0, 123, 255, 0.5);
}

.search-button {
    position: absolute;
    right: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-icon {
    width: 20px;
    height: 20px;
    fill: #666;
    transition: fill 0.3s ease;
}

.search-button:hover .search-icon {
    fill: #007bff;
}

.highlight {
    background-color: yellow;
    font-weight: bold;
}

/* Lightbox Styles */
#lightbox-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.85);
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

#lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    display: flex;
    flex-direction: row;
    gap: 20px;
    color: white;
    padding: 20px;
    background-color: #1a1a1a;
    border: 3px solid rgb(28, 28, 28); /* Add border */
    border-radius: 0px; /* Optional: rounded corners */
}

#lightbox-caption h3 {
    margin: 0 0 10px 0;
    font-size: 20px;
    color: #f0f0f0;
    border-bottom: 1px solid #555;
    padding-bottom: 5px;
}


#lightbox-image {
    max-width: 60vw;
    max-height: 80vh;
    object-fit: contain;
}

#lightbox-caption {
    max-width: 30vw;
    overflow-y: auto;
    font-size: 16px;
    line-height: 1.4;
}

#lightbox-close {
    position: absolute;
    top: -20px;
    right: -20px;
    font-size: 2rem;
    cursor: pointer;
    user-select: none;
}


/* Prevent scrolling when lightbox is active */
body.lightbox-active {
    overflow: hidden;
}
