/* Variables CSS */
:root {
  --primary-color: #0066cc6d;
  --secondary-color: #f8f9fa;
  --success-color: #28a745;
  --danger-color: #dc3545;
  --warning-color: #ffc107;
  --info-color: #17a2b8;
  --light-color: #f8f9fa;
  --dark-color: #343a40;
  --text-color: #333;
  --border-color: #dee2e6;
  --shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
  --shadow-lg: 0 1rem 3rem rgba(0, 0, 0, 0.175);
  --border-radius: 0.375rem;
  --transition: all 0.3s ease;
}

/* General Styles */
* {
  box-sizing: border-box;
}

body {
  font-family: "Montserrat", sans-serif;
  line-height: 1.6;
  color: var(--text-color);
  background-color: #f5f5f500;
  /* Fondo estático con la imagen especificada */
  background-image: url("../img_new/PLANTILLA PNG_Mesa de trabajo 1.png");
  background-size: cover;
  background-position: center center;
  background-attachment: fixed;
  background-repeat: no-repeat;
  min-height: 100vh;
  position: relative;
  /* Asegurar que el fondo esté detrás de todo el contenido */
  z-index: 0;
}

/* Efecto de onda decorativa más sutil para no interferir con la imagen de fondo */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    radial-gradient(circle at 20% 80%, rgba(255, 255, 255, 0.05) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.05) 0%, transparent 50%);
  z-index: -1;
  pointer-events: none;
}

/* Diseño mejorado para tablets */
@media (min-width: 769px) and (max-width: 1024px) {
  body {
    background-size: cover;
    background-position: center center;
  }
}

/* En móviles: diseño mejorado con efectos modernos */
@media (max-width: 768px) {
  body {
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    background-attachment: scroll;
  }
  
  /* Efecto de onda más sutil en móviles */
  body::before {
    background: 
      radial-gradient(circle at 10% 90%, rgba(0, 81, 163, 0.12) 0%, transparent 60%),
      radial-gradient(circle at 90% 10%, rgba(0, 123, 255, 0.12) 0%, transparent 60%);
  }
  
  /* Optimizaciones para móviles */
  main {
    padding-top: 0.25rem !important;
    padding-bottom: 1rem !important;
  }
  
  .container {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
  }
  
  .registration-progress {
    padding: 0.5rem;
    margin-bottom: 0.25rem;
  }
  
  .card {
    margin-bottom: 0.5rem;
  }
}

/* Header Styles */
header {
  background: linear-gradient(135deg, var(--primary-color), #0051a36a);
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}

/* Efecto de brillo en el header */
header::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(45deg, transparent 30%, rgba(255, 255, 255, 0.1) 50%, transparent 70%);
  transform: rotate(45deg);
  animation: shine 3s infinite;
  pointer-events: none;
}

@keyframes shine {
  0% { transform: translateX(-100%) translateY(-100%) rotate(45deg); }
  50% { transform: translateX(100%) translateY(100%) rotate(45deg); }
  100% { transform: translateX(-100%) translateY(-100%) rotate(45deg); }
}

.header-logo {
  max-height: 80px;
  width: auto;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

header h1 {
  font-weight: 700;
  font-size: 1.75rem;
}

header p {
  font-weight: 300;
  opacity: 0.9;
}

/* Asegurar que el contenido principal esté sobre el fondo */
main {
  min-height: calc(100vh - 200px);
  padding-top: 0.5rem !important;
  padding-bottom: 1.5rem !important;
  position: relative;
  z-index: 1;
}

/* Estilos adicionales para mejorar la visibilidad sobre la imagen de fondo */
.container {
  position: relative;
  z-index: 1;
}

/* Mejorar la legibilidad del formulario sobre la imagen de fondo */
.form-control,
.form-select {
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(0, 81, 163, 0.3);
  border-radius: 8px;
  transition: all 0.3s ease;
}

.form-control:focus,
.form-select:focus {
  background: rgba(255, 255, 255, 0.98);
  border-color: var(--primary-color);
  box-shadow: 0 0 0 0.2rem rgba(0, 81, 163, 0.25);
}

/* Reduce spacing in container */
.container {
  padding-top: 0.5rem;
}

/* Reduce margin for registration section */
.row.justify-content-center {
  margin-top: -1rem;
}

/* Card Styles */
.card {
  border: none;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-lg);
  transition: var(--transition);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  position: relative;
  z-index: 1;
}

