/**
 * ========================================
 * FOOTER ELEGANTE & OTIMIZADO - UX/UI
 * Design moderno, responsivo e intuitivo
 * ========================================
 */

/* ===== CSS CUSTOM PROPERTIES ===== */
:root {
    --footer-bg-primary: #2D1B4E;
    --footer-bg-gradient-start: #5D3E8B;
    --footer-bg-gradient-end: #3D2461;
    --footer-text-primary: #eccdf5de;
    /* LIGHT COLOR FOR CONTRAST */
    --footer-text-secondary: #be8acede;
    /* LIGHT COLOR FOR CONTRAST */
    --footer-text-light: #be8acede;
    --footer-text-white: #eccdf5de;
    --footer-accent: #B680D8;
    /* Slightly brighter accent */
    --footer-accent-hover: #9370DB;
    --footer-accent-gradient: linear-gradient(135deg, #B680D8 0%, #6A4C93 100%);
    --footer-border: rgba(255, 255, 255, 0.1);
    /* Lighter border for dark BG */
    --footer-spacing-xs: 8px;
    --footer-spacing-sm: 12px;
    --footer-spacing-md: 16px;
    --footer-spacing-lg: 24px;
    --footer-spacing-xl: 32px;
    --footer-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --footer-main-spacing: 60px;
}

/* ===== MAIN SPACING RULE - Único ponto de controle para espaçamento ===== */
main {
    padding-bottom: var(--footer-main-spacing, 200px) !important;
    margin-bottom: 0 !important;
}

/* ===== FOOTER MAIN STYLES ===== */
footer,
.footer-public {
    position: relative !important;
    top: auto !important;
    bottom: auto !important;
    width: 100% !important;
    z-index: 100 !important;
    display: block !important;
    visibility: visible !important;
    background:
        /* Orbes de luz radiais - Movidos para longe do topo para evitar cortes */
        radial-gradient(circle at 15% 97%, rgba(166, 94, 202, 0.45) 0%, transparent 9%),
        radial-gradient(circle at 85% 25%, rgba(233, 195, 250, 0.35) 0%, transparent 5%),
        /* Gradiente de integração ultra-suave com o BG da página */
        linear-gradient(to bottom,
            rgba(255, 255, 255, 0) 0px,
            rgba(255, 255, 255, 0) 100px,
            rgba(166, 94, 202, 0.2) 200px,
            rgba(110, 50, 160, 0.9) 60%,
            rgba(45, 27, 78, 1) 90%,
            rgba(15, 10, 30, 1) 100%) !important;
    color: var(--footer-text-white) !important;
    /* LIGHT BY DEFAULT */
    padding: 160px var(--footer-spacing-lg, 24px) var(--footer-spacing-xl, 32px) !important;
    margin-top: 0 !important;
    flex-shrink: 0;
    overflow: hidden !important;
    box-sizing: border-box;
}

/* Otimização do ruído (noise) para também ser transparente no topo */
footer::before,
.footer-public::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
    opacity: 0.05;
    pointer-events: none;
    z-index: 1;
    mask-image: linear-gradient(to bottom, transparent, black 40%);
    -webkit-mask-image: linear-gradient(to bottom, transparent, black 40%);
}

/* ===== FOOTER CONTAINER ===== */
.footer-container {
    max-width: 1280px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
    display: block !important;
    visibility: visible !important;
}

/* ===== FOOTER CONTENT GRID ===== */
.footer-content {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--footer-spacing-xl, 32px);
    margin-bottom: var(--footer-spacing-xl, 32px);
    display: grid !important;
    visibility: visible !important;
}

.footer-section {
    display: flex !important;
    flex-direction: column;
    align-items: flex-start;
    visibility: visible !important;
    gap: var(--footer-spacing-md, 16px);
}

.footer-section.footer-brand {
    align-items: stretch;
    text-align: center;
}

/* ===== BRAND SECTION ===== */
.brand-header {
    width: 100%;
    display: flex;
    justify-content: center;
    margin-bottom: var(--footer-spacing-sm, 12px);
    background: transparent !important;
    padding: 0 !important;
    border-radius: 0;
}

