/* Estilos modernos para la sección de cursos */
.courses-section, .courses-main {
  background-color: #ffffff;
  position: relative;
  overflow: hidden;
  padding: 80px 0;
}

.courses-section .container {
  position: relative;
  z-index: 2;
}

.courses-header {
  text-align: center;
  max-width: 800px;
  margin: 0 auto 50px;
}

.courses-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  margin-top: 40px;
  position: relative;
}

.course-card {
  background-color: white;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  transition: all 0.3s ease;
  border: 1px solid rgba(0, 0, 0, 0.08);
  height: 100%;
  display: flex;
  flex-direction: column;
  position: relative;
  z-index: 1;
}

.course-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 5px;
  background: linear-gradient(90deg, var(--primary-color) 0%, #2a7cc7 100%);
  z-index: 2;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s ease;
}

.course-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
  border-color: rgba(0, 0, 0, 0.1);
}

.course-card:hover::before {
  transform: scaleX(1);
}

.course-image {
  position: relative !important; /* Forzar posición relativa */
  height: 220px;
  overflow: hidden;
  z-index: 1; /* Asegurar que tenga un contexto de apilamiento */
}

.course-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: all 0.5s ease;
}

.course-card:hover .course-image img {
  transform: scale(1.1);
}

.course-badge {
  position: absolute;
  top: 15px;
  right: 0;
  background-color: #053679; /* Color azul directo en lugar de usar la variable */
  color: white;
  padding: 8px 15px;
  font-size: 12px;
  font-weight: 600;
  border-radius: 4px 0 0 4px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  z-index: 3;
}

.course-content {
  padding: 25px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.course-content h3 {
  font-size: 20px;
  margin-bottom: 15px;
  color: #333;
  font-weight: 600;
  line-height: 1.3;
}

.course-meta {
  display: flex;
  gap: 15px;
  margin-bottom: 15px;
  color: #666;
  font-size: 14px;
}

.course-meta span {
  display: flex;
  align-items: center;
}

.course-meta i {
  margin-right: 5px;
  color: var(--primary-color);
}

.course-content p {
  color: #666;
  margin-bottom: 20px;
  line-height: 1.6;
  flex-grow: 1;
}

.course-footer {
  margin-top: auto;
}

.course-footer .btn-outline {
  width: 100%;
  text-align: center;
  padding: 12px;
  border: 2px solid var(--primary-color);
  border-radius: 30px;
  font-weight: 500;
  transition: all 0.3s ease;
  display: inline-block;
  position: relative;
  overflow: hidden;
  z-index: 1;
  color: var(--primary-color);
}

.course-footer .btn-outline::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: var(--primary-color);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.4s ease;
  z-index: -1;
}

.course-footer .btn-outline:hover {
  color: white;
}

.course-footer .btn-outline:hover::before {
  transform: scaleX(1);
  transform-origin: left;
}

.view-all-courses {
  text-align: center;
  margin-top: 50px;
}

.view-all-courses .btn {
  padding: 15px 40px;
  font-size: 16px;
  font-weight: 600;
  border-radius: 50px;
  background: linear-gradient(90deg, var(--primary-color) 0%, #2a7cc7 100%);
  color: white;
  box-shadow: 0 10px 20px rgba(0, 86, 179, 0.2);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  z-index: 1;
  border: none;
}

.view-all-courses .btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, #2a7cc7 0%, var(--primary-color) 100%);
  transition: opacity 0.5s ease;
  z-index: -1;
  opacity: 0;
}

.view-all-courses .btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 15px 25px rgba(0, 86, 179, 0.3);
}

.view-all-courses .btn:hover::before {
  opacity: 1;
}

.courses-decoration {
  position: absolute;
  width: 200px;
  height: 200px;
  background-color: rgba(5, 54, 121, 0.05);
  border-radius: 50%;
  z-index: 0;
}

.decoration-1 {
  top: -100px;
  left: -100px;
}

.decoration-2 {
  bottom: -50px;
  right: -100px;
  width: 300px;
  height: 300px;
  background-color: rgba(5, 54, 121, 0.03);
}

/* Responsive */
@media (max-width: 992px) {
  .courses-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .courses-grid {
    grid-template-columns: 1fr;
  }
  
  .course-image {
    height: 200px;
  }
}
