:root {
  --navy-900: #071a32;
  --navy-800: #0b2650;
  --navy-700: #123a72;
  --red-600: #c81010;
  --red-500: #d92525;
  --white: #ffffff;
  --text-900: #12233e;
  --text-700: #34465f;
  --border-soft: #d6dce5;
  --shadow-soft: 0 16px 40px rgba(3, 17, 39, 0.26);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

body {
  font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  background:
    radial-gradient(circle at top right, rgba(220, 38, 38, 0.2), transparent 44%),
    linear-gradient(180deg, #071a32 0%, #081f3d 55%, #06162b 100%);
  color: var(--text-900);
}

.digital-card-page {
  min-height: 100vh;
  padding: 24px 16px 36px;
}

.digital-card-shell {
  max-width: 430px;
  margin: 0 auto;
}

.digital-card {
  background: var(--white);
  border-radius: 28px;
  box-shadow: var(--shadow-soft);
  overflow: hidden;
}

.card-hero {
  background:
    linear-gradient(145deg, rgba(232, 17, 35, 0.22), transparent 35%),
    linear-gradient(180deg, #061933 0%, #0a2245 100%);
  color: var(--white);
  padding: 22px 20px 24px;
  text-align: center;
}

.hero-top {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 10px;
}

.avatar-shell {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: radial-gradient(circle at 32% 28%, #153762 0%, #0a2245 68%, #071a32 100%);
  border: 4px solid rgba(255, 255, 255, 0.95);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.28);
  display: grid;
  place-items: center;
}

.avatar-logo {
  width: 80px;
  height: auto;
  filter: drop-shadow(0 5px 8px rgba(0, 0, 0, 0.24));
}

.avatar-initials {
  margin: 0;
  font-size: 0.88rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 800;
  color: rgba(255, 255, 255, 0.96);
}

.hero-company {
  margin: 0;
  font-size: 1.3rem;
  line-height: 1.25;
  font-weight: 800;
  color: var(--white);
}

.hero-name {
  margin: 12px 0 0;
  font-size: 1.12rem;
  font-weight: 700;
  color: #ffd5d5;
}

.hero-title {
  margin: 6px 0 0;
  font-size: 0.98rem;
  color: rgba(255, 255, 255, 0.92);
}

.hero-service-area {
  margin: 14px auto 0;
  max-width: 320px;
  font-size: 0.9rem;
  line-height: 1.42;
  color: rgba(255, 255, 255, 0.88);
}

.card-section {
  padding: 18px 16px 0;
}

.primary-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.action-btn,
.secondary-btn {
  text-decoration: none;
  border-radius: 14px;
  font-weight: 700;
  letter-spacing: 0.01em;
  cursor: pointer;
  border: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  transition: transform 0.12s ease, box-shadow 0.12s ease, background-color 0.2s ease;
}

.action-btn {
  flex-direction: column;
  gap: 4px;
  font-size: 0.88rem;
  color: var(--white);
  background: linear-gradient(180deg, var(--red-500), var(--red-600));
  box-shadow: 0 8px 16px rgba(200, 16, 16, 0.28);
}

.action-btn i {
  font-size: 1rem;
}

.action-btn:focus-visible,
.secondary-btn:focus-visible,
.service-chip:focus-visible,
.card-footer a:focus-visible {
  outline: 3px solid #ffb9b9;
  outline-offset: 3px;
}

.action-btn:hover,
.secondary-btn:hover {
  transform: translateY(-1px);
}

.secondary-actions {
  display: grid;
  gap: 10px;
}

.secondary-btn {
  width: 100%;
  font-size: 0.97rem;
  padding: 12px 16px;
}

.secondary-btn-cta {
  color: var(--white);
  background: linear-gradient(180deg, var(--red-500), var(--red-600));
  box-shadow: 0 10px 18px rgba(200, 16, 16, 0.3);
}

.secondary-btn-outline {
  color: var(--navy-800);
  background: var(--white);
  border: 2px solid var(--navy-700);
}

.services-section h2 {
  margin: 2px 0 12px;
  font-size: 1rem;
  color: var(--navy-800);
}

.service-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.service-chip {
  text-decoration: none;
  color: var(--text-900);
  border: 1px solid var(--border-soft);
  background: #f8fafc;
  border-radius: 999px;
  min-height: 38px;
  padding: 8px 12px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.84rem;
  line-height: 1.2;
  font-weight: 600;
}

.service-chip i {
  color: var(--red-600);
  font-size: 0.9rem;
}

.qr-section {
  padding-bottom: 0;
  text-align: center;
}

.qr-card {
  width: fit-content;
  margin: 2px auto 10px;
  background: var(--white);
  border-radius: 18px;
  padding: 12px;
  border: 1px solid var(--border-soft);
  box-shadow: 0 8px 18px rgba(6, 25, 51, 0.12);
}

.qr-image {
  width: min(220px, 70vw);
  height: auto;
  display: block;
}

.qr-label {
  margin: 0;
  font-weight: 700;
  color: var(--navy-800);
  font-size: 0.93rem;
}

.share-fallback {
  margin: 10px 2px 0;
  min-height: 20px;
  font-size: 0.84rem;
  line-height: 1.35;
  color: var(--text-700);
}

.card-footer {
  margin-top: 18px;
  padding: 15px 20px 20px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.card-footer a {
  color: var(--navy-700);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}

@media (min-width: 640px) {
  .digital-card-page {
    padding-top: 34px;
    padding-bottom: 52px;
  }

  .digital-card-shell {
    max-width: 460px;
  }
}
