/* Reset & Base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
body {
  font-family: 'Helvetica Neue', Arial, sans-serif;
  background-color: #fff;
  color: #333;
  line-height: 1.6;
}
.container {
  width: 90%;
  max-width: 1200px;
  margin: auto;
}
.section-title {
  text-align: center;
  font-size: 2rem;
  margin-bottom: 1em;
  color: #222;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.75em 1.5em;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 500;
  transition: all 0.3s ease-in-out;
}
.btn-primary {
  background-color: #007bff;
  color: white;
  border: none;
}
.btn-primary:hover {
  background-color: #0056b3;
}
.btn-outline {
  background-color: transparent;
  border: 2px solid #007bff;
  color: #007bff;
}
.btn-outline:hover {
  background-color: #007bff;
  color: white;
}

/* Hero */
#hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  background-color: #f9f9f9;
}
.hero-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
}
.hero-text {
  flex: 1 1 400px;
  padding: 1em;
}
.hero-text h1 {
  font-size: 3rem;
  margin-bottom: 0.5em;
  color: #111;
}
.tagline {
  font-size: 1.4rem;
  margin-bottom: 1em;
  color: #666;
}
.hero-btns a {
  margin-right: 1em;
}
.hero-illustration {
  flex: 1 1 400px;
  text-align: center;
  padding: 1em;
}
.hero-illustration img {
  max-width: 100%;
  height: auto;
}



/* Alternating Backgrounds */
#features {
  background-color: rgb(241, 186, 52);
}
#test {
  background-color: rgb(213 180 206);
}
#download {
  background-color: rgb(146 207 254);
}
#reviews {
  background-color: rgb(215, 235, 255);
}

/* ===== Intro Section ===== */
#intro {
  padding: 3em 0;
  background: #fdf6e3;
  text-align: center;
}
#intro .intro-text {
  font-size: 1.1rem;
  max-width: 700px;
  margin: 1em auto 0;
  color: #333;
  line-height: 1.6;
}

/* Features */
#features {
  padding: 4em 0;
}
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2em;
}
.feature-card {
  position: relative;
  overflow: hidden;
  padding: 2em 1em;
  text-align: center;
}
.feature-img-wrapper {
  position: relative;
  width: 100%;
  height: 220px;
  overflow: hidden;
  margin-bottom: 1em;
  background: transparent;
}
.feature-img-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  mix-blend-mode: multiply;
  opacity: 0.85;
  transition: transform 0.4s ease, opacity 0.3s ease;
}
.feature-card:hover .feature-img-wrapper img {
  transform: scale(1.05);
  opacity: 1;
}

.feature-card h3 {
  z-index: 1;
  position: relative;
  margin-bottom: 0.5em;
  color: #111;
}
.feature-card p {
  z-index: 1;
  position: relative;
  color: #333;
}

/* Test / Upload */
#test {
  padding: 4em 0;
  text-align: center;
}
.upload-sample {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2em;
  flex-wrap: wrap;
  margin-top: 2em;
}
.upload-sample img {
  max-width: 300px;
  width: 100%;
  border-radius: 8px;
  opacity: 0;
  transform: scale(0.9);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.upload-sample img.loaded {
  opacity: 1;
  transform: scale(1);
}
.upload-instructions {
  max-width: 400px;
  text-align: left;
  color: #444;
}
.upload-instructions ul {
  list-style: disc inside;
}
.upload-instructions li {
  margin-bottom: 0.5em;
}
.upload-area {
  margin-top: 2em;
}
#result-area {
  margin-top: 1.5em;
  font-weight: bold;
  font-size: 1.25rem;
  min-height: 2em;
}

/* Ad Overlay */
.ad-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  justify-content: center;
  align-items: center;
  z-index: 9999;
}
.ad-overlay.active {
  display: flex;
}
.ad-content {
  background: white;
  padding: 2em;
  border-radius: 8px;
  text-align: center;
}

.upload-box {
  margin: 2em auto;
  max-width: 400px;
  padding: 2em;
  border: 2px dashed #ccc;
  border-radius: 12px;
  background: #fff;
  text-align: center;
  transition: border-color 0.3s ease;
  cursor: pointer;
}
.upload-box.dragover {
  border-color: #007bff;
  background: #f0f8ff;
}
.upload-icon {
  width: 48px;
  margin-bottom: 1em;
}
.upload-box h3 {
  font-size: 1.25rem;
  color: #222;
  margin-bottom: 0.3em;
}
.upload-subtext {
  color: #777;
  margin-bottom: 1em;
}
.upload-btn {
  display: inline-block;
  padding: 0.6em 1.5em;
  background: #007bff;
  color: white;
  border-radius: 6px;
  font-weight: 500;
  cursor: pointer;
}
.upload-btn:hover {
  background: #0056b3;
}

