.menu-icon {
   font-size: 24px;
   cursor: pointer;
   user-select: none;
}
.logo {
   position: absolute;
   left: 50%;
   transform: translateX(-50%);
   display: flex;
   align-items: center;
   font-size: 24px;
   font-weight: bold;
   text-align: center;
}
.logo img {
   height: 40px;
   width: auto;
}
.icons {
   display: flex;
   gap: 15px;
}
.icon {
   position: relative;
   font-size: 22px;
   cursor: pointer;
   text-decoration: none;
   color: inherit;
}
.icon::after {
   content: attr(data-count);
   position: absolute;
   top: -5px;
   right: -10px;
   background: red;
   color: white;
   font-size: 10px;
   font-family: sans-serif;
   border-radius: 50%;
   padding: 2px 5px;
   display: none;
}
.icon[data-count]:not([data-count="0"])::after {
   display: block;
}
.header {
   background-color: var(--blanco);
   box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
   position: fixed;
   top: 0;
   left: 0;
   width: 100%;
   height: var(--header-height);
   display: flex;
   align-items: center;
   justify-content: space-between;
   padding: 0 20px;
   z-index: 1000;
   transition: background-color 0.3s, box-shadow 0.3s;
}
header {
    position: relative; /* O la posición que tuviera por defecto */
    width: 100%;
    z-index: 1000;
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}
header.scrolled {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}
.fixed-height {
   height: auto;
   object-fit: cover;
}
.tx-tit {
   text-decoration: none!important;
   color: #408ccf;
}
.tx-tit:hover {
   text-decoration: underline!important;
   color: #4576a1;
}
/* Estilos para pantallas más grandes (no móviles) */

.img-fluid:hover {
   transition: 0.3s;
   transform: scale(1.05);
}
@media (min-width: 768px) {
   .custom-container {
      width: 273px;
      height: 273px;
   }
   .custom-img-style {
      max-width: 100%;
      max-height: 100%;
      object-fit: contain;
   }
}
/* Estilos para dispositivos móviles */

.observation-input input {
   border-color: var(--color-borde-input);
}
/*sidebar*/

/* Sidebar Styles */

.sidebar {
   height: 100%;
   width: 0;
   /* Initially hidden */
   position: fixed;
   z-index: 1000;
   top: 0;
   left: 0;
   background-color: #333;
   overflow-x: hidden;
   transition: 0.5s;
   /* Smooth transition for opening/closing */
   padding-top: 60px;
   /* Space for potential close button or top content */
   box-shadow: 2px 0 5px rgba(0, 0, 0, 0.2);
}
.sidebar a {
   padding: 15px 25px;
   text-decoration: none;
   font-size: 18px;
   color: #f1f1f1;
   display: block;
   transition: 0.3s;
}
.sidebar a:hover {
   color: #fff;
   background-color: #575757;
}
/* Sidebar Search Input */

.sidebar #sidebar-search {
   width: calc(100% - 50px);
   /* Account for padding */
   padding: 10px;
   margin: 15px 25px;
   border: 1px solid #575757;
   border-radius: 5px;
   background-color: #444;
   color: #f1f1f1;
   font-size: 16px;
}
.sidebar #sidebar-search::placeholder {
   color: #bbb;
}
/* Accordion Sections in Sidebar */

.accordion-section {
   border-top: 1px solid #444;
}
.accordion-header {
   padding: 15px 25px;
   color: #f1f1f1;
   font-size: 18px;
   cursor: pointer;
   display: flex;
   justify-content: space-between;
   align-items: center;
   background-color: #3a3a3a;
}
.accordion-header:hover {
   background-color: #575757;
}
/* Add a plus/minus icon for accordion header */

.accordion-header::after {
   content: '+';
   font-size: 20px;
   transition: transform 0.3s ease;
}
.accordion-header.active::after {
   content: '-';
   transform: rotate(0deg);
   /* Reset rotation for minus */
}
.accordion-content {
   max-height: 0;
   overflow: hidden;
   transition: max-height 0.3s ease-out;
   background-color: #444;
}
.accordion-content a {
   padding: 10px 35px;
   /* Indent sub-items */
   font-size: 16px;
   color: #ddd;
}
.accordion-content a:hover {
   background-color: #555;
   color: #fff;
}
/* Media Queries for Responsiveness */

@media (min-width: 768px) {
   .logo {
      position: relative;
      left: 0;
      transform: none;
      text-align: left;
   }
   .menu-icon {
      display: none !important;
      /* Hide menu icon on larger screens */
   }
   .sidebar {
      /* On larger screens, you might want to hide the sidebar completely
           or integrate a horizontal navigation. For this example, we'll
           keep it hidden unless explicitly opened, as a desktop sidebar. */
      width: 0;
      /* Keep it hidden by default */
      /* If you want a constantly visible sidebar on desktop,
           you'd change this and adjust main content accordingly */
   }
}
/* Styles for small screens (mobile) - Default */

