/* CSS Variables */
:root {
  --brand-primary: #002A5C;
  --brand-secondary: #0050D8;
  --brand-secondary-hover: #003FA8;
  --accent-red: #E3312B;
  --ui-background: #FFFFFF;
  --ui-card-background: #FFFFFF;
  --ui-light-background: #F8F9FA;
  --ui-text-primary: #001420;
  --ui-text-secondary: #4D4D4D;
  --ui-border-color: #E0E0E0;
  --footer-background: #002A5C;
  --footer-text: #FFFFFF;
  --brand-font: MaisonNeue, Arial, Helvetica, sans-serif;
}

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

body {
  font-family: var(--brand-font);
  line-height: 1.6;
  color: var(--ui-text-primary);
  background-color: var(--ui-background);
}

/* Header */
header {
  background: var(--ui-background);
  padding: 1rem 2rem;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  position: relative;
  z-index: 100;
}

.logo-container {
  max-width: 1200px;
  margin: 0 auto;
  padding-left: 2rem;
}

.logo {
  height: 40px;
  width: auto;
}

/* Sticky Header */
.sticky-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: var(--ui-background);
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  z-index: 1000;
  transform: translateY(-100%);
  transition: transform 0.3s ease;
}

.sticky-header.visible {
  transform: translateY(0);
}

.sticky-header-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.sticky-title {
  font-weight: 600;
  color: var(--brand-primary);
  font-size: 1rem;
}

.nav-tabs {
  display: flex;
  gap: 2rem;
}

.nav-tab {
  text-decoration: none;
  color: var(--ui-text-secondary);
  font-weight: 500;
  transition: color 0.2s;
}

.nav-tab:hover,
.nav-tab.active {
  color: var(--brand-primary);
}

/* Main Content */
main {
  min-height: 100vh;
}

/* Main Content Section */
.main-content-section {
  padding: 4rem 2rem;
  background: var(--ui-light-background);
}

.content-container {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: start;
  padding-left: 2rem;
  padding-right: 2rem;
}

