/* Pegamos el footer al fondo en páginas con poco contenido */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: Arial, sans-serif;
}

/* Ocupa toda la altura y empuja el footer al fondo */
html, body {
  height: 100%;
  flex-direction: column;
  margin: 0; /* Elimina márgenes globales */
  padding: 0;
}

/* Cuerpo general */
body {
  flex: 1;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  color: #000;
  background-color: #ffffff;

  /* Imagen de fondo */
  background-image: url('../img/fondo.png'); /* Asegúrate de que la ruta sea correcta */
  background-size: cover;                  /* Mejora visualmente el fondo */
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
}

/* El main crece para empujar el footer */
body > main {
  flex: 1;
}

main {
  max-width: 1000px;
  margin: 0 auto;
  padding: 30px;
  background-color: #f9f9f900;
  border-radius: 10px;
  margin-bottom: 50px;
}

/* HEADER */
.main-header {
  background-color: #ffffff;
  color: white;
  padding: 43px 15px;
}

/* TOP BAR FLEX */
.top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  position: relative;
}

/* LOGOS */
.logo-container {
  display: flex;
  justify-content: center; /* Centra horizontalmente */
  align-items: center;
  flex-wrap: wrap;
  gap: 30px;
  width: 100%;
}

.logo-container img {
  height: 100px; /* Aumentamos el tamaño base */
  max-width: 100%;
  object-fit: contain;
  transition: all 0.3s ease;
}

/* BOTONES */
.button-container {
  display: none;
  flex-direction: column;
  align-items: flex-end;
  position: absolute;
  top: 40px;
  right: 15px;
  background-color: rgba(255, 253, 253, 0.335);
  padding: 10px;
  border-radius: 18px;
  box-shadow: 0px 4px 10px rgba(0,0,0,0.1);
}

.button-container.show {
  display: flex;
}

.btn-header {
  background-color: rgba(255, 255, 255, 0);
  color: #9f2747;
  padding: 10px 16px;
  border-radius: 16px;
  text-decoration: none;
  font-weight: 80;
  transition: all 0.3s ease;
}

.btn-header:hover {
  background-color: #9f2747;
  color: white;
  box-shadow: 0 4px 8px rgba(0,0,0,0.3);
}

/* HAMBURGUESA A LA DERECHA SIEMPRE */
.hamburger {
  position: absolute;
  right: 15px;
  top: 1px;
  cursor: pointer;
  z-index: 10;
}

.hamburger img {
  height: 32px;
  width: 32px;
}

/* BIENVENIDA */
.welcome-container {
  background-color: #9f2747;
  color: white;
  padding: 60px;
  text-align: center;
  width: 100%;         /*cubre todo el ancho */
  margin: 0;           /* Elimina márgenes que lo limiten */
  box-sizing: border-box; /* Evita que el padding reduzca el ancho */
  transition: transform 0.3s ease,
              box-shadow 0.3s ease;
  font-size: 29px;
}

.welcome-container:hover {
  transform: scale(0.98); /* lo hace más pequeño, da sensación de alejarse */
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4); /* opcional, para más profundidad */
}

.welcome-container h1 {
  font-size: 1.8em;
  margin: 10px 0 5px;
  color: #ffffff;
}
/* GENERAL RESPONSIVE: Hasta 1350px */
@media screen and (max-width: 1350px) {
  .welcome-container {
    transition: none;
  }

  .welcome-container:hover {
    transform: none;
    box-shadow: none;
  }

  .button-container a,
  .button-container button {
    display: block;
    width: 100%;
  }

  .button-container.show {
    display: flex;
  }

  .hamburger {
    display: block;
    top: 10px;
    right: 15px;
  }
 .hamburger {
    top: -20px;
    right: -10px;
  }
  .logo-container {
    width: 100%;
    justify-content: center;
    margin-bottom: 10px;
  }

  .logo-container img,
  .logo-ayuntamiento {
    width: 220px !important;
    max-width: 100%;
    height: auto !important;
    display: block;
  }
}

