/* ==========================================================================
   DESIGN SYSTEM - DEPUTADO JOEL WILHELM
   ========================================================================== */

:root {
    /* Cores Premium */
    --color-bg-dark: #070a13;
    --color-bg-card: rgba(15, 23, 42, 0.45);
    --color-border-card: rgba(255, 255, 255, 0.08);
    --color-text-primary: #f8fafc;
    --color-text-secondary: #94a3b8;
    --color-text-muted: #64748b;
    
    /* Cores Institucionais e de Destaque */
    --color-primary: #106090; /* Azul do Perfil do Instagram */
    --color-primary-light: #2080b0; /* Tom de azul correspondente */
    --color-accent: #d97706; /* Dourado do RS / PP */
    --color-accent-light: #f59e0b;
    --color-success: #10b981;
    
    /* Cores das Redes Sociais */
    --color-whatsapp: #25d366;
    --color-instagram: #e1306c;
    --color-facebook: #1877f2;
    --color-website: #3b82f6;

    /* Fontes */
    --font-heading: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

    /* Transições */
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-bounce: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* Reset de Estilos */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    background-color: var(--color-bg-dark);
    color: var(--color-text-primary);
    font-family: var(--font-body);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow-x: hidden;
    padding: 20px 15px;
}

/* Background Glows (Efeito de Luz Flutuante ao Fundo) */
.bg-glow {
    position: absolute;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(16, 96, 144, 0.28) 0%, rgba(0,0,0,0) 70%);
    top: -150px;
    left: -150px;
    z-index: 1;
    pointer-events: none;
    animation: pulseGlow 12s infinite alternate ease-in-out;
}

.bg-glow-secondary {
    position: absolute;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(217, 119, 6, 0.08) 0%, rgba(0,0,0,0) 70%);
    bottom: -100px;
    right: -100px;
    z-index: 1;
    pointer-events: none;
    animation: pulseGlow 15s infinite alternate-reverse ease-in-out;
}

@keyframes pulseGlow {
    0% { transform: scale(1) translate(0, 0); }
    100% { transform: scale(1.2) translate(50px, 50px); }
}

/* Container Principal (Glassmorphism) */
.card-container {
    width: 100%;
    max-width: 440px;
    background: var(--color-bg-card);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--color-border-card);
    border-radius: 28px;
    padding: 35px 24px;
    z-index: 10;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4), 
                inset 0 1px 0 rgba(255, 255, 255, 0.1);
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Cabeçalho do Cartão */
.card-header {
    text-align: center;
    margin-bottom: 30px;
}

/* Avatar com Borda Iluminada */
.avatar-wrapper {
    position: relative;
    width: 120px;
    height: 120px;
    margin: 0 auto 18px;
}

.avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    border: 3px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
    padding: 3px;
    background: linear-gradient(135deg, var(--color-primary-light), var(--color-accent));
}

/* Selo de Verificado */
.verified-badge {
    position: absolute;
    bottom: 5px;
    right: 5px;
    background-color: #1d9bf0;
    color: white;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    border: 3px solid #0f172a;
    font-size: 13px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.25);
    animation: badgePop 0.5s 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275) both;
}

@keyframes badgePop {
    from { transform: scale(0); }
    to { transform: scale(1); }
}

/* Nome do Deputado */
.profile-name {
    font-family: var(--font-heading);
    font-size: 26px;
    font-weight: 800;
    letter-spacing: -0.5px;
    margin-bottom: 8px;
    background: linear-gradient(135deg, var(--color-text-primary) 30%, #cbd5e1 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Badge de Cargo */
.profile-tag {
    display: inline-block;
    margin-bottom: 16px;
}

.tag-badge {
    background: rgba(32, 128, 176, 0.12);
    border: 1px solid rgba(32, 128, 176, 0.25);
    color: var(--color-primary-light);
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    padding: 6px 14px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Biografia */
.profile-bio {
    font-size: 14px;
    color: var(--color-text-secondary);
    line-height: 1.6;
    font-weight: 400;
    max-width: 320px;
    margin: 0 auto;
}

/* Lista de Links */
.card-links {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 30px;
}

/* Botões de Link (Estilo Base) */
.link-btn {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: var(--color-text-primary);
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 18px;
    padding: 14px 20px;
    transition: var(--transition-bounce);
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.link-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.05),
        transparent
    );
    transition: 0.5s;
}

.link-btn:hover::before {
    left: 100%;
}

/* Hover Geral */
.link-btn:hover {
    transform: translateY(-3px) scale(1.01);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
    background: rgba(255, 255, 255, 0.06);
}

/* Ícone */
.btn-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 20px;
    margin-right: 16px;
    flex-shrink: 0;
    transition: var(--transition-smooth);
}

/* Textos do Botão */
.btn-text {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
}

.btn-title {
    font-family: var(--font-heading);
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 2px;
}

.btn-subtitle {
    font-size: 11px;
    color: var(--color-text-secondary);
    font-weight: 400;
}

/* Seta Direita */
.btn-arrow {
    font-size: 12px;
    color: var(--color-text-muted);
    transition: var(--transition-smooth);
}

.link-btn:hover .btn-arrow {
    transform: translateX(4px);
    color: var(--color-text-primary);
}

/* Customização de Cores por Botão */

