@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;600&display=swap');

:root {
  --azul: #007bff;
  --azul-oscuro: #0056b3;
  --gris-claro: #f5f7fa;
  --texto: #333;
  --borde: #ddd;
}

body {
  font-family: 'Poppins', sans-serif;
  background: var(--gris-claro);
  margin: 0;
  color: var(--texto);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ---------- CABECERA ---------- */
.topbar {
  background: var(--azul);
  color: white;
  padding: 10px 0;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
	
}
/*
@media(max-width :766px){
.topbar{
	position: fixed !important; 
	top: 0; 
	z-index: 99;
	margin-bottom:50px;
	}
}
*/
.container-header {
  width: 90%;
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-weight: 600;
  font-size: 1.4rem;
  margin: 0;
}

nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 15px;
}

nav a {
  color: white;
  text-decoration: none;
  font-weight: 500;
  transition: opacity 0.2s;
}

nav a:hover {
  opacity: 0.8;
}

/* ---------- MAIN ---------- */
main {
  flex: 1;
  width: 90%;
  max-width: 600px;
  margin: 40px auto;
}

/* ---------- FORMULARIOS ---------- */
.form-container {
  background: white;
  border-radius: 15px;
  padding: 30px;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.1);
  text-align: center;
}

.form-container h2 {
  margin-bottom: 20px;
  color: var(--azul);
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="tel"] {
  width: 100%;
  padding: 10px;
  margin: 8px 0;
  border: 1px solid var(--borde);
  border-radius: 8px;
  font-size: 15px;
  box-sizing: border-box;
}

button {
  background: var(--azul);
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 16px;
  cursor: pointer;
  margin-top: 10px;
  transition: background 0.2s;
}

button:hover {
  background: var(--azul-oscuro);
}

p a {
  color: var(--azul);
  text-decoration: none;
}

p a:hover {
  text-decoration: underline;
}

.error {
  color: red;
  margin: 10px 0;
}

/* ---------- PERFIL ---------- */
.perfil {
  background: white;
  border-radius: 15px;
  padding: 30px;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.1);
}

.perfil p {
  margin: 8px 0;
  font-size: 15px;
}

.perfil h2 {
  color: var(--azul);
  margin-bottom: 15px;
}

/* ---------- BOTONES ---------- */
.btn {
  display: inline-block;
  background: var(--azul);
  color: white;
  padding: 10px 20px;
  border-radius: 8px;
  text-decoration: none;
  transition: background 0.2s;
}

.btn:hover {
  background: var(--azul-oscuro);
}

/* ---------- FOOTER ---------- */
footer {
  text-align: center;
  padding: 15px;
  font-size: 14px;
  color: #666;
  background: #fafafa;
  border-top: 1px solid var(--borde);
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 600px) {
  nav ul {
    flex-direction: column;
    align-items: center;
    gap: 8px;
  }

  .container-header {
    flex-direction: column;
  }
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 20px;
  font-size: 14px;
}

.admin-table th {
  background: var(--azul);
  color: white;
  padding: 10px;
}

.admin-table td {
  background: #fff;
  padding: 8px;
  border-bottom: 1px solid var(--borde);
  text-align: center;
}

.admin-form input,
.admin-form select,
.admin-form textarea {
  width: 100%;
  margin-bottom: 8px;
  padding: 8px;
  border: 1px solid var(--borde);
  border-radius: 8px;
}

textarea {
  resize: vertical;
  min-height: 60px;
}

.btn-danger {
  background: #dc3545;
}

.btn-danger:hover {
  background: #b52a38;
}

/* ---------- PANEL ADMIN ---------- */
.admin-panel {
  max-width: 600px;
}

.admin-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 15px;
  margin-top: 25px;
}

.btn-large {
  font-size: 1rem;
  padding: 12px 25px;
}

.admin-page {
  max-width: 800px;
}

.admin-form {
  background: #f9f9f9;
  padding: 20px;
  border-radius: 12px;
  margin-bottom: 20px;
  text-align: left;
}

.admin-form h3 {
  margin-top: 0;
  color: var(--azul);
  margin-bottom: 10px;
}

.admin-form input,
.admin-form select,
.admin-form textarea {
  width: 100%;
  margin-bottom: 10px;
  padding: 10px;
  border: 1px solid var(--borde);
  border-radius: 8px;
  box-sizing: border-box;
}

