/* OAE KM Video Gallery Styles */

.oae-km-wrapper {
  background: #ffffff;
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.05);
  margin-bottom: 40px;
}

.oae-km-header {
  margin-bottom: 16px;
}

.oae-km-title {
  font-size: 26px;
  margin: 0 0 4px;
  color: #114b35;
}

.oae-km-desc {
  margin: 0;
  color: #555;
  font-size: 14px;
}

.oae-km-toolbar {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin: 16px 0 20px;
  border-radius: 10px;
  background: #f4f7f6;
  padding: 10px 12px;
}

.oae-km-toolbar-left input[type="text"] {
  min-width: 220px;
  padding: 8px 10px;
  border-radius: 6px;
  border: 1px solid #d0d7d5;
  font-size: 14px;
}

.oae-km-toolbar-right select {
  padding: 8px 10px;
  border-radius: 6px;
  border: 1px solid #d0d7d5;
  font-size: 14px;
  margin-left: 8px;
}

.oae-km-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 18px;
}

.oae-km-card {
  background: #ffffff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 8px 20px rgba(0,0,0,0.06);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.oae-km-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 26px rgba(0,0,0,0.08);
}

.oae-km-card-link {
  display: block;
  color: inherit;
  text-decoration: none;
}

.oae-km-thumb {
  background-size: cover;
  background-position: center;
  padding-top: 56.25%;
  position: relative;
  background-color: #f5f5f5;
}

.oae-km-play-icon {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(0,0,0,0.6);
  color: #fff;
  font-size: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.oae-km-card-body {
  padding: 12px 14px 14px;
}

.oae-km-card-title {
  font-size: 16px;
  font-weight: 600;
  margin: 0 0 6px;
  color: #0f172a;
}

.oae-km-meta {
  font-size: 12px;
  color: #555;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.oae-km-meta-item::before {
  content: "• ";
  color: #16a34a;
}

.oae-km-tags {
  margin-top: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.oae-km-tag {
  font-size: 11px;
  padding: 3px 7px;
  border-radius: 999px;
  background: #e0f2f1;
  color: #14532d;
}

/* Modal */
.oae-km-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
}

.oae-km-modal.is-active {
  display: block;
}

.oae-km-modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.7);
}

.oae-km-modal-content {
  position: relative;
  max-width: 960px;
  margin: 40px auto;
  background: #ffffff;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 18px 45px rgba(0,0,0,0.3);
}

.oae-km-modal-close {
  position: absolute;
  top: 8px;
  right: 12px;
  border: none;
  background: transparent;
  font-size: 28px;
  cursor: pointer;
  color: #374151;
}

.oae-km-modal-body {
  padding: 40px 20px 20px;
}

.oae-km-modal-video-wrapper {
  position: relative;
  padding-top: 56.25%;
}

.oae-km-modal-video-wrapper iframe,
.oae-km-modal-video-wrapper video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

/* Mobile */
@media (max-width: 768px) {
  .oae-km-wrapper {
    padding: 16px;
  }

  .oae-km-toolbar {
    flex-direction: column;
  }

  .oae-km-toolbar-right select {
    margin-left: 0;
  }
}
