/* ================================================================
   Gestor 365 — Árvore de Links (Bio Links)
   Versão Clara (Light Mode Tecnológico & Moderno)
   Arquivo: assets/css/links.css
   ================================================================ */

:root {
    color-scheme: light;
    --bg: #F4F7FB;
    --surface: #FFFFFF;
    --surface-hover: #F8FAFD;
    --card-bg: #FFFFFF;
    --card-border: #E2E8F0;
    --card-hover-border: #0B7BC2;
    --text-primary: #0A2540;
    --text-secondary: #475569;
    --muted: #64748B;
    --line: #E2E8F0;
    --navy: #0A2F63;
    --blue: #0B7BC2;
    --blue-dark: #0A2F63;
    --blue-light: #E0F2FE;
    --blue-border: #BAE6FD;
    --blue-text: #0369A1;
    --green: #12874A;
    --green-light: #DCFCE7;
    --green-border: #BBF7D0;
    --green-text: #15803D;
    --whatsapp: #25D366;
    --instagram: #E1306C;
    --youtube: #FF0000;
    --shadow-card: 0 4px 16px -2px rgba(10, 47, 99, 0.05), 0 2px 6px -1px rgba(0, 0, 0, 0.02);
    --shadow-hover: 0 12px 28px -4px rgba(11, 123, 194, 0.16), 0 4px 10px -2px rgba(10, 47, 99, 0.04);
    --shadow-avatar: 0 10px 25px -4px rgba(10, 47, 99, 0.08), 0 2px 8px rgba(0, 0, 0, 0.03);
}

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    min-height: 100vh;
    background-color: var(--bg);
    background-image: 
        radial-gradient(at 0% 0%, rgba(11, 123, 194, 0.07) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(18, 135, 74, 0.05) 0px, transparent 50%),
        radial-gradient(at 50% 15%, rgba(255, 255, 255, 0.9) 0px, transparent 100%);
    background-attachment: fixed;
    color: var(--text-primary);
    font-family: "Futura PT", "Futura PT Book", Futura, Jost, "Century Gothic", "Segoe UI", system-ui, -apple-system, sans-serif;
    line-height: 1.5;
    position: relative;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 40px 16px 52px;
}

/* ----------------------------------------------------------------
   Luzes e Auras Suaves de Fundo
   ---------------------------------------------------------------- */
.bg-glow-top {
    position: fixed;
    top: -120px;
    left: 50%;
    transform: translateX(-50%);
    width: 600px;
    max-width: 120vw;
    height: 400px;
    background: radial-gradient(circle, rgba(11, 123, 194, 0.12) 0%, rgba(244, 247, 251, 0) 70%);
    z-index: 0;
    pointer-events: none;
    filter: blur(40px);
}

.bg-glow-bottom {
    position: fixed;
    bottom: -120px;
    right: 5%;
    width: 450px;
    height: 450px;
    background: radial-gradient(circle, rgba(18, 135, 74, 0.08) 0%, rgba(244, 247, 251, 0) 70%);
    z-index: 0;
    pointer-events: none;
    filter: blur(50px);
}

/* ----------------------------------------------------------------
   Container Principal da Árvore de Links
   ---------------------------------------------------------------- */
