/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif;
}

:root {
    --primary-color: #103595;
    --primary-light: #3b82f6;
    --primary-dark: #1d4ed8;
    --accent-color: #06b6d4;
    --white: #FFFFFF;
    --light-bg: #f8fafc;
    --card-bg: rgba(255, 255, 255, 0.85);
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --border-color: #e2e8f0;
    --success-color: #10b981;
    --shadow-light: 0 2px 8px rgba(0, 0, 0, 0.06);
    --shadow-medium: 0 4px 15px rgba(0, 0, 0, 0.08);
    --shadow-heavy: 0 6px 20px rgba(0, 0, 0, 0.12);
}

html, body {
    height: 100%;
    overflow-x: hidden;
}

body {
    background: #f8fafc;
    color: var(--text-primary);
    max-width: 480px;
    margin: 0 auto;
    min-height: 100vh;
    position: relative;
    padding-bottom: 50px;
    box-shadow: 0 0 0 1px #e2e8f0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

/* Mobile Frame Background */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, #e3f2fd, #f3e5f5, #fff8e1, #c7f0ffa6);
    z-index: -1;
    max-width: 480px;
}

/* Loading Animation - UPDATED */
.loading-container {
    position: fixed;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    height: 100%;
    background: #ffffffea;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease-out;
    max-width: 480px;
}

/* Custom Logo Animation - UPDATED with original colors and larger size */
.custom-logo {
    width: 70px; /* Increased from 30px to 70px */
    height: 70px; /* Increased from 30px to 70px */
    margin-bottom: 0;
    animation: logoScale 1.5s ease-in-out infinite alternate;
    opacity: 0;
    animation-fill-mode: both;
}

.custom-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    /* Removed filter to keep original colors */
}

@keyframes logoScale {
    0% {
        transform: scale(0.5);
        opacity: 0;
    }
    50% {
        opacity: 0.8;
    }
    100% {
        transform: scale(1.3); /* Increased from 1.2 to 1.3 */
        opacity: 1;
    }
}

/* Loading text - HIDDEN */
.loading-text {
    display: none;
}

/* Header with cover image and blue overlay */
.header {
    position: relative;
    height: 160px;
    overflow: hidden;
    border-bottom-left-radius: 20px;
    border-bottom-right-radius: 20px;
    background: var(--primary-color);
}

.cover-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.cover-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.6) 0%, rgba(29, 78, 216, 0.8) 100%);
    backdrop-filter: blur(2px);
}

/* Profile Section - Reduced Sizes */
.profile-section {
    text-align: center;
    padding: 0 20px;
    margin-top: -60px;
    position: relative;
    z-index: 2;
}

.profile-picture {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    border: 3px solid var(--white);
    object-fit: cover;
    margin: 0 auto;
    display: block;
    background-color: #ddd;
    box-shadow: var(--shadow-medium);
}

.name {
    font-size: 20px;
    font-weight: 600;
    margin: 15px 0 6px;
    color: var(--primary-color);
}

.designation {
    color: var(--text-secondary);
    margin-bottom: 15px;
    font-size: 14px;
    font-weight: 400;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

/* Contact buttons - Smaller */
.contact-buttons {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin: 20px 0;
}

.contact-btn {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 16px;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-light);
}

.contact-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
}

