/* Kursevi Predavaci Widget - Carousel */

.ks-pred-widget {
  margin: 28px 0;
}

.ks-pred-title {
  margin: 0 0 8px;
  font-size: clamp(28px, 3vw, 40px);
  line-height: 1.1;
  letter-spacing: -0.5px;
  color: #101840;
}

.ks-pred-desc {
  margin: 0 0 20px;
  color: #5a628a;
  font-size: 15px;
  line-height: 1.6;
  max-width: 90ch;
}

.ks-pred-carousel {
  position: relative;
  overflow: hidden;
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(255,255,255,.86), rgba(255,255,255,.72));
  border: 1px solid rgba(16,24,64,.10);
  box-shadow: 0 18px 60px rgba(16,24,64,.12);
}

.ks-pred-track {
  display: flex;
  transition: transform 0.55s cubic-bezier(0.2, 0.8, 0.2, 1);
  will-change: transform;
}

.ks-pred-slide {
  min-width: 100%;
  padding: 0;
}

.ks-pred-card {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 16px;
  align-items: start;
  padding: 16px;
}

.ks-pred-photo {
  width: 160px;
  aspect-ratio: 1 / 1;
  border-radius: 20px;
  padding: 4px;
  background: linear-gradient(135deg, #d75628, #562d6f);
  overflow: hidden;
}

.ks-pred-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 16px;
  border: 3px solid #fff;
  display: block;
}

.ks-pred-photo-fallback {
  width: 100%;
  height: 100%;
  background: rgba(255,255,255,.12);
  border-radius: 16px;
  border: 3px solid #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(16,24,64,.30);
}

.ks-pred-photo-fallback .dashicons {
  width: 60px;
  height: 60px;
  font-size: 60px;
}

