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


/* Ajuste general para móvil */
html, body {
width: 100%;
height: 100%;
}


/* Estilo del header */
header {
background-color: #3F51B5;
color: #feffff;
text-align: left;
width: 100%;
}




header h1 {
font-family: 'Avenir', sans-serif;
font-weight: 900;
font-size: 26px;
padding: 7px 0px;
letter-spacing: 0.5px;
}


@media (min-width: 481px) {
 header h1 {
   text-align: center;
 }
}




/* Estilos para las categorías */
.categories {
display: flex;
flex-wrap: wrap;
justify-content: flex-start;
background-color: #eaeaea;
padding: 10px 26px;
gap: 8px;
margin-top: 18px;
}




.categories button {
background-color: #3F51B5;
color: #feffff;
border: none;
padding: 8px 12px;
font-size: 15px;
border-radius: 4px;
font-family: 'Avenir', sans-serif;
font-weight: bold;
cursor: pointer;
flex-shrink: 0;
}
/* Estilo para la sección de conversión */
.conversion {
background-color: #f5f5f5;
padding: 16px;
margin: 16px;
border-radius: 4px;
font-family: 'Avenir', sans-serif;
font-size: 15px;
color: #000;
}








.conversion label {
display: block;
margin-top: 12px;
margin-bottom: 4px;
font-weight: bold;
}








.conversion input,
.conversion select {
width: 100%;
padding: 8px;
font-size: 16px;
border: 1px solid #ccc;
border-radius: 6px;
margin-bottom: 8px;
background-color: #fff;
box-shadow: inset 0 1px 2px rgba(0,0,0,0.1), 0 1px 2px rgba(0,0,0,0.08);
transition: box-shadow 0.2s ease-in-out;
}












@media (max-width: 480px) {
header h1 {
 text-align: center;
 padding-left: 0;
}
}
.resultado {
margin-top: 12px;
font-weight: bold;
font-size: 16px;
color: #0f3cbf;
}








.etiqueta-resultado {
color: red;
font-weight: bold;
margin-top: 16px;
font-size: 16px;
font-family: 'Avenir', sans-serif;
}




.separador {
 padding: 16px;
 background-color: #3F51B5;
 margin: 40px 0 20px 0;
 text-align: center;
}






.separador h2 {
font-family: 'Avenir', sans-serif;
font-weight: bold;
font-size: 20px;
color: #f0f0f0;
}




.resultado {
margin-top: 12px;
font-weight: bold;
font-size: 16px;
color: #0f3cbf;
opacity: 0;
transition: opacity 0.3s ease-in-out;
}




.resultado.visible {
opacity: 1;
}
@keyframes pulse {
0% {
  transform: scale(1);
}
50% {
  transform: scale(0.94);
}
100% {
  transform: scale(1);
}
}




.categories button.pulsando {
animation: pulse 0.2s ease-in-out;
}




.footer {
 background-color: #f4f4f4;
 box-shadow: 0 -2px 6px rgba(0, 0, 0, 0.1);
 text-align: center;
 font-size: 0.9rem;
 color: #444;
 padding: 15px 10px;
 border-top: 1px solid #ddd;
 margin-top: auto;
}






.footer p {
margin: 3px 0;
}




.footer a {
display: block;
color: #3F51B5;
text-decoration: none;
font-weight: 500;
}




.footer a:hover {
text-decoration: underline;
}
.footer p.copyright {
margin-top: 10px;
font-size: 0.85rem;
color: #777;
}


#cientifica {
 margin: 20px;
 padding: 16px;
 background-color: #f5f5f5;
 border-radius: 6px;
}


#display {
 width: 100%;
 font-size: 20px;
 padding: 12px;
 margin-bottom: 12px;
 border: 1px solid #ccc;
 border-radius: 6px;
 background-color: #fff;
 box-shadow: inset 0 1px 2px rgba(0,0,0,0.1);
}


#cientifica {
 margin: 20px;
 padding: 16px;
 background-color: #000000;
 border-radius: 6px;
}


#display {
 width: 100%;
 font-size: 20px;
 padding: 12px;
 margin-bottom: 12px;
 border: 1px solid #444;
 border-radius: 6px;
 background-color: #000000;
 color: #ffffff;
 box-shadow: inset 0 1px 2px rgba(255,255,255,0.1);
}


.botones-cientifica {
 display: grid;
 grid-template-columns: repeat(4, 1fr);
 gap: 10px;
}


.botones-cientifica button {
 padding: 12px;
 font-size: 16px;
 font-weight: bold;
 background-color: #2c2c2c; /* Gris oscuro */
 color: #ffffff;
 border: none;
 border-radius: 4px;
 cursor: pointer;
 font-family: 'Avenir', sans-serif;
 transition: background-color 0.2s ease;
}


.botones-cientifica button:hover {
 background-color: #3F51B5;
}
@keyframes pulse {
 0% {
   transform: scale(1);
 }
 50% {
   transform: scale(0.94);
 }
 100% {
   transform: scale(1);
 }
}


.botones-cientifica button:active {
 animation: pulse 0.2s ease-in-out;
}


/* 🖥️ Optimización para iPad y Desktop */
@media (min-width: 768px) {
 .conversion,
 #cientifica {
   max-width: 600px;
   margin: 0 auto;
 }


 .conversion input,
 .conversion select,
 #display {
   max-width: 100%;
 }
}


@media (min-width: 600px) {
 .categories {
   justify-content: center;
 }
}


html, body {
 height: 100%;
 margin: 0;
 padding: 0;
}


body {
 display: flex;
 flex-direction: column;
 min-height: 100vh;
}


main {
 flex: 1;
}


.conversion {
 margin-top: 24px !important;
 margin-bottom: 24px;
}

header {
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
}

.menu-hamburguesa {
  font-size: 28px;
  cursor: pointer;
  position: absolute;
  right: 16px;
}

#menu-desplegable {
  display: none;
  position: absolute;
  top: 60px;
  right: 16px;
  background-color: #ffffff;
  border: 1px solid #ccc;
  padding: 12px;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.2);
  z-index: 999;
}

#menu-desplegable ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

#menu-desplegable li {
  margin: 8px 0;
}

#menu-desplegable a {
  color: #000;
  text-decoration: none;
  font-weight: bold;
}

#menu-desplegable a:hover {
  text-decoration: underline;
}

.menu-desplegable {
  background-color: #ffffff;
  color: #000000;
  padding: 20px 30px;
  border: 1px solid #ccc;
  border-radius: 12px;
  max-width: 90%;
  width: 400px;
  margin: 20px auto;
  font-family: 'Avenir', sans-serif;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.menu-desplegable ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.menu-desplegable li {
  margin-bottom: 12px;
}

.menu-desplegable a {
  text-decoration: none;
  color: #007BFF;
  font-size: 16px;
}

.menu-desplegable a:hover {
  text-decoration: underline;
}