textarea {
  resize: vertical;
  min-height: 60px;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 10px;
  font-size: 14px;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.admin-table th {
  background: var(--azul);
  color: white;
  padding: 10px;
}

.admin-table td {
  background: #fff;
  padding: 8px;
  border-bottom: 1px solid var(--borde);
  text-align: center;
}

.table-container {
  overflow-x: auto;
}

.btn-danger {
  background: #dc3545;
}

.btn-danger:hover {
  background: #b52a38;
}

@media (max-width: 600px) {
  .admin-buttons {
    flex-direction: column;
  }

  .admin-form,
  .form-container {
    padding: 20px;
  }
}

/* ===============================
   PÁGINA PÚBLICA INDEX
   =============================== */
.public-home {
  font-family: 'Poppins', sans-serif;
  color: #333;
}

.hero {
  background-image: url("/img/hero.jpg");
  color: white;
  text-align: center;
  margin-top: -40px;
}

/* ===== HERO A ANCHO COMPLETO ===== */
.hero {
  width: 100vw;
  /* Ocupar todo el ancho visible */
  margin-left: calc(50% - 50vw);
  /* Compensa cualquier contenedor centrado */
  margin-right: calc(50% - 50vw);
  position: relative;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

/* Contenido centrado dentro del hero */
.hero-content {
  margin: 0 auto;
  padding: 80px 0px;
  background-color: rgba(0,0,0,0.5);
  width: 100vw;
  /* Ocupar todo el ancho visible */
  margin-left: calc(50% - 50vw);
  /* Compensa cualquier contenedor centrado */
  margin-right: calc(50% - 50vw);
  position: relative;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.hero h1 {
  font-size: 2.5rem;
  margin-bottom: 10px;
}

.hero p {
  font-size: 1.1rem;
  opacity: 0.9;
}

.hero-buttons {
  margin-top: 20px;
  display: flex;
  gap: 15px;
 flex-direction: row;
 justify-content: center;
 flex-wrap: wrap;
}

.search-section {
  text-align: center;
  padding: 40px 20px 20px;
}

.club-search {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 15px;
  flex-wrap: wrap;
}

.club-search input {
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid #ccc;
  width: 300px;
  font-size: 15px;
}

.club-search .btn {
  background: #0078d7;
  color: white;
  border: none;
  border-radius: 8px;
  padding: 10px 15px;
  cursor: pointer;
  transition: background 0.2s;
}

.club-search .btn:hover {
  background: #0099e5;
}

.regatas-section {
  padding: 40px 20px;
}

.regatas-section h2 {
  text-align: center;
  color: #0078d7;
  margin-bottom: 25px;
}

.regatas-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 20px;
}

.regata-card {
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.15);
  transition: transform 0.2s;
}

.regata-card:hover {
  transform: translateY(-4px);
}

.regata-img {
  width: 100%;
  height: 150px;
  background-size: cover;
  background-position: center;
}

.regata-info {
  padding: 15px;
  text-align: center;
}

.regata-info h3 {
  font-size: 1.1rem;
  margin-bottom: 6px;
  color: #222;
}

.regata-fechas {
  color: #777;
  font-size: 0.9rem;
  margin-bottom: 10px;
}

.btn-small {
  background: #0078d7;
  color: white;
  border-radius: 6px;
  padding: 6px 12px;
  text-decoration: none;
  font-size: 0.85rem;
  transition: background 0.2s;
}

.btn-small:hover {
  background: #0099e5;
}

.empty {
  text-align: center;
  color: #999;
  font-style: italic;
}

@media (max-width: 600px) {
  .hero h1 {
    font-size: 2rem;
  }

  .club-search input {
    width: 100%;
  }
}

/* ===============================
   PÁGINA DETALLE REGATA
   =============================== */
.regata-page {
  font-family: 'Poppins', sans-serif;
  color: #333;
}

.regata-header {
  text-align: center;
  position: relative;
  color: white;
}

.regata-hero {
  width: 100%;
  height: 300px;
  background-size: cover;
  background-position: center;
}

.regata-header-content {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.regata-header-content h1 {
  font-size: 2.2rem;
  margin-bottom: 10px;
}

.regata-header-content .regata-dates {
  font-size: 1rem;
  opacity: 0.9;
}

.regata-body {
  max-width: 900px;
  margin: 40px auto;
  padding: 0 20px;
}

.regata-desc h2,
.regata-clases h2 {
  color: #0078d7;
  margin-bottom: 10px;
}

.regata-desc p {
  line-height: 1.6;
  color: #444;
}

.regata-clases {
  margin-top: 40px;
}

.clases-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  justify-content: flex-start;
}

.clase-card {
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
  padding: 10px 15px;
  text-align: center;
  width: 120px;
}

.clase-card img {
  max-width: 80px;
  max-height: 80px;
  margin-bottom: 5px;
}

.regata-nav {
  margin-top: 50px;
  text-align: center;
}

.btn-secondary {
  background: #555;
  color: white;
  border: none;
  border-radius: 8px;
  padding: 10px 18px;
  text-decoration: none;
}

.btn-secondary:hover {
  background: #333;
}

@media (max-width: 700px) {
  .regata-hero {
    height: 200px;
  }

  .regata-header-content h1 {
    font-size: 1.6rem;
  }

  .clases-grid {
    justify-content: center;
  }
}

.form-container select {
  width: 100%;
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 8px;
  font-size: 15px;
  margin-top: 5px;
  margin-bottom: 10px;
  font-family: 'Poppins', sans-serif;
}

.form-container input[type="date"],
.form-container select {
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 8px;
  font-size: 15px;
  margin-top: 5px;
  margin-bottom: 10px;
  font-family: 'Poppins', sans-serif;
}

.form-container .alert-error {
  background: #ffdddd;
  border: 1px solid #e66;
  color: #900;
  padding: 10px 12px;
  border-radius: 6px;
  margin-bottom: 15px;
  font-size: 0.95rem;
}

/* PÁGINA VER REGATA */
.regata-hero {
  position: relative;
  height: 350px;
  background-size: cover;
  background-position: center;
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  margin-top: -40px;
}

.regata-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  color: white;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
}

