:root {
  /* Colores por defecto (fallback si no hay tenant) */
  --tenant-primary: #dc3545;
  --tenant-secondary: #c82333;
  --image-background: url(/images/{{ $tenant->code }}/background.jpg);

  
  /* Alias para mantener compatibilidad */
  --primary-color: var(--tenant-primary);
  --secondary-color: var(--tenant-secondary);
  
  --success-color: #28a745;
  --danger-color: #dc3545;
  --warning-color: #ffc107;
  --info-color: #17a2b8;
  --light-color: #f8f9fa;
  --dark-color: #343a40;
  --white: #ffffff;

  /* Grises */
  --gray-100: #f8f9fa;
  --gray-200: #e9ecef;
  --gray-300: #dee2e6;
  --gray-400: #ced4da;
  --gray-500: #adb5bd;
  --gray-600: #6c757d;
  --gray-700: #495057;
  --gray-800: #343a40;
  --gray-900: #212529;
}

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

body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.6;
  color: #333;
  background-color: var(--white);
}

/* Hero Section */
.hero-section {
    color: var(--white);
    position: relative;
    overflow: hidden;
    background-image: url('/images/background.jpg');
    background-size: cover;
    background-position: top center;
}

/* Capa de blur y oscurecimiento */
.hero-section::before {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    z-index: 0;
}

/* Asegura que el texto esté por encima */
.hero-section * {
    position: relative;
    z-index: 1;
}

.hero-title {
  font-size: 3.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.hero-title i {
  margin-right: 1rem;
  color: var(--tenant-primary);
}

.hero-subtitle {
  font-size: 1.5rem;
  font-weight: 300;
  margin-bottom: 1rem;
  opacity: 0.9;
}

.hero-description {
  font-size: 1.1rem;
  margin-bottom: 2rem;
  opacity: 0.8;
}

.hero-image {
  text-align: center;
  position: relative;
  z-index: 2;
}

.logo-container {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 400px;
}

.hero-logo {
  max-width: 550px;
  width: 100%;
  height: auto;
  border-radius: 20px;
  /*box-shadow: 0 1rem 3rem rgba(0, 0, 0, 0.175);
  animation: float 3s ease-in-out infinite;*/
}

/* Form Section */
.form-section {
  padding: 4rem 0;
  background-color: var(--gray-100);
}

.form-card {
  background: var(--white);
  border-radius: 1rem;
  box-shadow: 0 1rem 3rem rgba(0, 0, 0, 0.175);
  padding: 2rem;
  margin-bottom: 2rem;
}

.form-header {
  text-align: center;
  margin-bottom: 2rem;
}

.form-logo {
  margin-bottom: 1rem;
  display: none;
}

.form-brand-logo {
  max-width: 150px;
  height: auto;
}

.form-header h2 {
  color: var(--tenant-primary);
  font-weight: 600;
  margin-bottom: 0.5rem;
}

/* Progress Bar */
.progress-container {
  margin-bottom: 2rem;
}

.progress {
  height: 8px;
  background-color: #e9ecef;
  border-radius: 4px;
  margin-bottom: 1rem;
}

.progress-bar {
  background: linear-gradient(90deg, var(--tenant-primary), var(--tenant-secondary));
  transition: width 0.3s ease;
}

.progress-steps {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.step {
  display: flex;
  flex-direction: column;
  align-items: center;
  color: var(--gray-600);
  transition: all 0.3s ease;
  cursor: pointer;
}

.step.active {
  color: var(--tenant-primary);
  transform: scale(1.1);
}

.step i {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background-color: var(--gray-100);
  transition: all 0.3s ease;
}

.step.active i {
  background-color: var(--tenant-primary);
  color: var(--white);
}

.step span {
  font-size: 0.9rem;
  font-weight: 500;
}

/* Form Steps */
.form-step {
  display: none;
  animation: fadeIn 0.5s ease-in;
}

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

.form-step h3 {
  color: var(--tenant-primary);
  margin-bottom: 1rem;
  font-weight: 600;
}

/* Form Controls */
.form-group {
  margin-bottom: 1.5rem;
}

.form-label {
  font-weight: 600;
  color: var(--tenant-primary);
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
}

.form-label i {
  margin-right: 0.5rem;
  width: 20px;
}

.form-control,
.form-select {
  border: 2px solid #e9ecef;
  border-radius: 0.5rem;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  transition: all 0.3s ease;
}

.form-control:focus,
.form-select:focus {
  border-color: var(--tenant-primary);
  box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25);
}

/* Preference Groups */
.preference-group {
  background-color: var(--gray-100);
  border-radius: 0.5rem;
  padding: 1.5rem;
  margin-bottom: 1rem;
  height: 100%;
}

.preference-group h5 {
  color: var(--tenant-primary);
  margin-bottom: 1rem;
  font-weight: 600;
  display: flex;
  align-items: center;
}

.preference-group h5 i {
  margin-right: 0.5rem;
}

.checkbox-group {
  max-height: 200px;
  overflow-y: auto;
}

.form-check {
  margin-bottom: 0.75rem;
}

.form-check-input:checked {
  background-color: var(--tenant-primary);
  border-color: var(--tenant-primary);
}

.form-check-label {
  font-weight: 500;
  cursor: pointer;
}

/* Step Buttons */
.step-buttons {
  display: flex;
  justify-content: space-between;
  margin-top: 2rem;
  gap: 1rem;
}

.btn {
  border-radius: 0.5rem;
  font-weight: 600;
  padding: 0.75rem 1.5rem;
  transition: all 0.3s ease;
  border: none;
  position: relative;
  overflow: hidden;
}

.btn-primary {
  background: var(--tenant-primary);
  color: var(--white);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.btn-primary::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, transparent, rgba(255, 255, 255, 0.2));
  opacity: 0;
  transition: opacity 0.3s ease;
}

