/* Reset básico */
* {
    box-sizing: border-box;
}

/* styles.css */
:root {
  --primary-color: #003366; /* Azul marino */
  --text-color: #333;
  --border-color: #ccc;
  --light-bg: #f9fbfd;
  --card-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 0;
    color: #333;
    font-size: 14px;
    line-height: 1.5;
    width: 100%;
    overflow-x: auto;
}

/* Para páginas con fondo de estadio */
.stadium-bg {
  background: 
    linear-gradient(rgba(0, 10, 20, 0.50), rgba(0, 15, 30, 0.60)), /* overlay más oscuro */
    url('../assets/img/cancha_pasto2.jpg') center/cover no-repeat fixed;
  background-blend-mode: multiply; /* mejora los colores vívidos */
}

/* Formularios */
.form-container {
  max-width: 800px;
  margin: 2rem auto;
  background: white;
  padding: 2rem;
  border-radius: 12px;
  box-shadow: var(--card-shadow);
}

h2 {
  text-align: center;
  color: var(--primary-color);
  margin-bottom: 1.5rem;
  font-weight: 700;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.form-group {
  display: flex;
  flex-direction: column;
}

.form-group label {
  font-weight: normal; /* No bold */
  margin-bottom: 0.4rem;
  color: var(--text-color);
  font-size: 0.95rem;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.5rem;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  font-size: 1rem;
  color: var(--text-color);
}

/* Campo especial: azul marino en foco y borde */
.form-group input:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 2px rgba(0, 51, 102, 0.2);
}

.valor-ficha {
    color: #071289; /* azul marino */
}

/* Botón principal */
.btn-submit {
  width: 100%;
  padding: 0.9rem;
  background: var(--primary-color);
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 1.1rem;
  font-weight: bold;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-submit:hover {
  background: #002244;
}

/* Mensajes */
.error {
  background: #ffebee;
  color: #c62828;
  padding: 0.8rem;
  border-radius: 6px;
  margin-bottom: 1.5rem;
  text-align: center;
}

/* Landing page */
.hero {
  text-align: center;
  padding: 3rem 1rem;
}

.hero h1 {
  font-size: 2.5rem;
  color: var(--primary-color);
  margin-bottom: 1rem;
}

.cta-buttons {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 1.5rem;
}

.btn {
  padding: 0.9rem 2rem;
  border: none;
  border-radius: 50px;
  font-size: 1.1rem;
  font-weight: bold;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}

.btn-primary {
  background: var(--primary-color);
  color: white;
}

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

/* Responsive */
@media (max-width: 768px) {
  .form-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .form-full {
    grid-column: span 2;
  }
}

@media (max-width: 480px) {
  .form-grid {
    grid-template-columns: 1fr;
  }
  
  .form-full {
    grid-column: span 1;
  }
}

/* TOAST NOTIFICACIONES */
/* === TOAST NOTIFICATIONS (nivel más alto) === */
.toast {
    position: fixed;
    bottom: 20px;
    right: 20px;
    max-width: 350px;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    color: white;
    font-size: 0.95rem;
    font-weight: bold;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
    z-index: 32000; /* ← Debe ser mayor que cualquier modal */
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.4s ease;
    display: flex;
    align-items: center;
    gap: 0.7rem;
}

/* === MODAL DE CONFIRMACIÓN PERSONALIZADO (nivel alto) === */
#modal-confirm {
    z-index: 31000 !important; /* ← Mayor que submodal (11000), menor que toast (32000) */
}

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

.toast.success { background: linear-gradient(135deg, #009966, #006644); }
.toast.error { background: linear-gradient(135deg, #cc0000, #990000); }
.toast.warning { background: linear-gradient(135deg, #ff9900, #cc6600); }
.toast.info { background: linear-gradient(135deg, #0066cc, #004080); }

/* Colores por tipo */
.toast.success {
    background: linear-gradient(135deg, #009966, #006644);
}
.toast.error {
    background: linear-gradient(135deg, #cc0000, #990000);
}
.toast.warning {
    background: linear-gradient(135deg, #ff9900, #cc6600);
}
.toast.info {
    background: linear-gradient(135deg, #0066cc, #004080);
}

/* Iconos */
.toast i {
    font-size: 1.2rem;
    min-width: 20px;
}

/* Limitar ancho de resultados de búsqueda inteligente */
#resultados-busqueda-inteligente {
    max-width: 100%; /* O el ancho máximo que desees, por ejemplo, 800px */
    /* Opcional: Si conoces el ID del contenedor principal del formulario */
    /* max-width: calc(100vw - 40px); /* Ajusta 40px al margen total del body */
    width: 100%; /* Asegura que use el ancho disponible dentro del max-width */
    /* Mantener otros estilos existentes */
    position: absolute;
    background: white;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    z-index: 1000;
    /* Ajustar según sea necesario */
    top: 100%;
    left: 0;
    overflow-y: auto;
    max-height: 200px;
}