/* Failas: template/footer.css */

:root {
    --bg-main: #121212;
    --bg-surface: #1E1E1E;
    --bg-surface-hover: #2a2a2a;
    --border-color: #333333;
    --text-primary: #EAEAEA;
    --text-secondary: #9E9E9E;
    --accent-blue: #007BFF;
    --accent-green: #28a745;
    --accent-red: #dc3545;
    --accent-yellow: #F59E0B;
    --accent-purple: #9370DB;

    --font-main: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --border-radius-md: 8px;
    --shadow-md: 0 4px 15px rgba(0, 0, 0, 0.2);
    --transition: all 0.25s ease-in-out;
    --flag-gradient: linear-gradient(90deg, #FDB913, #006A44, #C1272D);
}

.site-footer {
    width: 100%;
    margin-top: clamp(48px, 7vw, 92px);
    padding: clamp(36px, 5vw, 64px) 0 28px;
    color: var(--text-secondary);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.025), transparent 38%),
        var(--bg-main);
    border-top: 1px solid var(--border-color);
    font-family: var(--font-main);
}

.site-footer a {
    text-decoration: none;
}

.footer-container {
    width: 100%;
    max-width: 1180px;
    margin: 0 auto;
}

.footer-main {
    display: grid;
    grid-template-columns: minmax(260px, 0.9fr) minmax(0, 2.1fr);
    gap: clamp(28px, 5vw, 68px);
    align-items: start;
}

.footer-brand {
    min-width: 0;
}

