/**
 * Seção: Footer
 * 
 * ESPECIFICIDADE: 100% isolada com prefixo .footer
 * PADRÃO: CSS isolado sem conflitos
 * RESPONSIVIDADE: 991px, 768px, 576px
 * ACESSIBILIDADE: focus-visible, prefers-reduced-motion, print
 */

/* ===== CONTAINER PRINCIPAL ===== */
.footer {
    background: #ffffff;
    color: #333333;
    padding: 4rem 0 2rem;
    position: relative;
    overflow: hidden;
    border-top: 1px solid #e0e0e0;
}

.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--primary-light));
}

/* ===== BRAND/LOGO ===== */
.footer__brand {
    margin-bottom: 1.5rem;
}

.footer__brand img {
    max-height: 50px;
    width: auto;
    margin-bottom: 1rem;
}

.footer__brand p {
    color: #666666;
    margin: 0;
    line-height: 1.7;
    font-size: 0.95rem;
}

/* ===== TÍTULOS DAS SEÇÕES ===== */
.footer h5 {
    color: #222222;
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1.25rem;
    position: relative;
    padding-bottom: 0.75rem;
}

.footer h5::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 2px;
    background: var(--primary-color);
}

/* ===== CONTATO ===== */
.footer__contact {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.footer__contact p {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 0;
    color: #555555;
    font-size: 0.95rem;
    line-height: 1.6;
    transition: color 0.3s ease;
}

.footer__contact p i {
    width: 20px;
    color: var(--primary-color);
    flex-shrink: 0;
    text-align: center;
    font-size: 1rem;
}

.footer__contact p:hover {
    color: #222222;
}

.footer__contact a {
    color: #555555;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer__contact a:hover {
    color: var(--primary-color);
}

/* WhatsApp button específico */
.footer__contact .btn-success {
    background: #25d366;
    border-color: #25d366;
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.footer__contact .btn-success:hover {
    background: #1fb855;
    border-color: #1fb855;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.3);
}

.footer__contact .btn-success:focus-visible {
    outline: 3px solid rgba(37, 211, 102, 0.5);
    outline-offset: 2px;
}

/* ===== LINKS ===== */
.footer a {
    color: #555555;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer a:hover {
    color: var(--primary-color);
}

.footer a:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
    border-radius: 2px;
}

/* ===== REDES SOCIAIS ===== */
.footer__social {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-top: 1rem;
}

.footer__link--social {
    width: 45px;
    height: 45px;
    background: #f5f5f5;
    border-radius: 50%;
    color: #666666;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    border: 1px solid #e0e0e0;
}

.footer__link--social:hover {
    background: var(--primary-color);
    color: #ffffff !important;
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
    border-color: var(--primary-color);
}

.footer__link--social:focus-visible {
    outline: 3px solid var(--primary-color);
    outline-offset: 3px;
}

/* WhatsApp link específico */
.footer__link--social.whatsapp-link {
    background: #25d366;
    border-color: rgba(37, 211, 102, 0.3);
    color: #3f3f3f;
}

.footer__link--social.whatsapp-link:hover {
    background: #093a1b;
    border-color: #25d366;
    color: #25d366;
}

/* ===== NEWSLETTER (caso seja adicionada futuramente) ===== */
.footer__newsletter {
    margin-bottom: 1.5rem;
}

.footer__newsletter-form {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
}

.footer__newsletter-input {
    flex: 1;
    padding: 0.75rem 1rem;
    border: 1px solid #d0d0d0;
    border-radius: 4px;
    background: #ffffff;
    color: #333333;
    font-size: 0.95rem;
}

.footer__newsletter-input::placeholder {
    color: #999999;
}

.footer__newsletter-input:focus {
    outline: none;
    border-color: var(--primary-color);
    background: #ffffff;
}

.footer__newsletter-button {
    padding: 0.75rem 1.5rem;
    background: var(--primary-color);
    color: #ffffff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.footer__newsletter-button:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.footer__newsletter-button:focus-visible {
    outline: 3px solid var(--primary-color);
    outline-offset: 2px;
}

/* ===== DIVISOR ===== */
.footer__divider {
    border: none;
    border-top: 1px solid #e0e0e0;
    margin: 2rem 0 1.5rem;
}

/* ===== BOTTOM (Copyright e Links Legais) ===== */
.footer__text--copyright {
    color: #777777;
    margin: 0;
    font-size: 0.875rem;
    line-height: 1.6;
}

.footer__links--bottom {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
}

.footer__links--bottom a {
    color: #777777;
    text-decoration: none;
    font-size: 0.875rem;
    transition: color 0.3s ease;
    position: relative;
}

.footer__links--bottom a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--primary-color);
    transition: width 0.3s ease;
}

.footer__links--bottom a:hover {
    color: var(--primary-color);
}

.footer__links--bottom a:hover::after {
    width: 100%;
}

/* Divisor vertical entre links */
.footer__divider--vertical {
    color: #cccccc;
    font-size: 0.875rem;
    -webkit-user-select: none;
    user-select: none;
}

