/* =================================================================
   CARD PAGE STYLES — Grupo Nextil Digital Business Card
   Design: Dark glassmorphism, animated background, premium feel
================================================================= */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

/* ---- TOKENS ---- */
:root {
  --bg:           #060B18;
  --card-bg:      rgba(255, 255, 255, 0.045);
  --card-border:  rgba(255, 255, 255, 0.10);
  --text:         #FFFFFF;
  --text-muted:   rgba(255, 255, 255, 0.55);
  --text-faint:   rgba(255, 255, 255, 0.30);
  --accent:       #2563EB;
  --accent-2:     #7C3AED;
  --blur:         blur(24px);
  --radius-card:  28px;
  --radius-btn:   16px;
  --radius-icon:  12px;
  --shadow-card:  0 40px 80px rgba(0, 0, 0, 0.55);
  --transition:   0.22s cubic-bezier(0.34, 1.56, 0.64, 1);
  --theme:        linear-gradient(135deg, #2563EB 0%, #7C3AED 100%);
  --theme-glow:   rgba(37, 99, 235, 0.35);
}

/* Company themes */
[data-company="apolo"] {
  --accent:     #F59E0B;
  --accent-2:   #EF4444;
  --theme:      linear-gradient(135deg, #F59E0B 0%, #EF4444 100%);
  --theme-glow: rgba(245, 158, 11, 0.3);
}
[data-company="corretora"] {
  --accent:     #10B981;
  --accent-2:   #0EA5E9;
  --theme:      linear-gradient(135deg, #10B981 0%, #0EA5E9 100%);
  --theme-glow: rgba(16, 185, 129, 0.3);
}
[data-company="nextil"] {
  --accent:     #6366F1;
  --accent-2:   #EC4899;
  --theme:      linear-gradient(135deg, #6366F1 0%, #EC4899 100%);
  --theme-glow: rgba(99, 102, 241, 0.3);
}

/* ---- RESET ---- */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ---- LOADING SCREEN ---- */
#loading-screen {
  position: fixed; inset: 0;
  background: var(--bg);
  display: flex; align-items: center; justify-content: center;
  z-index: 999;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}
#loading-screen.fade-out { opacity: 0; visibility: hidden; }

.loading-ring {
  width: 52px; height: 52px;
  border: 3px solid rgba(37, 99, 235, 0.15);
  border-top-color: #2563EB;
  border-radius: 50%;
  animation: spin 0.75s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---- ERROR STATE ---- */
#error-screen {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg); padding: 24px;
}
.error-box {
  text-align: center; max-width: 320px;
}
.error-emoji { font-size: 64px; display: block; margin-bottom: 20px; }
.error-box h2 { font-size: 22px; font-weight: 700; margin-bottom: 8px; }
.error-box p  { color: var(--text-muted); font-size: 14px; margin-bottom: 24px; line-height: 1.6; }
.btn-error-back {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 24px; border-radius: 12px;
  background: rgba(37,99,235,0.12); border: 1px solid rgba(37,99,235,0.25);
  color: #60A5FA; text-decoration: none; font-weight: 600; font-size: 14px;
  transition: all 0.2s;
}
.btn-error-back:hover { background: rgba(37,99,235,0.2); }

/* ---- ANIMATED BG ---- */
.bg-layer {
  position: fixed; inset: 0; z-index: 0; overflow: hidden;
  pointer-events: none;
}
.bg-orb {
  position: absolute; border-radius: 50%;
  filter: blur(90px); opacity: 0.12;
}
.orb-1 {
  width: 600px; height: 600px; background: #2563EB;
  top: -200px; left: -200px;
  animation: orb-float 9s ease-in-out infinite;
}
.orb-2 {
  width: 500px; height: 500px; background: #7C3AED;
  bottom: -150px; right: -150px;
  animation: orb-float 12s ease-in-out infinite reverse;
}
.orb-3 {
  width: 350px; height: 350px; background: #0EA5E9;
  top: 40%; left: 55%;
  animation: orb-float 7s ease-in-out infinite 3s;
}
@keyframes orb-float {
  0%,100% { transform: translateY(0) scale(1); }
  50%      { transform: translateY(-40px) scale(1.08); }
}

/* ---- MAIN CARD LAYOUT ---- */
#card-container {
  position: relative; z-index: 1;
  min-height: 100vh;
  display: flex; align-items: flex-start; justify-content: center;
  padding: 48px 16px 80px;
}
.card-wrapper {
  width: 100%; max-width: 440px;
  background: var(--card-bg);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-card);
  padding: 36px 28px 32px;
  box-shadow: var(--shadow-card);
  animation: card-in 0.65s cubic-bezier(0.22, 1, 0.36, 1) both;
}
@keyframes card-in {
  from { opacity: 0; transform: translateY(50px) scale(0.94); }
  to   { opacity: 1; transform: translateY(0)   scale(1); }
}

/* ---- COMPANY BADGE ---- */
.company-badge {
  display: flex; align-items: center; gap: 8px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 100px;
  padding: 6px 14px 6px 10px;
  width: fit-content; margin: 0 auto 28px;
}
.company-badge img { height: 22px; width: auto; object-fit: contain; }
.company-badge span {
  font-size: 11px; font-weight: 700;
  color: rgba(255,255,255,0.65);
  letter-spacing: 1px; text-transform: uppercase;
}

/* ---- PROFILE SECTION ---- */
.profile-section { text-align: center; margin-bottom: 28px; }

.avatar-wrap {
  position: relative; width: 108px; height: 108px;
  margin: 0 auto 18px;
}
.avatar-ring {
  position: absolute; inset: -4px; border-radius: 50%;
  background: var(--theme);
  animation: ring-pulse 3s ease-in-out infinite;
}
@keyframes ring-pulse {
  0%,100% { box-shadow: 0 0 0 0 var(--theme-glow); }
  50%      { box-shadow: 0 0 0 8px transparent; }
}
.avatar-img, .avatar-initials {
  position: absolute; inset: 4px; border-radius: 50%;
  border: 3px solid var(--bg);
  display: flex; align-items: center; justify-content: center;
}
.avatar-img {
  object-fit: cover; width: calc(100% - 8px); height: calc(100% - 8px);
}
.avatar-initials {
  background: linear-gradient(135deg, rgba(37,99,235,0.25), rgba(124,58,237,0.25));
  font-size: 32px; font-weight: 800;
  background: var(--theme); -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}

.profile-name  { font-size: 28px; font-weight: 800; letter-spacing: -0.5px; margin-bottom: 4px; }
.profile-title { font-size: 14px; color: var(--text-muted); margin-bottom: 6px; font-weight: 500; }
.profile-company {
  display: inline-block;
  font-size: 12px; font-weight: 700; letter-spacing: 0.5px;
  text-transform: uppercase;
  background: var(--theme); -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text; margin-bottom: 10px;
}
.profile-bio {
  font-size: 13px; color: var(--text-muted); line-height: 1.6;
  max-width: 340px; margin: 0 auto;
}

/* ---- DIVIDER ---- */
.divider {
  height: 1px; background: var(--card-border);
  margin: 20px 0;
}

/* ---- LINKS ---- */
.links-section { display: flex; flex-direction: column; gap: 10px; margin-bottom: 20px; }

.link-btn {
  display: flex; align-items: center; gap: 14px;
  padding: 13px 16px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: var(--radius-btn);
  color: var(--text);
  text-decoration: none;
  font-size: 14px; font-weight: 500;
  cursor: pointer; width: 100%;
  text-align: left;
  transition: all var(--transition);
  position: relative; overflow: hidden;
}
.link-btn::after {
  content: '';
  position: absolute; inset: 0;
  background: var(--btn-glow, rgba(255,255,255,0.04));
  opacity: 0;
  transition: opacity 0.2s;
}
.link-btn:hover {
  transform: translateY(-3px) scale(1.01);
  border-color: rgba(255,255,255,0.13);
  box-shadow: 0 10px 30px rgba(0,0,0,0.35);
}
.link-btn:hover::after  { opacity: 1; }
.link-btn:active { transform: translateY(0) scale(0.99); }

.link-icon-wrap {
  width: 42px; height: 42px; border-radius: var(--radius-icon);
  display: flex; align-items: center; justify-content: center;
  font-size: 19px; flex-shrink: 0;
  background: var(--btn-bg, rgba(255,255,255,0.06));
  transition: transform var(--transition);
  position: relative; z-index: 1;
}
.link-btn:hover .link-icon-wrap { transform: scale(1.12) rotate(-6deg); }

.link-label { flex: 1; position: relative; z-index: 1; }
.link-label strong { display: block; font-size: 14px; font-weight: 600; }
.link-label small  { display: block; font-size: 11px; color: var(--text-muted); margin-top: 1px; }

.link-arrow {
  color: var(--text-faint); font-size: 12px;
  position: relative; z-index: 1;
  transition: transform 0.2s, color 0.2s;
}
.link-btn:hover .link-arrow { transform: translateX(4px); color: var(--text-muted); }

/* Type-specific colors */
.type-whatsapp  { --btn-bg: rgba(37,211,102,0.15); --btn-glow: rgba(37,211,102,0.06); }
.type-instagram { --btn-bg: rgba(225,48,108,0.15); --btn-glow: rgba(225,48,108,0.06); }
.type-website   { --btn-bg: rgba(37,99,235,0.15);  --btn-glow: rgba(37,99,235,0.06);  }
.type-map       { --btn-bg: rgba(234,179,8,0.15);  --btn-glow: rgba(234,179,8,0.06);  }
.type-email     { --btn-bg: rgba(99,102,241,0.15); --btn-glow: rgba(99,102,241,0.06); }
.type-phone     { --btn-bg: rgba(20,184,166,0.15); --btn-glow: rgba(20,184,166,0.06); }
.type-linkedin  { --btn-bg: rgba(10,102,194,0.15); --btn-glow: rgba(10,102,194,0.06); }
.type-catalog   { --btn-bg: rgba(239,68,68,0.15);  --btn-glow: rgba(239,68,68,0.06);  }
.type-facebook  { --btn-bg: rgba(24,119,242,0.15); --btn-glow: rgba(24,119,242,0.06); }
.type-youtube   { --btn-bg: rgba(255,0,0,0.15);    --btn-glow: rgba(255,0,0,0.06);    }

/* ---- SAVE CONTACT BTN ---- */
.btn-save {
  width: 100%;
  padding: 16px;
  border: none; border-radius: var(--radius-btn);
  background: var(--theme);
  color: white; font-size: 15px; font-weight: 700;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  cursor: pointer; letter-spacing: 0.1px;
  box-shadow: 0 6px 24px var(--theme-glow);
  transition: all var(--transition);
  margin-bottom: 28px;
}
.btn-save:hover { transform: translateY(-3px); box-shadow: 0 12px 36px var(--theme-glow); }
.btn-save:active { transform: translateY(0); }

.btn-save .check-icon { display: none; }
.btn-save.saved .save-icon  { display: none; }
.btn-save.saved .check-icon { display: inline; }

/* ---- CARD FOOTER ---- */
.card-footer {
  text-align: center;
  padding-top: 4px;
}
.footer-link {
  display: inline-flex; align-items: center; gap: 6px;
  text-decoration: none; color: var(--text-faint);
  font-size: 11px; font-weight: 500;
  transition: color 0.2s;
}
.footer-link:hover { color: var(--text-muted); }
.footer-link img {
  height: 16px; width: auto;
  opacity: 0.35; filter: brightness(0) invert(1);
  transition: opacity 0.2s;
}
.footer-link:hover img { opacity: 0.55; }
.footer-link span { letter-spacing: 0.5px; text-transform: uppercase; font-size: 10px; }

/* ---- QR SHARE BUTTON ---- */
.btn-share {
  position: fixed; bottom: 24px; right: 24px;
  width: 52px; height: 52px; border-radius: 50%;
  background: var(--theme);
  border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; color: white;
  box-shadow: 0 4px 20px var(--theme-glow);
  transition: all var(--transition);
  z-index: 50;
}
.btn-share:hover { transform: scale(1.1); }

/* ---- TOAST NOTIFICATION ---- */
.toast {
  position: fixed; bottom: 90px; left: 50%; transform: translateX(-50%);
  background: rgba(30,40,60,0.95);
  border: 1px solid rgba(255,255,255,0.1);
  backdrop-filter: blur(16px);
  color: white; padding: 12px 20px; border-radius: 12px;
  font-size: 14px; font-weight: 500;
  display: flex; align-items: center; gap: 8px;
  z-index: 200;
  animation: toast-in 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  white-space: nowrap;
}
@keyframes toast-in {
  from { opacity: 0; transform: translateX(-50%) translateY(20px); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}
.toast.out { animation: toast-out 0.3s ease forwards; }
@keyframes toast-out {
  to { opacity: 0; transform: translateX(-50%) translateY(20px); }
}

/* ---- UTILITY ---- */
.hidden { display: none !important; }

/* ---- RESPONSIVE ---- */
@media (max-width: 480px) {
  #card-container { padding: 24px 12px 64px; }
  .card-wrapper   { border-radius: 22px; padding: 28px 20px 24px; }
  .profile-name   { font-size: 24px; }
}

 / *   A c c o r d i o n   S t y l e s   * / 
 . a c c o r d i o n - w r a p   {   b a c k g r o u n d :   r g b a ( 2 5 5 , 2 5 5 , 2 5 5 , 0 . 0 3 ) ;   b o r d e r :   1 p x   s o l i d   r g b a ( 2 5 5 , 2 5 5 , 2 5 5 , 0 . 0 6 ) ;   b o r d e r - r a d i u s :   1 6 p x ;   m a r g i n - b o t t o m :   1 2 p x ;   o v e r f l o w :   h i d d e n ;   t r a n s i t i o n :   a l l   0 . 3 s   e a s e ;   } 
 . a c c o r d i o n - w r a p . a c t i v e   {   b o r d e r - c o l o r :   v a r ( - - a c c e n t ) ;   b a c k g r o u n d :   r g b a ( 2 5 5 , 2 5 5 , 2 5 5 , 0 . 0 5 ) ;   } 
 . a c c o r d i o n - b t n   {   w i d t h :   1 0 0 % ;   p a d d i n g :   1 6 p x   2 0 p x ;   b a c k g r o u n d :   t r a n s p a r e n t ;   b o r d e r :   n o n e ;   c o l o r :   # f f f ;   d i s p l a y :   f l e x ;   a l i g n - i t e m s :   c e n t e r ;   j u s t i f y - c o n t e n t :   s p a c e - b e t w e e n ;   c u r s o r :   p o i n t e r ;   f o n t - s i z e :   1 5 p x ;   f o n t - w e i g h t :   6 0 0 ;   f o n t - f a m i l y :   i n h e r i t ;   t e x t - a l i g n :   l e f t ;   t r a n s i t i o n :   a l l   0 . 2 s   e a s e ;   } 
 . a c c o r d i o n - b t n : h o v e r   {   b a c k g r o u n d :   r g b a ( 2 5 5 , 2 5 5 , 2 5 5 , 0 . 0 2 ) ;   } 
 . a c c o r d i o n - b t n   . f a - c h e v r o n - d o w n   {   t r a n s i t i o n :   t r a n s f o r m   0 . 3 s   e a s e ;   c o l o r :   v a r ( - - t e x t - f a i n t ) ;   } 
 . a c c o r d i o n - w r a p . a c t i v e   . a c c o r d i o n - b t n   . f a - c h e v r o n - d o w n   {   t r a n s f o r m :   r o t a t e ( 1 8 0 d e g ) ;   c o l o r :   # f f f ;   } 
 . a c c o r d i o n - c o n t e n t   {   m a x - h e i g h t :   0 ;   o v e r f l o w :   h i d d e n ;   t r a n s i t i o n :   m a x - h e i g h t   0 . 3 s   e a s e - o u t ;   } 
 . a c c o r d i o n - i n n e r   {   p a d d i n g :   0   1 6 p x   1 6 p x   1 6 p x ;   d i s p l a y :   f l e x ;   f l e x - d i r e c t i o n :   c o l u m n ;   g a p :   8 p x ;   } 
 . a c c o r d i o n - i t e m   {   d i s p l a y :   f l e x ;   a l i g n - i t e m s :   c e n t e r ;   g a p :   1 2 p x ;   p a d d i n g :   1 2 p x   1 6 p x ;   b a c k g r o u n d :   r g b a ( 0 , 0 , 0 , 0 . 3 ) ;   b o r d e r - r a d i u s :   1 2 p x ;   c o l o r :   v a r ( - - t e x t - m u t e d ) ;   t e x t - d e c o r a t i o n :   n o n e ;   f o n t - s i z e :   1 4 p x ;   f o n t - w e i g h t :   5 0 0 ;   t r a n s i t i o n :   a l l   0 . 2 s   e a s e ;   b o r d e r :   1 p x   s o l i d   t r a n s p a r e n t ;   } 
 . a c c o r d i o n - i t e m : h o v e r   {   c o l o r :   # f f f ;   b a c k g r o u n d :   r g b a ( 2 5 5 , 2 5 5 , 2 5 5 , 0 . 0 6 ) ;   t r a n s f o r m :   t r a n s l a t e X ( 4 p x ) ;   } 
  
 