@charset "UTF-8";
:root {
  color-scheme: light;
  --bg-body: #f4f4f4;
  --bg-card: #ffffff;
  --text-main: #1a1a1a;
  --header-bg: #131313;
  --header-text: #ffffff;
  --border-color: #dddddd;
  --text-sec: #333;
  --footer-bg: #f1f1f1;
  --hero-text: #f4f4f4;
}

[data-theme=dark] {
  color-scheme: dark;
  --bg-body: #171717;
  --bg-card: #1e1e1e;
  --text-main: #f4f4f4;
  --header-bg: #131313;
  --header-text: #ffffff;
  --border-color: #333333;
  --text-sec: #888;
  --footer-bg: #131313;
  --hero-text: #888;
}

* {
  box-sizing: border-box;
  font-family: "Inter", sans-serif;
}

body {
  margin: 0;
  padding: 0;
  background-color: var(--bg-body);
  overflow-x: hidden;
}

/* Animación para el H1: Aparece (Fade In) y sube ligeramente */
@keyframes fadeInUpH1 {
  from {
    opacity: 0;
    transform: translateY(20px); /* Empieza 20px más abajo */
  }
  to {
    opacity: 1;
    transform: translateY(0); /* Termina en su posición original */
  }
}
/* Animación para el P: Aparece (Fade In) con un retraso y sube ligeramente */
@keyframes fadeInUpP {
  from {
    opacity: 0;
    transform: translateY(15px); /* Empieza un poco menos abajo para suavidad */
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.btn-account-save {
  background-color: #2d5a27;
  color: white;
  box-shadow: 0 4px 6px rgba(46, 204, 113, 0.2);
  gap: 5px;
}
.btn-account-save:hover {
  background-color: rgb(36.1046511628, 72.2093023256, 31.2906976744);
  box-shadow: 0 6px 12px rgba(46, 204, 113, 0.3);
  transform: translateY(-2px);
}
.btn-account-save:active {
  transform: translateY(0);
}

.btn-primary {
  background: #2d5a27;
  color: var(--bg-card);
  padding: 1rem 2.5rem;
  text-decoration: none;
  border-radius: 50px;
  font-weight: bold;
  transition: all 0.3s ease;
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 15px auto 0;
  width: 50%;
  gap: 5px;
}
.btn-primary:hover {
  background: rgb(27.2093023256, 54.4186046512, 23.5813953488);
  transform: scale(1.05);
}
.btn-primary:active {
  transform: translateY(0);
}

@media (max-width: 1930px) {
  .btn-primary {
    margin-bottom: 15px;
  }
}
.btn-secondary {
  display: inline-block;
  padding: 10px 25px;
  background: #eee;
  color: #666;
  text-decoration: none;
  border-radius: 8px;
  font-weight: 600;
  transition: background 0.2s;
  line-height: 1.2;
  vertical-align: middle;
}
.btn-secondary:hover {
  background: #ddd;
}

.btn-flotante {
  position: fixed;
  bottom: 20%;
  right: 30px;
  background: #2d5a27;
  color: #ffffff;
  padding: 15px 25px;
  border-radius: 50px;
  text-decoration: none;
  font-weight: bold;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
  z-index: 99;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: all 0.3s ease;
}
.btn-flotante:hover {
  background: rgb(36.1046511628, 72.2093023256, 31.2906976744);
  transform: scale(1.05);
}

.btn-card {
  display: block;
  text-align: center;
  padding: 12px;
  background: #f1f1f1;
  color: var(--text-sec);
  text-decoration: none;
  border-radius: 8px;
  font-weight: 600;
  transition: all 0.2s ease;
}
.btn-card:hover {
  background: #2d5a27;
  color: var(--bg-card);
}

.btn-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 25px;
  border-radius: 10px;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s;
  width: 80%;
  border: none;
  cursor: pointer;
  color: var(--text-main);
}

.btn-add {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 12px 25px;
  font-size: medium;
  border-radius: 10px;
  text-decoration: none;
  border: none;
  cursor: pointer;
  color: var(--text-main);
}

.btn-enroll {
  background: #2d5a27;
  color: white;
  font-size: 1.1rem;
}

.btn-edit-inline {
  background-color: #f0f7f4;
  color: #2d5a27;
  padding: 6px 12px;
  border-radius: 6px;
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 600;
  transition: all 0.3s ease;
  border: 1px solid rgba(45, 90, 39, 0.2);
}
.btn-edit-inline:hover {
  background-color: #2d5a27;
  color: white;
  transform: translateY(-2px);
}

.btn-account-delete {
  background-color: #e74c3c;
  color: white;
  padding: 10px 20px;
  border-radius: 6px;
  border: none;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.3s ease;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: fit-content;
  max-width: 150px;
  align-self: center;
}
.btn-account-delete:hover {
  background-color: #c0392b;
}

.btn-account-cancel,
.btn-account-save {
  padding: 10px 25px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.3s ease;
  border: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-account-cancel {
  background-color: var(--border-color);
  color: var(--text-main);
  border: 1px solid var(--border-color);
}
.btn-account-cancel:hover {
  background-color: #e9ecef;
  color: #212529;
  transform: translateY(-1px);
}

.form-buttons {
  display: flex;
  gap: 15px;
}
.form-buttons button, .form-buttons .btn-register, .form-buttons .btn-submit {
  flex: 1;
  padding: 12px;
  font-family: inherit;
  font-size: 1rem;
  line-height: normal;
  box-sizing: border-box;
  display: inline-block;
  border-radius: 8px;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.2s;
  background: #2d5a27;
  color: white;
  border: none;
}
.form-buttons button:active, .form-buttons .btn-register:active, .form-buttons .btn-submit:active {
  transform: scale(0.98);
}
.form-buttons .btn-link {
  text-decoration: none;
  color: #666;
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.3s ease;
  padding: 10px 15px;
}
.form-buttons .btn-link:hover {
  color: #2d5a27; /* El verde de Traileros */
  text-decoration: underline;
}

/* Botones de acción minimalistas */
.admin-actions {
  display: flex;
  gap: 8px;
  justify-content: center;
}
.admin-actions .action-btn {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  text-decoration: none;
  transition: all 0.2s;
  border: none;
  cursor: pointer;
}
.admin-actions .action-btn.view-btn {
  background: #f0f4f8;
  color: #2980b9;
}
.admin-actions .action-btn.edit-btn {
  background: #fff9db;
  color: #f39c12;
}
.admin-actions .action-btn.delete-btn {
  background: #fff5f5;
  color: #e74c3c;
}
.admin-actions .action-btn.result-btn {
  background: #f0f4f8;
  color: #f1c40f;
}
.admin-actions .action-btn:hover:not(.disabled) {
  transform: translateY(-2px);
  filter: brightness(0.9);
}
.admin-actions .action-btn.disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.admin-buttons {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: flex-start;
  margin-bottom: 10px;
}
.admin-buttons .btn-secondary,
.admin-buttons .btn-account-delete {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  font-size: 0.9rem;
  font-weight: 600;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  border: 1px solid transparent;
  font-family: inherit;
  line-height: 1.2;
  height: 42px;
}
.admin-buttons .btn-secondary {
  background-color: var(--border-color);
  color: var(--text-main);
}
.admin-buttons .btn-secondary:hover {
  background-color: var(--text-muted);
}
.admin-buttons .btn-account-delete {
  background-color: #c53030;
  color: white;
}
.admin-buttons .btn-account-delete:hover {
  background-color: rgb(155.9918367347, 38.0081632653, 38.0081632653);
}

.add-modalidad {
  background-color: #2d5a27;
  color: white;
  border: none;
  padding: 0 16px;
  border-radius: 5px;
  cursor: pointer;
  font-weight: 600;
  transition: background 0.2s;
}

.grid-carreras {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2rem;
  padding: 2rem;
}
.grid-carreras .card {
  background: var(--bg-card);
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
}
.grid-carreras .card:hover {
  transform: translateY(-10px);
}
.grid-carreras .card .card-image {
  height: 220px;
  background-size: cover;
  background-position: center;
  position: relative;
}
.grid-carreras .card .card-body {
  padding: 1.5rem;
}
.grid-carreras .card .card-body .stats {
  display: flex;
  justify-content: space-between;
  margin: 1rem 0;
  color: #666;
  font-size: 0.9rem;
}

/* Tarjeta de Próximas Carreras (Main) */
.carrera-card {
  background: var(--bg-card);
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
}
.carrera-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}
.carrera-card .card-image {
  height: 200px;
  background-size: cover;
  background-position: center;
  position: relative;
}
.carrera-card .card-image .badge {
  position: absolute;
  top: 15px;
  left: 15px;
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--bg-card);
}
.carrera-card .card-image .badge.ultra {
  background: #e74c3c;
}
.carrera-card .card-image .badge.trail {
  background: #2d5a27;
}
.carrera-card .card-body {
  padding: 20px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}
