/* Estilo global */
body {
    font-family: 'Poppins', sans-serif;
    margin: 0;
    padding: 0;
    background: linear-gradient(135deg, #f5f5f5 25%, #e0e0e0 100%);
    text-align: center;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

header {
    background: linear-gradient(135deg, #FF5733, #FFBD33);
    color: white;
    padding: 20px;
    flex-shrink: 0;
}

h1 {
    font-size: 2.5em;
    margin: 0;
    opacity: 0;
    animation: fadeIn 2s forwards;
    letter-spacing: 1px;
}

p {
    font-size: 1.2em;
    opacity: 0;
    animation: slideInLeft 1.5s forwards;
    margin: 0;
    font-weight: 300;
}

@keyframes fadeIn {
    to {
        opacity: 1;
    }
}

@keyframes slideInLeft {
    from {
        transform: translateX(-100%);
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Ajustes para el contenedor del PDF */
#pdf-viewer {
    margin: 20px auto;
    width: 85%;
    background: #fff;
    padding: 20px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
    border-radius: 15px;
    transition: transform 0.3s ease;
    max-width: 100%;
    max-height: 75vh;  /* Controlamos la altura máxima */
    overflow: auto;  /* Evita que el contenido se desborde */
}

canvas {
    width: 100%;
    border: 2px solid #ddd;
    margin-bottom: 20px;
    border-radius: 10px;
}

/* Controles de navegación */
.controls {
    display: flex;
    justify-content: center;
    gap: 15px;
    align-items: center;
    background-color: #FFBD33;
    padding: 15px;
    border-radius: 10px;
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
}

/* Botones de navegación */
button {
    padding: 12px 25px;
    background: #FF5733;
    color: white;
    border: none;
    cursor: pointer;
    border-radius: 50px;
    font-size: 1.2em;
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
}

button:hover {
    background: #FF4500;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.25);
    transform: translateY(-3px);
}

/* Ajustes para el pie de página */
footer {
    background: #333;
    color: white;
    padding: 20px;
    position: relative;  /* Hacemos que no sea fijo */
    width: 100%;
    bottom: 0;
    left: 0;
    box-shadow: 0 -5px 10px rgba(0, 0, 0, 0.2);
    margin-top: auto;  /* Aseguramos que el contenido principal esté arriba */
}

footer a {
    color: #FFBD33;
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s ease;
}

footer a:hover {
    color: #FF5733;
}

/* Ajustes para el logo flotante de WhatsApp */
.whatsapp-float {
    position: fixed;
    width: 60px;
    height: 60px;
    bottom: 80px;  /* Ajuste del margen inferior para evitar interferencias */
    right: 30px;
    z-index: 100;
    border-radius: 50%;
    background-color: #25D366;
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease;
}

.whatsapp-float img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
}

.whatsapp-float:hover {
    transform: scale(1.1);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.4);
}

/* Hacer el diseño más adaptable */
@media (max-width: 768px) {
    h1 {
        font-size: 2em;
    }

    p {
        font-size: 1.1em;
    }

    #pdf-viewer {
        padding: 15px;
        margin: 10px;
        width: 95%;
    }

    button {
        padding: 10px 20px;
        font-size: 1em;
    }
}

@media (max-width: 480px) {
    h1 {
        font-size: 1.7em;
    }

    p {
        font-size: 1em;
    }

    #pdf-viewer {
        padding: 10px;
        margin: 5px;
        width: 100%;
    }

    button {
        padding: 8px 18px;
        font-size: 0.9em;
    }

    footer {
        padding: 15px;
    }

    .whatsapp-float {
        width: 50px;
        height: 50px;
        bottom: 60px;
        right: 20px;
    }
}
