/* Reset de estilos */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Estilo para el cuerpo */
body {
  font-family: 'Roboto', sans-serif;
  background-color: #f4f4f4;
  color: #333;
  line-height: 1.6;
}

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

/* Encabezado */
header {
  background-color: #b02f2f;
  color: #fff;
  padding: 20px 0;
  text-align: center;
  border-bottom: 3px solid #8c1f1f;
}

header .container {
  display: flex;
  align-items: center;
  justify-content: center;
}

header img {
  height: 80px;
  margin-right: 20px;
}

header h1 {
  font-size: 24px;
  font-weight: 700;
}

/* Menú de navegación */
.menu {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  background-color: #fff;
}

/* Los li que tienen submenús necesitan position: relative */
.menu > li {
  position: relative;
}

.menu > li > a {
  display: block;
  padding: 10px 20px;
  color: #333;
  text-decoration: none;
  font-weight: bold;
}

.menu > li > a:hover {
  background-color: #f2d5d5;
  border-radius: 5px;
}

/* Submenú oculto inicialmente */
.submenu .dropdown {
  display: none; /* Oculta el submenú por defecto */
  position: absolute;
  top: 100%;
  left: 0;
  background-color: #fff;
  list-style: none;
  padding: 0;
  margin: 0;
  min-width: 200px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  z-index: 999; /* Para que el submenú quede encima de otros elementos */
}

/* Submenú visible al pasar el cursor */
/* Importante usar > para seleccionar el ul.dropdown hijo directo */
.submenu:hover > .dropdown {
  display: block;
}

/* Estilo de los enlaces dentro del submenú */
.submenu .dropdown li a {
  padding: 10px 15px;
  color: #333;
  text-decoration: none;
  display: block;
  width: 100%;
}

.submenu .dropdown li a:hover {
  background-color: #f2d5d5;
  border-radius: 5px;
}

/* Ajustes para móviles */
@media (max-width: 768px) {
  .menu {
    flex-direction: column;
  }

  .menu > li {
    width: 100%;
  }

  .submenu .dropdown {
    position: static;
    box-shadow: none;
  }
}