.call { background-color: #10B981; }
.sms { background-color: #3B82F6; }
.whatsapp { background-color: #25D366; }
.linkedin { background-color: #0077B5; }

/* Info cards - More Transparent */
.card {
    background: rgb(255 255 255 / 33%);
    border-radius: 14px;
    padding: 20px;
    margin: 15px;
    box-shadow: var(--shadow-medium);
    border: 1px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-heavy);
}

.card-title {
    font-size: 16px;
    margin-bottom: 16px;
    color: var(--text-primary);
    padding-bottom: 10px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid rgba(226, 232, 240, 0.6);
    font-weight: 600;
}

.card-title i {
    margin-right: 10px;
    color: var(--primary-color);
    font-size: 16px;
}

.info-item {
    display: flex;
    align-items: flex-start;
    padding: 12px 0;
    border-bottom: 1px solid rgba(226, 232, 240, 0.5);
}

.info-item:last-child {
    border-bottom: none;
}

.info-icon {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, var(--primary-light), var(--primary-color));
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
    color: white;
    flex-shrink: 0;
    font-size: 14px;
}

.info-details {
    flex: 1;
}

.info-details strong {
    display: block;
    margin-bottom: 4px;
    color: var(--text-primary);
    font-size: 13px;
    font-weight: 600;
}

.info-details div {
    color: var(--text-secondary);
    font-size: 13px;
    line-height: 1.4;
}

.contact-section {
    margin-bottom: 4px;
}

/* Company logos footer - Smaller */
.company-logos {
    background: rgba(255, 255, 255, 0.15);
    padding: 10px 0;
    position: fixed;
    bottom: 0;
    width: 100%;
    max-width: 480px;
    overflow: hidden;
    border-top-left-radius: 16px;
    border-top-right-radius: 16px;
    backdrop-filter: blur(10px);
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    z-index: 100;
}

.logos-container {
    display: flex;
    animation: scrollLogos 35s linear infinite;
}

.company-logo {
    height: 25px !important;
    margin: 0 20px;
    opacity: 0.7;
    transition: all 0.3s ease;
}

.company-logo:hover {
    opacity: 1;
    transform: scale(1.05);
}

@keyframes scrollLogos {
    0% { transform: translateX(100%); }
    100% { transform: translateX(-100%); }
}

/* QR Code Popup - Fixed Alignment */
.qr-popup {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(8px);
}

.qr-content {
    background: rgba(255, 255, 255, 0.9);
    padding: 25px;
    border-radius: 16px;
    text-align: center;
    max-width: 280px;
    width: 85%;
    box-shadow: var(--shadow-heavy);
    position: relative;
    animation: popIn 0.3s ease-out;
    border: 1px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(15px);
    display: flex;
    flex-direction: column;
    align-items: center;
}

@keyframes popIn {
    0% { transform: scale(0.9); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

.qr-code-container {
    width: 200px;
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    border-radius: 10px;
    padding: 15px;
    box-shadow: var(--shadow-light);
    margin: 15px 0;
}

.qr-code {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    display: block;
}

.close-btn {
    position: absolute;
    top: 12px;
    right: 15px;
    font-size: 20px;
    cursor: pointer;
    color: var(--text-secondary);
    transition: color 0.3s ease;
    width: 26px;
    height: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.close-btn:hover {
    color: var(--primary-color);
    background: rgba(37, 99, 235, 0.1);
}

.download-btn {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 20px;
    cursor: pointer;
    margin-top: 12px;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-light);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    font-size: 13px;
}

.download-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
}

.pop-button {
    position: fixed;
    bottom: 65px;
    right: 20px;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    cursor: pointer;
    box-shadow: var(--shadow-medium);
    z-index: 100;
    transition: all 0.3s ease;
    border: none;
}

.pop-button:hover {
    transform: scale(1.08);
    box-shadow: var(--shadow-heavy);
}

/* Main content area for proper scrolling */
.main-content {
    position: relative;
    z-index: 1;
    min-height: calc(100vh - 60px);
}

/* Responsive adjustments */
@media (max-width: 480px) {
    body {
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    .profile-section {
        padding: 0 15px;
        margin-top: -50px;
    }

    .card {
        margin: 12px;
        padding: 18px;
    }

    .contact-buttons {
        gap: 10px;
    }

    .contact-btn {
        width: 36px;
        height: 36px;
        font-size: 15px;
    }

    .company-logo {
        height: 16px;
        margin: 0 18px;
    }

    .profile-picture {
        width: 90px;
        height: 90px;
    }

    .name {
        font-size: 18px;
    }

    .designation {
        font-size: 13px;
    }

    .qr-code-container {
        width: 180px;
        height: 180px;
    }
}

/* Desktop background styling */
@media (min-width: 481px) {
    body {
        background: #f8fafc;
        box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
        margin: 20px auto;
        border-radius: 20px;
        overflow: hidden;
        height: auto;
        min-height: 90vh;
    }

    body::before {
        border-radius: 20px;
    }

    .loading-container {
        border-radius: 20px;
    }

    .header {
        border-radius: 20px 20px 0 0;
    }
}

/* Ensure proper scrolling on all devices */
@media (max-height: 700px) {
    body {
        overflow-y: auto;
    }

    .company-logos {
        position: relative;
    }
}
/* vCard Download Button Styles */
.vcard-section {
    margin: 20px 0;
    text-align: center;
}

.vcard-download-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 25px;
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    text-decoration: none;
    border: none;
    border-radius: 25px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.3);
}

.vcard-download-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(52, 152, 219, 0.4);
    background: linear-gradient(135deg, #2980b9, #2471a3);
}

.vcard-download-btn:active {
    transform: translateY(0);
}

.vcard-download-btn i {
    font-size: 1.1rem;
}

/* Alternative vCard Button Styles */
.vcard-btn-outline {
    background: transparent;
    color: #3498db;
    border: 2px solid #3498db;
    box-shadow: none;
}

.vcard-btn-outline:hover {
    background: #3498db;
    color: white;
}

.vcard-btn-minimal {
    background: #f8f9fa;
    color: #495057;
    border: 1px solid #dee2e6;
    box-shadow: none;
}

.vcard-btn-minimal:hover {
    background: #e9ecef;
    border-color: #3498db;
    color: #3498db;
}

/* vCard Button Sizes */
.vcard-btn-sm {
    padding: 8px 16px;
    font-size: 0.9rem;
    border-radius: 20px;
}

.vcard-btn-lg {
    padding: 15px 30px;
    font-size: 1.1rem;
    border-radius: 30px;
}

/* vCard Button with Icon Animation */
.vcard-btn-animated {
    position: relative;
    overflow: hidden;
}

.vcard-btn-animated:before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.5s;
}

.vcard-btn-animated:hover:before {
    left: 100%;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .vcard-download-btn {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
    
    .vcard-btn-lg {
        padding: 12px 24px;
        font-size: 1rem;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .vcard-btn-minimal {
        background: #2d3748;
        color: #e2e8f0;
        border-color: #4a5568;
    }
    
    .vcard-btn-minimal:hover {
        background: #4a5568;
        border-color: #3498db;
    }
}