/* ===== CRÉDITOS (Desenvolvido por Tytotech) ===== */
.footer__credits-text {
    color: #999999;
    font-size: 0.8125rem;
    font-weight: 400;
    margin-right: 0.35rem;
}

.footer__credits-link {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    transition: opacity 0.3s ease;
    text-decoration: none !important;
}

.footer__credits-link:hover {
    opacity: 0.8;
}

.footer__credits-link:hover::after {
    width: 0 !important;
}

.footer__credits-link:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 4px;
    border-radius: 4px;
}

.footer__credits-logo {
    height: 20px;
    width: auto;
    max-width: 100px;
    object-fit: contain;
    display: block;
}


/* ===== RESPONSIVIDADE ===== */

/* Tablet Landscape */
@media (max-width: 991px) {
    .footer {
        padding: 3rem 0 1.5rem;
    }
    
    .footer h5 {
        font-size: 1rem;
        margin-bottom: 1rem;
    }
    
    .footer__brand img {
        max-height: 45px;
    }
    
    .footer__social {
        justify-content: flex-start;
    }
    
    .footer__link--social {
        width: 42px;
        height: 42px;
        font-size: 1rem;
    }
}

/* Tablet Portrait */
@media (max-width: 768px) {
    .footer {
        padding: 2.5rem 0 1.5rem;
    }
    
    .footer .col-lg-4 {
        text-align: center;
    }
    
    .footer__brand,
    .footer__contact,
    .footer__social {
        justify-content: center;
        align-items: center;
    }
    
    .footer h5::after {
        left: 50%;
        transform: translateX(-50%);
    }
    
    .footer__contact p {
        justify-content: center;
    }
    
    .footer__newsletter-form {
        flex-direction: column;
    }
    
    .footer__newsletter-button {
        width: 100%;
    }
    
    .footer .row.align-items-center > div {
        text-align: center !important;
    }
    
    .footer__links--bottom {
        justify-content: center;
    }
}

/* Mobile */
@media (max-width: 576px) {
    .footer {
        padding: 2rem 0 1rem;
    }
    
    .footer .col-lg-4 {
        margin-bottom: 2rem !important;
    }
    
    .footer h5 {
        font-size: 0.95rem;
    }
    
    .footer__brand img {
        max-height: 40px;
    }
    
    .footer__brand p,
    .footer__contact p,
    .footer__text--copyright {
        font-size: 0.85rem;
    }
    
    .footer__link--social {
        width: 38px;
        height: 38px;
        font-size: 0.9rem;
    }
    
    .footer__social {
        gap: 0.5rem;
    }
    
    .footer__links--bottom {
        flex-direction: column;
        gap: 0.75rem;
        align-items: center;
    }
    
    .footer__links--bottom a {
        font-size: 0.8rem;
    }
    
    .footer__divider {
        margin: 1.5rem 0 1rem;
    }
    
    .footer__divider--vertical {
        display: none;
    }
    
    .footer__credits-text {
        font-size: 0.75rem;
    }
    
    .footer__credits-logo {
        height: 18px;
    }
}

/* ===== ACESSIBILIDADE ===== */

/* Reduzir animações para usuários com preferência */
@media (prefers-reduced-motion: reduce) {
    .footer * {
        transition: none !important;
        animation: none !important;
    }
    
    .footer__link--social:hover {
        transform: none;
    }
    
    .footer__contact .btn-success:hover {
        transform: none;
    }
    
    .footer__newsletter-button:hover {
        transform: none;
    }
}

/* Melhorar contraste para leitores de tela */
@media (prefers-contrast: high) {
    .footer {
        background: #ffffff;
        color: #000000;
        border-top: 2px solid #000000;
    }
    
    .footer h5 {
        color: #000000;
    }
    
    .footer__brand p,
    .footer__contact p,
    .footer a {
        color: #000000;
    }
    
    .footer__text--copyright,
    .footer__links--bottom a {
        color: #000000;
    }
    
    .footer__link--social {
        background: #f0f0f0;
        border-color: #000000;
        color: #000000;
    }
    
    .footer__link--social:hover {
        background: #000000;
        color: #ffffff;
    }
}

/* ===== PRINT STYLES ===== */
@media print {
    .footer {
        background: #ffffff !important;
        color: #000000 !important;
        padding: 1rem 0;
        border-top: 1px solid #000000;
    }
    
    .footer::before {
        display: none;
    }
    
    .footer__link--social,
    .footer__newsletter,
    .footer__contact .btn-success {
        display: none !important;
    }
    
    .footer h5 {
        color: #000000 !important;
        border-bottom: 1px solid #000000;
    }
    
    .footer h5::after {
        display: none;
    }
    
    .footer__brand p,
    .footer__contact p,
    .footer__text--copyright,
    .footer a {
        color: #000000 !important;
    }
    
    .footer__divider {
        border-color: #cccccc !important;
    }
    
    .footer__links--bottom a::after {
        display: none;
    }
    
    .footer__contact p i {
        color: #666666 !important;
    }
}
