/* Blog index and article pages. Reuses the site's tokens (--accent-color,
   --header-height, --gutter) and card language: white panels, 25px radius,
   the same soft shadow used by .general-card on the home page. */

/* Neither blog page has a full-height hero, so the content has to start below
   the fixed header itself. */
.page-body {
  padding-top: var(--header-height);
}

.page-intro {
  padding: 48px var(--gutter) 8px var(--gutter);
  max-width: 1180px;
  margin: 0 auto;
  text-align: center;
}

.page-title {
  font-size: clamp(26px, 6vw, 42px);
  font-weight: 700;
  line-height: 1.3;
  color: var(--accent-color);
  text-shadow: 2px 0 #fff, -2px 0 #fff, 0 2px #fff, 0 -2px #fff,
  1px 1px #fff, -1px -1px #fff, 1px -1px #fff, -1px 1px #fff;
}

.page-subtitle {
  margin-top: 16px;
  font-size: clamp(16px, 2.4vw, 19px);
  font-weight: 300;
  line-height: 1.7;
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
  text-shadow: 2px 0 #fff, -2px 0 #fff, 0 2px #fff, 0 -2px #fff,
  1px 1px #fff, -1px -1px #fff, 1px -1px #fff, -1px 1px #fff;
}

/* Category filter */

.blog-filters {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  padding: 32px var(--gutter) 0 var(--gutter);
  max-width: 1180px;
  margin: 0 auto;
}

.filter-chip {
  padding: 9px 20px;
  min-height: 40px;
  font-size: 0.875em;
  font-weight: 500;
  color: var(--accent-color);
  background-color: rgba(255, 255, 255, 0.85);
  border: 2px solid var(--accent-color);
  border-radius: 40px;
  cursor: pointer;
  transition: all 0.15s;
}
.filter-chip:hover {
  background-color: var(--accent-color);
  color: white;
  font-weight: 500;
}
.filter-chip[aria-pressed="true"] {
  background-color: var(--accent-color);
  color: white;
}

/* Article list */

.blog-list {
  max-width: 1180px;
  margin: 0 auto;
  padding: 40px var(--gutter) 24px var(--gutter);
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 32px;
  align-items: stretch;
}

@media (max-width: 500px) {
  .blog-list {
    grid-template-columns: 1fr;
    gap: 24px;
    padding-top: 28px;
  }
}

.article-card {
  display: flex;
  flex-direction: column;
  background-color: white;
  border-radius: 25px;
  overflow: hidden;
  box-shadow: 0 0 10px rgb(0, 0, 0, 0.15);
  transition: transform 0.2s, box-shadow 0.2s, background-color 0.3s;
}
.article-card:hover {
  background-color: rgb(248, 248, 248);
  transform: translateY(-4px);
  box-shadow: 0 6px 18px rgb(0, 0, 0, 0.2);
}

/* The whole card is one link, so the reset in landing-page.css that centres
   every <a> has to be undone here. */
.article-card-link {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  height: 100%;
  width: 100%;
  text-align: left;
}

.article-card-image-container {
  height: 200px;
  overflow: hidden;
  flex: 0 0 auto;
}

.article-card-image {
  height: 100%;
  width: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s;
}
.article-card:hover .article-card-image {
  transform: scale(1.04);
}

.article-card-text {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 24px clamp(20px, 4vw, 28px) 28px clamp(20px, 4vw, 28px);
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  font-size: 0.8125em;
  font-weight: 300;
  color: #555;
  margin-bottom: 14px;
}

.article-category {
  padding: 4px 12px;
  font-weight: 500;
  color: var(--accent-color);
  background-color: rgb(253, 255, 228);
  border: 1px solid var(--accent-color);
  border-radius: 40px;
  white-space: nowrap;
}

.article-card-title {
  font-size: clamp(18px, 2.6vw, 21px);
  font-weight: 700;
  line-height: 1.4;
  color: var(--accent-color);
  margin-bottom: 12px;
}

.article-card-excerpt {
  font-weight: 300;
  font-size: 0.9375em;
  line-height: 1.7;
  margin-bottom: 20px;
}

/* Pushed to the bottom so the arrows line up across cards of unequal height. */
.article-card-more {
  margin-top: auto;
  font-weight: 500;
  color: var(--accent-color);
}

.article-card-more::after {
  content: ' \2192';
}

/* Featured article: spans the grid and lays the image beside the text. */

.article-card.featured {
  grid-column: 1 / -1;
}

.article-card.featured .article-card-link {
  flex-direction: row;
}

.article-card.featured .article-card-image-container {
  height: auto;
  flex: 0 0 45%;
  min-height: 320px;
}

.article-card.featured .article-card-text {
  padding: clamp(28px, 4vw, 48px);
  justify-content: center;
}

.article-card.featured .article-card-title {
  font-size: clamp(22px, 3.4vw, 30px);
}

.article-card.featured .article-card-excerpt {
  font-size: clamp(15px, 2vw, 17px);
}