.btn-primary:hover {
  background: var(--tenant-secondary);
  transform: translateY(-3px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
  filter: brightness(1.1);
}

.btn-primary:hover::before {
  opacity: 1;
}

.btn-primary:active {
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.btn-outline-secondary {
  border: 2px solid var(--gray-600);
  color: var(--gray-600);
  background: transparent;
}

.btn-outline-secondary:hover {
  background-color: var(--gray-600);
  color: var(--white);
}

.btn-success {
  background: var(--tenant-primary);
  color: var(--white);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.btn-success::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, transparent, rgba(255, 255, 255, 0.2));
  opacity: 0;
  transition: opacity 0.3s ease;
}

.btn-success:hover {
  background: var(--tenant-secondary);
  transform: translateY(-3px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
  filter: brightness(1.1);
}

.btn-success:hover::before {
  opacity: 1;
}

.btn-success:active {
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

/* Summary Card */
.summary-card {
  background-color: var(--gray-100);
  border-radius: 0.5rem;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.summary-section {
  margin-bottom: 1.5rem;
}

.summary-section:last-child {
  margin-bottom: 0;
}

.summary-section h5 {
  color: var(--tenant-primary);
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
}

.summary-section h5 i {
  margin-right: 0.5rem;
}

/* Footer */
.footer {
  background-color: var(--tenant-primary);
  color: var(--white);
  padding: 2rem 0;
}

.footer-logo {
  margin-bottom: 1rem;
}

.footer-brand-logo {
  max-width: 14em;
  height: auto;
  /* filter: brightness(0) invert(1);*/
}

/* Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-20px);
  }
}

/* Responsive Design */
@media (max-width: 768px) {
  .hero-title {
    font-size: 2.5rem;
  }

  .hero-subtitle {
    font-size: 1.2rem;
  }

  .hero-logo {
    max-width: 250px;
  }

  .form-card {
    padding: 1.5rem;
  }

  .progress-steps {
    flex-wrap: wrap;
    gap: 1rem;
  }

  .step {
    flex: 1;
    min-width: 80px;
  }

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

  .preference-group {
    margin-bottom: 1rem;
  }
}

@media (max-width: 576px) {
  .hero-title {
    font-size: 2rem;
  }

  .form-section {
    padding: 2rem 0;
  }

  .hero-logo {
    max-width: 200px;
  }

  .form-brand-logo {
    max-width: 120px;
  }
}

/* Modal de Respuesta */
.response-modal .modal-header {
  border-bottom: 2px solid #e9ecef;
  padding: 1.5rem;
}

.response-modal .modal-header.success-header {
    /*background-color: var(--tenant-secondary);*/
    color: var(--tenant-primary);
    border-bottom-color: var(--tenant-primary);
}

.response-modal .modal-header.error-header {
    /*background: var(--tenant-secondary);*/
    color: var(--tenant-primary);
}

.modal-logo {
    margin-right: 1rem;
}

.modal-brand-logo {
    max-width: 150px;
    height: auto;
}

.response-modal .modal-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0;
}

.response-modal .modal-title i {
     margin-right: 0.5rem;
}

.response-modal .modal-body {
     padding: 2rem;
}

/* Contenido de éxito */
.success-content {
     text-align: center;
}

.success-icon {
    font-size: 4rem;
    color: #28a745;
    margin-bottom: 1rem;
}

.success-content h4 {
    color: #28a745;
    font-weight: 600;
    margin-bottom: 1rem;
}

.success-content .lead {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    color: #6c757d;
}

.reference-info {
    background: #f8f9fa;
    border: 2px dashed #28a745;
    border-radius: 10px;
    padding: 1.5rem;
    margin: 2rem 0;
}

.reference-info h5 {
    color: #28a745;
    font-weight: 600;
    margin-bottom: 1rem;
}

.reference-code {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.reference-code code {
    background: #28a745;
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    letter-spacing: 1px;
}

.request-details {
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 10px;
    padding: 1.5rem;
    margin: 1.5rem 0;
    text-align: left;
}

.detail-item {
    display: flex;
    align-items: center;
    margin-bottom: 0.75rem;
    padding: 0.5rem;
    background: #f8f9fa;
    border-radius: 6px;
}

.detail-item i {
    color: var(--tenant-primary);
    margin-right: 0.75rem;
    width: 20px;
    text-align: center;
}

.next-steps {
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 10px;
    padding: 1.5rem;
    margin-top: 2rem;
    text-align: left;
}

.next-steps h5 {
  color: var(--tenant-primary);
  font-weight: 600;
  margin-bottom: 1rem;
}

.steps-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.steps-list li {
  display: flex;
  align-items: flex-start;
  margin-bottom: 0.75rem;
  padding: 0.5rem;
  background: #f8f9fa;
  border-radius: 6px;
}

.steps-list li i {
  margin-right: 0.75rem;
  margin-top: 0.25rem;
  width: 20px;
  text-align: center;
}

/* Contenido de error */
.error-content {
  text-align: center;
}

.error-icon {
  font-size: 4rem;
  color: #dc3545;
  margin-bottom: 1rem;
}

.error-content h4 {
  color: #dc3545;
  font-weight: 600;
  margin-bottom: 1rem;
}

.error-content .lead {
  font-size: 1.1rem;
  margin-bottom: 2rem;
  color: #000;
  font-weight: bold;
}

.errors-list {
  background: #fff5f5;
  border: 1px solid #fed7d7;
  border-radius: 10px;
  padding: 1.5rem;
  margin: 1.5rem 0;
  text-align: left;
}

.errors-list h6 {
  color: #dc3545;
  font-weight: 600;
  margin-bottom: 1rem;
}

.errors-list ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.errors-list li {
  display: flex;
  align-items: flex-start;
  margin-bottom: 0.5rem;
  padding: 0.5rem;
  background: white;
  border-radius: 6px;
  border-left: 4px solid #dc3545;
}

.errors-list li i {
  color: #dc3545;
  margin-right: 0.75rem;
  margin-top: 0.25rem;
  width: 16px;
  text-align: center;
}

.error-help {
  background: #fff8e1;
  border: 1px solid #ffecb3;
  border-radius: 10px;
  padding: 1.5rem;
  margin-top: 2rem;
  text-align: left;
}

.error-help h6 {
  color: #f57c00;
  font-weight: 600;
  margin-bottom: 1rem;
}

.error-help ul {
  margin-bottom: 0;
}

.error-help li {
  margin-bottom: 0.5rem;
}

/* Estados de carga */
.submit-loading {
  display: none;
}

#submit-btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

/* Responsive */
@media (max-width: 768px) {
  .response-modal .modal-dialog {
    margin: 1rem;
  }

  .response-modal .modal-body {
    padding: 1.5rem;
  }

  .reference-code {
    flex-direction: column;
  }

  .reference-code code {
    font-size: 1rem;
    padding: 0.5rem 1rem;
  }

  .request-details .row {
    margin: 0;
  }

  .request-details .col-md-6 {
    padding: 0;
    margin-bottom: 0.5rem;
  }
}

/* Animaciones */
@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: translateY(-50px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.response-modal.show .modal-dialog {
  animation: modalSlideIn 0.3s ease-out;
}

.success-icon,
.error-icon {
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
  100% {
    transform: scale(1);
  }
}