/* ==================== ESTILOS BASE Y VARIABLES ==================== */
:root {
  --verde-institucional: #1c5228;
  --verde-hover: #133a1c;
  --amarillo-iti: #f0c300;
  --negro-iti: #1a1a1a;
  --crema-fondo: #fbf9f4;
  --blanco-puro: #ffffff;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Arial, sans-serif;
  background-color: var(--verde-institucional);
  color: var(--blanco-puro);
  overflow-x: hidden;
}
 
img {
  max-width: 100%;
  height: auto;
}

/* ==================== ENCABEZADO Y NAVEGACIÓN ==================== */
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 3px 25px;
  background-color: var(--verde-institucional);
  border-bottom: 4px solid var(--amarillo-iti);
}

.logo {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.logo-text {
  font-family: 'Great Vibes', cursive;
  font-size: 80px;
  color: var(--amarillo-iti);
}

.logo-subtext {
  font-family: 'Cinzel Decorative', serif;
  font-size: 45px;
  color: var(--blanco-puro);
  letter-spacing: 4px;
  margin-left: 40px;
}

nav {
  display: flex;
  gap: 15px;
}

nav a {
  text-decoration: none;
  color: var(--negro-iti);
  background-color: var(--amarillo-iti);
  padding: 10px 20px;
  border-radius: 20px;
  font-weight: bold;
  transition: 0.3s ease;
}

nav a:hover {
  background-color: var(--blanco-puro);
  color: var(--verde-institucional);
}

/* ==================== SECCIONES DE CONTENIDO ==================== */
.imagenes {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 40px;
  padding: 40px 20px;
}

.imagenes img {
  width: 100px;
  height: auto;
}

.bienvenida {
  text-align: center;
  padding: 80px 20px;
  background: var(--crema-fondo);
}

.bienvenida .contenido {
  background-color: var(--verde-institucional);
  padding: 40px 20px;
  border-radius: 16px;
  border: 2px solid var(--amarillo-iti);
}

.frase-inspiradora {
  background-color: var(--verde-institucional);
  padding: 60px 20px;
  display: flex;
  justify-content: center;
}

.contenedor-frase {
  background-color: var(--crema-fondo);
  border-radius: 25px;
  padding: 30px 40px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 30px;
  width: 85%;
  max-width: 1100px;
  border: 3px solid var(--amarillo-iti);
}

.frase-texto {
  color: var(--verde-institucional);
  font-family: 'Cinzel Decorative', serif;
  font-size: 28px;
  text-align: center;
}

.que-encontraras, .modo-imparable, .preguntas {
  padding: 60px 20px;
  text-align: center;
}

.contenedor-blanco, .caja-preguntas {
  background: var(--crema-fondo);
  border-radius: 16px;
  padding: 40px;
  margin: 0 auto;
  max-width: 900px;
  color: var(--verde-institucional);
}

.btn-soporte {
  display: inline-block;
  background: var(--verde-institucional);
  color: var(--amarillo-iti);
  font-size: 24px;
  font-weight: bold;
  padding: 14px 35px;
  border-radius: 30px;
  text-decoration: none;
  border: 2px solid var(--amarillo-iti);
  margin-top: 20px;
}

/* ==================== ELEMENTOS FLOTANTES OBLIGATORIOS ==================== */

/* 1. Botón Flotante Redondo */
#chat-toggle {
  position: fixed !important;
  bottom: 24px !important;
  right: 24px !important;
  width: 75px !important;
  height: 75px !important;
  border-radius: 50% !important;
  overflow: hidden !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  background: #ffffff !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35) !important;
  cursor: pointer !important;
  z-index: 10050 !important;
}

#chat-toggle img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
}

/* 2. Caja del Chatbot */
#chatbot {
  display: none; /* Oculto hasta dar clic */
  position: fixed !important;
  bottom: 110px !important;
  right: 24px !important;
  width: 380px !important;
  max-width: calc(100vw - 32px) !important;
  height: 500px !important;
  max-height: 70vh !important;
  border-radius: 16px !important;
  overflow: hidden !important;
  z-index: 10051 !important;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4) !important;
  background: #ffffff !important;
  border: 3px solid var(--verde-institucional) !important;
  flex-direction: column !important;
}

#chat-header {
  background: var(--verde-institucional) !important;
  color: #ffffff !important;
  padding: 12px 16px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
}

#chat-messages {
  padding: 14px !important;
  overflow-y: auto !important;
  flex: 1 1 auto !important;
  background: var(--crema-fondo) !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 10px !important;
}

#chat-input-area {
  display: flex !important;
  gap: 8px !important;
  padding: 12px !important;
  background: #ffffff !important;
  border-top: 1px solid #e0e0e0 !important;
}

#chat-footer {
  padding: 8px !important;
  background: #ffffff !important;
  text-align: center !important;
}

.msg {
  max-width: 85% !important;
  padding: 10px 14px !important;
  border-radius: 12px !important;
  font-size: 14px !important;
}

.msg.bot {
  background: #e8f0e9 !important;
  color: var(--verde-institucional) !important;
  align-self: flex-start !important;
}

