/**
 * Digital Visiting Card Platform - Public Card Core Stylesheet
 */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&family=Plus+Jakarta+Sans:wght@400;500;600;700&display=swap');

:root {
  --primary-color: #1b4332;
  --primary-dark: #081c15;
  --accent-gold: #d4af37;
  --accent-light: #52b788;
  --bg-gradient-start: #081c15;
  --bg-gradient-end: #1b4332;
  --card-bg: #ffffff;
  --text-main: #1f2937;
  --text-muted: #6b7280;
  --border-color: #e5e7eb;
  --shadow-sm: 0 2px 4px rgba(0,0,0,0.05);
  --shadow-md: 0 10px 25px -5px rgba(0,0,0,0.1), 0 8px 10px -6px rgba(0,0,0,0.1);
  --shadow-lg: 0 20px 35px -5px rgba(0,0,0,0.15), 0 10px 10px -5px rgba(0,0,0,0.04);
  --radius-card: 28px;
  --radius-button: 16px;
}

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

body {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: linear-gradient(135deg, var(--bg-gradient-start) 0%, var(--bg-gradient-end) 100%);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 24px 16px 80px;
  color: var(--text-main);
  -webkit-font-smoothing: antialiased;
}

/* Card Container */
.dvc-card-wrapper {
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  position: relative;
  animation: cardFadeUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes cardFadeUp {
  0% {
    opacity: 0;
    transform: translateY(24px) scale(0.98);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.dvc-card {
  background: var(--card-bg);
  border-radius: var(--radius-card);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  border: 1px solid rgba(255, 255, 255, 0.15);
  position: relative;
}

/* Hero Header & Cover */
.dvc-header {
  position: relative;
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
  padding: 36px 20px 50px;
  text-align: center;
  color: #ffffff;
}

.dvc-header::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 24px;
  background: var(--card-bg);
  border-top-left-radius: 24px;
  border-top-right-radius: 24px;
}

/* Profile Avatar */
.dvc-avatar-container {
  position: relative;
  display: inline-block;
  margin-bottom: 12px;
  z-index: 2;
}

.dvc-avatar-ring {
  width: 124px;
  height: 124px;
  border-radius: 50%;
  padding: 4px;
  background: linear-gradient(135deg, #d4af37, #fef08a, #d4af37);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
}

.dvc-avatar {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  background: #ffffff;
}

/* Name & Designation */
.dvc-name {
  font-family: 'Outfit', sans-serif;
  font-size: 24px;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: -0.3px;
  margin-bottom: 4px;
  line-height: 1.25;
}

.dvc-designation {
  font-size: 14px;
  font-weight: 500;
  color: #d8f3dc;
  margin-bottom: 0;
}

/* Company Branding Section */
.dvc-company-banner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 8px 20px 16px;
  text-align: center;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 20px;
}

.dvc-company-logo {
  max-height: 38px;
  max-width: 120px;
  object-fit: contain;
}

.dvc-company-name {
  font-family: 'Outfit', sans-serif;
  font-size: 15px;
  font-weight: 700;
  color: var(--primary-color);
  letter-spacing: -0.2px;
}

/* Main Action Grid (Call, WhatsApp, Email, Website) */
.dvc-actions-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  padding: 0 20px;
  margin-bottom: 24px;
}

.dvc-action-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-button);
  padding: 14px 6px;
  color: var(--text-main);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
}

.dvc-action-btn:hover, .dvc-action-btn:focus-visible {
  transform: translateY(-3px);
  box-shadow: 0 6px 15px rgba(0,0,0,0.08);
  border-color: var(--accent-light);
  color: var(--primary-color);
}

.dvc-action-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 6px;
  color: #ffffff;
  font-size: 18px;
  transition: transform 0.25s ease;
}

.dvc-action-btn:hover .dvc-action-icon {
  transform: scale(1.08);
}