/* Ajuste progresivo de tamaño de logos */
@media screen and (max-width: 900px) {
  .logo-container img,
  .logo-ayuntamiento {
    width: 180px !important;
  }
}

@media screen and (max-width: 700px) {
  .logo-container img,
  .logo-ayuntamiento {
    width: 140px !important;
  }

  .welcome-container {
    padding: 30px;
    font-size: 15px;
  }
}

@media screen and (max-width: 300px) {
  .logo-container img,
  .logo-ayuntamiento {
    width: 100px !important;
  }
}


/* Otros estilos generales */

h1, h2, h3 {
  color: #9f2747;
  margin-bottom: 10px;
}
h1 {
  font-size: 30px;
}
.llenadoGob {
  color: #ff0000;
}
.form3 {
  font-size: 25px;
}
section {
  margin-bottom: 30px;
  padding-bottom: 15px;
  border-bottom: 1px solid #ccc;
}

label {
  display: block;
  margin-top: 10px;
  font-weight: bold;
}

input, select, textarea {
  width: 100%;
  padding: 8px;
  margin-top: 10px;
  border: 1px solid #5a5a5a;
  border-radius: 15px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.125); /* más profundidad */
}

input[type="radio"],
input[type="checkbox"] {
  width: auto;
  margin-right: 10px;
}

table {
  width: 100%;
  margin-top: 15px;
  border-collapse: collapse;
}

table th,
table td {
  border: 1px solid #ccc;
  padding: 8px;
}

textarea {
  resize: vertical;
}

