/* ============================================================
   Courses  -  galeria de 6 tarjetas simetricas
   Diseño profesional de venta con acento naranja #e77235
   ============================================================ */

/* Columnas estiran su tarjeta a la misma altura */
.couses-sec .course-gallery > [class*="col"] {
  display: flex;
}

/* --- Tarjeta --- */
.couses-sec .course-card {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  padding: 0;
  gap: 0;
  background: #ffffff;
  border: 1px solid #ECEEF1;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 10px 30px -22px rgba(23, 56, 86, 0.4);
  transition: transform 0.35s ease, box-shadow 0.35s ease, border-color 0.35s ease;
}
.couses-sec .course-card:hover {
  transform: translateY(-6px);
  border-color: #e77235;
  box-shadow: 0 28px 50px -22px rgba(231, 114, 53, 0.45);
}

/* --- Imagen a sangre y uniforme --- */
.couses-sec .course-card .card-img,
.couses-sec .course-card .card-img img {
  border-radius: 0;
}
.couses-sec .course-card .card-img img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}
.couses-sec .course-card:hover .card-img img {
  transform: scale(1.06);
}

/* --- Badge de categoria naranja sobre la imagen --- */
.couses-sec .course-card .card-content .tag {
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: 3;
  margin: 0 !important;
  padding: 6px 14px;
  border-radius: 100px;
  background-color: #e77235;
  color: #ffffff;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  box-shadow: 0 8px 18px -8px rgba(231, 114, 53, 0.85);
}

/* --- Contenido --- */
.couses-sec .course-card .card-content {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  padding: clamp(18px, 1.4vw, 26px);
}

/* Titulo: 2 lineas fijas, cambia a naranja en hover (sin subrayado) */
.couses-sec .course-card .card-content > .h5 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 12px !important;
  color: #173856;
  transition: color 0.3s ease;
}
.couses-sec .course-card:hover .card-content > .h5 {
  text-decoration: none;
  color: #e77235;
}