.carrera-card .card-body .card-date {
  font-size: 0.8rem;
  color: #2d5a27;
  font-weight: 600;
}
.carrera-card .card-body h3 {
  margin: 10px 0;
  font-size: 1.25rem;
  color: var(--text-sec);
  line-height: 1.4;
}
.carrera-card .card-body .location {
  font-size: 0.9rem;
  color: #777;
  margin-bottom: 15px;
}
.carrera-card .card-body .location i {
  color: #888;
  margin-right: 5px;
}
.carrera-card .card-body .stats {
  display: flex;
  justify-content: space-between;
  padding: 15px 0;
  border-top: 1px solid var(--border-color);
  margin-top: auto;
  margin-bottom: 15px;
}
.carrera-card .card-body .stats span {
  font-size: 0.85rem;
  color: var(--text-sec);
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 5px;
}
.carrera-card .card-body .stats i {
  color: #2d5a27;
}

.success-card {
  background: var(--bg-card);
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  padding: 2.5rem;
  text-align: center;
  max-width: 500px;
  margin: 2rem auto;
  border-top: 6px solid var(--primary-green);
}
.success-card .icon-circle {
  width: 70px;
  height: 70px;
  background: rgba(45, 90, 39, 0.1);
  color: var(--primary-green);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  margin: 0 auto 1.5rem;
}
.success-card .dorsal-section {
  background: var(--bg-body);
  padding: 1.5rem;
  border-radius: 12px;
  margin: 2rem 0;
  border: 2px dashed var(--border-color);
}
.success-card .dorsal-section .label {
  font-size: 0.8rem;
  color: var(--text-sec);
  letter-spacing: 1px;
}
.success-card .dorsal-section .number {
  font-size: 4rem;
  font-weight: 800;
  color: var(--primary-green);
  line-height: 1;
}
.success-card .info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 2rem;
  color: var(--text-main);
}
.success-card .qr-code img {
  margin-bottom: 0.5rem;
  opacity: 0.8;
}
.success-card .qr-code p {
  font-size: 0.75rem;
  color: var(--text-sec);
}

@media print {
  .success-footer, .nav, .footer {
    display: none !important;
  }
  .success-card {
    box-shadow: none;
    border: 1px solid #eee;
  }
}
/* Estilos para el contenedor y el badge de la fecha */
#subtitle-container {
  margin-bottom: 20px;
  display: flex;
  justify-content: flex-start;
}

.subtitle-badge {
  display: inline-flex;
  align-items: center;
  background-color: #f8f9fa; /* Gris muy claro de fondo */
  color: #495057; /* Gris oscuro para el texto */
  padding: 6px 12px;
  border-radius: 50px; /* Bordes totalmente redondeados */
  font-size: 0.9rem;
  font-weight: 600;
  border: 1px solid #e9ecef;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
}

.subtitle-badge i {
  margin-right: 8px;
  color: var(--primary-color); /* El icono resalta con el color de tu web */
  font-size: 1rem;
}

/* Efecto hover opcional */
.subtitle-badge:hover {
  background-color: #ffffff;
  border-color: var(--primary-color);
  transform: translateY(-1px);
}

.form-page-container {
  padding: 60px 20px;
  background: var(--bg-body);
  min-height: calc(100vh - 150px);
  display: flex;
  justify-content: center;
}

.form-card {
  background: var(--bg-card);
  width: 100%;
  max-width: 700px;
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
  padding: 40px;
}
.form-card .form-card-header {
  text-align: center;
  margin-bottom: 35px;
}
.form-card .form-card-header i {
  font-size: 2.5rem;
  color: #2d5a27;
  margin-bottom: 10px;
}
.form-card .form-card-header h2 {
  font-weight: 700;
  color: var(--text-sec);
  margin: 0;
}
.form-card .form-card-header p {
  color: #888;
  font-size: 0.9rem;
}

.custom-form .form-group {
  margin-bottom: 20px;
}
.custom-form .form-group label {
  display: block;
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--text-sec);
  margin-bottom: 8px;
}
.custom-form .form-group input, .custom-form .form-group select, .custom-form .form-group textarea {
  width: 100%;
  padding: 12px 15px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  font-size: 0.95rem;
  transition: all 0.3s;
}
.custom-form .form-group input:focus, .custom-form .form-group select:focus, .custom-form .form-group textarea:focus {
  border-color: #2d5a27;
  outline: none;
  box-shadow: 0 0 0 3px rgba(45, 90, 39, 0.1);
}
.custom-form .form-group input[type=number]::-webkit-inner-spin-button {
  opacity: 0;
}
.custom-form .form-group select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: url('data:image/svg+xml;charset=US-ASCII,<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="%23555" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M6 9l6 6 6-6"/></svg>');
  background-repeat: no-repeat;
  background-position: right 1rem center;
}
.custom-form .form-group.readonly-group .fake-input {
  background: var(--bg-body);
  padding: 12px 15px;
  border-radius: 8px;
  color: var(--text-main);
  font-size: 0.95rem;
}
.custom-form .form-row {
  display: flex;
  gap: 20px;
}
.custom-form .form-row .col {
  flex: 1;
}
.custom-form .form-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px solid var(--border-color);
}
.custom-form .form-actions .main-buttons {
  display: flex;
  gap: 10px;
}

.error-text {
  color: #c53030;
  font-size: 0.8rem;
  margin-top: 5px;
  display: block;
}

.input-error {
  border-color: #c53030 !important;
}

.file-input-wrapper {
  margin-top: 5px;
}
.file-input-wrapper .custom-file-input {
  width: 100%;
  padding: 10px;
  background: var(--bg-card);
  border: 1px dashed var(--border-color);
  border-radius: 8px;
  cursor: pointer;
}
.file-input-wrapper .custom-file-input::file-selector-button {
  background: #2d5a27;
  color: var(--text-main);
  border: none;
  padding: 5px 15px;
  border-radius: 4px;
  margin-right: 15px;
  cursor: pointer;
  transition: 0.3s;
}
.file-input-wrapper .custom-file-input::file-selector-button:hover {
  background: rgb(27.2093023256, 54.4186046512, 23.5813953488);
}

