/* --- Estilos Generales para las páginas de información --- */
body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    margin: 0;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: #1F1F1F;
    color: #E0E0E0;
    line-height: 1.6;
    overflow-x: hidden; /* Evita el scroll horizontal */
}

main {
    flex-grow: 1; 
    padding: 2rem;
}

/* --- Estilos para la PÁGINA DE MENÚ (moreinfo.html) --- */
.menu-container {
    text-align: center;
    max-width: 600px;
    width: 100%;
    margin: 0 auto;
}

.menu-container h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, #A8C7FA, #C6A7FC);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    /* Animación de entrada */
    opacity: 0;
    animation: pop-in-bouncy 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
    animation-delay: 0.1s;
}

.menu-subtitle {
    color: #B0B0B0;
    margin-bottom: 3rem;
    font-size: 1.2rem;
    /* Animación de entrada */
    opacity: 0;
    animation: pop-in-bouncy 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
    animation-delay: 0.2s;
}

.menu-options {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    width: 100%;
    margin: 0 auto 3rem auto;
}

.menu-button {
    background-color: #2a2a2a;
    border: 1px solid #333;
    border-radius: 12px;
    padding: 1.5rem;
    text-decoration: none;
    color: #E0E0E0;
    /* Transición mejorada */
    transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
    
    /* Animación de entrada */
    opacity: 0;
    animation: pop-in-bouncy 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

.menu-button:hover {
    transform: translateY(-5px);
    border-color: #A8C7FA;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2); /* Sombra para dar profundidad */
}

.menu-button h2 {
    margin: 0 0 0.5rem 0;
    font-size: 1.5rem;
}

.menu-button p {
    margin: 0;
    color: #B0B0B0;
}

/* Retraso de animación escalonado para los botones del menú */
.menu-button:nth-child(1) { animation-delay: 0.3s; }
.menu-button:nth-child(2) { animation-delay: 0.4s; }
.menu-button:nth-child(3) { animation-delay: 0.5s; }


/* --- Estilos para las PÁGINAS DE DOCUMENTACIÓN --- */
.content-wrapper {
    max-width: 800px;
    margin: 0 auto;
    padding-top: 1rem; 
}

.content-wrapper h1, .content-wrapper h2 {
    background: linear-gradient(135deg, #A8C7FA, #C6A7FC);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 10px;
    margin-top: 2.5rem;
}

.content-wrapper h1 {
    text-align: center;
    font-size: 2.5rem;
}

.content-wrapper h2 {
    font-size: 1.8rem;
}

.content-wrapper p {
    color: #B0B0B0;
    margin-bottom: 1rem;
}

.project-meta {
    text-align: center;
    color: #999;
    margin-top: -10px;
}

hr {
    border: none;
    height: 1px;
    background-color: rgba(255, 255, 255, 0.1);
    margin: 3rem 0;
    
    /* Animación de entrada */
    opacity: 0;
    animation: pop-in-bouncy 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
    animation-delay: 0.6s;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin: 2rem 0;
}

th, td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

th {
    color: #A8C7FA;
}

.back-button {
    color: #A8C7FA;
    text-decoration: none;
    font-weight: 500;
    display: inline-block;
    margin-bottom: 2rem;

    /* Animación de entrada */
    opacity: 0;
    animation: pop-in-bouncy 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
    animation-delay: 0.1s;
}

/* --- Estilos del Formulario de Contacto --- */
.contact-form {
    margin-top: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    text-align: left; /* <-- Este era el culpable */

    /* Animación de entrada */
    opacity: 0;
    animation: pop-in-bouncy 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
    animation-delay: 0.7s;
}
.form-intro {
    text-align: center;
    color: #B0B0B0;
    margin-bottom: 1.5rem;
}
.form-group {
    display: flex;
    flex-direction: column;
}
.contact-form label {
    margin-bottom: 0.5rem;
    color: #B0B0B0;
}
.contact-form input,
.contact-form textarea {
    background-color: #2a2a2a;
    border: 1px solid #444;
    border-radius: 8px;
    padding: 12px;
    color: #E0E0E0;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}
.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: #A8C7FA;
}

/* --- NUEVO BOTÓN DE ENVIAR MENSAJE (BORDE ANIMADO) --- */
.send-message-button {
    margin-top: 1.5rem;
    padding: 14px 28px;
    background-color: #2a2a2a; /* Fondo oscuro */
    color: #E0E0E0; /* Texto claro */
    border: 2px solid transparent; /* Borde transparente inicial */
    border-radius: 50px;
    text-decoration: none;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    align-self: center;
    
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    text-align: center; /* <-- ESTA ES LA CORRECCIÓN */

    position: relative; /* Necesario para el borde animado */
    overflow: hidden; /* Contiene los pseudo-elementos */
    
    transition: all 0.3s ease;
}

/* Pseudo-elemento para el fondo del borde */
.send-message-button::before {
    content: '';
    position: absolute;
    top: -50%; left: -50%;
    width: 200%; height: 200%;
    background: conic-gradient(
        from 0deg,
        #A8C7FA, #C6A7FC, #A8C7FA
    );
    animation: rotate-gradient 4s linear infinite; /* Animación de rotación */
    z-index: 1; /* Detrás del contenido */
}

/* Pseudo-elemento para tapar el fondo y crear el efecto de "borde" */
.send-message-button::after {
    content: '';
    position: absolute;
    top: 2px; left: 2px;
    right: 2px; bottom: 2px;
    background-color: #2a2a2a; /* Mismo color que el fondo del botón */
    border-radius: 50px; /* Borde interior */
    z-index: 2; /* Encima del fondo, detrás del texto */
}

/* Contenido del botón (texto e icono) */
.send-message-button span,
.send-message-button i {
    position: relative;
    z-index: 3; /* Encima de todo */
    color: #E0E0E0;
    transition: color 0.3s ease;
}

.send-message-button i {
    width: 20px;
    height: 20px;
    stroke-width: 2.5;
}

.send-message-button:hover {
    box-shadow: 0 0 25px rgba(168, 199, 250, 0.4); /* Sombra brillante */
    animation-play-state: running; /* Acelera la animación */
}

.send-message-button:hover span,
.send-message-button:hover i {
    color: #fff; /* Texto más brillante */
}

.send-message-button:hover::before {
    animation-duration: 2s; /* Rotación más rápida al pasar el ratón */
}
/* -------------------------------------- */


/* --- Estilos para el Pie de Página (Footer AVANZADO) --- */
.advanced-footer {
    width: 100%;
    background-color: #111;
    color: #E0E0E0;
    padding: 2.5rem 2rem 1rem;
    border-top: 1px solid #333;
    flex-shrink: 0;
    text-align: center;
}

.footer-grid-container {
    display: grid;
    grid-template-columns: 1fr; 
    gap: 2rem;
    max-width: 1000px;
    margin: 0 auto 2rem auto;
    text-align: center; 
}

@media (min-width: 768px) {
    .footer-grid-container {
        grid-template-columns: 2fr 1fr 1fr; 
        text-align: left; 
    }
}

.footer-section h3 {
    background: linear-gradient(135deg, #A8C7FA, #C6A7FC);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-size: 1.3rem;
    margin-bottom: 1rem;
    text-align: center; 
}

@media (min-width: 768px) {
    .footer-section h3 {
        text-align: left; 
    }
    .footer-section.footer-brand h3 {
        text-align: left;
    }
}

.footer-section.footer-brand h3 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.footer-section.footer-brand p {
    color: #B0B0B0;
    font-size: 0.9rem;
    margin: 0;
    text-align: center; 
}

@media (min-width: 768px) {
    .footer-section.footer-brand p {
        text-align: left; 
    }
}


.footer-section ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-section ul li a {
    color: #B0B0B0;
    text-decoration: none;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    display: block;
    transition: color 0.3s ease;
}

.footer-section ul li a:hover {
    color: #A8C7FA;
}

.footer-section.footer-social .social-icons {
    display: flex;
    justify-content: center; 
    gap: 1.5rem;
    margin-top: 1rem;
}

@media (min-width: 768px) {
    .footer-section.footer-social .social-icons {
        justify-content: flex-start; 
    }
}


.social-icons a {
    color: #888;
    transition: color 0.3s ease, transform 0.3s ease;
}

.social-icons .si {
    font-size: 24px; 
}

.social-icons a:hover {
    color: #A8C7FA;
    transform: translateY(-3px);
}

.footer-bottom {
    border-top: 1px solid #222;
    padding-top: 1rem;
    margin-top: 2rem;
    font-size: 0.8rem;
    color: #666;
}

/* --- NUEVAS ANIMACIONES --- */
@keyframes pop-in-bouncy {
    0% {
        opacity: 0;
        transform: scale(0.8) translateY(20px);
    }
    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* Animación de rotación para el borde */
@keyframes rotate-gradient {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}


/* Media Queries para Responsive Design */
@media (max-width: 767px) {
    main {
        padding: 1rem;
    }

    .menu-container h1 {
        font-size: 2rem;
    }

    .menu-subtitle {
        font-size: 1rem;
        margin-bottom: 2rem;
    }

    .menu-button {
        padding: 1rem;
    }

    .menu-button h2 {
        font-size: 1.3rem;
    }

    .menu-button p {
        font-size: 0.9rem;
    }

    .content-wrapper {
        padding: 1rem;
    }

    .content-wrapper h1 {
        font-size: 2rem;
    }

    .content-wrapper h2 {
        font-size: 1.5rem;
    }

    .back-button {
        margin-bottom: 1.5rem;
        font-size: 0.9rem;
    }

    .contact-form {
        margin-top: 1rem;
        gap: 1rem;
    }

    .contact-form label {
        font-size: 0.9rem;
    }

    .contact-form input,
    .contact-form textarea {
        padding: 10px;
        font-size: 0.9rem;
    }

    .send-message-button {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
}

