/**
 * Diseño moderno y profesional para TRAUMA 2025
 * Incluye animaciones suaves y estilos contemporáneos
 */

/* Estilos generales modernos */
:root {
  /* Paleta de colores moderna */
  --primary-color: #4eb1b9;
  --primary-dark: #3a8f96;
  --primary-light: #6fc5cc;
  --secondary-color: #37b698;
  --tertiary-color: #427d6e;
  
  /* Colores de acento */
  --accent-blue: #4a6bf0;
  --accent-purple: #9747ff;
  --accent-teal: #2dd5c4;
  
  /* Neutros modernos */
  --bg-color: #f7f9fc;
  --card-color: #ffffff;
  --text-color: #2c3e50;
  --text-light: #7f8c8d;
  
  /* Sombras y efectos */
  --shadow-sm: 0 2px 10px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 5px 25px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 10px 35px rgba(0, 0, 0, 0.12);
  
  /* Bordes y radios */
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  
  /* Fuentes */
  --font-main: 'Poppins', 'Segoe UI', Roboto, sans-serif;
  --font-heading: 'Montserrat', 'Segoe UI', Roboto, sans-serif;
  
  /* Transiciones */
  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Estilos base */
body {
  font-family: var(--font-main);
  background-color: var(--bg-color);
  background-image: linear-gradient(135deg, #f7f9fc 0%, #eef2f7 100%);
  color: var(--text-color);
  line-height: 1.6;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Header moderno */
header {
  background: linear-gradient(135deg, var(--primary-color), var(--accent-teal));
  padding: 30px 0;
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  margin-bottom: 50px;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

header::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -50%;
  width: 100%;
  height: 200%;
  background: radial-gradient(circle, rgba(255,255,255,0.12) 0%, rgba(255,255,255,0) 70%);
  transform: rotate(45deg);
}

header h1 {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 2.5rem;
  color: white;
  margin-bottom: 8px;
  letter-spacing: -0.5px;
  position: relative;
}

header p {
  color: rgba(255, 255, 255, 0.9);
  font-size: 1.1rem;
  max-width: 600px;
  margin: 0 auto;
}

.logo-container {
  margin-bottom: 15px;
  display: flex;
  justify-content: center;
}

.logo-icon {
  font-size: 3.5rem;
  color: white;
  filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.1));
  transition: transform var(--transition-normal);
}

.logo-icon:hover {
  transform: scale(1.1) rotate(5deg);
}

/* Barra de progreso moderna */
.progress-container {
  background-color: var(--card-color);
  border-radius: var(--radius-md);
  padding: 25px 30px;
  box-shadow: var(--shadow-md);
  margin-top: -90px;
  position: relative;
  z-index: 10;
  margin-bottom: 40px;
}

.progress-steps {
  display: flex;
  justify-content: space-between;
  margin-bottom: 15px;
  position: relative;
}

.progress-steps::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 3px;
  background-color: #eaeff4;
  transform: translateY(-50%);
  z-index: 0;
  border-radius: 3px;
}

.step {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  transition: transform var(--transition-fast);
}

.step:hover {
  transform: translateY(-3px);
}

.step-circle {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background-color: #eaeff4;
  color: #a8b6c8;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  margin-bottom: 8px;
  transition: all var(--transition-normal);
  font-size: 14px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.step.active .step-circle {
  background-color: var(--primary-color);
  color: white;
  transform: scale(1.2);
  box-shadow: 0 0 0 5px rgba(78, 177, 185, 0.2), 0 4px 10px rgba(0,0,0,0.1);
}

.step.completed .step-circle {
  background-color: var(--secondary-color);
  color: white;
}

.step.completed .step-circle::before {
  content: '✓';
}

.step-label {
  font-size: 12px;
  color: var(--text-light);
  font-weight: 500;
  transition: color var(--transition-fast);
  margin-top: 5px;
  text-align: center;
}

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

.progress-bar {
  height: 5px;
  background-color: #eaeff4;
  border-radius: 5px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary-color), var(--accent-teal));
  border-radius: 5px;
  transition: width var(--transition-normal);
}

