/* Thanksgiving Palette
Deep Red/Burgundy: #7C2A31 or #8A2B33
Orange/Pumpkin: #D35400
Gold/Yellow: #F1C40F
Dark Brown: #3E2723
Warm Beige: #FDF5E6
*/

:root {
  --primary: #D35400;
  --primary-hover: #A04000;
  --secondary: #8A2B33;
  --bg-dark: #3E2723;
  --bg-light: #FDF5E6;
  --text-main: #333333;
  --text-muted: #555555;
  --white: #FFFFFF;
  --border-color: rgba(62, 39, 35, 0.15);
  
  --font-heading: 'Montserrat', sans-serif;
  --font-body: 'Inter', sans-serif;
}

/* Base */
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: var(--font-body);
  color: var(--text-main);
  background-color: var(--bg-light);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4, .font-heading {
  font-family: var(--font-heading);
  font-weight: 800;
  line-height: 1.2;
}
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
.hidden { display: none !important; }

/* Hero */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  background-image: url("https://offertabs.s3.amazonaws.com/offer/r4jwr7/site/media/6ad92bc715f458.08283529.jpg");
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
}
.hero-bg-overlay {
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  background: linear-gradient(135deg, rgba(45, 25, 23, 0.90) 0%, rgba(85, 30, 35, 0.85) 100%);
  z-index: 1;
}

/* Hero Content */
.hero-content {
  position: relative;
  z-index: 2;
  max-width: 600px;
  width: 100%;
  text-align: center;
  color: var(--white);
  padding: 0 20px;
}

.brand-header {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 24px;
}
.brand-white { color: var(--white); }
.brand-accent { color: var(--primary); }

.hero-headline {
  font-size: 3.7rem;
  font-weight: 900;
  margin-top: 40px;
  margin-bottom: 32px;
  text-shadow: 0 2px 10px rgba(0,0,0,0.3);
}
.title-text { color: var(--white); }
.title-text-sub {
  color: var(--primary);
  display: block;
}
.hero-tagline {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 24px;
  color: var(--white);
  opacity: 0.9;
}
.hero-subtitle {
  font-size: 0.95rem;
  line-height: 1.8;
  opacity: 0.85;
  max-width: 100%;
  margin: 0 auto 40px;
}

/* Form Wrapper */
.form-wrapper {
  background: transparent;
  border-radius: 0;
  padding: 0;
  color: var(--white);
  box-shadow: none;
  margin-top: 20px;
}
.form-row {
  display: flex;
  gap: 20px;
  margin-bottom: 20px;
}
.form-group {
  flex: 1;
  text-align: left;
}
.form-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 8px;
  font-size: 0.95rem;
  color: rgba(255,255,255,0.9);
}
.form-group input[type="text"],
.form-group input[type="email"] {
  width: 100%;
  padding: 14px 16px;
  font-family: var(--font-body);
  font-size: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--white);
  transition: all 0.3s;
}
.form-group input[type="text"]::placeholder,
.form-group input[type="email"]::placeholder {
  color: rgba(255, 255, 255, 0.5);
}
.form-group input:focus {
  outline: none;
  border-color: var(--primary);
  background: rgba(255, 255, 255, 0.1);
  box-shadow: 0 0 0 3px rgba(211, 84, 0, 0.2);
}
.form-group input.error {
  border-color: #E74C3C;
  background: rgba(231, 76, 60, 0.1);
}

.checkbox-group {
  margin-bottom: 30px !important;
  text-align: left;
}

.checkbox-label {
  display: flex !important;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
color: rgba(255, 255, 255, 0.8);
}

.checkbox-label input {
  flex: 0 0 auto;
  margin-top: 3px;
}

.checkbox-label span {
  display: block;
  flex: 1 1 0;
  min-width: 0;
  color: rgba(255, 255, 255, 0.65) !important;
}

.form-group .checkbox-label {
  font-weight: 400 !important;
  font-size: 0.75rem !important;
}

.checkbox-label.error,
.checkbox-label.error span {
  color: #E74C3C !important;
}

.checkbox-label.error input[type="checkbox"] {
  outline: 2px solid #E74C3C;
  outline-offset: 2px;
  border-radius: 2px;
}

.opt-in-error {
  color: #E74C3C;
  font-size: 0.85rem;
  margin-top: 8px;
  font-weight: 600;
}