.regata-overlay h1 {
  font-size: 2.2rem;
  margin-bottom: 10px;
}

.regata-content {
  max-width: 1000px;
  margin: 40px auto;
  padding: 0 20px;
  font-family: 'Poppins', sans-serif;
}

.regata-desc h2,
.resultados-clase h2 {
  color: #0078d7;
  margin-bottom: 10px;
}

.clases-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  margin-bottom: 30px;
}

.clase-card {
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
  padding: 10px 15px;
  text-align: center;
  width: 120px;
}

.clase-card img {
  max-width: 80px;
  max-height: 80px;
  margin-bottom: 5px;
}

.tabla-resultados {
  width: 100%;
  border-collapse: collapse;
  margin-top: 15px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  border-radius: 8px;
  overflow: hidden;
}

.tabla-resultados thead {
  background: #0078d7;
  color: white;
}

.tabla-resultados th,
.tabla-resultados td {
  padding: 10px;
  text-align: left;
  border-bottom: 1px solid #eee;
}

.tabla-resultados tbody tr:hover {
  background: #f8f8f8;
}

.empty {
  color: #999;
  font-style: italic;
  margin: 10px 0 20px;
}

.regata-nav {
  text-align: center;
  margin-top: 40px;
}

@media (max-width: 700px) {
  .regata-hero {
    height: 220px;
  }

  .tabla-resultados th,
  .tabla-resultados td {
    font-size: 13px;
  }

  .clases-grid {
    justify-content: center;
  }
}

/* BOTONES DE ACCIÓN DE REGATA */
.regata-buttons {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
  background: #f5f7fa;
  padding: 20px 10px;
  border-bottom: 1px solid #ddd;
}

.btn-regata {
  background: #0078d7;
  color: white;
  padding: 12px 20px;
  border-radius: 8px;
  text-decoration: none;
  font-family: 'Poppins', sans-serif;
  font-weight: 500;
}

.btn-regata:hover {
  background: #005fa3;
}

.btn-regata i {
  margin-right: 6px;
}

@media (max-width: 600px) {
  .btn-regata {
    width: 90%;
    text-align: center;
  }
}

.alert-ok {
  background: #ccffcc;
  color: #060;
  padding: 10px;
  border-radius: 6px;
  margin-bottom: 15px;
}

.toa-list {
  list-style: none;
  padding: 0;
}

.toa-list li {
  margin-bottom: 10px;
  background: #f8f8f8;
  padding: 10px 15px;
  border-radius: 8px;
}

.toa-list li i {
  color: #0078d7;
  margin-right: 8px;
}