.links-container {
    width: 100%;
    max-width: 580px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* ----------------------------------------------------------------
   Cabeçalho do Perfil
   ---------------------------------------------------------------- */
.profile-header {
    text-align: center;
    margin-bottom: 30px;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    animation: fadeInDown 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.profile-avatar-wrap {
    position: relative;
    margin-bottom: 18px;
}

.profile-avatar {
    width: 104px;
    height: 104px;
    background: #FFFFFF;
    border-radius: 26px;
    padding: 0;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-avatar);
    border: 3px solid #FFFFFF;
    outline: 1px solid rgba(10, 47, 99, 0.08);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s ease;
}

.profile-avatar:hover {
    transform: scale(1.04);
    box-shadow: 0 14px 30px -4px rgba(11, 123, 194, 0.2), 0 2px 10px rgba(0, 0, 0, 0.04);
}

.profile-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.status-badge {
    position: absolute;
    bottom: -8px;
    background: #FFFFFF;
    border: 1px solid var(--green-border);
    color: var(--green-text);
    font-size: 0.72rem;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 99px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 3px 10px rgba(18, 135, 74, 0.12);
    white-space: nowrap;
}

.status-dot {
    width: 7px;
    height: 7px;
    background-color: #22c55e;
    border-radius: 50%;
    box-shadow: 0 0 6px #22c55e;
    animation: pulse 2s infinite ease-in-out;
}

.profile-title {
    font-size: 1.6rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 6px;
}

.verified-icon {
    width: 20px;
    height: 20px;
    color: var(--blue);
    flex-shrink: 0;
}

.profile-bio {
    font-size: 0.95rem;
    color: var(--text-secondary);
    max-width: 440px;
    line-height: 1.5;
    margin-bottom: 8px;
}

/* ----------------------------------------------------------------
   Lista de Links
   ---------------------------------------------------------------- */
.links-list {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-bottom: 30px;
}

/* Cartão de Link */
.link-card {
    position: relative;
    display: flex;
    align-items: center;
    gap: 16px;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    padding: 16px 20px;
    border-radius: 18px;
    text-decoration: none;
    color: var(--text-primary);
    box-shadow: var(--shadow-card);
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1),
                border-color 0.25s ease,
                background-color 0.25s ease,
                box-shadow 0.25s ease;
    overflow: hidden;
}

.link-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(11, 123, 194, 0.03) 0%, rgba(255, 255, 255, 0) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.link-card:hover {
    transform: translateY(-3px);
    background: var(--surface);
    border-color: var(--card-hover-border);
    box-shadow: var(--shadow-hover);
}

.link-card:hover::before {
    opacity: 1;
}

.link-card:active {
    transform: translateY(-1px) scale(0.995);
}

.link-card:focus-visible {
    outline: 2px solid var(--blue);
    outline-offset: 3px;
}

/* Cartão em Destaque Especial: Sistema Gestor 365 */
.link-card.featured-system {
    border-color: rgba(11, 123, 194, 0.35);
    background: linear-gradient(135deg, #FFFFFF 0%, #F0F7FF 100%);
}

.link-card.featured-system:hover {
    border-color: var(--blue);
    box-shadow: 0 12px 30px -4px rgba(11, 123, 194, 0.22);
}

/* Cartão em Destaque Especial: Ebook */
.link-card.featured-ebook {
    border-color: rgba(18, 135, 74, 0.3);
    background: linear-gradient(135deg, #FFFFFF 0%, #F2FDF7 100%);
}

.link-card.featured-ebook:hover {
    border-color: var(--green);
    box-shadow: 0 12px 30px -4px rgba(18, 135, 74, 0.2);
}

/* Ícone do Link */
.link-icon-box {
    width: 46px;
    height: 46px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: transform 0.25s ease, background-color 0.25s ease, color 0.25s ease;
}

.link-icon-box svg {
    width: 24px;
    height: 24px;
}

.link-card:hover .link-icon-box {
    transform: scale(1.08);
}

/* Variações de cor dos ícones no tema claro */
.icon-system {
    color: var(--blue);
    background: #E0F2FE;
    border: 1px solid #BAE6FD;
}

.icon-ebook {
    color: var(--green);
    background: #DCFCE7;
    border: 1px solid #BBF7D0;
}

.icon-consultant {
    color: #16A34A;
    background: #DCFCE7;
    border: 1px solid #BBF7D0;
}

.icon-support {
    color: #0284C7;
    background: #E0F2FE;
    border: 1px solid #BAE6FD;
}

.icon-instagram {
    color: #E1306C;
    background: #FDF2F8;
    border: 1px solid #FBCFE8;
}

.icon-youtube {
    color: #DC2626;
    background: #FEF2F2;
    border: 1px solid #FECACA;
}

/* Conteúdo de Texto */
.link-content {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.link-top-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.link-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.01em;
}

.pill-badge {
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 2px 7px;
    border-radius: 6px;
    line-height: 1.2;
}

.badge-featured {
    background: var(--blue-light);
    color: var(--blue-text);
    border: 1px solid var(--blue-border);
}

.badge-free {
    background: var(--green-light);
    color: var(--green-text);
    border: 1px solid var(--green-border);
}

.badge-whatsapp {
    background: var(--green-light);
    color: var(--green-text);
    border: 1px solid var(--green-border);
}

.link-desc {
    font-size: 0.84rem;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Seta Indicadora */
.link-arrow {
    color: var(--muted);
    opacity: 0.6;
    flex-shrink: 0;
    transition: transform 0.25s ease, opacity 0.25s ease, color 0.25s ease;
    display: flex;
    align-items: center;
}

.link-arrow svg {
    width: 20px;
    height: 20px;
}

.link-card:hover .link-arrow {
    transform: translateX(4px);
    opacity: 1;
    color: var(--blue);
}

/* ----------------------------------------------------------------
   Seção de Redes Sociais
   ---------------------------------------------------------------- */
.social-section {
    width: 100%;
    margin-top: 8px;
    margin-bottom: 24px;
}

.social-heading {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
    color: var(--muted);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 700;
}

.social-heading::before,
.social-heading::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--line);
}

.social-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.social-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--surface);
    border: 1px solid var(--card-border);
    padding: 12px 16px;
    border-radius: 16px;
    color: var(--text-primary);
    text-decoration: none;
    box-shadow: var(--shadow-card);
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.social-btn:hover {
    transform: translateY(-2px);
}

