/* ==========================================
   useful.css — Сторінка "Корисне"
   ========================================== */

.btn-white { background: var(--white); color: var(--blue-dark); }
.btn-white:hover { background: var(--off-white); transform: translateY(-2px); }

/* ==========================================
   MAIN SECTION
   ========================================== */
.useful-section {
  padding: 64px 0 88px;
  background: var(--white);
}

/* ==========================================
   CATEGORY CARDS
   ========================================== */
.useful-categories {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 64px;
}
.useful-category-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  background: var(--off-white);
  border: 1px solid var(--gray-light);
  border-radius: var(--radius-lg);
  padding: 28px 26px;
  color: inherit;
  text-decoration: none;
  transition: var(--transition);
}
.useful-category-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-4px);
  border-color: var(--blue-light);
}
.useful-category-icon {
  width: 52px; height: 52px;
  border-radius: 14px;
  background: var(--blue-pale);
  color: var(--blue-dark);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem;
  margin-bottom: 4px;
}
.useful-category-card h3 {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 1.05rem;
  color: var(--blue-dark);
}
.useful-category-card p {
  font-size: 0.85rem;
  color: var(--gray-text);
  line-height: 1.6;
}

/* ==========================================
   CONTENT BLOCKS
   ========================================== */
.useful-block {
  scroll-margin-top: 96px;
  margin-bottom: 72px;
}
.useful-block:last-child { margin-bottom: 0; }
.useful-block-title {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 1.4rem;
  color: var(--blue-dark);
  padding-bottom: 20px;
  margin-bottom: 32px;
  border-bottom: 2px solid var(--gray-light);
}
.useful-block-title i { color: var(--blue-mid); }

/* ==========================================
   VIDEO TAB
   ========================================== */
.useful-search {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--off-white);
  border: 2px solid var(--gray-light);
  border-radius: var(--radius);
  padding: 12px 18px;
  margin-bottom: 32px;
  transition: var(--transition);
}
.useful-search:focus-within { border-color: var(--blue-mid); }
.useful-search i { color: var(--gray-mid); font-size: 1rem; }
.useful-search input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--dark);
}

.useful-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-bottom: 40px;
}
.video-card {
  background: var(--white);
  border: 1px solid var(--gray-light);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}
.video-card:hover { box-shadow: var(--shadow-md); transform: translateY(-4px); }

/* Thumbnail — посилання на YouTube */
.video-thumb-link {
  display: block;
  height: 200px;
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #1E4A6E, #0f2a42);
  flex-shrink: 0;
}
.video-thumb-link img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}
.video-thumb-link:hover img { transform: scale(1.04); }