/* Estilo unificado para inputs y selects */
.form-control,
.form-select {
  width: 100%;
  padding: 10px 12px;
  font-size: 0.95rem;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background-color: var(--bg-card);
  color: var(--text-main);
  transition: all 0.3s ease;
  outline: none;
}

/* Específico para el select para quitar la flecha por defecto y poner una custom */
.form-select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%237f8c8d' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 16px;
  padding-right: 40px; /* Espacio para la flecha */
  cursor: pointer;
}

/* Efectos de Focus (cuando el usuario hace clic) */
.form-control:focus,
.form-select:focus {
  border-color: #2d5a27;
  box-shadow: 0 0 0 3px rgba(39, 174, 96, 0.1);
  background-color: var(--bg-card);
}

/* Estilo para el estado de error/inválido */
.form-select.is-invalid {
  border-color: rgb(213.0734693878, 82.9265306122, 82.9265306122);
  background-color: #fffaf9;
}

/* Ajuste para que los labels se vean bien encima del select */
.form-group label {
  display: block;
  font-weight: 700;
  color: #888;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
}

.form-section-header h3 {
  color: var(--text-sec);
  border-bottom: 1px solid var(--text-sec);
  margin: 10px 0;
}

.modalidad-header {
  display: flex;
  justify-content: space-between;
}

.custom-alert {
  display: flex;
  align-items: center;
  padding: 15px 20px;
  margin-bottom: 20px;
  border-radius: 8px;
  position: relative;
  border: 1px solid transparent;
  animation: slideInDown 0.4s ease;
}
.custom-alert .alert-icon {
  font-size: 1.2rem;
  margin-right: 15px;
}
.custom-alert .alert-content {
  flex-grow: 1;
}
.custom-alert .alert-content strong {
  display: block;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 2px;
}
.custom-alert .alert-content p {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.4;
}
.custom-alert .alert-close {
  background: none;
  border: none;
  color: inherit;
  opacity: 0.5;
  cursor: pointer;
  padding: 5px;
  transition: opacity 0.2s;
}
.custom-alert .alert-close:hover {
  opacity: 1;
}
.custom-alert.alert-error {
  background-color: #fff5f5;
  color: #c53030;
  border-color: lighten #c53030, 10%;
  border-left: 5px solid #c53030;
}
.custom-alert.alert-notify {
  background-color: #ebf8ff;
  color: #2d5a27;
  border-color: rgb(62.7906976744, 125.5813953488, 54.4186046512);
  border-left: 5px solid #2d5a27;
}

@keyframes slideInDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.toast-container {
  position: fixed;
  top: 100px;
  right: 20px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toast {
  min-width: 280px;
  padding: 16px 20px;
  border-radius: 12px;
  background: var(--bg-card);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.9rem;
  color: var(--text-main);
  animation: slideIn 0.5s ease forwards;
  border-left: 4px solid transparent;
}
.toast.success {
  border-left-color: #2d5a27;
}
.toast.success i {
  color: #2d5a27;
}
.toast.error {
  border-left-color: #c53030;
}
.toast.error i {
  color: #c53030;
}
.toast i {
  font-size: 1.2rem;
}

@keyframes slideIn {
  from {
    transform: translateX(120%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}
.toast.fade-out {
  animation: fadeOut 0.5s ease forwards;
}

@keyframes fadeOut {
  to {
    transform: translateX(120%);
    opacity: 0;
  }
}
.back-navigation {
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-right: 2%;
}
.back-navigation .btn-back {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #666;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  transition: all 0.3s ease;
  padding: 8px 12px;
  border-radius: 8px;
}
.back-navigation .btn-back i {
  font-size: 0.8rem;
  transition: transform 0.3s ease;
}
.back-navigation .btn-back:hover {
  color: #2d5a27;
  background: rgba(45, 90, 39, 0.05);
}
.back-navigation .btn-back:hover i {
  transform: translateX(-5px);
}

.hero {
  height: 100vh;
  background: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)), url("https://images.unsplash.com/photo-1464822759023-fed622ff2c3b?q=80&w=1920") center/cover;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--hero-text);
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  background-attachment: fixed;
}
.hero .hero-content h1 {
  font-size: clamp(2rem, 8vw, 4rem);
  letter-spacing: 4px;
  margin-bottom: 1.5rem;
  text-transform: uppercase;
  opacity: 0;
  animation-name: fadeInUpH1;
  animation-duration: 1.2s;
  animation-timing-function: ease-out;
  animation-fill-mode: forwards;
}
.hero .hero-content p {
  opacity: 0;
  animation-name: fadeInUpP;
  animation-duration: 1.2s;
  animation-timing-function: ease-out;
  animation-delay: 0.5s;
  animation-fill-mode: forwards;
}

@media (max-width: 768px) {
  .hero {
    background-attachment: scroll;
  }
}
/* Sección de Próximos Eventos */
.carreras-section {
  padding: 40px 0;
  background-color: var(--bg-body);
}
.carreras-section .section-header {
  text-align: center;
  margin-bottom: 50px;
}
.carreras-section .section-header .section-title {
  font-size: 2.5rem;
  color: var(--text-sec);
  margin-bottom: 10px;
}
.carreras-section .section-header p {
  color: #777;
}

/* Grid de 4 columnas */
.grid-carreras {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 30px;
}

/* Forzado a 4 columnas en pantallas grandes */
@media (min-width: 1200px) {
  .grid-carreras {
    grid-template-columns: repeat(4, 1fr);
  }
}
.main-header {
  background-color: var(--header-bg);
  color: var(--header-text);
  height: 70px;
  display: flex;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 1000;
  padding: 0 2rem;
}

.header-container {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 30px;
}
.header-right .header-nav a {
  position: relative;
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  transition: all 0.3s ease;
  display: inline-block;
}
.header-right .header-nav a:hover, .header-right .header-nav a.active {
  color: #2d5a27;
}
.header-right .header-nav a.active {
  font-weight: 700;
  padding-bottom: 4px;
}
.header-right .header-nav a .badge-notificacion {
  background-color: #2d5a27;
  color: white;
  font-size: 0.5rem;
  font-weight: bold;
  border-radius: 50%;
  position: absolute;
  top: -12px;
  right: -20px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  border: 2px solid var(--header-bg);
  pointer-events: none;
}
.header-right .btn-login-header {
  text-decoration: none;
  color: var(--header-text);
  border: 1px solid var(--border-color);
  padding: 8px 20px;
  border-radius: 5px;
  font-size: 0.9rem;
  transition: all 0.3s ease;
}
.header-right .btn-login-header:hover {
  background: #2d5a27;
  color: var(--header-text);
  border-color: var(--border-color);
}
.header-right .btn-user {
  background-color: var(--header-bg);
  color: var(--header-text);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 500;
  border: none;
  outline: none;
  cursor: pointer;
  padding: 5px 15px;
  border-radius: 5px;
  font-family: inherit;
}
.header-right .btn-user i {
  color: #2d5a27;
  font-size: 1.3rem;
}

.header-left {
  transition: transform 0.3s ease;
  display: inline-block;
}
.header-left:hover {
  transform: scale(1.05);
}
.header-left .logo a {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
  font-size: 1.4rem;
  color: var(--header-text);
  text-decoration: none;
}
.header-left .logo a i {
  font-size: 1.8rem;
  color: var(--header-text);
}

.user-dropdown {
  position: relative;
  display: inline-block;
}
.user-dropdown:hover .dropdown-content {
  display: block;
  opacity: 1;
  transform: translateY(0);
}
.user-dropdown:hover .btn-user {
  background: rgba(255, 255, 255, 0.1);
}