/* Contenido principal */
main {
  max-width: 1200px;
  margin: 40px auto;
  padding: 20px;
  background-color: #fff;
  border-radius: 10px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

main section {
  text-align: left; 
  display: flex;
  flex-direction: column;
  align-items: center;
}

main h2, main h3, main h4 {
  color: #b02f2f;
  text-align: center;
  width: 100%;
}

main h2 {
  font-size: 28px;
  margin-bottom: 20px;
  margin-top: 20px;
}

main h3 {
  font-size: 20px;
  margin-bottom: 20px;
  margin-top: 40px;
}

main h4 {
  font-size: 18px;
  margin-bottom: 20px;
  margin-top: 40px;
}

main h5 {
  font-size: 18px;
  margin-bottom: 20px;
  margin-top: 40px;
  color: #b02f2f;
}

main h6 {
  font-size: 16px;
  margin-top: 5px;
  margin-bottom: 20px;
  text-align: justify;
  color: #333;
  width: 100%;
}

main p {
  font-size: 18px;
  margin-top: 5px;
  margin-bottom: 20px;
  text-align: justify;
  color: #333;
  width: 100%;
}

main a {
  color: #b02f2f;
  text-decoration: none;
  font-weight: bold;
}

main a:hover {
  text-decoration: underline;
}

/* Estilo formulario */
form {
  background-color: #ffffff;
  padding: 20px;
  border: 1px solid #ccc;
  border-radius: 10px;
  width: 100%;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

form h2, form h3, form h4 {
  text-align: left;
}

form label {
  display: block;
  font-weight: bold;
  margin-bottom: 10px;
  color: #000000;
}

form input,
form select,
form textarea {
  width: 100%;
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 5px;
  font-size: 16px;
  margin-bottom: 20px;
}

form button[type="submit"] {
  background-color: #b02f2f;
  color: white;
  font-size: 16px;
  font-weight: bold;
  padding: 10px 15px;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  width: 100%;
  align-self: center;
  transition: background-color 0.3s ease;
  margin-top: 10px;
}

form button[type="submit"]:hover {
  background-color: #930000;
}

/* Tabla de socios */
.table-container {
  width: 100%;
  margin-top: 20px;
    overflow-x: auto;
  padding-bottom: 1rem;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 20px;
}

table th, table td {
  text-align: left;
  padding: 10px;
  border-bottom: 1px solid #ccc;
  font-size: 14px;
}

table th {
  background-color: #b02f2f;
  color: #fff;
}

.editar {
  background-color: #b02f2f;
  color: #fff;
  padding: 5px 10px;
  border-radius: 5px;
  text-decoration: none;
  font-weight: bold;
  font-size: 14px;
}

.editar:hover {
  background-color: #930000;
}

/* Formulario de filtrado */
.filter-form {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 20px;
  gap: 10px;
}

.filter-form label {
  margin-bottom: 0;
}

.filter-form select,
.filter-form input[type="text"] {
  width: auto;
  flex: 1;
  max-width: 200px;
}

.filter-form input[type="submit"] {
  width: auto;
  background-color: #b02f2f;
  color: #fff;
  padding: 10px 15px;
  border-radius: 5px;
  border: none;
  font-weight: bold;
  cursor: pointer;
}

.filter-form input[type="submit"]:hover {
  background-color: #930000;
}

/* Mensajes y contenedor de resultado */
.message-container {
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 10px;
  padding: 20px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  max-width: 600px;
  margin: 40px auto;
  text-align: left;
}

/* Botón de regresar */
.btn-back {
  display: inline-block;
  margin-top: 20px;
  padding: 10px 20px;
  background-color: #b02f2f;
  color: #fff;
  border: none;
  border-radius: 5px;
  font-weight: bold;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.btn-back:hover {
  background-color: #930000;
}

.totales {
  margin-top: 20px;
  font-size: 16px;
  font-weight: bold;
  text-align: right;
  color: #b02f2f;
}


.table-containerv form {
  display: inline;
}

.table-containerv form button {
  padding: 6px 12px !important;
  font-size: 13px !important;
  width: auto !important;
  background-color: #b02f2f;
  color: white;
  border: none;
  border-radius: 5px;
  cursor: pointer;
}

.table-containerv form button:hover {
  background-color: #930000;
}

.acciones-socio {
  display: flex;
  gap: 5px;
}

.acciones-socio form,
.acciones-socio a {
  margin: 0;
  padding: 0;
}

.acciones-socio form {
  display: flex;
}

.borrar,
.editar {
  background-color: #b02f2f;
  color: #fff;
  padding: 5px 10px;
  border-radius: 5px;
  text-decoration: none;
  font-weight: bold;
  font-size: 14px;
  border: none;
  cursor: pointer;
  display: inline-block;
  white-space: nowrap;
}

.borrar:hover,
.editar:hover {
  background-color: #930000;
}

.acciones-socio {
  display: flex;
  gap: 10px;
  justify-content: center;
  align-items: center;
}

.acciones-socio a.editar,
.acciones-socio form .borrar {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-width: 100px;
  height: 40px;
  padding: 8px 12px;
  font-size: 14px;
  font-weight: bold;
  text-decoration: none;
  background-color: #c0392b;
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.acciones-socio a.editar:hover,
.acciones-socio form .borrar:hover {
  background-color: #a93226;
}

/* Quitar estilos por defecto del formulario */
.acciones-socio form {
  margin: 0;
  padding: 0;
}

/* Estilos para login */
.login-container {
  margin: 80px auto;
  padding: 40px;
  max-width: 400px;
  background-color: #ffffff;
  border-radius: 12px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  text-align: center;
}

.login-container h2 {
  margin-bottom: 25px;
  color: #b02f2f;
  font-size: 26px;
}

.google-btn {
  margin-top: 20px;
  display: flex;
  justify-content: center;
}

.google-btn img {
  cursor: pointer;
  height: 42px;
}

.acciones-socio svg {
  cursor: pointer;
  transition: transform 0.2s ease;
}

.acciones-socio svg:hover {
  transform: scale(1.2);
}

.icono-accion {
  background: none;
  border: none;
  padding: 4px;
  margin: 0;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.icono-accion:hover {
  transform: scale(1.2);
  opacity: 0.85;
}

.btn-icon {
  all: unset;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0 4px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.btn-icon:hover {
  transform: scale(1.2);
  opacity: 0.85;
}

.btn-borrar {
  background: none !important;
  border: none !important;
  box-shadow: none !important;
  padding: 0 !important;
  margin: 0 !important;
  border-radius: 0 !important;
  appearance: none !important;
}

.tarjeta-detalles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 15px;
  margin-top: 20px;
  background: #fff;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  font-family: 'Segoe UI', sans-serif;
}

.item-detalle {
  background: #f7f9fb;
  border-left: 5px solid #b02f2f;
  padding: 10px 15px;
  border-radius: 6px;
}

.titulo-detalle {
  font-weight: bold;
  display: block;
  color: #2c3e50;
  margin-bottom: 4px;
}

.valor-detalle {
  color: #34495e;
}

th.ocultar-columna,
td.ocultar-columna {
  display: none !important;
}

td i.fas {
  font-size: 18px;
  cursor: pointer;
}
