/* --- VARIÁVEIS LOCAIS DO FOOTER --- */
:root {
    --footer-bg: #111111;
    --footer-text: #ffffff;
    --footer-text-muted: #a0a0a0;
    --footer-accent: #d4af5b; /* Um toque dourado sutil para links */
    --footer-font: 'Montserrat', sans-serif;
}

/* --- LAYOUT GERAL --- */
#main-footer {
    background-color: var(--footer-bg);
    color: var(--footer-text);
    padding: 5rem 0 2rem;
    font-family: var(--footer-font);
    border-top: 1px solid rgba(255,255,255,0.1);
}

.footer-container {
    width: 90%;
    max-width: 1400px;
    margin: 0 auto;
}

.footer-main {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 3rem;
    margin-bottom: 4rem;
}

/* --- COLUNAS & TIPOGRAFIA --- */
.footer-column h4 {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 1.5rem;
    color: var(--footer-text-muted);
    font-weight: 600;
}

/* LOGO */
.footer-logo {
    text-decoration: none;
    display: block;
    margin-bottom: 1.5rem;
}

.logo-text {
    font-family: 'Playfair Display', serif;
    font-size: 2.5rem;
    color: var(--footer-text);
    letter-spacing: -1px;
}

/* TAGLINE ANIMADA (Replicada do Wonder) */
.footer-tagline {
    font-size: 1.1rem;
    line-height: 1.6;
    font-family: 'Playfair Display', serif;
    color: var(--footer-text);
    opacity: 0; /* Começa invisível para a animação */
    transition: opacity 0.5s ease;
}

.footer-tagline span {
    display: inline-block;
    opacity: 0;
    transform: translateY(15px);
    transition: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* Estado Animado (Ativado via JS) */
.footer-tagline.is-animated { opacity: 1; }
.footer-tagline.is-animated span { opacity: 1; transform: translateY(0); }

/* Atrasos em cascata para cada palavra */
.footer-tagline.is-animated span:nth-child(1) { transition-delay: 0.1s; }
.footer-tagline.is-animated span:nth-child(2) { transition-delay: 0.15s; }
.footer-tagline.is-animated span:nth-child(3) { transition-delay: 0.2s; }
.footer-tagline.is-animated span:nth-child(4) { transition-delay: 0.25s; }
.footer-tagline.is-animated span:nth-child(5) { transition-delay: 0.3s; }
.footer-tagline.is-animated span:nth-child(6) { transition-delay: 0.35s; }
.footer-tagline.is-animated span:nth-child(7) { transition-delay: 0.4s; }
.footer-tagline.is-animated span:nth-child(8) { transition-delay: 0.45s; }

/* --- LINKS --- */
.footer-column ul {
    list-style: none;
    padding: 0;
}

.footer-column ul li {
    margin-bottom: 0.8rem;
}

.footer-column a {
    text-decoration: none;
    color: var(--footer-text);
    font-size: 0.95rem;
    transition: color 0.3s ease, padding-left 0.3s ease;
    position: relative;
}

.footer-column a:hover {
    color: var(--footer-text-muted);
    padding-left: 5px; /* Efeito de movimento sutil */
}

/* --- CONTACTOS E SOCIAL --- */
.footer-contact-link {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 1rem;
    color: var(--footer-text);
    text-decoration: none;
    font-size: 0.95rem;
}

.footer-contact-link:hover {
    color: var(--footer-text-muted);
}

.footer-social {
    margin-top: 2rem;
}

.social-icons {
    display: flex;
    gap: 15px;
}

.social-icons a {
    color: var(--footer-text);
    transition: transform 0.3s, color 0.3s;
}

.social-icons a:hover {
    transform: translateY(-3px);
    color: var(--footer-text-muted);
    padding-left: 0; /* Remove padding do hover padrão de links */
}

/* --- LEGAL / LIVRO RECLAMAÇÕES --- */
.footer-legal {
    margin-top: 2rem;
}

.complaints-book-link {
    display: inline-block;
    width: 140px;
    height: auto;
    background-color: transparent;
    
    /* Remove a transição de padding que afeta os outros links */
    transition: none !important; 
}

.complaints-book-link img {
    width: 100%;
    height: auto;
    display: block;
    
    /* Mantém sempre cinza */
    filter: grayscale(100%);
    opacity: 1; 
}

/* Impede que o padding seja adicionado no hover */
.footer-column .complaints-book-link:hover {
    padding-left: 0 !important;
    transform: none !important;
    opacity: 1 !important;
}

/* --- RODAPÉ INFERIOR --- */
.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 2rem;
    font-size: 0.85rem;
    color: var(--footer-text-muted);
    
    /* FLEXBOX PARA SEPARAR OS ITENS */
    display: flex;
    justify-content: space-between; /* Um à esquerda, outro à direita */
    align-items: center;
    flex-wrap: wrap; /* Permite quebra de linha em ecrãs pequenos */
    gap: 1rem;
}

.footer-bottom p {
    margin: 0;
}

/* Estilo do Link do Criador */
.creator a {
    color: var(--footer-text);
    font-weight: 600;
    text-decoration: none;
    transition: color 0.3s ease;
}

.creator a:hover {
    color: var(--footer-accent); /* Usa a cor dourada definida nas variáveis */
}

/* --- RESPONSIVIDADE --- */
@media (max-width: 768px) {
    .footer-main {
        gap: 2.5rem;
        text-align: center;
    }
    
    .social-icons, 
    .footer-contact-link {
        justify-content: center;
    }
    
    .footer-column a:hover {
        padding-left: 0;
    }

    /* Ajuste para o rodapé inferior em Mobile */
    .footer-bottom {
        flex-direction: column; /* Empilha verticalmente em telemóveis */
        justify-content: center;
        text-align: center;
    }
}