/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary-color: #28a745;
  --primary-dark: #1e7e34;
  --primary-light: #34ce57;
  --secondary-color: #6c757d;
  --success-color: #28a745;
  --warning-color: #ffc107;
  --danger-color: #dc3545;
  --light-color: #f8f9fa;
  --dark-color: #343a40;
  --white: #ffffff;
  --text-primary: #2c3e50;
  --text-secondary: #6c757d;
  --border-color: #e9ecef;
  --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.15);
  --border-radius: 12px;
  --transition: all 0.3s ease;
}

body {
  font-family: "Poppins", sans-serif;
  line-height: 1.6;
  color: var(--text-primary);
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  min-height: 100vh;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Header */
.header {
  background: var(--white);
  box-shadow: var(--shadow);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 20px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.logo img {
  width: 50px;
  height: 50px;
  border-radius: 50%;
}

.logo-text {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary-color);
}

.nav ul {
  display: flex;
  list-style: none;
  gap: 2rem;
}

.nav-link {
  text-decoration: none;
  color: var(--text-primary);
  font-weight: 500;
  transition: var(--transition);
}

.nav-link:hover {
  color: var(--primary-color);
}

.login-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  background: var(--primary-color);
  color: var(--white);
  text-decoration: none;
  border-radius: var(--border-radius);
  font-weight: 500;
  transition: var(--transition);
}

.login-btn:hover {
  background: var(--primary-dark);
}

/* Main Content */
.main-content {
  padding: 2rem 0;
  min-height: calc(100vh - 200px);
}

/* Progress Steps */
.progress-steps {
  display: flex;
  justify-content: center;
  margin-bottom: 3rem;
  position: relative;
}

.progress-steps::before {
  content: "";
  position: absolute;
  top: 25px;
  left: 50%;
  transform: translateX(-50%);
  width: 60%;
  height: 2px;
  background: var(--border-color);
  z-index: 1;
}

.step {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  z-index: 2;
  background: var(--white);
  padding: 0 20px;
}

.step-number {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--border-color);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
  transition: var(--transition);
}

.step.active .step-number {
  background: var(--primary-color);
  color: var(--white);
}

.step.completed .step-number {
  background: var(--success-color);
  color: var(--white);
}

.step-label {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  text-align: center;
}

.step.active .step-label {
  color: var(--primary-color);
}

/* Form Container */
.form-container {
  background: var(--white);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-lg);
  padding: 3rem;
  max-width: 800px;
  margin: 0 auto;
}

.form-header {
  text-align: center;
  margin-bottom: 3rem;
}

.form-header h1 {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 1rem;
}

.form-header p {
  font-size: 1.1rem;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto;
}

/* Form Steps */
.form-step {
  display: none;
  animation: fadeIn 0.5s ease;
}

.form-step.active {
  display: block;
}

.form-step h2 {
  font-size: 1.8rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 2rem;
  text-align: center;
}

/* Form Elements */
.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: var(--text-primary);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.input-container {
  position: relative;
  display: flex;
}

.input-container input {
  flex: 1;
}

.search-cep-btn {
  position: absolute;
  right: 5px;
  top: 50%;
  transform: translateY(-50%);
  background: var(--primary-color);
  color: var(--white);
  border: none;
  border-radius: var(--border-radius);
  width: 40px;
  height: 40px;
  cursor: pointer;
  transition: var(--transition);
}

.search-cep-btn:hover {
  background: var(--primary-dark);
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 12px 15px;
  border: 2px solid var(--border-color);
  border-radius: var(--border-radius);
  font-size: 1rem;
  transition: var(--transition);
  background: var(--white);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(40, 167, 69, 0.1);
}

.form-group input:read-only {
  background: var(--light-color);
  color: var(--text-secondary);
}

/* Form Actions */
.form-actions {
  display: flex;
  justify-content: space-between;
  margin-top: 2rem;
  gap: 1rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--border-radius);
  text-decoration: none;
  font-weight: 600;
  transition: var(--transition);
  border: none;
  cursor: pointer;
  font-size: 1rem;
  min-width: 120px;
  justify-content: center;
}

.btn-primary {
  background: var(--primary-color);
  color: var(--white);
}

.btn-primary:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
}

.btn-secondary {
  background: var(--light-color);
  color: var(--text-secondary);
  border: 2px solid var(--border-color);
}

.btn-secondary:hover {
  background: var(--border-color);
}

.btn-success {
  background: var(--success-color);
  color: var(--white);
}

.btn-success:hover {
  background: #1e7e34;
  transform: translateY(-2px);
}

