@font-face {
    font-family: benzin;
    src: url(../font/Benzin-Font/Benzin-Bold.ttf);
}

@font-face {
    font-family: benzin;
    src: url(./mundosenai/assets/Benzin-Bold.ttf);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: #B51F19;
    font-family: benzin, Arial, sans-serif;
    overflow-x: hidden;
}

div {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

h1 {
    padding: 14px;
    color: #000;
}

.background {
    width: 100vw;
    height: 100vh;
    background-repeat: no-repeat;
    position: relative;
    z-index: 0;
}

#bg {
    background-image: url("./assets/bg_mundosenai.png");
    background-size: cover;
    background-position: center;
}

.photo-container {
    z-index: 2;
    position: absolute;
    top: 13%;
    left: 50%;
    transform: translate(-50%);
    width: 960px;
    max-width: 90%;
}

.last-photo-container {
    width: 100%;
    margin-bottom: 40px;
}

.last-photo {
    width: 100%;
    aspect-ratio: 16/9;
    background-color: #000;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    transition: transform 0.3s ease;
}

.last-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gallery {
    width: 100%;
}

.gallery h1 {
    color: #fff;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    list-style: none;
    margin-bottom: 20px;
}

.photo {
    width: 100%;
    height: 280px;
    aspect-ratio: 4/3;
    background-color: #000;
    overflow: hidden;  
    border-radius: 10px;
}

.photo:hover {
    cursor: pointer;
    transform: translateY(-5px);
    box-shadow: 0 0px 50px rgba(255, 255, 255, 0.4);
}

.photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.lightbox {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(10px);
    opacity: 0;
    transition: opacity 0.3s ease;
    overflow: hidden;
}

.lightbox.active {
    display: flex;
    opacity: 1;
}

.lightbox-content {
    position: relative;
    margin: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 90vw;
    height: 90vh;
    max-width: 1200px;
    max-height: 90vh;
}

.lightbox img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 10px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.8);
    animation: lightboxZoom 0.3s ease;
}

body.lightbox-active {
    overflow: hidden !important;
    width: 100vw;
}

@keyframes lightboxZoom {
    from {
        transform: scale(0.8);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.close-btn {
    position: absolute;
    top: 30px;
    right: 10px;
    cursor: pointer;
    z-index: 1001;
    transition: all 0.3s ease;
    background: rgba(0,0,0,0.7);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-btn::before {
    content: "×";
    color: #fff;
    font-size: 35px;
    font-weight: bold;
}

.close-btn:hover {
    background: rgb(26, 5, 4);
}

@media (max-width: 1200px) {
    .photo-container {
        width: 95%;
    }
    
    .gallery-grid {
        gap: 15px;
    }
}

@media (max-width: 992px) {
    .photo-container {
        top: 10%;
        width: 95%;
    }
    
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .photo {
        height: 250px;
    }
}

@media (max-width: 768px) {
    .photo-container {
        top: 5%;
        width: 95%;
    }
    
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .photo {
        height: 200px;
    }
    
    .last-photo-container {
        margin-bottom: 30px;
    }
    
    .close-btn {
        top: 10px;
        right: 15px;
        width: 40px;
        height: 40px;
    }
    
    .close-btn::before {
        font-size: 30px;
    }
    
    h1 {
        font-size: 1.5rem;
        padding: 10px;
    }
}

@media (max-width: 480px) {
    .background {
        height: 60vh;
        background-position: center top;
    }
    
    .photo-container {
        top: 5%;
        width: 98%;
    }
    
    .gallery-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .photo {
        height: 250px;
        border-radius: 8px;
        max-width: 300px;
        margin: 0 auto;
    }
    
    .last-photo {
        border-radius: 15px;
    }
    
    .close-btn {
        top: 15px;
        right: 15px;
        width: 35px;
        height: 35px;
    }
    
    .close-btn::before {
        font-size: 25px;
    }
    
    h1 {
        font-size: 1.2rem;
        padding: 8px;
    }
    
    .lightbox-content {
        width: 95vw;
        height: 85vh;
    }
}

@media (max-width: 320px) {
    .background {
        height: 55vh;
        background-position: center top;
    }
    
    .photo-container {
        width: 100%;
        padding: 0 10px;
        top: 5%;
    }
    
    .photo {
        height: 220px;
    }
    
    .gallery-grid {
        gap: 10px;
    }
    
    h1 {
        font-size: 1rem;
        padding: 6px;
    }
}