.footer-logo {
    display: inline-flex;
    align-items: baseline;
    margin-bottom: 14px;
    font-size: clamp(1.55rem, 2.2vw, 2rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1;
}

.footer-logo:hover {
    opacity: 1;
    text-decoration: none;
}

.site-footer .flag-colors {
    font-weight: 800;
    background: var(--flag-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: inline-block;
}

.site-footer .text-accent {
    color: var(--text-primary);
    font-weight: 800;
}

.footer-tagline {
    max-width: 320px;
    margin: 0 0 22px;
    color: var(--text-secondary);
    font-size: 0.96rem;
    line-height: 1.65;
}

.site-footer .social-links {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.site-footer .social-links a {
    width: 42px;
    height: 42px;
    border-radius: 8px;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    color: var(--text-secondary);
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.site-footer .social-links a i {
    font-size: 1.05rem;
    line-height: 1;
}

.site-footer .social-links a:hover {
    color: #121212;
    background: var(--accent-yellow);
    border-color: var(--accent-yellow);
    opacity: 1;
    transform: translateY(-2px);
}

.footer-nav-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: clamp(18px, 3vw, 32px);
}

.footer-link-group {
    min-width: 0;
}

.footer-link-group h2 {
    margin: 0 0 12px;
    color: var(--text-primary);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    line-height: 1.2;
    text-transform: uppercase;
}

.footer-link-group a {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 38px;
    width: 100%;
    padding: 8px 10px;
    color: var(--text-secondary);
    border-radius: 8px;
    font-size: 0.94rem;
    line-height: 1.25;
    transition: var(--transition);
}

.footer-link-group a i {
    width: 18px;
    flex: 0 0 18px;
    color: var(--text-secondary);
    text-align: center;
    font-size: 0.95rem;
}

.footer-link-group a:hover {
    color: var(--text-primary);
    background: var(--bg-surface);
    opacity: 1;
    text-decoration: none;
}

.footer-link-group a:hover i {
    color: var(--accent-yellow);
}

.footer-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-top: clamp(28px, 4vw, 46px);
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

.footer-copyright {
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.55;
}

.footer-home-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 38px;
    padding: 8px 12px;
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 700;
    transition: var(--transition);
    white-space: nowrap;
}

.footer-home-link:hover {
    color: var(--text-primary);
    background: var(--bg-surface);
    opacity: 1;
    text-decoration: none;
}

.footer-home-link i {
    color: var(--accent-yellow);
}

.site-footer .social-links a:focus-visible,
.footer-link-group a:focus-visible,
.footer-home-link:focus-visible,
.footer-logo:focus-visible {
    outline: 2px solid var(--accent-yellow);
    outline-offset: 4px;
}

html.light-theme .site-footer {
    background:
        linear-gradient(180deg, rgba(17, 24, 39, 0.035), transparent 42%),
        #f9fafb;
}

html.light-theme .site-footer .social-links a {
    background: #ffffff;
}

html.light-theme .footer-link-group a:hover,
html.light-theme .footer-home-link:hover {
    background: #ffffff;
}

@media (max-width: 1024px) {
    .footer-main {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .footer-brand {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 16px 28px;
        align-items: end;
    }

    .footer-logo,
    .footer-tagline {
        grid-column: 1;
    }

    .footer-tagline {
        margin-bottom: 0;
    }

    .site-footer .social-links {
        grid-column: 2;
        grid-row: 1 / span 2;
        justify-content: flex-end;
        align-self: center;
    }
}

@media (max-width: 760px) {
    .site-footer {
        margin-top: 44px;
        padding: 38px 0 24px;
    }

    .footer-brand {
        display: block;
    }

    .footer-tagline {
        max-width: 100%;
        margin-bottom: 20px;
    }

    .site-footer .social-links {
        justify-content: flex-start;
    }

    .footer-nav-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 22px 18px;
    }

    .footer-bottom {
        align-items: flex-start;
        flex-direction: column;
    }
}

@media (max-width: 520px) {
    .site-footer {
        padding-top: 32px;
    }

    .footer-nav-grid {
        grid-template-columns: 1fr;
        gap: 22px;
    }

    .footer-link-group a {
        min-height: 44px;
        padding: 10px 12px;
        background: rgba(255, 255, 255, 0.025);
        border: 1px solid var(--border-color);
    }

    .footer-bottom,
    .footer-home-link {
        width: 100%;
    }

    .footer-home-link {
        justify-content: center;
    }
}

/* Public profile uses a full-bleed page container, so keep the shared footer
   constrained and compact there instead of inheriting the profile container reset. */
body.page-public-profile.workspace-profile-page .site-footer {
    position: relative;
    z-index: 1;
    margin-top: clamp(28px, 4vw, 54px);
    padding: clamp(28px, 3.4vw, 42px) 0 22px;
    background:
        radial-gradient(circle at 18% 0%, rgba(253, 185, 19, 0.08), transparent 30%),
        radial-gradient(circle at 70% 0%, rgba(0, 106, 68, 0.08), transparent 34%),
        linear-gradient(180deg, rgba(10, 10, 12, 0.82), rgba(6, 6, 8, 0.96));
    border-top-color: rgba(255, 255, 255, 0.10);
}

body.page-public-profile.workspace-profile-page .site-footer .footer-container {
    width: min(1180px, calc(100% - 40px)) !important;
    max-width: 1180px !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
}

body.page-public-profile.workspace-profile-page .site-footer .footer-main {
    grid-template-columns: minmax(230px, 0.8fr) minmax(0, 2.2fr);
    gap: clamp(24px, 4vw, 52px);
}

body.page-public-profile.workspace-profile-page .site-footer .footer-logo {
    font-size: clamp(1.42rem, 1.9vw, 1.82rem);
    margin-bottom: 10px;
}

body.page-public-profile.workspace-profile-page .site-footer .footer-tagline {
    max-width: 280px;
    margin-bottom: 18px;
    font-size: 0.9rem;
    line-height: 1.55;
}

body.page-public-profile.workspace-profile-page .site-footer .social-links a {
    width: 38px;
    height: 38px;
}

body.page-public-profile.workspace-profile-page .site-footer .footer-link-group h2 {
    margin-bottom: 10px;
    font-size: 0.74rem;
}

body.page-public-profile.workspace-profile-page .site-footer .footer-link-group a {
    min-height: 36px;
    padding: 7px 8px;
    font-size: 0.9rem;
}

body.page-public-profile.workspace-profile-page .site-footer .footer-bottom {
    margin-top: clamp(22px, 3vw, 34px);
    padding-top: 16px;
}

body.page-public-profile.workspace-profile-page .site-footer .footer-home-link {
    min-height: 36px;
}

html.light-theme body.page-public-profile.workspace-profile-page .site-footer {
    background:
        radial-gradient(circle at 18% 0%, rgba(253, 185, 19, 0.08), transparent 30%),
        radial-gradient(circle at 70% 0%, rgba(0, 106, 68, 0.07), transparent 34%),
        #f9fafb;
    border-top-color: #dde4ef;
}

@media (max-width: 1024px) {
    body.page-public-profile.workspace-profile-page .site-footer .footer-main {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 760px) {
    body.page-public-profile.workspace-profile-page .site-footer {
        margin-top: 34px;
        padding-top: 30px;
        padding-bottom: calc(22px + env(safe-area-inset-bottom));
    }

    body.page-public-profile.workspace-profile-page .site-footer .footer-container {
        width: calc(100% - 24px) !important;
    }
}
