/* DigitalCardGo public card template
   Adapted from the existing business-card preview styles.
   This file contains only the public card styles, not the admin dashboard. */

:root {
  --p: #2563eb;
  --p2: #7c3aed;
  --a: #06b6d4;
  --card-ink: #172033;
  --card-muted: #596579;
  --card-soft: #f8fafc;
  --line: #e5e7eb;
  --muted: #98a2b3;
  color-scheme: light;
}
* { box-sizing: border-box; }
html { min-height: 100%; background: #f2f5fa; }
body {
  margin: 0;
  min-height: 100vh;
  padding: 0;
  font-family: "DM Sans", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: radial-gradient(circle at top left, #e9efff 0, transparent 36%), #f2f5fa;
  color: var(--card-ink);
  -webkit-font-smoothing: antialiased;
}
button, a { font: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
.card-page {
  width: min(100%, 570px);
  margin: 0 auto;
  padding: 18px 12px 32px;
}
.business-card {
  --p: #2563eb;
  --p2: #7c3aed;
  --a: #06b6d4;
  width: min(100%, 570px);
  margin: auto;
  overflow: hidden;
  background: #fff;
  border-radius: 34px;
  box-shadow: 0 24px 70px rgba(15, 23, 42, .14);
  color: var(--card-ink);
  transform-origin: center top;
  animation: card-enter .55s cubic-bezier(.2,.75,.25,1) both;
}
.card-hero {
  position: relative;
  padding: 24px 20px 36px;
  color: #fff;
  overflow: hidden;
  background: linear-gradient(145deg, var(--p), var(--p2));
}
.card-hero:before, .card-hero:after {
  content: "";
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}
.card-hero:before {
  width: 250px; height: 250px; right: -105px; top: -120px; background: #ffffff1f;
  animation: hero-orb-drift 11s ease-in-out infinite alternate;
}
.card-hero:after {
  width: 190px; height: 190px; left: -110px; bottom: -130px; background: #ffffff17;
  animation: hero-orb-drift 13s ease-in-out infinite alternate-reverse;
}
.card-top { display: flex; justify-content: space-between; align-items: center; position: relative; z-index: 2; }
.card-label { font-size: 10px; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; opacity: .9; }
.qr-btn {
  width: 39px; height: 39px; border: 1px solid #ffffff45; background: #ffffff1a; color: #fff;
  border-radius: 13px; display: grid; place-items: center;
}
.qr-btn { transition: transform .2s ease, background-color .2s ease, border-color .2s ease; }
.qr-btn svg { width: 19px; }
.qr-btn:active { transform: scale(.94); }
.qr-btn:focus-visible, .card-btn:focus-visible, .quick-action:focus-visible, .social:focus-visible, .modal-x:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--p) 55%, white);
  outline-offset: 3px;
}
.identity { text-align: center; position: relative; z-index: 2; margin-top: 20px; }
.logo-box {
  width: 104px; height: 104px; border-radius: 30px; padding: 9px; margin: 0 auto 14px;
  background: #fff; box-shadow: 0 18px 36px #0003; display: grid; place-items: center; overflow: hidden;
}
.logo-box img { width: 100%; height: 100%; object-fit: contain; border-radius: 22px; }
.initials { width: 100%; height: 100%; border-radius: 22px; display: grid; place-items: center; color: var(--p); font-size: 30px; font-weight: 800; }
.identity h1 { font-size: 29px; line-height: 1.08; margin: 0; letter-spacing: -.035em; overflow-wrap: anywhere; }
.card-role { font-size: 14px; font-weight: 600; margin-top: 8px; opacity: .94; }
.card-company { font-size: 12px; margin-top: 4px; opacity: .76; }
.card-content { padding: 0 18px 24px; }
.action-panel {
  position: relative; z-index: 5; margin-top: -20px; background: #fff; padding: 12px;
  border-radius: 24px; border: 1px solid #e5e7eb; box-shadow: 0 14px 36px #0f172a1a;
}
.quick-actions { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.quick-action {
  min-width: 0; border-radius: 18px; padding: 11px 4px 9px; text-align: center;
  transition: transform .2s ease;
}
.quick-action > span { width: 43px; height: 43px; margin: 0 auto 7px; border-radius: 15px; display: grid; place-items: center; }
.quick-action svg { width: 20px; transition: transform .2s ease; }
.quick-action:active { transform: scale(.97); }
.quick-action b { display: block; font-size: 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.call > span { background: #e8f8ee; color: #16a34a; }
.whatsapp > span { background: #dcfce7; color: #16a34a; }
.email > span { background: #fff1f2; color: #e11d48; }
.location > span { background: #eff6ff; color: #2563eb; }
.call b, .whatsapp b { color: #15803d; }
.email b { color: #be123c; }
.location b { color: #1d4ed8; }
.main-buttons { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; }
.card-btn {
  border: 0; border-radius: 17px; padding: 14px 10px; display: flex; align-items: center;
  justify-content: center; gap: 8px; font-size: 12px; font-weight: 800; transition: transform .18s ease, opacity .18s ease;
}
.card-btn:hover { transform: translateY(-1px); }
.card-btn svg { width: 17px; height: 17px; flex: 0 0 auto; }
.primary-card-btn { color: #fff; background: linear-gradient(135deg, var(--p), var(--p2)); box-shadow: 0 12px 24px #2563eb22; }
.secondary-card-btn { background: #f8fafc; border: 1px solid #e5e7eb; color: #172033; }
.card-section { margin-top: 25px; }
.section-head { display: flex; align-items: end; justify-content: space-between; margin-bottom: 11px; gap: 8px; }
.section-head h2 { font-size: 16px; margin: 0; letter-spacing: -.02em; }
.section-head small { font-size: 9px; color: #98a2b3; font-weight: 800; letter-spacing: .05em; }
.about-text { margin: 0; color: #596579; font-size: 13px; line-height: 1.75; text-align: justify; white-space: pre-line; }
.services { display: grid; gap: 9px; }
.service {
  display: flex; align-items: center; gap: 12px; padding: 12px; border: 1px solid #e5e7eb;
  border-radius: 18px; background: #fff;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.service-icon { flex: 0 0 42px; width: 42px; height: 42px; border-radius: 14px; display: grid; place-items: center; }
.service-icon svg { width: 19px; height: 19px; }
.service:nth-child(6n+1) .service-icon { background: #eff6ff; color: #2563eb; }
.service:nth-child(6n+2) .service-icon { background: #f5f3ff; color: #7c3aed; }
.service:nth-child(6n+3) .service-icon { background: #ecfeff; color: #0891b2; }
.service:nth-child(6n+4) .service-icon { background: #fff7ed; color: #ea580c; }
.service:nth-child(6n+5) .service-icon { background: #fdf2f8; color: #db2777; }
.service:nth-child(6n+6) .service-icon { background: #f0fdf4; color: #16a34a; }
.service strong { display: block; font-size: 12px; margin-bottom: 3px; }
.service p { margin: 0; color: #7a8494; font-size: 10.5px; line-height: 1.45; white-space: pre-line; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tag { padding: 9px 12px; border-radius: 999px; background: #fff; border: 1px solid #e5e7eb; font-size: 10.5px; font-weight: 700; color: #475467; }
.tag:nth-child(4n+1) { border-color: #bfdbfe; color: #1d4ed8; background: #eff6ff; }
.tag:nth-child(4n+2) { border-color: #ddd6fe; color: #6d28d9; background: #f5f3ff; }
.tag:nth-child(4n+3) { border-color: #a5f3fc; color: #0e7490; background: #ecfeff; }
.tag:nth-child(4n+4) { border-color: #bbf7d0; color: #15803d; background: #f0fdf4; }
.contact-list { display: grid; gap: 8px; }
.contact { display: flex; align-items: center; gap: 11px; padding: 12px; border-radius: 17px; background: #f8fafc; border: 1px solid #e5e7eb; min-width: 0; }
.contact-icon { width: 39px; height: 39px; flex: 0 0 39px; border-radius: 13px; display: grid; place-items: center; }
.contact-icon svg { width: 18px; height: 18px; }
.contact.phone .contact-icon { background: #ecfdf3; color: #16a34a; }
.contact.email .contact-icon { background: #fff1f2; color: #e11d48; }
.contact.website .contact-icon { background: #eff6ff; color: #2563eb; }
.contact.address .contact-icon { background: #fff7ed; color: #ea580c; }
.contact small { display: block; font-size: 9px; color: #98a2b3; margin-bottom: 2px; }
.contact strong { font-size: 11.5px; word-break: break-word; }
.contact-copy { min-width: 0; }
.socials { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; }
.social {
  width: 48px; height: 48px; border-radius: 16px; display: grid; place-items: center;
  border: 1px solid #e5e7eb; background: #fff; overflow: hidden;
  transition: transform .2s ease, box-shadow .2s ease;
}
.social img { width: 25px; height: 25px; object-fit: contain; }
.social-fallback { font-size: 9px; font-weight: 800; color: #475467; text-transform: uppercase; }
.cta { position: relative; overflow: hidden; margin-top: 25px; padding: 22px 18px; border-radius: 23px; color: #fff; text-align: center; background: linear-gradient(135deg, #111827, #273449); }
.cta:after { content: ""; position: absolute; width: 140px; height: 140px; border-radius: 50%; right: -60px; top: -70px; background: #2563eb61; }
.cta strong, .cta p, .cta .card-btn { position: relative; z-index: 2; }
.cta strong { font-size: 16px; }
.cta p { font-size: 11px; line-height: 1.55; opacity: .72; margin: 6px auto 14px; max-width: 330px; white-space: pre-line; }
.cta .card-btn { width: 100%; background: #fff; color: #111827; }
.card-footer { text-align: center; padding: 19px 5px 0; color: #9aa3b2; font-size: 9.5px; }
.card-footer a { color: var(--p); font-weight: 800; }
.hidden { display: none !important; }
.qr-modal { position: fixed; inset: 0; display: none; align-items: center; justify-content: center; background: #0f172a9e; backdrop-filter: blur(8px); z-index: 100; padding: 20px; }
.qr-modal.show { display: flex; }
.qr-modal-card { position: relative; width: min(100%, 365px); padding: 25px; border-radius: 26px; background: #fff; text-align: center; box-shadow: 0 30px 80px #0004; }
.qr-modal-card h3 { margin: 0 0 6px; }
.qr-modal-card p { margin: 0 0 15px; color: #667085; font-size: 11px; }
.modal-x { position: absolute; right: 13px; top: 13px; width: 34px; height: 34px; border: 0; background: #f3f5f8; border-radius: 10px; display: grid; place-items: center; }
.modal-x svg { width: 17px; height: 17px; }
#qrcode { display: flex; justify-content: center; margin: 14px 0; min-height: 0; }
#qrcode canvas, #qrcode img { width: 210px !important; height: 210px !important; }
.qr-url { font-size: 9px; color: #7a8494; word-break: break-all; margin: 0 0 14px; }
.full { width: 100%; }
.toast {
  position: fixed; z-index: 200; bottom: 22px; left: 50%; transform: translate(-50%, 20px);
  opacity: 0; pointer-events: none; background: #111827; color: #fff; border-radius: 999px;
  padding: 11px 17px; font-size: 11px; transition: .25s; max-width: calc(100% - 30px); text-align: center;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@keyframes card-enter {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes hero-orb-drift {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to { transform: translate3d(-9px, 8px, 0) scale(1.035); }
}

@media (hover: hover) and (pointer: fine) {
  .quick-action:hover { transform: translateY(-2px); }
  .quick-action:hover svg { transform: scale(1.06); }
  .card-btn:hover { transform: translateY(-2px); }
  .service:hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--p) 25%, #e5e7eb); box-shadow: 0 8px 20px rgba(15, 23, 42, .06); }
  .social:hover { transform: translateY(-3px); box-shadow: 0 8px 18px rgba(15, 23, 42, .09); }
  .qr-btn:hover { background: #ffffff30; transform: translateY(-1px); }
}
.card-btn:active { transform: scale(.985); }

@media (max-width: 480px) {
  .card-page { padding: 10px 14px 24px; }
  .business-card { border-radius: 25px; }
  .identity h1 { font-size: 25px; }
  .card-content { padding-left: 12px; padding-right: 12px; }
  .quick-action > span { width: 39px; height: 39px; }
  .action-panel { padding: 9px; }
  .card-btn { padding: 12px 7px; font-size: 11px; }
  .section-head h2 { font-size: 15px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}




/* =========================================
   DIGITALCARDGO — PROFESSIONAL IDENTITY
   Name, designation and company typography
   ========================================= */

.identity #cardName {
    font-family: "DM Sans", sans-serif;
    font-size: clamp(1.75rem, 4.5vw, 1.875rem);
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -0.035em;
    text-align: center;
    margin: 0 0 8px !important;
    max-width: 100%;
    overflow-wrap: anywhere;
}

.identity .card-role {
    font-family: "DM Sans", sans-serif;
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.4;
    letter-spacing: -0.01em;
    text-align: center;
    margin: 0 0 6px !important;
    max-width: 100%;
    overflow-wrap: anywhere;
}

.identity .card-company {
    font-family: "DM Sans", sans-serif;
    font-size: 0.9375rem;
    font-weight: 400;
    line-height: 1.4;
    letter-spacing: 0;
    text-align: center;
    color: rgba(255, 255, 255, 0.82);
    margin: 0 !important;
    max-width: 100%;
    overflow-wrap: anywhere;
}

/* Smaller screens */
@media (max-width: 480px) {
    .identity #cardName {
        font-size: 1.75rem;
        line-height: 1.2;
        margin-bottom: 8px !important;
    }

    .identity .card-role {
        font-size: 1rem;
        line-height: 1.4;
        margin-bottom: 6px !important;
    }

    .identity .card-company {
        font-size: 0.9375rem;
        line-height: 1.4;
    }
}
