body {
  font-family: Arial, sans-serif;
}

/* Estilos para el logo fijo en la esquina superior izquierda */
.fixed-logo {
    position: fixed; 
    top: -15px; 
    left: 20px; 
    z-index: 1050;
    width: 200px; 
}



/* Navbar fijo */
.navbar {
  position: fixed;
  top: 0;
  left: 250px; /* ancho del sidebar */
  right: 0;
  z-index: 1000;
}

/* Menú lateral */
.sidebar {
  height: 100vh;
  position: fixed;
  top: 56px;
  left: 0;
  background-color: #f8f9fa;
  border-right: 1px solid #dee2e6;
  width: 250px;
  padding-top: 20px;
  overflow-y: auto;
}

/* Contenido principal */
.content {
  margin-left: 250px;
  padding: 20px;
  margin-top: 56px;
  max-width: none !important;
}

/* Contenedor interno alineado a la izquierda */
.content-inner {
  max-width: 1100px; /* límite de ancho */
  margin-left: 0;    /* pegado a la izquierda */
  max-width: 95% !important;
}

/* Enlaces activos */
.nav-link.active {
  font-weight: bold;
  color: #0d6efd;
}

/* Estilos para tarjetas */
.card {
  border-radius: 8px;
}

.card-footer {
  padding-top: 0.75rem;
}

/* Estilos para imágenes de guía */
.guide-image {
  width: 500px; /* La imagen se hace más pequeña, manteniendo su forma */
  height: auto; /* El alto se ajusta automáticamente */
  max-width: 100%; /* Sigue siendo responsiva */
  display: block;
  margin: 20px 0;
  border: 1px solid #dee2e6;
  border-radius: 8px;
}

/* Buscador de Guias */
.suggestions-box {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: #f8f8f8;
  border: 0px solid #ddd;
  max-height: 200px;
  overflow-y: auto;
  z-index: 1000;
}

.suggestions-box div {
  padding: 8px;
  cursor: pointer;
}

.suggestions-box div:hover {
  background: #f0f0f0;
}

.hidden {
  display: none;
}


/* Fondo del lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  z-index: 9999;
}

/* Cuando está activo */
.lightbox.active {
  opacity: 1;
  pointer-events: all;
}

/* Imagen ampliada */
.lightbox-img {
  max-width: 90%;
  max-height: 90%;
  transform: scale(0.85);          /* 🔹 empieza más pequeña */
  transition: transform 0.35s ease;
  box-shadow: 0 0 30px rgba(0,0,0,0.5);
}

/* 🚀 Zoom automático al abrir */
.lightbox.active .lightbox-img {
  transform: scale(1);             /* 🔹 zoom automático */
}

/* Botón cerrar */
.lightbox-close {
  position: absolute;
  top: 20px;
  right: 25px;
  font-size: 2rem;
  color: #fff;
  cursor: pointer;
}



/* Cards de inicio */

.service-card {
  border-radius: 12px;
  padding: 20px;
  border: 1px solid #eef2f7;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.service-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 28px rgba(13, 110, 253, 0.15);
}

/* Icono superior */
.service-icon {
  width: 64px;
  height: 64px;
  border-radius: 12px;
  background: #eaf2ff;
  color: #0d6efd;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
}

/* Botón circular */
.service-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #0d6efd;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: background 0.25s ease, transform 0.25s ease;
}

.service-btn:hover {
  background: #0b5ed7;
  transform: scale(1.1);
  color: #fff;
}

.card-title {
  font-weight: 600;
}

.card-text {
  font-size: 0.95rem;
  color: #555;
}

/* Grid de cards (2 por fila centradas) */
.cards-container {
  display: grid;
  grid-template-columns: repeat(2, minmax(520px, 1fr));
  gap: 40px;
  max-width: 1100px;
  margin-left: 15%; /* centra todo el bloque */
}

/* Responsive: 1 card por fila en pantallas pequeñas */
@media (max-width: 768px) {
  .cards-container {
    grid-template-columns: 1fr;
  }
}





/* Sección superior DocuKlaud */
.hero-section {
  display: grid;
  grid-template-columns: 1.3fr 0.7fr; /* 🔹 aprovecha mejor el espacio */
  gap: 60px;
  align-items: center;
  max-width: 1100px;
}

/* Texto */
.hero-text p {
  font-size: 1.05rem;
  line-height: 1.65;
}

/* Contenedor imágenes */
.hero-images {
  display: flex;
  gap: 28px;
  justify-content: center;
  align-items: center;
  background: transparent;
}

/* Imagen individual */
.hero-img {
  background: transparent !important;
  padding: 0;
}

.hero-img picture,
.hero-img img {
  background: transparent !important;
  display: block;
}