.social-btn.instagram:hover {
    border-color: var(--instagram);
    box-shadow: 0 8px 20px -2px rgba(225, 48, 108, 0.18);
}

.social-btn.youtube:hover {
    border-color: var(--youtube);
    box-shadow: 0 8px 20px -2px rgba(220, 38, 38, 0.18);
}

.social-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.social-name {
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--text-primary);
}

.social-handle {
    font-size: 0.76rem;
    color: var(--muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ----------------------------------------------------------------
   Ações Adicionais & Compartilhamento
   ---------------------------------------------------------------- */
.actions-wrap {
    display: flex;
    gap: 10px;
    margin-bottom: 24px;
}

.share-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #FFFFFF;
    border: 1px solid var(--card-border);
    color: var(--text-secondary);
    font-size: 0.84rem;
    font-weight: 600;
    padding: 9px 18px;
    border-radius: 99px;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    transition: all 0.2s ease;
}

.share-btn:hover {
    background: #FFFFFF;
    color: var(--blue);
    border-color: var(--blue);
    box-shadow: 0 4px 14px rgba(11, 123, 194, 0.15);
    transform: translateY(-1px);
}

.share-btn svg {
    width: 15px;
    height: 15px;
}

/* ----------------------------------------------------------------
   Rodapé
   ---------------------------------------------------------------- */
.page-footer {
    text-align: center;
    margin-top: auto;
    padding-top: 16px;
    color: var(--muted);
    font-size: 0.8rem;
}

.page-footer p {
    margin-bottom: 4px;
}

.footer-highlight {
    color: var(--navy);
    font-weight: 700;
}

/* ----------------------------------------------------------------
   Toast de Notificação
   ---------------------------------------------------------------- */
.toast-msg {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: var(--navy);
    border: 1px solid var(--blue);
    color: #FFFFFF;
    padding: 10px 22px;
    border-radius: 99px;
    font-size: 0.88rem;
    font-weight: 600;
    box-shadow: 0 10px 25px rgba(10, 47, 99, 0.25);
    z-index: 100;
    opacity: 0;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
    pointer-events: none;
    display: flex;
    align-items: center;
    gap: 8px;
}

.toast-msg.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

/* ----------------------------------------------------------------
   Animações
   ---------------------------------------------------------------- */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-16px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.5;
        transform: scale(0.85);
    }
}

/* ----------------------------------------------------------------
   Responsividade
   ---------------------------------------------------------------- */
@media (max-width: 480px) {
    body {
        padding: 28px 14px 44px;
    }
    .profile-avatar {
        width: 108px;
        height: 108px;
        border-radius: 26px;
    }
    .profile-title {
        font-size: 1.4rem;
    }
    .link-card {
        padding: 14px 16px;
        gap: 12px;
    }
    .link-icon-box {
        width: 42px;
        height: 42px;
        border-radius: 12px;
    }
    .link-title {
        font-size: 0.98rem;
    }
    .social-grid {
        grid-template-columns: 1fr;
    }
}
