/* Force center alignment for CTA button */
.actions-cta {
  display: flex;
  justify-content: center;
  width: 100%;
  margin: 0 auto;
}

.actions-cta .cta-btn {
  margin: 2.5em auto 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Center CTA button in share bar */
.share-bar .cta-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 2em auto 0 auto;
  font-size: 1.1em;
}

/* Social Share Bar Styles */
.share-bar {
  margin: 3rem 0 0 0;
  text-align: center;
}

.share-bar .share-icon {
  display: inline-block;
  margin: 0 0.5em;
  font-size: 1.2rem;
  color: var(--color-primary);
  transition: color 0.2s;
  vertical-align: middle;
}

.share-bar .share-icon:hover {
  color: var(--color-success);
}

/* Page-specific overrides for home.html */
/* Add/rename classes as needed for home page layout and style */

/* Home page-specific styles extracted from template */
/* Premium Service Card */
.premium-field {
  background: white;
  border: 1px solid #ffdecb;
  /* Subtle warm border */
  border-left: 4px solid var(--color-primary);
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 2rem;
  box-shadow: 0 4px 15px rgba(245, 106, 106, 0.08);
  /* Soft colored shadow */
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.premium-field:hover {
  box-shadow: 0 8px 25px rgba(245, 106, 106, 0.15);
  transform: translateY(-2px);
}

/* Subtle background accent */
.premium-field::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 100px;
  height: 100px;
  background: radial-gradient(circle at top right, rgba(245, 106, 106, 0.1), transparent 70%);
  z-index: 0;
}

.premium-content-wrapper {
  display: flex;
  gap: 1.25rem;
  align-items: flex-start;
  position: relative;
  z-index: 1;
}

.premium-icon {
  font-size: 1.5rem;
  color: var(--color-primary);
  background: rgba(245, 106, 106, 0.1);
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  flex-shrink: 0;
}

.premium-text-content {
  flex: 1;
  min-width: 0;
  /* Prevent flex overflow */
}

.premium-title {
  margin: 0 0 0.5rem 0;
  font-size: 1.15rem;
  color: var(--color-text-bold);
  font-weight: 800;
}

.premium-desc {
  margin: 0 0 1.25rem 0;
  font-size: 0.95rem;
  color: var(--color-text);
  line-height: 1.5;
}

.premium-btn {
  background: #ffffff !important;
  border: 2px solid var(--color-primary) !important;
  color: var(--color-primary) !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  text-decoration: none;
  font-weight: 700;
  border-radius: 30px;
  padding: 0.75rem 1.5rem;
  transition: all 0.2s;
  box-shadow: 0 4px 10px rgba(245, 106, 106, 0.1);
  white-space: normal;
  /* Allow text wrapping */
  max-width: 100%;
  text-align: center;
  line-height: 1.4;
  height: auto !important;
  min-height: 3rem;
  padding: 0.8rem 1.5rem !important;
}

.premium-btn:hover {
  background: var(--color-primary) !important;
  color: #ffffff !important;
  transform: translateY(-1px);
  box-shadow: 0 6px 15px rgba(245, 106, 106, 0.2);
}

/* Mobile Responsiveness for Premium Card */
@media (max-width: 576px) {
  .premium-content-wrapper {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .premium-icon {
    margin-bottom: 0.5rem;
  }

  .premium-btn {
    width: 100%;
    /* Full width button on mobile */
  }
}

.upload-area {
  border: 2px dashed var(--color-border);
  border-radius: var(--radius-card);
  padding: 3rem 2rem;
  text-align: center;
  transition: all 0.3s ease;
  background: rgba(0, 0, 0, 0.02);
  cursor: pointer;
  position: relative;
}

.upload-area:hover {
  border-color: var(--color-primary) !important;
  background: rgba(245, 106, 106, 0.05) !important;
  transform: translateY(-2px);
}

.upload-area .upload-icon {
  font-size: 3.5rem;
  color: var(--color-primary);
  margin-bottom: 1rem;
  opacity: 0.8;
}

#profile-search {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  margin-top: 0;
  padding-left: 3rem !important;
  /* Extra space for search icon */
  padding-right: 1.5rem !important;
  height: 3rem !important;
  border-radius: var(--radius-card) !important;
  /* Rounded rectangle */
  border: 1px solid var(--color-border-accent) !important;
  background: var(--color-bg-card) !important;
  font-size: 1.05rem !important;
}

#profile-search:focus {
  border-color: var(--color-primary) !important;
  box-shadow: none !important;
  outline: none !important;
}

.profile-results {
  position: relative;
  max-height: 250px;
  overflow-y: auto;
  margin-top: 0.5rem;
  border-radius: 12px;
  background: var(--color-bg-card);
  border: 1px solid var(--color-border-accent);
  box-shadow: var(--shadow-hover);
  z-index: 50;
}

.profile-results:empty {
  display: none;
  border: none;
  box-shadow: none;
}

.profile-result {
  padding: 0.6rem 1rem;
  font-size: 1rem;
  cursor: pointer;
  border-bottom: 1px solid #eee;
}

.profile-result:last-child {
  border-bottom: none;
}