.footer-logo {
    max-width: 140px;
    height: auto;
    object-fit: contain;
    display: block !important;
    filter: none;
    background: transparent !important;
    border: none;
    box-shadow: none;
}

.footer-title {
    font-size: 18px;
    font-weight: 700;
    margin: 0 !important;
    padding-bottom: 0 !important;
    color: var(--footer-text-primary) !important;
    letter-spacing: 0.3px;
}

.footer-description {
    font-size: 14px;
    line-height: 1.7;
    margin: 0 !important;
    padding: 0 !important;
    color: var(--footer-text-secondary) !important;
}

/* ===== SOCIAL NETWORKS SECTION ===== */
.footer-social-group {
    width: 100%;
    margin-top: var(--footer-spacing-md, 16px);
    padding-top: var(--footer-spacing-md, 16px);
    border-top: 1px solid var(--footer-border);
}

.footer-social-label {
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin: 0 0 var(--footer-spacing-md, 16px) 0;
    color: var(--footer-text-light) !important;
}

.footer-social {
    display: flex;
    gap: var(--footer-spacing-md, 16px);
    flex-wrap: wrap;
    justify-content: center;
}

.social-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background: rgba(45, 27, 78, 0.08);
    border-radius: 50%;
    color: #a565cceb !important;
    transition: var(--footer-transition);
    font-size: 18px;
    border: 2px solid transparent;
    cursor: pointer;
}

.social-icon:hover {
    background: var(--footer-accent) !important;
    color: var(--footer-bg-primary) !important;
    transform: translateY(-4px);
    border-color: var(--footer-accent);
}

/* ===== SECTION TITLES ===== */
.footer-section-title {
    font-size: 15px;
    font-weight: 700;
    margin: 0 !important;
    color: #5a1993d9 !important;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: var(--footer-spacing-sm, 12px);
    padding-bottom: var(--footer-spacing-md, 16px);
    border-bottom: 2px solid var(--footer-accent);
    width: 100%;
}

.footer-section-title i {
    font-size: 18px;
    opacity: 0.9;
}

/* ===== SUB SECTION TITLES ===== */
.footer-subsection-title {
    font-size: 14px;
    font-weight: 700;
    margin: 0 0 var(--footer-spacing-md, 16px) 0 !important;
    color: var(--footer-text-primary) !important;
    display: flex;
    align-items: center;
    gap: var(--footer-spacing-sm, 12px);
}

.footer-subsection-title i {
    font-size: 16px;
    color: var(--footer-accent);
}

/* ===== NAVIGATION STYLES ===== */
.footer-nav {
    width: 100%;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex !important;
    flex-direction: column;
    gap: var(--footer-spacing-sm, 12px);
}

.footer-links li {
    margin: 0 !important;
    display: block !important;
}

.footer-links a {
    color: #5d3e8b !important;
    text-decoration: none !important;
    transition: var(--footer-transition);
    display: inline-flex;
    align-items: center;
    font-size: 14px;
    position: relative;
    padding-left: 0;
}

.footer-links a::before {
    content: '';
    display: none;
}

.footer-links a:hover {
    color: var(--footer-accent) !important;
    text-decoration: none !important;
    padding-left: 0;
}

.footer-links a:hover::before {
    display: none;
}

.footer-links a.active {
    color: var(--footer-accent) !important;
    font-weight: 600;
    background: rgba(182, 128, 216, 0.15);
    padding: var(--footer-spacing-sm, 12px) var(--footer-spacing-md, 16px);
    border-radius: 4px;
    border-left: 3px solid var(--footer-accent);
}

.footer-link-highlight {
    background: transparent !important;
    padding: 0 !important;
    border-radius: 4px;
    color: var(--footer-accent) !important;
    font-weight: 600;
    border-left: none;
    animation: pulsoElegante 2.5s ease-in-out infinite;
}

.footer-link-highlight:hover {
    background: transparent !important;
    animation: none;
}

@keyframes pulsoElegante {

    0%,
    100% {
        opacity: 1;
        text-shadow: 0 0 0 0 rgba(182, 128, 216, 0.7);
    }

    50% {
        opacity: 1;
        text-shadow: 0 0 10px 5px rgba(182, 128, 216, 0.3);
    }
}