.dropdown-content {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  background-color: var(--bg-card);
  min-width: 200px;
  box-shadow: 0px 8px 16px rgba(0, 0, 0, 0.15);
  border-radius: 8px;
  z-index: 1000;
  padding: 10px 0;
  background-clip: content-box;
  overflow: hidden;
  opacity: 0;
  transform: translateY(10px);
  transition: all 0.3s ease;
}
.dropdown-content a, .dropdown-content .theme-switch-item {
  color: var(--text-main);
  padding: 12px 16px;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.9rem;
  transition: all 0.2s;
  cursor: pointer;
}
.dropdown-content a i, .dropdown-content .theme-switch-item i {
  width: 16px;
  color: #777;
  transition: color 0.2s;
}
.dropdown-content a:hover, .dropdown-content .theme-switch-item:hover {
  background-color: rgba(0, 0, 0, 0.03);
  color: #2d5a27;
}
.dropdown-content a:hover i, .dropdown-content .theme-switch-item:hover i {
  color: #2d5a27;
}
.dropdown-content .theme-switch-item span {
  flex-grow: 1;
}
.dropdown-content a.logout-link {
  color: #e74c3c;
}
.dropdown-content a.logout-link:hover i {
  color: #e74c3c;
}
.dropdown-content hr {
  margin: 5px 0;
  border: 0;
  border-top: 1px solid var(--border-color);
}

.switch {
  position: relative;
  display: inline-block;
  width: 34px;
  height: 18px;
  pointer-events: none;
}
.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}
.switch .slider {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  transition: 0.4s;
  border-radius: 18px;
}
.switch .slider:before {
  position: absolute;
  content: "";
  height: 12px;
  width: 12px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: 0.4s;
  border-radius: 50%;
}
.switch input:checked + .slider {
  background-color: #2d5a27;
}
.switch input:checked + .slider:before {
  transform: translateX(16px);
}

@media (max-width: 500px) {
  .header-right {
    display: flex;
    justify-content: right;
    gap: 5px;
  }
}
.theme-toggle-btn {
  background: transparent;
  border: none;
  color: var(--text-color);
  font-size: 1.2rem;
  cursor: pointer;
  padding: 8px 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s ease;
}

.theme-toggle-btn:hover {
  transform: scale(1.1);
}

#theme-icon {
  transition: transform 0.4s ease, opacity 0.3s ease;
}

.theme-toggle-btn:active #theme-icon {
  transform: rotate(90deg) scale(0.8);
}

.badge-notificacion {
  background-color: #ff4757;
  color: white;
  font-size: 0.7rem;
  font-weight: bold;
  padding: 2px 6px;
  border-radius: 50%;
  position: absolute;
  top: -5px;
  right: -10px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
}

.footer {
  background-color: var(--footer-bg);
  padding: 30px 0;
  margin-top: 0px;
  border-top: 1px solid var(--border-color);
  color: #888;
  font-size: 0.85rem;
}
.footer .footer-container {
  max-width: none;
  width: 100%;
  margin: 0;
  padding: 0 5%;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
@media (max-width: 768px) {
  .footer .footer-container {
    flex-direction: column;
    gap: 15px;
    text-align: center;
  }
}
.footer .footer-info {
  display: flex;
  align-items: center;
  gap: 10px;
}
.footer .footer-info strong {
  color: var(--text-main);
  letter-spacing: 1px;
}
.footer .footer-info .separator {
  color: #ddd;
}
.footer .footer-info .tagline {
  font-weight: 300;
  font-style: italic;
}
.footer .footer-links {
  display: flex;
  align-items: center;
  gap: 25px;
}
.footer .footer-links .footer-link {
  text-decoration: none;
  color: #888;
  transition: color 0.3s ease;
  position: relative;
}
.footer .footer-links .footer-link:hover {
  color: #2d5a27;
}
.footer .footer-links .footer-link:after {
  content: "";
  position: absolute;
  width: 4px;
  height: 4px;
  background: #2d5a27;
  bottom: -8px;
  left: 50%;
  transform: translateX(-50%);
  border-radius: 50%;
  opacity: 0;
  transition: opacity 0.3s ease;
}
.footer .footer-links .footer-link:hover:after {
  opacity: 1;
}
.footer .footer-links .footer-icon {
  font-size: 1.1rem;
  color: #bbb;
  transition: transform 0.3s ease, color 0.3s ease;
}
.footer .footer-links .footer-icon:hover {
  color: var(--text-sec);
  transform: translateY(-2px);
}

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

.carreras-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 0;
  gap: 15px;
}
.carreras-toolbar .carreras-search {
  flex: 1;
  max-width: 400px;
}
.carreras-toolbar .carreras-search .search-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}
.carreras-toolbar .carreras-search .search-wrapper i {
  position: absolute;
  left: 15px;
  color: #888;
}
.carreras-toolbar .carreras-search .search-wrapper input {
  width: 100%;
  padding: 12px 15px 12px 45px;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  font-family: inherit;
  font-size: 0.95rem;
  transition: all 0.3s ease;
}
.carreras-toolbar .carreras-search .search-wrapper input:focus {
  outline: none;
  border-color: #2d5a27;
  box-shadow: 0 0 0 3px rgba(45, 90, 39, 0.1);
}
.carreras-toolbar .carreras-dropdown {
  position: relative;
}
.carreras-toolbar .carreras-dropdown .dropdown-button {
  background: var(--bg-card);
  border: 1px solid transparent;
  padding: 12px 20px;
  border-radius: 10px;
  cursor: pointer;
  font-family: inherit;
  font-weight: 600;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 12px;
  transition: all 0.2s;
}
.carreras-toolbar .carreras-dropdown .dropdown-button:hover {
  border-color: #bbb;
}
.carreras-toolbar .carreras-dropdown .dropdown-button i {
  font-size: 0.8rem;
  transition: transform 0.3s;
}
.carreras-toolbar .carreras-dropdown .dropdown-list {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: var(--bg-card);
  min-width: 200px;
  border-radius: 10px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
  border: 1px solid #eee;
  list-style: none;
  padding: 8px 0;
  z-index: 1000;
}
.carreras-toolbar .carreras-dropdown .dropdown-list li a {
  display: block;
  padding: 10px 20px;
  color: var(--text-sec);
  text-decoration: none;
  font-size: 0.95rem;
  transition: background 0.2s;
}
.carreras-toolbar .carreras-dropdown .dropdown-list li a:hover {
  background: #f8f9fa;
  color: #2d5a27;
}
.carreras-toolbar .carreras-dropdown.is-open .dropdown-list {
  display: block;
}
.carreras-toolbar .carreras-dropdown.is-open .dropdown-button {
  border-color: #2d5a27;
}
.carreras-toolbar .carreras-dropdown.is-open .dropdown-button i {
  transform: rotate(180deg);
}

@media (max-width: 600px) {
  .carreras-toolbar {
    flex-direction: column;
    align-items: stretch;
  }
  .carreras-toolbar .carreras-search {
    max-width: 100%;
  }
}
.carreras-grid {
  display: grid;
  grid-template-columns: repeat(2, auto);
  column-gap: 100px;
  row-gap: 20px;
}
@media (max-width: 1024px) {
  .carreras-grid {
    grid-template-columns: 1fr;
  }
}