/* Estilo de las secciones del formulario */
.form-container {
  background-color: transparent;
  position: relative;
  min-height: 400px;
}

.form-section {
  background-color: var(--card-color);
  border-radius: var(--radius-md);
  padding: 35px;
  box-shadow: var(--shadow-md);
  margin-bottom: 30px;
  transition: transform var(--transition-normal), opacity var(--transition-normal);
  position: relative;
  display: none;
}

.form-section.active {
  display: block;
  animation: fadeIn 0.5s ease forwards;
}

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

.section-header {
  margin-bottom: 30px;
  position: relative;
}

.section-title {
  font-family: var(--font-heading);
  font-size: 1.8rem;
  color: var(--tertiary-color);
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}

.section-title i {
  color: var(--primary-color);
  font-size: 1.5rem;
}

.section-description {
  color: var(--text-light);
  font-size: 1rem;
  max-width: 80%;
}

.section-title::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -10px;
  width: 60px;
  height: 3px;
  background: linear-gradient(90deg, var(--primary-color), var(--accent-teal));
  border-radius: 3px;
}

/* Elementos del formulario modernos */
.form-group {
  margin-bottom: 25px;
}

label {
  display: block;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text-color);
  font-size: 0.95rem;
}

input[type="text"],
input[type="email"],
input[type="number"],
input[type="tel"],
select,
textarea {
  width: 100%;
  padding: 14px 18px;
  border: 2px solid #e6eaef;
  border-radius: var(--radius-sm);
  font-size: 1rem;
  transition: all var(--transition-normal);
  background-color: #f8fafc;
  color: var(--text-color);
  font-family: var(--font-main);
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--primary-color);
  background-color: white;
  outline: none;
  box-shadow: 0 0 0 4px rgba(78, 177, 185, 0.15);
}

.radio-group {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  margin-top: 10px;
}

.radio-option {
  position: relative;
  display: flex;
  align-items: center;
  cursor: pointer;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  background-color: #f8fafc;
  border: 2px solid #e6eaef;
  transition: all var(--transition-fast);
}

.radio-option:hover {
  background-color: #f0f5fa;
  border-color: #d9e2ec;
}

.radio-option input[type="radio"] {
  appearance: none;
  width: 20px;
  height: 20px;
  border: 2px solid #ccd7e0;
  border-radius: 50%;
  margin-right: 10px;
  position: relative;
  transition: all var(--transition-fast);
}

.radio-option input[type="radio"]:checked {
  border-color: var(--primary-color);
  background-color: white;
}

.radio-option input[type="radio"]:checked::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background-color: var(--primary-color);
}

.radio-option input[type="radio"]:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(78, 177, 185, 0.15);
}

/* Estilos de alerts modernos */
.deadline {
  background-color: #f0fbff;
  border-left: 4px solid var(--accent-blue);
  padding: 20px 25px;
  margin: 25px 0;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: flex-start;
  gap: 15px;
  box-shadow: var(--shadow-sm);
}

.deadline i {
  color: var(--accent-blue);
  font-size: 24px;
  margin-top: 3px;
}

.deadline strong {
  font-weight: 600;
  color: var(--accent-blue);
}

.author-note {
  background-color: #fff9e6;
  border-left: 4px solid var(--warning-color);
  padding: 20px 25px;
  margin: 25px 0;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: flex-start;
  gap: 15px;
  box-shadow: var(--shadow-sm);
}

.author-note i {
  color: var(--warning-color);
  font-size: 24px;
  margin-top: 3px;
}

/* Cards modernas */
.author-card {
  background-color: white;
  border-radius: var(--radius-sm);
  padding: 25px;
  margin-bottom: 25px;
  border-top: 4px solid var(--secondary-color);
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-normal);
}