/* ===== INFO BLOCKS ===== */
.footer-info-group {
    display: flex;
    flex-direction: column;
    gap: var(--footer-spacing-xl, 32px);
    width: 100%;
}

.footer-info-block {
    display: flex;
    flex-direction: column;
    gap: var(--footer-spacing-md, 16px);
    padding-bottom: var(--footer-spacing-lg, 24px);
    border-bottom: none;
}

.footer-info-block:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.footer-contact-info {
    display: flex;
    flex-direction: column;
    gap: var(--footer-spacing-md, 16px);
}

.contact-item {
    display: flex;
    align-items: flex-start;
    justify-content: flex-start;
    text-align: left !important;
    gap: var(--footer-spacing-md, 16px);
    margin: 0 !important;
    font-size: 14px;
    color: #5d3e8b !important;
    line-height: 1.6;
}

.contact-item i {
    color: var(--footer-accent);
    font-size: 16px;
    flex-shrink: 0;
    margin-top: 2px;
}

.contact-item a {
    color: #5d3e8b !important;
    text-decoration: none;
    transition: var(--footer-transition);
}

.contact-item a:hover {
    text-decoration: underline;
    opacity: 0.8;
}

/* ===== LEGAL LINKS ===== */
.footer-legal-links {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex !important;
    flex-direction: column;
    gap: var(--footer-spacing-sm, 12px);
}

.footer-legal-links li {
    margin: 0 !important;
}

.footer-legal-links a {
    color: var(--footer-text-secondary) !important;
    text-decoration: none !important;
    font-size: 14px;
    transition: var(--footer-transition);
    position: relative;
}

.footer-legal-links a::after {
    content: '';
    display: none;
}

.footer-legal-links a:hover {
    color: var(--footer-accent) !important;
    text-decoration: none !important;
}

.footer-legal-links a:hover::after {
    display: none;
}

/* ===== BUTTON STYLES ===== */
.btn-footer {
    background: var(--footer-accent-gradient) !important;
    color: white !important;
    border: none;
    font-weight: 600;
    padding: 10px 20px;
    border-radius: 6px;
    transition: var(--footer-transition);
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: var(--footer-spacing-sm, 12px);
}

.btn-footer:hover {
    background: linear-gradient(135deg, #9370DB 0%, #5A3A7F 100%) !important;
    color: white !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.25);
}

/* ===== FOOTER DIVIDER ===== */
.footer-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--footer-border), transparent);
    margin: var(--footer-spacing-lg, 24px) 0;
}

/* ===== FOOTER BOTTOM ===== */
.footer-bottom {
    display: block !important;
    padding-top: var(--footer-spacing-lg, 24px);
    border-top: 1px solid var(--footer-border);
}

.footer-bottom-content {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: var(--footer-spacing-xl, 32px);
    align-items: center;
}

.footer-bottom-section {
    display: flex !important;
    align-items: center;
    justify-content: center;
}

.footer-bottom-section:first-child {
    justify-content: flex-start;
}

.footer-bottom-section:last-child {
    justify-content: flex-end;
}

.copyright,
.footer-credit {
    margin: 0 !important;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.7) !important;
    line-height: 1.5;
}

.footer-credit i {
    color: #FF6B9D;
    animation: heartbeat 1.5s infinite;
}

@keyframes heartbeat {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.2);
    }
}

/* ===== FOOTER BOTTOM NAV ===== */
.footer-bottom-nav {
    display: flex !important;
    align-items: center;
    gap: var(--footer-spacing-md, 16px);
    flex-wrap: wrap;
    justify-content: center;
}

.footer-bottom-nav a {
    color: rgba(255, 255, 255, 0.8) !important;
    text-decoration: none !important;
    font-size: 13px;
    transition: var(--footer-transition);
    position: relative;
}

.footer-bottom-nav a::after {
    content: '';
    display: none;
}

.footer-bottom-nav a:hover {
    color: var(--footer-accent) !important;
    text-decoration: none !important;
}

.footer-bottom-nav a:hover::after {
    display: none;
}

.nav-separator {
    color: var(--footer-text-light);
    opacity: 0.5;
}

