/* ============================================================
   Digital Business Card — Glassmorphism Design
   Mobile-first, Bootstrap 5
   ============================================================ */

:root {
    --color-primary:      #51CEC0;        /* turquesa principal */
    --color-primary-end:  #8FE3DA;        /* versión más clara para gradiente */
    --color-primary-text: #3AAFA3;        /* tono más oscuro para texto sobre claro */
    --color-primary-rgb:  81, 206, 192;   /* para uso con rgba() */
}

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

body {
    font-family: 'Inter', sans-serif;
    margin: 0;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem 1rem;
}

.bg-fixed {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;     /* fallback */
    height: 100lvh;    /* large viewport height: no salta cuando el chrome del navegador se oculta */
    background-size: cover;
    background-position: center;
    z-index: -1;
    transform: translateZ(0); /* promueve a capa GPU para evitar re-renders */
    will-change: transform;
}

/* ── Full-screen overlay ── */
.page-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    height: 100lvh;
    background: linear-gradient(
        135deg,
        rgba(10, 10, 30, 0.65) 0%,
        rgba(20, 20, 60, 0.55) 100%
    );
    z-index: 0;
}

/* ── Card: glassmorphism ── */
.card-wrapper {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 400px;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 28px;
    padding: 2.5rem 2rem 2rem;
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);

    /* Entry animation */
    animation: cardIn 0.7s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes cardIn {
    from {
        opacity: 0;
        transform: translateY(40px) scale(0.97);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* ── Profile section ── */
.profile-section {
    display: flex;
    justify-content: center;
    margin-bottom: 1.5rem;
    animation: fadeUp 0.6s 0.15s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.photo-ring {
    position: relative;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    padding: 3px;

    /* Animated gradient ring */
    background: linear-gradient(135deg, var(--color-primary), var(--color-primary-end), var(--color-primary));
    background-size: 200% 200%;
    animation:
        fadeUp 0.6s 0.15s cubic-bezier(0.22, 1, 0.36, 1) both,
        ringRotate 3s linear infinite;
}

@keyframes ringRotate {
    from { background-position: 0% 50%; }
    to   { background-position: 200% 50%; }
}

.profile-photo {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid rgba(255,255,255,0.15);
    display: block;
    background-color: #2d2d4e;
}

/* ── Name & Title ── */
.identity-section {
    text-align: center;
    margin-bottom: 1.5rem;
    animation: fadeUp 0.6s 0.25s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.client-name {
    font-size: 1.65rem;
    font-weight: 700;
    color: #ffffff;
    margin: 0 0 0.6rem;
    letter-spacing: -0.02em;
    text-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.title-badge {
    display: inline-block;
    background: rgba(var(--color-primary-rgb), 0.3);
    border: 1px solid rgba(var(--color-primary-rgb), 0.5);
    color: var(--color-primary-end);
    font-size: 0.88rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    padding: 0.3rem 0.9rem;
    border-radius: 100px;
}

/* ── Tagline ── */
.tagline-section {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 0 1rem 1.25rem;
    animation: fadeUp 0.6s 0.3s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.tagline-section::before,
.tagline-section::after {
    content: '';
    flex: 1;
    height: 1px;
    background: rgba(255, 255, 255, 0.2);
}

.tagline-text {
    margin: 0;
    font-size: 0.875rem;
    font-style: italic;
    color: rgba(255, 255, 255, 0.75);
    line-height: 1.5;
    text-align: center;
}

.tagline-text::before {
    content: '\201C';
    margin-right: 0.1em;
    font-size: 1.1em;
    opacity: 0.45;
}

.tagline-text::after {
    content: '\201D';
    margin-left: 0.1em;
    font-size: 1.1em;
    opacity: 0.45;
}

/* ── Divider ── */
.divider-line {
    height: 1px;
    background: rgba(255, 255, 255, 0.15);
    margin: 0 0 1.5rem;
    animation: fadeUp 0.6s 0.3s cubic-bezier(0.22, 1, 0.36, 1) both;
}

/* ── Contact Buttons ── */
.contact-section {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    margin-bottom: 1.75rem;
    animation: fadeUp 0.6s 0.35s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.contact-btn {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.8rem 1rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 14px;
    color: #ffffff;
    text-decoration: none;
    transition: background 0.2s, transform 0.2s, box-shadow 0.2s;
}

.contact-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateX(4px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.2);
    color: #ffffff;
}

.contact-btn__icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--color-primary), var(--color-primary-end));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    color: #1a1a2e;
    flex-shrink: 0;
}

.contact-btn__text {
    flex: 1;
    font-size: 0.9rem;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.contact-btn__icon--whatsapp {
    background: #25D366;
}

.contact-btn--whatsapp {
    background: rgba(37, 211, 102, 0.15);
    border-color: rgba(37, 211, 102, 0.4);
}

.contact-btn--whatsapp:hover {
    background: rgba(37, 211, 102, 0.25);
}

.contact-btn__icon--maps {
    background: linear-gradient(135deg, #34a853, #1a73e8);
}

.contact-btn__arrow {
    font-size: 0.75rem;
    opacity: 0.5;
    flex-shrink: 0;
}

/* ── Social Media ── */
.social-section {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.65rem;
    animation: fadeUp 0.6s 0.45s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.social-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.65rem 0.5rem;
    border-radius: 12px;
    color: #ffffff;
    text-decoration: none;
    font-size: 0.82rem;
    font-weight: 600;
    transition: transform 0.2s, box-shadow 0.2s, filter 0.2s;
    box-shadow: 0 2px 8px rgba(0,0,0,0.25);
}

.social-btn i {
    font-size: 1rem;
}

.social-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.3);
    filter: brightness(1.1);
    color: #ffffff;
}

.social-btn--email     { background: linear-gradient(45deg, #4A90D9, #1a5fa8); }
.social-btn--instagram { background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888); }
.social-btn--facebook  { background: linear-gradient(45deg, #1877F2, #0a4faa); }
.social-btn--youtube   { background: linear-gradient(45deg, #FF0000, #a80000); }
.social-btn--tiktok    { background: linear-gradient(45deg, #010101, #69C9D0, #EE1D52); }
.social-btn--x         { background: linear-gradient(45deg, #000000, #2d2d2d); }
.social-btn--location  { background: linear-gradient(45deg, #d6b731, #f5d020, #a07c10); }

/* ── Share via WhatsApp ── */
.share-section {
    margin-top: 1rem;
    animation: fadeUp 0.6s 0.55s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.share-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    width: 100%;
    padding: 0.8rem 1rem;
    background: rgba(37, 211, 102, 0.15);
    border: 1px solid rgba(37, 211, 102, 0.4);
    border-radius: 14px;
    color: #5eff9e;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.2s, transform 0.2s, box-shadow 0.2s;
}

.share-btn i {
    font-size: 1.1rem;
}

.share-btn:hover {
    background: rgba(37, 211, 102, 0.28);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.2);
    color: #5eff9e;
}

/* ── QR Code ── */
.qr-section {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    animation: fadeUp 0.6s 0.65s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.qr-label {
    margin: 0;
    font-size: 0.78rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.55);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

#qr-code {
    background: #ffffff;
    padding: 10px;
    border-radius: 14px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    line-height: 0;
}

#qr-code img,
#qr-code canvas {
    display: block;
    border-radius: 6px;
}

.qr-url {
    margin: 0;
    font-size: 0.72rem;
    color: rgba(255, 255, 255, 0.35);
    word-break: break-all;
    text-align: center;
}

/* ── Shared fade-up animation ── */
@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
