/* =========================================
   ACADEMIC HELP — HOMEPAGE GUIDES SECTION
   ========================================= */

.guides-section {
  --guides-navy: #0F1B3D;
  --guides-pink: #FF3D8B;
  --guides-muted: #65718A;
  --guides-border: #E0E4ED;

  padding: 110px 28px 100px;
  background: #FFFFFF;
  color: var(--guides-navy);
}

.guides-section,
.guides-section * {
  box-sizing: border-box;
}

.guides-section__container {
  max-width: 1184px;
  margin: 0 auto;
}

/* HEADER */

.guides-section__header {
  max-width: 760px;
  margin: 0 auto 58px;
  text-align: center;
}

.guides-section__eyebrow {
  display: inline-block;
  margin-bottom: 18px;
  color: var(--guides-pink);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 2.5px;
}

.guides-section__header h2 {
  margin: 0 0 18px;
  font-size: clamp(32px, 4vw, 48px);
  font-weight: 800;
  line-height: 1.18;
  letter-spacing: -1.4px;
}

.guides-section__header h2 span {
  color: var(--guides-pink);
}

.guides-section__header p {
  max-width: 570px;
  margin: 0 auto;
  color: var(--guides-muted);
  font-size: 17px;
  line-height: 1.8;
}

.guides-section__footer {
  display: flex;
  justify-content: center;
  margin-top: 48px;
}

.guides-section__all {
  flex-shrink: 0;
  padding-bottom: 4px;
  color: var(--guides-navy);
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  border-bottom: 1px solid var(--guides-pink);
  transition: color 0.2s ease;
}

.guides-section__all:hover,
.guides-section__all:focus-visible {
  color: var(--guides-pink);
}

/* CARDS */

.guides-section__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.guide-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 300px;
  padding: 32px 30px 28px;
  overflow: hidden;
  background: #F6F8FC;
  border: 1px solid transparent;
  border-radius: 12px;
  color: inherit;
  text-decoration: none;
  transition:
    transform 0.35s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.35s ease,
    background-color 0.25s ease,
    border-color 0.25s ease;
}

/* pink line that draws itself on hover */
.guide-card::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  background: var(--guides-pink);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.guide-card:hover,
.guide-card:focus-visible {
  transform: translateY(-6px);
  background: #FFFFFF;
  border-color: var(--guides-border);
  box-shadow: 0 18px 40px rgba(15, 27, 61, 0.09);
}

.guide-card:hover::after,
.guide-card:focus-visible::after {
  transform: scaleX(1);
}

.guide-card:focus-visible {
  outline: 2px solid var(--guides-navy);
  outline-offset: 4px;
}

.guide-card__meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 28px;
  color: var(--guides-muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.guide-card h3 {
  margin: 0 0 14px;
  color: var(--guides-navy);
  font-size: 23px;
  font-weight: 800;
  line-height: 1.28;
  letter-spacing: -0.5px;
  transition: color 0.25s ease;
}

.guide-card:hover h3,
.guide-card:focus-visible h3 {
  color: var(--guides-pink);
}

.guide-card p {
  margin: 0 0 28px;
  color: var(--guides-muted);
  font-size: 15px;
  line-height: 1.75;
}

.guide-card__link {
  margin-top: auto;
  color: var(--guides-navy);
  font-size: 14px;
  font-weight: 700;
}

.guide-card:hover .guide-card__link .arrow,
.guide-card:focus-visible .guide-card__link .arrow {
  transform: translateX(6px);
}

/* SCROLL REVEAL (enabled by guides.js, so content stays visible without JS) */

.guides-section--animate .guides-section__header,
.guides-section--animate .guide-card {
  opacity: 0;
  transform: translateY(28px);
}

.guides-section--animate .guides-section__header.is-revealing,
.guides-section--animate .guide-card.is-revealing {
  transition:
    opacity 0.7s ease,
    transform 0.7s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.35s ease,
    background-color 0.25s ease,
    border-color 0.25s ease;
}

.guides-section--animate .guides-section__header.is-visible,
.guides-section--animate .guide-card.is-visible {
  opacity: 1;
  transform: none;
}

.guides-section--animate .guide-card.is-visible:hover,
.guides-section--animate .guide-card.is-visible:focus-visible {
  transform: translateY(-6px);
}

/* RESPONSIVE */

@media (max-width: 1050px) {
  .guides-section { padding: 85px 24px; }
  .guides-section__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 700px) {
  .guides-section { padding: 72px 20px; }
  .guides-section__header { margin-bottom: 36px; }
  .guides-section__footer { margin-top: 36px; }
  .guides-section__header p { font-size: 15px; }
  .guides-section__grid { grid-template-columns: 1fr; gap: 14px; }
  .guide-card { min-height: auto; padding: 28px 24px 24px; }
}

/* ACCESSIBILITY */

@media (prefers-reduced-motion: reduce) {
  .guide-card,
  .guide-card::after,
  .guide-card h3 { transition: none; }
  .guide-card:hover,
  .guide-card:focus-visible { transform: none; }
  .guides-section--animate .guides-section__header,
  .guides-section--animate .guide-card { opacity: 1; transform: none; }
}
