/**
 * Estilos para el footer
 * @package HumoSagrado
 */

/* Variables CSS */
:root {
    --footer-bg: #1a1a1a;
    --footer-text: #e0e0e0;
    --footer-text-muted: #a0a0a0;
    --footer-border: #333;
    --footer-accent: #3D1A24;
    --footer-accent-rgb: 61, 26, 36;
    --footer-link-hover: var(--footer-accent);
    --newsletter-bg: var(--footer-accent);
    --newsletter-text: white;
    --footer-spacing: 3rem;
    --footer-column-gap: 2rem;
}

/* Footer principal */
.site-footer {
    background: var(--footer-bg);
    color: var(--footer-text);
    margin-top: auto;
}

/* Sección de newsletter */
.footer-newsletter {
    background: var(--newsletter-bg);
    color: var(--newsletter-text);
    padding: var(--footer-spacing) 0;
    position: relative;
    overflow: hidden;
}

.footer-newsletter::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0.05) 100%);
    pointer-events: none;
}

.newsletter-content {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 2rem;
    align-items: center;
    position: relative;
    z-index: 1;
}

.newsletter-text h3 {
    font-size: 1.75rem;
    font-weight: 700;
    margin: 0 0 0.5rem 0;
    color: var(--newsletter-text);
}

.newsletter-text p {
    font-size: 1.1rem;
    margin: 0;
    opacity: 0.9;
    line-height: 1.5;
}

/* Formulario de newsletter */
.newsletter-form {
    min-width: 400px;
}