/* Left Column: Information */
.content-left {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.info-block {
  background: var(--ui-card-background);
  padding: 1.5rem;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

.info-heading {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  color: var(--ui-text-primary);
  min-height: 1.5rem;
  display: flex;
  align-items: center;
}

.info-text {
  color: var(--ui-text-secondary);
  line-height: 1.5;
  font-size: 0.875rem;
}

/* Right Column: Form */
.content-right {
  position: sticky;
  top: 2rem;
}

.referral-form-container {
  background: var(--ui-card-background);
  border-radius: 8px;
  padding: 1.5rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  /* Make the form container height match the three info blocks */
  min-height: calc(3 * (1.5rem + 1.5rem + 1.5rem + 1.5rem) + 2 * 1.5rem);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* Ensure the form content is centered vertically within the container */
.referral-form-container .form-step.active {
  display: flex;
  flex-direction: column;
  justify-content: center;
  height: 100%;
}

/* Hero Section */
.hero-section {
  background: linear-gradient(135deg, var(--brand-primary) 75%, var(--brand-secondary) 100%);
  color: white;
  width: 100%;
}

.hero-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  height: 300px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  /* Ensure alignment with logo container */
  box-sizing: border-box;
}

.promo-box {
  padding: 3rem 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  width: 100%;
  max-width: 600px;
  margin-left: 0;
  padding-left: 0;
  /* Ensure alignment with logo by matching the container padding */
  margin-left: 0;
  padding-left: 0;
  /* Align with logo position */
  position: relative;
  left: 0;
}

.bonus-label {
  font-size: 0.875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 1rem;
  opacity: 0.9;
}

.promo-heading {
  font-size: 2.5rem;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 1rem;
}

.promo-details {
  font-size: 1rem;
  margin-bottom: 1.5rem;
  opacity: 0.9;
}

.hero-image {
  background: url('../images/hero-image.png') center/cover;
  position: relative;
}

.hero-image::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(90deg, var(--brand-primary) 0%, rgba(0,42,92,0.9) 15%, rgba(0,42,92,0.7) 30%, rgba(0,42,92,0.4) 50%, rgba(0,42,92,0.1) 70%, transparent 85%);
  pointer-events: none;
}

/* Referral Form Styles */
.form-step {
  display: none;
}

.form-step.active {
  display: block;
}

.form-heading {
  color: var(--ui-text-primary);
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 1.25rem;
  text-align: center;
}

.referral-form,
.mobile-referral-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

/* Remove margin-bottom since we're using gap for spacing */
.form-field,
.form-row {
  margin-bottom: 0;
}

.referral-form .form-row,
.mobile-referral-form .form-row {
  grid-template-columns: 1fr 1fr;
}

@media (max-width: 480px) {
  .form-row {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}

.form-field label {
  font-weight: 500;
  color: var(--ui-text-primary);
  font-size: 0.75rem;
}

.form-field input {
  padding: 0.625rem;
  border: 1px solid var(--ui-border-color);
  border-radius: 6px;
  font-size: 0.875rem;
  transition: border-color 0.2s;
  background: var(--ui-background);
}

.form-field input:focus {
  outline: none;
  border-color: var(--brand-secondary);
}

.form-field input::placeholder {
  color: var(--ui-text-secondary);
  opacity: 0.7;
}

/* Checkbox Styles */
.terms-checkbox {
  margin-top: 1rem;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  font-size: 0.875rem;
  color: var(--ui-text-primary);
  user-select: none;
}

.checkbox-label input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  cursor: pointer;
  height: 0;
  width: 0;
}

.checkmark {
  min-width: 18px;
  width: 18px;
  height: 18px;
  border: 2px solid var(--ui-border-color);
  border-radius: 4px;
  position: relative;
  transition: all 0.2s;
  background-color: var(--ui-background);
  display: inline-block;
}

.checkbox-label:hover input[type="checkbox"] ~ .checkmark {
  border-color: var(--brand-secondary);
}

.checkbox-label input[type="checkbox"]:checked + .checkmark {
  background: var(--brand-secondary);
  border-color: var(--brand-secondary);
}

.checkbox-label input[type="checkbox"]:checked + .checkmark::after {
  content: '';
  position: absolute;
  left: 5px;
  top: 2px;
  width: 4px;
  height: 8px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

/* Form Buttons */
/* Base button styles */
.form-button {
  padding: 0.75rem 1.5rem;
  border-radius: 6px;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  text-align: center;
  border: 2px solid transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  line-height: 1.4;
  min-width: 120px;
  height: 44px;
  box-sizing: border-box;
}

/* Primary button variant */
.form-button-primary {
  background: var(--brand-primary);
  color: white;
  border-color: var(--brand-primary);
}

.form-button-primary:hover {
  background: var(--brand-secondary);
  border-color: var(--brand-secondary);
}

/* Light button variant */
.form-button-light {
  background: var(--ui-light-background);
  color: var(--brand-secondary);
  border-color: var(--brand-secondary);
}

.form-button-light:hover {
  background: var(--brand-secondary);
  color: white;
}

/* Form button container */
.form-buttons {
  display: flex;
  gap: 1rem;
  margin-top: 2rem;
  width: 100%;
}

/* Step 1 form buttons */
#referralFormStep1 .form-buttons,
#mobileReferralFormStep1 .form-buttons {
  justify-content: stretch;
}

#referralFormStep1 .form-button,
#mobileReferralFormStep1 .form-button {
  flex: 1;
  width: 100%;
}

/* Step 2 form buttons */
#referralFormStep2 .form-buttons,
#mobileReferralFormStep2 .form-buttons {
  justify-content: space-between;
}

#referralFormStep2 .form-button-light,
#mobileReferralFormStep2 .form-button-light {
  flex: 1;
  height: 44px;
}

#referralFormStep2 .form-button-primary,
#mobileReferralFormStep2 .form-button-primary {
  flex: 2;
  margin-left: 1rem;
  height: 44px;
}

/* Mobile adjustments */
@media (max-width: 768px) {
  .form-buttons {
    flex-direction: column;
  }

  .form-button {
    width: 100%;
    min-width: auto;
  }

  #referralFormStep2 .form-button-primary,
  #mobileReferralFormStep2 .form-button-primary {
    margin-left: 0;
    margin-top: 1rem;
  }
}

/* Step 2 form buttons */
#referralFormStep2 .form-buttons,
#mobileReferralFormStep2 .form-buttons {
  justify-content: space-between;
}

.form-submit-btn {
  flex: 2;
}

.form-message {
  display: none;
  padding: 2rem;
  margin: 1rem 0;
  border-radius: 8px;
  text-align: center;
  background: white;
  border: 1px solid #E0E0E0;
}

.form-message.error {
  display: block;
  background-color: #FEE2E2;
  color: #DC2626;
  border: 1px solid #FCA5A5;
}

