/* ========================================
   DIGITAL BUSINESS CARD - LIGHT THEME
   Colors: #ecedf1 (bg) / #232321 (text)
   ======================================== */

/* CSS Custom Properties */
:root {
    --bg-primary: #ecedf1;
    --bg-card: #ffffff;

    --surface-1: #f4f5f7;
    --surface-2: #ecedf1;
    --surface-3: #e2e3e8;

    --text-primary: #232321;
    --text-secondary: #6b6d7b;
    --text-muted: #9a9caa;

    --accent-blue: #2d7ff9;
    --accent-green: #25d366;
    --accent-linkedin: #0a66c2;

    --border: rgba(0, 0, 0, 0.08);
    --border-hover: rgba(0, 0, 0, 0.15);

    --radius-sm: 12px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-xl: 28px;
    --radius-full: 50%;

    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.1);

    --transition-fast: 0.15s ease;
    --transition-base: 0.25s ease;
}

/* Reset & Base */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Hide animated bg orbs for light theme */
.bg-animation {
    display: none;
}

/* ========================================
   CONTAINER
   ======================================== */
.container {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 420px;
    padding: 16px;
    margin: 16px auto;
}

/* ========================================
   CARD
   ======================================== */
.card {
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    overflow: hidden;
    position: relative;
    box-shadow: var(--shadow-lg);
    animation: cardAppear 0.6s cubic-bezier(0.16, 1, 0.3, 1) both;
}

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

/* Top glow line — subtle gray for light theme */
.card-glow-line {
    height: 2px;
    background: linear-gradient(90deg, var(--surface-3), var(--surface-2), var(--surface-3));
}

.card-glow-line::after {
    display: none;
}

/* ========================================
   PROFILE SECTION
   ======================================== */
.profile-section {
    padding: 40px 28px 28px;
    text-align: center;
    background: linear-gradient(180deg, #2c2c2c 0%, #4a4a4a 60%, #8a8a8a 85%, var(--bg-card) 100%);
    position: relative;
}

.avatar-wrapper {
    position: relative;
    width: 110px;
    height: 110px;
    margin: 0 auto 20px;
}

.avatar-ring {
    position: absolute;
    inset: -4px;
    border-radius: var(--radius-full);
    background: linear-gradient(135deg, #c0c0c0, #888888);
    opacity: 0.8;
}

.avatar {
    width: 100%;
    height: 100%;
    border-radius: var(--radius-full);
    object-fit: cover;
    position: relative;
    z-index: 1;
    border: 4px solid rgba(255, 255, 255, 0.15);
}

.status-dot {
    display: none;
}

.name {
    font-size: 1.6rem;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: -0.02em;
    margin-bottom: 6px;
    line-height: 1.2;
}

.title {
    font-size: 0.92rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 0;
    letter-spacing: 0.01em;
}

.company {
    display: none;
}

/* ========================================
   DIVIDER
   ======================================== */
.divider {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 28px;
    margin: 0;
}

.divider-line {
    flex: 1;
    height: 1px;
    background: var(--border);
}

.divider-dot {
    display: none;
}

/* ========================================
   QUICK ACTION ICONS
   ======================================== */
.quick-actions {
    display: flex;
    justify-content: center;
    gap: 16px;
    padding: 4px 28px 20px;
}

.quick-btn {
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--surface-1);
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    color: var(--text-secondary);
    text-decoration: none;
    transition: all var(--transition-base);
    animation: popIn 0.4s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.quick-btn:nth-child(1) { animation-delay: 0.2s; }
.quick-btn:nth-child(2) { animation-delay: 0.3s; }
.quick-btn:nth-child(3) { animation-delay: 0.4s; }

@keyframes popIn {
    from {
        opacity: 0;
        transform: scale(0.6);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.quick-btn:hover {
    background: var(--surface-2);
    color: var(--text-primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.quick-btn:active {
    transform: scale(0.92);
}

/* ========================================
   COMPANY SECTION
   ======================================== */
.company-section {
    padding: 0 20px;
}

.company-section .contact-item {
    border-bottom: none;
}

.company-section .contact-label {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.company-section .contact-value {
    font-size: 0.88rem;
}

/* Address wrap */
.contact-value-wrap {
    white-space: normal !important;
    line-height: 1.4;
    font-size: 0.85rem !important;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.01em;
}
/* ========================================
   CONTACT SECTION
   ======================================== */
.contact-section {
    padding: 16px 20px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    background: transparent;
    border: none;
    border-bottom: 1px solid var(--border);
    border-radius: 0;
    text-decoration: none;
    color: inherit;
    transition: all var(--transition-base);
    cursor: pointer;
    position: relative;
}

.contact-item:last-child {
    border-bottom: none;
}

.contact-item::before {
    display: none;
}

.contact-item:hover, .contact-item:active {
    background: var(--surface-1);
    border-radius: var(--radius-sm);
    transform: none;
}

.contact-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--surface-1);
    border-radius: var(--radius-full);
    color: var(--text-secondary);
    flex-shrink: 0;
    transition: all var(--transition-base);
}

.contact-item:hover .contact-icon {
    background: var(--surface-2);
    color: var(--text-primary);
}

.contact-details {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.contact-label {
    font-size: 0.72rem;
    font-weight: 400;
    color: var(--text-muted);
    text-transform: none;
    letter-spacing: 0.02em;
}

.contact-value {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.contact-arrow {
    color: var(--text-muted);
    opacity: 0.4;
    transform: translateX(0);
    transition: all var(--transition-base);
}

.contact-item:hover .contact-arrow {
    opacity: 0.8;
    color: var(--text-secondary);
}

/* ========================================
   SOCIAL FOLLOW SECTION
   ======================================== */
.social-follow-section {
    padding: 8px 20px 4px;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.section-label {
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--text-secondary);
    padding: 8px 16px 4px;
    letter-spacing: 0.01em;
}

.social-link-item {
    animation-delay: 0.4s !important;
}

.social-link-item:nth-child(3) {
    animation-delay: 0.5s !important;
}

.social-icon-whatsapp {
    color: #25d366 !important;
    background: rgba(37, 211, 102, 0.1) !important;
}

.social-link-item:hover .social-icon-whatsapp {
    background: rgba(37, 211, 102, 0.18) !important;
}

.social-icon-linkedin {
    color: #0a66c2 !important;
    background: rgba(10, 102, 194, 0.1) !important;
}

.social-link-item:hover .social-icon-linkedin {
    background: rgba(10, 102, 194, 0.18) !important;
}

/* ========================================
   QR CODE SECTION
   ======================================== */
.qr-section {
    padding: 8px 20px 16px;
    text-align: center;
}

.qr-wrapper {
    display: flex;
    justify-content: center;
    padding: 16px 0 8px;
}

.qr-wrapper #qrcode {
    display: inline-block;
    padding: 12px;
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-sm);
    animation: slideIn 0.5s cubic-bezier(0.16, 1, 0.3, 1) 0.6s both;
}

.qr-wrapper #qrcode img,
.qr-wrapper #qrcode canvas {
    display: block !important;
    border-radius: 4px;
}

.qr-hint {
    font-size: 0.72rem;
    color: var(--text-muted);
    margin-top: 4px;
    letter-spacing: 0.02em;
}

/* ========================================
   ACTION SECTION
   ======================================== */
.action-section {
    padding: 16px 20px 12px;
    display: flex;
    gap: 10px;
}

.save-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 16px 20px;
    background: var(--text-primary);
    border: none;
    border-radius: var(--radius-md);
    color: #ffffff;
    font-family: 'Inter', sans-serif;
    font-size: 0.92rem;
    font-weight: 600;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: all var(--transition-base);
    letter-spacing: 0.01em;
}

.save-btn-bg {
    display: none;
}

.save-btn:hover {
    background: #3a3a38;
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(35, 35, 33, 0.25);
}

.save-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(35, 35, 33, 0.15);
}

.save-btn svg {
    position: relative;
    z-index: 1;
}

.save-btn span {
    position: relative;
    z-index: 1;
}

.share-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 16px 20px;
    background: var(--surface-1);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-family: 'Inter', sans-serif;
    font-size: 0.88rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-base);
}

