* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: Montserrat, sans-serif;
}

body {
    font-family: 'montserrat';
    background-color: #1a2165;
}

ul{
    list-style: none;
    border-style: none;
}

li{
    margin: 0.5rem 0 0.5rem 0.5rem;
}

a{
    text-decoration: none;
    color: white;
}

/* Estilo para el burguer menu */

.off-screen-menu{
    font-size: 0.9rem;
    color: white;
    position: fixed;
    top: 2rem;
    left: -15rem;
    display: inline-block;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    margin-left: -5rem;
    transition: .3s ease;
    width: 10rem;
    height: 5rem;
}

.off-screen-menu.active{
    left: 10rem;
}

.off-screen-menu ul li:hover {
    cursor: pointer;
    background-color: #ffc107;
    border-radius: 2rem;
    transition: 0.7s;
}

.ham-menu{
    margin: 0;
    height: 50px;
    width: 50px;
    margin-right: auto;
    position: relative;
}

.ham-menu span{
    height: 0.4rem;
    width: 80%;
    background-color: white;
    border-radius: 25px;
    position: absolute;
    top: 50%;
    left: 4rem;
    margin-top: 2rem;
    transform: translate(-50%, -50%);
    transition: .3s ease;
    cursor: pointer;
}

.ham-menu span:nth-child(1){
    top: 25%;
}

.ham-menu span:nth-child(3){
    top: 77%;
}

.ham-menu.active span:nth-child(1){
    top: 50%;
    transform: translate(-50%, -50%) rotate(45deg);
}

.ham-menu.active span:nth-child(2){
    opacity: 0;
}

.ham-menu.active span:nth-child(3){
    top: 50%;
    transform: translate(-50%, -40%) rotate(-45deg);
}

h1{
    text-align: center;
    margin-bottom: 2%;
    color: white;
    font-weight: 700;
    font-size: 3rem;
    width: 100%;
}

.container {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    justify-content: center;
    padding: 1rem;
    color: white;
}

.card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    background-color: #f9f9f9;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    max-width: 250px;
    height: 450px; /* Altura fija */
    overflow: hidden; /* Evita desbordes visuales */
}

.card:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 10px rgba(0, 0, 0, 0.15);
}

/* Contenido desplazable dentro de la tarjeta */
.card-content {
    flex: 1;
    overflow: auto; /* Habilita scroll interno */
    width: 100%; /* Asegura que tome todo el ancho */
    padding: 10px;
    text-align: left;
    color: #555555;
    align-items: center; /* Centra horizontalmente */
    justify-content: space-between; /* Asegura que los elementos estén espaciados */

}

.card img {
    padding-top: 5%;
    width: 80%;         /* Ajusta al porcentaje que prefieras */
    height: auto;
    display: block;
    margin: 0 auto;     /* Centra la imagen dentro de la tarjeta */
    transform: scale(1);
}

.card h3 {
    font-size: 1rem;
    margin-top: 10px;
    margin-bottom: 10%;
    color: #1a2165;
    font-weight: 700;
    text-align: center;
}

.card p {
    font-size: 0.8rem;
    line-height: 1.1rem;
    color: #555555;
    text-align: center;
    margin-bottom: 10%;
}

