.my-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
}

.my-col {
  display: flex;
  flex-direction: column;
}

/* --- Botones de vista --- */
.view-selector {
  margin-bottom: 1.5rem;
}

.view-selector button {
  min-width: 140px;
}

/* ------------------------- */
/*       CALENDARIO          */
/* ------------------------- */

.month-card {
  border: none;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  background-color: #fff;
  transition: background-color 0.2s ease-in-out;
  height: 160px;
  max-height: 180px;
  padding: 0;
  display: flex;
  flex-direction: column;
}

.month-card:hover {
  background-color: #f1f1f1;
}

.month-header {
  background-color: rgba(13, 110, 253, 0.1);
  color: #0d6efd;
  font-size: 0.875rem;
  padding: 0.5rem 0.75rem;
  border-top-left-radius: 8px;
  border-top-right-radius: 8px;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.event-container {
  padding: 1rem;
  overflow-y: auto;
  max-height: 160px;
  scrollbar-width: thin;
  scrollbar-color: #0d6efd #f1f1f1;
}

.event-list {
  list-style: none;
  padding-left: 0;
  margin: 0;
}

.event-list li {
  margin-bottom: 0.5rem;
}

.event-list a {
  text-decoration: none;
  color: #212529;
  display: block;
  font-size: 0.875rem;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  cursor: pointer;
}

.event-list a:hover {
  color: #0d6efd;
}

/* ------------------------- */
/*         LISTA             */
/* ------------------------- */

#vistaLista {
  display: none; /* Oculta de inicio */
}

.lista-mes {
  margin-bottom: 1.5rem;
}

.lista-mes h4 {
  color: #0d6efd;
  font-size: 1rem;
  border-bottom: 1px solid #dee2e6;
  padding-bottom: 0.3rem;
  margin-bottom: 0.7rem;
}

.lista-evento {
  cursor: pointer;
  padding: 6px 4px;
  border-radius: 4px;
  transition: background-color 0.1s ease;
}

.lista-evento:hover {
  background-color: #e7f1ff;
}

.lista-evento strong {
  color: #212529;
}

/* ------------------------- */
/*          MODAL            */
/* ------------------------- */

.custom-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  justify-content: center;
  align-items: center;
  z-index: 9999;
  opacity: 0;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  pointer-events: none;
  visibility: hidden;
  display: flex;
}

.custom-modal.active {
  opacity: 1;
  pointer-events: auto;
  visibility: visible;
}

.modal-content {
  background-color: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
  width: 90%;
  max-width: 400px;
  min-height: 300px;
  overflow: hidden;
}

.modal-header {
  background-color: rgba(13, 110, 253, 0.1);
  color: #0d6efd;
  padding: 0.75rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-body {
  padding: 1rem;
}

.modal-body h5 {
  font-size: 1rem;
  font-weight: bold;
}

.modal-close-btn {
  background: none;
  border: none;
  font-size: 1.25rem;
  color: #0d6efd;
  cursor: pointer;
}


/* Enlaces de niveles */
.nivel-link {
  display: block;
  padding: 12px;
  border-radius: 6px;
  margin-bottom: 6px;
  color: #7367f0 !important;
  background-color: rgba(115, 103, 240, 0.12) !important;
  text-decoration: none;
}

/* Enlaces de secciones */
.seccion-link {
  display: block;
  padding: 10px;
  border-radius: 6px;
  margin-bottom: 6px;
  color: #00cfe8 !important;
  background-color: rgba(0, 207, 232, 0.12) !important;
  text-decoration: none;
}

/* Animaciones para seleccionar niveles y secciones */
/* Animaciones suaves */
.fade-out {
  opacity: 0;
  transition: opacity 0.4s ease;
}

.fade-in {
  opacity: 1;
  transition: opacity 0.4s ease;
}

.hidden {
  display: none;
}

/* Fade + slide hacia arriba */
.fade-slide-out {
  opacity: 0;
  transform: translateY(-10px);
  transition: opacity 0.35s ease, transform 0.35s ease;
}

.fade-slide-in {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.35s ease, transform 0.35s ease;
}



/* Card de Material escolar */
    .post-card {
      transition: transform 0.2s ease, box-shadow 0.2s ease;
      height: 100%;
      border-radius: 8px;
    }

    .post-card:hover {
      transform: translateY(-3px);
      box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    }

    .post-meta {
      display: flex;
      align-items: center;
      gap: 0.6rem;
      font-size: 0.9rem;
      color: #6c757d;
      margin-bottom: 0.8rem;
    }

.post-meta .icon-circle {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  flex-shrink: 0;
}

.post-meta i {
  font-size: 1.2rem;
}

    .post-content h2 {
      margin: 0;
      font-size: 18px;
      color: #212529;
      line-height: 1.4;
      display: -webkit-box;
      -webkit-line-clamp: 2; /* máximo 2 líneas */
      -webkit-box-orient: vertical;
      overflow: hidden;
      text-overflow: ellipsis;
      min-height: 2.8em; /* asegura que todas las cards tengan la misma altura */
    }

    .post-content a {
      text-decoration: none;
      color: inherit;
      transition: color 0.2s ease;
    }

    .post-content a:hover {
      color: var(--primary);
    }


.pub-color-primary {
  color: var(--primary) !important;
  background-color: rgba(6, 187, 204, 0.12) !important;
}

.pub-color-info {
  color: #00cfe8 !important;
  background-color: rgba(0, 207, 232, 0.12) !important;
}

.pub-color-warning {
  color: #ff9f43 !important;
  background-color: rgba(255, 159, 67, 0.12) !important;
}

.pub-color-success {
  color: #28c76f !important;
  background-color: rgba(40, 199, 111, 0.12) !important;
}

.pub-color-danger {
  color: #ea5455 !important;
  background-color: rgba(234, 84, 85, 0.12) !important;
}


/* Div para videos de youtube */
.video-container {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%; /* Relación 16:9 → 9/16 = 0.5625 */
  height: 0;
  overflow: hidden;
}

.video-container iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* =========================
    BLOG POSTS (MISMAS CLASES)
========================== */

.blog-post-img img {
  width: 100%;
  height: 140px;
  object-fit: cover;
  border-radius: 0.5rem;
}

.blog-post-title {
  margin-bottom: 0.25rem;
}

.blog-post-meta {
  font-size: 0.875rem;
  color: var(--bs-secondary-color, #6c757d);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.blog-post-footer {
  margin-top: 0.5rem;
}

/* =========================
    POST COMPLETO
========================== */

.post-header img {
  width: 100%;
  max-height: 420px;
  object-fit: cover;
  border-radius: 0.75rem;
  margin-bottom: 30px;
}

.post-header h2 {
  margin-top: 30px;
  margin-bottom: 0px;
}
.post-meta {
  font-size: 0.875rem;
  color: var(--bs-secondary-color, #6c757d);
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
}

.post-content p {
  line-height: 1.7;
  margin-bottom: 1.25rem;
}

.post-content h2,
.post-content h3 {
  margin-top: 2rem;
  margin-bottom: 1rem;
}

.post-content img {
  max-width: 100%;
  border-radius: 0.5rem;
  margin: 2rem 0;
}

.post-footer {
  border-top: 1px solid rgba(0,0,0,0.1);
  margin-top: 3rem;
  padding-top: 2rem;
}