/**
 * Digital Business Card - Executive Corporate Design
 * Premium, Refined, Sophisticated
 */

/* ===============================================
   Variables
   =============================================== */
:root {
    /* Premium Corporate Colors */
    --primary: #0066FF;
    --primary-dark: #0052CC;
    --secondary: #00B8D9;
    --accent: #36B37E;
    
    /* Neutral Palette */
    --white: #FFFFFF;
    --gray-25: #FAFBFC;
    --gray-50: #F4F5F7;
    --gray-100: #EBECF0;
    --gray-200: #DFE1E6;
    --gray-300: #C1C7D0;
    --gray-400: #A5ADBA;
    --gray-500: #6B778C;
    --gray-600: #505F79;
    --gray-700: #344563;
    --gray-800: #253858;
    --gray-900: #172B4D;
    
    /* Semantic */
    --success: #36B37E;
    --error: #FF5630;
    
    /* Background */
    --bg: #F4F5F7;
    --card: #FFFFFF;
    
    /* Shadows */
    --shadow-sm: 0 1px 1px rgba(9,30,66,0.08), 0 0 1px rgba(9,30,66,0.08);
    --shadow-md: 0 4px 8px -2px rgba(9,30,66,0.08), 0 0 1px rgba(9,30,66,0.16);
    --shadow-lg: 0 8px 16px -4px rgba(9,30,66,0.12), 0 0 1px rgba(9,30,66,0.16);
    --shadow-xl: 0 16px 32px -8px rgba(9,30,66,0.16), 0 0 1px rgba(9,30,66,0.16);
    
    /* Radius */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    
    /* Font */
    --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

[data-theme="dark"] {
    --bg: #1A1F2E;
    --card: #252B3B;
    --gray-900: #FFFFFF;
    --gray-800: #F4F5F7;
    --gray-700: #DFE1E6;
    --gray-600: #C1C7D0;
    --gray-500: #A5ADBA;
    --gray-100: #323B4D;
    --gray-50: #2A3142;
    --shadow-xl: 0 16px 32px -8px rgba(0,0,0,0.4);
}

/* ===============================================
   Base
   =============================================== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font);
    font-size: 14px;
    line-height: 1.5;
    color: var(--gray-900);
    background: var(--bg);
}

/* ===============================================
   Page Layout
   =============================================== */
.card-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px 16px;
}

/* ===============================================
   Card Container
   =============================================== */
.digital-card {
    width: 100%;
    max-width: 420px;
    background: var(--card);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    overflow: hidden;
}

/* ===============================================
   Hero Section
   =============================================== */
.card-hero {
    background: linear-gradient(135deg, var(--gray-900) 0%, var(--gray-800) 100%);
    padding: 40px 32px 32px;
    text-align: center;
    position: relative;
    background-size: cover;
    background-position: center;
}

/* Cover Image Overlay */
.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0,0,0,0.4) 0%, rgba(0,0,0,0.7) 100%);
    z-index: 1;
}

.card-hero > *:not(.hero-overlay) {
    position: relative;
    z-index: 2;
}

[data-theme="dark"] .card-hero {
    background: linear-gradient(135deg, #0D1117 0%, #161B22 100%);
}

/* Decorative accent */
.card-hero::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 32px;
    right: 32px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    border-radius: 2px 2px 0 0;
}

/* Profile Photo */
.profile-photo {
    width: 100px;
    height: 100px;
    margin: 0 auto 20px;
    position: relative;
}

.profile-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    border: 3px solid rgba(255,255,255,0.2);
}

.profile-photo-placeholder {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    display: flex;
    align-items: center;
    justify-content: center;
    border: 3px solid rgba(255,255,255,0.2);
}

.profile-photo-placeholder i {
    font-size: 40px;
    color: white;
}

/* Online Status */
.online-badge {
    position: absolute;
    bottom: 4px;
    right: 4px;
    width: 16px;
    height: 16px;
    background: var(--success);
    border: 3px solid var(--gray-900);
    border-radius: 50%;
}

[data-theme="dark"] .online-badge {
    border-color: #161B22;
}

/* Name & Title */
.profile-name {
    font-size: 24px;
    font-weight: 700;
    color: #FFFFFF;
    margin-bottom: 4px;
    letter-spacing: -0.3px;
}

.profile-role {
    font-size: 15px;
    font-weight: 500;
    color: var(--secondary);
    margin-bottom: 4px;
}

