/* Reset default styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Body Styles background colour */
body {
  font-family: 'Helvetica Neue', Arial, sans-serif;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  padding: 2rem 1rem;
  background: linear-gradient(-45deg, #2d2d2d, #5b4b8a, #2d6a6a, #2d2d2d);
  background-size: 400% 400%;
  animation: gradientShift 18s ease infinite;
}

@keyframes gradientShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

@media (prefers-reduced-motion: reduce) {
  body {
    animation: none;
    background-position: 0% 50%;
  }
}

/* Card Styles set for mobile screens */
.card {
  width: 100%;
  max-width: 380px;
  background: #ffffff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

/* Card Header Styles */
.card-header {
  text-align: center;
  padding: 2rem 1.5rem 1rem;
}

.avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto 1rem;
  display: block;
  animation: floatAvatar 4s ease-in-out infinite;
}

@keyframes floatAvatar {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

@media (prefers-reduced-motion: reduce) {
  .avatar {
    animation: none;
  }
}

.name {
  font-size: 1.4rem;
  margin-bottom: 0.2rem;
}

.title {
  font-size: 0.95rem;
  color: #666;
  margin-bottom: 1rem;
}

.contact-info p {
  font-size: 0.9rem;
  margin-bottom: 0.3rem;
}

.contact-info a {
  color: #333;
  text-decoration: none;
}

.contact-info a:hover {
  text-decoration: underline;
}

/* Card Actions Styles using flexbox */
.actions {
  padding: 0 1.5rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.button {
  border: none;
  border-radius: 8px;
  padding: 0.75rem 1rem;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  width: 100%;
}

.button--main {
  background: linear-gradient(135deg, #5b4b8a, #2d6a6a);
  color: #fff;
}

.button--main:hover {
  background: linear-gradient(135deg, #4a3c72, #235454);
}

.button--secondary {
  background: #fff;
  color: #5b4b8a;
  border: 1px solid #d8d0e8;
  box-shadow: 0 2px 8px rgba(91, 75, 138, 0.15);
  transition: background 0.2s, color 0.2s, box-shadow 0.2s;
}

.button--secondary:hover {
  background: #5b4b8a;
  color: #fff;
  box-shadow: 0 4px 12px rgba(91, 75, 138, 0.3);
}

/* Links Section Styles */
.links {
  display: flex;
  flex-direction: column;
  padding: 0.5rem 1.5rem 1rem;
}

.link-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.7rem 0.2rem;
  border-bottom: 1px solid #eee;
  text-decoration: none;
  color: #333;
  font-size: 0.9rem;
}

.link-row:last-child {
  border-bottom: none;
}

.link-row .arrow {
  color: #aaa;
}

.link-row:hover {
  color: #000;
}

.link-row:hover .arrow {
  color: #333;
}

.cta {
  padding: 0.5rem 1.5rem 1.5rem;
}

.card-footer {
  text-align: center;
  padding: 1rem 1.5rem;
  border-top: 1px solid #eee;
  font-size: 0.8rem;
  color: #999;
}

/* Save Message Styles */
.save-message {
  text-align: center;
  font-size: 0.8rem;
  color: #2e7d32;
  padding: 0 1.5rem;
  min-height: 1rem;
}


/* Modal popup Styles */
.hidden {
  display: none;
}

.modal-overlay.hidden {
  display: none;
}

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  z-index: 100;
}

.modal {
  background: #fff;
  border-radius: 12px;
  padding: 1.5rem;
  width: 100%;
  max-width: 340px;
  position: relative;
}

.modal h2 {
  font-size: 1.1rem;
  margin-bottom: 1rem;
}

.modal-close {
  position: absolute;
  top: 0.8rem;
  right: 0.8rem;
  background: none;
  border: none;
  font-size: 1rem;
  color: #999;
  cursor: pointer;
}

.modal form {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

.modal input,
.modal textarea {
  border: 1px solid #ddd;
  border-radius: 6px;
  padding: 0.6rem;
  font-size: 0.9rem;
  font-family: inherit;
}

.modal textarea {
  resize: vertical;
  min-height: 60px;
}

.success-message {
  text-align: center;
  color: #2e7d32;
  font-size: 0.9rem;
  margin-top: 0.5rem;
}

/* Footer link styles */
.card-footer a {
  color: inherit;
  text-decoration: none;
}

.card-footer a:hover {
  text-decoration: underline;
}

.link-label {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.link-icon {
  width: 18px;
  height: 18px;
  fill: currentColor;
  flex-shrink: 0;
}