@import url("https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&family=Poppins:wght@300;400;500;600;700&display=swap");

:root {
  --primary: #434f74;
  --primary-dark: #2b2b2b;
  --secondary: #5a678f;
  --accent: #0073e6;
  --bg-gradient: linear-gradient(135deg, #1a1c2c 0%, #434f74 100%);
  --surface: #ffffff;
  --surface-alt: #f8fafc;
  --text-main: #1e293b;
  --text-muted: #64748b;
  --glass: rgba(255, 255, 255, 0.95);
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg:
    0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --shadow-xl:
    0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
  --radius-lg: 24px;
  --radius-full: 9999px;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Skeleton Loading Styles */
.skeleton {
  background: #e2e8f0;
  background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite linear;
  border-radius: 8px;
  color: transparent !important;
  border: none !important;
}

.skeleton * {
  visibility: hidden !important;
}

@keyframes shimmer {
  0% {
    background-position: -200% 0;
  }
  100% {
    background-position: 200% 0;
  }
}

.content-hidden {
  opacity: 0;
  transform: translateY(10px);
  transition:
    opacity 0.6s ease,
    transform 0.6s ease;
  pointer-events: none;
}

.content-visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.skeleton-text {
  height: 1em;
  margin-bottom: 0.5em;
  width: 80%;
  display: inline-block;
}
.skeleton-title {
  height: 1.5em;
  width: 60%;
  margin: 0 auto 10px;
}
.skeleton-circle {
  border-radius: 50% !important;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: "Poppins", sans-serif;
  background: #f1f5f9;
  color: var(--text-main);
  min-height: 100vh;
  min-height: -webkit-fill-available;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow-x: hidden;
  line-height: 1.5;
}

html {
  height: -webkit-fill-available;
}

/* Scrollbar Styling */
::-webkit-scrollbar {
  width: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: var(--secondary);
  border-radius: 10px;
}

.card {
  width: 100%;
  max-width: 440px;
  background: var(--glass);
  backdrop-filter: blur(10px);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  overflow: hidden;
  position: relative;
  animation: slideUp 0.6s ease-out;
  margin: 20px;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.card-header {
  background: var(--bg-gradient);
  height: 180px;
  position: relative;
  display: flex;
  justify-content: center;
  align-items: flex-end;
}

.card-header::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url("dotworkplace_logo.svg") center center no-repeat;
  background-size: 85%;
  filter: brightness(0) invert(1);
  mix-blend-mode: overlay;
  opacity: 0.12;
  z-index: 1;
}

.card-header::after {
  content: none;
}

.profile-img-container {
  width: 200px;
  height: 200px;
  position: relative;
  bottom: -100px;
  z-index: 10;
}

.profile-img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 6px solid var(--surface);
  box-shadow: var(--shadow-lg);
  object-fit: cover;
  background: var(--surface);
  transition: var(--transition);
}

.profile-img:hover {
  transform: scale(1.05);
}

.card-body {
  padding: 110px 32px 40px;
  text-align: center;
}

.card-body h1 {
  font-family: "Outfit", sans-serif;
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-main);
  margin-bottom: 6px;
}

.title {
  font-size: 16px;
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 24px;
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 28px;
}

.contact-item {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: var(--text-main);
  text-decoration: none;
  font-weight: 500;
  font-size: 15px;
  padding: 8px;
  border-radius: 12px;
  transition: var(--transition);
}

.contact-item:hover {
  background: var(--surface-alt);
  color: var(--accent);
}

.location {
  margin-bottom: 32px;
}

.location a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  padding: 8px 16px;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-full);
  transition: var(--transition);
}

.location a:hover {
  background: var(--surface-alt);
  border-color: var(--accent);
  color: var(--accent);
}

.location svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

.cta-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 40px;
}

.cta-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 16px;
  background: var(--primary);
  color: white;
  text-decoration: none;
  border-radius: 18px;
  font-weight: 600;
  font-size: 16px;
  border: none;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: 0 4px 12px rgba(67, 79, 116, 0.2);
}

.cta-button#save-contact-btn {
  background: var(--primary-dark);
  box-shadow: 0 4px 12px rgba(43, 43, 43, 0.2);
}

.cta-button:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.cta-button:active {
  transform: translateY(-1px);
}

.section-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.section-title::before,
.section-title::after {
  content: "";
  height: 1px;
  flex: 1;
  background: #e2e8f0;
}

.social-links {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-bottom: 40px;
}

.social-icon {
  width: 50px;
  height: 50px;
  border-radius: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  text-decoration: none;
  font-size: 24px;
  transition: var(--transition);
  box-shadow: var(--shadow-md);
}

.social-icon:hover {
  transform: translateY(-5px) rotate(5deg);
  box-shadow: var(--shadow-lg);
}

.social-icon.instagram {
  background: linear-gradient(
    45deg,
    #f09433,
    #e6683c,
    #dc2743,
    #cc2366,
    #bc1888
  );
}
.social-icon.facebook {
  background: #1877f2;
}
.social-icon.linkedin {
  background: #0a66c2;
}
.social-icon.whatsapp {
  background: #25d366;
}