.profile-org {
    font-size: 13px;
    color: var(--gray-400);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.profile-org i {
    font-size: 11px;
}

/* ===============================================
   Quick Actions
   =============================================== */
.quick-actions {
    display: flex;
    padding: 0 32px;
    margin-top: -20px;
    position: relative;
    z-index: 10;
    gap: 12px;
}

.quick-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 16px;
    background: var(--card);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-md);
    font-size: 13px;
    font-weight: 600;
    color: var(--gray-700);
    cursor: pointer;
    transition: all 0.15s ease;
    box-shadow: var(--shadow-sm);
}

.quick-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
    box-shadow: var(--shadow-md);
}

.quick-btn i {
    font-size: 16px;
}

.quick-btn.primary {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

.quick-btn.primary:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
    color: white;
}

/* ===============================================
   About Section
   =============================================== */
.card-about {
    padding: 28px 32px;
}

.about-text {
    font-size: 14px;
    line-height: 1.7;
    color: var(--gray-600);
}

/* ===============================================
   Contact Section
   =============================================== */
.card-contact {
    padding: 0 32px 28px;
}

.section-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--gray-100);
}

.section-header i {
    font-size: 14px;
    color: var(--primary);
}

.section-header span {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--gray-500);
}

.contact-grid {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.contact-row {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    background: var(--gray-25);
    border-radius: var(--radius-md);
    transition: all 0.15s ease;
    cursor: pointer;
}

.contact-row:hover {
    background: var(--gray-50);
    transform: translateX(4px);
}

.contact-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--card);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    flex-shrink: 0;
}

.contact-icon i {
    font-size: 16px;
}

.contact-icon.blue i { color: var(--primary); }
.contact-icon.green i { color: var(--success); }
.contact-icon.cyan i { color: var(--secondary); }
.contact-icon.orange i { color: #FF8B00; }

.contact-text {
    flex: 1;
    min-width: 0;
}

.contact-label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--gray-400);
    margin-bottom: 2px;
}

.contact-value {
    font-size: 14px;
    font-weight: 500;
    color: var(--gray-800);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.contact-arrow {
    color: var(--gray-300);
    font-size: 12px;
    transition: all 0.15s ease;
}

.contact-row:hover .contact-arrow {
    color: var(--primary);
    transform: translateX(2px);
}

/* ===============================================
   Social Section
   =============================================== */
.card-social {
    padding: 24px 32px;
    background: var(--gray-25);
    border-top: 1px solid var(--gray-100);
}

.social-row {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

.social-btn {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--card);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-md);
    font-size: 18px;
    color: var(--gray-500);
    cursor: pointer;
    transition: all 0.15s ease;
}