/* ===== BUTTON STYLES ===== */
.footer-section .btn {
    background: var(--footer-accent-gradient) !important;
    color: white !important;
    border: none;
    font-weight: 600;
    padding: 8px 20px;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.footer-section .btn:hover {
    background: linear-gradient(135deg, #9370DB 0%, #5A3A7F 100%) !important;
    color: white !important;
    transform: translateY(-2px);
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 1200px) {
    .footer-content {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--footer-spacing-lg, 24px);
    }
}

@media (max-width: 768px) {
    .footer-content {
        grid-template-columns: 1fr;
        gap: var(--footer-spacing-lg, 24px);
    }

    .footer-bottom-content {
        grid-template-columns: 1fr;
        gap: var(--footer-spacing-lg, 24px);
        text-align: center;
    }

    .footer-bottom-section {
        justify-content: center !important;
    }

    .footer-bottom-nav {
        justify-content: center;
    }

    .footer-section,
    .footer-section.footer-brand {
        align-items: stretch;
        text-align: center;
    }

    .footer-brand-header,
    .brand-header {
        width: 100%;
    }

    .footer-section-title {
        justify-content: center;
    }

    .footer-links a {
        padding-left: var(--footer-spacing-md, 16px);
    }

    .footer-links a:hover {
        padding-left: var(--footer-spacing-md, 16px);
    }

    .footer-links a:hover::before {
        opacity: 0;
    }

    .contact-item {
        justify-content: flex-start;
    }

    /* Override cores para modo Mobile (Onde o BG é sempre escuro) */
    .footer-section-title,
    .footer-title,
    .footer-subsection-title,
    .footer-description,
    .footer-links a,
    .contact-item,
    .footer-social-label,
    .footer-legal-links a,
    .social-icon {
        color: var(--footer-text-white) !important;
    }

    .footer-social-label {
        opacity: 0.7;
    }

    .footer-links a:hover,
    .contact-item a {
        color: var(--footer-accent) !important;
    }

    .social-icon {
        background: rgba(255, 255, 255, 0.1) !important;
    }

    .footer-section-title {
        border-bottom-color: rgba(255, 255, 255, 0.2);
    }
}

@media (max-width: 480px) {
    :root {
        --footer-spacing-lg: 16px;
        --footer-spacing-xl: 20px;
    }

    .footer-container {
        padding: 0;
    }

    .footer-content {
        gap: var(--footer-spacing-lg, 16px);
        margin-bottom: var(--footer-spacing-lg, 16px);
    }

    .footer-section-title {
        font-size: 14px;
        padding-bottom: var(--footer-spacing-sm, 12px);
    }

    .footer-bottom-nav {
        gap: var(--footer-spacing-sm, 12px);
    }

    .copyright,
    .footer-credit {
        font-size: 12px;
    }
}

/* ===== ACCESSIBILITY & VISIBILITY ===== */
html,
body,
main,
footer {
    box-sizing: border-box;
}

*,
*::before,
*::after {
    box-sizing: inherit;
}

/* ===== ENHANCED FOOTER POLISH ===== */
footer {
    scroll-behavior: smooth;
}

.footer-section a {
    outline-offset: 2px;
}

.footer-section a:focus-visible {
    outline: 2px solid var(--footer-accent);
    border-radius: 2px;
}

/* ===== PRINT STYLES ===== */
/* ===== RESPONSIVE SPACING FOR MAIN ===== */
@media (max-width: 480px) {
    main {
        padding-bottom: var(--footer-main-spacing, 200px) !important;
    }
}

@media (min-width: 481px) and (max-width: 768px) {
    main {
        padding-bottom: var(--footer-main-spacing, 200px) !important;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    main {
        padding-bottom: var(--footer-main-spacing, 200px) !important;
    }
}

@media (min-width: 1025px) {
    main {
        padding-bottom: var(--footer-main-spacing, 200px) !important;
    }
}

/* ===== PRINT STYLES ===== */
@media print {
    footer {
        background: white !important;
        color: #000 !important;
    }

    .footer-section a {
        color: #000 !important;
        text-decoration: underline;
    }

    .footer-social,
    .btn-footer {
        display: none;
    }
}