/* Estilos generales */
body {
    font-family: sans-serif;
    margin: 0;
}

header {
    background-color: #f0f0f0;
    padding: 20px;
    text-align: center;
}

.banner img {
    max-width: 100%;
    height: auto;
}

.subtitulo {
    text-align: center;
    padding: 20px;
}

main {
    padding: 20px;
}

#articulos {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.articulo {
    border: 1px solid #ddd;
    padding: 10px;
    border-radius: 5px;
    box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.1);
}

/* Estilos para el contenedor del icono flotante */
.whatsapp-float {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: #25D366;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    text-decoration: none;
    box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    transition: background-color 0.3s ease;
    animation: flotar 5s infinite ease-in-out; /* Aplica la animación */
}

.whatsapp-float:hover {
    background-color: #128C7E;
}

/* Estilos para la imagen del icono */
.whatsapp-float img {
    width: 40px;
    height: 40px;
}

/* Media query para pantallas pequeñas (opcional) */
@media (max-width: 768px) {
    .whatsapp-float {
        width: 50px;
        height: 50px;
        bottom: 10px;
        right: 10px;
    }

    .whatsapp-float img {
        width: 30px;
        height: 30px;
    }
}

@keyframes flotar {
    0% { transform: translateY(0); } /* Posición inicial */
    50% { transform: translateY(-10px); } /* Se mueve 10px hacia arriba */
    100% { transform: translateY(0); } /* Regresa a la posición inicial */
}

footer {
    background-color: #333;
    color: white;
    padding: 10px;
    text-align: center;
    position: relative;
    bottom: 0;
    width: 100%;
}

/* Estilos del carrusel (CON FLECHAS) */
.contenedor-imagenes {
    display: flex;
    text-align: center;
    gap: 10px;
    overflow-x: auto;
}

.contenedor-imagenes img {
    max-width: 100px;
    cursor: pointer;
    vertical-align: middle; /* Centra verticalmente */
    max-width: 100%;
    max-height: 100%;
}

.carrusel {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.carrusel-contenido {
    max-width: 80%; /* Ajusta este valor según tus necesidades */
    max-height: 80vh; /* Ajusta este valor según tus necesidades */
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    background-color: rgb(218, 188, 149); /* Añade un fondo blanco para mejor contraste */
    padding: 20px; /* Añade un padding para separar la imagen del borde */
    box-sizing: border-box; /* Asegura que el padding no afecte el tamaño */
}

.carrusel img {
    max-width: 100%;
    max-height: 100%; /* Ajusta este valor si es necesario */
    object-fit: contain; /* o scale-down */
    overflow: auto; /* Permite el scroll si la imagen es demasiado grande */
    display: block; /* Evita espacios adicionales debajo de la imagen */
}

.cerrar {
    position: absolute;
    top: 20px;
    right: 30px;
    font-size: 30px;
    color: white;
    cursor: pointer;
}

.controles {
    display: flex;
    justify-content: space-between;
    width: 100%;
    margin-top: 10px;
    position: absolute;
    bottom: 20px;
    left: 0px;
    padding: 0 10px;
    box-sizing: border-box; /* Importante para que el padding no afecte el ancho total */
}

.controles .flecha {
    background-color: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    padding: 10px 15px;
    font-size: 20px;
    cursor: pointer;
    border-radius: 5px;
    user-select: none;
}

.controles .flecha.anterior {
    /*left: 10px; Ya no es necesario con el padding y box-sizing en .controles */
}

.controles .flecha.siguiente {
    /*right: 10px; Ya no es necesario con el padding y box-sizing en .controles */
}