/* Imagen */
.hero-img img {
  max-width: 280px;              /* 🔹 más grandes */
  width: 100%;
  height: auto;
  border-radius: 16px;
  box-shadow: 0 14px 30px rgba(0,0,0,0.18);
  transition: transform 0.3s ease;
}

/* Pequeño efecto hover (elegante) */
.hero-img img:hover {
  transform: translateY(-6px);
}

/* Responsive */
@media (max-width: 992px) {
  .hero-section {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hero-images {
    margin-top: 24px;
  }
}

/* Contenedor que se adapta a la imagen */
.image-box {
  display: inline-flex;           /* 🔑 se ajusta al contenido */
  border: 1px solid #dcdcdc;
  border-radius: 10px;
  padding: 12px;
  background-color: #fafafa;
  margin: 20px 0;
}

/* Imagen */
.image-box img {
  display: block;
  height: auto;
  width: auto;
  max-width: 100%;                /* sigue siendo responsive */
  border-radius: 6px;
}

.service-btn {
  background: #262d64;
  color: #fff;
}

.service-btn:hover {
  background: #1f254f; /* un poco más oscuro */
  color: #fff;
}

/* ===== SIDEBAR: SOLO COLOR DE TEXTO ===== */

/* Links normales */
.sidebar .nav-link {
  color: #24388c;
}

/* Link activo */
.sidebar .nav-link.active {
  color: #262d64;
  font-weight: 600;
}

/* Evita que Bootstrap agregue fondo */
.sidebar .nav-link:hover,
.sidebar .nav-link:focus {
  background-color: transparent;
}

/* ===== BREADCRUMBS ===== */

.breadcrumbs {
  font-size: 14px;
  margin-bottom: 16px;
}

/* Texto normal */
.breadcrumb-item {
  color: #24388c;
}

/* Separador */
.breadcrumb-separator {
  margin: 0 6px;
  color: #24388c;
}

/* Item activo (último) */
.breadcrumb-item.active {
  color: #262d64;
  font-weight: 600;
}

/* ===== BOTÓN BUSCAR ===== */
.custom-search-btn {
  color: #24388c;
  border-color: #24388c;
}

.custom-search-btn:hover {
  background-color: #262d64;
  border-color: #262d64;
  color: #ffffff;
}



.cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  max-width: 1100px;
  margin: 0 auto;
}

/* Segunda fila centrada */
.cards-grid > :nth-child(4) {
  grid-column: 1 / 3;
  justify-self: end;
}

.cards-grid > :nth-child(5) {
  grid-column: 3 / 4;
  justify-self: start;
}

/* Responsive */
@media (max-width: 992px) {
  .cards-grid {
    grid-template-columns: 1fr;
  }

  .cards-grid > * {
    grid-column: auto !important;
    justify-self: stretch;
  }
}



/* =========================
   RESPONSIVE GLOBAL
   ========================= */

/* ===== TABLET Y MOBILE ===== */
@media (max-width: 991.98px) {

  /* LOGO */
  .fixed-logo {
    position: relative;
    top: 0;
    left: 0;
    width: 160px;
    margin: 12px auto;
    display: block;
  }

  /* NAVBAR */
  .navbar {
    position: relative;
    left: 0;
    width: 100%;
  }

  /* SIDEBAR */
  .sidebar {
    position: fixed;
    top: 0;
    left: -260px; /* oculto */
    height: 100vh;
    z-index: 2000;
    transition: left 0.3s ease;
    background: #f8f9fa;
  }

  .sidebar.open {
    left: 0;
  }

  /* CONTENT */
  .content {
    margin-left: 0;
    margin-top: 0;
    padding: 16px;
  }

  .content-inner {
    max-width: 100%;
  }

  /* HERO */
  .hero-section {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  /* CARDS */
  .cards-container,
  .cards-grid {
    grid-template-columns: 1fr !important;
    margin-left: 0;
  }

  /* IMAGENES */
  .guide-image {
    width: 100%;
    max-width: 100%;
  }
}

/* ===== MOBILE EXTRA SMALL ===== */
@media (max-width: 576px) {

  body {
    font-size: 15px;
  }

  h1 {
    font-size: 1.6rem;
  }

  h2 {
    font-size: 1.3rem;
  }

  .service-card {
    padding: 16px;
  }

  .service-btn {
    width: 40px;
    height: 40px;
  }
}


/* =========================
   NAVBAR FULL WIDTH (MOBILE)
   ========================= */
@media (max-width: 576px) {

  .navbar {
    width: 100vw;
    left: 0;
    right: 0;
    padding-left: 12px;
    padding-right: 12px;
  }

  .navbar .container,
  .navbar .container-fluid {
    max-width: 100%;
    padding-left: 0;
    padding-right: 0;
  }
}

/* =========================
   CARDS MOBILE UX
   ========================= */
@media (max-width: 576px) {

  .cards-container,
  .cards-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    margin: 0;
    padding: 0;
    justify-items: center;
  }

  .service-card,
  .usecase-card,
  .home-card {
    width: 100%;
    max-width: 360px; /* cómodo para Galaxy A51 */
    margin: 0 auto;
  }
}