.card button {
    margin-top: auto; /* Empuja el botón hacia abajo */
    padding: 10px 20px;
    font-size: 0.7rem;
    font-weight: 600;
    color: white;
    background-color: #007bff;
    border: none;
    border-radius: 25px;
    transition: background-color 0.3s ease;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.card button:hover {
    background-color: #0056b3;
}

.card::-webkit-scrollbar {
    width: 8px;
}

.card::-webkit-scrollbar-thumb {
    background-color: #007bff;
    border-radius: 5px;
}

.card::-webkit-scrollbar-thumb:hover {
    background-color: #0056b3;
}

.card-content::-webkit-scrollbar,
.slide::-webkit-scrollbar {
    width: 8px;
}

.card-content::-webkit-scrollbar-thumb,
.slide::-webkit-scrollbar-thumb {
    background-color: #007bff;
    border-radius: 5px;
}

.card-content::-webkit-scrollbar-thumb:hover,
.slide::-webkit-scrollbar-thumb:hover {
    background-color: #0056b3;
}

.slideshow-container {
    position: relative;
    width: 100%;
    height: 250px; /* Altura fija para las slides */
    overflow: hidden; /* Evita que el contenido salga de los límites */
    margin-top: 10px;
    border-radius: 10px;
    transition: max-height 0.3s ease-in-out;

}

.slideshow-container.show {
    max-height: 500px; /* Ajusta según el contenido */
}

.slide {
    display: none;
    text-align: center;
    height: 100%;
    overflow: auto; /* Habilita scroll para contenido largo */
    padding: 15px;
    background-color: #ffffff;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.slide img {
    width: 150px; /* Set maximum width */
    height: 300px; /* Set maximum height */
    object-fit: contain; /* Ensures the entire image fits inside without cropping */
    display: block;
    margin: 0 auto; /* Centers the image */

}

.slide h4 {
    font-size: 1rem;
    font-weight: 700;
    color: #1a2165;
    margin-bottom: 10px;
}

.h3-slide{
    color: #555555;
    font-weight: 600;
    font-size: 1rem;
    text-align: left;
    margin-left: 2%;
}

.slide p {
    font-size: 0.8rem;
    line-height: 1.2;
    color: #555555;
    margin-left: 3%;
    margin-right: 3%;
}

.prev, .next {
    cursor: pointer;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(0, 0, 0, 0.5);
    color: white;
    font-size: 0.8rem;
    padding: 2%;
    border: none;
    border-radius: 50%;
    transition: background-color 0.3s ease;
}

.prev:hover, .next:hover {
    background-color: rgba(0, 0, 0, 0.8);
}

.prev {
    left: 10px;
}

.next {
    right: 10px;
}

.dots-container {
    text-align: center;
    margin-top: 10px;
}

.dot {
    height: 10px;
    width: 10px;
    margin: 0 5px;
    background-color: #bbb;
    border-radius: 50%;
    display: inline-block;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.dot.active {
    background-color: #007bff;
}

/* Para ajustar la escala de las imágenes cuando el slide está activo */
.slide.active img {
    transform: scale(0.9); /* Cambia el valor según el tamaño deseado */
    transition: transform 0.3s ease-in-out; /* Suaviza el cambio de escala */
}

/* Modal Overlay */
.modal {
    display: none; /* Hidden by default */
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.5); /* Dim background */
}

/* Modal Content */
.modal-content {
    background-color: #fff;
    margin: 7% auto;
    padding: 20px;
    border: none;
    border-radius: 15px; /* Esquinas redondeadas */
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.25);
    width: 80%;
    max-width: 30%;
    position: relative;
    text-align: center; /* Centra todo el contenido */
    font-family: 'Montserrat', sans-serif;
}

.modal-content h4 {
    font-size: 1rem;
    font-weight: bold;
    color: #333;
    margin-bottom: 10px;
    text-align: center; /* Centra el título */
}

.modal-content img {
    width: 100px; /* Tamaño más grande para reflejar la imagen compartida */
    height: 200px;
    display: block;
    margin: 0 auto 15px; /* Centra la imagen */
    border-radius: 15px; /* Esquinas redondeadas */
}

.modal-content p {
    font-size: 0.8rem;
    line-height: 1.5;
    color: #555;
    margin-bottom: 15px;
    text-align: left; /* Texto alineado a la izquierda */
}

.modal-content .section-title {
    font-weight: bold;
    margin-top: 10px;
    text-decoration: underline;
    color: #444;
}


/* Close Button */
.close-button {
    position: absolute;
    top: 1%;
    right: 2%;
    color: #aaa;
    font-size: 2rem;
    font-weight: bold;
    cursor: pointer;
}

.close-button:hover,
.close-button:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
}

@media (max-width: 480px) {

    li{
        margin: 0.7rem;
    }

    .list-menu{
        margin-top: 0.5rem;
        font-size: 1.5rem;
        font-weight: 700;
    }
    .ham-menu{
        height: 1.5rem;
        z-index: 2;
    }
    .ham-menu span{
        height: 0.2rem;
        width: 1.5rem;
        left: 1.5rem;
        margin-top: 0.7rem;
    }
    .off-screen-menu{
        font-size: 0.8rem;
        margin-left: 0.1rem;
        background-color:#1a2165;
        height: 7rem;
        z-index: 2;
        border-radius: 15%;
    }
    .off-screen-menu.active{
        left: 1.2rem;
        top: 0.2rem;
    }
    h1{
        font-size: 1.5rem;
    }
    .container {
        flex-direction: column;
        gap: 20px;
        padding: 10px;
    }
    .card {
        max-width: 90%;
        margin: 0 auto;
    }
    .card h3{
        font-size: 1rem;
    }
    .card p{
        font-size: 0.9rem;
    }
    .card button{
        padding: 2%;
        font-size: 0.9rem;
    }

    .slideshow-container {
        max-width: 100%;
        padding: 10px;
    }

    .modal-content{
        max-width: 100%;
    }

    .card h3{
        margin-top: 1%;
        margin-bottom: 2%;
    }
    .card p{
        margin-bottom: 2%;
        text-align: justify;
        margin-left: 5%;
        margin-right: 5%;
    }
  }