.cta-btn {
  width: 75%;
  margin: 0 auto;
  padding: 16px;
  background: var(--primary);
  color: var(--white);
  border: none;
  border-radius: 8px;
  font-size: 1.1rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}
.cta-btn:hover {
  background: var(--primary-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(211, 84, 0, 0.4);
}
.cta-btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}
.btn-loader.hidden { display: none; }

.bonus-entry-section {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid rgba(255,255,255,0.2);
  text-align: center;
}
.bonus-entry-label {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--white);
  margin-bottom: 12px;
}

/* Instagram button updates */
.ig-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.05);
  color: var(--white);
  border: 1px solid rgba(255,255,255,0.3);
  padding: 14px 20px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.95rem;
  transition: all 0.3s;
  width: 75%;
  margin: 0 auto;
}
.ig-btn:hover {
  background: rgba(255,255,255,0.1);
  color: var(--white);
  text-decoration: none;
}
.ig-btn.applied {
  background: rgba(76, 175, 80, 0.2);
  border-color: #4CAF50;
  color: #81C784;
  pointer-events: none;
}

/* Agent Photo */
.agent-photo-container {
  margin-top: 30px;
  width: 100%;
  text-align: center;
}
.agent-photo {
  width: 60%;
  height: auto;
  border-radius: 12px;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 10px 30px rgba(0,0,0,0.3);
  margin: 0 auto;
}

/* Contact Info */
.agent-contact-info {
  margin-top: 16px;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.85);
  line-height: 1.5;
  font-weight: 400;
}
.agent-contact-info a {
  color: var(--white);
  font-weight: 400;
}

.form-message {
  margin-top: 16px;
  padding: 12px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.9rem;
}
.form-error {
  background: rgba(231, 76, 60, 0.2);
  color: #FFCDD2;
  border: 1px solid rgba(231, 76, 60, 0.4);
}

/* Success State & Duplicate State - Dark Mode Overrides */
.success-state {
  background: transparent;
  padding: 0;
  color: var(--white);
  box-shadow: none;
  margin-top: 30px;
  text-align: center;
}
.success-icon {
  font-size: 4rem;
  margin-bottom: 20px;
}
.success-title {
  font-size: 2rem;
  color: var(--white);
  margin-bottom: 12px;
}
.success-message {
  font-size: 0.95rem;
  color: rgba(255,255,255,0.9);
}

.share-panel {
  margin-top: 30px;
}
.share-divider {
  height: 1px;
  background: rgba(255,255,255,0.2);
  margin: 30px 0;
}
.share-heading {
  font-size: 1.2rem;
  margin-bottom: 8px;
}
.share-description {
  font-size: 0.95rem;
  color: rgba(255,255,255,0.8);
  margin-bottom: 16px;
}
.share-link-box {
  display: flex;
  margin-bottom: 20px;
}
.share-url-input {
  flex: 1;
  padding: 12px 16px;
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 8px 0 0 8px;
  font-family: inherit;
  font-size: 0.9rem;
  background: rgba(255, 255, 255, 0.05);
  color: var(--white);
}
.copy-btn {
  background: var(--secondary);
  color: var(--white);
  border: none;
  padding: 0 20px;
  border-radius: 0 8px 8px 0;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.3s;
}
.copy-btn:hover {
  background: #6a1f26;
}