.share-btn:hover {
    background: var(--surface-2);
    color: var(--text-primary);
    border-color: var(--border-hover);
    transform: translateY(-1px);
}

.share-btn:active {
    transform: translateY(0);
}

/* ========================================
   FOOTER
   ======================================== */
.card-footer {
    padding: 12px 20px 16px;
    text-align: center;
}

.card-footer p {
    font-size: 0.7rem;
    color: var(--text-muted);
    letter-spacing: 0.04em;
}

/* ========================================
   TOAST NOTIFICATION
   ======================================== */
.toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 24px;
    background: var(--text-primary);
    border: none;
    border-radius: 14px;
    color: #ffffff;
    font-size: 0.88rem;
    font-weight: 500;
    box-shadow: var(--shadow-lg);
    z-index: 1000;
    opacity: 0;
    transition: all 0.4s ease;
    pointer-events: none;
    white-space: nowrap;
}

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

.toast svg {
    color: #22c55e;
    flex-shrink: 0;
}

/* ========================================
   RESPONSIVE
   ======================================== */
@media (max-width: 480px) {
    .container {
        padding: 8px;
        margin: 8px auto;
    }

    .card {
        border-radius: 22px;
    }

    .profile-section {
        padding: 28px 20px 16px;
    }

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

    .name {
        font-size: 1.45rem;
    }

    .contact-section {
        padding: 12px 14px;
    }

    .contact-item {
        padding: 12px 14px;
        gap: 12px;
    }

    .contact-icon {
        width: 36px;
        height: 36px;
    }

    .social-follow-section {
        padding: 8px 14px 4px;
    }

    .action-section {
        padding: 12px 14px 10px;
        flex-direction: column;
        gap: 8px;
    }

    .share-btn {
        padding: 14px;
    }
}

@media (min-width: 481px) and (max-width: 768px) {
    .container {
        max-width: 440px;
    }
}

/* Touch device optimizations */
@media (hover: none) {
    .contact-arrow {
        opacity: 0.3;
        transform: translateX(0);
    }

    .contact-item:active {
        background: var(--surface-1);
        transform: scale(0.98);
    }

    .save-btn:active {
        transform: scale(0.97);
    }
}

/* Animations for items appearing */
.contact-item {
    animation: slideIn 0.5s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.contact-item:nth-child(1) { animation-delay: 0.1s; }
.contact-item:nth-child(2) { animation-delay: 0.15s; }
.contact-item:nth-child(3) { animation-delay: 0.2s; }
.contact-item:nth-child(4) { animation-delay: 0.25s; }

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Save button animation */
.save-btn {
    animation: btnAppear 0.5s cubic-bezier(0.16, 1, 0.3, 1) 0.5s both;
}

@keyframes btnAppear {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Print styles */
@media print {
    body { background: white; }
    .card { box-shadow: none; border: 1px solid #ddd; }
    .action-section { display: none; }
}