.author-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
}

.author-card h3 {
  color: var(--tertiary-color);
  margin-bottom: 20px;
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid #f0f5fa;
}

.author-card h3 i {
  color: var(--secondary-color);
}

/* Botones modernos */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 28px;
  font-weight: 600;
  font-size: 1rem;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition-normal);
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.btn::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(255, 255, 255, 0.1);
  z-index: -1;
  transform: scale(0);
  border-radius: 50%;
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn:hover::after {
  transform: scale(2.5);
}

.btn i {
  margin-right: 10px;
  font-size: 1.1em;
}

.btn-next {
  background: linear-gradient(135deg, var(--primary-color), var(--accent-teal));
  color: white;
  box-shadow: 0 4px 15px rgba(78, 177, 185, 0.3);
}

.btn-next:hover {
  box-shadow: 0 6px 20px rgba(78, 177, 185, 0.4);
  transform: translateY(-2px);
}

.btn-next i {
  margin-left: 10px;
  margin-right: 0;
  animation: bounceX 1s infinite;
}

@keyframes bounceX {
  0%, 100% { transform: translateX(0); }
  50% { transform: translateX(3px); }
}

.btn-prev {
  background-color: #edf2f7;
  color: #64748b;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

.btn-prev:hover {
  background-color: #e2e8f0;
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.08);
  transform: translateY(-2px);
}

.btn-prev i {
  animation: bounceXBack 1s infinite;
}

@keyframes bounceXBack {
  0%, 100% { transform: translateX(0); }
  50% { transform: translateX(-3px); }
}

.btn-submit {
  background: linear-gradient(135deg, var(--secondary-color), var(--accent-teal));
  color: white;
  box-shadow: 0 4px 15px rgba(55, 182, 152, 0.3);
}

.btn-submit:hover {
  box-shadow: 0 6px 20px rgba(55, 182, 152, 0.4);
  transform: translateY(-2px);
}

/* Contador de palabras moderno */
.word-count {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  margin-top: 8px;
  font-size: 0.85rem;
  color: var(--text-light);
  gap: 10px;
}

.word-count .progress-bar {
  height: 4px;
  width: 100px;
  background-color: #edf2f7;
  border-radius: 4px;
}

.word-count .progress {
  height: 100%;
  background: linear-gradient(90deg, var(--primary-color), var(--accent-teal));
  border-radius: 4px;
  transition: width var(--transition-normal);
}

