/* Estilos para EFIL - Club */

body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    line-height: 1.6;
    background-color: #f4f4f9;
    color: #333;
}

header {
    /*background: #0056a6;
    color: white;
    padding: 1rem 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 2rem;*/
    background: #0056a6;
    color: white;
    display: flex;
    justify-content: space-between; /* logo a la izquierda, nav/botón a la derecha */
    align-items: center;
    padding: 0 1rem;
    position: relative; /* para que el menú desplegado se posicione bien */
}

header .logo img {
    height: 50px;
    flex: 1;
}

nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
}

nav ul li {
    margin: 0 1rem;
}

nav ul li a {
    text-decoration: none;
    color: white;
    font-weight: bold;
}

nav ul li a:hover {
    text-decoration: underline;
}

main {
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem 15px;
}

section {
    margin-bottom: 2rem;
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

section h1, section h2 {
    color: #0056a6;
}

/* Textos justificados */
main p, main li {
    text-align: justify;
}

footer {
    text-align: center;
    background: #333;
    color: white;
    padding: 1rem 0;
    margin-top: 2rem;
}

footer a {
    color: #ffd700;
    text-decoration: none;
}

footer a:hover {
    text-decoration: underline;
}

/* Galería */
.galeria {
    padding: 20px;
    text-align: center;
}
.galeria .fotos {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}
.galeria img {
    width: 30%;
    max-width: 280px;
    border-radius: 10px;
    cursor: pointer;
    transition: transform 0.3s;
}
.galeria img:hover {
    transform: scale(1.05);
}

/* Lightbox */
#lightbox {
    display: none;
    position: fixed;
    z-index: 999;
    left: 0; top: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.9);
    justify-content: center;
    align-items: center;
}
#lightbox img {
    max-width: 90%;
    max-height: 90%;
    border-radius: 10px;
}

/* Mapa */
#ubicacion {
    padding: 20px;
    text-align: left;
}
#ubicacion .mapa {
    margin-top: 15px;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 0 10px rgba(0,0,0,0.2);
}

/* ===== Menú Responsive ===== */
.menu-toggle {
  display: none;
}