.tripulantes-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.tripulantes-list li {
  margin: 2px 0;
  font-size: 0.9rem;
}

.tabla-resultados td img {
  border-radius: 2px;
  box-shadow: 0 0 2px rgba(0, 0, 0, 0.3);
}

/* ===== Estilo general del contenedor ===== */
.form-container {
  max-width: 1300px;
  /* más ancho en escritorio */
  margin: 40px auto;
  padding: 20px;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  overflow-x: hidden;
}

/* ===== Ajuste visual de títulos ===== */
.form-container h2,
.form-container h3 {
  text-align: left;
  color: #0078d7;
  margin-bottom: 15px;
}

/* ===== TABLAS DE INSCRITOS ===== */
.tabla-resultados {
  width: 100%;
  border-collapse: collapse;
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 30px;
}

.tabla-resultados thead {
  background: #0078d7;
  color: white;
}

.tabla-resultados th,
.tabla-resultados td {
  padding: 12px 10px;
  text-align: left;
  border-bottom: 1px solid #eee;
  white-space: nowrap;
  /* evita cortes feos en móvil */
}

.tabla-resultados tbody tr:hover {
  background: #f9f9f9;
}

/* ===== CONTENEDOR SCROLL EN MÓVIL ===== */
.table-wrapper {
  width: 100%;
  overflow-x: auto;
  /* activa scroll horizontal */
  -webkit-overflow-scrolling: touch;
  /* suaviza desplazamiento */
}

.table-wrapper::-webkit-scrollbar {
  height: 8px;
}

.table-wrapper::-webkit-scrollbar-thumb {
  background: #ccc;
  border-radius: 4px;
}

/* ===== Ajustes responsive ===== */
@media (max-width: 800px) {
  .form-container {
    padding: 10px;
    box-shadow: none;
    border-radius: 0;
  }

  .tabla-resultados {
    font-size: 14px;
  }
}

