/* Reset y estilos base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: Arial, sans-serif;
  background-color: #f5f6fa;
  min-height: 100vh;
}

/* Layout principal */
.dashboard {
  display: grid;
  grid-template-columns: 250px 1fr;
  min-height: 100vh;
}

/* Sidebar */
.sidebar {
  background-color: #dc1f26; /* Rojo institucional */
  color: white;
  padding: 20px;
  grid-column: 1;
  grid-row: 1 / span 2;
  display: flex;
  flex-direction: column;
  height: 100%; /* Asegura que ocupe todo el alto */
  position: relative; /* Para posicionar el botón de cerrar sesión */
}

/* Logo container */
.logo-container {
  text-align: center;
  padding: 20px 0 40px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  margin-bottom: 20px;
}

.logo-container img {
  max-width: 150px;
  height: auto;
}

/* Navegación */
.nav-menu {
  flex: 1; /* Toma el espacio disponible */
}

.nav-menu ul {
  list-style: none;
}

.nav-menu ul li {
  margin-bottom: 10px;
}

.nav-menu ul li a {
  color: white;
  text-decoration: none;
  display: block;
  padding: 12px 15px;
  border-radius: 8px;
  transition: all 0.3s ease;
  font-size: 15px;
}

.nav-menu ul li a:hover,
.nav-menu ul li a.active {
  background-color: white;
  color: #dc1f26; /* El mismo rojo del sidebar */
  transform: translateX(5px);
}

/* Estilo para el botón de cerrar sesión */
.nav-menu ul li:last-child {
  position: absolute;
  bottom: 20px;
  left: 0;
  width: 100%;
  padding: 0 20px; /* Mantiene el padding consistente */
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 20px;
}

.nav-menu ul li:last-child a {
  text-align: center;
  background-color: rgba(255, 255, 255, 0.1);
}

.nav-menu ul li:last-child a:hover {
  background-color: white;
  color: #dc1f26;
}
/* Resto de los estilos se mantienen igual */
.main-content {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 20px;
}
.welcome-text h1 {
  color: #1a3875;
  font-size: 1.4rem;
  font-weight: 500;
}

.header {
  background-color: white;
  height: 60px;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}
.header-icons {
  display: flex;
  align-items: center;
  gap: 20px;
}

.header-icons .icon {
  width: 24px;
  height: 24px;
}

.profile-icon img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
}

.top-section {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 20px;
  margin-bottom: 20px;
}

/*Contenedores */

