.espamilka-gramatica-topic-page {
  background:
    radial-gradient(circle at 8% 10%, rgba(245, 158, 11, 0.12), transparent 25%),
    radial-gradient(circle at 92% 4%, rgba(15, 118, 110, 0.1), transparent 24%),
    #fff;
}

.espamilka-gramatica-topic-page .site-content,
.espamilka-gramatica-topic-page .ast-container {
  display: block;
}

.espamilka-gramatica-topic-page #primary,
.espamilka-gramatica-topic-page .content-area {
  float: none;
  margin: 0 auto;
  max-width: min(1080px, calc(100vw - 32px));
  width: 100%;
}

.espamilka-gramatica-topic-page .entry-content {
  color: #1f2937;
  font-size: clamp(1rem, 1vw, 1.08rem);
  line-height: 1.7;
  margin: 0 auto;
  padding: clamp(28px, 5vw, 54px) 0 clamp(54px, 7vw, 86px);
}

.espamilka-gramatica-topic-page .entry-content p:first-child {
  color: #0f766e;
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.13em;
  margin: 0 auto 10px;
  max-width: 920px;
  text-align: center;
  text-transform: uppercase;
}

.espamilka-gramatica-topic-page .entry-content h1:first-of-type {
  color: #390007;
  font-size: clamp(2.25rem, 5vw, 4.2rem);
  line-height: 1.05;
  margin: 0 auto 18px;
  max-width: 860px;
  text-align: center;
}

.espamilka-gramatica-topic-page .entry-content h1:first-of-type::after {
  background: #5a0710;
  border-radius: 999px;
  content: "";
  display: block;
  height: 3px;
  margin: 18px auto 0;
  max-width: 460px;
  width: 46%;
}

.espamilka-gramatica-topic-page .entry-content h2 {
  align-items: center;
  color: #390007;
  display: flex;
  font-size: clamp(1.55rem, 2.2vw, 2.2rem);
  gap: 12px;
  line-height: 1.12;
  margin: 34px 0 14px;
}

.espamilka-gramatica-topic-page .entry-content h2::before {
  background: linear-gradient(135deg, #f59e0b, #0f766e);
  border-radius: 999px;
  content: "";
  flex: 0 0 12px;
  height: 12px;
  width: 12px;
}

.espamilka-gramatica-topic-page .entry-content ul {
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(57, 0, 7, 0.08);
  border-radius: 24px;
  box-shadow: 0 22px 58px rgba(15, 23, 42, 0.06);
  display: grid;
  gap: 12px;
  list-style: none;
  margin: 0 0 24px;
  padding: clamp(16px, 2.6vw, 24px);
}

.espamilka-gramatica-topic-page .entry-content ul li {
  margin: 0;
  padding: 0;
}

.espamilka-gramatica-topic-page .entry-content ul li::marker {
  content: "";
}

.espamilka-gramatica-topic-page .entry-content ul a {
  align-items: center;
  background:
    radial-gradient(circle at 100% 0, rgba(15, 118, 110, 0.08), transparent 34%),
    linear-gradient(180deg, #fff, #fffafa);
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 16px;
  color: #1f2937;
  display: flex;
  font-size: 0.98rem;
  font-weight: 850;
  gap: 10px;
  min-height: 58px;
  padding: 13px 15px;
  position: relative;
  text-decoration: none;
  transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.espamilka-gramatica-topic-page .entry-content ul a::before {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.18), rgba(15, 118, 110, 0.17));
  border-radius: 999px;
  content: "";
  flex: 0 0 10px;
  height: 10px;
  width: 10px;
}

.espamilka-gramatica-topic-page .entry-content ul a::after {
  align-items: center;
  background: rgba(240, 253, 250, 0.9);
  border: 1px solid rgba(15, 118, 110, 0.12);
  border-radius: 999px;
  color: #0f766e;
  content: ">";
  display: inline-flex;
  flex: 0 0 28px;
  font-weight: 900;
  height: 28px;
  justify-content: center;
  margin-left: auto;
  width: 28px;
}

.espamilka-gramatica-topic-page .entry-content ul a:hover,
.espamilka-gramatica-topic-page .entry-content ul a:focus-visible {
  background: rgba(240, 253, 250, 0.9);
  border-color: rgba(15, 118, 110, 0.2);
  box-shadow: 0 16px 30px rgba(15, 23, 42, 0.08);
  color: #390007;
  outline: none;
  transform: translateY(-2px);
}

.espamilka-gramatica-topic-page .entry-content h1:first-of-type + ul,
.espamilka-gramatica-topic-page .entry-content h1:first-of-type + * ul:first-child {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  margin: 24px auto 30px;
  max-width: 720px;
  padding: 12px;
}

.espamilka-gramatica-topic-page .entry-content h1:first-of-type + ul a,
.espamilka-gramatica-topic-page .entry-content h1:first-of-type + * ul:first-child a {
  background:
    radial-gradient(circle at 18% 20%, rgba(255, 255, 255, 0.2), transparent 28%),
    linear-gradient(135deg, #0f766e 0%, #5e1414 52%, #390007 100%);
  border-color: rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  box-shadow: 0 18px 42px rgba(57, 0, 7, 0.17);
  color: #fff;
  min-height: 46px;
  padding-inline: 20px;
}

.espamilka-gramatica-topic-page .entry-content h1:first-of-type + ul a::before,
.espamilka-gramatica-topic-page .entry-content h1:first-of-type + * ul:first-child a::before {
  background: rgba(255, 255, 255, 0.3);
}

.espamilka-gramatica-topic-page .entry-content h1:first-of-type + ul a::after,
.espamilka-gramatica-topic-page .entry-content h1:first-of-type + * ul:first-child a::after {
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.24);
  color: #fff;
}

.espamilka-gramatica-topic-page .entry-content h2 + ul,
.espamilka-gramatica-topic-page .entry-content h2 + * ul {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.espamilka-gramatica-topic-page .entry-content h2 + ul {
  counter-reset: gramatica-activity;
}

.espamilka-gramatica-topic-page .entry-content h2 + ul li {
  counter-increment: gramatica-activity;
}

.espamilka-gramatica-topic-page .entry-content h2 + ul a::before {
  align-items: center;
  background: rgba(240, 253, 250, 0.95);
  border: 1px solid rgba(15, 118, 110, 0.14);
  border-radius: 999px;
  color: #0f766e;
  content: counter(gramatica-activity);
  display: inline-flex;
  flex: 0 0 34px;
  font-size: 0.82rem;
  font-weight: 950;
  height: 34px;
  justify-content: center;
  width: 34px;
}

@media (max-width: 760px) {
  .espamilka-gramatica-topic-page #primary,
  .espamilka-gramatica-topic-page .content-area {
    max-width: min(100vw - 22px, 1080px);
  }

  .espamilka-gramatica-topic-page .entry-content h2 + ul,
  .espamilka-gramatica-topic-page .entry-content h2 + * ul {
    grid-template-columns: 1fr;
  }

  .espamilka-gramatica-topic-page .entry-content p:first-child,
  .espamilka-gramatica-topic-page .entry-content h1:first-of-type {
    text-align: left;
  }

  .espamilka-gramatica-topic-page .entry-content h1:first-of-type::after {
    margin-left: 0;
    width: 58%;
  }

  .espamilka-gramatica-topic-page .entry-content ul a {
    min-height: 54px;
  }
}