/* ==== CONTENEDOR GENERAL ==== */
.inscritos-container {
  max-width: 1500px;
  /* mucho más ancho */
  margin: 40px auto;
  padding: 20px;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

/* ==== MENÚ DE CLASES ==== */
.clases-menu {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 15px;
  margin: 25px 0;
}

.clase-btn {
  background: #f2f4f8;
  border: 2px solid transparent;
  border-radius: 10px;
  padding: 10px 15px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: 'Poppins', sans-serif;
  font-weight: 500;
  color: #333;
  cursor: pointer;
  transition: all 0.2s;
}

.clase-btn img {
  width: 40px;
  height: 40px;
  object-fit: contain;
}

.clase-btn.active {
  background: #0078d7;
  color: white;
  border-color: #005fa3;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.clase-btn:hover:not(.active) {
  background: #e8ecf2;
}

/* ==== TABLAS ==== */
.tabla-clase.hidden {
  display: none;
}

.tabla-clase.visible {
  display: block;
}

.table-wrapper {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.table-wrapper::-webkit-scrollbar {
  height: 8px;
}

.table-wrapper::-webkit-scrollbar-thumb {
  background: #ccc;
  border-radius: 4px;
}

.tabla-resultados {
  width: 100%;
  border-collapse: collapse;
  min-width: 800px;
}

.tabla-resultados th {
  background: #0078d7;
  color: #fff;
  padding: 10px;
  text-align: left;
}

.tabla-resultados td {
  padding: 10px;
  border-bottom: 1px solid #eee;
  white-space: nowrap;
}

.tripulantes-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.tripulantes-list li {
  font-size: 0.9rem;
  margin: 2px 0;
}

@media (max-width: 768px) {
  .inscritos-container {
    margin: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .clase-btn span {
    display: none;
  }

  .clase-btn img {
    width: 32px;
    height: 32px;
  }
}

/* ==== CONTENEDOR ANCHO ==== */
.inscritos-container {
  max-width: 1600px;
  margin: 40px auto;
  padding: 20px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

/* ==== MENÚ DE CLASES ==== */
.clases-menu {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 15px;
  margin: 25px 0;
}

.clase-btn {
  background: #f2f4f8;
  border: 2px solid transparent;
  border-radius: 10px;
  padding: 10px 15px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: 'Poppins', sans-serif;
  font-weight: 500;
  color: #333;
  cursor: pointer;
  transition: all 0.2s;
}

.clase-btn img {
  width: 40px;
  height: 40px;
  object-fit: contain;
}

.clase-btn.active {
  background: #0078d7;
  color: white;
  border-color: #005fa3;
}

.clase-btn:hover:not(.active) {
  background: #e8ecf2;
}

/* ==== TABLA ==== */
.table-wrapper {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.table-wrapper::-webkit-scrollbar {
  height: 8px;
}

.table-wrapper::-webkit-scrollbar-thumb {
  background: #bbb;
  border-radius: 4px;
}

.tabla-resultados {
  width: 100%;
  border-collapse: collapse;
  min-width: 900px;
  margin-top: 10px;
}

.tabla-resultados th {
  background: #0078d7;
  color: white;
  padding: 10px;
  text-align: left;
}

.tabla-resultados td {
  padding: 10px;
  border-bottom: 1px solid #eee;
  white-space: nowrap;
}

.tripulantes-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.tripulantes-list li {
  font-size: 0.9rem;
  margin: 2px 0;
}

/* ==== RESPONSIVE ==== */
@media (max-width: 768px) {
  .inscritos-container {
    margin: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .clase-btn span {
    display: none;
  }

  .clase-btn img {
    width: 32px;
    height: 32px;
  }
}

/* ==== AJUSTE FINAL ANCHO GLOBAL ==== */
main,
.form-container,
.inscritos-container,
.regata-content,
.admin-page {
  max-width: 1600px !important;
  /* fuerza ancho amplio en escritorio */
  width: 95% !important;
  margin: 40px auto !important;
}

@media (min-width: 1700px) {

  main,
  .form-container,
  .inscritos-container,
  .regata-content {
    max-width: 1200px !important;
  }
}

/* mejora la experiencia visual en pantallas grandes */
body {
  background-color: #f4f7fb;
}

/* ==== FORMULARIO DE INSCRIPCIÓN (solo en inscripcion.php) ==== */
body.inscripcion-page .form-container {
  max-width: 800px !important;
  /* ancho cómodo de formulario */
  width: 90%;
  margin: 40px auto;
  background: #fff;
  padding: 30px 40px;
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

/* Alineación y estilo de labels */
body.inscripcion-page label {
  display: block;
  text-align: left;
  font-weight: 600;
  color: #333;
  margin: 8px 0 4px;
  font-family: 'Poppins', sans-serif;
}

/* Inputs y selects uniformes */
body.inscripcion-page input[type="text"],
body.inscripcion-page input[type="number"],
body.inscripcion-page input[type="date"],
body.inscripcion-page select {
  width: 100%;
  padding: 8px 10px;
  border-radius: 6px;
  border: 1px solid #ccc;
  font-size: 15px;
  font-family: 'Poppins', sans-serif;
}

/* Títulos y separadores */
body.inscripcion-page h2,
body.inscripcion-page h3 {
  text-align: left;
  color: #0078d7;
  margin-bottom: 10px;
}

body.inscripcion-page hr {
  border: none;
  border-top: 1px solid #ddd;
  margin: 25px 0;
}

/* Botones de acción */
body.inscripcion-page .btn {
  display: inline-block;
  padding: 10px 18px;
  border-radius: 8px;
  background: #0078d7;
  color: #fff;
  text-decoration: none;
  transition: background 0.2s, transform 0.1s;
}

body.inscripcion-page .btn:hover {
  background: #005fa3;
  transform: translateY(-1px);
}

body.inscripcion-page .btn-secondary {
  background: #ccc;
  color: #222;
}

body.inscripcion-page .btn-secondary:hover {
  background: #bbb;
}

/* Tripulantes */
body.inscripcion-page .tripulante {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 10px;
}

body.inscripcion-page .tripulante input {
  flex: 1;
  min-width: 120px;
}

body.inscripcion-page .btn-remove {
  background: #e66;
  color: white;
  border: none;
  border-radius: 6px;
  padding: 4px 8px;
  cursor: pointer;
  font-size: 14px;
}

body.inscripcion-page .btn-remove:hover {
  background: #c44;
}

@media (max-width: 700px) {
  body.inscripcion-page .form-container {
    padding: 20px;
  }
}

/* === BUSCADOR DE CLUBES (AJUSTE) === */
.club-search {
  position: relative;
  max-width: 420px;
  margin: 0 auto;
}

.search-wrapper {
  display: flex;
  gap: 8px;
  align-items: center;
}

#club-input {
  flex: 1;
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 8px;
}

#club-suggestions {
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  background: #fff;
  border: 1px solid #ccc;
  border-radius: 0 0 8px 8px;
  max-height: 200px;
  overflow-y: auto;
  z-index: 10;
  display: none;
}

.suggestion-item {
  padding: 8px 10px;
  cursor: pointer;
}

.suggestion-item:hover {
  background: var(--azul, #0077cc);
  color: white;
}

.club-logo {
  max-height: 100px;
  border-radius: 10px;
  background: #fff;
  padding: 6px;
  margin-bottom: 10px;
}

/* === CABECERA GENERAL === */
.topbar {
  background: #0077cc;
  color: white;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.15);
}

.container-header {
  display: flex;
  justify-content: space-between;
  align-content: flex-end;
  flex-wrap: nowrap;
  flex-direction: row;
  align-items: center;
  padding: 12px 20px;
  max-width: 1200px;
  margin: 0 auto;
}

.logo {
  color: white;
  font-size: 1.5rem;
  font-weight: 600;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 8px;
}

nav ul {
  list-style: none;
  display: flex;
  gap: 18px;
  margin: 0;
  padding: 0;
}

nav a {
  color: white;
  text-decoration: none;
  font-weight: 500;
  transition: 0.2s;
}

nav a:hover {
  text-decoration: underline;
}

/* === BOTÓN HAMBURGUESA === */
.menu-toggle {
  background: none;
  border: none;
  color: white;
  font-size: 1.6rem;
  cursor: pointer;
  display: none;
}

.menu-toggle.active i {
  transform: rotate(90deg);
  transition: 0.3s;
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
  nav ul {
    flex-direction: column;
    background: #0077cc;
    position: absolute;
    top: 20px;
    left: 0;
    right: 0;
    padding: 15px 0;
    display: none;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
  }

  nav.open ul {
    display: flex;
  }

  .menu-toggle {
    display: block;
  }
}

/* ===== Corrección responsive general ===== */

/* Evita desbordes horizontales */
html,
body {
  max-width: 100%;
  overflow-x: hidden;
}

/* Ajustar imágenes y sliders */
img,
video {
  max-width: 100%;
  height: auto;
}

/* Sliders horizontales controlados */
.toa-slider {
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.toa-slider img {
  flex: 0 0 auto;
  height: 140px;
  max-width: 90%;
}

/* Tablas en móviles */
@media (max-width: 768px) {
  .table-wrapper {
    width: 100%;
    overflow-x: auto;
  }

  table {
    width: 100%;
    border-collapse: collapse;
  }

  td,
  th {
    word-break: break-word;
  }

  /* Asegurar que ningún contenedor tenga margen negativo */
  .regata-content,
  .regata-desc,
  .toa-item {
    box-sizing: border-box;
    width: 100%;
    margin-left: auto;
    margin-right: auto;
    padding-left: 10px;
    padding-right: 10px;
  }
}

.btn-contacto {
  background: #D16900;
}

.regata-content .btn,
.club-search .btn {
  margin-top: 0px;
}

.page-container {
  width:80% !important;
  max-width: 1500px;
  /* más ancho en escritorio */
  margin: 20px auto;
  padding: 20px;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  overflow-x: hidden;
}

/*Footer*/
/* ---------- FOOTER ---------- */
.site-footer {
  margin-top: 40px;
  font-size: 15px;
  background:#0077cc;
  color:#fff;
}

.footer-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
  max-width: 1100px;
  margin: 0 auto;
  padding: 30px 20px;
}

.footer-logo .logo-img {
  height: 80px;
  width: auto;
}

.footer-nav {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  justify-content: center;
}
.footer-nav a {
  text-decoration: none;
  transition: color 0.3s;
  color:#fff;
}
.footer-nav a:hover {
}

.footer-info {
  text-align: right;
  font-size: 14px;
  line-height: 1.6;
}
.footer-info i {
  margin-right: 6px;
}

/* Línea inferior */
.footer-bottom {
  text-align: center;
  padding: 12px;
  font-size: 13px;
  color:#fff;
}
.footer-bottom a {
  text-decoration: none;
  color:#fff;
}
.footer-bottom a:hover {
  text-decoration: underline;
}

/* Versión móvil */
@media (max-width: 768px) {
  .footer-container {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  .footer-info {
    text-align: center;
  }
}