/* Base Styles */
body {
  font-family: 'Merriweather', serif;
  margin: 0;
  padding: 0;
  background: url('https://res.cloudinary.com/dartioq8x/image/upload/v1747208424/Background_ygpede.png') no-repeat center center fixed;
  background-size: cover;
  color: #4b0082;
  overflow-x: hidden;
}

/* Page Wrapper */
.page-wrapper {
  max-width: 100vw;
  overflow-x: hidden;
}

/* Section Box Style */
.section-box {
  text-align: center;
  padding: 40px 20px;
  margin: 20px auto;
  max-width: 900px;
  border-radius: 12px;
  background: white;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  color: #4b0082;
}

.section-box h1,
.section-box h2,
.section-box h3,
.section-box p {
  color: #4b0082;
}

/* Hero Banner */
.hero-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin-bottom: 40px;
}

.hero-banner {
  display: block;
  width: 100%;
  max-width: 100%;
  margin: 0 auto 20px;
  padding-top: 30px;
}

/* Hero Text */
.hero-text h1 {
  font-size: 3.5rem;
  font-weight: 800;
  color: white;
  margin: 10px 0;
  text-align: center;
}

.hero-text p {
  font-size: 1.25rem;
  line-height: 1.6;
  max-width: 800px;
  margin: 0 auto;
  color: white;
  text-align: center;
}

/* Buttons */
.button {
  background: #4b0082;
  color: white;
  padding: 12px 24px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: bold;
  transition: background 0.3s ease, transform 0.2s ease;
  display: inline-block;
  animation: wiggle 1s ease 1.2s 1;
}

.button:hover {
  background: #866efb;
  transform: scale(1.05);
}

.cta-button {
  background-color: white;
  color: #4b0082;
  border: 2px solid #4b0082;
  border-radius: 8px;
  padding: 12px 30px;
  font-weight: bold;
  font-size: 18px;
  margin-top: 20px;
  animation: wiggle 1.2s infinite;
  box-shadow: 0 0 12px rgba(255,255,255,0.6);
  transition: transform 0.3s ease;
  /* Center CTA buttons horizontally */
  display: inline-block;
  margin-left: auto;
  margin-right: auto;
}

.cta-button:hover {
  transform: scale(1.05);
  box-shadow: 0 0 16px rgba(255,255,255,0.9);
}

/* Quiz / Offer Pages Readability */
.quiz-wrap {
  background: url('https://res.cloudinary.com/dartioq8x/image/upload/v1747208424/Background_ygpede.png') no-repeat center center fixed;
  background-size: cover;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 40px 20px;
}

.quiz-card {
  width: 100%;
  max-width: 920px;
  background: #ffffff;
  color: #1a1a1a;
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
  padding: 32px 28px;
}

.quiz-card h1,
.quiz-card h2,
.quiz-card h3,
.quiz-card p,
.quiz-card li {
  color: #1a1a1a;
}

.quiz-card h1 {
  text-align: center;
}

.quiz-card h2 {
  text-align: center;
}

.quiz-lead {
  font-size: 1.15rem;
  line-height: 1.7;
  margin: 8px 0 18px;
  text-align: center;
}

.quiz-box {
  background: #ffffff;
  border: 1px solid rgba(75, 0, 130, 0.15);
  border-radius: 12px;
  padding: 16px 18px;
  margin: 20px 0;
}

.quiz-box h2 {
  margin-top: 0;
}

.quiz-cta {
  margin-top: 18px;
  text-align: center;
  /* Ensure CTA buttons center properly using flexbox */
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.cta-primary {
  /* Companion class to existing .cta-button */
  background-color: #4b0082;
  color: #ffffff;
  border: 2px solid #4b0082;
  /* Center primary CTA buttons */
  display: inline-block;
  margin-left: auto;
  margin-right: auto;
}

.quiz-note {
  font-size: 0.95rem;
  color: #333;
  margin-top: 10px;
  text-align: center;
}

/* CTA Center Utility - Standardized centering for CTA buttons */
.cta-center {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 1.5rem;
  gap: 0.75rem;
}

/* Fixed Top Nav Bar */
nav#custom-top-nav.tight-nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background: linear-gradient(to bottom, #bba1dc, #7a5ca0);
  padding: 12px 16px;
  z-index: 9999;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

nav#custom-top-nav.tight-nav a {
  color: white;
  text-decoration: none;
  font-size: 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin: 0 0.75rem;
  text-align: center;
}

