/* ==========================================================================
   Federal Beacons - Public Bio Page Stylesheet
   Modern, Mobile-First, Responsive & Circular Buttons
   ========================================================================== */

:root {
    --fed-navy: #005696;
    --fed-navy-dark: #003e6d;
    --fed-navy-light: #0d6efd;
    --fed-green: #8ac53e;
    --fed-green-dark: #70a12f;
    --fed-green-light: #a3dc55;
    --fed-text-main: #0f172a;
    --fed-text-muted: #64748b;
    --fed-card-bg: rgba(255, 255, 255, 0.95);
    --fed-border-radius-circle: 50%;
    --fed-shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
    --fed-shadow-md: 0 10px 25px -3px rgba(0, 86, 150, 0.15), 0 4px 6px -4px rgba(0, 86, 150, 0.1);
    --fed-shadow-circle: 0 12px 28px rgba(0, 86, 150, 0.22);
    --fed-shadow-circle-hover: 0 18px 36px rgba(138, 197, 62, 0.35);
    --fed-transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

html, body {
    width: 100%;
    min-height: 100vh;
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    color: var(--fed-text-main);
    background-color: #f8fafc;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

/* Background Types */
.bg-federal_pattern {
    background-color: #f8fafc;
    background-image: url('../img/federal_bg.svg');
    background-repeat: no-repeat;
    background-position: top center;
    background-size: cover;
    background-attachment: fixed;
}

.bg-color {
    background-color: var(--custom-bg-value, #f8fafc);
}

.bg-gradient {
    background: var(--custom-bg-value, linear-gradient(135deg, #005696 0%, #8ac53e 100%));
    background-attachment: fixed;
}

.bg-image {
    background-image: var(--custom-bg-value);
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    background-repeat: no-repeat;
}

/* Background Blur Layer (Controle Dinâmico de Desfoque) */
.beacons-bg-blur-layer {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100vw;
    height: 100vh;
    z-index: 0;
    pointer-events: none;
    transition: backdrop-filter 0.25s ease, -webkit-backdrop-filter 0.25s ease;
}

/* Main Container */
.beacons-container {
    max-width: 580px;
    margin: 0 auto;
    min-height: 100vh;
    padding: 24px 20px 60px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 1;
}

/* Top Action Bar (QR Code, Share, Admin button) */
.top-action-bar {
    width: 100%;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-bottom: 20px;
}

.action-icon-btn {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(226, 232, 240, 0.8);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--fed-navy);
    cursor: pointer;
    box-shadow: var(--fed-shadow-sm);
    transition: var(--fed-transition);
    backdrop-filter: blur(10px);
    text-decoration: none;
}

.action-icon-btn:hover {
    transform: translateY(-3px) scale(1.08);
    box-shadow: var(--fed-shadow-md);
    background: #ffffff;
    color: var(--fed-green-dark);
}

.action-icon-btn svg {
    width: 20px;
    height: 20px;
}

/* Profile Header Section */
.profile-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    margin-bottom: 32px;
    width: 100%;
}

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

.avatar-img {
    width: 124px;
    height: 124px;
    border-radius: 50%;
    object-fit: cover;
    background: #ffffff;
    padding: 6px;
    border: 4px solid var(--fed-navy);
    box-shadow: 0 14px 30px rgba(0, 86, 150, 0.18);
    transition: var(--fed-transition);
    animation: avatarFloat 4s ease-in-out infinite alternate;
}

@keyframes avatarFloat {
    0% { transform: translateY(0px); }
    100% { transform: translateY(-6px); }
}

.avatar-badge {
    position: absolute;
    bottom: 4px;
    right: 4px;
    background: var(--fed-green);
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 3px solid #ffffff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.avatar-badge svg {
    width: 14px;
    height: 14px;
}

.profile-title {
    font-size: 28px;
    font-weight: 800;
    color: var(--fed-navy);
    letter-spacing: -0.5px;
    margin-bottom: 6px;
    font-family: 'Playfair Display', 'Plus Jakarta Sans', serif;
}

.profile-subtitle {
    font-size: 15px;
    font-weight: 500;
    color: var(--fed-text-muted);
    max-width: 440px;
    line-height: 1.45;
    margin-bottom: 18px;
}

/* Social Network Icons Bar */
.social-icons-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}

.social-link {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--fed-navy);
    background: rgba(255, 255, 255, 0.85);
    border: 1px solid rgba(0, 86, 150, 0.12);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.04);
    transition: var(--fed-transition);
    text-decoration: none;
}

