/* --- IMPORTACIÓN DE FUENTES --- */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@700&family=Lexend:wght@400;500&display=swap');

/* --- VARIABLES DE DISEÑO --- */
:root {
    --size: 44px;
--gap: 14px;
--icon-color: #ffffff;     /* iconos blancos */
--hover-color: #ff6a00;    /* naranja (cámbialo si prefieres otro) */
--hover-scale: 1.08;
--transition: 180ms cubic-bezier(.2,.9,.2,1);
  --color-azul-mia: #0077c2;
  --color-rojo-lazo: #d93025;
  --color-amarillo-circuito: #fbbc04;
  --color-fondo-claro: #f0f4f8;
  --color-texto-principal: #202124;
  --color-texto-secundario: #5f6368;
  --font-titulos: 'Poppins', sans-serif;
  --font-texto: 'Lexend', sans-serif;
}

.navbar {
    background-color: var(--color-azul-mia);
    display: flex;
    justify-content: center;
    align-items: center;
    font-family: var(--font-titulos);
    padding: 10px 0;
    
    position: fixed; /* Fija el nav en la parte superior */
    top: 0;          /* Desde arriba */
    left: 0;         /* Desde la izquierda */
    width: 100%;     /* Que ocupe todo el ancho */
    z-index: 999;    /* Para que quede encima de todo */
}

.navbar > div {
  display: flex;
  gap: 10px;                /* Espacio entre los enlaces */
}

.navbar a {
  text-decoration: none;     /* Sin subrayado */
  text-transform: uppercase; /* Texto en mayúsculas */
  color: white;
  font-weight: bold;
  font-size: 1.6em;
}

.navbar a:hover {
  color: var(--color-rojo-lazo);
  text-decoration: none;     /* Sin subrayado al pasar el ratón */
}

/* Ajuste de texto del header en móviles */
@media (max-width: 480px) {
  .navbar a {
    font-size: 1em; /* Ajusta el tamaño según necesites */
  }
}









/* --- ESTILOS GENERALES --- */
body {
  font-family: var(--font-texto);
  margin: 0;
  padding: 0;
  background-color: #ffffff;
  color: var(--color-texto-principal);
      display: flex;
    flex-direction: column;
    min-height: 100vh; /* altura mínima igual a la ventana */
    margin: 0;
}
html, body {
  margin: 0;
  padding: 0;
  overflow-x: hidden; /* Evita scroll horizontal */
  width: 100%;
  max-width: 100vw;
}

section {
  padding: 60px 20px;
  max-width: 1000px;
  margin: 0 auto;
  text-align: center;
}
h1, h2, h3 {
  font-family: var(--font-titulos);
}

/* --- SECCIÓN 1: BIENVENIDA (HERO) --- */
#hero {
  width: 100vw;
  max-width: none;
  min-height: 100vh;
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  color: white;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 40px 20px;
  box-sizing: border-box;
}

#hero .contenido {
  background-color: rgba(0, 0, 0, 0.5);
  padding: 25px;
  border-radius: 15px;
  max-width: 50vw;
  width: 100%;
  box-sizing: border-box;
}

#hero h1 {
  font-size: 3.5em;
  margin-bottom: 10px;
}
#hero p {
  font-size: 1.2em;
  line-height: 1.6;
}

/* --- SECCIÓN 2: EL LIBRO --- */
#libro {
  background-color: var(--color-fondo-claro);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 40px;
}
#libro .portada {
  flex: 1;
  min-width: 250px;
}
#libro .portada img {
  max-width: 100%;
  border-radius: 10px;
  box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}
#libro .descripcion {
  flex: 2;
  text-align: left;
}
#libro h2 {
  color: var(--color-azul-mia);
  font-size: 2.5em;
}
#libro ul {
  list-style: none;
  padding: 0;
}
#libro li {
  margin-bottom: 15px;
  line-height: 1.5;
}
.cta-button {
  background-color: var(--color-rojo-lazo);
  color: white;
  font-family: var(--font-titulos);
  font-size: 1.2em;
  padding: 15px 30px;
  border: none;
  border-radius: 50px;
  text-decoration: none;
  cursor: pointer;
  display: inline-block;
  margin-top: 20px;
  transition: transform 0.2s, box-shadow 0.2s;
}
.cta-button:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 15px rgba(0,0,0,0.2);
}

