/* ============================================================
   ARQUIVO: footer.css
   FUNÇÃO: Estilos do rodapé, widgets e copyright
   
   CUSTOMIZAÇÕES DISPONÍVEIS NO PAINEL:
   - Cor de Fundo do Footer (--footer-bg-color)
   - Cor de Texto do Footer (--footer-text-color)
   - Cor de Fundo dos Links ao Hover (--footer-link-hover-bg)
   - Cor de Texto dos Links ao Hover (--footer-link-hover-color)
   
   Acesse: Aparência → Personalizar → Cores
   ============================================================ */

.site-footer {
    background: var(--footer-bg-color, var(--bg-dark));
    color: var(--footer-text-color, var(--text-white));
    margin-top: var(--spacing-2xl);
    border-radius: 40px 40px 0 0; /* Bordas superiores arredondadas */
    overflow: hidden; /* Garante que o conteúdo respeite as bordas */
    box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.15); /* Sombra sutil superior */
}

/* ============================================================
   FOOTER MAIN
   ============================================================ */

.footer-main {
    padding: var(--spacing-2xl) 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
}

/* Efeito decorativo no topo do footer */
.footer-main::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--primary-light));
    border-radius: var(--radius-full);
}

.footer-brand {
    margin-bottom: var(--spacing-xl);
    margin-top: var(--spacing-md); /* Espaço para a linha decorativa */
    text-align: center;
}

.footer-logo {
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
}

.footer-logo img {
    max-height: 60px;
    width: auto;
    margin-bottom: var(--spacing-md);
    display: block;
}

.footer-description {
    max-width: 600px;
    margin: 0 auto;
    color: var(--footer-text-color, rgba(255, 255, 255, 0.7));
    font-size: var(--font-sm);
    line-height: 1.6;
    opacity: 0.7;
}

/* ============================================================
   FOOTER WIDGETS
   ============================================================ */

.footer-widgets {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--spacing-xl);
    margin-top: var(--spacing-xl);
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

@media (min-width: 1400px) {
    .footer-widgets {
        max-width: 1400px;
    }
}

.footer-widget-column {
    min-width: 0;
}

.footer-widget-title {
    color: var(--footer-text-color, var(--text-white));
    font-size: var(--font-lg);
    font-weight: 700;
    margin-bottom: var(--spacing-md);
    padding-bottom: var(--spacing-sm);
    border-bottom: 2px solid var(--primary-color);
    display: inline-block;
    position: relative;
}

.footer-widget-title::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 50%;
    height: 2px;
    background: var(--primary-light);
    opacity: 0.5;
}

.footer-category-list,
.footer-links-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.footer-category-list li,
.footer-links-list li {
    margin-bottom: var(--spacing-sm);
}

.footer-category-list a,
.footer-links-list a {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--footer-text-color, rgba(255, 255, 255, 0.7));
    font-size: var(--font-sm);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: none;
    border: none;
    padding: 0.5rem 0.75rem;
    cursor: pointer;
    text-align: left;
    width: 100%;
    opacity: 0.85;
    border-radius: var(--radius-md);
    position: relative;
    overflow: hidden;
    font-weight: 500;
}

/* Efeito de brilho ao passar o mouse */
.footer-category-list a::before,
.footer-links-list a::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.5s;
}

.footer-category-list a:hover::before,
.footer-links-list a:hover::before {
    left: 100%;
}

.footer-category-list a:hover,
.footer-links-list a:hover {
    color: var(--footer-link-hover-color);
    transform: translateX(8px);
    opacity: 1;
    background: var(--footer-link-hover-bg);
    padding-left: 1rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

/* Animação do ícone de seta */
.footer-category-list a svg,
.footer-links-list a svg {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.footer-category-list a:hover svg,
.footer-links-list a:hover svg {
    transform: translateX(4px) scale(1.1);
}

.footer-category-list svg,
.footer-links-list svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    opacity: 0.7;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.footer-category-list a:hover svg,
.footer-links-list a:hover svg {
    opacity: 1;
    filter: drop-shadow(0 0 4px currentColor);
}

/* Efeito ao clicar */
.footer-category-list a:active,
.footer-links-list a:active {
    transform: translateX(6px) scale(0.98);
}

/* ============================================================
   FOOTER DISCLAIMER
   ============================================================ */

.footer-disclaimer {
    padding: var(--spacing-lg) 0;
    background: rgba(0, 0, 0, 0.25);
    backdrop-filter: blur(10px);
}

.disclaimer-content {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    gap: var(--spacing-md);
    padding: var(--spacing-md) var(--spacing-lg);
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.12), rgba(239, 68, 68, 0.06));
    border-left: 4px solid var(--warning-color);
    border-radius: var(--radius-lg);
    max-width: 1200px;
    margin: 0 auto;
    text-align: left;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    transition: all var(--transition-base);
}