.social-link:hover {
    color: #ffffff;
    background: var(--fed-navy);
    transform: translateY(-4px) scale(1.12);
    box-shadow: 0 8px 18px rgba(0, 86, 150, 0.25);
}

.social-link.youtube:hover { background: #ff0000; }
.social-link.instagram:hover { background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fdf497 5%, #fd5949 45%, #d6249f 60%, #285AEB 90%); }
.social-link.linkedin:hover { background: #0077b5; }
.social-link.whatsapp:hover { background: #25d366; }
.social-link.mail:hover { background: var(--fed-green-dark); }

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

/* ==========================================================================
   CIRCULAR BUTTONS SECTION (REQUISITO FUNDAMENTAL)
   ========================================================================== */
.buttons-section {
    width: 100%;
    margin-top: 10px;
}

/* Layout 1: Círculos em Grade (Default & Recommended) */
.circle-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 22px 18px;
    width: 100%;
}

@media (min-width: 500px) {
    .circle-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 24px 20px;
    }
}

.circle-btn-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    cursor: pointer;
    group: hover;
    transition: var(--fed-transition);
}

/* The Perfect Circle Button Disc */
.circle-disc {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    background-color: var(--btn-color, var(--fed-navy));
    color: var(--btn-text-color, #ffffff);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: var(--fed-shadow-circle);
    border: 3px solid var(--btn-border-color, #ffffff);
    position: relative;
    overflow: hidden;
    transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Glossy highlight inside circle */
.circle-disc::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 48%;
    background: linear-gradient(180deg, rgba(255,255,255,0.28) 0%, rgba(255,255,255,0) 100%);
    border-radius: 50% 50% 0 0;
    pointer-events: none;
}

/* Icon inside Circle */
.circle-disc-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    transition: transform 0.3s ease;
}

.circle-disc-icon svg {
    width: 34px;
    height: 34px;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.15));
}

/* Custom Text / Siglas / Emojis inside Circle */
.fed-custom-icon-text {
    font-weight: 800;
    font-family: 'Plus Jakarta Sans', -apple-system, sans-serif;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: currentColor;
    user-select: none;
    text-transform: uppercase;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
    transition: transform 0.3s ease, color 0.3s ease;
}

.fed-custom-icon-text.custom-text-lg {
    font-size: 21px;
    letter-spacing: -0.5px;
}

.fed-custom-icon-text.custom-text-md {
    font-size: 15px;
    letter-spacing: -0.5px;
}

.fed-custom-icon-text.custom-text-sm {
    font-size: 12.5px;
    letter-spacing: -0.3px;
}