/* Кнопка play поверх thumbnail */
.video-play-btn {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,0.3);
  transition: var(--transition);
}
.video-play-btn::after {
  content: '';
  width: 56px; height: 56px;
  background: #ff0000;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  transition: var(--transition);
}
.video-play-btn i {
  position: absolute;
  color: white;
  font-size: 1.4rem;
  margin-left: 4px; /* зміщення для трикутника */
  z-index: 1;
}
.video-thumb-link:hover .video-play-btn { background: rgba(0,0,0,0.15); }
.video-thumb-link:hover .video-play-btn::after { transform: scale(1.1); background: #cc0000; }

/* Placeholder якщо thumbnail не завантажився */
.video-thumb-placeholder {
  width: 100%; height: 200px;
  background: linear-gradient(135deg, #1E4A6E, #0f2a42);
  display: flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,0.2);
  font-size: 3rem;
}

/* Тривалість відео */
.video-duration {
  position: absolute;
  bottom: 10px; right: 10px;
  background: rgba(0,0,0,0.8);
  color: white;
  font-family: var(--font-head);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
  z-index: 1;
}

.video-body { padding: 20px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.video-cat {
  display: inline-block;
  font-family: var(--font-head);
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 3px 10px;
  border-radius: 100px;
  align-self: flex-start;
}
.video-cat--webinar    { background: var(--blue-pale); color: var(--blue-dark); }
.video-cat--lecture    { background: #e6f4ea; color: #276749; }
.video-cat--conference { background: rgba(245,200,66,0.15); color: var(--gold-dark); }

.video-title {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--blue-dark);
  line-height: 1.4;
  flex: 1;
}
.video-desc { font-size: 0.85rem; color: var(--gray-text); line-height: 1.65; }
.video-meta {
  display: flex;
  gap: 14px;
  font-family: var(--font-head);
  font-size: 0.75rem;
  color: var(--gray-mid);
}
.video-meta span { display: flex; align-items: center; gap: 5px; }
.video-link { font-size: 0.82rem !important; padding: 9px 18px !important; align-self: flex-start; margin-top: 4px; }

.video-card.hidden { display: none; }

.useful-no-results {
  text-align: center; padding: 48px 20px;
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  color: var(--gray-mid);
}
.useful-no-results p { font-family: var(--font-head); font-weight: 600; font-size: 0.92rem; }

.useful-more { text-align: center; margin-top: 8px; }

/* ==========================================
   DOCS TAB
   ========================================== */
.docs-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}
.doc-card {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  background: var(--off-white);
  border: 1px solid var(--gray-light);
  border-radius: var(--radius-lg);
  padding: 22px;
  transition: var(--transition);
  color: inherit;
  text-decoration: none;
}
.doc-card:hover { box-shadow: var(--shadow-md); border-color: var(--blue-light); transform: translateX(4px); }

.doc-icon {
  width: 52px; height: 52px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem;
  flex-shrink: 0;
}
.doc-icon--pdf  { background: #fde8e8; color: #c53030; }
.doc-icon--word { background: #e8f0fe; color: #1a56db; }

.doc-body { flex: 1; min-width: 0; }
.doc-tag {
  display: inline-block;
  font-family: var(--font-head);
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--blue-mid);
  margin-bottom: 6px;
}
.doc-body h3 {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--blue-dark);
  line-height: 1.4;
  margin-bottom: 6px;
}
.doc-body p { font-size: 0.82rem; color: var(--gray-text); line-height: 1.6; margin-bottom: 10px; }
.doc-meta {
  display: flex; gap: 14px;
  font-family: var(--font-head);
  font-size: 0.72rem; color: var(--gray-mid);
}
.doc-meta span { display: flex; align-items: center; gap: 4px; }

.doc-download {
  width: 36px; height: 36px;
  background: var(--white);
  border-radius: 10px;
  border: 1px solid var(--gray-light);
  display: flex; align-items: center; justify-content: center;
  color: var(--blue-mid);
  font-size: 0.85rem;
  flex-shrink: 0;
  transition: var(--transition);
}
.doc-card:hover .doc-download { background: var(--blue-dark); color: var(--white); border-color: var(--blue-dark); }

/* ==========================================
   PARENTS SECTION
   ========================================== */
.parents-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.resource-card {
  background: var(--off-white);
  border-radius: var(--radius-lg);
  padding: 28px 22px;
  border: 1px solid var(--gray-light);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.resource-card:hover { box-shadow: var(--shadow-md); transform: translateY(-4px); border-color: var(--blue-light); }
.resource-icon { font-size: 2rem; }
.resource-card h3 {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--blue-dark);
  line-height: 1.35;
}
.resource-card p { font-size: 0.85rem; color: var(--gray-text); line-height: 1.65; flex: 1; }
.resource-link {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 0.82rem;
  color: var(--blue-mid);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: var(--transition);
  margin-top: 4px;
}
.resource-link:hover { color: var(--blue-dark); gap: 10px; }

/* ==========================================
   CTA
   ========================================== */
.useful-cta {
  padding: 80px 0;
  background: linear-gradient(135deg, var(--blue-dark), #0f2a42);
  position: relative;
  overflow: hidden;
}
.useful-cta::before {
  content: '';
  position: absolute; top: -80px; right: -80px;
  width: 360px; height: 360px;
  background: radial-gradient(circle, rgba(245,200,66,0.1) 0%, transparent 70%);
  border-radius: 50%;
}
.useful-cta-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  flex-wrap: wrap;
  position: relative; z-index: 1;
}
.useful-cta-inner h2 {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: clamp(1.5rem, 2.5vw, 2rem);
  color: var(--white);
  margin-bottom: 8px;
}
.useful-cta-inner p { font-size: 0.95rem; color: rgba(255,255,255,0.7); line-height: 1.7; }
.useful-cta-btns { display: flex; gap: 12px; flex-wrap: wrap; flex-shrink: 0; }

/* ==========================================
   RESPONSIVE
   ========================================== */
@media (max-width: 1100px) {
  .useful-grid { grid-template-columns: 1fr 1fr; }
  .parents-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 860px) {
  .useful-categories { grid-template-columns: 1fr; }
  .docs-grid { grid-template-columns: 1fr; }
  .useful-cta-inner { flex-direction: column; }
  .useful-cta-btns { flex-direction: column; width: 100%; }
  .useful-cta-btns .btn { justify-content: center; }
}
@media (max-width: 640px) {
  .useful-grid { grid-template-columns: 1fr; }
  .parents-grid { grid-template-columns: 1fr 1fr; }
  .useful-block-title { font-size: 1.2rem; }
}
@media (max-width: 420px) {
  .parents-grid { grid-template-columns: 1fr; }
}