@media (max-width: 576px) {
  .content {
    padding-left: 12px;
    padding-right: 12px;
  }
}


/* =========================
   BOTÓN MENU MOBILE – COLOR CORPORATIVO
   ========================= */
@media (max-width: 991.98px) {

  #sidebarToggle {
    border-color: #262d64;   /* 👈 AQUÍ CAMBIAS EL COLOR */
    color: #262d64;
    background-color: transparent;
  }

  #sidebarToggle i {
    color: #262d64;          /* 👈 ÍCONO */
    font-size: 22px;
  }

  #sidebarToggle:hover,
  #sidebarToggle:focus,
  #sidebarToggle:active {
    background-color: rgba(38, 45, 100, 0.08);
    border-color: #262d64;
    color: #262d64;
    box-shadow: none;
  }
}

/* =====================================
   MOBILE 430px – HEADER LIMPIO
   ===================================== */
@media (max-width: 430px) {

  /* =========================
     BLOQUE SUPERIOR (LOGO + TÍTULO)
     ========================= */

  .fixed-logo {
    position: relative;          /* 🔥 NO sticky */
    display: flex;
    flex-direction: column;      /* uno debajo del otro */
    align-items: center;
    justify-content: center;
    gap: 6px;

    width: 100%;
    padding: 16px 0 10px;
    background: #ffffff;

    /* separación visual */
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.08);
  }

  .fixed-logo img {
    max-width: 170px;
    height: auto;
  }

  /* TÍTULO bajo el logo */
  .fixed-logo::after {
  content: "Base de Conocimiento";
  font-family: Arial, sans-serif;
  font-size: 1.3rem;
  font-weight: 600;
  color: #000000;
  line-height: 1.05;
  text-decoration: none;

  /* subrayado negro personalizado */
  border-bottom: 0.25px solid #000000;
  padding-bottom: 4px;
  display: inline-block;
}

.fixed-logo,
.fixed-logo a {
  text-decoration: none !important;
}


  /* =========================
     NAVBAR
     ========================= */

  .navbar {
    position: relative;   /* 🔥 NO fijo */
    box-shadow: none;
    padding: 10px 12px;
  }

  /* Oculta el título dentro del navbar */
  .navbar-brand {
    display: none;
  }

  /* =========================
     CONTENIDO NAVBAR
     ========================= */

  .navbar .container-fluid {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
  }

  /* Buscador toma el espacio central */
  #searchForm {
    flex: 1;
  }

  #searchForm input {
    width: 100%;
  }

  /* Evita saltos */
  .navbar button {
    white-space: nowrap;
  }
}

/* =========================
   BOTÓN CERRAR SIDEBAR (X)
   ========================= */

.sidebar-header {
  display: flex;
  justify-content: flex-end;
  padding: 12px 16px;
  border-bottom: 1px solid #dee2e6;
}

.sidebar-header .btn-close {
  font-size: 1rem;
}

/* X alineada con el texto del menú */
.sidebar .btn-close {
  padding: 0;
  height: 1.2em;
  width: 1.2em;
}




/* =====================================
   ESTADO BASE (DESKTOP NORMAL)
   ===================================== */

/* Buscador en tamaño original */
#searchForm {
  flex: 0 0 auto;
}

/* =====================================
   OCULTAR TÍTULO + EXPANDIR BUSCADOR
   (DESKTOP REDUCIDO + MOBILE)
   ===================================== */
@media (max-width: 700.98px) {

  /* Oculta el título "Base de Conocimiento" */
  .navbar-brand {
    display: none !important;
  }

  /* Estructura navbar */
  .navbar .container-fluid {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
  }

  /* 🔥 Buscador se expande SOLO aquí */
  #searchForm {
    flex: 1;
    display: flex;
    gap: 8px;
  }

  #searchForm input {
    width: 100%;
  }

  #searchForm button {
    white-space: nowrap;
  }
}

/* =====================================
   DESKTOP GRANDE (TÍTULO VISIBLE)
   ===================================== */
@media (min-width: 992px) {

  .navbar-brand {
    display: block;
  }

  /* Buscador vuelve a tamaño natural */
  #searchForm {
    flex: 0 0 auto;
  }
}