.word-count.error .progress {
  background: linear-gradient(90deg, #ff7675, #e74c3c);
}

/* Uploader de archivos moderno */
.file-upload {
  margin-top: 15px;
}

.file-upload-btn {
  display: inline-flex;
  align-items: center;
  background: linear-gradient(135deg, var(--primary-light), var(--primary-color));
  color: white;
  padding: 12px 24px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-weight: 600;
  transition: all var(--transition-normal);
  box-shadow: 0 4px 10px rgba(78, 177, 185, 0.2);
}

.file-upload-btn:hover {
  box-shadow: 0 6px 15px rgba(78, 177, 185, 0.3);
  transform: translateY(-2px);
}

.file-upload-btn i {
  margin-right: 10px;
}

.file-name {
  margin-top: 12px;
  font-size: 0.9rem;
  color: var(--text-light);
  padding: 12px 15px;
  background-color: #f8fafc;
  border-radius: var(--radius-sm);
  border: 1px dashed #d9e2ec;
  display: flex;
  align-items: center;
}

.file-name i {
  margin-right: 10px;
  color: var(--tertiary-color);
}

/* Mensajes de éxito y error */
.success-message {
  background-color: #f0fdf6;
  border-left: 4px solid var(--success-color);
  padding: 30px;
  margin: 30px 0;
  border-radius: var(--radius-sm);
  text-align: center;
  animation: fadeInUp var(--transition-normal);
}

.success-message h3 {
  color: var(--success-color);
  margin-bottom: 15px;
  font-size: 1.5rem;
}

.success-icon {
  font-size: 3rem;
  color: var(--success-color);
  margin-bottom: 20px;
}

.error-message {
  color: #e53e3e;
  font-size: 0.85rem;
  margin-top: 6px;
  display: none;
}

.error-message i {
  margin-right: 5px;
}

.error-message.visible {
  display: block;
  animation: shake 0.6s cubic-bezier(.36,.07,.19,.97) both;
}

@keyframes shake {
  10%, 90% { transform: translateX(-1px); }
  20%, 80% { transform: translateX(2px); }
  30%, 50%, 70% { transform: translateX(-4px); }
  40%, 60% { transform: translateX(4px); }
}

/* Popup toast moderno */
.toast {
  position: fixed;
  bottom: 20px;
  right: 20px;
  padding: 15px 25px;
  background-color: white;
  color: var(--text-color);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  z-index: 1000;
  max-width: 350px;
  opacity: 0;
  transform: translateY(20px);
  transition: all var(--transition-normal);
}

.toast.visible {
  opacity: 1;
  transform: translateY(0);
}

.toast.success {
  border-left: 4px solid var(--success-color);
}

.toast.error {
  border-left: 4px solid var(--error-color);
}

.toast.warning {
  border-left: 4px solid var(--warning-color);
}

.toast-icon {
  margin-right: 15px;
  font-size: 1.5rem;
}

.toast.success .toast-icon {
  color: var(--success-color);
}

.toast.error .toast-icon {
  color: var(--error-color);
}

.toast.warning .toast-icon {
  color: var(--warning-color);
}

/* Animaciones adicionales */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes slideIn {
  from { transform: translateX(50px); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

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

/* Responsive */
@media (max-width: 992px) {
  .step-label {
    font-size: 10px;
  }
  
  .section-title {
    font-size: 1.5rem;
  }
  
  .form-section {
    padding: 25px;
  }
}

@media (max-width: 768px) {
  .progress-container {
    padding: 20px 15px;
    margin-top: -60px;
    overflow-x: auto;
  }
  
  .progress-steps {
    min-width: 650px;
  }
  
  .radio-group {
    flex-direction: column;
    gap: 10px;
  }
  
  .form-navigation {
    flex-direction: column-reverse;
    gap: 15px;
  }
  
  .btn {
    width: 100%;
  }
  
  header h1 {
    font-size: 2rem;
  }
}

@media (max-width: 576px) {
  .form-section {
    padding: 20px 15px;
  }
  
  .section-title {
    font-size: 1.3rem;
  }
  
  .section-description {
    max-width: 100%;
  }
}

/* Footer moderno */
footer {
  background: linear-gradient(135deg, var(--tertiary-color), var(--dark-color));
  color: rgba(255, 255, 255, 0.8);
  padding: 40px 0 30px;
  text-align: center;
  margin-top: 50px;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  position: relative;
  overflow: hidden;
}

footer::before {
  content: '';
  position: absolute;
  bottom: -50%;
  left: -50%;
  width: 100%;
  height: 200%;
  background: radial-gradient(circle, rgba(255,255,255,0.05) 0%, rgba(255,255,255,0) 70%);
  transform: rotate(45deg);
}

footer p {
  position: relative;
  z-index: 1;
  margin-bottom: 15px;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 30px;
  margin: 20px 0;
  position: relative;
  z-index: 1;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  transition: color var(--transition-fast);
}

.footer-links a:hover {
  color: white;
  text-decoration: none;
}

.social-icons {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin-top: 25px;
  position: relative;
  z-index: 1;
}

.social-icons a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  color: white;
  transition: all var(--transition-normal);
}

.social-icons a:hover {
  background-color: var(--primary-color);
  transform: translateY(-5px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}