﻿.proyecto-container {
    padding: 4rem 2rem;
    max-width: 1500px;
    margin: 0 auto;
    margin-top: 5%;
}

.fade-in {
    animation: fadeInUp 1s ease-out;
}

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

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

.title-description {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2rem;
}

@media (min-width: 768px) {
    .title-description {
        flex-direction: row;
        justify-content: space-between;
        align-items: flex-start;
    }
}

.proyecto-description {
    flex: 1;
    font-size: 1.1rem;
    color: #555;
    opacity: 0.9;
}

.categoria-lista {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: space-between;
    margin-bottom: 2rem;
    width: 100%;
}

.categoria-item {
    background: none;
    border: none;
    padding: 0.5rem 0;
    font-size: 1.1rem;
    color: #777;
    cursor: pointer;
    position: relative;
    transition: color 0.3s ease;
}

    .categoria-item:hover {
        color: #000;
    }

    .categoria-item.activo {
        font-weight: bold;
        color: #000;
    }

        .categoria-item.activo::after {
            content: "";
            position: absolute;
            bottom: -3px;
            left: 0;
            width: 100%;
            height: 2px;
            background-color: #000;
        }

/* Galería */

.galeria {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.galeria-item {
    position: relative;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.3s ease;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    aspect-ratio: 5 / 3;
}

    .galeria-item img {
        width: 100%;
        height: 100%;
        display: block;
        transition: transform 0.3s ease;
        object-fit: cover;
    }

    .galeria-item:hover img {
        transform: scale(1.05);
    }

/* Overlay lateral */

.overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60%;
    height: 50%;
    background: rgba(255,255,255,0.95);
    padding: 1rem;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: left;
}

.galeria-item:hover .overlay {
    transform: translateX(0);
}

.overlay h4 {
    margin: 0 0 0.5rem;
    font-size: 1.1rem;
    color: #333;
}

.overlay p {
    margin: 0.3rem 0 0;
    font-size: 0.95rem;
    padding-left: 0;
    padding-right: 0;
    color: #666;
}

/* Responsive */

@media (max-width: 768px) {

    .categoria-lista {
        flex-direction: column;
        align-items: center;
    }

    .proyecto-description {
        text-align: justify;
        margin-top: 0.5rem;
        padding-right: 1rem;
        padding-left: 0;
    }

    .overlay h4 {
        font-size: 1rem;
    }

    .overlay p {
        font-size: 0.85rem;
    }
}

@media (min-width: 1024px) {

    .galeria {
        grid-template-columns: repeat(3, 1fr);
    }
}