.profile-result:hover {
  background: #f3f3f3;
  color: #3498db;
}

.profile-result.disabled {
  cursor: default;
  color: #999999;
  font-style: italic;
}

/* Scanner Animation Styles */
.scan-preview-container {
  display: none;
  text-align: center;
  padding: 2rem 1rem;
  min-height: 400px;
  animation: fadeIn 0.4s ease;
}

#home-card-box {
  min-height: 500px;
  position: relative;
  transition: all 0.3s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.scan-processing-title {
  margin-bottom: 2rem;
  font-weight: 700;
  color: var(--color-primary);
}

.scan-image {
  max-width: 100%;
  height: auto;
  display: block;
  image-orientation: from-image;
  /* Ensure browser respects EXIF orientation for preview */
}

.scan-status-container {
  margin-top: 2.5rem;
  max-width: 400px;
  margin-left: auto;
  margin-right: auto;
}

.scan-status-text {
  font-weight: 600;
  margin-bottom: 0.75rem;
  font-size: 0.95rem;
  color: var(--color-text-bold);
}

.scan-progress-bar {
  height: 8px;
  background: rgba(0, 0, 0, 0.05);
  border-radius: 10px;
  overflow: hidden;
}

.scan-progress {
  height: 100%;
  width: 0%;
  background: var(--color-primary);
  transition: width 0.4s ease;
}

.scan-wrapper {
  position: relative;
  display: inline-block;
  overflow: hidden;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  max-width: 100%;
}

.scan-line {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: var(--color-primary);
  box-shadow: 0 0 15px var(--color-primary), 0 0 5px var(--color-primary);
  animation: scan 2.5s ease-in-out infinite;
  z-index: 10;
  opacity: 0.8;
  will-change: transform, opacity;
  transform: translateY(0) translateZ(0);
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}

.scan-grid {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background:
    linear-gradient(transparent 95%, rgba(59, 130, 246, 0.1) 50%),
    linear-gradient(90deg, transparent 95%, rgba(59, 130, 246, 0.1) 50%);
  background-size: 20px 20px;
  z-index: 5;
  pointer-events: none;
}

/* How It Works (Home Page) */
.how-it-works-title {
  margin-bottom: 2rem;
  font-weight: 800;
  color: var(--color-text-bold);
  text-align: center;
}

.how-step-card {
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: var(--card-padding-mobile) !important;
  border: 1px solid var(--color-border);
  background: var(--color-bg-card);
}

.how-step-icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  color: var(--color-primary-contrast);
}

.how-step-icon.robot {
  color: var(--color-warning-contrast);
}

.how-step-icon.success {
  color: var(--color-success-contrast);
}

.how-step-title {
  font-size: 1.1rem;
  margin-bottom: 0.75rem;
  font-weight: 700;
}

.how-step-desc {
  font-size: 0.95rem;
  margin-bottom: 0;
  line-height: 1.5;
}

@media (min-width: 768px) {
  .home-main-row {
    display: flex !important;
    align-items: stretch !important;
  }

  /* Make columns flex containers to force children (card-box) to fill height */
  .home-main-row>[class*="col-"] {
    display: flex;
    flex-direction: column;
  }

  /* Force both card-boxes in this row to fill the height */
  .home-main-row .card-box {
    flex: 1;
    height: 100%;
    margin-bottom: 0 !important;
    display: flex;
    flex-direction: column;
  }
}

/* Shared step styling (Mobile and Desktop) */
.how-step-vertical {
  display: flex;
  align-items: flex-start;
  margin-bottom: 2rem;
  padding: 0.5rem 0;
}

.how-step-vertical-last {
  margin-bottom: 0;
}

.how-step-vertical .how-step-icon {
  background: var(--color-primary);
  color: white !important;
  border-radius: 50%;
  width: 44px;
  height: 44px;
  line-height: 44px;
  font-size: 1.1rem;
  margin-top: 0;
  margin-right: 1.25rem;
  flex-shrink: 0;
  text-align: center;
  box-shadow: 0 4px 10px rgba(245, 106, 106, 0.2);
}

.how-step-vertical .how-step-icon.robot {
  background: var(--color-warning);
  box-shadow: 0 4px 10px rgba(48, 153, 239, 0.2);
}

.how-step-vertical .how-step-icon.success {
  background: var(--color-success);
  box-shadow: 0 4px 10px rgba(46, 125, 50, 0.2);
}

.how-step-vertical .how-step-title {
  font-size: 1.1rem;
  margin-bottom: 0.25rem;
  font-weight: 700;
  font-family: var(--font-heading);
  /* Slab serif like old site */
}

.how-step-vertical .how-step-desc {
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--color-text-light);
}

@media (max-width: 767px) {
  .how-step-vertical {
    margin-bottom: 1.5rem;
  }

  .how-step-vertical .how-step-icon {
    margin-right: 1.25rem;
    font-size: 1.25rem;
    width: 30px;
  }
}

@keyframes scan {
  0% {
    transform: translateY(0);
    opacity: 0;
  }

  10% {
    opacity: 1;
  }

  90% {
    opacity: 1;
  }

  100% {
    transform: translateY(400px);
    opacity: 0;
  }
}