/* ====== VARIABLES & RESETS ====== */
:root {
  --primary: #e62828;
  --primary-dark: #b91c1c;
  --secondary: #fef3c7;
  --text-dark: #1e293b;
  --text-light: #475569;
  --error: #ef4444;
  --bg-color: #0f172a;
  
  --font-heading: 'Playfair Display', serif;
  --font-body: 'Inter', sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-body);
  color: var(--text-dark);
  background-color: var(--bg-color);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* REQUIRED UTILITY CLASS */
.hidden {
  display: none !important;
}

/* ====== LAYOUT & BACKGROUND ====== */
.page-wrapper {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem 1.5rem;
  background-image: url('https://offertabs.s3.amazonaws.com/offer/xf4iv2/site/media/6a74df47972030.62275380.jpg');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.6) 0%, rgba(15, 23, 42, 0.4) 100%);
  backdrop-filter: blur(15px);
  z-index: 1;
}

.main-content {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 950px;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: auto 0;
}

/* ====== HEADER ====== */
.header {
  text-align: center;
  margin-bottom: 2.5rem;
}

.badge {
  display: inline-block;
  padding: 0.35rem 1rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: var(--secondary);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 1.25rem;
}

.title {
  font-family: var(--font-heading);
  font-size: 3.5rem;
  font-weight: 800;
  color: #ffffff;
  line-height: 1.1;
  margin-bottom: 1rem;
}

.text-gradient {
  background: linear-gradient(135deg, #f87171 0%, #e62828 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.subtitle {
  font-size: 1.125rem;
  color: rgba(255, 255, 255, 0.9);
  line-height: 1.6;
  max-width: 500px;
  margin: 0 auto;
}

/* ====== CARD CONTAINER (GLASSMORPHISM) ====== */
.card-container {
  width: 100%;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(16px);
  border-radius: 20px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2), 0 1px 3px rgba(255, 255, 255, 0.2) inset;
  margin-bottom: 2rem;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.promo-image {
  width: 100%;
  background-color: #0f172a;
}

.promo-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.form-content {
  width: 100%;
  padding: 2.5rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

@media(min-width: 768px) {
  .card-container {
    flex-direction: row;
  }
  .promo-image {
    width: 45%;
  }
  .form-content {
    width: 55%;
    padding: 3rem;
  }
}

/* ====== FORM STYLES ====== */
.form-row {
  display: flex;
  gap: 1.5rem;
}

.form-row .form-group {
  flex: 1;
}

.form-group {
  margin-bottom: 1.5rem;
}

label {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 0.5rem;
}

input[type="text"],
input[type="email"] {
  width: 100%;
  padding: 0.875rem 1.25rem;
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--text-dark);
  background-color: #f8fafc;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  transition: all 0.3s ease;
}

input[type="text"]:focus,
input[type="email"]:focus {
  outline: none;
  border-color: var(--primary);
  background-color: #ffffff;
  box-shadow: 0 0 0 3px rgba(230, 40, 40, 0.15);
}

input::placeholder {
  color: #94a3b8;
}

/* ====== BUTTONS ====== */
.cta-button {
  width: 100%;
  padding: 1.125rem;
  font-family: var(--font-body);
  font-size: 1.125rem;
  font-weight: 600;
  color: #ffffff;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  border: none;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 6px rgba(230, 40, 40, 0.2);
  margin-top: 1rem;
}

.cta-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 15px rgba(230, 40, 40, 0.3);
}

.cta-button:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

/* ====== ALERTS & MESSAGES ====== */
.status-alert {
  padding: 1rem;
  background-color: #f1f5f9;
  border-left: 4px solid var(--text-light);
  border-radius: 8px;
  text-align: center;
  font-weight: 500;
  margin-bottom: 1.5rem;
}

.error-alert {
  padding: 0.875rem;
  background-color: #fef2f2;
  border-left: 4px solid var(--error);
  color: #b91c1c;
  border-radius: 8px;
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
}

/* ====== THANK YOU / SUCCESS SECTION ====== */
#thank-you-container {
  text-align: center;
}