/* Download Section */
#download {
  padding: 4em 0;
}
.download-layout {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
}
.download-text {
  flex: 1 1 300px;
}
.download-text ol {
  padding-left: 1.2em;
}
.download-text li {
  margin-bottom: 0.75em;
  font-size: 1.1rem;
}
.download-image-wrapper {
  position: relative;
  width: 320px;
  height: auto;
  margin-top: 1.5em;
  background: transparent;
}
.download-image-wrapper img {
  width: 100%;
  height: auto;
  object-fit: contain;
  mix-blend-mode: multiply;
  opacity: 0.85;
  transition: transform 0.4s ease, opacity 0.3s ease;
}
.download-image-wrapper img:hover {
  transform: scale(1.05);
  opacity: 1;
}


/* Reviews */
#reviews {
  padding: 4em 0;
}
.reviews-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2em;
}
.review-card {
  background-color: #fff;
  border-radius: 10px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.05);
  padding: 2em;
  text-align: center;
}
.review-card p {
  font-style: italic;
  color: #333;
}
.review-card h4 {
  margin-top: 1em;
  color: #666;
}

/* Review form */
.review-form {
  margin-top: 3em;
  background: #fff;
  padding: 2em;
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}
.review-form h3 {
  margin-bottom: 1em;
}
.review-form .form-group {
  margin-bottom: 1em;
}
.review-form label {
  display: block;
  margin-bottom: 0.3em;
  font-weight: 500;
}
.review-form input,
.review-form textarea {
  width: 100%;
  padding: 0.6em;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 1rem;
}
.review-form input:focus,
.review-form textarea:focus {
  border-color: #007bff;
  outline: none;
}
.review-form button {
  margin-top: 0.5em;
}

/* Footer */
footer {
  background-color: #469ff8;
  color: #ffffff;
  text-align: center;
  padding: 2em 0;
}

/* Hover Effects (for images already covered above) */
.hero-illustration img,
.feature-img-wrapper img,
.download-image-wrapper img {
  transition: transform 0.3s ease, opacity 0.3s ease;
}

/* Lazy fade-in */
.lazy {
  opacity: 0;
}
.lazy.loaded {
  opacity: 1;
  transition: opacity 0.5s ease-in;
}

/* Responsive tweaks */
@media (max-width: 768px) {
  .hero-content {
    flex-direction: column;
    text-align: center;
  }
  .download-layout {
    flex-direction: column;
    text-align: center;
  }
  .download-text,
  .download-image-wrapper {
    width: 100%;
    margin-bottom: 2em;
  }
}

/* Intro Section Image */
.intro-content {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
}
.intro-image {
  max-width: 500px;
  width: 100%;
  margin-top: 2em;
  opacity: 0.9;
}

/* Review Images (optional if you show avatars) */
.review-image {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 1em;
}

/* Download Section Enhancement */
.download-image-wrapper {
  width: 100%;
  max-width: 500px;
  height: auto;
  margin: 2em auto 0;
}
.download-image-wrapper img {
  width: 100%;
  height: auto;
  object-fit: contain;
  opacity: 0.9;
  mix-blend-mode: multiply;
}

/* Disclaimer Section */
#disclaimer {
  background-color: #f9f9f9;
  padding: 3em 0;
  text-align: center;
}
.disclaimer-text {
  font-size: 1rem;
  max-width: 800px;
  margin: 1em auto;
  color: #444;
}
#disclaimer a {
  color: #007bff;
  text-decoration: underline;
}
/* --- Layout for alternating image/text in sections --- */
.intro-section, .test-section, .download-section {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 2em;
  padding: 4em 0;
}

.intro-img-container,
.test-img-container,
.download-img-container {
  flex: 1 1 400px;
  text-align: center;
}

.intro-text-container,
.test-text-container,
.download-text-container {
  flex: 1 1 400px;
  text-align: left;
}

/* Ensure images max width, responsive */
.intro-img-container img,
.test-img-container img,
.download-img-container img {
  max-width: 100%;
  height: auto;
  opacity: 0.9;
  mix-blend-mode: multiply;
  transition: transform 0.4s ease, opacity 0.3s ease;
}
.intro-img-container img:hover,
.test-img-container img:hover,
.download-img-container img:hover {
  transform: scale(1.03);
  opacity: 1;
}

/* Upload box remains as before */
/* (copy your .upload-box, .upload-icon, etc from earlier) */

/* Download button wrapper style */
.download-button-wrapper {
  margin-top: 1em;
}

/* Make sure download button is visible */
.download-button-wrapper .btn {
  font-size: 1.1rem;
  padding: 0.8em 1.8em;
}

