/* Estilos generales */
.projects-seccion {
    max-width: 100%;
    margin: 0 auto 30px;
    overflow: hidden;
    background-color: #ecf0f1;
    text-align: center;
    border: none;
}

.titulo-seccion {
    position: relative; /* Necesario para que ::before se ancle a este elemento */
    padding: 10px;
    margin: 0;
    color: black;
    background-color: #ecf0f1;
    text-align: center;
    font-family: var(--tittle-font);
    font-size: 4vh;
    z-index: 1;
}

.titulo-seccion::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: url('/assets/mapaBackground.webp');
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center -62.2vh;
    opacity: 0.1;
    z-index: -1;
}

.imagenes-superiores {
    display: flex;
    background-color: #ecf0f1;
}

.imagenes-superiores img {
    width: 25%;
    height: 60vh;
    object-fit: cover;
    max-height: 70vh; /* Ajusta la altura máxima de las imágenes */
    object-position: center;
}

.columnas-texto {
    position: relative;
    overflow: hidden;
    max-height: 6em;
    transition: max-height 0.2s ease;
    font-size: 2.5vh; /* Ajusta el tamaño de la fuente */
    text-align: justify;
    text-justify: inter-word;
    padding: 1rem 10vh 0;
    font-family: var(--paragraph-font);
}

.columnas-texto::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 40px;
    background: linear-gradient(to bottom, transparent 0%, rgba(236, 240, 241, 0.9) 100%);
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.columnas-texto.expanded {
    max-height: 1000px !important;
}

.columnas-texto.expanded::after {
    opacity: 0;
}

.columna {
    flex: 1;
    padding: 0 15px;
}

.columna:first-child {
    border-right: 1px solid #ddd;
}

/* Botón general (fuera de media query) */
#projects .button-1 {
    padding: 0.8rem 2rem;
    margin: 1rem auto;
    display: inline-block;
    text-align: center;
    font-family: var(--paragraph-font);
}

/* Título de proyectos */
.projects-tittle {
    width: 100%;
    text-align: center;
    margin-top: 2vh;
    font-size: 6vh;
    background-color: #ecf0f1;
    padding: 2vh 0;
    border: none;
    position: relative;
    left: 50%;
    transform: translateX(-50%);
    font-family: var(--tittle-font);
    overflow: hidden;
    z-index: 1;
    letter-spacing: 3vh;
}

.projects-tittle::before {
    content: "";
    position: absolute;
    inset: 0; /* equivalente a top:0; left:0; width:100%; height:100%; */
    background-image: url('/assets/mapaBackground.webp');
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;
    opacity: 0.1;
    z-index: 0;
}

/* Responsive móvil */
@media (max-width: 768px) {
    .projects-seccion {
        max-width: 100%;
        margin-bottom: 2vh;
    }

    .projects-tittle {
        font-family: var(--tittle-font);
        font-size: 3vh;
        letter-spacing: 2vh;
    }

    .titulo-seccion {
        padding: 1.2vh;
        font-size: 3vh;
        background-color: transparent;
    }

    .imagenes-superiores {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }

    .imagenes-superiores img {
        width: 100%;
        height: auto;
        aspect-ratio: 1/1;
        max-height: unset;
    }

    .columnas-texto {
        padding: 1.2rem;
        text-align: justify;
        max-height: 120px;
        background-color: white;
        }

    .columna {
        padding: 0;
        border: none !important;
    }

    .columna:first-child {
        border-right: none;
    }

    .columna p {
        margin: 0 0 1rem 0;
        line-height: 1.5;
        font-size: 0.95rem;
    }

    /* Corrección del botón para móvil */
    #projects .button-1 {
        display: block !important;
        margin: 1rem auto !important;
        padding: 12px !important;
        white-space: normal;
        background-color: var(--medium-color) !important;   
        color: var(--white-color) !important;
    }

    .button-1.ver-mas-btn:hover,
    .button-1.ver-mas-btn:active,
    .button-1.ver-mas-btn:focus {
        background-color: var(--medium-color) !important;
        transform: none !important;
        box-shadow: none !important;
    }
    
    .button-1.ver-mas-btn {
        -webkit-tap-highlight-color: transparent;
        user-select: none;
    }
}