.carrera-card {
  background: var(--bg-card);
  border-radius: 15px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  cursor: pointer;
  transition: all 0.3s ease;
}
.carrera-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}
.carrera-card .card-horizontal {
  display: flex;
  height: 200px;
}
@media (max-width: 480px) {
  .carrera-card .card-horizontal {
    flex-direction: column;
    height: auto;
  }
}
.carrera-card .card-img-container {
  flex: 0 0 40%;
  background-size: cover;
  background-position: center;
  position: relative;
}
.carrera-card .card-img-container .dificultad-tag {
  position: absolute;
  top: 10px;
  left: 10px;
  padding: 4px 10px;
  border-radius: 5px;
  color: white;
  font-size: 0.7rem;
  text-transform: uppercase;
  font-weight: bold;
}
.carrera-card .card-img-container .dificultad-tag.alta {
  background: #e74c3c;
}
.carrera-card .card-img-container .dificultad-tag.media {
  background: #f39c12;
}
.carrera-card .card-img-container .dificultad-tag.baja {
  background: #2ecc71;
}
@media (max-width: 480px) {
  .carrera-card .card-img-container {
    height: 150px;
    width: 100%;
  }
}
.carrera-card .card-info {
  flex: 1;
  padding: 15px 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.carrera-card .card-info h3 {
  color: #2d5a27;
  margin-bottom: 5px;
  font-size: 1.2rem;
}
.carrera-card .card-info .ubicacion {
  color: #666;
  font-size: 0.85rem;
  margin-bottom: 10px;
}
.carrera-card .card-info .tech-specs {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}
.carrera-card .card-info .tech-specs .spec {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #444;
  font-size: 0.8rem;
}
.carrera-card .card-info .tech-specs .spec i {
  color: #2d5a27;
}
.carrera-card .card-info .organizador {
  font-size: 0.75rem;
  color: #888;
  border-top: 1px solid #eee;
  padding-top: 8px;
}
.carrera-card .card-info .organizador strong {
  color: #444;
}

.pagination-container {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  margin: 50px 0px 20px;
}
.pagination-container .page-numbers {
  display: flex;
  gap: 8px;
}
.pagination-container .page-link, .pagination-container .page-number {
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  background-color: var(--bg-card);
  color: #777;
  border: 1px solid transparent;
  transition: all 0.3s ease;
  font-size: 0.9rem;
}
.pagination-container .page-link {
  width: 40px;
  height: 40px;
  border-radius: 50%;
}
.pagination-container .page-link i {
  font-size: 0.8rem;
}
.pagination-container .page-link:hover {
  color: #2d5a27;
  border-color: #2d5a27;
  background-color: rgba(45, 90, 39, 0.05);
  transform: translateY(-2px);
}
.pagination-container .page-link.disabled {
  color: #ccc;
  border-color: #f5f5f5;
  cursor: not-allowed;
  pointer-events: none;
}
.pagination-container .page-number {
  min-width: 40px;
  height: 40px;
  padding: 0 12px;
  border-radius: 8px;
}
.pagination-container .page-number.active {
  background-color: #2d5a27;
  color: white;
  border-color: #2d5a27;
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(45, 90, 39, 0.2);
}
.pagination-container .page-number:hover:not(.active) {
  border-color: #ddd;
  color: var(--text-sec);
  background-color: #fafafa;
}

.carrera-detail-grid {
  display: grid;
  grid-template-columns: 40% 60%;
  gap: 20px;
  margin-top: 30px;
  align-items: start;
}
@media (max-width: 992px) {
  .carrera-detail-grid {
    grid-template-columns: 1fr;
    margin-right: 20px;
  }
  .carrera-detail-grid .carrera-info-panel {
    margin: 0 40px;
  }
}

.carrera-media .detail-img {
  margin: auto;
  display: block;
  width: 90%;
  max-height: 85vh;
  border-radius: 20px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  object-fit: cover;
  cursor: pointer;
  transition: transform 0.3s ease;
}
.carrera-media .detail-img:hover {
  transform: scale(1.01);
}

.carrera-info-panel {
  margin-right: 40px;
}
.carrera-info-panel .carrera-specs-minimal {
  margin: 1.5rem 0;
  padding: 1rem 0;
  border-top: 1px solid var(--text-sec);
  border-bottom: 1px solid var(--text-sec);
}
.carrera-info-panel .carrera-specs-minimal .spec-item {
  display: flex;
  align-items: center;
}
.carrera-info-panel .carrera-specs-minimal .spec-content {
  display: flex;
  align-items: baseline;
  gap: 8px;
}
.carrera-info-panel .carrera-specs-minimal .spec-label {
  font-size: 0.85rem;
  font-weight: 500;
  color: #888;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.carrera-info-panel .carrera-specs-minimal .spec-value {
  font-size: 1rem;
  font-weight: 600;
  color: #2c3e50;
}
.carrera-info-panel .carrera-specs-minimal .spec-value small {
  font-size: 0.85rem;
  font-weight: 400;
  color: #999;
}
.carrera-info-panel .detail-header {
  margin-bottom: 25px;
}
.carrera-info-panel .detail-header h1 {
  font-size: 2.5rem;
  color: #2d5a27;
  margin: 10px 0;
}
.carrera-info-panel .detail-header .ubicacion {
  color: #666;
  font-size: 1.1rem;
}
.carrera-info-panel .stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 15px;
  margin-bottom: 30px;
  background: var(--bg-card);
  padding: 20px;
  border-radius: 15px;
}
.carrera-info-panel .stats-grid .stat-item {
  display: flex;
  align-items: center;
  margin: auto;
  gap: 10px;
}
.carrera-info-panel .stats-grid .stat-item i {
  color: #2d5a27;
  font-size: 1.5rem;
}
.carrera-info-panel .stats-grid .stat-item .label {
  display: block;
  font-size: 0.75rem;
  color: var(--text-sec);
  text-transform: uppercase;
}
.carrera-info-panel .stats-grid .stat-item .value {
  font-weight: bold;
  font-size: 1rem;
}
.carrera-info-panel .stats-grid .stat-item .stat-text {
  text-align: center;
  color: var(--text-main);
}
.carrera-info-panel .description {
  margin-bottom: 30px;
  line-height: 1.6;
  color: var(--text-sec);
}
.carrera-info-panel .description h3 {
  margin-bottom: 10px;
  font-size: 1.25rem;
}
.carrera-info-panel .admin-controls {
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid #eee;
}
.carrera-info-panel .admin-controls h4 {
  font-size: 0.9rem;
  color: #999;
  text-transform: uppercase;
  margin-bottom: 15px;
}
.carrera-info-panel .btn-edit {
  background: #ffc107;
  color: #000;
}
.carrera-info-panel .btn-delete {
  background: #dc3545;
  color: white;
}
.carrera-info-panel .dificultad-badge {
  padding: 5px 15px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: bold;
  color: white;
}
.carrera-info-panel .dificultad-badge.alta {
  background: #dc3545;
}
.carrera-info-panel .dificultad-badge.media {
  background: #fd7e14;
}
.carrera-info-panel .dificultad-badge.baja {
  background: #198754;
}
.carrera-info-panel .organizador-info {
  color: var(--text-main);
}

/* MODAL LIGHTBOX OPTIMIZADO */
.modal-lightbox {
  display: none;
  position: fixed;
  z-index: 9999;
  padding-top: 50px;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background-color: #000000;
  background-color: rgba(0, 0, 0, 0.95);
}
.modal-lightbox.show {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.3s;
}

.modal-content {
  margin: auto;
  display: block;
  max-width: 90%;
  max-height: 80vh;
  border-radius: 8px;
  box-shadow: 0 0 30px rgba(255, 255, 255, 0.05);
  animation: zoomIn 0.3s;
  filter: brightness(1) contrast(1);
}

#modalCaption {
  width: 80%;
  max-width: 700px;
  text-align: center;
  color: var(--bg-card);
  padding: 20px 0;
  font-size: 1.1rem;
  font-weight: 300;
}