/* Responsive adjustments */
@media (max-width: 900px) {
  .intro-section,
  .test-section,
  .download-section {
    flex-direction: column-reverse; /* stack text then image or whichever looks better */
    text-align: center;
  }
  .intro-text-container,
  .test-text-container,
  .download-text-container {
    width: 100%;
  }
  .intro-img-container,
  .test-img-container,
  .download-img-container {
    width: 100%;
  }
}
/* Spinner */
.ad-content.spinner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.loading-spinner {
  width: 60px;
  height: 60px;
  border: 5px solid #f3f3f3;
  border-top: 5px solid #007bff;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 1em;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}
.drop-zone.disabled {
  pointer-events: none;
  opacity: 0.6;
}
ad-overlay { pointer-events: none; } /* default */
ad-overlay.active { pointer-events: auto; } /* capture clicks while visible */

.loading-spinner { margin-top: 35px; } /* optional: and keep margin-bottom: 1em */


/* === Upload box: show nothing by default === */
.upload-box {
  /* keep the visual box; result will appear inside later */
  position: relative;
  margin: 1.25em auto 1em;  /* slightly tighter bottom gap so button can sit closer */
  width: 100%;
  max-width: 480px;
  min-height: 220px;
  padding: 2em;
  border: 2px dashed #ccc;
  border-radius: 12px;
  background: #fff;
  text-align: center;
  transition: border-color 0.3s ease, background 0.3s ease;
  cursor: pointer;
}

/* Hide all default contents inside the box (icon, headings, text, built-in button) */
.upload-box .upload-icon,
.upload-box h3,
.upload-box .upload-subtext,
.upload-box .upload-btn,
.upload-box label[for="image-input"] {
  display: none !important;
}

/* Only show the result area when it has content */
.upload-box .result-box {
  display: none;
  margin-top: 0;          /* remove gap since box is otherwise empty */
  text-align: left;
  width: 100%;
  background: #f8fafc;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 0.9em 1em;
  font-weight: 400;
  font-size: 0.975rem;
  line-height: 1.5;
  overflow: auto;
  max-height: 360px;
}
.upload-box .result-box.has-content {
  display: block;
}

/* Dragover highlight remains */
.upload-box.dragover {
  border-color: #007bff;
  background: #f0f8ff;
}

/* Disable state still works */
#drop-zone.disabled,
.upload-box.disabled {
  pointer-events: none;
  opacity: 0.6;
}

/* === Button should be OUTSIDE the box === */
/* Ensure external CTA is visually close to the box */
.test-cta-wrap {
  margin: 0.5em auto 1.25em; /* close to box, then a bit of space below */
  max-width: 480px;
  text-align: center;
}

/* In case an old "Choose Image" button still exists INSIDE the box, hide it */
.upload-box .upload-btn { display: none !important; }

/* === Right-side sample image + instructions: tighter, closer === */
.test-img-container {
  display: flex;
  flex-direction: column;
  align-items: center;    /* center image and text block */
  gap: 0.5em;             /* small gap between image and instructions */
}

.test-img-container img {
  max-width: 320px;       /* keep image tidy */
  width: 100%;
  height: auto;
  margin: 0;              /* remove extra space */
}

.upload-instructions {
  width: 100%;
  max-width: 360px;       /* keep instructions visually close to image width */
  margin: 0.25em 0 0;     /* tuck right under the image */
  padding: 0;             /* no extra padding */
  text-align: left;
  color: #333;
}
.upload-instructions ul {
  list-style: disc inside;
  margin: 0;
  padding: 0;
}
.upload-instructions li {
  margin: 0.2em 0;
}

/* Responsive tweaks so image+instructions stay tight on mobile */
@media (max-width: 900px) {
  .test-img-container {
    gap: 0.4em;
  }
  .upload-instructions {
    max-width: 320px;
  }
}

.lottie-anim {
  width: 100%;
  max-width: 360px;  /* adjust to fit your layout */
  margin: 0 auto;
}

.social-links {
    display: flex; gap: .75rem; align-items: center; flex-wrap: wrap;
  }
  .social-links a {
    display: inline-flex; align-items: center; gap: .4rem; text-decoration: none;
  }
  .social-links .icon {
    width: 18px;   /* adjust to taste */
    height: 18px;  /* adjust to taste */
    display: inline-block;
    vertical-align: middle;
    fill: currentColor; /* icon inherits link color */
  }



.footer-social-links {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.75rem;
}

/* Default size for desktop and larger screens */
.footer-social-links .icon {
  width: 32px;
  height: 32px;
  display: inline-block;
  vertical-align: middle;
  fill: currentColor;
}

/* Make them a bit larger or different on mobile if you like */
@media (max-width:800px) {
  .footer-social-links .icon {
    width: 28px;
    height: 28px;
  }
}