.btn-whatsapp {
  background: #25d366;
  color: var(--white);
}

.btn-whatsapp:hover {
  background: #128c7e;
}

/* Confirmation Card */
.confirmation-card {
  background: var(--light-color);
  border-radius: var(--border-radius);
  padding: 2rem;
  margin-bottom: 2rem;
}

.confirmation-section {
  margin-bottom: 2rem;
}

.confirmation-section:last-child {
  margin-bottom: 0;
}

.confirmation-section h3 {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--primary-color);
  margin-bottom: 1rem;
}

.confirmation-content {
  background: var(--white);
  padding: 1rem;
  border-radius: var(--border-radius);
  border-left: 4px solid var(--primary-color);
}

.confirmation-content p {
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.confirmation-content p:last-child {
  margin-bottom: 0;
}

/* Terms Section */
.terms-section {
  margin: 2rem 0;
  text-align: center;
}

.checkbox-container {
  display: inline-flex;
  align-items: center;
  cursor: pointer;
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.checkbox-container input {
  display: none;
}

.checkmark {
  width: 20px;
  height: 20px;
  border: 2px solid var(--border-color);
  border-radius: 4px;
  margin-right: 10px;
  position: relative;
  transition: var(--transition);
}

.checkbox-container input:checked + .checkmark {
  background: var(--primary-color);
  border-color: var(--primary-color);
}

.checkbox-container input:checked + .checkmark::after {
  content: "✓";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: var(--white);
  font-size: 14px;
  font-weight: bold;
}

.terms-link {
  color: var(--primary-color);
  text-decoration: none;
}

.terms-link:hover {
  text-decoration: underline;
}

/* Modal */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 9999;
  animation: fadeIn 0.3s ease;
}

.modal.show {
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-content {
  background: var(--white);
  border-radius: var(--border-radius);
  max-width: 500px;
  width: 90%;
  animation: slideIn 0.3s ease;
}

.modal-header {
  text-align: center;
  padding: 2rem 2rem 1rem;
}

.success-icon {
  font-size: 4rem;
  color: var(--success-color);
  margin-bottom: 1rem;
}

.modal-header h3 {
  font-size: 1.8rem;
  font-weight: 600;
  color: var(--text-primary);
}

.modal-body {
  padding: 0 2rem 1rem;
  text-align: center;
}

.modal-body p {
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
  font-size: 1.1rem;
}

.success-details {
  background: var(--light-color);
  border-radius: var(--border-radius);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.detail-item {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.detail-item:last-child {
  margin-bottom: 0;
}

.detail-item i {
  color: var(--primary-color);
  width: 20px;
}

.whatsapp-section {
  margin-bottom: 1.5rem;
}

.whatsapp-section p {
  margin-bottom: 1rem;
  font-size: 1rem;
}

.modal-footer {
  padding: 1rem 2rem 2rem;
  text-align: center;
}

/* Footer */
.footer {
  background: var(--dark-color);
  color: var(--white);
  padding: 2rem 0 1rem;
  margin-top: 3rem;
}

.footer-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin-bottom: 1rem;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 1rem;
}

.footer-logo img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
}

.footer-logo span {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary-color);
}

.footer-section h4 {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.footer-section ul {
  list-style: none;
}

.footer-section li {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 0.5rem;
  color: #adb5bd;
}

.footer-section i {
  color: var(--primary-color);
  width: 16px;
}

.footer-bottom {
  text-align: center;
  padding-top: 1rem;
  border-top: 1px solid #495057;
  color: #adb5bd;
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(-30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Responsive Design */
@media (max-width: 768px) {
  .form-container {
    padding: 2rem 1.5rem;
    margin: 0 1rem;
  }

  .form-header h1 {
    font-size: 2rem;
  }

  .form-row {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .form-actions {
    flex-direction: column;
  }

  .progress-steps {
    flex-direction: column;
    gap: 1rem;
  }

  .progress-steps::before {
    display: none;
  }

  .step {
    flex-direction: row;
    justify-content: flex-start;
    padding: 0;
  }

  .step-number {
    margin-bottom: 0;
    margin-right: 1rem;
  }

  .footer-content {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .nav {
    display: none;
  }
}

@media (max-width: 480px) {
  .form-container {
    padding: 1.5rem 1rem;
  }

  .form-header h1 {
    font-size: 1.8rem;
  }

  .btn {
    padding: 10px 16px;
    font-size: 0.9rem;
  }

  .modal-content {
    margin: 1rem;
  }
}