.close-modal {
  position: absolute;
  top: 20px;
  right: 35px;
  color: var(--header-text);
  font-size: 45px;
  font-weight: 200;
  transition: 0.3s;
  cursor: pointer;
  line-height: 1;
}
.close-modal:hover {
  color: #2d5a27;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
@keyframes zoomIn {
  from {
    transform: scale(0.9);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}
@media (max-width: 700px) {
  .modal-content {
    width: 95%;
    max-height: 70vh;
  }
}
.carrera-actions {
  margin-top: 30px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.perfil-elevacion-container {
  grid-column: 1/-1;
  margin: 20px auto 0;
  width: 90%;
}
.perfil-elevacion-container .perfil-titulo {
  font-size: 1rem;
  margin-bottom: 10px;
  color: #333;
  display: flex;
  align-items: center;
  gap: 8px;
}
.perfil-elevacion-container .perfil-wrapper {
  width: 100%;
  height: 100px;
  overflow: hidden;
  border-radius: 8px;
  border: 1px solid #ddd;
  position: relative;
  background: #fff;
}
.perfil-elevacion-container .perfil-wrapper iframe {
  width: 100%;
  height: 550px;
  position: absolute;
  top: -390px;
  left: 0;
  border: none;
}
.perfil-elevacion-container .perfil-footer {
  margin-top: 5px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.perfil-elevacion-container .perfil-footer .perfil-info {
  font-size: 0.75rem;
  color: #888;
}
.perfil-elevacion-container .perfil-footer .perfil-link {
  font-size: 0.8rem;
  color: #4a7c2c;
  text-decoration: none;
  font-weight: bold;
  transition: color 0.2s ease;
}
.perfil-elevacion-container .perfil-footer .perfil-link:hover {
  color: rgb(51.5357142857, 86.3571428571, 30.6428571429);
  text-decoration: underline;
}
.perfil-elevacion-container .perfil-footer .perfil-link i {
  margin-left: 4px;
}

.disponibilidad-container {
  margin: 10px 0 0 0;
  padding: 10px 0 0 0;
}

.disponibilidad-header {
  display: block;
  text-align: center;
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
  color: #666;
}
.disponibilidad-header small {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  font-size: 1rem;
}

.plazas-cuenta strong {
  color: #333;
}

.progress-bar-container {
  width: 90%;
  margin: auto;
  height: 8px;
  background-color: var(--text-sec);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 0 5px rgba(46, 204, 113, 0.3);
}
.progress-bar-container.warning {
  box-shadow: 0 0 5px rgba(253, 126, 20, 0.3);
}
.progress-bar-container.danger {
  box-shadow: 0 0 5px rgba(248, 79, 95, 0.3);
}

.progress-bar-fill {
  height: 100%;
  background-color: #2d5a27;
  transition: width 0.5s ease-in-out;
}
.progress-bar-fill.warning {
  background-color: #fd7e14;
}
.progress-bar-fill.danger {
  background-color: #dc3545;
}
.progress-bar-fill.full {
  background-color: #555;
}

.alert-ultimas-plazas {
  color: #fd7e14;
  font-size: 0.85rem;
  font-weight: 600;
  margin-top: 8px;
  display: flex;
  text-align: center;
}
.alert-ultimas-plazas::before {
  content: "●";
  font-size: 1rem;
}

.sold-out-badge-minimal {
  padding: 1.2rem;
  background-color: #f8f9fa;
  border: 1px solid #dee2e6;
  border-radius: 15px;
  text-align: center;
  color: #6c757d;
}
.sold-out-badge-minimal i {
  display: block;
  font-size: 1.5rem;
  margin-bottom: 8px;
  opacity: 0.5;
}
.sold-out-badge-minimal span {
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: bold;
}

.header-meta {
  display: flex;
  justify-content: space-between;
  margin-right: 5px;
  gap: 20px;
  color: #666;
}

.login-page {
  min-height: calc(100vh - 160px);
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--bg-body);
}

.login-card {
  display: flex;
  width: 100%;
  max-width: 950px;
  background: var(--bg-card);
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
  min-height: 550px;
}
.login-card .login-visual {
  flex: 1.1;
  background: linear-gradient(rgba(17, 17, 17, 0.5), rgba(17, 17, 17, 0.5)), url("https://images.unsplash.com/photo-1464822759023-fed622ff2c3b?q=80&w=1000");
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  padding: 40px;
}
.login-card .login-visual .visual-content {
  text-align: center;
}
.login-card .login-visual .visual-content i {
  font-size: 4rem;
  margin-bottom: 1rem;
}
.login-card .login-visual .visual-content h1 {
  font-weight: 900;
  letter-spacing: 5px;
  margin: 0;
}
.login-card .login-visual .visual-content p {
  opacity: 0.8;
  font-weight: 300;
  margin-top: 10px;
}
.login-card .login-content {
  flex: 1;
  padding: 50px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.login-card .login-content .login-header h2 {
  font-size: 2rem;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 30px;
}

.login-form .input-group {
  margin-bottom: 25px;
}
.login-form .input-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: var(--text-main);
}
.login-form .input-group input {
  width: 100%;
  padding: 12px 15px;
  border: 2px solid var(--border-color);
  border-radius: 8px;
  transition: border-color 0.3s;
}
.login-form .input-group input:focus {
  border-color: #2d5a27;
  outline: none;
}

.register-link {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 30px;
  font-size: 0.9rem;
  gap: 5px;
}
.register-link .forgot-link {
  color: #2d5a27;
  text-decoration: none;
}
.register-link .forgot-link:hover {
  text-decoration: underline;
}

.form-actions-extra {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
  font-size: 0.9rem;
}
.form-actions-extra .checkbox-container {
  color: var(--text-main);
}
.form-actions-extra .forgot-link {
  color: #2d5a27;
  text-decoration: none;
}
.form-actions-extra .forgot-link:hover {
  text-decoration: underline;
}

@media (max-width: 768px) {
  .login-card {
    flex-direction: column;
  }
  .login-card .login-visual {
    flex: 0 0 180px;
    padding: 20px;
  }
}
.account-container {
  min-height: calc(100vh - 140px);
  min-width: 80%;
  background-color: var(--bg-body);
  padding: 60px 20px;
  display: flex;
  justify-content: center;
}

.account-card {
  background: var(--bg-card);
  width: 90%;
  border-radius: 15px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
  overflow: hidden;
}
.account-card .account-header {
  background: rgb(27.2093023256, 54.4186046512, 23.5813953488);
  color: var(--header-text);
  padding: 30px 40px;
}
.account-card .account-header .user-info-main {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 25px;
}
.account-card .account-header .user-info-main i {
  font-size: 3.5rem;
  color: #2d5a27;
}
.account-card .account-header .user-info-main h2 {
  margin: 0;
  font-size: 1.8rem;
}
.account-card .account-header .user-info-main p {
  margin: 5px 0 0;
  opacity: 0.7;
  font-size: 0.9rem;
}

.account-menu {
  display: flex;
  gap: 10px;
  border-top: 1px solid var(--border-color);
  padding-top: 15px;
}
.account-menu a {
  color: var(--bg-card);
  text-decoration: none;
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 0.9rem;
  background: rgba(255, 255, 255, 0.05);
  transition: all 0.3s;
}
.account-menu a:hover, .account-menu a.active {
  background: #2d5a27;
  color: var(--header-text);
}

.account-content {
  padding: 40px;
}
.account-content p {
  font-family: inherit;
}
.account-content .form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 25px;
  margin-bottom: 30px;
}
.account-content .form-grid .form-section-title {
  grid-column: 1/-1;
  margin: 10px 0;
  font-size: 1.1rem;
  color: var(--text-main);
  border-bottom: 2px solid #2d5a27;
  padding-bottom: 5px;
  font-weight: 700;
}
.account-content .form-group {
  display: flex;
  flex-direction: column;
}
.account-content .form-group h3 {
  color: var(--text-main);
}
.account-content .form-group label {
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 8px;
  font-size: 0.85rem;
  text-transform: uppercase;
}
.account-content .form-group input {
  padding: 12px;
  border: 1px solid var(--border-color);
  background: field;
  border-radius: 8px;
  color: var(--text-main);
  cursor: text;
  transition: all 0.3s ease;
}
.account-content .form-group input:focus {
  border-color: #2d5a27;
  outline: none;
  background: field;
}
.account-content .form-group input:disabled {
  background: var(--bg-body);
  border-color: var(--bg-body);
  color: #777;
  cursor: not-allowed;
}
.account-content .form-group .form-select {
  background-color: field;
  color: var(--text-main);
  border: 1px solid var(--border-color);
  padding: 12px;
  border-radius: 8px;
  appearance: none;
}
.account-content .form-group .form-select option {
  background-color: var(--bg-card);
  color: var(--text-main);
  padding: 10px;
}

.account-page {
  background-color: #f8fafb;
  padding: 40px 0;
  min-height: calc(100vh - 140px);
}

.account-wrapper {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 30px;
  padding: 0 20px;
}

.section-header-flex {
  grid-column: 1/-1;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 2px solid #2d5a27;
  margin-bottom: 15px;
  padding-bottom: 5px;
  color: var(--text-main);
}
.section-header-flex .form-section-title {
  border-bottom: none !important;
  margin: 0;
}

.danger-zone-inline {
  grid-column: 1/-1;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--bg-card);
  padding: 15px;
  border-radius: 8px;
  border: 1px dashed rgb(223.0653061224, 123.9346938776, 123.9346938776);
}
.danger-zone-inline p {
  margin: 0;
  font-size: 0.9rem;
  color: #c53030;
}

.alert-danger-custom {
  background-color: #fff5f5;
  border-left: 4px solid #c53030;
  color: #c53030;
  padding: 15px;
  border-radius: 4px;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 12px;
}
.alert-danger-custom i {
  font-size: 1.2rem;
}

.account-nav-list {
  list-style: none;
  padding: 0;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 5px;
  padding: 0 20px;
}
.account-nav-list li a {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  color: #666;
  text-decoration: none;
  font-weight: 500;
  font-size: 0.9rem;
  border-radius: 8px 8px 0 0;
  transition: all 0.2s;
  border-bottom: 3px solid transparent;
}
.account-nav-list li a i {
  font-size: 1rem;
  color: #999;
}
.account-nav-list li a:hover {
  background: rgba(45, 90, 39, 0.05);
  color: #2d5a27;
  border-bottom-color: #2d5a27;
}
.account-nav-list li a:hover i {
  color: #2d5a27;
}
.account-nav-list li a.active {
  background: var(--bg-card);
  color: #2d5a27;
  border-bottom: 3px solid #2d5a27;
  font-weight: 700;
}
.account-nav-list li a.active i {
  color: #2d5a27;
}
.account-nav-list li a.delete-link:hover {
  color: #c53030;
  background: #fff5f5;
  border-bottom-color: #c53030;
}
.account-nav-list li a.delete-link:hover i {
  color: #c53030;
}

.account-table {
  width: 100%;
  border-collapse: collapse;
}
.account-table th {
  text-align: left;
  padding: 12px;
  color: #888;
  font-size: 0.85rem;
  text-transform: uppercase;
}
.account-table td {
  padding: 15px 12px;
  border-top: 1px solid #f5f5f5;
  font-size: 0.95rem;
}
.account-table .status-pill {
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 700;
}
.account-table .status-pill.confirmed {
  background: #e8f5e9;
  color: #2e7d32;
}
.account-table .empty-msg {
  text-align: center;
  color: #aaa;
  padding: 30px;
}

.form-actions {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  border-top: 1px solid var(--bg-card);
  padding-top: 25px;
  margin-top: 20px;
  gap: 10px;
}

.error-msg {
  color: #e74c3c;
  font-size: 0.8rem;
}

@media (max-width: 992px) {
  .account-wrapper {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 768px) {
  .account-content .form-grid {
    grid-template-columns: 1fr;
  }
  .account-form .form-grid {
    grid-template-columns: 1fr;
  }
  .form-actions {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: nowrap;
    gap: 5px;
  }
  .btn-account-cancel,
  .btn-account-save {
    width: auto;
    white-space: nowrap;
    margin: 0;
  }
}
@media (max-width: 576px) {
  .form-actions {
    flex-direction: column;
    gap: 15px;
  }
  .form-actions .btns-left, .form-actions .btn-account-save {
    width: 100%;
  }
  .form-actions .btn-account-cancel, .form-actions .btn-account-save {
    width: 100%;
  }
}
/* Contenedor principal del uploader de avatar */
/* El label ahora hereda de avatar-circle, solo añadimos el puntero */
.avatar-label {
  position: relative;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.avatar-label:hover {
  transform: scale(1.05); /* Efecto de "púlsame" */
}

/* Ajustamos el overlay para que sea un círculo perfecto sobre la imagen */
.avatar-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5); /* Fondo negro semitransparente */
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0; /* Oculto por defecto */
  transition: opacity 0.3s ease;
  border-radius: 50%; /* ¡Importante! */
}

.avatar-label:hover .avatar-overlay {
  opacity: 1; /* Aparece al pasar el ratón */
}

.avatar-overlay i {
  font-size: 1.5rem;
  color: white !important; /* Forzamos el blanco para el icono de la cámara */
}

/* Estilos para la tabla administrativa */
.admin-table {
  width: 100% !important;
  table-layout: auto;
  border-collapse: separate;
  border-spacing: 0 8px;
  margin-top: 10px;
  word-break: break-word;
}
.admin-table thead th {
  padding: 12px 15px;
  color: #777;
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 1px;
  border-bottom: 2px solid #eee;
}
.admin-table thead th a {
  text-decoration: none;
  color: #777;
}
.admin-table tbody tr {
  background: var(--bg-card);
  transition: transform 0.2s;
  text-align: center;
}
.admin-table tbody tr:hover {
  background-color: field;
}
.admin-table tbody tr td {
  padding: 15px;
  border-bottom: 1px solid #f0f0f0;
  vertical-align: middle;
  color: var(--text-main);
}
.admin-table tbody tr td a.table-link {
  text-decoration: none;
  color: var(--text-main);
  background-color: rgba(45, 90, 39, 0.1);
  padding: 4px 10px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.3s ease;
  border: 1px solid transparent;
}
.admin-table tbody tr td a.table-link:hover {
  background-color: #2d5a27;
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  border-color: rgba(255, 255, 255, 0.1);
}

.admin-table th:first-child,
.admin-table td:first-child {
  width: 60px;
  text-align: center;
}

/* Badges de Rol */
.role-badge {
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
}
.role-badge.admin {
  background: #fee2e2;
  color: #dc2626;
}
.role-badge.organizador {
  background: #fef3c7;
  color: #d97706;
}
.role-badge.corredor {
  background: #ecfdf5;
  color: #059669;
}
.role-badge.borrador {
  background: #f3f4f6;
  color: #4b5563;
}
.role-badge.abierto {
  background: #ecfdf5;
  color: #059669;
}
.role-badge.cerrado {
  background: #fffbeb;
  color: #d97706;
}
.role-badge.finalizado {
  background: #fef2f2;
  color: #2563eb;
}
.role-badge.cancelado {
  background: #ecfdf5;
  color: #dc2626;
}

.admin-table-footer {
  padding: 20px;
  border-top: 1px solid #eee;
  color: #666;
  font-size: 0.9rem;
}

/* Estilos para el desplegable (Ordenar por...) */
.nav-item-dropdown {
  position: relative;
}
.nav-item-dropdown .dropdown-trigger {
  width: 100%;
  background: transparent;
  border: none;
  text-align: left;
  font-family: inherit;
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  color: #666;
  border-radius: 8px;
  transition: all 0.3s ease;
}
.nav-item-dropdown .dropdown-trigger i:first-child {
  color: #888;
}
.nav-item-dropdown .dropdown-trigger:hover:not(.disabled) {
  background: var(--bg-body);
  color: #2d5a27;
}
.nav-item-dropdown .dropdown-trigger:hover:not(.disabled) i:first-child {
  color: #2d5a27;
}
.nav-item-dropdown .dropdown-trigger.disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.nav-item-dropdown {
  /* El menú desplegable */
}
.nav-item-dropdown .dropdown-menu-list {
  display: none;
  position: absolute;
  left: 20px;
  right: 0;
  top: 90%;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  z-index: 100;
  list-style: none;
  padding: 5px;
  margin-top: 0;
  padding-top: 10px;
}
.nav-item-dropdown .dropdown-menu-list li a {
  padding: 8px 12px;
  font-size: 0.9rem;
  color: var(--text-main);
}
.nav-item-dropdown .dropdown-menu-list li a:hover {
  background: rgba(45, 90, 39, 0.05);
  color: #2d5a27;
}
.nav-item-dropdown:hover .dropdown-menu-list {
  display: block;
}

/* Estilos para la Barra de Búsqueda */
.nav-item-search {
  padding: 8px 16px;
  margin-left: auto;
}
@media (max-width: 1100px) {
  .nav-item-search {
    margin-left: 0;
  }
}
.nav-item-search .search-wrapper {
  display: flex;
  align-items: center;
  background: field;
  border: 1px solid var(--border-color);
  border-radius: 25px;
  padding: 2px 12px;
  transition: border-color 0.3s, box-shadow 0.3s;
}
.nav-item-search .search-wrapper:focus-within {
  border-color: #2d5a27;
  box-shadow: 0 0 0 3px rgba(45, 90, 39, 0.1);
  background: field;
}
.nav-item-search .search-wrapper input[type=search] {
  flex: 1;
  border: none;
  background: transparent;
  padding: 8px;
  font-size: 0.9rem;
  color: var(--text-main);
  outline: none;
}
.nav-item-search .search-wrapper input[type=search]::placeholder {
  color: #aaa;
}
.nav-item-search .search-wrapper button {
  background: transparent;
  border: none;
  color: #888;
  cursor: pointer;
  padding: 5px;
  transition: color 0.3s;
}
.nav-item-search .search-wrapper button:hover:not(:disabled) {
  color: #2d5a27;
}
.nav-item-search .search-wrapper button:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.table-responsive {
  width: 100%;
  display: block;
  overflow-x: auto;
  border-radius: 8px;
  box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.05);
}