@media (max-width: 768px) {
  nav ul {
    flex-direction: column;
    align-items: flex-start;
    background: #0056a6;
    position: absolute;
    top: 64px;
    left: 0;
    width: 100%;
    display: none;  /* oculto por defecto */
    padding: 1rem;
    z-index: 1000;
  }

  nav ul li {
    margin: 0.5rem 0;
  }

  nav.active ul {
    display: flex;  /* visible cuando se activa con JS */
  }

  .menu-toggle {
    display: block;      /* ahora sí se ve en mobile */
    margin-left: auto;   /* lo manda a la derecha */
    font-size: 1.8rem;
    cursor: pointer;
    color: white;
  }


  /* ===== Formularios (Postulaciones) ===== */
.form-row {
  margin-bottom: 1rem;
}

.form-row label {
  display: block;
  font-weight: bold;
  margin-bottom: 0.35rem;
}

.form-row input[type="text"],
.form-row input[type="email"],
.form-row input[type="url"],
.form-row input[type="file"],
.form-row select,
.form-row textarea {
  width: 100%;
  box-sizing: border-box;
  padding: 0.65rem;
  border: 1px solid #cfd3da;
  border-radius: 6px;
  background: #fff;
  font-size: 1rem;
}

.form-row small {
  display: block;
  margin-top: 0.35rem;
  color: #555;
  font-size: 0.9rem;
}

.form-actions {
  margin-top: 1.25rem;
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.btn {
  display: inline-block;
  border: none;
  border-radius: 6px;
  padding: 0.7rem 1rem;
  cursor: pointer;
  font-weight: bold;
}

.btn.primary {
  background: #0056a6;
  color: #fff;
}

.btn.primary:hover {
  filter: brightness(0.95);
}

.alert {
  padding: 0.9rem 1rem;
  border-radius: 8px;
  margin: 1rem 0;
}

.alert.success {
  background: #e9f7ef;
  border: 1px solid #b7e3c4;
}

.alert.error {
  background: #fdecec;
  border: 1px solid #f3b6b6;
}

.link {
  color: #0056a6;
  font-weight: bold;
  text-decoration: none;
}

.link:hover {
  text-decoration: underline;
}

/* Grid responsive para 2 columnas en desktop, 1 en mobile */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

@media (max-width: 768px) {
  .form-grid {
    grid-template-columns: 1fr;
  }
}

/* ===== Tablas (Admin Postulaciones) ===== */
.table-wrap {
  width: 100%;
  overflow-x: auto;
}

.table {
  width: 100%;
  border-collapse: collapse;
  min-width: 700px; /* fuerza scroll horizontal en pantallas chicas */
}

.table th,
.table td {
  padding: 0.6rem;
  border-bottom: 1px solid #e3e6ee;
  vertical-align: top;
}

.table th {
  text-align: left;
  color: #0056a6;
}
  
}

.sponsors {
    background-color: #f7f7f7;
    padding: 40px 20px;
    text-align: center;
}

.sponsors h2 {
    margin-bottom: 25px;
}

.sponsors .fotos img {
    max-height: 120px;
    object-fit: contain;
    background: #fff;
    padding: 10px;
    border-radius: 6px;
}

.accesos-rapidos {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin: 30px 20px;
    flex-wrap: wrap;
}

.btn-acceso {
    padding: 14px 28px;
    background-color: #0b4ea2; /* ajustable a color EFIL */
    color: #fff;
    text-decoration: none;
    font-weight: bold;
    border-radius: 6px;
    transition: background 0.3s ease;
}

.btn-acceso:hover {
    background-color: #083b7a;
}

.aviso-importante {
  margin: 1rem auto;
  padding: 0.9rem 1rem;
  max-width: 95%;              /* un poco más estrecho que el contenedor */
  background-color: #fdeaea;   /* rojo pálido */
  border: 1px solid #e5a3a3;
  border-radius: 6px;
  color: #333;
}

.aviso-importante .titulo {
  font-weight: bold;
  color: #8b0000;              /* rojo oscuro */
}

.aviso-importante .texto-final {
  font-weight: bold;
  color: #000;                 /* negro */
}

.texto-importante {
  font-weight: bold;
  color: #8b0000;
}



/* ===== Tabla Clubes (Pro + responsive cards) ===== */

.tabla-clubes-pro {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}

.tabla-clubes-pro thead th {
  background: #0056a6;
  color: #fff;
  text-align: left;
  padding: 0.85rem;
  font-weight: bold;
  font-size: 0.95rem;
  letter-spacing: 0.2px;
}

.tabla-clubes-pro tbody td {
  padding: 0.85rem;
  border-bottom: 1px solid #e3e6ee;
  vertical-align: middle;
}

.tabla-clubes-pro tbody tr:hover {
  background: #f4f7fb;
}

/* Columna logo: ancho fijo y centrado */
.tabla-clubes-pro .col-logo {
  width: 90px;
  text-align: center;
}

.tabla-clubes-pro .logo-club {
  width: 34px;
  height: 34px;
  object-fit: contain;
  display: inline-block;
  border-radius: 8px;
  background: #fff;
  border: 1px solid #eef1f6;
  padding: 6px;
}

/* Nombre club destacado */
.tabla-scroll .nombre-club,
.tabla-clubes-pro .nombre-club {
  font-weight: bold;
  color: #222;
}

/* Botón estilo EFIL para “Ver mapa” */
.btn-mapa {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #0056a6;
  color: #fff;
  text-decoration: none;
  font-weight: bold;
  padding: 0.55rem 0.8rem;
  border-radius: 6px;
  border: none;
  white-space: nowrap;
}

.btn-mapa:hover {
  filter: brightness(0.95);
}

.icono-mapa {
  font-size: 1.1rem;
  line-height: 1;
}

/* ===== Mobile: tabla -> cards ===== */
@media (max-width: 700px) {
  .tabla-clubes-pro,
  .tabla-clubes-pro thead,
  .tabla-clubes-pro tbody,
  .tabla-clubes-pro th,
  .tabla-clubes-pro td,
  .tabla-clubes-pro tr {
    display: block;
    width: 100%;
  }

  .tabla-clubes-pro thead {
    display: none; /* ocultamos encabezado en mobile */
  }

  .tabla-clubes-pro tbody tr {
    background: #fff;
    border: 1px solid #e3e6ee;
    border-radius: 10px;
    margin-bottom: 12px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
    overflow: hidden;
  }

  .tabla-clubes-pro tbody td {
    border-bottom: 1px solid #eef1f6;
    padding: 0.75rem;
  }

  .tabla-clubes-pro tbody td:last-child {
    border-bottom: none;
  }

  /* Logo arriba, centrado */
  .tabla-clubes-pro .col-logo {
    width: auto;
    text-align: center;
    padding-top: 1rem;
    padding-bottom: 0.5rem;
  }

  /* Etiquetas por celda */
  .tabla-clubes-pro td[data-label]::before {
    content: attr(data-label);
    display: block;
    font-size: 0.82rem;
    font-weight: bold;
    color: #0056a6;
    margin-bottom: 0.25rem;
  }
}




/* ===== Tabla Clubes con scroll y header fijo ===== */

.tabla-scroll {
  width: 100%;
  border-collapse: collapse;
}

.tabla-scroll thead {
  background: #0056a6;
  color: #fff;
}

.tabla-scroll thead th {
  padding: 0.85rem;
  text-align: left;
  font-weight: bold;
}

.tabla-scroll tbody {
  display: block;
  max-height: 320px; /* aprox 4 filas */
  overflow-y: auto;
}

.tabla-scroll thead,
.tabla-scroll tbody tr {
  display: table;
  width: 100%;
  table-layout: fixed;
}

.tabla-scroll tbody td {
  padding: 0.75rem;
  border-bottom: 1px solid #e3e6ee;
  vertical-align: middle;
}

.tabla-scroll tbody tr:hover {
  background: #f4f7fb;
}

/* Mantener proporción columnas */

.tabla-scroll .col-num {
  width: 45px;
  min-width: 45px;
  max-width: 45px;
  text-align: center;
  font-weight: bold;
}

.tabla-scroll .col-logo {
  width: 80px;
  min-width: 80px;
  text-align: center;
}

.tabla-scroll .logo-club {
  width: 38px;
  height: 38px;
  object-fit: contain;
}

/* Scroll estilizado (opcional, desktop) */
.tabla-scroll tbody::-webkit-scrollbar {
  width: 8px;
}

.tabla-scroll tbody::-webkit-scrollbar-thumb {
  background: #cfd6e4;
  border-radius: 4px;
}

/* Columna numeración */


.preinscripcion-page {
    max-width: 980px;
    margin: 0 auto;
    padding: 30px 20px;
}

.bloque-seccion h1 {
    margin-bottom: 20px;
}

.texto-intro {
    background: #f8f8f8;
    border-left: 4px solid #999;
    padding: 15px;
    margin-bottom: 30px;
    line-height: 1.6;
}

.seccion-formulario {
    margin-bottom: 30px;
    background: #fff;
    border: 1px solid #222;
}

.seccion-formulario h2 {
    margin: 0;
    padding: 14px 16px;
    font-size: 1.15rem;
    border-bottom: 1px solid #222;
    background: #f3f3f3;
}

.tabla-formulario {
    display: flex;
    flex-direction: column;
}

.fila-formulario {
    display: grid;
    grid-template-columns: 38% 62%;
    border-bottom: 1px solid #222;
    min-height: 58px;
}

.fila-formulario:last-child {
    border-bottom: none;
}

.etiqueta-campo {
    display: flex;
    align-items: center;      /* centra verticalmente */
    padding: 10px 14px;
    border-right: 1px solid #222;
    font-weight: 600;
    line-height: 1.35;
    background: #fafafa;
    box-sizing: border-box;
}

.respuesta-campo {
    display: flex;
    align-items: center;      /* centra verticalmente el input */
    padding: 8px 12px;
    box-sizing: border-box;
}

.respuesta-campo input,
.respuesta-campo textarea,
.respuesta-campo select {
    width: 100%;
    padding: 10px 12px;
    font-size: 1rem;
    border: 1px solid #b8b8b8;
    border-radius: 4px;
    box-sizing: border-box;
    font-family: inherit;
}

.respuesta-campo textarea {
    resize: vertical;
    min-height: 90px;
}

.fila-formulario.fila-alta {
    min-height: 110px;
}

.fila-formulario.fila-media {
    min-height: 84px;
}

.obligatorio {
    color: #b00000;
    font-weight: 700;
    margin-left: 4px;
}

.referencia-obligatorios {
    margin: 0 0 18px 0;
    font-size: 0.95rem;
}

.acciones-formulario {
    margin-top: 20px;
    text-align: center;
}

.btn-enviar {
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 700;
    background: #0b4ea2;
    color: #fff;
}

.btn-enviar:hover {
    background: #083b7a;
}

.mensaje-exito {
    background: #e8f7e8;
    color: #1d6b1d;
    border: 1px solid #b7dfb7;
    padding: 12px;
    border-radius: 6px;
    margin-bottom: 20px;
}

.mensaje-error {
    background: #fdeaea;
    color: #9b1c1c;
    border: 1px solid #efb4b4;
    padding: 12px;
    border-radius: 6px;
    margin-bottom: 20px;
}

@media (max-width: 768px) {
    .preinscripcion-page {
        padding: 20px 12px;
    }

    .fila-formulario {
        grid-template-columns: 1fr;
    }

    .etiqueta-campo {
        border-right: none;
        border-bottom: 1px solid #222;
    }

    .fila-formulario.fila-alta,
    .fila-formulario.fila-media,
    .fila-formulario {
        min-height: auto;
    }

    .respuesta-campo {
        align-items: stretch;
    }
}

.nota-seccion {
    font-size: 0.95rem;
    font-weight: normal;
}

.fila-campos {
    display: flex;
    gap: 20px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.dos-columnas .campo {
    flex: 1 1 300px;
}

.campo {
    flex: 1 1 100%;
}

.campo label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
}

.campo input,
.campo textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #bbb;
    border-radius: 6px;
    font-size: 1rem;
    box-sizing: border-box;
}

.campo textarea {
    resize: vertical;
}

.acciones-formulario {
    margin-top: 20px;
}

.btn-enviar {
    padding: 12px 22px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1rem;
}

.mensaje-exito {
    background: #e8f7e8;
    color: #1d6b1d;
    border: 1px solid #b7dfb7;
    padding: 12px;
    border-radius: 6px;
    margin-bottom: 20px;
}

.mensaje-error {
    background: #fdeaea;
    color: #9b1c1c;
    border: 1px solid #efb4b4;
    padding: 12px;
    border-radius: 6px;
    margin-bottom: 20px;
}

@media (max-width: 768px) {
    .preinscripcion-page {
        padding: 20px 15px;
    }

    .seccion-formulario {
        padding: 15px;
    }
}