.success-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 80px;
  height: 80px;
  background-color: #fee2e2;
  color: var(--primary-dark);
  border-radius: 50%;
  margin-bottom: 1.5rem;
}

.success-title {
  font-family: var(--font-heading);
  font-size: 2.5rem;
  color: var(--text-dark);
  margin-bottom: 0.75rem;
}

.success-message {
  font-size: 1.05rem;
  color: var(--text-light);
  line-height: 1.6;
  margin-bottom: 2rem;
}

/* ====== SHARE SECTION ====== */
.share-section {
  background-color: #f8fafc;
  padding: 1.75rem;
  border-radius: 16px;
  border: 1px solid #e2e8f0;
  margin-top: 2rem;
  text-align: left;
}

.share-section h3 {
  font-size: 1.25rem;
  color: var(--text-dark);
  margin-bottom: 0.5rem;
}

.share-section p {
  font-size: 0.9rem;
  color: var(--text-light);
  margin-bottom: 1.25rem;
}

/* Social Follow */
.follow-section {
  margin-bottom: 1.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid #e2e8f0;
}

.section-subhead {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 0.5rem;
}

.social-follow-buttons {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  margin-top: 1rem;
}

/* Share Inputs */
.share-input-group {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}

.share-input-group input {
  flex: 1;
  background-color: #ffffff;
}

.secondary-button {
  padding: 0 1.25rem;
  background-color: var(--text-dark);
  color: #ffffff;
  border: none;
  border-radius: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.secondary-button:hover {
  background-color: #0f172a;
}

/* Universal Social Button Styles */
.social-share-buttons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.social-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.875rem;
  border: none;
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 600;
  color: #ffffff;
  cursor: pointer;
  transition: opacity 0.2s ease;
}

.social-btn:hover {
  opacity: 0.9;
}

.social-btn:disabled {
  opacity: 0.6;
  cursor: default;
  background-color: #64748b !important;
  background-image: none !important;
}

/* Specific Platform Colors */
.fb-btn { background-color: #1877F2; }
.tw-btn { background-color: #000000; }
.ig-btn { background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%); }
.tt-btn { background-color: #000000; }

/* ====== RULES LINK & MODAL ====== */
.rules-link {
  text-align: center;
  margin-top: 1.25rem;
  font-size: 0.85rem;
}

.rules-link a {
  color: var(--text-light);
  text-decoration: underline;
  transition: color 0.2s;
}

.rules-link a:hover {
  color: var(--primary);
}

.modal {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(5px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 1;
  transition: opacity 0.3s ease;
}

.modal.hidden {
  display: none !important;
  opacity: 0;
}

.modal-content {
  background: #ffffff;
  border-radius: 16px;
  width: 100%;
  max-width: 800px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  position: relative;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  animation: modalIn 0.3s ease-out;
}

@keyframes modalIn {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.modal-close-btn {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #f1f5f9;
  border: none;
  font-size: 1.25rem;
  line-height: 1;
  color: var(--text-dark);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.2s;
  z-index: 2;
}

.modal-close-btn:hover {
  background: #e2e8f0;
}

.modal-body {
  padding: 2.5rem;
  overflow-y: auto;
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--text-dark);
}

.modal-body h3 {
  font-family: var(--font-heading);
  font-size: 1.75rem;
  margin-bottom: 1.5rem;
  color: var(--primary-dark);
  padding-right: 2rem;
}

.modal-body p {
  margin-bottom: 1rem;
}

/* ====== FOOTER / POWERED BY ====== */
#wbx-powered-by-slot {
  width: 100%;
  display: flex;
  justify-content: center;
  margin-top: 1rem;
}

/* ====== RESPONSIVE ====== */
@media (max-width: 640px) {
  .page-wrapper {
    padding: 1.5rem 1rem;
  }
  
  .title {
    font-size: 2.5rem;
  }
  
  .form-content {
    padding: 2rem 1.5rem;
  }
  
  .form-row {
    flex-direction: column;
    gap: 0;
  }
  
  .social-share-buttons {
    grid-template-columns: 1fr;
  }

  .social-follow-buttons {
    grid-template-columns: 1fr;
  }
}
