:root {
    --primary-color: #522E5B;
    --primary-darker: #3F2245;
    --bg-light: #f4f4f9;
    --bg-darker: #2c2c2c;
    --text-light: #ffffff;
    --text-dark: #333333;
    --border-radius-main: 25px;
    --border-radius-inner: 15px;
    --transition-fast: 0.3s ease;
    --transition-slow: 0.5s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideUpFadeIn {
    from {
        opacity: 0;
        transform: translateY(15px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    width: 100%;
    height: 100vh;
    display: flex;
    flex-direction: column;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: var(--text-dark);
    background-color: var(--bg-light);
    overflow: hidden;
}

::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}
::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
    background: #aaa;
}

header {
    width: 100%;
    height: 10%;
    background-color: var(--primary-color);
    display: flex;
    align-items: center;
    padding: 0 2%;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    z-index: 10;
}

footer {
    height: 10%;
    width: 100%;
    background-color: var(--bg-darker);
    display: flex;
    justify-content: center;
    align-items: center;
}

section {
    height: 80%;
    width: 100%;
    display: flex;
    flex-direction: row;
}

aside {
    height: 100%;
    width: 18%;
    background-color: var(--bg-light);
    border-right: 1px solid #ddd;
    padding-top: 20px;
}

main {
    height: 100%;
    width: 82%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 30px;
}

article {
    background-color: white;
    height: 100%;
    width: 100%;
    border-radius: var(--border-radius-main);
    padding: 25px;
    display: flex;
    flex-wrap: wrap;
    align-content: flex-start;
    gap: 20px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.08);
    overflow-y: auto;
}

.title h1 {
    color: var(--text-light);
    font-weight: 600;
    font-size: 2.2rem;
    text-shadow: 2px 2px 5px rgba(0, 0, 0, 0.3);
}

.logo {
    width: 15%;
}

#logo {
    height: 8vh;
    width: auto;
    border-radius: 50%;
    transition: transform var(--transition-fast);
}

#logo:hover {
    transform: rotate(10deg);
}

.title {
    width: 85%;
    justify-content: flex-start !important;
    padding-left: 20px;
}

h1 {
    font-weight: 300;
    font-size: 1.8rem;
}

.white_text {
    color: var(--text-light);
}

article img {
    width: calc(33.333% - 14px);
    height: auto;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: var(--border-radius-inner);
    transition: transform var(--transition-fast), box-shadow var(--transition-fast);
    cursor: pointer;
    animation: fadeIn var(--transition-slow) both;
}

article img:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.aside_button {
    width: 100%;
    height: 10%;
    border: none;
    border-right: 5px solid transparent;
    background: none;
    color: #555;
    font-family: inherit;
    font-size: 1em;
    font-weight: 600;
    text-align: left;
    padding-left: 25px;
    cursor: pointer;
    box-sizing: border-box;
    transition: all var(--transition-fast);
}

.aside_button:hover {
    background-color: #e9e9f3;
    color: var(--primary-color);
    border-right-color: var(--primary-color);
    transform: translateX(2px);
}

.aside_button.active {
    background-color: var(--primary-color);
    color: var(--text-light);
    border-right-color: var(--primary-darker);
}

#modal-overlay {
    visibility: hidden; 
    opacity: 0;
    position: fixed;
    top: 0;
    left: 0;
    height: 100%;
    width: 100%;
    background-color: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(5px);
    z-index: 100;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity var(--transition-fast), visibility 0s var(--transition-fast);
}

#modal-overlay.show {
    visibility: visible;
    opacity: 1;
    transition: opacity var(--transition-fast);
}

#modal {
    height: 80vh;
    max-height: 650px;
    width: 80vw;
    max-width: 1100px;
    background-color: var(--bg-light);
    border-radius: var(--border-radius-main);
    padding: 25px;
    display: flex;
    flex-direction: row;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    transform: scale(0.95);
    transition: transform var(--transition-fast);
}

#modal-overlay.show #modal {
    transform: scale(1);
}

#modal-overlay.show .photo_title,
#modal-overlay.show .photo_description {
    animation: slideUpFadeIn var(--transition-slow) both;
}

#modal-overlay.show .photo_description {
    animation-delay: 0.1s;
}