.disclaimer-content:hover {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.15), rgba(239, 68, 68, 0.08));
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.disclaimer-icon {
    flex-shrink: 0;
    color: var(--warning-color);
    width: 24px;
    height: 24px;
    margin-top: 0.125rem;
}

.disclaimer-text {
    flex: 1;
    font-size: var(--font-sm);
    line-height: 1.6;
    color: var(--footer-text-color, rgba(255, 255, 255, 0.9));
    margin: 0;
    opacity: 0.9;
}

.disclaimer-text strong {
    font-weight: 700;
    color: var(--footer-text-color, var(--text-white));
}

.disclaimer-link {
    color: var(--primary-light);
    text-decoration: underline;
    margin-left: 0.25rem;
}

.disclaimer-link:hover {
    color: var(--footer-text-color, var(--text-white));
}

/* ============================================================
   FOOTER BOTTOM
   ============================================================ */

.footer-bottom {
    padding: var(--spacing-lg) 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.4));
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-bottom-inner {
    text-align: center;
}

.copyright {
    margin: 0;
    font-size: var(--font-sm);
    color: var(--footer-text-color, rgba(255, 255, 255, 0.7));
    opacity: 0.7;
    letter-spacing: 0.3px;
}

/* ============================================================
   BACK TO TOP
   ============================================================ */

.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 50px;
    height: 50px;
    background: var(--primary-color);
    color: var(--text-white);
    border: none;
    border-radius: var(--radius-full);
    box-shadow: var(--shadow-lg);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all var(--transition-base);
    z-index: 999;
}

.back-to-top::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: var(--radius-full);
    background: var(--primary-color);
    animation: pulse-ring 2s cubic-bezier(0.455, 0.03, 0.515, 0.955) infinite;
    opacity: 0;
}

@keyframes pulse-ring {
    0% {
        transform: scale(1);
        opacity: 0.5;
    }
    50% {
        opacity: 0.3;
    }
    100% {
        transform: scale(1.5);
        opacity: 0;
    }
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    background: var(--primary-dark);
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
}

.back-to-top:active {
    transform: translateY(-3px) scale(1);
}

.back-to-top svg {
    width: 24px;
    height: 24px;
}

/* ============================================================
   RESPONSIVIDADE
   ============================================================ */

@media (max-width: 992px) {
    .footer-widgets {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--spacing-lg);
    }
}

@media (max-width: 768px) {
    .site-footer {
        border-radius: 24px 24px 0 0; /* Bordas menores no mobile */
    }
    
    .footer-main {
        padding: var(--spacing-xl) 0;
    }
    
    .footer-main::before {
        width: 60px; /* Linha decorativa menor no mobile */
        height: 3px;
    }
    
    /* Garantir padding interno adequado no container do footer */
    .footer-main .container,
    .footer-disclaimer .container,
    .footer-bottom .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    .footer-widgets {
        grid-template-columns: 1fr;
        gap: var(--spacing-lg);
    }
    
    .footer-description {
        padding: 0 1rem;
    }
    
    .disclaimer-content {
        flex-direction: column;
        gap: var(--spacing-sm);
        text-align: center;
        padding: var(--spacing-md) 1rem;
        margin: 0 0.5rem;
    }
    
    .disclaimer-text {
        padding: 0 0.5rem;
    }
    
    .disclaimer-icon {
        margin: 0 auto;
    }
    
    .footer-bottom-inner {
        flex-direction: column;
        text-align: center;
        padding: 0 0.5rem;
    }
    
    .copyright {
        padding: 0 0.5rem;
    }
    
    .back-to-top {
        bottom: 1rem;
        right: 1rem;
        width: 45px;
        height: 45px;
    }
}

/* Forçar exibição do ícone no botão back-to-top */
.back-to-top svg,
.back-to-top i {
    display: block !important;
    width: 24px;
    height: 24px;
    color: white;
    stroke: white;
    fill: none;
    stroke-width: 2;
    position: relative;
    z-index: 1; /* Garante que o ícone fique acima da animação de pulso */
}