.newsletter-signup .form-group {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.newsletter-signup input[type="email"],
.newsletter-signup input[type="date"] {
    flex: 1;
    min-width: 200px;
    padding: 0.875rem 1rem;
    border: 2px solid rgba(255,255,255,0.2);
    border-radius: 8px;
    background: rgba(255,255,255,0.1);
    color: var(--newsletter-text);
    font-size: 1rem;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.newsletter-signup input[type="email"]:focus,
.newsletter-signup input[type="date"]:focus {
    outline: none;
    border-color: rgba(255,255,255,0.5);
    background: rgba(255,255,255,0.15);
    box-shadow: 0 0 0 3px rgba(255,255,255,0.1);
}

.newsletter-signup input::placeholder {
    color: rgba(255,255,255,0.7);
}

.newsletter-signup .btn {
    padding: 0.875rem 2rem;
    background: rgba(255,255,255,0.2);
    color: var(--newsletter-text);
    border: 2px solid rgba(255,255,255,0.3);
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    white-space: nowrap;
}

.newsletter-signup .btn:hover {
    background: rgba(255,255,255,0.3);
    border-color: rgba(255,255,255,0.5);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.privacy-text,
.help-text {
    font-size: 0.85rem;
    opacity: 0.8;
    line-height: 1.4;
    margin: 0.5rem 0 0 0;
}

.privacy-text a,
.help-text a {
    color: var(--newsletter-text);
    text-decoration: underline;
    text-decoration-color: rgba(255,255,255,0.5);
    transition: text-decoration-color 0.3s ease;
}

.privacy-text a:hover,
.help-text a:hover {
    text-decoration-color: var(--newsletter-text);
}

/* Contenido principal del footer */
.footer-main {
    padding: var(--footer-spacing) 0;
    border-bottom: 1px solid var(--footer-border);
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--footer-column-gap);
}

.footer-column {
    display: flex;
    flex-direction: column;
}

.footer-column h4,
.footer-column h5 {
    color: var(--footer-text);
    font-weight: 600;
    margin: 0 0 1.5rem 0;
    font-size: 1.1rem;
    position: relative;
    padding-bottom: 0.5rem;
}

.footer-column h4::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 30px;
    height: 2px;
    background: var(--footer-accent);
    border-radius: 1px;
}

.footer-column p {
    color: var(--footer-text-muted);
    line-height: 1.6;
    margin-bottom: 1rem;
}

/* Columna About */
.footer-about p {
    margin-bottom: 1.5rem;
}

.footer-logo-animated {
    margin-top: 1rem;
}

.animated-logo {
    animation: logoFloat 3s ease-in-out infinite;
}

.logo-circle {
    animation: logoRotate 8s linear infinite;
}

.logo-flame {
    animation: logoFlame 2s ease-in-out infinite alternate;
}

@keyframes logoFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

@keyframes logoRotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes logoFlame {
    0% { opacity: 0.8; }
    100% { opacity: 1; }
}

/* Menú del footer */
.footer-menu {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.footer-menu li {
    margin: 0;
}

.footer-menu a {
    color: var(--footer-text-muted);
    text-decoration: none;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    padding: 0.25rem 0;
    position: relative;
}

.footer-menu a::before {
    content: '';
    width: 0;
    height: 2px;
    background: var(--footer-link-hover);
    position: absolute;
    bottom: 0;
    left: 0;
    transition: width 0.3s ease;
}

.footer-menu a:hover {
    color: var(--footer-link-hover);
    transform: translateX(5px);
}

.footer-menu a:hover::before {
    width: 100%;
}

/* Información de contacto */
.contact-info {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 0;
    color: var(--footer-text-muted);
}

.contact-item svg {
    color: var(--footer-accent);
    flex-shrink: 0;
}

.contact-item a {
    color: var(--footer-text-muted);
    text-decoration: none;
    transition: color 0.3s ease;
}

.contact-item a:hover {
    color: var(--footer-link-hover);
}

/* Horarios de negocio */
.business-hours {
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: rgba(255,255,255,0.05);
    border-radius: 8px;
    border-left: 3px solid var(--footer-accent);
}

.business-hours h5 {
    margin: 0 0 0.5rem 0;
    color: var(--footer-text);
    font-size: 0.9rem;
}

.business-hours p {
    margin: 0;
    font-size: 0.9rem;
}

/* Redes sociales */
.social-links {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 2rem;
}

.social-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: rgba(255,255,255,0.05);
    color: var(--footer-text-muted);
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s ease;
    border: 1px solid rgba(255,255,255,0.1);
}

.social-link:hover {
    background: rgba(255,255,255,0.1);
    color: var(--footer-text);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.social-link svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

.social-label {
    font-size: 0.9rem;
    font-weight: 500;
}

/* Métodos de pago */
.payment-methods {
    margin-top: 1.5rem;
}

.payment-methods h5 {
    margin: 0 0 1rem 0;
    font-size: 0.9rem;
}

.payment-icons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.payment-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 28px;
    background: rgba(255,255,255,0.1);
    border-radius: 4px;
    font-size: 1.2rem;
    transition: all 0.3s ease;
    border: 1px solid rgba(255,255,255,0.2);
}

.payment-icon:hover {
    background: rgba(255,255,255,0.2);
    transform: scale(1.05);
}

/* Footer bottom */
.footer-bottom {
    padding: 1.5rem 0;
    background: rgba(0,0,0,0.3);
}

.footer-bottom-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.copyright p {
    margin: 0;
    color: var(--footer-text-muted);
    font-size: 0.9rem;
}

.legal-links {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.legal-links li {
    margin: 0;
}

.legal-links a {
    color: var(--footer-text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.legal-links a:hover {
    color: var(--footer-link-hover);
}

/* Pop-up de email */
.email-popup {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.email-popup.show {
    display: flex;
    opacity: 1;
}

.popup-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.7);
    backdrop-filter: blur(5px);
    z-index: 9998;
}

.popup-content {
    position: relative;
    background: #ffffff;
    border-radius: 12px;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    animation: popupSlideIn 0.3s ease-out;
    z-index: 10000;
}

@keyframes popupSlideIn {
    from {
        transform: translateY(-50px) scale(0.9);
        opacity: 0;
    }
    to {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

.popup-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 32px;
    height: 32px;
    border: none;
    background: rgba(0,0,0,0.1);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--text-muted);
    transition: all 0.3s ease;
    z-index: 1;
}

.popup-close:hover {
    background: rgba(0,0,0,0.2);
    color: var(--text-color);
}

.popup-body {
    padding: 2rem;
    text-align: center;
}

.popup-body h3 {
    font-size: 1.75rem;
    font-weight: 700;
    margin: 0 0 1rem 0;
    color: var(--text-color);
}

.popup-body p {
    color: var(--text-muted);
    margin-bottom: 2rem;
    line-height: 1.6;
}

.popup-form .form-group {
    margin-bottom: 1.5rem;
    text-align: left;
}

.popup-form label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-color);
}

.popup-form input {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.popup-form input:focus {
    outline: none;
    border-color: var(--footer-accent);
    box-shadow: 0 0 0 3px rgba(var(--footer-accent-rgb), 0.15);
}

.popup-form .btn {
    width: 100%;
    padding: 1rem;
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.popup-privacy {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin: 0;
    text-align: center;
}

.popup-privacy a {
    color: var(--footer-accent);
    text-decoration: none;
}

.popup-privacy a:hover {
    text-decoration: underline;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }
    
    .newsletter-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 1.5rem;
    }
    
    .newsletter-form {
        min-width: auto;
    }
}

@media (max-width: 768px) {
    :root {
        --footer-spacing: 2rem;
        --footer-column-gap: 1.5rem;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .newsletter-content {
        gap: 1rem;
    }
    
    .newsletter-text h3 {
        font-size: 1.5rem;
    }
    
    .newsletter-signup .form-group {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .newsletter-signup input[type="email"],
    .newsletter-signup input[type="date"] {
        min-width: auto;
    }
    
    .social-links {
        justify-content: center;
    }
    
    .footer-bottom-content {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
    
    .legal-links {
        justify-content: center;
        gap: 1rem;
    }
}

@media (max-width: 480px) {
    .footer-newsletter {
        padding: 1.5rem 0;
    }
    
    .footer-main {
        padding: 1.5rem 0;
    }
    
    .newsletter-text h3 {
        font-size: 1.25rem;
    }
    
    .newsletter-text p {
        font-size: 1rem;
    }
    
    .social-links {
        flex-direction: column;
        align-items: center;
    }
    
    .social-link {
        width: 100%;
        justify-content: center;
    }
    
    .payment-icons {
        justify-content: center;
    }
    
    .popup-body {
        padding: 1.5rem;
    }
    
    .popup-body h3 {
        font-size: 1.5rem;
    }
}

/* Modo oscuro */
@media (prefers-color-scheme: dark) {
    :root {
        --footer-bg: #0a0a0a;
        --footer-border: #222;
        --popup-bg: #1a1a1a;
        --popup-text: #e0e0e0;
        --popup-text-muted: #a0a0a0;
        --popup-border: #333;
        --popup-input-bg: #2a2a2a;
        --popup-close-bg: rgba(255,255,255,0.1);
        --popup-close-hover: rgba(255,255,255,0.2);
    }
    
    .popup-content {
        background: var(--popup-bg, #1a1a1a);
        color: var(--popup-text, #e0e0e0);
        border: 1px solid var(--popup-border, #333);
    }
    
    .popup-body h3 {
        color: var(--popup-text, #e0e0e0);
    }
    
    .popup-body p {
        color: var(--popup-text-muted, #a0a0a0);
    }
    
    .popup-form label {
        color: var(--popup-text, #e0e0e0);
    }
    
    .popup-form input {
        background: var(--popup-input-bg, #2a2a2a);
        border-color: var(--popup-border, #333);
        color: var(--popup-text, #e0e0e0);
    }
    
    .popup-form input:focus {
        border-color: var(--footer-accent);
        box-shadow: 0 0 0 3px rgba(var(--footer-accent-rgb), 0.25);
    }
    
    .popup-form input::placeholder {
        color: var(--popup-text-muted, #a0a0a0);
    }
    
    .popup-close {
        background: var(--popup-close-bg, rgba(255,255,255,0.1));
        color: var(--popup-text, #e0e0e0);
    }
    
    .popup-close:hover {
        background: var(--popup-close-hover, rgba(255,255,255,0.2));
        color: var(--popup-text, #e0e0e0);
    }
    
    .popup-privacy {
        color: var(--popup-text-muted, #a0a0a0);
    }
    
    .popup-privacy a {
        color: var(--footer-accent);
    }
}

/* Estilos de impresión */
@media print {
    .footer-newsletter,
    .email-popup,
    .social-links,
    .payment-methods {
        display: none !important;
    }
    
    .site-footer {
        background: white !important;
        color: black !important;
        border-top: 2px solid #000;
    }
    
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .footer-column h4,
    .footer-column h5 {
        color: black !important;
    }
    
    .footer-menu a,
    .contact-item,
    .contact-item a {
        color: black !important;
    }
    
    .footer-bottom {
        background: transparent !important;
    }
}

/* Accesibilidad */
@media (prefers-reduced-motion: reduce) {
    .animated-logo,
    .logo-circle,
    .logo-flame {
        animation: none;
    }
    
    .popup-content {
        animation: none;
    }
    
    * {
        transition-duration: 0.01ms !important;
    }
}

/* Alto contraste */
@media (prefers-contrast: high) {
    :root {
        --footer-text: #ffffff;
        --footer-text-muted: #cccccc;
        --footer-border: #666666;
    }
    
    .newsletter-signup input[type="email"],
    .newsletter-signup input[type="date"] {
        border-color: rgba(255,255,255,0.5);
    }
    
    .social-link,
    .payment-icon {
        border-color: rgba(255,255,255,0.3);
    }
}