/* Clase base para todos los avatares circulares de la web */
.avatar-circle {
  border-radius: 50%;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #f8f9fa;
  border: 1px solid rgba(0, 0, 0, 0.1);
  flex-shrink: 0;
}

/* La imagen dentro de cualquier círculo de avatar */
.avatar-circle img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* El icono dentro de cualquier círculo de avatar */
.avatar-circle i {
  color: #666;
  line-height: 1; /* Evita desplazamientos extraños del icono */
}

/* Variantes de tamaño */
.size-sm {
  width: 30px;
  height: 30px;
} /* Para el Header */
.size-md {
  width: 80px;
  height: 80px;
} /* Para el Perfil */
/* Estructura de Edición de Usuario */
.profile-details-wrapper {
  display: grid;
  grid-template-columns: 250px 1fr;
  gap: 40px;
  margin-top: 20px;
}
@media (max-width: 768px) {
  .profile-details-wrapper {
    grid-template-columns: 1fr;
  }
}

.profile-sidebar .avatar-container {
  margin-bottom: 20px;
  display: flex;
  justify-content: center;
}
.profile-sidebar .avatar-container .avatar-edit {
  width: 180px;
  height: 180px;
  border: 5px solid var(--border-color);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}
.profile-sidebar .form-group {
  text-align: left;
  margin-bottom: 20px;
}
.profile-sidebar .form-group label {
  font-size: 0.75rem;
  color: #888;
  text-transform: uppercase;
  font-weight: 700;
  display: block;
  margin-bottom: 5px;
}
.profile-sidebar .form-group .form-control {
  font-size: 0.8rem;
  background-color: var(--bg-card);
}
.profile-sidebar .form-group .form-select {
  background-color: var(--bg-card);
}
.profile-sidebar .form-group input {
  background-color: var(--bg-card);
}

