/* VitaCart — Академия здоровья */

.academy-page {
  max-width: 72rem;
}

.academy-hero {
  background: linear-gradient(135deg, #ecfdf3 0%, #f9fafb 55%, #ffffff 100%);
  border: 1px solid #e5e7eb;
  border-radius: 0.75rem;
  padding: 1.75rem 1.5rem;
  margin-bottom: 1.5rem;
}

.academy-hero h1 {
  font-size: clamp(1.5rem, 2.5vw, 2rem);
  font-weight: 700;
  color: #111827;
  margin-bottom: 0.5rem;
}

.academy-hero-sub {
  font-size: 1rem;
  color: #374151;
  max-width: 42rem;
  margin-bottom: 0.75rem;
}

.academy-hero-disclaimer {
  font-size: 0.8125rem;
  color: #6b7280;
  max-width: 48rem;
  margin-bottom: 0;
}

.academy-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}

.academy-filter-btn {
  appearance: none;
  border: 1px solid #d1d5db;
  background: #fff;
  color: #374151;
  border-radius: 999px;
  padding: 0.35rem 0.85rem;
  font-size: 0.8125rem;
  font-weight: 500;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
  text-decoration: none;
  display: inline-block;
}

.academy-filter-btn:hover,
.academy-filter-btn.is-active {
  border-color: var(--shop-accent, #198754);
  color: var(--shop-accent, #198754);
  background: #ecfdf3;
  text-decoration: none;
}

.academy-card-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

@media (min-width: 576px) {
  .academy-card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 992px) {
  .academy-card-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.academy-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 0.75rem;
  overflow: hidden;
  height: 100%;
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.15s, border-color 0.15s;
}

.academy-card:hover {
  border-color: #bbf7d0;
  box-shadow: 0 4px 14px rgba(17, 24, 39, 0.06);
}

.academy-card-cover {
  aspect-ratio: 16 / 9;
  background: #f3f4f6;
  overflow: hidden;
}

.academy-card-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.academy-card-body {
  padding: 1rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.academy-card-category {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--shop-accent, #198754);
  text-transform: uppercase;
  letter-spacing: 0.02em;
  margin-bottom: 0.35rem;
}

.academy-card-title {
  font-size: 1rem;
  font-weight: 600;
  color: #111827;
  margin-bottom: 0.35rem;
  line-height: 1.35;
}

.academy-card-title a {
  color: inherit;
  text-decoration: none;
}

.academy-card-title a:hover {
  color: var(--shop-accent, #198754);
}

.academy-card-desc {
  font-size: 0.875rem;
  color: #6b7280;
  margin-bottom: 0.75rem;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.academy-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-top: auto;
}

.academy-card-date {
  font-size: 0.75rem;
  color: #9ca3af;
}

.academy-card-read {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--shop-accent, #198754);
  text-decoration: none;
}

.academy-card-read:hover {
  text-decoration: underline;
}

.academy-card.is-hidden {
  display: none;
}

.academy-empty {
  font-size: 0.875rem;
  color: #6b7280;
}

/* Article page */
.academy-article-wrap {
  max-width: 52rem;
  margin: 0 auto;
}

.academy-article-category {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--shop-accent, #198754);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin-bottom: 0.5rem;
}

.academy-article-title {
  font-size: clamp(1.375rem, 2.5vw, 2rem);
  font-weight: 700;
  line-height: 1.25;
  margin-bottom: 0.75rem;
}

.academy-article-meta {
  font-size: 0.8125rem;
  color: #6b7280;
  margin-bottom: 1rem;
}

.academy-article-lead {
  font-size: 1.0625rem;
  line-height: 1.6;
  color: #374151;
  margin-bottom: 1.25rem;
}

.academy-article-cover {
  border-radius: 0.75rem;
  overflow: hidden;
  margin-bottom: 1.5rem;
  border: 1px solid #e5e7eb;
}

.academy-article-cover img {
  width: 100%;
  height: auto;
  display: block;
}

.academy-toc {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 0.75rem;
  padding: 1rem 1.25rem;
  margin-bottom: 1.5rem;
}

.academy-toc-title {
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.academy-toc ol {
  margin: 0;
  padding-left: 1.25rem;
  font-size: 0.875rem;
}

.academy-toc a {
  color: var(--shop-accent, #198754);
  text-decoration: none;
}

.academy-toc a:hover {
  text-decoration: underline;
}

.academy-content {
  font-size: 1rem;
  line-height: 1.7;
  color: #1f2937;
}

.academy-content h2 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
  scroll-margin-top: 5rem;
}

.academy-content h3 {
  font-size: 1.0625rem;
  font-weight: 600;
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
}

.academy-content p,
.academy-content li {
  font-size: 1rem;
}

.academy-content ul,
.academy-content ol {
  padding-left: 1.25rem;
  margin-bottom: 1rem;
}

.academy-content table {
  width: 100%;
  font-size: 0.875rem;
  border-collapse: collapse;
  margin-bottom: 1rem;
}

.academy-content th,
.academy-content td {
  border: 1px solid #e5e7eb;
  padding: 0.5rem 0.75rem;
  text-align: left;
}

.academy-content th {
  background: #f9fafb;
  font-weight: 600;
}

.academy-content a:not(.btn) {
  color: var(--shop-accent, #198754);
}

.academy-callout {
  border-radius: 0.75rem;
  padding: 1rem 1.25rem;
  margin: 1.5rem 0;
  font-size: 0.9375rem;
}

.academy-callout--important {
  background: #fffbeb;
  border: 1px solid #fde68a;
}

.academy-callout--doctor {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
}

.academy-callout-title {
  font-size: 0.875rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.academy-faq {
  margin: 1.5rem 0;
}

.academy-faq-item {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 0.5rem;
  padding: 0.85rem 1rem;
  margin-bottom: 0.5rem;
}

.academy-faq-q {
  font-size: 0.9375rem;
  font-weight: 600;
  margin-bottom: 0.35rem;
}

.academy-faq-a {
  font-size: 0.875rem;
  color: #374151;
  margin-bottom: 0;
}

.academy-sources ol {
  font-size: 0.875rem;
  padding-left: 1.25rem;
}

.academy-section-title {
  font-size: 1.125rem;
  font-weight: 600;
  margin: 2rem 0 1rem;
}

.academy-catalog-cta {
  display: block;
  background: linear-gradient(135deg, #ecfdf3, #ffffff);
  border: 1px solid #bbf7d0;
  border-radius: 0.75rem;
  padding: 1.25rem 1.5rem;
  text-decoration: none;
  color: inherit;
  transition: box-shadow 0.15s;
}

.academy-catalog-cta:hover {
  box-shadow: 0 4px 14px rgba(25, 135, 84, 0.12);
  color: inherit;
}

.academy-catalog-cta-label {
  font-size: 1rem;
  font-weight: 600;
  color: var(--shop-accent, #198754);
}

.academy-catalog-cta-hint {
  font-size: 0.8125rem;
  color: #6b7280;
  margin-top: 0.25rem;
}

.academy-product-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

@media (min-width: 768px) {
  .academy-product-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.academy-product-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 0.5rem;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  transition: border-color 0.15s;
}

.academy-product-card:hover {
  border-color: #bbf7d0;
  color: inherit;
}

.academy-product-thumb {
  aspect-ratio: 1;
  background: #f9fafb;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.academy-product-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 0.5rem;
}

.academy-product-meta {
  padding: 0.5rem 0.65rem 0.65rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.academy-product-title {
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 0.25rem;
}

.academy-product-price {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--shop-accent, #198754);
  margin-top: auto;
}

.academy-related-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
}

@media (min-width: 576px) {
  .academy-related-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.academy-related-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 0.5rem;
  padding: 0.85rem 1rem;
  text-decoration: none;
  color: inherit;
  display: block;
}

.academy-related-card:hover {
  border-color: #bbf7d0;
  color: inherit;
}

.academy-related-card-title {
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.academy-related-card-desc {
  font-size: 0.75rem;
  color: #6b7280;
  margin-bottom: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.academy-card-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.academy-card-cover-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #ecfdf3 0%, #f3f4f6 100%);
  min-height: 5.5rem;
}

.academy-card-cover-fallback--vitamin-d { background: linear-gradient(135deg, #fff7ed, #ecfdf3); }
.academy-card-cover-fallback--omega-3 { background: linear-gradient(135deg, #eff6ff, #ecfdf3); }
.academy-card-cover-fallback--magnesium { background: linear-gradient(135deg, #f5f3ff, #ecfdf3); }
.academy-card-cover-fallback--sleep-stress { background: linear-gradient(135deg, #eef2ff, #f9fafb); }
.academy-card-cover-fallback--immunity { background: linear-gradient(135deg, #ecfdf3, #fef3c7); }
.academy-card-cover-fallback--beauty-recovery { background: linear-gradient(135deg, #fdf2f8, #ecfdf3); }

.academy-card-cover-icon {
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: rgba(25, 135, 84, 0.12);
  border: 1px solid rgba(25, 135, 84, 0.2);
}

.academy-article-topics {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 1rem;
}

.academy-topic-chip {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 500;
  padding: 0.2rem 0.65rem;
  border-radius: 999px;
  border: 1px solid #d1d5db;
  background: #fff;
  color: #374151;
  text-decoration: none;
}

.academy-topic-chip:hover {
  border-color: var(--shop-accent, #198754);
  color: var(--shop-accent, #198754);
  text-decoration: none;
}

.academy-topic-chip--category {
  border-color: #bbf7d0;
  background: #ecfdf3;
  color: var(--shop-accent, #198754);
}

.academy-product-grid-compact {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
}

@media (min-width: 768px) {
  .academy-product-grid-compact {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.academy-product-card-compact {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 0.5rem;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.academy-product-thumb-compact {
  display: block;
  aspect-ratio: 1;
  background: #f9fafb;
  overflow: hidden;
}

.academy-product-thumb-compact img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 0.35rem;
}

.academy-product-noimg {
  display: block;
  width: 100%;
  height: 100%;
  background: #f3f4f6;
}

.academy-product-meta-compact {
  padding: 0.45rem 0.55rem 0.55rem;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  flex: 1;
}

.academy-product-title-compact {
  font-size: 0.6875rem;
  font-weight: 600;
  line-height: 1.3;
  color: #111827;
  text-decoration: none;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.academy-product-title-compact:hover {
  color: var(--shop-accent, #198754);
}

.academy-product-price-compact {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--shop-accent, #198754);
}

.academy-product-view-compact {
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--shop-accent, #198754);
  text-decoration: none;
  margin-top: auto;
}

.academy-product-view-compact:hover {
  text-decoration: underline;
}

.academy-disclaimer {
  margin-top: 2rem;
}
