/* ========================================
   DIGITAL VISITING CARD - STYLES
   ======================================== */

/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    line-height: 1.6;
}

/* Card Container */
.card-container {
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
}

.digital-card {
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    animation: fadeInUp 0.6s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Header Section */
.card-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    background-size: 200% 200%;
    animation: headerGradient 12s ease-in-out infinite;
    color: white;
    padding: 40px 30px;
    text-align: center;
}

/* Wave Divider (between company and person sections) */
.wave-divider {
    position: relative;
    width: 100%;
    line-height: 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    background-size: 200% 200%;
    animation: headerGradient 12s ease-in-out infinite;
}

.waves {
    position: relative;
    width: 100%;
    height: 36px;
    display: block;
}

.parallax > use {
    animation: move-forever 12s cubic-bezier(.55,.5,.45,.5) infinite;
}

.parallax > use:nth-child(1) {
    animation-delay: -2s;
    animation-duration: 7s;
}

.parallax > use:nth-child(2) {
    animation-delay: -3s;
    animation-duration: 10s;
}

.parallax > use:nth-child(3) {
    animation-delay: -4s;
    animation-duration: 13s;
}

.parallax > use:nth-child(4) {
    animation-delay: -5s;
    animation-duration: 20s;
}

@keyframes move-forever {
    0% {
        transform: translate3d(-90px, 0, 0);
    }
    100% {
        transform: translate3d(85px, 0, 0);
    }
}