.form-message.success {
  display: block;
  background-color: white;
  color: #059669;
  border: none;
  padding-left: 1rem;
  padding-right: 1rem;
  font-size: 1.1rem;
  font-weight: 500;
  min-height: 300px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

/* Add border to outer containers when they contain success messages */
.mobile-form-container:has(.form-message.success),
.referral-form-container:has(.form-message.success) {
  border: 1px solid #A7F3D0;
  border-radius: 8px;
}

/* Fallback for browsers that don't support :has() */
.mobile-form-container.success-state,
.referral-form-container.success-state {
  border: 1px solid #A7F3D0;
  border-radius: 8px;
}

/* Remove all border styling for success state containers */

.success-icon {
  font-size: 4rem;
  color: #10B981;
  margin-bottom: 1.5rem;
  animation: celebrateIcon 0.6s ease-out;
}

.success-icon i {
  filter: drop-shadow(0 4px 8px rgba(16, 185, 129, 0.3));
}

.message-text {
  line-height: 1.6;
  max-width: 400px;
}

@keyframes celebrateIcon {
  0% {
    transform: scale(0) rotate(0deg);
    opacity: 0;
  }
  50% {
    transform: scale(1.2) rotate(180deg);
    opacity: 1;
  }
  100% {
    transform: scale(1) rotate(360deg);
    opacity: 1;
  }
}

.form-message-actions {
  display: flex;
  gap: 1rem;
  margin-top: 2rem;
  justify-content: center;
}

.form-message-actions-success {
  display: flex;
  gap: .5rem;
  margin-top: 2rem;
  justify-content: center;
}

.form-message-actions .form-button {
  flex: 1;
  max-width: 200px;
}

@media (max-width: 768px) {
  .form-message {
    padding: 1.5rem;
    margin: 0;
    border-radius: 6px;
  }
  
  .form-message.success {
    min-height: 250px;
  }
  
  .form-message-actions {
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
  }
  
  .form-message-actions .form-button {
    max-width: none;
    width: 100%;
  }
}

/* Mobile Form Styles */
.mobile-form-container {
  background: var(--ui-card-background);
  border-radius: 12px;
  padding: 1.5rem;
  margin-top: 1.5rem;
  box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.mobile-referral-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.mobile-referral-form .form-field {
  gap: 0.25rem;
}

.mobile-referral-form input {
  padding: 0.875rem;
  font-size: 1rem;
}

/* CTA Button */
/* Remove old button styles */
.cta-button {
  display: none !important;
}

/* Banner button adjustments */
.cta-banner-button {
  font-size: 1.125rem;
  padding: 1rem 2.5rem;
  background: white;
  color: var(--brand-primary);
  border-color: white;
}

.cta-banner-button:hover {
  background: var(--ui-light-background);
  border-color: var(--ui-light-background);
}

/* Mobile Styles */
.mobile-form-section {
  display: none;
  padding: 2rem 1.5rem;
  background: var(--ui-light-background);
}

.desktop-promo {
  display: block;
}

/* Hide mobile form on desktop */
@media (min-width: 769px) {
  .mobile-form-section {
    display: none !important;
  }
  
  .content-right {
    display: block !important;
  }
}

/* Steps Section */
.steps-section {
  padding: 4rem 2rem;
  background: var(--ui-background);
}

.section-heading {
  text-align: center;
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 3rem;
  color: var(--ui-text-primary);
}

.steps-container {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  padding-left: 2rem;
  padding-right: 2rem;
}

.step-card {
  text-align: center;
  padding: 2rem;
  background: var(--ui-card-background);
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

.step-icon {
  width: 80px;
  height: 80px;
  background: var(--brand-primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
}

.step-icon i {
  font-size: 2rem;
  color: white;
}

.step-heading {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--ui-text-primary);
}

.step-details {
  color: var(--ui-text-secondary);
  line-height: 1.6;
}

/* Benefits Section */
.benefits-section {
  padding: 4rem 2rem;
  background: var(--ui-light-background);
}

.benefits-container {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 4rem;
  align-items: center;
  padding-left: 2rem;
  padding-right: 2rem;
}

.benefits-image {
  text-align: center;
}

.full-width-image {
  max-width: 100%;
  height: auto;
}

.benefits-heading {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 2rem;
  color: var(--ui-text-primary);
}

.benefit-item {
  margin-bottom: 2rem;
}

.benefit-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--ui-text-primary);
}

.benefit-details {
  color: var(--ui-text-secondary);
  line-height: 1.6;
}

/* CTA Banner */
.cta-banner-section {
  padding: 4rem 2rem;
  background: var(--brand-primary);
  color: white;
}

.cta-banner-container {
  max-width: 1200px;
  margin: 0 auto;
  text-align: center;
  padding-left: 2rem;
  padding-right: 2rem;
}

.cta-banner-heading {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 2rem;
}

.cta-banner-button {
  background: white;
  color: var(--brand-primary);
  font-size: 1.125rem;
  padding: 1rem 2.5rem;
  min-width: 180px;
  height: 44px;
  box-sizing: border-box;
}

.cta-banner-button:hover {
  background: var(--ui-light-background);
}

/* Terms Section */
.terms-section {
  background: var(--ui-light-background);
  padding: 4rem 2rem;
  border-top: 1px solid var(--ui-border-color);
}

.terms-container {
  max-width: 1200px;
  margin: 0 auto;
  padding-left: 2rem;
  padding-right: 2rem;
}

.terms-heading {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 2rem;
  color: var(--ui-text-primary);
  text-align: center;
}

.terms-content {
  background: var(--ui-card-background);
  padding: 2rem;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.terms-content h4 {
  font-size: 1.125rem;
  font-weight: 600;
  margin: 0 0 1rem;
  color: var(--ui-text-primary);
}

.terms-content p {
  margin-bottom: 1rem;
  line-height: 1.6;
  color: var(--ui-text-secondary);
}

.terms-content ol {
  margin-left: 1.5rem;
  margin-bottom: 1.5rem;
}

.terms-content li {
  margin-bottom: 0.5rem;
  color: var(--ui-text-secondary);
  line-height: 1.6;
}

.bank-specific-terms {
  margin-bottom: 2rem;
}

.bank-specific-terms h4 {
  color: var(--brand-primary);
  font-weight: 600;
  margin: 1.5rem 0 1rem 0;
  font-size: 1.1rem;
}

.bank-specific-terms h4:first-child {
  margin-top: 0;
}

.bank-specific-terms p {
  margin-bottom: 1rem;
  line-height: 1.6;
  color: var(--ui-text-secondary);
}

.terms-footer {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--ui-border);
  font-size: 0.75rem;
  color: var(--ui-text-secondary);
}

.terms-footer p {
  margin-bottom: 0.5rem;
}

.terms-branding {
  margin-top: 1rem;
  text-align: center;
}

.terms-logo {
  height: 30px;
  width: auto;
  margin-bottom: 0.5rem;
}

.terms-copyright {
  font-size: 0.7rem;
  opacity: 0.8;
}



.text-link {
  color: var(--brand-secondary);
  text-decoration: none;
}

.text-link:hover {
  text-decoration: underline;
}

/* Responsive Design */
@media (max-width: 768px) {
  /* Header adjustments */
  header {
    background: transparent;
    box-shadow: none;
    position: absolute;
    width: 100%;
    z-index: 100;
  }

  /* Hide sticky header initially */
  .sticky-header {
    display: none;
  }

  /* Only show sticky header after scrolling past form */
  .sticky-header.visible {
    display: block;
    background: var(--ui-background);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  }

  /* Form layout */
  .mobile-form-section {
    display: block;
    padding-top: 6rem; /* Space for the header */
  }

  .desktop-promo {
    display: none;
  }

  /* Make first name / last name vertical on mobile */
  .mobile-referral-form .form-row {
    display: flex;
    flex-direction: column;
    gap: 1rem;
  }

  .mobile-referral-form .form-field {
    width: 100%;
  }

  /* Other mobile adjustments */
  .sticky-header-content {
    flex-direction: column;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
  }

  .nav-tabs {
    gap: 1.5rem;
  }

  .steps-container {
    grid-template-columns: 1fr;
  }

  .benefits-container {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .content-container {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .content-right {
    position: static;
    display: none !important;
  }

  .form-buttons {
    flex-direction: column;
  }

  .cta-banner-heading {
    font-size: 1.5rem;
  }
  
  .cta-banner-button {
    min-width: auto;
    width: 100%;
  }
  
  /* Terms footer mobile adjustments */
  .terms-footer {
    text-align: center;
  }
  
  .terms-branding {
    margin-top: 1.5rem;
  }
  
  .terms-logo {
    margin: 0 auto 0.5rem;
  }
  
  /* Terms mobile adjustments */
  .terms-section {
    padding: 2rem 1.5rem;
  }
  
  .terms-content {
    padding: 1.5rem;
  }
} 