.card:hover {
  box-shadow: 0 2rem 4rem rgba(0, 0, 0, 0.2);
}

.card-header {
  background: linear-gradient(135deg, #0051a3, #0051a3);
  border-radius: var(--border-radius) var(--border-radius) 0 0 !important;
  padding: 1.5rem;
}

/* Progress Bar Styles */
.registration-progress {
  position: relative;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(10px);
  padding: 0.75rem;
  border-radius: var(--border-radius);
  box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
  margin-bottom: 0.5rem;
  border: 1px solid rgba(255, 255, 255, 0.3);
  position: relative;
  z-index: 1;
}

.progress {
  height: 0.75rem;
  background-color: rgba(233, 236, 239, 0.8);
  border-radius: 0.5rem;
  overflow: hidden;
  border: 1px solid rgba(0, 0, 0, 0.1);
}

.progress-bar {
  background: linear-gradient(90deg, #0051a3, #0052a3);
  transition: width 0.6s ease;
  box-shadow: 0 0.125rem 0.25rem rgba(0, 102, 204, 0.3);
}

.progress-steps {
  display: flex;
  justify-content: space-between;
  margin-top: 1rem;
  position: relative;
}

.step {
  text-align: center;
  position: relative;
  flex: 1;
}

.step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  background-color: #e9ecef;
  color: #6c757d;
  font-weight: 600;
  margin-bottom: 0.5rem;
  transition: var(--transition);
}

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

.step.completed .step-number {
  background-color: var(--success-color);
  color: white;
}

.step-label {
  display: block;
  font-size: 0.875rem;
  color: #6c757d;
  font-weight: 500;
}

.step.active .step-label {
  color: var(--primary-color);
}

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

.form-step.active {
  display: block;
  animation: fadeIn 0.5s ease-in-out;
}

/* Estilos mejorados para formularios */
.form-control, .form-select {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(0, 81, 163, 0.2);
  border-radius: 8px;
  transition: all 0.3s ease;
}

.form-control:focus, .form-select:focus {
  background: rgba(255, 255, 255, 0.95);
  border-color: var(--primary-color);
  box-shadow: 0 0 0 0.2rem rgba(0, 81, 163, 0.25);
}

/* Botones mejorados */
.btn {
  border-radius: 25px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s;
}

.btn:hover::before {
  left: 100%;
}

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

.form-label {
  font-weight: 600;
  color: var(--text-color);
  margin-bottom: 0.5rem;
}

.form-control,
.form-select {
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  padding: 0.75rem 1rem;
  font-size: 1rem;
  transition: var(--transition);
}

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

.form-control.is-invalid,
.form-select.is-invalid {
  border-color: var(--danger-color);
}

.invalid-feedback {
  display: block;
  font-size: 0.875rem;
  color: var(--danger-color);
  margin-top: 0.25rem;
}

/* Button Styles */
.btn {
  border-radius: var(--border-radius);
  font-weight: 500;
  padding: 0.75rem 1.5rem;
  transition: var(--transition);
  border: none;
  cursor: pointer;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary-color), #0052a3);
  color: white;
}