/* Botones generales */
button {
  display: block;
  background-color: #9f2747;
  color: white;
  border: none;
  padding: 12px 24px;
  margin: 20px auto 0 auto;
  border-radius: 25px;
  font-size: 1em;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

button:hover {
  background-color: #ffffff;
  color: #9f2747;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.8); /* más profundidad */
}

/* Firma centrada */
.linea-firma {
  text-align: center;
  margin-top: 30px;
}

.linea-firma input {
  width: 60%;
  border: none;
  border-bottom: 2px solid black;
  text-align: center;
}

/* Privacidad */
.privacidad,
.confirmacion {
  display: flex;
  justify-content: center; /* Centra horizontalmente el conjunto */
  align-items: center;     /* Centra verticalmente el checkbox y texto */
  text-align: left;
  gap: 8px;
  margin-top: 20px;
}

.privacidad a {
  color: #9f2747;
  text-decoration: underline;
}

@media screen and (max-width: 700px) {
  .form3 {
    font-size: 20px;
  }
}

/***************************footer**********************************/


.footer {
    background-color: #9f2747;
    color: white;
    text-align: center;
    padding: 70px 20px 30px;
    font-size: 16px;
    width: 100%;
    position: relative;
}

.greca-container {
  position: absolute;
  top: 15px;
  left: 0;
  width: 100%;
  z-index: 1;
}

.footer-greca {
  width: 100%;
  max-height: 80px;
  object-fit: cover;
  display: block;
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 20px;
  align-items: center;
  z-index: 2;
  position: relative;
}

.footer-item {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

.footer a {
  color: white;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s ease;
}

.footer a:hover {
  color: #ffd700;
}

.footer i {
  color: #ffd700;
  font-size: 18px;
}
.footer-icon {
  width: 30px;
  height: 30px;
  margin-right: 5px;
  vertical-align: middle;
}

@media screen and (min-width: 768px) {
  .footer-content {
    flex-direction: row;
    justify-content: center;
    text-align: center;
    gap: 20px;
  }

  .footer-item {
    justify-content: center;
  }
}

/*****************iniciar sesion/**************************/

main.login-container {
  max-width: 500px;
  margin: 50px auto 50px auto;
  background: #f9f9f9;
  padding: 60px;
  border-radius: 25px;
  box-shadow: 0 8px 24px rgba(159, 39, 71, 0.3);
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

main.login-container h2 {
  text-align: center;
  color: #9f2747;
  margin-bottom: 25px;
  border-radius: 25px;
  font-size: 28px;
  font-weight: bold;
}

main.login-container label {
  font-weight: 600;
  display: block;
  margin-bottom: 6px;
  color: #333;
  border-radius: 25px;
}

main.login-container input[type="text"],
main.login-container input[type="password"] {
  width: 100%;
  padding: 10px 12px;
  margin-bottom: 15px;
  border: 1px solid #ccc;
  border-radius: 25px;
  font-size: 16px;
  transition: border-color 0.3s ease;
}

main.login-container input[type="text"]:focus,
main.login-container input[type="password"]:focus {
  outline: none;
  border-color: #9f2747;
  box-shadow: 0 0 8px rgba(159, 39, 71, 0.5);
  border-radius: 25px;
}

main.login-container .btn-login {
  width: 100%;
  background-color: #9f2747;
  color: white;
  font-size: 18px;
  padding: 12px 0;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 700;
  transition: background-color 0.3s ease;
  border-radius: 25px;
}

main.login-container .btn-login:hover {
  background-color: #7a1d3b;
  box-shadow: 0 4px 15px rgba(159, 39, 71, 0.8);
}

main.login-container .error-message {
  color: red;
  font-size: 14px;
  margin-bottom: 12px;
  display: none;
}

/* Tarjeta del formulario */
.form-container {
  max-width: 1400px;
  margin: 30px auto;
  background-color: #ffffff;
  padding: 30px;
  border-radius: 25px;
  box-shadow: 0 8px 150px rgba(0, 0, 0, 0.187);
}

/* ENCABEZADOS DENTRO DE LA TARJETA */
.form-container h1,
.form-container h2,
.form-container h3 {
  color: #9f2747;
  text-align: center;
  margin-bottom: 15px;
}

/* OPCIONAL: SECCIONES MÁS DELIMITADAS DENTRO DE LA TARJETA */
.form-container section {
  background-color: #f3f3f3;
  padding: 20px;
  border-radius: 25px;
  margin-bottom: 20px;
  border: 1px solid #ba0b0b35;
}

 



 

.btn-agregar {
    display: block;
    background-color: #9f2747;
    color: white;
    border: none;
    padding: 12px 24px;
    margin: 20px auto 0 auto;
    border-radius: 25px;
    font-size: 1em;
    cursor: pointer;
    transition: background-color 0.3s ease;
}








 #btnSubir {
      position: fixed;
      bottom: 30px;
      right: 30px;
      z-index: 99;
      background-color: #9f2747da;
      color: white;
      border: none;
      outline: none;
      width: 45px;
      height: 45px;
      border-radius: 50%;
      cursor: pointer;
      box-shadow: 0 2px 6px rgba(0, 0, 0, 0.627);
      display: none;
      transition: background-color 0.3s ease;

      /* Centrar el icono */
      display: flex;
      align-items: center;
      justify-content: center;
      padding: 0;
    }

    #btnSubir:hover {
      background-color: #974b5fbd;
    }


/* Estilos normales de tabla */
.tabla-integrantes {
  width: 100%;
  border-collapse: collapse;
  min-width: 800px; /* Ajusta según las columnas que tengas */
}

.tabla-integrantes th, .tabla-integrantes td {
  border: 1px solid #ccc;
  padding: 4px;
  text-align: left;
}

/* Contenedor con scroll horizontal */
/* Contenedor con scroll horizontal */
.table-responsive {
  width: 101%;
  overflow-x: hidden; /* por defecto sin scroll */
}

/* SOLO en pantallas pequeñas activamos scroll */
@media (max-width: 1020px) {
  .table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch; /* scroll más suave en iOS */
  }

  .table-responsive::-webkit-scrollbar {
    height: 8px;
  }

  .table-responsive::-webkit-scrollbar-thumb {
    background-color: #aaa;
    border-radius: 8px;
  }
}


main.login-container {
    max-width: 700px;
    margin: 50px auto 50px auto;
    background: #f9f9f9;
    padding: 60px;
    border-radius: 25px;
    box-shadow: 0 8px 24px rgba(159, 39, 71, 0.3);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}