/* Share Section & Modal */
.share-section {
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
}

.share-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px;
  background: var(--surface);
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  color: var(--text-main);
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: var(--transition);
}

.share-btn:hover {
  background: var(--surface-alt);
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-2px);
}

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  height: 100vh;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(8px);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.modal-overlay.active {
  display: flex;
  opacity: 1;
}

.qr-modal {
  background: white;
  width: 90%;
  max-width: 340px;
  padding: 32px;
  border-radius: 28px;
  text-align: center;
  box-shadow: var(--shadow-xl);
  transform: scale(0.9);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

.qr-container {
  background: #f8fafc;
  padding: 24px;
  border-radius: 24px;
  margin: 0 auto 24px;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 228px;
  height: 228px;
}

#qr-code canvas,
#qr-code img {
  max-width: 100% !important;
  max-height: 100% !important;
  display: block;
}

.qr-info h3 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 4px;
}

.qr-info p {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.qr-url {
  font-size: 12px;
  color: var(--accent);
  word-break: break-all;
  background: #eff6ff;
  padding: 8px 12px;
  border-radius: 8px;
}

.team {
  background: var(--surface-alt);
  padding: 32px 24px;
  margin: 0 -32px -40px;
  border-top-left-radius: 32px;
  border-top-right-radius: 32px;
}

.team-members {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px 16px;
  padding-top: 55px;
}

.team-member {
  background: var(--surface);
  padding: 64px 12px 24px;
  border-radius: 24px;
  text-decoration: none;
  transition: var(--transition);
  border: 1px solid #edf2f7;
  position: relative;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.team-member:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-xl);
  border-color: var(--accent);
}

.team-member img {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  object-fit: cover;
  position: absolute;
  top: -48px;
  left: 50%;
  transform: translateX(-50%);
  border: 6px solid var(--surface);
  box-shadow: 0 10px 20px rgba(0,0,0,0.08), 0 0 0 8px rgba(0, 115, 230, 0.06);
  transition: var(--transition);
  z-index: 5;
}

.team-member:hover img {
  transform: translateX(-50%) scale(1.05);
  box-shadow: 0 15px 30px rgba(0,0,0,0.12), 0 0 0 12px rgba(0, 115, 230, 0.12);
}

.team-member .name {
  font-weight: 700;
  font-size: 16px;
  color: var(--text-main);
  margin-bottom: 4px;
  line-height: 1.2;
}

.team-member .role {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 500;
  line-height: 1.4;
}

.card-footer {
  padding: 40px 24px;
  text-align: center;
}

.company-logo {
  max-width: 200px;
  height: auto;
  filter: grayscale(1) opacity(0.6);
  transition: var(--transition);
}

.company-logo:hover {
  filter: grayscale(0) opacity(1);
}

/* Downloadable Card Styles (hidden) */
#downloadable-card {
  font-family: "Outfit", sans-serif;
  width: 650px;
  background: #fff;
  border-radius: 16px;
  padding: 30px 40px;
  position: absolute;
  left: -9999px;
  top: 0;
}

#downloadable-card .card-header {
  height: auto;
  background: none;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 24px;
}

#downloadable-card .card-header::before {
  content: none;
}

#downloadable-card .profile-pic {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid #f0f0f0;
}

#downloadable-card .name-section h1 {
  font-size: 32px;
  font-weight: 700;
  color: #111;
  margin: 0;
}

#downloadable-card .name-section p {
  color: var(--accent);
  font-weight: 600;
  font-size: 18px;
  margin: 4px 0 0;
}

#downloadable-card .name-section #dc-company {
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 500;
  margin-top: 2px;
}

#downloadable-card hr {
  border: none;
  border-top: 1px solid #e5e5e5;
  margin: 30px 0;
}

#downloadable-card .dc-main-content {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 30px;
}

#downloadable-card .dc-qr-container {
  padding: 20px;
  background: #f8fafc;
  border-radius: 20px;
  border: 1px solid #e2e8f0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  margin-top: -65px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  position: relative;
  z-index: 2;
}

#dc-qr-code canvas,
#dc-qr-code img {
  width: 140px !important;
  height: 140px !important;
}

#downloadable-card .dc-contact-info {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 0;
  flex: 1;
  margin-top: 10px;
}

#downloadable-card .dc-contact-info li {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 18px;
  color: #333;
}

#downloadable-card i {
  color: var(--accent);
  font-size: 20px;
}

#downloadable-card .logo-container {
  margin-top: 0;
  display: flex;
  justify-content: center;
}

#downloadable-card .logo-container img {
  width: 120px;
}

/* Responsive Handling for Mobile UI Elements */
@media (max-width: 480px) {
  body {
    padding: 0;
    align-items: flex-start;
    background: var(--surface);
  }

  .card {
    margin: 0;
    max-width: 100%;
    border-radius: 0;
    box-shadow: none;
    min-height: 100vh;
  }

  .team {
    margin-bottom: 0;
    padding-bottom: 60px;
  }
}

/* Landscape Mode Adjustments */
@media (max-height: 500px) and (orientation: landscape) {
  body {
    align-items: flex-start;
  }
}