/* Descripcion */
.course-card .course-desc {
  color: #5b6b7a;
  font-size: 14px;
  line-height: 1.55;
  margin-top: 2px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.couses-sec .course-card .course-desc {
  min-height: calc(1.55em * 2);
}

/* --- Meta: lecciones / alumnos --- */
.couses-sec .course-card .card-content .card-vec {
  width: 20px;
  height: 20px;
  object-fit: contain;
  flex-shrink: 0;
}
.couses-sec .course-card .card-content .subtitle {
  font-size: 13px;
  color: #5b6b7a;
  margin: 0;
  white-space: nowrap;
}

/* --- Estrellas de rating --- */
.couses-sec .course-card .card-content .d-flex img[src*="star"] {
  width: 15px;
  height: 15px;
}

/* Divisor + footer empujados al fondo (simetria) */
.couses-sec .course-card .card-content > .hr-line {
  margin-top: auto;
}
.couses-sec .course-card .card-content > .hr-line.bg-lightest-gray {
  height: 1px;
  background: #ECEEF1;
  border: 0;
}

/* --- Footer: precio arriba, boton a todo el ancho --- */
.couses-sec .course-card .card-foot {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.couses-sec .course-card .card-price {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px;
  line-height: 1;
}
.couses-sec .course-card .card-price .price-now {
  color: #e77235;
  font-size: clamp(22px, 1.5vw, 26px);
  font-weight: 800;
  letter-spacing: -0.01em;
  white-space: nowrap;
}
.couses-sec .course-card .card-price .price-old {
  color: #9aa6b1;
  font-size: 15px;
  font-weight: 500;
  text-decoration: line-through;
  white-space: nowrap;
}

/* Boton "Agregar al carrito": ancho completo, sin desborde */
.couses-sec .course-card .card-cart-btn.cus-btn {
  width: 100%;
  padding: 13px 18px;
  border-radius: 100px;
}
.couses-sec .course-card .card-cart-btn.cus-btn .text {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  width: auto;
  font-size: 15px;
  white-space: nowrap;
}
.couses-sec .course-card .card-cart-btn.cus-btn .text i {
  font-size: 14px;
  transition: transform 0.3s ease;
}
.couses-sec .course-card .card-cart-btn.cus-btn:hover .text i {
  transform: translateX(-2px);
}

/* ============================================================
   Sidebar de filtros (vertical, interactivo)
   ============================================================ */
.cf-panel {
  background: #ffffff;
  border: 1px solid #ECEEF1;
  border-radius: 18px;
  padding: clamp(18px, 1.4vw, 26px);
  box-shadow: 0 14px 34px -26px rgba(23, 56, 86, 0.4);
  /* position: sticky; */
  top: 24px;
}
.cf-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 14px;
  margin-bottom: 6px;
  border-bottom: 1px solid #EEF1F4;
}
.cf-panel-title { margin: 0; color: #173856; font-weight: 600; font-size: 18px; }
.cf-reset {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 0;
  background: transparent;
  color: #8a97a4;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: color 0.25s ease;
}
.cf-reset:hover { color: #e77235; }

/* Grupos colapsables */
.cf-group { border-bottom: 1px solid #EEF1F4; }
.cf-group-head {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 2px;
  border: 0;
  background: transparent;
  color: #173856;
  font-family: "Inter", sans-serif;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}
.cf-ind {
  position: relative;
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}
.cf-ind::before,
.cf-ind::after {
  content: "";
  position: absolute;
  background: #173856;
  transition: transform 0.3s ease, opacity 0.3s ease;
}
.cf-ind::before { top: 7px; left: 0; width: 16px; height: 2px; }
.cf-ind::after { left: 7px; top: 0; width: 2px; height: 16px; }
.cf-group.is-open .cf-ind::after { transform: scaleY(0); opacity: 0; }
.cf-group.is-open .cf-ind::before { background: #e77235; }

.cf-group-body {
  display: grid;
  grid-template-rows: 0fr;
  overflow: hidden;
  transition: grid-template-rows 0.3s ease;
}
.cf-group.is-open .cf-group-body { grid-template-rows: 1fr; }
.cf-group-body > * { min-height: 0; }
.cf-group-body {
  padding: 0;
}
.cf-group.is-open .cf-group-body { padding-bottom: 16px; }

/* Checkboxes */
.cf-check {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 2px;
  margin: 0;
  cursor: pointer;
  color: #45474F;
  font-size: 14px;
  transition: color 0.2s ease;
}
.cf-check input { position: absolute; opacity: 0; width: 0; height: 0; }
.cf-box {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  border-radius: 6px;
  border: 2px solid #D5DBE1;
  position: relative;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}
.cf-box::after {
  content: "";
  position: absolute;
  left: 6px;
  top: 2px;
  width: 5px;
  height: 10px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg) scale(0);
  transition: transform 0.2s ease;
}
.cf-check input:checked + .cf-box {
  background: #e77235;
  border-color: #e77235;
}
.cf-check input:checked + .cf-box::after { transform: rotate(45deg) scale(1); }
.cf-check:hover { color: #173856; }
.cf-check:hover .cf-box { border-color: #e77235; }
.cf-check input:focus-visible + .cf-box { outline: 3px solid rgba(231, 114, 53, 0.4); outline-offset: 2px; }
.cf-txt { flex: 1; }
.cf-count {
  color: #9aa6b1;
  font-size: 12px;
  font-weight: 600;
}

/* Boton aplicar */
.cf-apply {
  width: 100%;
  margin-top: 18px;
  padding: 13px 16px;
  border: 1px solid #173856;
  border-radius: 100px;
  background: #173856;
  color: #ffffff;
  font-family: "Inter", sans-serif;
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  transition: background-color 0.25s ease, box-shadow 0.25s ease, transform 0.2s ease;
}
.cf-apply:hover { background: #e77235; border-color: #e77235; box-shadow: 0 16px 30px -14px rgba(231, 114, 53, 0.8); }
.cf-apply:active { transform: scale(0.98); }

/* Estado sin resultados */
.cf-empty {
  display: none;
  text-align: center;
  padding: 60px 20px;
  color: #8a97a4;
  font-size: 15px;
}
.cf-empty.is-visible { display: block; }

/* Animacion de filtrado */
.course-item.is-hidden { display: none !important; }
.course-item.is-paged-out { display: none !important; }
.course-item.is-showing { animation: catFadeIn 0.45s ease both; }
@keyframes catFadeIn {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: none; }
}

/* ============================================================
   Paginador de cursos (client-side)
   ============================================================ */
.cf-pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 40px;
  width: 100%;
}
.cf-page-btn {
  min-width: 44px;
  height: 44px;
  padding: 0 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1.5px solid #E2E6EB;
  border-radius: 12px;
  background: #fff;
  color: #173856;
  font-family: "Inter", sans-serif;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.25s ease, border-color 0.25s ease,
              color 0.25s ease, box-shadow 0.25s ease, transform 0.15s ease;
}
.cf-page-btn:hover:not(.is-active):not(.is-disabled) {
  border-color: #e77235;
  color: #e77235;
  box-shadow: 0 10px 20px -14px rgba(231, 114, 53, 0.8);
  transform: translateY(-2px);
}
.cf-page-btn:active { transform: scale(0.95); }
.cf-page-btn.is-active {
  background: #e77235;
  border-color: #e77235;
  color: #fff;
  box-shadow: 0 12px 22px -12px rgba(231, 114, 53, 0.85);
  cursor: default;
}
.cf-page-btn.is-disabled {
  opacity: 0.4;
  cursor: not-allowed;
  box-shadow: none;
}
.cf-page-btn.cf-page-arrow { padding: 0; }
.cf-page-btn.cf-page-arrow svg { display: block; }
.cf-page-dots {
  min-width: 24px;
  text-align: center;
  color: #9aa6b1;
  font-weight: 700;
  user-select: none;
}

@media (max-width: 991px) {
  .cf-panel { position: static; margin-bottom: 32px; }
}

/* Meta (lecciones/alumnos): permite bajar de linea en tarjetas angostas
   en lugar de recortar el numero (p.ej. "Alumnos 3,450") */
.couses-sec .course-card .card-meta {
  flex-wrap: wrap;
  row-gap: 6px;
}

/* ============================================================
   Cursos relacionados — carrusel dinamico e interactivo
   ============================================================ */
.related-courses-sec .related-courses-arrows {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-shrink: 0;
}
.related-courses-sec .related-courses-arrows .arrow-btn {
  width: 54px;
  height: 54px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1.5px solid #E2E6EB;
  background: #fff;
  box-shadow: 0 8px 20px -14px rgba(23, 56, 86, 0.55);
  cursor: pointer;
  transition: background-color 0.3s ease, border-color 0.3s ease,
              box-shadow 0.3s ease, transform 0.2s ease;
}
.related-courses-sec .related-courses-arrows .arrow-btn svg {
  width: 22px;
  height: 22px;
  transition: transform 0.3s ease;
}
.related-courses-sec .related-courses-arrows .arrow-btn svg path {
  transition: fill 0.3s ease;
}
.related-courses-sec .related-courses-arrows .arrow-btn:hover {
  background: #e77235;
  border-color: #e77235;
  box-shadow: 0 16px 28px -14px rgba(231, 114, 53, 0.7);
  transform: translateY(-2px);
}
.related-courses-sec .related-courses-arrows .arrow-btn:hover svg path {
  fill: #ffffff;
}
.related-courses-sec .related-courses-arrows .btn-prev:hover svg {
  transform: translateX(-3px);
}
.related-courses-sec .related-courses-arrows .btn-next:hover svg {
  transform: translateX(3px);
}
.related-courses-sec .related-courses-arrows .arrow-btn:active {
  transform: scale(0.94);
}
/* Estado deshabilitado (carrusel no infinito, en los extremos) */
.related-courses-sec .related-courses-arrows .arrow-btn.is-disabled {
  opacity: 0.4;
  pointer-events: none;
  box-shadow: none;
}

/* Pista del carrusel */
.related-courses-carousel {
  margin: 0 -12px;
  visibility: hidden;
}
.related-courses-carousel.slick-initialized {
  visibility: visible;
}
.related-courses-carousel .slick-list {
  padding: 10px 0 18px;
  margin: 0;
}
.related-courses-carousel .slick-track {
  display: flex !important;
  align-items: stretch;
}
.related-courses-carousel .slick-slide {
  height: auto;
  padding: 0 12px;
}
.related-courses-carousel .slick-slide > div,
.related-courses-carousel .related-course-slide {
  height: 100%;
  display: flex;
}
.related-courses-carousel .course-card {
  width: 100%;
}

/* Dots interactivos */
.related-courses-dots {
  display: flex;
  justify-content: center;
  margin-top: 8px;
}
.related-courses-dots .slick-dots {
  position: static;
  display: flex !important;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.related-courses-dots .slick-dots li {
  width: auto;
  height: auto;
  margin: 0;
}
.related-courses-dots .slick-dots li button {
  width: 9px;
  height: 9px;
  padding: 0;
  border-radius: 50%;
  border: 0;
  background: #D5DBE1;
  cursor: pointer;
  transition: width 0.3s ease, background-color 0.3s ease;
}
.related-courses-dots .slick-dots li button::before {
  display: none;
}
.related-courses-dots .slick-dots li.slick-active button {
  width: 26px;
  border-radius: 100px;
  background: #e77235;
}
.related-courses-dots .slick-dots li:not(.slick-active) button:hover {
  background: #91A0AC;
}

/* Arrows: en pantallas pequenas centradas bajo el titulo */
@media (max-width: 575px) {
  .related-courses-sec .related-courses-arrows .arrow-btn {
    width: 48px;
    height: 48px;
  }
}

/* ============================================================
   Detalle de curso — hero, meta, "que aprenderas", tarjeta
   ============================================================ */
/* Menos aire vertical vacio en el hero */
.course-detail-sec .topblock {
  padding: 56px 0 96px;
}
@media (max-width: 1025px) {
  .course-detail-sec .topblock { padding: 40px 0; }
}

/* Breadcrumb */
.course-detail-sec .cd-breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 14px;
}
.course-detail-sec .cd-breadcrumb a {
  color: #6b7a88;
  text-decoration: none;
  transition: color 0.25s ease;
}
.course-detail-sec .cd-breadcrumb a:hover { color: #e77235; }
.course-detail-sec .cd-breadcrumb .cd-sep { color: #b7c1c9; }
.course-detail-sec .cd-breadcrumb .cd-current { color: #173856; font-weight: 600; }

/* Badge de categoria */
.course-detail-sec .cd-cat-badge {
  display: inline-block;
  padding: 6px 16px;
  border-radius: 100px;
  background: rgba(231, 114, 53, 0.12);
  color: #e77235;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

/* Lead */
.course-detail-sec .cd-lead {
  max-width: 640px;
  color: #5b6b7a;
  font-size: clamp(15px, 1.05vw, 17px);
  line-height: 1.6;
}

/* Meta pills (clases, alumnos, duracion, nivel) */
.course-detail-sec .cd-meta-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 12px;
}
.course-detail-sec .cd-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 100px;
  background: #fff;
  border: 1px solid #E4E8EC;
  color: #173856;
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
}
.course-detail-sec .cd-pill i { color: #e77235; font-size: 14px; }

/* Fila de instructor / actualizacion / rating: agrupada, no dispersa */
.course-detail-sec .topblock .tblock-content {
  justify-content: flex-start;
  align-items: center;
  gap: clamp(28px, 3.5vw, 72px);
  row-gap: 24px;
}
.course-detail-sec .topblock .tblock-content > div + div {
  position: relative;
}
.course-detail-sec .topblock .tblock-content p:first-child {
  font-size: 13px;
  color: #8a97a4;
  margin-bottom: 2px;
}
.course-detail-sec .cd-rating-block img { width: 16px; height: 16px; }

/* Caja "Que aprenderas" — checklist a 2 columnas */
.course-detail-sec .cd-learn-box {
  padding: clamp(20px, 1.8vw, 32px);
  border: 1px solid #ECEEF1;
  border-radius: 16px;
  background: #FBFCFD;
}
.course-detail-sec .cd-learn-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px 28px;
  margin: 0;
  padding: 0;
  list-style: none;
}
@media (max-width: 575px) {
  .course-detail-sec .cd-learn-grid { grid-template-columns: 1fr; }
}
.course-detail-sec .cd-learn-grid li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  color: #3f5061;
  font-size: 15px;
  line-height: 1.5;
}
.course-detail-sec .cd-learn-grid li i {
  color: #e77235;
  font-size: 18px;
  flex-shrink: 0;
  margin-top: 1px;
}

/* Tarjeta lateral: precio y boton mas claros */
.course-detail-sec .detail-wrapper .detail-card .cd-price {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 10px;
  margin-bottom: 20px;
}
.course-detail-sec .detail-wrapper .detail-card .cd-price .now {
  color: #173856;
  font-size: clamp(26px, 2vw, 32px);
  font-weight: 800;
}
.course-detail-sec .detail-wrapper .detail-card .cd-price .old {
  color: #9aa6b1;
  font-size: 17px;
  font-weight: 500;
  text-decoration: line-through;
}
.course-detail-sec .detail-wrapper .detail-card form .cus-btn { border-radius: 100px; }
.course-detail-sec .detail-wrapper .detail-card .c-contant .block-1 p { font-size: 15px; }
.course-detail-sec .detail-wrapper .detail-card .c-contant .block-1 > div p { color: #5b6b7a; }
.course-detail-sec .detail-wrapper .detail-card .c-contant .block-1 > p { color: #173856; font-weight: 600; }