/**LINK PARA CONSULTA DE CURP***/
.curp-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  padding: 10px 16px;
  background: linear-gradient(135deg, #9f2747da, #9f2747da);
  color: white;
  font-weight: 600;
  font-size: 15px;
  border-radius: 20px;
  text-decoration: none;
  box-shadow: 0 4px 8px rgba(0, 123, 255, 0.3);
  transition: all 0.3s ease;
}

.curp-link::before {
  content: "🔎";
  font-size: 16px;
}

.curp-link:hover {
  background: linear-gradient(135deg, rgba(159, 39, 71, 0.855), #9f2747da);
  box-shadow: 0 6px 12px rgba(159, 39, 71, 0.855);
  transform: translateY(-2px) scale(1.03);
}

.curp-link:active {
  transform: translateY(0) scale(0.97);
  box-shadow: 0 3px 6px rgba(159, 39, 71, 0.855);
}



/** estilos para los radio button ***/

/* Contenedor de los dos grupos */
.flex-container {
  display: flex;
  justify-content: center;
  gap: 60px; /* espacio entre los bloques */
  margin-top: 10px;
  flex-wrap: wrap; /* Permite que los bloques se muevan a la siguiente línea */
}

/* Cada bloque (Estado civil / Escolaridad) */
.flex-block {
  display: flex;
  flex-direction: column;
  font-family: Arial, sans-serif;
  min-width: 200px; /* ancho mínimo para cada bloque */
}

/* Estilo de título */
.flex-block label.title {
  font-weight: bold;
  margin-bottom: 5px;
  font-size: 14px;
}

/* Estilo moderno de los radios */
.flex-block input[type="radio"] {
  display: none; /* Oculta el radio original */
}

.flex-block label.option {
    display: inline-block;
    padding: 10px 12px;
    margin: 10px 80px 3px 0;
    border: 1px solid #ccc;
    border-radius: 18px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 13px;
    background-color: #f8f8f8;
    text-align: center; /* centra el texto */
    vertical-align: middle; /* opcional: centra verticalmente si hay iconos o elementos internos */
}


.flex-block input[type="radio"]:checked + label.option {
  background-color: #9f2747; /* color cuando está seleccionado */
  color: white;
  border-color: #9f2747;
}

.flex-block label.option:hover {
  background-color: #e0e0e0;
}

/* Media queries para pantallas pequeñas */
@media (max-width: 600px) {
  .flex-container {
    flex-direction: column;
    gap: 20px; /* menos espacio entre bloques en móvil */
    align-items: center;
  }

  .flex-block {
    width: 100%; /* que ocupe todo el ancho disponible */
    max-width: 300px; /* para no estirarse demasiado */
  }

  .flex-block label.option {
    width: 100%; /* botones de radio ocupan toda la fila */
    text-align: center;
  }
}
/* Estilos generales para inputs */
#cuantas_incapacidad,
#campo_veces_comer,
#campo_institucion_apoyo,
#campo_seguridad_social {
  width: 100%;        /* ocupa todo el ancho disponible de su contenedor */
  max-width: 340px;   /* ancho máximo, puedes ajustar según cada campo */
  text-align: center; /* centra el número dentro */
  box-sizing: border-box; /* evita que padding/border rompa el ancho */
  padding: 6px 8px;  /* un poco de espacio interno */
  margin: 4px 0;     /* espacio vertical entre campos */
}

/* Ajustes máximos específicos para cada campo */
#cuantas_incapacidad {
  max-width: 120px;
}

#campo_veces_comer {
  max-width: 340px;
}

#campo_institucion_apoyo {
  max-width: 240px;
}

#campo_seguridad_social {
  max-width: 120px;
}

/* Media query para pantallas pequeñas */
@media (max-width: 500px) {
  #cuantas_incapacidad,
  #campo_veces_comer,
  #campo_institucion_apoyo,
  #campo_seguridad_social {
    max-width: 100%;  /* se adaptan al ancho del contenedor */
    font-size: 14px;  /* opcional: reduce la letra en móviles */
  }
}