.ks-pred-info {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ks-pred-name {
  font-weight: 1100;
  font-size: 18px;
  letter-spacing: -0.2px;
  color: #101840;
  margin-top: 2px;
}

.ks-pred-role {
  font-weight: 900;
  font-size: 13px;
  color: rgba(86, 45, 111, 0.92);
}

.ks-pred-bio {
  margin-top: 6px;
  color: #5a628a;
  line-height: 1.6;
  font-weight: 650;
  font-size: 14px;
}

.ks-pred-actions {
  margin-top: 12px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.ks-pred-btn {
  appearance: none;
  border: 1px solid rgba(16, 24, 64, 0.10);
  background: rgba(255, 255, 255, 0.68);
  color: #101840;
  padding: 10px 14px;
  border-radius: 14px;
  font-weight: 950;
  font-size: 13px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  transition: transform 0.15s ease, filter 0.15s ease, box-shadow 0.15s ease;
  box-shadow: 0 8px 20px rgba(16, 24, 64, 0.08);
}

.ks-pred-btn:hover {
  transform: translateY(-2px);
  filter: brightness(1.02);
}

.ks-pred-btn-primary {
  border-color: transparent;
  background: linear-gradient(135deg, #d75628, #562d6f);
  color: #fff;
  box-shadow: 0 16px 40px rgba(86, 45, 111, 0.25);
}

.ks-pred-btn-ghost {
  background: rgba(255, 255, 255, 0.42);
  box-shadow: none;
}

.ks-pred-dots {
  display: flex;
  gap: 10px;
  justify-content: center;
  padding: 14px 16px;
  border-top: 1px solid rgba(16, 24, 64, 0.10);
}

.ks-pred-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  border: 0;
  background: rgba(16, 24, 64, 0.18);
  cursor: pointer;
  transition: width 0.3s ease, background 0.3s ease;
}

.ks-pred-dot.active {
  width: 26px;
  background: linear-gradient(90deg, #d75628, #562d6f);
}

/* Modal - Glassmorphism */
.ks-pred-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(16, 24, 64, 0.4);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  padding: 20px;
  overflow-y: auto;
}

.ks-pred-modal-backdrop.open {
  opacity: 1;
  visibility: visible;
}

.ks-pred-modal {
  position: relative;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 26px;
  box-shadow: 
    0 8px 32px rgba(16, 24, 64, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  max-width: 680px;
  width: 100%;
  max-height: 80vh;
  overflow-y: auto;
  animation: ksModalSlideUp 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
}

@keyframes ksModalSlideUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.ks-pred-modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 36px;
  height: 36px;
  border: 0;
  background: rgba(16, 24, 64, 0.08);
  border-radius: 999px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(16, 24, 64, 0.72);
  transition: all 0.2s ease;
  z-index: 10;
}

.ks-pred-modal-close:hover {
  background: rgba(16, 24, 64, 0.14);
  transform: scale(1.08);
}

.ks-pred-modal-close .dashicons {
  width: 20px;
  height: 20px;
  font-size: 20px;
}

.ks-pred-modal-header {
  padding: 26px 26px 16px;
  border-bottom: 1px solid rgba(16, 24, 64, 0.08);
}

.ks-pred-modal-title {
  margin: 0;
  font-size: clamp(24px, 4vw, 32px);
  font-weight: 1100;
  letter-spacing: -0.5px;
  color: #101840;
  line-height: 1.2;
}

.ks-pred-modal-body {
  padding: 20px 26px 26px;
}

.ks-pred-modal-body p {
  margin: 0 0 16px;
  color: #5a628a;
  line-height: 1.7;
  font-weight: 550;
  font-size: 15px;
}

.ks-pred-modal-body p:last-child {
  margin-bottom: 0;
}

/* Scrollbar styling for modal */
.ks-pred-modal::-webkit-scrollbar {
  width: 8px;
}

.ks-pred-modal::-webkit-scrollbar-track {
  background: transparent;
}

.ks-pred-modal::-webkit-scrollbar-thumb {
  background: rgba(16, 24, 64, 0.15);
  border-radius: 4px;
  transition: background 0.2s ease;
}

.ks-pred-modal::-webkit-scrollbar-thumb:hover {
  background: rgba(16, 24, 64, 0.25);
}

/* Responsive predavaci */
@media (max-width: 700px) {
  .ks-pred-card {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .ks-pred-photo {
    width: 100%;
    height: auto;
    margin-bottom: 8px;
  }

  .ks-pred-name {
    font-size: 16px;
  }

  .ks-pred-role {
    font-size: 12px;
  }

  .ks-pred-bio {
    font-size: 13px;
    line-height: 1.5;
  }

  .ks-pred-btn {
    font-size: 12px;
    padding: 9px 12px;
  }

  .ks-pred-modal {
    border-radius: 20px;
  }

  .ks-pred-modal-header {
    padding: 20px 20px 12px;
  }

  .ks-pred-modal-title {
    font-size: clamp(20px, 3vw, 28px);
  }

  .ks-pred-modal-body {
    padding: 16px 20px 20px;
  }

  .ks-pred-modal-body p {
    font-size: 14px;
    margin-bottom: 12px;
  }
}

@media (max-width: 480px) {
  .ks-pred-card {
    padding: 12px;
    gap: 10px;
  }

  .ks-pred-actions {
    flex-direction: column;
  }

  .ks-pred-btn {
    width: 100%;
    justify-content: center;
    font-size: 13px;
    padding: 8px 12px;
  }

  .ks-pred-dots {
    gap: 6px;
    padding: 10px 12px;
  }

  .ks-pred-dot {
    width: 8px;
    height: 8px;
  }

  .ks-pred-dot.active {
    width: 20px;
  }

  .ks-pred-modal {
    border-radius: 16px;
    margin: 20px;
  }

  .ks-pred-modal-close {
    width: 32px;
    height: 32px;
    top: 12px;
    right: 12px;
  }

  .ks-pred-modal-close .dashicons {
    width: 18px;
    height: 18px;
    font-size: 18px;
  }

  .ks-pred-modal-header {
    padding: 16px 16px 10px;
  }

  .ks-pred-modal-title {
    font-size: 20px;
  }

  .ks-pred-modal-body {
    padding: 12px 16px 16px;
  }

  .ks-pred-modal-body p {
    font-size: 13px;
    margin-bottom: 10px;
  }
}
