@import url("https://fonts.googleapis.com/css2?family=Ubuntu:ital,wght@0,300;0,400;0,500;0,700;1,300;1,400;1,500;1,700&display=swap");

:root {
  --sidebar-width: 280px;
  --header-height: 70px;
  --primary-gradient: linear-gradient(135deg, #2c5282 0%, #1a365d 100%);
  --sidebar-bg: #2d3748;
}

body {
  font-family: "Ubuntu", sans-serif !important;
  background: #f5f5f5;
  overflow: hidden;
}
a {
  text-decoration: none !important;
}

/* Header */
.main-header {
  background: white;
  color: black;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1030;
  padding: 25px;
}

.logo-grid {
  display: grid;
  grid-template-columns: repeat(2, 20px);
  gap: 2px;
}

.logo-cell {
  width: 20px;
  height: 20px;
  border-radius: 3px;
}

.logo-cell:nth-child(1) {
  background: #ff8c42;
}
.logo-cell:nth-child(2) {
  background: #5bc0de;
}
.logo-cell:nth-child(3) {
  background: #f0ad4e;
}
.logo-cell:nth-child(4) {
  background: #5cb85c;
}

.header-title h1 {
  font-size: 1.3rem;
  font-weight: 600;
  letter-spacing: 2px;
  margin: 0;
}
.header-title p {
  font-size: 0.75rem;
  opacity: 0.9;
  letter-spacing: 3px;
  text-transform: uppercase;
  margin: 0;
}

.header-options {
  margin-left: 70px;
}
.header-options img {
  max-height: 35px;
  float: left;
}
.header-options p {
  margin: 5px 0 0 5px;
  display: inline-block;
  color: #1c63b0;
}
.header-options a:hover {
  color: #ff8700;
}

.toggle-sidebar-btn {
  background: rgba(0, 0, 0, 0.1);
  border: none;
  color: black;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.toggle-sidebar-btn:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* Sidebar */
.sidebar {
  position: fixed;
  top: 92px;
  left: 0;
  width: var(--sidebar-width);
  height: calc(100vh - var(--header-height));
  background: #1e293b;
  color: white;
  overflow-y: auto;
  transition: transform 0.3s ease;
  z-index: 1020;
  box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
  border-top: 10px solid #ff8700;
}

.sidebar.collapsed {
  transform: translateX(-100%);
}

.sidebar::-webkit-scrollbar {
  width: 8px;
}

.sidebar::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.1);
}

.sidebar::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.3);
  border-radius: 4px;
}

.menu-item {
  cursor: pointer;
}

.menu-header {
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-weight: 500;
  font-size: 0.95rem;
  background: rgba(255, 255, 255, 0.05);
  transition: background 0.2s ease;
}

.menu-header:hover {
  background: rgba(255, 255, 255, 0.1);
}

.chevron {
  transition: transform 0.3s ease;
  font-size: 0.8rem;
}

.menu-item.show .chevron {
  transform: rotate(90deg);
}

.submenu-item {
  padding: 0.75rem 1.5rem 0.75rem 3.5rem;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s ease;
  border-left: 3px solid transparent;
}

.submenu-item:hover {
  background: rgba(255, 255, 255, 0.1);
  border-left-color: #5cb85c;
  padding-left: 3.7rem;
}

/* Main Content */
.main-content {
  margin-left: var(--sidebar-width);
  margin-top: 92px;
  height: calc(100vh - var(--header-height));
  overflow-y: auto;
  transition: margin-left 0.3s ease;
  padding: 2rem;
}

.main-content.expanded {
  margin-left: 0;
}

.main-content::-webkit-scrollbar {
  width: 8px;
}

.main-content::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 4px;
}

/* Quick Links */
/* Contenedor del carrusel */
#quickLinksCarousel {
  position: relative;
}

/* Track horizontal con scroll oculto */
.quick-links-track {
  display: flex;
  overflow: hidden;
  scroll-behavior: smooth;
}