@keyframes headerGradient {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

/* Logo Section */
.logo-section {
    animation: fadeIn 0.8s ease;
}

.logo-image {
    width: 120px;
    height: 120px;
    margin: 0 auto 20px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid white;
    background: white;
}

.logo-image img {
    /* Rectangle logo controls */
    --logo-zoom: 100%;
    --logo-pos-x: 50%;
    --logo-pos-y: 50%;
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: var(--logo-pos-x) var(--logo-pos-y);
    transform: scale(calc(var(--logo-zoom) / 100%));
    transform-origin: center;
    padding: 0;
    display: block;
}

.logo-circle {
    width: 100px;
    height: 100px;
    background: rgba(255, 255, 255, 0.2);
    border: 3px solid white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    backdrop-filter: blur(10px);
}

.logo-text {
    font-size: 36px;
    font-weight: 600;
    color: white;
}

.company-name {
    font-size: 28px;
    font-weight: 600;
    margin-bottom: 8px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.tagline {
    font-size: 14px;
    opacity: 0.95;
    font-weight: 400;
}

/* Profile Section */
.profile-section {
    padding: 30px;
    text-align: center;
    border-bottom: 1px solid #e5e7eb;
}

.profile-info {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
}

.profile-text {
    text-align: center;
}

.profile-photo {
    width: 120px;
    height: 120px;
    margin: 0;
    border-radius: 50%;
    overflow: hidden;
    border: none;
    box-shadow: none;
    filter: none;
}

.profile-photo img {
    /* Tune these values to adjust face framing in the circle */
    --profile-zoom: 1;
    --profile-pos-x: 50%;
    --profile-pos-y: 5%;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: var(--profile-pos-x) var(--profile-pos-y);
    transform: scale(var(--profile-zoom));
    transform-origin: center;
    display: block;
}

.person-name {
    font-size: 24px;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 5px;
}

.designation {
    font-size: 14px;
    color: #ffffff;
    font-weight: 400;
    opacity: 0.9;
}

/* Contact Section */
.contact-section {
    padding: 30px;
    border-bottom: 1px solid #e5e7eb;
}

.section-title {
    font-size: 16px;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.contact-grid {
    display: grid;
    gap: 15px;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: #f9fafb;
    border-radius: 12px;
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
    border: 1px solid #e5e7eb;
}

.contact-item:hover {
    background: #f3f4f6;
    transform: translateX(5px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.location-item {
    cursor: default;
}

.location-item:hover {
    transform: none;
}

.icon-box {
    width: 45px;
    height: 45px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.icon-box i {
    font-size: 18px;
    color: white;
}

.phone-icon {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
}

.email-icon {
    background: linear-gradient(135deg, #ef4444, #dc2626);
}

.whatsapp-icon {
    background: linear-gradient(135deg, #10b981, #059669);
}

.website-icon {
    background: linear-gradient(135deg, #8b5cf6, #7c3aed);
}

.location-icon {
    background: linear-gradient(135deg, #f59e0b, #d97706);
}

.contact-details {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.contact-label {
    font-size: 12px;
    color: #6b7280;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.contact-value {
    font-size: 15px;
    color: #1f2937;
    font-weight: 600;
    margin-top: 2px;
}

/* Services Section */
.services-section {
    padding: 30px;
    border-bottom: 1px solid #e5e7eb;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.service-badge {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-decoration: none;
    padding: 12px 16px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.service-badge:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 16px rgba(102, 126, 234, 0.3);
}

.service-badge i {
    font-size: 16px;
}

/* Social Section */
.social-section {
    padding: 30px;
    border-bottom: 1px solid #e5e7eb;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 15px;
}

.social-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 20px;
}

.social-icon:hover {
    transform: scale(1.15);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

.facebook {
    background: linear-gradient(135deg, #1877f2, #0c63d4);
}

.instagram {
    background: linear-gradient(135deg, #e4405f, #fd1d1d, #fcaf45);
}

.linkedin {
    background: linear-gradient(135deg, #0a66c2, #004182);
}

.twitter {
    background: linear-gradient(135deg, #1da1f2, #0d8bd9);
}

.youtube {
    background: linear-gradient(135deg, #ff0000, #cc0000);
}

/* Action Buttons */
.action-buttons {
    padding: 30px;
    display: flex;
    gap: 12px;
    border-bottom: 1px solid #e5e7eb;
}

.action-btn {
    flex: 1;
    padding: 14px 20px;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s ease;
    font-family: inherit;
}

.primary-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.primary-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.4);
}

.secondary-btn {
    background: white;
    color: #667eea;
    border: 2px solid #667eea;
}

.secondary-btn:hover {
    background: #667eea;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.action-btn:active {
    transform: translateY(0);
}

/* QR Code Section */
.qr-section {
    padding: 30px;
    text-align: center;
    border-bottom: 1px solid #e5e7eb;
}

.qr-container {
    display: inline-block;
}

#qrcode {
    display: flex;
    justify-content: center;
    padding: 15px;
    background: white;
    border-radius: 12px;
    border: 2px solid #e5e7eb;
}

#qrcode img {
    display: block;
    margin: 0 auto;
}

.qr-label {
    margin-top: 12px;
    font-size: 13px;
    color: #6b7280;
    font-weight: 400;
}

/* Ads Section */
.ad-section {
    padding: 20px 30px;
    border-bottom: 1px solid #e5e7eb;
    background: #ffffff;
}

.ad-label {
    text-align: center;
    font-size: 11px;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    color: #9ca3af;
    margin-bottom: 10px;
}

.ad-slot {
    min-height: 50px; /* Reserve some space before ad loads */
    border: none;
    border-radius: 0;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    color: transparent; /* Hide placeholder text */
    font-size: 12px;
    padding: 0;
    text-align: center;
    overflow: hidden; /* Prevent ad content from overflowing */
}

.ad-slot--test {
    /* These styles are for the JS placeholder, which is no longer the primary test method. */
    /* They are kept for fallback debugging but are now visually transparent. */
    border-style: none;
    background: transparent;
}

.ad-slot ins,
.ad-slot iframe {
    width: 100% !important;
    display: block;
}

/* Map Section */
.map-embed-section {
    padding: 24px 30px 30px;
    border-bottom: 1px solid #e5e7eb;
    background: #ffffff;
}

.map-embed-section .section-title {
    margin-bottom: 14px;
}

.map-embed-wrapper {
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    overflow: hidden;
    background: #f9fafb;
    box-shadow: 0 8px 18px rgba(17, 24, 39, 0.06);
}

.map-embed-wrapper iframe {
    display: block;
    width: 100%;
    height: 300px;
    border: 0;
}

/* Footer */
.card-footer {
    padding: 25px 30px;
    text-align: center;
    background: #f9fafb;
}

.card-footer p {
    font-size: 13px;
    color: #6b7280;
    margin-bottom: 5px;
}

.footer-note {
    color: #667eea;
    font-weight: 600;
}

.footer-link {
    display: inline-block;
    margin-left: 6px;
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
}

.footer-link:hover {
    text-decoration: underline;
}

/* Responsive Design */
@media (max-width: 480px) {
    body {
        padding: 10px;
    }

    .digital-card {
        border-radius: 15px;
    }

    .card-header {
        padding: 30px 20px;
    }

    .waves {
        height: 28px;
    }

    .company-name {
        font-size: 24px;
    }

    .logo-circle {
        width: 80px;
        height: 80px;
    }

    .logo-text {
        font-size: 30px;
    }

    .profile-section,
    .contact-section,
    .services-section,
    .social-section,
    .action-buttons,
    .qr-section,
    .ad-section {
        padding: 25px 20px;
    }

    .map-embed-section {
        padding: 22px 20px 24px;
    }

    .map-embed-wrapper iframe {
        height: 260px;
    }

    .person-name {
        font-size: 20px;
    }

    .profile-info {
        flex-direction: column;
        text-align: center;
    }

    .profile-text {
        text-align: center;
    }

    .services-grid {
        grid-template-columns: 1fr;
    }

    .action-buttons {
        flex-direction: column;
    }

    .contact-value {
        font-size: 14px;
    }
}

/* Print Styles */
@media print {
    body {
        background: white;
        padding: 0;
    }

    .digital-card {
        box-shadow: none;
        border: 1px solid #e5e7eb;
    }

    .action-buttons {
        display: none;
    }
}

/* Loading Animation */
.loading {
    opacity: 0;
    animation: fadeIn 0.6s ease forwards;
}

@keyframes fadeIn {
    to {
        opacity: 1;
    }
}

@media (prefers-reduced-motion: reduce) {
    .card-header {
        animation: none !important;
    }
}





