/* ============================
   BEFORE/AFTER — MOBILE FIRST
   ============================ */

.before-after-section {
  padding: 48px clamp(16px, 4vw, 24px);
  text-align: center;
  background: linear-gradient(to bottom, #ffffff, #f4f6fb);
  padding-left: max(16px, env(safe-area-inset-left));
  padding-right: max(16px, env(safe-area-inset-right));
}
body.dark-mode .before-after-section { background: #1a1a1a; }

.before-after-header h2 {
  font-size: clamp(1.75rem, 4vw + 1rem, 2.25rem);
  line-height: 1.15;
  font-weight: 700;
  margin: 0 0 10px;
  color: #003cff;
}
.before-after-header p {
  color: #444;
  font-size: clamp(0.98rem, 2.2vw + 0.7rem, 1.05rem);
  line-height: 1.5;
  margin: 0 0 28px;
}
body.dark-mode .before-after-header h2,
body.dark-mode .before-after-header p { color: #f1f5fa; }

.before-after-container {
  display: flex;
  flex-direction: column;
  gap: clamp(16px, 3.5vw, 24px);
  justify-content: center;
  align-items: center;
}

.image-column {
  width: 100%;
  max-width: 640px;
}

.image-column h3 {
  font-size: clamp(1.05rem, 2.5vw + 0.75rem, 1.15rem);
  font-weight: 600;
  margin: 0 0 10px;
  color: #0070ff;
}
body.dark-mode .image-column h3 { color: #44aaff; }

/* Images */
.image-column img {
  width: 100%;
  height: 100%;
  margin-bottom: 150px;
  border-radius: 14px;
  box-shadow: 0 12px 24px rgba(0,0,0,0.08);
  transition: transform 0.25s ease;
  aspect-ratio: 16 / 9;     /* keeps consistent frame */
  object-fit: cover;        /* fill without distortion */
  object-position: center;  /* default center for all */
}

/* 🔽 Shift the "After" image down inside its frame */
.before-after-container .image-column:nth-child(2) img {
  object-position: center 20%; /* show more of the lower area */
}

/* Hover only on devices that hover */
@media (hover: hover) and (pointer: fine) {
  .image-column img:hover { transform: scale(1.03); }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .image-column img { transition: none; }
}

/* Specific hero image container from your page */
#heroImageContainer {
  width: 100%;
  max-width: 480px;
  height: auto;
  border-radius: 10px;
  margin: 0 auto;
}

/* ============================
   TABLET UP
   ============================ */
@media (min-width: 768px) {
  
  .before-after-section { padding: 64px 5%; }

  .before-after-container {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 32px;
    align-items: stretch;
  }

  .image-column { flex: 1 1 320px; max-width: 500px; }
  .image-column img { border-radius: 18px; }

  /* Optionally adjust crop on tablet if needed */
  .before-after-container .image-column:nth-child(2) img {
    object-position: center 65%;
  }
}

/* ============================
   DESKTOP/LARGE
   ============================ */
@media (min-width: 1024px) {
  .before-after-section { padding: 80px 5%; }
  .before-after-header h2 { font-size: 2.5rem; }
  .before-after-header p { font-size: 1.1rem; margin-bottom: 40px; }
  .before-after-container { gap: 40px; }

  /* Tweak desktop crop if you prefer closer to center */
  .before-after-container .image-column:nth-child(2) img {
    object-position: center 20%;
  }
}

/* Ultra-wide polish */
@media (min-width: 1440px) {
  .image-column img {
    border-radius: 20px;
    box-shadow: 0 15px 30px rgba(0,0,0,0.08);
  }
}

/* ============================
   HOW IT WORKS SECTION
   ============================ */

/* How It Works Section */

.how-it-works-section {
  padding: 60px 5%;
  text-align: center;
}

.how-it-works-header h2 {
  font-size: 2.2rem;
  font-weight: 700;
  margin-bottom: 10px;
  color: #003cff;
}

.how-it-works-header p {
  color: #444;
  font-size: 1.1rem;
  line-height: 1.5;
  margin-bottom: 28px;
}

.how-it-works-content {
  display: flex;
  flex-wrap: wrap;
  gap: 32px;
  align-items: center;
  justify-content: center;
}

.text-column {
  flex: 1 1 400px;
  text-align: left;
}

.text-column h3 {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 16px;
  color: #0070ff;
}

.how-it-works {
  list-style: none;
  padding: 0;
  font-size: x-large;
}

.how-it-works li {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 20px;

}

.how-it-works li i {
  font-size: 1.2rem;
  color: #0070ff;
  margin-top: 4px;
}

.how-it-works li div strong {
  font-weight: 700;
}

.image-column {
  flex: 1 1 500px; /* Increased flex-basis */
  max-width: 600px; /* Added max-width */
}

.image-column img {
  width: 100%;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Dark Mode Styles */
body.dark-mode .how-it-works-section {
background: linear-gradient(75deg, #141516 0%, #1b1b1d 100%);
}

body.dark-mode .how-it-works-header h2,
body.dark-mode .how-it-works-header p {
  color: #f1f5fa;
}

body.dark-mode .text-column h3,
body.dark-mode .how-it-works li div {
  color: #f1f5fa;
}

body.dark-mode .how-it-works li i {
  color: #44aaff;
}

@media (max-width: 426px) {
  #vypamap {
    width: 95%;
    height: auto;
  }
}