nav#custom-top-nav.tight-nav a img {
  width: 26px;
  height: 26px;
  margin-bottom: 3px;
}

/* Main Content Spacing */
main {
  padding-top: 130px;
  margin: 0 auto;
  max-width: 100vw;
}

/* Footer */
footer {
  text-align: center;
  padding: 20px;
  font-size: 14px;
  color: white;
  background-color: #4b0082;
  margin-top: 50px;
}

/* SEO Legal Footer */
.seo-legal-footer {
  background-color: #2c2c2c;
  color: #e0e0e0;
  padding: 30px 20px;
  text-align: center;
  font-size: 13px;
  line-height: 1.8;
  margin-top: 60px;
  border-top: 3px solid #4b0082;
}

.seo-legal-footer p {
  margin: 15px auto;
  max-width: 900px;
  color: #e0e0e0;
}

.seo-legal-footer #year {
  font-weight: bold;
}

/* Content Surface - Global Utility for Text Readability */
.content-surface {
  background: #ffffff;
  border-radius: 12px;
  padding: 32px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
  max-width: 900px;
  margin: 0 auto 32px auto;
  color: #4b0082;
}

.content-surface--narrow {
  max-width: 700px;
}

.content-surface h1,
.content-surface h2,
.content-surface h3,
.content-surface h4,
.content-surface h5,
.content-surface h6,
.content-surface p,
.content-surface label,
.content-surface li {
  color: #4b0082;
}

/* Mobile responsiveness for content surfaces */
@media (max-width: 768px) {
  .content-surface {
    padding: 16px;
    border-radius: 8px;
    margin-bottom: 20px;
  }
}

/* Animations */
@keyframes wiggle {
  0%, 100% { transform: rotate(0deg); }
  25% { transform: rotate(-5deg); }
  50% { transform: rotate(5deg); }
  75% { transform: rotate(-5deg); }
}

/* 
 * Disable wiggle animation on quiz bridge page only
 * For improved accessibility and reduced motion during decision-making
 * Buttons on all other pages retain the wiggle animation
 */
.quiz-bridge-page .button,
.quiz-bridge-page .cta-button,
.quiz-bridge-page a.button,
.quiz-bridge-page a.cta-button {
  animation: none !important;
}

/* Preserve hover and focus states for quiz bridge buttons */
.quiz-bridge-page .button:hover,
.quiz-bridge-page .cta-button:hover {
  transform: scale(1.05);
}

/* 
 * No-wiggle class for buttons that should never animate
 * Used for utility buttons like SEO scan on purchase page
 */
.seo-scan-button,
.no-wiggle {
  animation: none !important;
}

/* AOS Fallback if JS fails */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Responsive Layout for Screens ≤ 500px */
@media (max-width: 500px) {
  body {
    padding-top: 0;
    overflow-x: hidden;
    text-align: center;
  }

  .page-wrapper {
    max-width: 100vw;
    overflow-x: hidden;
  }

  .hero-banner {
    padding-top: 20px;
    margin-bottom: 20px;
  }

  .hero-text h1 {
    font-size: 2.2rem;
  }

  .hero-text p {
    font-size: 1rem;
    padding: 0 12px;
  }

  nav#custom-top-nav.tight-nav {
    padding: 10px 10px;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    z-index: 9999;
  }

  nav#custom-top-nav.tight-nav a {
    flex: 0 1 22%;
    max-width: 22%;
    text-align: center;
    color: white;
    text-decoration: none;
    font-size: 10px;
    margin: 2px 1%;
    padding: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  nav#custom-top-nav.tight-nav a img {
    width: 24px;
    height: 24px;
    margin-bottom: 3px;
  }

  main {
    padding-top: 240px;
    max-width: 100vw;
    overflow-x: hidden;
  }

  .section-box,
  .package-box,
  .extras {
    width: 92%;
    padding: 16px;
    margin: 0 auto;
  }

  .cta-button {
    width: 85%;
    font-size: 14px;
    padding: 10px 18px;
    margin: 16px auto;
    display: block;
    box-sizing: border-box;
  }

  .quiz-card {
    padding: 22px 16px;
    border-radius: 12px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.2);
  }

  h1, h2, h3, p, ul {
    text-align: center !important;
    padding: 0 8px;
  }

  img, video {
    max-width: 100%;
    height: auto;
  }
}