.social-share-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}
.social-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 8px;
  color: var(--white);
  font-weight: 600;
  font-size: 0.9rem;
  transition: transform 0.3s;
}
.social-btn:hover {
  transform: translateY(-2px);
  text-decoration: none;
  color: var(--white);
}
.social-btn.facebook { background: #1877F2; }
.social-btn.twitter { background: #000000; }
.social-btn.instagram { background: #E1306C; }

/* Countdown */
.countdown-wrapper {
  margin-bottom: 30px;
}
.countdown-label {
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 12px;
  color: rgba(255,255,255,0.8);
}
.countdown {
  display: flex;
  justify-content: center;
  gap: 15px;
}
.countdown-unit {
  background: rgba(0,0,0,0.3);
  padding: 12px;
  border-radius: 8px;
  min-width: 70px;
  border: 1px solid rgba(255,255,255,0.1);
}
.countdown-value {
  display: block;
  font-size: 2rem;
  font-weight: 800;
  line-height: 1;
}
.countdown-label-small {
  display: block;
  font-size: 0.75rem;
  text-transform: uppercase;
  margin-top: 4px;
  opacity: 0.8;
}
.countdown-ended {
  font-size: 1.2rem;
  font-weight: 600;
  color: #F1C40F;
}

/* Sections */
.section-container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 80px 20px;
  text-align: center;
}
.section-title {
  font-size: 2.5rem;
  color: var(--bg-dark);
  margin-bottom: 12px;
}
.section-subtitle {
  font-size: 1.1rem;
  color: var(--text-muted);
  margin-bottom: 40px;
}

/* Steps Grid */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
}
.step-card {
  background: var(--white);
  padding: 40px 30px;
  border-radius: 16px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.05);
  border: 1px solid var(--border-color);
  position: relative;
  transition: transform 0.3s;
}
.step-card:hover {
  transform: translateY(-5px);
}
.step-number {
  width: 50px;
  height: 50px;
  background: var(--primary);
  color: var(--white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: 800;
  margin: 0 auto 20px;
}
.step-title {
  font-size: 1.25rem;
  margin-bottom: 12px;
  color: var(--bg-dark);
}
.step-desc {
  font-size: 0.95rem;
  color: var(--text-muted);
}

/* Final CTA */
.final-cta {
  background: linear-gradient(135deg, var(--secondary) 0%, var(--bg-dark) 100%);
  color: var(--white);
}
.final-cta-title {
  font-size: 2.5rem;
  margin-bottom: 20px;
  color: var(--white);
}
.final-cta-text {
  font-size: 1rem;
  opacity: 0.9;
  max-width: 600px;
  margin: 0 auto 40px;
}
.cta-btn-large {
  display: inline-flex;
  width: auto;
  padding: 18px 40px;
  font-size: 1.2rem;
  border-radius: 999px;
  background: var(--primary);
}
.cta-btn-large:hover {
  background: var(--white);
  color: var(--primary);
}

/* Footer */
.footer {
  background: #2E1B18;
  color: var(--white);
  padding: 40px 20px;
  text-align: center;
}
.footer .section-container {
  padding: 0;
}
.footer-brand {
  font-weight: 700;
  font-size: 1.1rem;
  margin-bottom: 12px;
  letter-spacing: 1px;
}
.footer-legal {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.6);
  max-width: 800px;
  margin: 0 auto 20px;
}
.rules-link {
  color: var(--primary);
  text-decoration: underline;
}

#wbx-powered-by-slot {
  margin-top: 30px;
  display: flex;
  justify-content: center;
}

/* Rules Modal */
.modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal-container {
  background: var(--white);
  width: 100%;
  max-width: 700px;
  max-height: 90vh;
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 50px rgba(0,0,0,0.5);
  overflow: hidden;
}
.modal-header {
  padding: 20px 30px;
  border-bottom: 1px solid #eee;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #f9f9f9;
}
.modal-title {
  font-size: 1.5rem;
  color: var(--bg-dark);
}
.modal-close-btn {
  background: none;
  border: none;
  color: #999;
  cursor: pointer;
  transition: color 0.3s;
}
.modal-close-btn:hover {
  color: #333;
}
.modal-body {
  padding: 30px;
  overflow-y: auto;
  color: var(--text-main);
  font-size: 0.95rem;
  text-align: left;
}
.rules-updated {
  font-style: italic;
  color: var(--text-muted);
  margin-bottom: 20px;
}
.modal-body h3 {
  font-size: 1.1rem;
  color: var(--bg-dark);
  margin: 20px 0 10px;
}
.modal-body p {
  margin-bottom: 16px;
}
.modal-footer {
  padding: 20px 30px;
  border-top: 1px solid #eee;
  text-align: right;
  background: #f9f9f9;
}
.cta-btn-modal {
  background: var(--primary);
  display: inline-block;
  border: none;
  color: var(--white);
  cursor: pointer;
}
.cta-btn-modal:hover {
  background: var(--primary-hover);
}

body.modal-open {
  overflow: hidden;
}

/* Responsive */
@media (max-width: 768px) {
  .hero-headline { font-size: 2.2rem; margin-top: 30px; margin-bottom: 30px; line-height: 1.2; }
  .hero-tagline { font-size: 1.2rem; }
  .hero-content { padding: 30px 20px; }
  .form-row { flex-direction: column; gap: 15px; }
  .section-title { font-size: 2rem; }
  .final-cta-title { font-size: 2rem; }
  .cta-btn { width: 100%; } /* Consider keeping full width on mobile for usability */
  .ig-btn { width: 100%; }
  .agent-photo { width: 70%; }
  .brand-header { font-size: 1rem; }
}