.featured-flag {
  padding: 4px 12px;
  font-weight: 500;
  color: white;
  background-color: var(--accent-color);
  border-radius: 40px;
  white-space: nowrap;
}

@media (max-width: 860px) {
  .article-card.featured .article-card-link {
    flex-direction: column;
  }

  .article-card.featured .article-card-image-container {
    flex: 0 0 auto;
    height: 220px;
    min-height: 0;
  }
}

/* Shown when a filter matches nothing. */
.blog-empty {
  grid-column: 1 / -1;
  padding: 40px 0;
  text-align: center;
  font-weight: 300;
  text-shadow: 2px 0 #fff, -2px 0 #fff, 0 2px #fff, 0 -2px #fff;
}

/* Call to action at the foot of both pages */

.blog-cta {
  max-width: 1180px;
  margin: 8px auto 72px auto;
  padding: clamp(28px, 5vw, 44px) var(--gutter);
  background-color: var(--accent-color);
  color: white;
  text-align: center;
}

.blog-cta-title {
  font-size: clamp(20px, 4vw, 28px);
  font-weight: 700;
  line-height: 1.35;
  margin-bottom: 12px;
}

.blog-cta-text {
  font-weight: 300;
  line-height: 1.7;
  max-width: 620px;
  margin: 0 auto 24px auto;
}

/* The outline-pill button reversed out of the accent panel. */
.blog-cta .find-tutor-button {
  align-self: center;
  color: white;
  border-color: white;
}
.blog-cta .find-tutor-button:hover {
  background-color: white;
  color: var(--accent-color);
}
.blog-cta .find-tutor-button:focus-visible {
  outline-color: #fff;
}

/* Single article page */

.article-page {
  max-width: 820px;
  margin: 0 auto;
  padding: 32px var(--gutter) 0 var(--gutter);
}

.back-link {
  display: inline-flex;
  justify-content: flex-start;
  width: fit-content;
  height: auto;
  padding: 8px 0;
  min-height: 44px;
  font-weight: 500;
  color: var(--accent-color);
  text-shadow: 2px 0 #fff, -2px 0 #fff, 0 2px #fff, 0 -2px #fff,
  1px 1px #fff, -1px -1px #fff, 1px -1px #fff, -1px 1px #fff;
}

.back-link::before {
  content: '\2190\00a0';
}

.article-panel {
  background-color: white;
  border-radius: 25px;
  overflow: hidden;
  box-shadow: 0 0 10px rgb(0, 0, 0, 0.15);
  margin-bottom: 40px;
}

.article-hero {
  width: 100%;
  height: clamp(200px, 34vw, 340px);
  object-fit: cover;
  display: block;
}

.article-header {
  padding: clamp(28px, 5vw, 48px) clamp(24px, 5vw, 56px) 0 clamp(24px, 5vw, 56px);
}

.article-title {
  font-size: clamp(24px, 5vw, 36px);
  font-weight: 700;
  line-height: 1.3;
  color: var(--accent-color);
  margin-bottom: 16px;
}

.article-header .article-meta {
  margin-bottom: 0;
}

.article-body {
  padding: 8px clamp(24px, 5vw, 56px) clamp(32px, 5vw, 48px) clamp(24px, 5vw, 56px);
}

.article-body p {
  font-weight: 300;
  font-size: clamp(16px, 2.2vw, 17px);
  line-height: 1.85;
  margin-top: 20px;
}

.article-body h2 {
  font-size: clamp(20px, 3.4vw, 25px);
  font-weight: 700;
  line-height: 1.35;
  color: var(--accent-color);
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid rgba(126, 22, 51, 0.15);
}

.article-body h3 {
  font-size: clamp(17px, 2.6vw, 19px);
  font-weight: 700;
  line-height: 1.4;
  margin-top: 28px;
}

.article-body blockquote {
  margin: 24px 0;
  padding: 16px 24px;
  font-style: italic;
  font-weight: 300;
  line-height: 1.8;
  background-color: rgb(253, 255, 228);
  border-left: 4px solid var(--accent-color);
}

.article-body strong {
  font-weight: 700;
}

/* The global reset strips list padding, so it has to come back here or the
   numbers sit outside the panel. */
.article-body ol,
.article-body ul {
  margin-top: 20px;
  padding-left: 28px;
}

.article-body li {
  font-weight: 300;
  font-size: clamp(16px, 2.2vw, 17px);
  line-height: 1.8;
  margin-bottom: 12px;
  padding-left: 6px;
}

.article-body li::marker {
  color: var(--accent-color);
  font-weight: 700;
}

.article-author {
  font-weight: 500;
  color: #333;
}

/* More articles */

.more-articles {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.more-articles .element-title {
  padding-left: 0;
  padding-right: 0;
  padding-top: 8px;
  text-align: center;
}

.more-articles .blog-list {
  padding-left: 0;
  padding-right: 0;
  padding-top: 8px;
}

/* Nothing on these pages should sit under the floating WhatsApp button. */
.blog-cta {
  padding-bottom: clamp(48px, 8vw, 72px);
}