/* Hover and Click Animation */
.circle-btn-item:hover .circle-disc {
    background-color: var(--btn-hover-color, var(--fed-green));
    color: var(--btn-hover-text-color, #ffffff);
    transform: translateY(-8px) scale(1.08);
    box-shadow: var(--fed-shadow-circle-hover);
    border-color: #ffffff;
}

.circle-btn-item:hover .circle-disc-icon {
    transform: scale(1.15) rotate(5deg);
}

.circle-btn-item:active .circle-disc {
    transform: translateY(-2px) scale(0.96);
}

/* Title beneath the circular button */
.circle-btn-label {
    margin-top: 12px;
    font-size: 13.5px;
    font-weight: 700;
    text-align: center;
    color: var(--fed-text-main);
    max-width: 130px;
    line-height: 1.35;
    transition: color 0.25s ease;
}

.circle-btn-item:hover .circle-btn-label {
    color: var(--btn-hover-color, var(--fed-green-dark));
}

/* Layout 2: Discos Circulares Grandes com Texto Interno */
.circle_large .circle-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.circle_large .circle-disc {
    width: 130px;
    height: 130px;
    padding: 12px;
    text-align: center;
}

.circle_large .circle-disc-icon svg {
    width: 32px;
    height: 32px;
}

.circle_large .circle-disc-title-inner {
    font-size: 11.5px;
    font-weight: 700;
    margin-top: 4px;
    line-height: 1.25;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

.circle_large .circle-btn-label {
    display: none; /* Already inside circle */
}

/* Layout 3: Cartões com Círculo Flutuante (Circle Cards) */
.circle_card .circle-grid {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.circle_card .circle-btn-item {
    flex-direction: row;
    background: var(--btn-card-bg, #ffffff);
    border-radius: 40px;
    padding: 8px 18px 8px 10px;
    box-shadow: 0 4px 14px rgba(0, 86, 150, 0.08);
    border: 1px solid rgba(226, 232, 240, 0.8);
    backdrop-filter: blur(8px);
    transition: var(--fed-transition);
}

.circle_card .circle-disc {
    width: 58px;
    height: 58px;
    min-width: 58px;
    border-width: 2px;
    box-shadow: 0 4px 10px rgba(0, 86, 150, 0.15);
}

.circle_card .circle-disc-icon svg {
    width: 24px;
    height: 24px;
}

.circle_card .circle-btn-label {
    margin-top: 0;
    margin-left: 14px;
    font-size: 15px;
    font-weight: 700;
    text-align: left;
    max-width: none;
    flex: 1;
    color: var(--btn-card-text, var(--fed-text-main));
}

.circle_card .circle-btn-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0, 86, 150, 0.14);
    border-color: var(--btn-hover-color, var(--fed-green));
}

/* Empty links state */
.empty-links {
    text-align: center;
    padding: 40px 20px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 20px;
    border: 2px dashed #cbd5e1;
    color: var(--fed-text-muted);
}

/* Footer Section */
.beacons-footer {
    margin-top: auto;
    padding-top: 48px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 600;
    color: var(--fed-navy);
    text-decoration: none;
    padding: 6px 14px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 20px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.06);
    transition: var(--fed-transition);
}

.footer-brand:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 14px rgba(0, 86, 150, 0.15);
}

.footer-brand img {
    width: 18px;
    height: 18px;
}

.footer-admin-link {
    font-size: 12px;
    color: var(--fed-text-muted);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: color 0.2s;
}

.footer-admin-link:hover {
    color: var(--fed-navy);
    text-decoration: underline;
}

/* Share / QR Modal */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
    z-index: 999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 16px;
    animation: fadeIn 0.2s ease;
}

.modal-overlay.active {
    display: flex;
}

.modal-card {
    background: #ffffff;
    border-radius: 24px;
    max-width: 420px;
    width: 100%;
    padding: 28px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
    position: relative;
    animation: modalScaleUp 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes modalScaleUp {
    from { transform: scale(0.9); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.modal-close-btn {
    position: absolute;
    top: 18px;
    right: 18px;
    background: #f1f5f9;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
    transition: var(--fed-transition);
}

.modal-close-btn:hover {
    background: #e2e8f0;
    color: #0f172a;
}

.modal-qr-container {
    text-align: center;
    margin: 20px 0;
}

.modal-qr-container img {
    width: 180px;
    height: 180px;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    padding: 6px;
    background: white;
}

.copy-input-group {
    display: flex;
    gap: 8px;
    margin-top: 16px;
}

.copy-input {
    flex: 1;
    padding: 10px 14px;
    border-radius: 10px;
    border: 1px solid #cbd5e1;
    font-size: 13px;
    background: #f8fafc;
    color: #334155;
    outline: none;
}

.copy-btn {
    padding: 10px 18px;
    background: var(--fed-navy);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--fed-transition);
}

.copy-btn:hover {
    background: var(--fed-green-dark);
}

/* Toast Notification */
.fed-toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: #0f172a;
    color: #ffffff;
    padding: 12px 24px;
    border-radius: 30px;
    font-size: 14px;
    font-weight: 600;
    box-shadow: 0 10px 25px rgba(0,0,0,0.25);
    z-index: 1000;
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
    display: flex;
    align-items: center;
    gap: 8px;
}

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