.profile-info-content .info-group {
  margin-bottom: 35px;
}
.profile-info-content .form-section-title {
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 10px;
  margin-bottom: 20px;
  color: var(--primary-green);
}

/* Pie del formulario */
.form-actions {
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid var(--border-color);
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}
.form-actions .btn-save {
  cursor: pointer;
  border: none;
  padding: 10px 25px;
  background: #2d5a27;
  color: #fff;
  border-radius: 8px;
  font-weight: 600;
  transition: background 0.3s;
}
.form-actions .btn-save:hover {
  background: rgba(45, 90, 39, 0.05);
}
.form-actions .btn-cancel {
  text-decoration: none;
  padding: 10px 25px;
  background: #eee;
  color: #333;
  border-radius: 8px;
  transition: background 0.3s;
}
.form-actions .btn-cancel:hover {
  background: #e0e0e0;
}

/* Estilo para el input de archivo */
input[type=file].form-control {
  padding: 6px;
  cursor: pointer;
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  font-size: 0.8rem;
}
input[type=file].form-control::-webkit-file-upload-button {
  background: #2d5a27;
  color: white;
  border: none;
  padding: 5px 12px;
  border-radius: 4px;
  margin-right: 10px;
  cursor: pointer;
  font-weight: 600;
  transition: background 0.3s;
}
input[type=file].form-control::-webkit-file-upload-button:hover {
  background: rgb(27.2093023256, 54.4186046512, 23.5813953488);
}

/* Contenedor principal del mapa e info */
.contact-map {
  margin-top: 30px;
  background-color: #ffffff;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid #e1e8ed;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
  transition: transform 0.3s ease;
}

/* El iframe de Google Maps */
.contact-map iframe {
  display: block;
  filter: grayscale(20%);
}

/* Estilos para el texto debajo del mapa */
.contact-map h4 {
  margin: 20px 20px 10px 20px;
  color: #2d5a27;
  font-size: 1.2rem;
  font-weight: 700;
  border-bottom: 2px solid rgb(27.2093023256, 54.4186046512, 23.5813953488);
  display: inline-block;
}

.contact-map p {
  margin: 5px 20px 15px 20px;
  color: #5d6d7e;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
}

/* Estilos para los iconos de FontAwesome */
.contact-map p i {
  color: #2d5a27;
  margin-right: 12px;
  width: 20px;
  text-align: center;
}

/* Último párrafo para dar un poco de aire al final */
.contact-map p:last-child {
  margin-bottom: 25px;
}