/*
 * Estilos críticos dos temas de Literatura Galega.
 * Cárganse xa na portada de Galego para evitar destelos ao abrir Literatura.
 */
.literature-page .subjects {
  display: flex;
  max-width: 1000px;
  flex-direction: column;
  gap: 40px;
  margin: 0 auto;
  padding-bottom: 120px;
}

.literature-page .subject-card {
  --topic-accent: #a61e5c;
  --topic-soft: #fceaf2;
  --topic-border: #f3bfd5;
  --topic-button: #fff5f9;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 56px;
  border: 1px solid var(--line);
  border-radius: 32px;
  background: var(--surface-card);
  box-shadow: 0 10px 40px -10px rgba(0, 0, 0, 0.04);
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease, opacity 0.2s ease;
}

.literature-page .subject-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.08);
}

.literature-page .subject-card[data-locked='true'] { opacity: 0.72; }
.literature-page .subject-card__content { flex: 1; max-width: 540px; }
.literature-page .subject-card__label {
  display: block;
  margin-bottom: 16px;
  color: var(--topic-accent);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.literature-page .subject-card__title {
  margin: 0 0 20px;
  color: var(--text);
  font-size: clamp(2rem, 3vw, 2.5rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.04em;
}
.literature-page .subject-card__text {
  margin: 0 0 36px;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.7;
}
.literature-page .subject-card__cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 28px;
  border: 1px solid var(--topic-border);
  border-radius: 12px;
  color: var(--topic-accent);
  background: var(--topic-button);
  cursor: pointer;
  font: inherit;
  font-size: 1rem;
  font-weight: 650;
}
.literature-page .subject-card__cta:disabled {
  border-color: var(--line);
  color: var(--text-soft);
  background: var(--surface);
  cursor: not-allowed;
}
.literature-page .subject-card__visual { flex: 0 0 auto; margin-left: 40px; }
.literature-page .icon-wrapper {
  display: flex;
  position: relative;
  width: 180px;
  height: 180px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: var(--topic-accent);
  background: var(--topic-soft);
  box-shadow: inset 0 0 0 1px var(--topic-border);
}
.literature-page .icon-wrapper::before {
  position: absolute;
  inset: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.35);
  content: '';
}
.literature-page .document-mark {
  display: flex;
  position: relative;
  z-index: 1;
  min-width: 76px;
  flex-direction: column;
  align-items: center;
}
.literature-page .document-mark strong {
  font-size: 2.7rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.06em;
}
.literature-page .document-mark small {
  margin-top: 8px;
  font-size: 0.7rem;
  font-weight: 850;
  letter-spacing: 0.14em;
}
.literature-page .plan-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  padding: 6px 12px 6px 8px;
  border: 1px solid;
  border-radius: 100px;
  font-size: 0.8rem;
  font-weight: 600;
  line-height: 1.2;
}
.literature-page .plan-badge__mark {
  display: grid;
  width: 18px;
  height: 18px;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  font-size: 0.66rem;
  font-weight: 900;
}
.literature-page .plan-badge--basic { border-color: #bfdbfe; color: #1d4ed8; background: #eff6ff; }
.literature-page .plan-badge--basic .plan-badge__mark { background: #2563eb; }
.literature-page .plan-badge--misifg { border-color: #ddd6fe; color: #6d28d9; background: #f5f3ff; }
.literature-page .plan-badge--misifg .plan-badge__mark { background: #7c3aed; }

.literature-page .subject-card--topic-1 { --topic-accent: #6366f1; --topic-soft: #e0e7ff; --topic-border: #c7d2fe; --topic-button: #eef2ff; }
.literature-page .subject-card--topic-2 { --topic-accent: #d97706; --topic-soft: #fef3c7; --topic-border: #fde68a; --topic-button: #fffbeb; }
.literature-page .subject-card--topic-3 { --topic-accent: #e11d48; --topic-soft: #ffe4e6; --topic-border: #fecdd3; --topic-button: #fff1f2; }
.literature-page .subject-card--topic-4 { --topic-accent: #059669; --topic-soft: #d1fae5; --topic-border: #a7f3d0; --topic-button: #ecfdf5; }
.literature-page .subject-card--topic-5 { --topic-accent: #475569; --topic-soft: #f1f5f9; --topic-border: #cbd5e1; --topic-button: #f8fafc; }
.literature-page .subject-card--topic-6 { --topic-accent: #0284c7; --topic-soft: #e0f2fe; --topic-border: #bae6fd; --topic-button: #f0f9ff; }
.literature-page .subject-card--topic-7 { --topic-accent: #c026d3; --topic-soft: #fdf4ff; --topic-border: #f5d0fe; --topic-button: #fdf4ff; }
.literature-page .subject-card--topic-8 { --topic-accent: #0d9488; --topic-soft: #ccfbf1; --topic-border: #99f6e4; --topic-button: #f0fdfa; }

@media (max-width: 860px) {
  .literature-page .subject-card { flex-direction: column; padding: 40px 24px; border-radius: 24px; text-align: center; }
  .literature-page .subject-card__content { order: 2; max-width: 100%; }
  .literature-page .subject-card__visual { order: 1; margin: 0 0 32px; }
  .literature-page .icon-wrapper { width: 140px; height: 140px; }
  .literature-page .document-mark strong { font-size: 2.3rem; }
}

@media (max-width: 650px) {
  .literature-page .subjects { gap: 24px; padding-bottom: 95px; }
  .literature-page .subject-card { padding: 34px 20px; }
  .literature-page .subject-card__title { font-size: clamp(1.75rem, 9vw, 2.15rem); }
  .literature-page .subject-card__text { font-size: 0.98rem; }
  .literature-page .subject-card__cta { width: 100%; justify-content: space-between; }
  .literature-page .icon-wrapper { width: 124px; height: 124px; }
}
