/* ==========================================================================
   FOOTER - Layout Base
   ========================================================================== */
.site-footer {
    background-color: var(--color-primary);
    color: var(--color-text-inverse);
    padding: 3rem 0 1.5rem;
    margin-top: 0;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-col {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.footer-brand {
    color: var(--color-text-on-primary);
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.footer-desc {
    font-size: 0.9rem;
    line-height: 1.6;
    color: var(--color-text-muted);
    margin: 0;
}

/* ==========================================================================
   FOOTER - Links y Contact Info (Mejora de legibilidad)
   ========================================================================== */
.footer-contact a {
    color: var(--color-text-on-primary) !important;
    text-decoration: none;
    transition: color var(--transition-fast);
    font-weight: 500;
}

.footer-contact a:hover {
    color: var(--color-accent) !important;
    text-decoration: underline;
}

/* Link de teléfono en columna 1 */
.footer-col > a[href^="tel:"],
.footer-col > a[href^="mailto:"] {
    display: block;
    color: var(--color-text-on-primary) !important;
    text-decoration: none;
    margin: 0.5rem 0;
    font-weight: 500;
    transition: color var(--transition-fast);
}

.footer-col > a[href^="tel:"]:hover,
.footer-col > a[href^="mailto:"]:hover {
    color: var(--color-accent) !important;
}

/* Dirección */
.footer-col > span {
    display: block;
    color: rgba(255, 255, 255, 0.8);
    margin: 0.5rem 0;
    line-height: 1.5;
}

/* ==========================================================================
   FOOTER - Redes Sociales
   ========================================================================== */
.footer-social {
    display: flex;
    gap: 1rem;
    margin-top: 0.5rem;
}

.footer-social a {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: rgba(255, 255, 255, 0.7);
    transition: all var(--transition-normal);
    text-decoration: none;
}

.footer-social a:hover {
    background: var(--color-accent);
    color: var(--color-text-on-accent);
    transform: translateY(-2px);
}

.footer-social svg {
    width: 18px;
    height: 18px;
}

/* ==========================================================================
   FOOTER - Títulos y Listas
   ========================================================================== */
.footer-col h4 {
    color: var(--color-text-on-primary);
    font-size: 1.1rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.footer-links,
.footer-contact {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li,
.footer-contact li {
    margin-bottom: 0.5rem;
}

.footer-links a,
.footer-contact a,
.footer-contact span {
    color: var(--color-text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color var(--transition-normal);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.footer-links a:hover,
.footer-contact a:hover {
    color: var(--color-accent);
}

.footer-contact svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

/* ==========================================================================
   FOOTER - Newsletter
   ========================================================================== */
.footer-newsletter {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.footer-newsletter input {
    flex: 1;
    padding: 0.6rem 1rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.1);
    color: var(--color-text-on-primary);
    border-radius: var(--radius);
    font-size: 0.9rem;
}

.footer-newsletter input::placeholder {
    color: var(--color-text-muted);
}

.footer-newsletter .btn {
    padding: 0.6rem 1.25rem;
    font-size: 0.9rem;
    white-space: nowrap;
}

/* ==========================================================================
   FOOTER - Barra Inferior
   ========================================================================== */
.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-bottom p,
.footer-bottom a {
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    font-size: 0.875rem;
}

.footer-bottom a:hover {
    color: var(--color-text-on-primary);
    text-decoration: underline;
}

.footer-legal {
    display: flex;
    gap: 1.5rem;
}

.footer-legal a {
    color: var(--color-text-muted);
    text-decoration: none;
    font-size: 0.85rem;
    transition: color var(--transition-normal);
}

.footer-legal a:hover {
    color: var(--color-accent);
}

/* ==========================================================================
   FOOTER - Logo Dinámico
   ========================================================================== */
.footer-logo {
    margin-bottom: 1rem;
}

.footer-logo img {
    max-width: 180px;
    height: auto;
    display: block;
    /* Sin filtros de color: el logo conserva sus colores en cualquier fondo */
    transition: transform 0.3s ease, filter 0.3s ease;
}

/* Resaltado neutro (no depende del color del footer): leve zoom + sombra */
.footer-logo img:hover {
    transform: scale(1.04);
    filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.35));
}

/* ==========================================================================
   FOOTER - Responsive
   ========================================================================== */
@media (max-width: 1024px) {
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .footer-logo img {
        max-width: 140px;
    }
}

@media (max-width: 640px) {
    .footer-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }
    
    .footer-legal {
        justify-content: center;
    }
}

/* Language selector en footer */
.footer-language {
    margin-top: 1rem;
}

.footer-language .language-selector__toggle {
    color: white;
    border-color: rgba(255, 255, 255, 0.3);
}

.footer-language .language-selector__toggle:hover {
    background: rgba(255, 255, 255, 0.1);
}