.social-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.social-btn.linkedin:hover { background: #0A66C2; color: white; border-color: #0A66C2; }
.social-btn.twitter:hover { background: #1DA1F2; color: white; border-color: #1DA1F2; }
.social-btn.github:hover { background: #24292F; color: white; border-color: #24292F; }
.social-btn.instagram:hover { background: #E4405F; color: white; border-color: #E4405F; }
.social-btn.facebook:hover { background: #1877F2; color: white; border-color: #1877F2; }
.social-btn.youtube:hover { background: #FF0000; color: white; border-color: #FF0000; }
.social-btn.whatsapp:hover { background: #25D366; color: white; border-color: #25D366; }
.social-btn.telegram:hover { background: #0088CC; color: white; border-color: #0088CC; }
.social-btn.dribbble:hover { background: #EA4C89; color: white; border-color: #EA4C89; }
.social-btn.behance:hover { background: #1769FF; color: white; border-color: #1769FF; }

/* ===============================================
   Services Section
   =============================================== */
.card-services {
    padding: 28px 32px;
}

.services-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.service-card {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 16px;
    background: var(--gray-25);
    border-radius: var(--radius-md);
    border-left: 3px solid var(--primary);
    transition: all 0.15s ease;
}

.service-card:hover {
    background: var(--gray-50);
    border-left-color: var(--secondary);
}

.service-card:nth-child(2) { border-left-color: var(--secondary); }
.service-card:nth-child(2):hover { border-left-color: var(--primary); }
.service-card:nth-child(3) { border-left-color: var(--accent); }
.service-card:nth-child(4) { border-left-color: #FF8B00; }

.service-icon {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--card);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-sm);
    flex-shrink: 0;
}

.service-icon i {
    font-size: 16px;
    color: var(--primary);
}

.service-content {
    flex: 1;
}

.service-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 2px;
}

.service-desc {
    font-size: 13px;
    color: var(--gray-500);
    line-height: 1.5;
}

/* ===============================================
   Contact Form
   =============================================== */
.card-form {
    padding: 28px 32px;
    border-top: 1px solid var(--gray-100);
}

.form-grid {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.form-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--gray-600);
}

.form-input {
    padding: 12px 14px;
    font-size: 14px;
    font-family: inherit;
    color: var(--gray-900);
    background: var(--gray-25);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-md);
    transition: all 0.15s ease;
}

.form-input:focus {
    outline: none;
    border-color: var(--primary);
    background: var(--card);
    box-shadow: 0 0 0 3px rgba(0, 102, 255, 0.1);
}

.form-input::placeholder {
    color: var(--gray-400);
}

textarea.form-input {
    min-height: 100px;
    resize: vertical;
}

.form-submit {
    padding: 14px 24px;
    font-size: 14px;
    font-weight: 600;
    font-family: inherit;
    color: white;
    background: var(--primary);
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.15s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.form-submit:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

/* ===============================================
   Footer
   =============================================== */
.card-footer {
    padding: 16px 32px;
    text-align: center;
    background: var(--gray-25);
    border-top: 1px solid var(--gray-100);
}

.card-footer p {
    font-size: 12px;
    color: var(--gray-400);
}

.card-footer a {
    color: var(--primary);
    font-weight: 500;
}

.card-footer .footer-credit {
    margin: 0;
    padding: 0;
}

.card-footer .footer-credit a {
    color: #22C55E;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: all 0.2s ease;
}

.card-footer .footer-credit a:hover {
    color: #16A34A;
}

.card-footer .footer-credit i {
    font-size: 10px;
}

/* ===============================================
   Modal
   =============================================== */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(23, 43, 77, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    padding: 16px;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-box {
    background: var(--card);
    border-radius: var(--radius-lg);
    padding: 32px;
    max-width: 340px;
    width: 100%;
    text-align: center;
    transform: scale(0.95);
    transition: transform 0.2s ease;
    position: relative;
    box-shadow: var(--shadow-xl);
}

.modal-overlay.active .modal-box {
    transform: scale(1);
}

.modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gray-50);
    border: none;
    border-radius: var(--radius-sm);
    font-size: 16px;
    color: var(--gray-500);
    cursor: pointer;
    transition: all 0.15s ease;
}

.modal-close:hover {
    background: var(--error);
    color: white;
}

.modal-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 4px;
}

.modal-desc {
    font-size: 13px;
    color: var(--gray-500);
    margin-bottom: 20px;
}

.qr-box {
    display: inline-block;
    padding: 16px;
    background: white;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
}

.qr-box img {
    width: 160px;
    height: 160px;
}

/* ===============================================
   Theme Toggle
   =============================================== */
.theme-toggle {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--card);
    border: 1px solid var(--gray-200);
    border-radius: 50%;
    box-shadow: var(--shadow-lg);
    cursor: pointer;
    z-index: 100;
    transition: all 0.15s ease;
}

.theme-toggle:hover {
    border-color: var(--primary);
    transform: scale(1.05);
}

.theme-toggle i {
    font-size: 18px;
    color: var(--gray-600);
}

/* ===============================================
   Alerts
   =============================================== */
.alert {
    padding: 12px 16px;
    border-radius: var(--radius-md);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    font-weight: 500;
}

.alert-success {
    background: rgba(54, 179, 126, 0.1);
    color: var(--success);
}

.alert-danger {
    background: rgba(255, 86, 48, 0.1);
    color: var(--error);
}

/* ===============================================
   Loading
   =============================================== */
.loading {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ===============================================
   Responsive
   =============================================== */
@media (max-width: 480px) {
    .card-page {
        padding: 16px;
        align-items: flex-start;
    }
    
    .card-hero {
        padding: 32px 24px 28px;
    }
    
    .card-hero::after {
        left: 24px;
        right: 24px;
    }
    
    .profile-photo {
        width: 88px;
        height: 88px;
    }
    
    .profile-name {
        font-size: 22px;
    }
    
    .quick-actions {
        padding: 0 24px;
        gap: 8px;
    }
    
    .quick-btn {
        padding: 12px;
        font-size: 12px;
    }
    
    .quick-btn span {
        display: none;
    }
    
    .card-about,
    .card-contact,
    .card-services,
    .card-form,
    .card-social {
        padding-left: 24px;
        padding-right: 24px;
    }
}

/* ===============================================
   Print
   =============================================== */
@media print {
    .card-page { background: white; padding: 0; }
    .digital-card { box-shadow: none; max-width: 100%; }
    .quick-actions, .card-form, .theme-toggle { display: none; }
}