.msg.user {
  background: var(--verde-institucional) !important;
  color: #ffffff !important;
  align-self: flex-end !important;
}

.option-btn {
  background: var(--verde-institucional) !important;
  color: var(--amarillo-iti) !important;
  border: none !important;
  padding: 8px 12px !important;
  border-radius: 8px !important;
  cursor: pointer !important;
  font-weight: bold !important;
  margin: 4px !important;
}

/* 3. Formulario Login y Popups Flotantes */
.overlay-registro,
.popup-exito {
  display: none; /* Oculto hasta dar clic en Inicio */
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  background: rgba(0, 0, 0, 0.65) !important;
  z-index: 20000 !important;
  justify-content: center !important;
  align-items: center !important;
}

.registro-form,
.popup-contenido {
  background: var(--crema-fondo) !important;
  color: var(--verde-institucional) !important;
  border: 3px solid var(--verde-institucional) !important;
  border-radius: 20px !important;
  padding: 30px !important;
  width: 340px !important;
  max-width: 90vw !important;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4) !important;
  text-align: center !important;
}

.registro-form input {
  width: 100% !important;
  padding: 8px 12px !important;
  margin: 8px 0 16px !important;
  border-radius: 8px !important;
  border: 1px solid #ccc !important;
}

.registro-form button:not(.btn-close-modal),
.popup-contenido button {
  background: var(--verde-institucional) !important;
  color: var(--amarillo-iti) !important;
  border: none !important;
  padding: 10px 20px !important;
  border-radius: 10px !important;
  cursor: pointer !important;
  font-weight: bold !important;
}

.registro-form {
  position: relative; /* Permite ubicar el botón de cerrar internamente */
}

.btn-close-modal {
  position: absolute;
  top: 10px;
  right: 15px;
  background: transparent;
  border: none;
  font-size: 20px;
  font-weight: bold;
  color: var(--verde-institucional);
  cursor: pointer;
  z-index: 100; 
  pointer-events: auto;
}



.contenedor-botones {
  display: flex;
  gap: 12px; /* Espacio entre los dos botones */
  justify-content: center;
  margin-top: 15px;
}





nav {
  display: flex;
  align-items: center;
  gap: 15px;
}

.panel-usuario {
  display: flex;
  align-items: center;
  gap: 8px;
  background-color: rgba(255, 255, 255, 0.2);
  padding: 5px 12px;
  border-radius: 20px;
  color: #fff;
  margin-left: 10px;
}

.nombre-perfil {
  font-weight: bold;
  color: #ffd700; /* Color dorado/amarillo para resaltar el nombre */
}

.btn-logout {
  background-color: #d9534f;
  color: white;
  border: none;
  padding: 4px 8px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 12px;
}

.btn-logout:hover {
  background-color: #c9302c;
}



/* ==========================================
   ESTILOS PARA AVATAR Y MENÚ DESPLEGABLE
   ========================================== */

.perfil-dropdown {
  position: relative;
  display: inline-block;
  margin-left: 15px;
}

/* Círculo verde con la inicial */
.avatar-circle {
  width: 38px;
  height: 38px;
  background-color: #005a42; /* Verde circular como la imagen */
  color: #ffffff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 18px;
  text-transform: uppercase;
  cursor: pointer;
  user-select: none;
  transition: transform 0.2s, background-color 0.2s;
}

.avatar-circle:hover {
  background-color: #007a59;
  transform: scale(1.05);
}

/* Menú flotante desplegable */
.dropdown-menu {
  display: none; /* Inicia oculto */
  position: absolute;
  right: 0;
  top: 48px;
  background-color: #1e1e1e;
  border: 1px solid #333;
  border-radius: 8px;
  padding: 10px;
  min-width: 140px;
  box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.5);
  z-index: 1000;
}

.dropdown-user {
  color: #ffffff;
  font-size: 14px;
  font-weight: bold;
  display: block;
  text-align: center;
}

.dropdown-menu hr {
  border: 0;
  border-top: 1px solid #333;
  margin: 8px 0;
}

/* Botón de cerrar sesión dentro del menú */
.btn-logout-dropdown {
  width: 100%;
  background-color: #d9534f;
  color: white;
  border: none;
  padding: 6px 10px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 13px;
}

.btn-logout-dropdown:hover {
  background-color: #c9302c;
}





/* AJUSTE FINO DE ALTURA PARA EL ENCABEZADO */
header {
  padding-top: 10px !important;
  padding-bottom: 10px !important;
}

section.imagenes img,
.imagenes img {
  height: 100px !important;
  width: auto !important;
}



/* Color del avatar según el género */
.avatar-hombre {
  background-color: #007bff !important; 
}

.avatar-mujer {
  background-color: #ffb6c1 !important;
  color: #333333 !important;           
}



/* Configuración del contenedor verde */
.bienvenida .contenido {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 40px;
}

/* El texto ocupa el espacio disponible y se centra */
.bienvenida .contenido h1 {
    flex: 1;
    text-align: center;
    margin: 0;
}

/* Ajuste de la imagen de la mascota */
.logo-bienvenida {
    width: 100px;
    height: auto;
    object-fit: contain;
    border-radius: 10px;
    margin-left: 20px;
}