.principal-container,
.second-container {
  background: white;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.third-container {
  background: white;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  margin-bottom: 20px;
}

.fourth-container {
  background: #1a3875;
  color: white;
  padding: 40px;
  border-radius: 8px;
  text-align: center;
}

.principal-container {
  background: white;
  padding: 20px; /* Reducido de 30px */
  border-radius: 15px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.credencial {
  padding: 15px; /* Reducido de 25px */
  border-radius: 8px; /* Reducido de 12px */
}
.credencial-header {
  margin-bottom: 10px;
  padding-bottom: 5px;
  border-bottom: 2px solid #1a3875;
}

.credencial-header h2 {
  color: #1a3875;
  font-size: 1.1rem;
  font-weight: bold;
  margin-bottom: 2px;
}

.credencial-header .nivel {
  font-size: 0.9rem;
  color: #666;
}
.credencial-body {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-top: 15px;
}

.credencial-info {
  flex: 1;
}

.info-item {
  margin-bottom: 8px;
}

.info-item label {
  color: #666;
  font-size: 0.8rem;
  margin-bottom: 2px;
}

.info-item span {
  color: #333;
  font-size: 0.9rem;
}

.credencial-security {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
  padding-left: 15px;
}

.qr-code,
.barcode {
  width: 60px;
  height: 60px;
  padding: 0;
}

.qr-code img,
.barcode img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.security-seal {
  font-size: 0.7rem;
  color: #666;
  text-align: center;
}

/* segundo contenedor*/
.second-container h2 {
  color: #1a3875;
  font-size: 1.2rem;
  margin-bottom: 15px;
}
.second-container {
  padding: 20px;
}

.progress-chain {
  margin: 20px 0;
}

.level-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 15px;
}

.level-icon {
  width: 60px;
  height: 60px;
  background: #f0f4ff;
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin-bottom: 5px;
}

.stars {
  font-size: 12px;
  margin-bottom: 2px;
}

.level-number {
  font-size: 18px;
  font-weight: bold;
  color: #1a3875;
}

.level-name {
  font-size: 14px;
  color: #666;
}

.locked .level-icon {
  background: #f5f5f5;
  opacity: 0.7;
}

.progress-bar {
  height: 8px;
  background: #e0e0e0;
  border-radius: 4px;
  margin: 20px 0;
  position: relative;
}

.progress {
  height: 100%;
  background: linear-gradient(90deg, #1a3875 0%, #2980b9 100%);
  border-radius: 4px;
  transition: width 0.3s ease;
}

.points-info {
  text-align: center;
  margin-top: 20px;
}

.current-points {
  font-size: 24px;
  font-weight: bold;
  color: #1a3875;
  margin-bottom: 5px;
}

.next-level {
  font-size: 14px;
  color: #666;
}

.points-needed {
  font-size: 12px;
  color: #666;
  margin-top: 5px;
}

.locked .level-name {
  color: #999;
}

/* terer contenedor*/
.third-container {
  background: white;
  padding: 20px;
}

.expiration-alert {
  border: 1px solid #ffe5e5;
  border-left: 4px solid #ff4d4d;
  border-radius: 8px;
  padding: 20px;
  background: #fff8f8;
}

.alert-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 15px;
  padding-bottom: 10px;
  border-bottom: 1px solid #ffe5e5;
}

.alert-header h3 {
  color: #ff4d4d;
  font-size: 1.1rem;
  margin: 0;
}

.certificate-info {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.cert-name {
  display: flex;
  align-items: center;
  gap: 10px;
}

.cert-name h4 {
  margin: 0;
  color: #1a3875;
  font-size: 1rem;
}

.level-tag {
  background: #1a3875;
  color: white;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 0.8rem;
}

.expiration-info {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 10px 0;
}

.countdown {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.countdown .days {
  font-size: 1.8rem;
  font-weight: bold;
  color: #ff4d4d;
}

.countdown .label {
  font-size: 0.8rem;
  color: #666;
}

.exp-date {
  color: #666;
  font-size: 0.9rem;
}

.renewal-action {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
}

.renew-btn {
  background: #ff4d4d;
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 6px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.3s ease;
  width: 100%;
}

.renew-btn:hover {
  background: #ff3333;
}

.help-text {
  font-size: 0.8rem;
  color: #666;
  text-align: center;
}

/* cuarto contenedor*/
.fourth-container {
  background: white;
  padding: 25px;
  border-radius: 8px;
}

.fourth-container h2 {
  color: #1a3875;
  margin-bottom: 20px;
  font-size: 1.2rem;
}

.certifications-list {
  display: flex;
  gap: 15px;
  overflow-x: auto;
  padding-bottom: 10px;
}

.cert-card {
  min-width: 200px;
  background: #f8f9fa;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 15px;
  transition: transform 0.2s;
}

.cert-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.cert-status {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.8rem;
  margin-bottom: 10px;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.active .status-dot {
  background: #28a745;
}

.active {
  color: #28a745;
}

.in-progress .status-dot {
  background: #ffc107;
}

.in-progress {
  color: #ffc107;
}

.expired .status-dot {
  background: #dc3545;
}

.expired {
  color: #dc3545;
}

.cert-card h3 {
  color: #1a3875;
  font-size: 1rem;
  margin-bottom: 10px;
}

.cert-details {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.date {
  font-size: 0.75rem;
  color: #666;
}

.score {
  font-size: 0.85rem;
  color: #333;
  font-weight: 500;
  margin-top: 5px;
}

/*quinto contenedor*/
/* Estilos para el Contenedor de Cursos */
.courses-container {
  background: white;
  padding: 25px;
  border-radius: 8px;
  margin-bottom: 20px;
}

.courses-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.courses-header h2 {
  color: #1a3875;
  font-size: 1.2rem;
}

.new-badge {
  background: #ff4d4d;
  color: white;
  padding: 4px 12px;
  border-radius: 15px;
  font-size: 0.8rem;
}

.courses-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.course-card {
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 20px;
  position: relative;
}

.course-tag {
  position: absolute;
  top: 10px;
  right: 10px;
  background: #1a3875;
  color: white;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 0.7rem;
}

.course-card h3 {
  color: #1a3875;
  font-size: 1rem;
  margin-bottom: 10px;
  padding-right: 50px;
}

.course-details,
.course-duration {
  color: #666;
  font-size: 0.9rem;
  margin-bottom: 5px;
}

.enroll-btn {
  background: #1a3875;
  color: white;
  border: none;
  padding: 8px 20px;
  border-radius: 5px;
  margin-top: 15px;
  cursor: pointer;
  transition: background 0.3s;
}

.enroll-btn:hover {
  background: #142d5e;
}

/* Estilos para el Contenedor de Voluntariado */
.volunteer-container {
  background: white;
  padding: 25px;
  border-radius: 8px;
}

.volunteer-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 25px;
}

.volunteer-header h2 {
  color: #1a3875;
  font-size: 1.2rem;
}

.total-hours {
  text-align: center;
}

.hours-number {
  font-size: 2rem;
  color: #1a3875;
  font-weight: bold;
  display: block;
}

.hours-label {
  font-size: 0.9rem;
  color: #666;
}

.hours-summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 15px;
  margin-bottom: 25px;
}

.stat-box {
  background: #f8f9fa;
  padding: 15px;
  border-radius: 8px;
  text-align: center;
}

.stat-label {
  font-size: 0.8rem;
  color: #666;
  display: block;
  margin-bottom: 5px;
}

.stat-value {
  font-size: 1.1rem;
  color: #1a3875;
  font-weight: 500;
}

.check-controls {
  display: flex;
  gap: 15px;
  align-items: center;
  justify-content: center;
}

.check-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 25px;
  border: none;
  border-radius: 6px;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s;
}

.checkin {
  background: #28a745;
  color: white;
}

.checkout {
  background: #dc3545;
  color: white;
}

.check-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.status-text {
  font-size: 0.9rem;
  color: #666;
  margin-left: 15px;
}
