/* Contenedor principal personalizado */
.desplegar-info-container {
    display: flex;
    flex-direction: column;
    gap: 30px;
    padding: 20px;
    margin: 100px auto;  /* Margen superior para no chocar con el contenedor de arriba */
    height: 700px;  /* Altura fija para el contenedor */
    overflow-y: auto;  /* Permite el desplazamiento en caso de que el contenido exceda la altura */
    font-family: 'Nunito', sans-serif;
    background-color: transparent;  /* Elimina el fondo */
    max-width: 1200px; /* Agregado para evitar desbordamiento en escritorio */
    box-sizing: border-box;
}

/* Estilo de los items de información */
.info-item {
    display: flex;
    background-color: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    height: 100%;
    flex: 1;
    margin-bottom: 20px;
    flex-wrap: wrap;
    overflow: hidden;
}

/* Estilo de la columna izquierda (imagen) */
.left-column {
    flex: 1;
    margin-right: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    border-radius: 8px;
    max-width: 100%; /* Evita que la imagen se salga del contenedor */
    box-sizing: border-box;
}

/* Imagen ajustada y contenida */
.imagen {
    width: 100%;
    height: auto;
    aspect-ratio: 4 / 3; /* Asegura buena proporción */
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    display: block;
    max-width: 100%; /* Garantiza que no se desborde */
}

/* Estilo de la columna derecha (título y contenido) */
.right-column {
    flex: 2;
    box-sizing: border-box;
}

/* Título principal */
h2 {
    font-size: 1.8em;
    margin-bottom: 20px;
    color: #333;
}

/* Estilo de los botones desplegables */
.desplegables {
    margin-top: 20px;
}

.desplegable {
    margin-bottom: 10px;
    position: relative;
}

.desplegar-btn {
    width: 100%;
    padding: 12px;
    background-color: #349B7D;
    color: white;
    border: none;
    text-align: left;
    font-size: 1.1em;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.desplegar-btn:hover {
    background-color: #F8AE00;
}

/* Flecha */
.flecha {
    font-size: 20px;
    color: white;
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    transition: transform 0.3s ease;
}

/* Estilo del contenido desplegable */
.contenido {
    background-color: #f9f9f9;
    padding: 15px;
    margin-top: 10px;
    border-left: 4px solid #007bff;
    border-radius: 5px;
    font-size: 1em;
    color: #555;
}

/* ============================= */
/* RESPONSIVE DESIGN            */
/* ============================= */

/* Para pantallas de 1024px o menos */
@media (max-width: 1024px) {
    .desplegar-info-container {
        max-width: 95%;
        margin: 50px auto;
        padding: 20px;
    }

    h2 {
        font-size: 1.5em;
        margin-bottom: 20px;
    }

    .form-group {
        margin-bottom: 15px;
    }

    input,
    textarea,
    select {
        font-size: 14px;
    }

    button {
        font-size: 16px;
        padding: 12px;
    }

    .back-link a {
        font-size: 14px;
    }
}

/* Para pantallas de 768px o menos */
@media (max-width: 768px) {
    .desplegar-info-container {
        max-width: 95%;
        margin: 30px auto;
        padding: 15px;
    }

    .info-item {
        flex-direction: column;
        align-items: center;
    }

    .left-column {
        margin: 0 0 15px 0;
        width: 100%;
        max-width: 100%;
    }

    .right-column {
        width: 100%;
    }

    h2 {
        font-size: 1.2em;
        margin-bottom: 15px;
        text-align: center;
    }

    .form-group {
        margin-bottom: 10px;
    }

    input,
    textarea,
    select {
        font-size: 14px;
    }

    button {
        font-size: 16px;
        padding: 12px;
    }

    .back-link a {
        font-size: 12px;
    }

    .imagen {
        width: 100%;
        height: auto;
        max-height: none;
        object-fit: cover;
        aspect-ratio: 4 / 3;
    }
}