/* --- SECCIÓN 3: NOTICIAS --- */
#noticias h2 {
  font-size: 2.5em;
  margin-bottom: 40px;
}
.noticias-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
  text-align: left;
}
.noticia-card {
  background-color: var(--color-fondo-claro);
  border-radius: 15px;
  padding: 25px;
  box-shadow: 0 5px 15px rgba(0,0,0,0.05);
  transition: transform 0.2s;
}
.noticia-card:hover {
  transform: translateY(-5px);
}
.noticia-card h3 {
  color: var(--color-azul-mia);
  margin-top: 0;
}
.noticia-card a {
  color: var(--color-rojo-lazo);
  text-decoration: none;
  font-weight: bold;
}

/* --- FOOTER --- */
footer {
  background-color: var(--color-azul-mia);
  color: white;
  text-align: center;
  padding: 40px 20px;
 margin-top: auto;
 margin-bottom: 0px;
 font-family: var(--font-texto);
}

footer img {
  max-width: 100px;
  margin-bottom: 15px;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

@media (max-width: 768px) {
  #hero {
 background-position: 85% center !important;
    background-size: cover !important;
    justify-content: center;
    padding: 40px 10px;
  }
  #hero .contenido {
    max-width: 100vw;
    width: 100%;
  }
}

footer img {
  display: block;
  margin: 0 auto 15px auto;
}

@media (max-width: 768px) {
  /* Hero texto ajustado */
  #hero h1 {
    font-size: 2.5em;
  }
  #hero p {
    font-size: 1em;
  }

  /* Descripción libro centrada y mejor padding */
  #libro .descripcion {
    text-align: center;
    padding: 0 10px;
    box-sizing: border-box;
  }
  #libro ul {
    padding-left: 20px;
  }

  /* Botón centrado */
  .cta-button {
    display: block;
    margin: 20px auto 0 auto;
    text-align: center;
  }
}
.habla-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

#habla-conmigo h2 {
  font-size: 2.2em;
  color: var(--color-azul-mia);
  margin-bottom: 20px;
}

.noticias-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}
.noticia-card {
  background: #f8f8f8;
  padding: 1rem;
  border-radius: 10px;
  box-shadow: 0 0 5px rgba(0,0,0,0.1);
}

.noticia {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.social-row{
  display: flex;
  gap: var(--gap);
  align-items: center;
  justify-content: center; /* centra los iconos */
  margin-top: 18px;
  flex-wrap: wrap;
}

.icon-link{
  display: inline-grid;
  place-items: center;
  width: var(--size);
  height: var(--size);
  border-radius: 10px;
  background: transparent;
  text-decoration: none;
  transition: transform var(--transition), color var(--transition), fill var(--transition);
  color: var(--icon-color); /* icono blanco por defecto */
  outline: none;
}

.icon-link svg{
  width: 22px;
  height: 22px;
  display: block;
  fill: currentColor; /* usa el color del enlace */
  transition: transform var(--transition), color var(--transition), fill var(--transition);
}

.icon-link:hover,
.icon-link:focus{
  transform: scale(var(--hover-scale));
  color: var(--hover-color); /* naranja solo en hover/focus del icono */
}

.icon-link:focus-visible{
  box-shadow: 0 0 0 4px rgba(255,106,0,0.12); /* foco accesible (ligero naranja) */
  border-radius: 12px;
}

/* conserva la clase sr-only si la usas */
.sr-only{
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

.seo-title {
    position: absolute;
    left: -9999px;
    top: auto;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

/* Tu estilo original */
.frase {
    font-size: 2rem; /* o el tamaño que tenías */
    font-weight: bold;
    color: white; /* o el color que usabas */
    /* cualquier otro estilo que tenías antes */
}



/* Mensaje del bot según la IA */
.message.mia {
background-color: var(--color-rojo-lazo);
  color: white;
  align-self: flex-start;
  padding: 10px 15px;
  border-radius: 20px;
  max-width: 80%;
  margin: 5px auto 5px 10px;
  font-family: var(--font-texto);
  line-height: 1.4;
}

.message.aida {
    background-color: green; /* verde para AI-DA */
      color: white;
  align-self: flex-start;
  padding: 10px 15px;
  border-radius: 20px;
  max-width: 80%;
  margin: 5px auto 5px 10px;
  font-family: var(--font-texto);
  line-height: 1.4;
}