.side {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.left {
    width: 55%;
}

.right {
    width: 45%;
    padding-left: 25px;
}

#modal_img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: var(--border-radius-inner);
}

#top {
    height: 10%;
    display: flex;
    justify-content: flex-end;
    align-items: flex-start;
}

#bottom {
    height: 90%;
    display: flex;
    flex-direction: column;
    padding: 0;
}

#exit_button {
    height: 35px;
    width: 35px;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

#exit_button:hover {
    opacity: 1;
    transform: rotate(90deg);
}

.photo_title {
    height: auto;
    border-left: 4px solid var(--primary-color);
    padding-left: 15px;
    margin-bottom: 20px;
}

.photo_title h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

.photo_description {
    height: auto;
    overflow-y: auto;
    padding-right: 15px;
}

.photo_description h1 {
    font-size: 1rem;
    font-weight: 400;
    color: var(--text-dark);
    line-height: 1.6;
    text-align: justify;
}

#middle {
    width: 1px;
    height: 100%;
    background-color: #ddd;
    margin: 0 25px;
}

.border_div {
    display: none;
}

.socials-list, .contact-list {
    list-style: none;
    padding: 0;
    margin: 0;
    text-align: center;
}

.socials-list li, .contact-list li {
    margin: 15px 0;
}

.socials-list a {
    color: #333;
    text-decoration: none;
    font-size: 1.2rem;
    font-weight: bold;
    transition: color var(--transition-fast);
}

.socials-list a:hover {
    color: #007BFF;
}

.contact-list li {
    font-size: 1.1rem;
}

.contact-list .contact-name {
    font-weight: bold;
}

.contact-list a {
    color: #007BFF;
    text-decoration: none;
    transition: text-decoration var(--transition-fast);
}

.contact-list a:hover {
    text-decoration: underline;
}

#modal.modal--stream-mode {
    padding: 0;
    background-color: #000;
    overflow: hidden;
}

#modal.modal--stream-mode .side,
#modal.modal--stream-mode #middle,
#modal.modal--stream-mode #top {
    display: none;
}

#modal.modal--stream-mode #exit_button {
    position: absolute;
    top: 15px;
    right: 15px;
    z-index: 110;
    filter: invert(1);
}

@media (max-width: 768px) {
    #modal.modal--stream-mode{
        width: 80vw;
        height: auto;
        aspect-ratio: 16/9;
        max-height: 50vh;
    }

    body {
        height: auto;
        min-height: 100vh;
        overflow: auto;
    }

    header {
        height: auto;
        padding: 10px 15px;
        flex-direction: row;
    }

    .title h1 {
        font-size: 1rem;
        text-align: left;
    }

    #logo {
        height: 7vh;
    }
    
    footer h1 {
        font-size: 1rem;
    }

    section {
        flex-direction: column;
        height: auto;
    }

    aside {
        width: 100%;
        height: auto;
        display: flex;
        justify-content: center;
        border-right: none;
        border-bottom: 1px solid #ddd;
        padding-top: 0;
        background-color: white;
    }

    .aside_button {
        width: 25%;
        height: 60px;
        padding: 0;
        text-align: center;
        font-size: 0.7em;
        border-right: none;
        border-bottom: 4px solid transparent;
    }

    .aside_button:hover {
        transform: none;
        border-right-color: transparent;
        border-bottom-color: var(--primary-color);
    }

    .aside_button.active {
        border-right-color: transparent;
        border-bottom-color: var(--primary-darker);
    }
    
    main {
        width: 100%;
        height: auto;
        padding: 15px;
    }

    article {
        padding: 15px;
        gap: 15px;
    }

    article img {
        width: 100%;
    }

    #modal {
        flex-direction: column;
        width: 95vw;
        height: 90vh;
        padding: 15px;
        overflow-y: auto;
    }

    #middle {
        display: none;
    }

    .side.left, .side.right {
        width: 100%;
    }

    .side.left {
        height: 40%;
        max-height: 250px;
    }

    .side.right {
        height: auto;
        padding-left: 0;
        padding-top: 15px;
    }
    
    .photo_title h1 {
        font-size: 1.8rem;
    }
    
    .photo_description h1 {
        font-size: 0.9rem;
    }
}