.icon-call { background: linear-gradient(135deg, #10b981, #059669); }
.icon-whatsapp { background: linear-gradient(135deg, #25d366, #128c7e); }
.icon-email { background: linear-gradient(135deg, #3b82f6, #1d4ed8); }
.icon-website { background: linear-gradient(135deg, #8b5cf6, #6d28d9); }
.icon-office { background: linear-gradient(135deg, #f59e0b, #d97706); }
.icon-map { background: linear-gradient(135deg, #ef4444, #b91c1c); }

.dvc-action-label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: -0.1px;
}

/* Detailed Contact Items List */
.dvc-contact-list {
  padding: 0 20px;
  margin-bottom: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.dvc-contact-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  background: #f8fafc;
  border: 1px solid #edf2f7;
  border-radius: 16px;
  text-decoration: none;
  color: var(--text-main);
  transition: all 0.2s ease;
}

.dvc-contact-item:hover {
  background: #f1f5f9;
  border-color: #cbd5e1;
  transform: translateX(3px);
}

.dvc-contact-item-icon {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: #ffffff;
}

.dvc-contact-item-content {
  flex: 1;
  overflow: hidden;
}

.dvc-contact-item-title {
  font-size: 11px;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 0.5px;
  margin-bottom: 2px;
}

.dvc-contact-item-val {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
}

/* Primary Action Buttons (Save Contact & Share) */
.dvc-cta-buttons {
  padding: 0 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 24px;
}

.btn-primary-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
  color: #ffffff;
  padding: 16px 20px;
  border-radius: var(--radius-button);
  font-family: 'Outfit', sans-serif;
  font-size: 16px;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 8px 20px rgba(27, 67, 50, 0.3);
  border: none;
  cursor: pointer;
  transition: all 0.25s ease;
  width: 100%;
}

.btn-primary-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 24px rgba(27, 67, 50, 0.4);
  color: #ffffff;
}

.btn-secondary-cta-group {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.btn-secondary-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: #f1f5f9;
  color: var(--text-main);
  padding: 14px 16px;
  border-radius: var(--radius-button);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid #e2e8f0;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-secondary-cta:hover {
  background: #e2e8f0;
  color: var(--primary-color);
}

/* QR Code Section on Card */
.dvc-qr-section {
  padding: 18px 20px;
  margin: 0 20px 24px;
  background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
  border: 1px dashed var(--accent-light);
  border-radius: 20px;
  text-align: center;
}

.dvc-qr-img {
  width: 140px;
  height: 140px;
  background: #ffffff;
  padding: 8px;
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 10px;
  cursor: pointer;
}

.dvc-qr-text {
  font-size: 13px;
  font-weight: 600;
  color: var(--primary-color);
}

/* Social Media Icons */
.dvc-social-row {
  display: flex;
  justify-content: center;
  gap: 12px;
  padding: 0 20px 24px;
}

.dvc-social-link {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f1f5f9;
  color: #475569;
  text-decoration: none;
  font-size: 18px;
  border: 1px solid #e2e8f0;
  transition: all 0.25s ease;
}

.dvc-social-link:hover {
  transform: translateY(-3px);
  color: #ffffff;
}

.social-linkedin:hover { background: #0a66c2; border-color: #0a66c2; }
.social-instagram:hover { background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888); border-color: #dc2743; }
.social-facebook:hover { background: #1877f2; border-color: #1877f2; }
.social-twitter:hover { background: #000000; border-color: #000000; }

/* Card Footer */
.dvc-footer {
  text-align: center;
  padding: 16px 20px 24px;
  border-top: 1px solid #f1f5f9;
  font-size: 11px;
  color: var(--text-muted);
}

.dvc-footer a {
  color: var(--primary-color);
  font-weight: 700;
  text-decoration: none;
}

/* Toast Notifications */
.dvc-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: #1e293b;
  color: #ffffff;
  padding: 12px 24px;
  border-radius: 30px;
  font-size: 14px;
  font-weight: 600;
  box-shadow: 0 10px 25px rgba(0,0,0,0.3);
  display: flex;
  align-items: center;
  gap: 8px;
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.dvc-toast.active {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
  pointer-events: auto;
}

/* QR Modal */
.dvc-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 9998;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.dvc-modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.dvc-modal {
  background: #ffffff;
  border-radius: 24px;
  padding: 28px 24px;
  max-width: 380px;
  width: 100%;
  text-align: center;
  transform: scale(0.9);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.dvc-modal-overlay.active .dvc-modal {
  transform: scale(1);
}

.dvc-modal-qr {
  width: 220px;
  height: 220px;
  margin: 16px auto;
  padding: 10px;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
}

/* Responsive Overrides */
@media (max-width: 420px) {
  body {
    padding: 12px 10px 60px;
  }
  .dvc-card {
    border-radius: 22px;
  }
  .dvc-header {
    padding: 28px 16px 40px;
  }
  .dvc-avatar-ring {
    width: 108px;
    height: 108px;
  }
  .dvc-name {
    font-size: 21px;
  }
  .dvc-actions-grid {
    gap: 6px;
    padding: 0 14px;
  }
  .dvc-action-btn {
    padding: 10px 4px;
  }
  .dvc-action-icon {
    width: 38px;
    height: 38px;
    font-size: 16px;
  }
  .dvc-action-label {
    font-size: 11px;
  }
  .dvc-contact-list, .dvc-cta-buttons, .dvc-qr-section {
    padding-left: 14px;
    padding-right: 14px;
  }
}
