/* ===== Resources Block ===== */

:root {
  --res_bg_from: #eef2ff;
  --res_bg_to: #ecfeff;
  --res_border: #818cf8;
  --res_title: #312e81;
  --res_text: #3730a3;
  --res_radius: 14px;

  --res_item_bg: #ffffff;
  --res_item_border: #e0e7ff;
  --res_item_hover_bg: #fff7ed;
  --res_item_hover_border: #f59e0b;

  --res_icon_bg: #4f46e5;
  --res_icon_color: #ffffff;
  --res_icon_shadow: rgba(79, 70, 229, 0.35);

  --res_meta_color: #6366f1;

  --res_pdf: #dc2626;
  --res_pdf_shadow: rgba(220, 38, 38, 0.3);
  --res_doc: #2563eb;
  --res_doc_shadow: rgba(37, 99, 235, 0.3);
  --res_link: #0e7490;
  --res_link_shadow: rgba(14, 116, 144, 0.3);
  --res_audio: #9333ea;
  --res_audio_shadow: rgba(147, 51, 234, 0.3);
  --res_img: #db2777;
  --res_img_shadow: rgba(219, 39, 119, 0.3);
}

/* ---------- Section container ---------- */
.lesson_resources {
  position: relative;
  background: linear-gradient(135deg, var(--res_bg_from), var(--res_bg_to));
  border: 2px solid var(--res_border);
  border-radius: var(--res_radius);
  padding: 22px 24px;
  margin: 30px 0;
  box-shadow: 0 6px 16px rgba(79, 70, 229, 0.12);
  overflow: hidden;
}

/* decorative top accent stripe */
.lesson_resources::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 6px;
  background: linear-gradient(90deg, #4f46e5, #0e7490, #f59e0b, #db2777);
}

.lesson_resources_title {
  margin: 6px 0 6px 0;
  font-size: 1.55rem;
  font-weight: 800;
  color: var(--res_title);
  display: flex;
  align-items: center;
  gap: 10px;
}

.lesson_resources_title::before {
  content: "\1F4C1"; /* folder icon */
  font-size: 1.3rem;
}

.lesson_resources_intro {
  margin: 0 0 16px 0;
  font-size: 1rem;
  line-height: 1.55;
  color: var(--res_text);
}

/* ---------- List of resource items ---------- */
.lesson_resources_list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* ---------- Single resource item (link card) ---------- */
.lesson_resources_item {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--res_item_bg);
  border: 1px solid var(--res_item_border);
  border-radius: 12px;
  padding: 13px 16px;
  text-decoration: none;
  color: var(--res_title);
  box-shadow: 0 2px 6px rgba(49, 46, 129, 0.06);
  transition: background 0.18s ease, border-color 0.18s ease,
    transform 0.18s ease, box-shadow 0.18s ease;
}

.lesson_resources_item:hover {
  background: var(--res_item_hover_bg);
  border-color: var(--res_item_hover_border);
  transform: translateX(3px) scale(1.01);
  box-shadow: 0 6px 14px rgba(245, 158, 11, 0.25);
}

/* Icon bubble */
.lesson_resources_icon {
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: var(--res_icon_bg);
  color: var(--res_icon_color);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  box-shadow: 0 3px 8px var(--res_icon_shadow);
}

/* Text block: name + meta */
.lesson_resources_item_body {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.lesson_resources_item_name {
  font-size: 1.08rem;
  font-weight: 700;
  color: var(--res_title);
}

.lesson_resources_item_meta {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--res_meta_color);
}

/* Little arrow that appears on hover */
.lesson_resources_item::after {
  content: "\2192";
  margin-left: auto;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--res_item_hover_border);
  opacity: 0;
  transform: translateX(-4px);
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.lesson_resources_item:hover::after {
  opacity: 1;
  transform: translateX(0);
}

/* Variant color accents by resource type (optional modifier classes) */
.lesson_resources_item.lesson_resources_item_pdf .lesson_resources_icon {
  background: var(--res_pdf);
  box-shadow: 0 3px 8px var(--res_pdf_shadow);
}
.lesson_resources_item.lesson_resources_item_doc .lesson_resources_icon {
  background: var(--res_doc);
  box-shadow: 0 3px 8px var(--res_doc_shadow);
}
.lesson_resources_item.lesson_resources_item_link .lesson_resources_icon {
  background: var(--res_link);
  box-shadow: 0 3px 8px var(--res_link_shadow);
}
.lesson_resources_item.lesson_resources_item_audio .lesson_resources_icon {
  background: var(--res_audio);
  box-shadow: 0 3px 8px var(--res_audio_shadow);
}
.lesson_resources_item.lesson_resources_item_img .lesson_resources_icon {
  background: var(--res_img);
  box-shadow: 0 3px 8px var(--res_img_shadow);
}

/* ---------- Mobile adaptation ---------- */
@media (max-width: 480px) {
  .lesson_resources {
    padding: 18px 14px;
  }
  .lesson_resources_title {
    font-size: 1.3rem;
  }
  .lesson_resources_item {
    padding: 11px 12px;
  }
  .lesson_resources_item_name {
    font-size: 0.98rem;
  }
  .lesson_resources_item::after {
    display: none;
  }
}