/* 1. Grupo de WhatsApp */
.whatsapp-group-btn {
    border-left: 4px solid var(--color-whatsapp);
}
.whatsapp-group-btn .btn-icon {
    background: rgba(37, 211, 102, 0.1);
    color: var(--color-whatsapp);
}
.whatsapp-group-btn:hover {
    border-color: var(--color-whatsapp);
    box-shadow: 0 8px 24px rgba(37, 211, 102, 0.15);
}
.whatsapp-group-btn:hover .btn-icon {
    background: var(--color-whatsapp);
    color: #fff;
}

/* 2. Instagram */
.instagram-btn {
    border-left: 4px solid var(--color-instagram);
}
.instagram-btn .btn-icon {
    background: rgba(225, 48, 108, 0.1);
    color: var(--color-instagram);
}
.instagram-btn:hover {
    border-color: var(--color-instagram);
    box-shadow: 0 8px 24px rgba(225, 48, 108, 0.15);
}
.instagram-btn:hover .btn-icon {
    background: var(--color-instagram);
    color: #fff;
}

/* 3. Facebook */
.facebook-btn {
    border-left: 4px solid var(--color-facebook);
}
.facebook-btn .btn-icon {
    background: rgba(24, 119, 242, 0.1);
    color: var(--color-facebook);
}
.facebook-btn:hover {
    border-color: var(--color-facebook);
    box-shadow: 0 8px 24px rgba(24, 119, 242, 0.15);
}
.facebook-btn:hover .btn-icon {
    background: var(--color-facebook);
    color: #fff;
}

/* 4. Fale Conosco (WhatsApp Direto) */
.contact-btn {
    border-left: 4px solid var(--color-success);
}
.contact-btn .btn-icon {
    background: rgba(16, 185, 129, 0.1);
    color: var(--color-success);
}
.contact-btn:hover {
    border-color: var(--color-success);
    box-shadow: 0 8px 24px rgba(16, 185, 129, 0.15);
}
.contact-btn:hover .btn-icon {
    background: var(--color-success);
    color: #fff;
}

/* 5. Site / Projetos */
.website-btn {
    border-left: 4px solid var(--color-website);
}
.website-btn .btn-icon {
    background: rgba(59, 130, 246, 0.1);
    color: var(--color-website);
}
.website-btn:hover {
    border-color: var(--color-website);
    box-shadow: 0 8px 24px rgba(59, 130, 246, 0.15);
}
.website-btn:hover .btn-icon {
    background: var(--color-website);
    color: #fff;
}

/* Ações Secundárias (Salvar e Compartilhar) */
.card-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 25px;
}

.action-btn {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    padding: 12px;
    color: var(--color-text-secondary);
    font-family: var(--font-heading);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition-smooth);
    text-decoration: none;
}

.action-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--color-text-primary);
    border-color: rgba(255, 255, 255, 0.2);
}

.action-btn i {
    font-size: 14px;
}

/* Rodapé do Cartão */
.card-footer {
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 20px;
}

.card-footer p {
    font-size: 11px;
    color: var(--color-text-muted);
    margin-bottom: 4px;
}

.card-footer .gabinete-info {
    font-size: 10px;
    color: rgba(255,255,255,0.25);
}

/* Toast Notification (Feedback de Ação) */
.toast-notification {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: rgba(15, 23, 42, 0.9);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: var(--color-text-primary);
    padding: 12px 24px;
    border-radius: 30px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
    z-index: 100;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    font-family: var(--font-heading);
    font-weight: 500;
    opacity: 0;
    pointer-events: none;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

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

.toast-icon {
    color: var(--color-success);
    font-size: 16px;
}

/* Responsividade e Ajustes de Telas */
@media (max-width: 480px) {
    .card-container {
        padding: 25px 18px;
        border-radius: 24px;
    }

    .profile-name {
        font-size: 23px;
    }

    .avatar-wrapper {
        width: 105px;
        height: 105px;
    }

    .btn-title {
        font-size: 14px;
    }

    .btn-subtitle {
        font-size: 10px;
    }

    .link-btn {
        padding: 12px 16px;
    }

    .btn-icon {
        width: 40px;
        height: 40px;
        font-size: 18px;
        margin-right: 12px;
    }
}

/* Regras de Impressão para Geração de PDF */
@media print {
    @page {
        margin: 0;
        size: A4 portrait;
    }
    body {
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
        background-color: #070a13 !important;
        background-image: none !important;
        padding: 40px 0 !important;
    }
    .bg-glow, .bg-glow-secondary {
        display: none !important; /* Esconde os brilhos de fundo para evitar artefatos de renderização */
    }
    .card-container {
        background: #0f172a !important; /* Cor sólida em vez de translúcida para garantir contraste perfeito no PDF */
        border: 1px solid rgba(255, 255, 255, 0.1) !important;
        box-shadow: none !important;
        transform: none !important;
        animation: none !important;
        margin: 0 auto !important;
        max-width: 440px !important;
        opacity: 1 !important;
    }
    .link-btn {
        opacity: 1 !important; /* Força os botões a ficarem visíveis (ignora o delay da animação do JS na impressão) */
        transform: none !important;
        transition: none !important;
    }
    .toast-notification {
        display: none !important;
    }
}

