.inline-link {
  color: var(--primary-button);
  font-weight: 700;
  text-decoration: none;
}

.inline-link:hover {
  text-decoration: underline;
}

.templates-section-heading {
  text-align: center;
  max-width: 780px;
  margin: 0 auto 2rem;
}

.templates-section-heading h2 {
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  margin-bottom: 0.75rem;
  color: var(--text-colour);
}

.templates-section-heading p {
  line-height: 1.7;
  color: var(--muted-text-colour);
}

.template-green-cta,
.template-download-button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 50px;
  padding: 0 1.5rem;
  background-color: var(--download-button);
  color: white;
  border: none;
  border-radius: 10px;
  text-decoration: none;
  font-weight: 800;
  font-family: sans-serif;
  cursor: pointer;
}

.template-green-cta:hover,
.template-download-button:hover {
  background-color: var(--download-hover);
}

/* Index Page */

.templates-hero-card,
.templates-download-card,
.service-template-card {
  margin-bottom: 2rem;
}

.templates-index-header {
  max-width: 760px;
  margin: 0 auto;
  text-align: center;
}

.templates-index-header .template-green-cta {
  margin-top: 1.5rem;
}

.template-index-pdf-grid {
  margin-top: 2rem;
}

.template-index-cta {
  margin-top: 3rem;
}

.service-template-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.service-template-link {
  display: block;
  padding: 1.25rem;
  border-radius: 16px;
  background: var(--Primary-background-colour);
  border: 1px solid var(--border-lines);
  text-decoration: none;
  color: var(--text-colour);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.service-template-link:hover {
  transform: translateY(-2px);
  border-color: var(--accent-colour);
}

.service-template-link span,
.service-template-link small {
  display: block;
  color: var(--muted-text-colour);
}

.service-template-link strong {
  display: block;
  margin: 0.5rem 0;
  font-size: 1.2rem;
}

.template-index-pdf-card h3,
.template-index-pdf-card p,
.template-index-pdf-card .template-image-caption {
  display: none;
}

.template-index-pdf-card {
  text-align: center;
}

/* Detail Page */

.template-page-header-clean {
  max-width: 760px;
}

.template-header-text h1 {
  font-size: clamp(2.2rem, 4vw, 3.5rem);
  line-height: 1.1;
  margin-bottom: 0.75rem;
  color: var(--text-colour);
}

.template-header-text .article-intro {
  max-width: 680px;
  line-height: 1.7;
  color: var(--text-colour);
}

.template-pdf-section-first {
  margin-top: 3rem;
}

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

.template-pdf-card {
  background: var(--Primary-background-colour);
  border: 1px solid var(--border-lines);
  border-radius: 16px;
  padding: 1.5rem;
}

.template-preview-box {
  display: block;
  background: white;
  border: 1px solid var(--border-lines);
  border-radius: 16px;
  padding: 1rem;
  text-decoration: none;
}

.template-preview-box img {
  width: 100%;
  height: 460px;
  display: block;
  object-fit: contain;
}

.template-image-caption {
  margin-top: 0.75rem;
  font-size: 0.9rem;
  color: var(--muted-text-colour);
}

.template-pdf-card h3 {
  margin-top: 1rem;
  margin-bottom: 0.5rem;
  color: var(--text-colour);
}

.template-pdf-card p {
  line-height: 1.6;
  color: var(--muted-text-colour);
}

.template-download-button {
  margin-top: 1.25rem;
}

.template-layout-grid {
  display: grid;
  grid-template-columns: 1fr 0.8fr;
  gap: 2rem;
  margin-top: 3rem;
  align-items: start;
}

.template-includes-box,
.template-summary-box {
  background: var(--Primary-background-colour);
  border: 1px solid var(--border-lines);
  border-radius: 16px;
  padding: 2rem;
}

.template-includes-box h2,
.template-summary-box h2 {
  margin-bottom: 0.75rem;
  color: var(--text-colour);
  font-size: 1.6rem;
}

.template-includes-box ul {
  margin-left: 1.25rem;
  line-height: 1.7;
}

.template-includes-box li {
  color: var(--text-colour);
}

.template-summary-box p {
  color: var(--muted-text-colour);
  line-height: 1.7;
  margin-bottom: 1.25rem;
}

.template-seo-section {
  margin-top: 3.5rem;
}

.template-seo-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: center;
  margin-top: 3rem;
}

.template-seo-row.image-right .template-seo-image {
  order: 2;
}

.template-seo-row.image-right .template-seo-copy {
  order: 1;
}

.template-seo-image img {
  width: 100%;
  border-radius: 16px;
  border: 1px solid var(--border-lines);
  display: block;
}

.template-seo-image figcaption {
  margin-top: 0.6rem;
  color: var(--muted-text-colour);
  font-size: 0.95rem;
}

.template-seo-copy h2 {
  font-size: 1.7rem;
  margin-bottom: 0.75rem;
  color: var(--text-colour);
}

.template-seo-copy p {
  line-height: 1.75;
  margin-bottom: 1rem;
  color: var(--text-colour);
}

.template-text-link-section {
  margin-top: 3rem;
  padding: 2rem;
  border-radius: 16px;
  background: var(--Primary-background-colour);
  border: 1px solid var(--border-lines);
  text-align: center;
}

.template-text-link-section p {
  max-width: 800px;
  margin: 0 auto 1rem;
  line-height: 1.7;
  color: var(--text-colour);
}

.template-text-link-section .template-green-cta {
  margin-top: 1rem;
}

/* Responsive */

@media (max-width: 1100px) {
  .template-layout-grid,
  .template-seo-row {
    grid-template-columns: 1fr;
  }

  .template-seo-row.image-right .template-seo-image,
  .template-seo-row.image-right .template-seo-copy {
    order: initial;
  }
}

@media (max-width: 900px) {
  .template-pdf-grid,
  .service-template-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 800px) {
  .template-green-cta,
  .template-download-button {
    width: 100%;
  }

  .template-preview-box img {
    height: 360px;
  }
}

@media (max-width: 520px) {
  .template-includes-box,
  .template-summary-box,
  .template-pdf-card,
  .template-text-link-section {
    padding: 1.25rem;
  }

  .template-preview-box img {
    height: 300px;
  }
}