.btn-primary:hover {
  background: linear-gradient(135deg, #0052a3, #004080);
  transform: translateY(-2px);
  box-shadow: 0 0.5rem 1rem rgba(0, 102, 204, 0.3);
}

.btn-secondary {
  background-color: #6c757d;
  color: white;
}

.btn-secondary:hover {
  background-color: #5a6268;
  transform: translateY(-2px);
}

.btn-success {
  background: linear-gradient(135deg, var(--success-color), #218838);
  color: white;
}

.btn-success:hover {
  background: linear-gradient(135deg, #218838, #1e7e34);
  transform: translateY(-2px);
}

/* Form Navigation */
.form-navigation {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border-color);
}

/* Payment Summary */
.payment-summary {
  background-color: #f8f9fa;
  border-radius: var(--border-radius);
  padding: 1.5rem;
}

.payment-summary .card {
  border: 1px solid var(--border-color);
}

/* Confirmation Styles */
.confirmation-message {
  text-align: center;
}

.registration-details {
  background-color: #f8f9fa;
  border-radius: var(--border-radius);
  padding: 2rem;
  margin-top: 2rem;
}

/* Alert Styles */
.alert {
  border-radius: var(--border-radius);
  border: none;
  padding: 1rem 1.5rem;
}

.alert-info {
  background-color: #d1ecf1;
  color: #0c5460;
  border-left: 4px solid var(--info-color);
}

.alert-success {
  background-color: #d4edda;
  color: #155724;
  border-left: 4px solid var(--success-color);
}

/* Footer Styles */
footer {
  background: linear-gradient(135deg, var(--dark-color), #212529);
  margin-top: auto;
}

/* Responsive Design */
@media (max-width: 768px) {
  header h1 {
    font-size: 1.5rem;
  }

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

  .step {
    display: flex;
    align-items: center;
    gap: 1rem;
  }

  .step-number {
    margin-bottom: 0;
  }

  .step-label {
    margin-bottom: 0;
  }

  .form-navigation {
    flex-direction: column;
    gap: 1rem;
  }

  .btn {
    width: 100%;
  }
}

/* Desktop/Laptop: mantener cabecera fija (sticky) en la parte superior */
@media (min-width: 992px) {
  header {
    position: sticky;
    top: 0;
    z-index: 1020; /* sobre el contenido */
  }
}

@media (max-width: 576px) {
  .container {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .card-body {
    padding: 1.5rem;
  }

  header .row {
    text-align: center;
  }

  header .text-end {
    text-align: center !important;
    margin-top: 1rem;
  }
}

/* Loading States */
.loading {
  position: relative;
  pointer-events: none;
}

.loading::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(255, 255, 255, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--border-radius);
}

.loading::before {
  content: "\f110";
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  animation: fa-spin 2s infinite linear;
  z-index: 1;
  color: var(--primary-color);
  font-size: 1.5rem;
}

@keyframes fa-spin {
  0% {
    transform: translate(-50%, -50%) rotate(0deg);
  }
  100% {
    transform: translate(-50%, -50%) rotate(360deg);
  }
}

/* Utility Classes */
.text-primary {
  color: var(--primary-color) !important;
}

.bg-primary {
  background-color: var(--primary-color) !important;
}

.border-primary {
  border-color: var(--primary-color) !important;
}

.shadow-sm {
  box-shadow: var(--shadow) !important;
}

.shadow-lg {
  box-shadow: var(--shadow-lg) !important;
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Focus styles for keyboard navigation */
.btn:focus,
.form-control:focus,
.form-select:focus {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

/* Print styles */
@media print {
  header,
  footer,
  .form-navigation {
    display: none;
  }

  .card {
    box-shadow: none;
    border: 1px solid #000;
  }
}

/* Estilos para hacer enlaces e imágenes más grandes */
a {
  font-size: 1.1rem;
  font-weight: 500;
}

a.btn {
  font-size: 3rem;
}

img {
  max-width: 100%;
  height: auto;
}

.header-logo {
  max-height: 100px !important;
  width: auto;
}

/* Reducir espaciado entre divs */
.mb-3 {
  margin-bottom: 0.75rem !important;
}

.mb-4 {
  margin-bottom: 1rem !important;
}

.mb-5 {
  margin-bottom: 1.25rem !important;
}

.row {
  margin-bottom: 0.5rem;
}

.card-body {
  padding: 1.5rem;
}

.form-step {
  margin-bottom: 1rem;
}

/* Reducir espaciado en secciones específicas */
.payment-summary {
  padding: 1rem;
}

.registration-details {
  padding: 1.5rem;
  margin-top: 1.5rem;
}