.quick-links {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 1rem;
}
a.quick-link:nth-child(3n + 1) {
  border-top: 3px solid #ff8700;
  width: 160px;
  height: 160px;
}
a.quick-link:nth-child(3n + 2) {
  border-top: 3px solid #1c63b0;
  width: 160px;
  height: 160px;
}
a.quick-link:nth-child(3n) {
  border-top: 3px solid #a7c61b;
  width: 160px;
  height: 160px;
}
.quick-link {
  padding: 1rem;
  background: #f8f9fa;
  border-radius: 8px;
  text-align: center;
  text-decoration: none;
  color: #2d3748;
  transition: all 0.3s ease;
  border: 2px solid transparent;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.2);
}
.quick-link:hover {
  background: #e8f4f8;
  border-color: #5bc0de;
  transform: translateY(-2px);
  color: #2d3748;
}
.quick-link i {
  font-size: 1.8rem;
  margin-bottom: 0.5rem;
}
.quick-link span {
  font-size: 0.85rem;
  font-weight: 500;
}

/* Noticias Destacadas */
.mb-4.noticias-destacadas {
  margin-top: 70px;
}
.noticias-destacadas h3 {
  color: #1c63b0 !important;
}
.noticias-destacadas .news-card {
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
  border-left: 4px solid transparent;
  overflow: hidden;
  height: 350px;
}
.noticias-destacadas .news-card:hover {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
  transform: translateY(-2px);
  border-bottom: 3px solid #ff8700;
}
.noticias-destacadas .news-card-body {
  height: 100%;
  background-size: cover;
}
.noticias-destacadas .news-meta {
  font-size: 0.95rem;
  color: #f29d1b;
  margin-bottom: 0.8rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.noticias-destacadas .news-category {
  display: inline-block;
  padding: 0.3rem 0.8rem;
  background: #e8f4f8;
  color: #2c5282;
  border-radius: 15px;
  font-size: 0.75rem;
  font-weight: 500;
  margin-bottom: 0.8rem;
}
.noticias-destacadas .news-title {
  font-size: 1.2rem;
  font-weight: 600;
  color: #fff;
  margin-bottom: 0.8rem;
  line-height: 1.4;
}
.noticias-destacadas .news-excerpt {
  font-size: 0.9rem;
  color: #666;
  line-height: 1.6;
  margin-bottom: 1rem;
}
.noticias-destacadas .news-shadow {
  background: linear-gradient(
    0deg,
    rgba(0, 0, 0, 0) 0%,
    rgba(0, 0, 0, 0.7) 100%
  );
  padding: 2rem;
  height: 100%;
}
.noticias-destacadas .news-link {
  color: #2c5282;
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}
.noticias-destacadas .news-link:hover {
  color: #1a365d;
}

/* Beneficios */
.mb-4.beneficios {
  margin-top: 70px;
}
.beneficios h3 {
  color: #1c63b0 !important;
}
.beneficios .news-card {
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
  border-left: 4px solid transparent;
  overflow: hidden;
  height: 350px;
}
.beneficios .news-card:hover {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
  transform: translateY(-2px);
  border-bottom: 3px solid #ff8700;
}
.beneficios .news-card-body {
  height: 100%;
  background-size: cover;
}
.beneficios .news-meta {
  font-size: 0.95rem;
  color: #f29d1b;
  margin-bottom: 0.8rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.beneficios .news-category {
  display: inline-block;
  padding: 0.3rem 0.8rem;
  background: #e8f4f8;
  color: #2c5282;
  border-radius: 15px;
  font-size: 0.75rem;
  font-weight: 500;
  margin-bottom: 0.8rem;
}
.beneficios .news-title {
  font-size: 1.2rem;
  font-weight: 600;
  color: #fff;
  margin-bottom: 0.8rem;
  line-height: 1.4;
}
.beneficios .news-excerpt {
  font-size: 0.9rem;
  color: #666;
  line-height: 1.6;
  margin-bottom: 1rem;
}
.beneficios .news-shadow {
  background: linear-gradient(
    0deg,
    rgba(0, 0, 0, 0) 0%,
    rgba(0, 0, 0, 0.7) 100%
  );
  padding: 2rem;
  height: 100%;
}
.beneficios .news-link {
  color: #2c5282;
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}
.beneficios .news-link:hover {
  color: #1a365d;
}

/* Información Destacada */
.mb-3.info-destacada {
  margin: 70px 0 0 0 !important;
}
.info-destacada h3 {
  color: #1c63b0 !important;
}
.row.row-cols-1.row-cols-md-2.row-cols-lg-3.g-4.info-destacada {
  margin-top: 0px !important;
}
.info-destacada {
  margin-top: 0px;
}
.info-destacada .news-card {
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
  overflow: hidden;
  height: 350px;
  padding: 1.2em;
  border: 2px solid #dedede;
}
.info-destacada .news-card:hover {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
  transform: translateY(-2px);
  border-bottom: 3px solid #ff8700;
}
.info-destacada .news-card-body {
  height: 100%;
  background-size: cover;
}
.info-destacada .news-meta {
  font-size: 0.95rem;
  color: #666;
  margin-bottom: 0.8rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.info-destacada .news-category {
  display: inline-block;
  padding: 0.3rem 0.8rem;
  background: #ff8700;
  color: #fff;
  border-radius: 15px;
  font-size: 0.8rem;
  font-weight: 500;
  margin-bottom: 0.8rem;
  text-transform: uppercase;
}
.info-destacada .news-title {
  font-size: 1.4rem;
  font-weight: 600;
  color: #1c63b0;
  margin-bottom: 0.8rem;
  line-height: 1.4;
}
.info-destacada .news-excerpt {
  font-size: 1.1rem;
  color: #666;
  line-height: 1.4;
  margin-bottom: 1rem;
}
.info-destacada .news-shadow {
  background: linear-gradient(
    0deg,
    rgba(0, 0, 0, 0) 0%,
    rgba(0, 0, 0, 0.7) 100%
  );
  padding: 1.2rem;
  height: 100%;
}
.info-destacada .news-link {
  color: #fff;
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  background-color: #1c63b0;
  border-radius: 20px;
  padding: 0.5rem 0.8rem;
}
.info-destacada .news-link:hover {
  color: #fc0;
}

/* Section Cards */
.section-card {
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  padding: 1.5rem;
  transition: all 0.3s ease;
  cursor: pointer;
  border-left: 4px solid transparent;
}

.section-card:hover {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
  transform: translateY(-2px);
  border-left-color: #5bc0de;
}

.section-card i {
  font-size: 2.5rem;
  color: #2c5282;
  margin-bottom: 1rem;
}

.section-card h3 {
  font-size: 1.2rem;
  color: #2d3748;
  margin-bottom: 0.5rem;
}

.section-card p {
  font-size: 0.9rem;
  color: #666;
  margin: 0;
}
/* Separador entre navegación y categorías */
.sidebar-separator {
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  margin: 1rem 1.5rem;
}

/* Título de Categorías */
.sidebar-section-title {
  font-size: 0.7rem;
  letter-spacing: 2px;
  color: #9fb3c8;
  margin: 0.75rem 1.5rem 0.5rem;
  text-transform: uppercase;
}

/* Headers de categorías (no navegación) */
.category-header {
  padding: 0.65rem 1.5rem;
  font-size: 0.85rem;
  color: #e2e8f0;
  background: transparent;
}

.category-header:hover {
  background: rgba(255, 255, 255, 0.08);
}

/* Subcategorías un poco más livianas */
.category-header + .collapse .submenu-item {
  font-size: 0.82rem;
}

.header-logo {
  height: 42px;
  width: auto;
  object-fit: contain;
}

/* Enlaces del menú (evitar azul y subrayado) */
.sidebar a.submenu-item {
  color: inherit;
  text-decoration: none;
}

/* Sidebar full-width en móvil */
@media (max-width: 768px) {
  .sidebar {
    width: 100vw;
    transform: translateX(-100%);
  }

  .sidebar:not(.collapsed) {
    transform: translateX(0);
  }

  .main-content {
    margin-left: 0;
  }
}

/* Enlaces del sidebar: evitar azul */
.sidebar a.menu-header,
.sidebar a.category-header {
  color: inherit;
  text-decoration: none;
}

/* Mantener layout vertical */
.sidebar a {
  display: block;
}

/* Área clickeable completa */
.sidebar a.menu-header {
  width: 100%;
}