body.offcanvas-open {
   overflow: hidden;
}
.offcanvas-menu {
   position: fixed;
   top: 0;
   left: -300px;
   /* Inicia oculto a la izquierda */
   width: 300px;
   height: 100%;
   background-color: var(--blanco);
   box-shadow: 0 0 20px rgba(0, 0, 0, 0.2);
   z-index: 1050;
   /* Por encima de todo */
   transition: left 0.3s ease-in-out;
   display: flex;
   flex-direction: column;
}
.offcanvas-menu.is-open {
   left: 0;
   /* Lo mueve a la vista */
}
.offcanvas-header {
   display: flex;
   justify-content: space-between;
   align-items: center;
   padding: 15px 20px;
   border-bottom: 1px solid #eee;
}
.offcanvas-header h5 {
   margin: 0;
   font-weight: 600;
}
.close-menu {
   border: none;
   background: none;
   font-size: 2rem;
   line-height: 1;
   cursor: pointer;
   color: var(--gris-medio);
}
.offcanvas-content {
   padding: 20px;
   overflow-y: auto;
   /* Permite scroll si el contenido es largo */
   flex-grow: 1;
}
.offcanvas-overlay {
   position: fixed;
   top: 0;
   left: 0;
   width: 100%;
   height: 100%;
   background-color: rgba(0, 0, 0, 0.5);
   z-index: 1040;
   opacity: 0;
   visibility: hidden;
   transition: opacity 0.3s ease-in-out, visibility 0.3s ease-in-out;
}
.offcanvas-overlay.is-open {
   opacity: 1;
   visibility: visible;
}
/* Estilos para el contenido dentro del menú */

.menu-section {
   margin-bottom: 25px;
   border-bottom: 1px solid #f0f0f0;
   padding-bottom: 15px;
}
.menu-section-title {
   font-size: 0.9rem;
   font-weight: 600;
   color: var(--gris-medio);
   text-transform: uppercase;
   letter-spacing: 1px;
   margin-bottom: 15px;
}
.menu-link {
   display: block;
   padding: 10px 0;
   color: var(--gris-oscuro);
   font-weight: 500;
   transition: var(--transicion);
}
.menu-link:hover {
   color: var(--naranja-fuerte);
}
/* Hacemos que los filtros dentro del menú se vean bien */

.offcanvas-content .sidebar-title {
   display: none;
}
.offcanvas-content .search-box input {
   width: 100%;
}
.offcanvas-content .accordion-pc-section {
   margin-top: 0;
   padding-top: 0;
   border-top: none;
}
.offcanvas-content .accordion-pc-header {
   padding: 10px 0;
}
/* --- Sidebar PC (sin cambios de estilo, solo se muestra en LG) --- */

.sidebar-pc {
   background: var(--blanco);
   padding: 25px 20px;
   border-radius: var(--radio-borde);
   box-shadow: var(--sombra);
}
.sidebar-title {
   font-size: 1.25rem;
   font-weight: 600;
   color: var(--gris-oscuro);
   margin-bottom: 20px;
   position: relative;
   padding-bottom: 10px;
}
.sidebar-title::after {
   content: "";
   position: absolute;
   bottom: 0;
   left: 0;
   width: 100%;
   height: 3px;
   background: var(--naranja-fuerte);
}
.search-box input {
   border: 1px solid #ddd;
   border-radius: var(--radio-borde);
   padding: 10px 15px;
   width: 100%;
   transition: var(--transicion);
}
.search-box input:focus {
   border-color: var(--naranja-fuerte);
   box-shadow: 0 0 0 2px rgba(255, 111, 0, 0.2);
}
.quick-links .qlink {
   display: block;
   /* padding: 10px 15px;*/
   color: var(--gris-medio);
   text-decoration: none;
   border-radius: 8px;
   font-weight: 500;
   transition: var(--transicion);
   margin-bottom: 5px;
}
.quick-links .qlink:hover, .quick-links .qlink.active {
   background: var(--naranja-suave);
   color: var(--naranja-fuerte);
}
.accordion-pc-section {
   border-top: 1px solid #eee;
   margin-top: 15px;
   padding-top: 15px;
}
.accordion-pc-header {
   font-weight: 600;
   padding: 10px 0;
   cursor: pointer;
   color: var(--gris-oscuro);
   display: flex;
   justify-content: space-between;
   align-items: center;
}
.accordion-pc-header::after {
   content: '\f078';
   font-family: 'Font Awesome 5 Free';
   font-weight: 900;
   transition: transform 0.3s ease;
}
.accordion-pc-header.active::after {
   transform: rotate(-180deg);
}
.accordion-pc-content {
   max-height: 0;
   overflow: hidden;
   transition: max-height 0.4s ease-out;
}
.accordion-link {
   display: block;
   padding: 8px 10px;
   color: var(--gris-medio);
   text-decoration: none;
   border-radius: 6px;
   transition: var(--transicion);
}
.accordion-link:hover {
   color: var(--naranja-fuerte);
   background-color: var(--naranja-suave);
}