
footer {
    width: 100% !important;
    max-width: none !important;
    margin-top: 3em;
    background-color: #000000;
    color: #ffffff;
    padding: 60px 40px 20px;
    position: relative;
    overflow: hidden;
    z-index: 10;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.5); /* Sombra sutil para destacar */
}

/* Patrón decorativo inspirado en textiles mexicanos */
footer::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        45deg,
        rgba(255, 196, 0, 0.1) 0%,
        rgba(255, 255, 255, 0.05) 50%,
        rgba(255, 69, 0, 0.1) 100%
    );
    opacity: 0.3;
    z-index: 0;
}

/* Animación de estrellas optimizada */
.stars {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    overflow: hidden; /* Evitar que las estrellas salgan del footer */
}

.stars span {
    position: absolute;
    width: 2px; /* Reducido para mejor rendimiento */
    height: 2px;
    background: #ffffff;
    border-radius: 50%;
    animation: twinkle 4s infinite ease-in-out; /* Animación más suave */
    opacity: 0.5;
}

/* Generar estrellas dinámicamente con pseudoelementos (ejemplo con ::after) */
.stars span:nth-child(1) { top: 10%; left: 5%; animation-delay: 0s; }
.stars span:nth-child(2) { top: 30%; left: 20%; animation-delay: 1s; }
.stars span:nth-child(3) { top: 50%; left: 70%; animation-delay: 2s; }
.stars span:nth-child(4) { top: 70%; left: 40%; animation-delay: 0.5s; }
.stars span:nth-child(5) { top: 90%; left: 85%; animation-delay: 1.5s; }

@keyframes twinkle {
    0% { opacity: 0.2; transform: scale(0.6); }
    50% { opacity: 0.9; transform: scale(1.2); }
    100% { opacity: 0.2; transform: scale(0.6); }
}

.footer-content {
    position: relative;
    z-index: 2;
    width: 100%; /* Ocupa el 100% del footer */
    max-width: 1400px; /* Aumentado para pantallas anchas */
    margin: 0 auto; /* Centrado */
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    padding: 0 20px; /* Padding interno para contenido */
}

.footer-logo img {
    height: 3em;
    width: auto;
    margin-bottom: 1rem;
}

.footer-logo p {
    font-size: 1rem;
    color: #d1d5db;
    max-width: 300px;
}

.footer-links h3,
.footer-contact h3,
.footer-newsletter h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: #ffc400;
    margin-bottom: 1rem;
}

.footer-links ul {
    list-style: none;
}

.footer-links ul li {
    margin-bottom: 0.75rem;
}

.footer-links ul li a {
    color: #ffffff;
    text-decoration: none;
    font-size: 1rem;
    transition: color 0.3s ease;
}

.footer-links ul li a:hover {
    color: #ff4500;
}

.footer-contact p {
    font-size: 1rem;
    color: #d1d5db;
    margin-bottom: 0.75rem;
}

.footer-social {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.footer-social a {
    display: inline-block;
}

.footer-social img {
    width: 30px;
    height: 30px;
    transition: transform 0.3s ease, filter 0.3s ease;
    filter: invert(100%);
}

.footer-social img:hover {
    transform: scale(1.2);
    filter: invert(60%) hue-rotate(60deg) saturate(3) brightness(1.2);
}

.footer-newsletter form {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
}

.footer-newsletter input {
    padding: 10px;
    font-size: 1rem;
    border: none;
    border-radius: 4px;
    width: 200px;
    outline: none;
}

.footer-newsletter button {
    padding: 10px 20px;
    background-color: #ffc400;
    color: #000000;
    font-weight: 600;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.footer-newsletter button:hover {
    background-color: #ff4500;
}

.footer-bottom {
    text-align: center;
    padding-top: 40px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: 40px;
    font-size: 0.875rem;
    color: #d1d5db;
    width: 100%; /* Asegura que ocupe el ancho completo */
}

/* Mobile Styles */
@media (max-width: 768px) {
    footer {
        padding: 40px 20px 20px;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .footer-logo img {
        height: 2.8em;
    }

    .footer-newsletter input {
        width: 100%;
    }

    .footer-social img {
        width: 28px;
        height: 28px;
    }
}

@media (max-width: 480px) {
    footer {
        padding: 30px 15px 15px;
    }

    .footer-logo img {
        height: 2.5em;
    }

    .footer-links h3,
    .footer-contact h3,
    .footer-newsletter h3 {
        font-size: 1.125rem;
    }

    .footer-social img {
        width: 25px;
        height: 25px;
    }
}