/* ========== ESTILO BASE GENERAL ========== */

/* Contenedor principal de los testimonios */
.testimonios-container {
    font-family: 'Nunito', sans-serif;
    margin: 100px auto;
    max-width: 1200px;
    padding: 20px;
}

/* Título principal */
.testimonios-container h1 {
    text-align: center;
    font-size: 2.5em;
    color: #333;
    margin-bottom: 30px;
}

/* Contenedor de los testimonios en formato de cuadrícula */
.testimonios-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
}

/* Cada testimonio individual */
.testimonio-item {
    width: 300px;
    cursor: pointer;
    transition: transform 0.3s ease;
}

/* Efecto al pasar el cursor por encima */
.testimonio-item:hover {
    transform: scale(1.05);
}

/* Tarjeta del testimonio */
.card {
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

/* Imagen superior de la tarjeta */
.card-img-top {
    height: 300px;
    background-size: cover;
    background-position: center;
}

/* Contenido del cuerpo de la tarjeta */
.card-body {
    padding: 15px;
}

/* ========== MODAL PERSONALIZADO ========== */

/* Fondo del modal (oscurecido) */
.custom-modal {
    display: none; /* Oculto por defecto */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5); /* Fondo semitransparente */
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

/* Mostrar modal al agregar clase "show" */
.custom-modal.show {
    display: flex;
}

/* Contenido del modal */
.custom-modal-content {
    background-color: white;
    border-radius: 10px;
    width: 80%;
    max-width: 700px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    position: relative;
}

/* Encabezado del modal (barra superior con botón de cierre) */
.custom-modal-header {
    background-color: #f8f9fa;
    border-bottom: 2px solid #ddd;
    padding: 15px;
    display: flex;
    justify-content: flex-end;
    align-items: center;
}

/* Botón "X" para cerrar el modal */
.close-btn {
    background: none;
    border: none;
    font-size: 2em;
    font-weight: bold;
    cursor: pointer;
    color: #333;
    z-index: 2000;
    transition: color 0.3s;
}

.close-btn:hover {
    color: #ff6347; /* Color de hover para la "X" */
}

/* Cuerpo del modal */
.custom-modal-body {
    padding: 15px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

/* Imagen dentro del modal */
.custom-modal-body img {
    max-width: 50%;
    height: auto;
    border-radius: 10px;
    margin-bottom: 15px;
}

/* Texto del cuerpo del modal */
.custom-modal-body p {
    font-size: 1.1em;
    color: #555;
    line-height: 1.6;
    margin: 10px 0;
}

/* ========== MEDIA QUERIES ========== */

/* === Laptops pequeñas y tablets grandes (768px a 1024px) === */
@media (max-width: 1024px) {
    .testimonio-item {
        width: 100%;
        max-width: 320px; /* Limita ancho máximo para que no se vea estirado */
    }

    

    .custom-modal-content {
        width: 70%; /* Más margen en pantallas medianas */
    }

    .custom-modal-body img {
        max-width: 80%; /* Imagen más ancha en pantallas medianas */
    }
}

/* === Móviles (hasta 767px) === */
@media (max-width: 767px) {
    .card-img-top {
        height: 150px;
    }

    .testimonios-container h1 {
        font-size: 2em; /* Título más pequeño para móviles */
    }

    .custom-modal-content {
        width: 95%; /* Aprovechar más el ancho */
    }

    .close-btn {
        font-size: 1.8em; /* Botón de cierre ligeramente más pequeño */
    }
}

/* === Laptops grandes y pantallas de escritorio (1025px en adelante) === */
@media (min-width: 1025px) {
    .testimonio-item {
        width: 280px; /* Ligeramente más estrechas para mejor distribución */
    }

    .card-img-top {
        height: 300px;
    }

    .custom-modal-body img {
        max-width: 50%;
    }
}
