.nav-flex {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  padding:20px;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background-color: #fff;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  align-items: center;
}

.nav-left,
.nav-center,
.nav-right {
  flex: 1;
  display: flex;
  align-items: center;
}

/* Alineaciones y estilos específicos */

.nav-left {
  justify-content: flex-start;
}

.nav-left strong {
  color: #005B7F;
  /*color: #8ac926;*/
  font-size: 1.8rem;
  font-weight: 700;
  line-height: 1.6;
  white-space: nowrap;
}

.nav-center {
  justify-content: center;
}

.nav-right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  min-width: 0;
}

.menu {
  display: flex;
  align-items: center;
  gap: 28px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.menu li {
  margin: 0;
  padding: 0;
}

.menu a {
  display: inline-flex;
  align-items: center;
  padding: 8px;
  box-sizing: border-box;
  color: #005B7F;
  font-size: 1.1rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  border-radius: 8px;
  background-color: transparent;
  transition: 
	background-color 1s ease,
	color 1s ease;
}

.menu a:hover {
  color: #112A46;
  background-color: #ACC8E5;
}

.menu a:focus-visible {
  outline: 2px solid #005fcc;
  outline-offset: 2px;
}
	
/* Banderas */

.flags {
  display: flex;
  gap: 20px;
}

.flags_item {
  width: 40px;
  height:30px;
  padding: 0;
  margin: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  display: block;
  background-color: transparent;
  transition: 1s ease;
  border-radius: 8px;
}

/* Mantener el tamaño de las imágenes */

.flags_item img {
  display: block;
  margin: auto;
  width: 30px;
  height: auto;
}

/* Indicador de foco para navegación mediante teclado */

.flags_item:focus-visible {
  outline: 2px solid #005fcc;
  outline-offset: 2px;
  border-radius: 3px;
}

/* Indicador visual del idioma seleccionado */

.flags_item[aria-pressed="true"] {
  opacity: 1;
  background-color: #ACC8E5;
}


.flags_item[aria-pressed="false"] {
  opacity: 0.7;
}


.flags_item:hover {
  opacity: 1;
  /*background-color: #ccff33;*/
  background-color: #8ac926;
}


/* Menú hamburguesa y navegación */

.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: space-around;
  width: 30px;
  height: 25px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  transition: transform 0.3s ease;
}

.menu-toggle .bar {
  width: 100%;
  height: 3px;
  background-color: #333;
  border-radius: 2px;
  transition: all 0.3s ease;
}


/* Adición de clases para girar las barras */

.menu-toggle.active .bar:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.menu-toggle.active .bar:nth-child(2) {
  opacity: 0;
}

.menu-toggle.active .bar:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}


/* Estilo responsive móviles */


@media (max-width: 360px) {
	
.nav-left strong {
	font-size: 1.3rem;
  }
}

@media (max-width: 768px) {


  .menu-toggle {
    display: flex;
  }

  .nav-flex {
    grid-template-columns: 1fr auto;
    grid-template-rows: auto auto;
    row-gap: 0.5rem;
    align-items: center;
  }

  .nav-left {
    grid-column: 1;
    grid-row: 1;
    justify-content: center;
  }
  
  .nav-right {
    grid-column: 2;
    grid-row: 1;
    justify-self: end;
    position: relative;
  }

  .nav-center {
    grid-column: 1 / -1;
    grid-row: 2;
    justify-content: center;
  }

  .menu-toggle {
    display: flex;
  }

  .menu {
    display: none;
    flex-direction: column;
    position: absolute;
    right: 0;
    top: 100%;
    background: #f0f0f0;
    border: 1px solid #ddd;
    padding: 1rem;
    z-index: 10;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  }

  .menu.show {
    display: flex;
  }
}


/* Tablet -laptops pequeños */

@media (min-width: 769px) and (max-width: 1024px) {
  .menu-toggle {
    display: flex;
  }

  .menu {
    display: none;
    flex-direction: column;
    position: absolute;
    right: 0;
    top: 100%;
    background: #f0f0f0;
    border: 1px solid #ddd;
    padding: 1rem;
    z-index: 10;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  }

  .menu.show {
    display: flex;
  }
}


/* Control de menú */

@media (min-width: 1020px) and (max-width: 1280px) {

  .menu li a {
    font-size: 15px;
  }
}


/* Estilo escritorio */

@media (min-width: 1025px) {
  .menu {
    display: flex !important;
    flex-direction: row;
    position: static;
    background: none;
    border: none;
    padding: 0;
    box-shadow: none;
  }
}
