/* =========================================================
   TRILHAS DE ESTUDO
   Página com visual noturno inspirado em mapas, constelações e rotas.
========================================================= */

.pagina-trilhas {
  background: #031016;
}

.pagina-trilhas #header {
  background: linear-gradient(
    to bottom,
    rgba(2, 9, 13, 0.74),
    rgba(2, 9, 13, 0.22),
    transparent
  );
}

.pagina-trilhas #header.scrolled {
  background: rgba(5, 14, 18, 0.82);
}

.pagina-trilhas .menu-desktop ul {
  gap: clamp(24px, 2.5vw, 40px);
}

.pagina-trilhas .menu-desktop a,
.pagina-trilhas .theme-button,
.pagina-trilhas .menu-toggle {
  color: var(--gold-light);
}

.trilhas-page {
  --trilhas-map-size: 100% auto;

  position: relative;
  isolation: isolate;
  min-height: 100vh;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 44%, rgba(16, 84, 103, 0.12), transparent 36%),
    linear-gradient(to bottom, rgba(1, 8, 12, 0.08), rgba(1, 8, 12, 0.42)),
    url("imagens/fundotrilhas.png") center top / var(--trilhas-map-size) no-repeat;
  background-color: #031016;
}

.trilhas-page::before,
.trilhas-page::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}

.trilhas-page::before {
  background:
    linear-gradient(to right, rgba(0, 0, 0, 0.42), transparent 24%, transparent 76%, rgba(0, 0, 0, 0.42)),
    linear-gradient(to bottom, rgba(0, 0, 0, 0.18), transparent 34%, rgba(0, 0, 0, 0.22));
}

.trilhas-page::after {
  background: radial-gradient(circle at 50% 20%, rgba(216, 174, 95, 0.10), transparent 30%);
  mix-blend-mode: screen;
  opacity: 0.68;
}

.trilhas-shade {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(to bottom, transparent 58%, rgba(1, 8, 12, 0.48) 82%, rgba(1, 8, 12, 0.74)),
    radial-gradient(circle at 50% 62%, rgba(4, 13, 17, 0.20), transparent 40%);
}

.trilhas-content {
  position: relative;
  width: min(100% - 42px, 1320px);
  min-height: 100vh;
  margin: 0 auto;
  padding: clamp(286px, 30vh, 312px) 0 38px;
}

.trilhas-title {
  width: min(100%, 860px);
  margin: 0 auto 22px;
  text-align: center;
}

.trilhas-title h1 {
  font-family: "Cinzel", serif;
  font-size: clamp(4.3rem, 7vw, 6.6rem);
  font-weight: 600;
  line-height: 0.92;
  letter-spacing: 0;
  color: var(--gold-light);
  text-shadow:
    0 2px 0 rgba(69, 39, 14, 0.95),
    0 10px 28px rgba(0, 0, 0, 0.70),
    0 0 26px rgba(216, 174, 95, 0.32);
}

.trilhas-title p {
  font-family: "Amiri", serif;
  font-size: clamp(1.45rem, 2.2vw, 2rem);
  line-height: 1.1;
  color: #f4c886;
  text-shadow: 0 5px 18px rgba(0, 0, 0, 0.72);
}

.trilhas-ornament {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  margin: 7px auto 4px;
  color: var(--gold);
}

.trilhas-ornament span {
  width: 80px;
  height: 1px;
  background: linear-gradient(to right, transparent, rgba(216, 174, 95, 0.75));
}

.trilhas-ornament span:last-child {
  background: linear-gradient(to left, transparent, rgba(216, 174, 95, 0.75));
}

.trilhas-ornament i {
  font-size: 0.7rem;
  filter: drop-shadow(0 0 10px rgba(216, 174, 95, 0.56));
}

.trilhas-highlights {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 26px;
  width: min(100%, 920px);
  margin: 0 auto 14px;
}

.trilhas-highlights article {
  min-height: 74px;
  display: grid;
  grid-template-columns: 46px 1fr;
  align-items: center;
  gap: 14px;
  padding: 14px 20px;
  border: 1px solid rgba(216, 174, 95, 0.28);
  border-radius: 12px;
  background:
    linear-gradient(135deg, rgba(8, 22, 29, 0.74), rgba(4, 13, 17, 0.48)),
    rgba(4, 13, 17, 0.52);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.26);
  backdrop-filter: blur(8px);
}

.trilhas-highlights i {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(216, 174, 95, 0.48);
  border-radius: 999px;
  color: var(--gold);
  font-size: 1.08rem;
}

.trilhas-highlights h2 {
  font-family: "Amiri", serif;
  font-size: 1.24rem;
  line-height: 1.05;
  color: var(--gold-light);
}

.trilhas-highlights p {
  margin-top: 2px;
  color: rgba(255, 245, 218, 0.76);
  font-size: 0.88rem;
  line-height: 1.3;
}

.trails-list {
  display: grid;
  gap: 10px;
  width: min(100%, 1270px);
  margin: 0 auto;
}

.trail-card {
  position: relative;
  display: grid;
  grid-template-columns: minmax(285px, 340px) minmax(430px, 1fr) minmax(135px, 170px);
  align-items: center;
  gap: 22px;
  min-height: 158px;
  padding: 18px 24px;
  overflow: hidden;
  border: 1px solid rgba(216, 174, 95, 0.52);
  border-radius: 12px;
  background:
    linear-gradient(100deg, rgba(5, 18, 24, 0.88), rgba(4, 13, 17, 0.72)),
    rgba(4, 13, 17, 0.72);
  box-shadow:
    0 24px 56px rgba(0, 0, 0, 0.34),
    inset 0 1px 0 rgba(255, 235, 190, 0.08);
  backdrop-filter: blur(9px);
}

#trilha-iniciante {
  scroll-margin-top: 120px;
}

.trail-card::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(circle at 18% 50%, rgba(216, 174, 95, 0.10), transparent 34%);
}

.trail-summary {
  position: relative;
  display: grid;
  grid-template-columns: 100px 1fr;
  align-items: center;
  gap: 18px;
  padding-right: 20px;
  border-right: 1px solid rgba(216, 174, 95, 0.20);
}

.trail-seal {
  width: 92px;
  height: 92px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(216, 174, 95, 0.58);
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 50%, rgba(216, 174, 95, 0.14), transparent 54%),
    rgba(7, 21, 27, 0.78);
  color: var(--gold);
  font-size: 2.05rem;
  box-shadow: inset 0 0 22px rgba(0, 0, 0, 0.42);
}

.trail-copy h2 {
  margin-bottom: 4px;
  font-family: "Amiri", serif;
  font-size: clamp(1.45rem, 1.8vw, 1.9rem);
  line-height: 1;
  color: var(--gold-light);
}

.trail-copy p {
  max-width: 250px;
  color: rgba(255, 245, 218, 0.78);
  font-size: 0.93rem;
  line-height: 1.35;
}

.progress-block {
  display: grid;
  grid-template-columns: 1fr 54px;
  align-items: center;
  gap: 10px;
  margin-top: 16px;
  color: #f2bd69;
  font-size: 0.84rem;
}

.progress-block > span {
  grid-column: 1 / -1;
  color: #f2bd69;
}

.progress-track {
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
}

.progress-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #f4cd88, #c27a28);
  box-shadow: 0 0 16px rgba(216, 174, 95, 0.42);
}

.progress-block strong {
  color: #f4c886;
  font-size: 0.94rem;
  text-align: right;
}

.steps-track {
  position: relative;
  display: grid;
  grid-template-columns: repeat(5, minmax(74px, 1fr));
  gap: clamp(12px, 2vw, 30px);
  list-style: none;
}

.steps-track::before {
  content: "";
  position: absolute;
  top: 50px;
  left: 8%;
  right: 8%;
  height: 2px;
  background-image: linear-gradient(to right, rgba(216, 174, 95, 0.45) 35%, transparent 0%);
  background-size: 12px 2px;
  background-repeat: repeat-x;
  transform: translateY(-50%);
}

.steps-track li {
  position: relative;
  z-index: 1;
  display: grid;
  justify-items: center;
  gap: 6px;
  color: rgba(255, 245, 218, 0.88);
  text-align: center;
  font-size: 0.94rem;
  line-height: 1.16;
}

.step-link {
  display: grid;
  justify-items: center;
  gap: 6px;
  color: inherit;
  text-decoration: none;
  border-radius: 14px;
  outline-offset: 8px;
}

.step-link:hover .step-icon,
.step-link:focus-visible .step-icon {
  border-color: rgba(247, 221, 176, 0.88);
  box-shadow:
    0 0 22px rgba(216, 174, 95, 0.34),
    inset 0 0 20px rgba(216, 174, 95, 0.10);
  transform: translateY(-2px);
}

.step-number {
  width: 23px;
  height: 23px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(216, 174, 95, 0.70);
  border-radius: 50%;
  background: rgba(4, 13, 17, 0.88);
  color: #efbf70;
  font-size: 0.78rem;
  line-height: 1;
}

.step-icon {
  width: 64px;
  height: 64px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(216, 174, 95, 0.58);
  border-radius: 50%;
  background: rgba(5, 18, 24, 0.88);
  color: var(--gold);
  font-family: "Noto Naskh Arabic", serif;
  font-size: 1.9rem;
  box-shadow: 0 0 20px rgba(216, 174, 95, 0.10);
  transition: border-color 0.22s ease, box-shadow 0.22s ease, transform 0.22s ease;
}

.step-icon i {
  font-size: 1.45rem;
}

.trail-action {
  display: grid;
  justify-items: center;
  gap: 11px;
}

.trail-action a {
  width: 100%;
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 18px;
  border: 1px solid rgba(216, 174, 95, 0.72);
  border-radius: 8px;
  background: rgba(44, 29, 18, 0.56);
  color: #fff0c6;
  text-decoration: none;
  font-weight: 700;
  box-shadow: inset 0 0 20px rgba(216, 174, 95, 0.08);
  transition: transform 0.22s ease, background 0.22s ease, box-shadow 0.22s ease;
}

.trail-action a:hover {
  transform: translateY(-2px);
  background: rgba(216, 174, 95, 0.18);
  box-shadow: 0 0 24px rgba(216, 174, 95, 0.20);
}

.trail-action span {
  color: #e4a94b;
  font-weight: 600;
  font-size: 0.95rem;
}

.trilhas-quote {
  width: min(100%, 840px);
  margin: 28px auto 0;
  color: #f2bd69;
  font-family: "Amiri", serif;
  font-size: clamp(1.1rem, 1.8vw, 1.45rem);
  line-height: 1.25;
  text-align: center;
  text-shadow: 0 5px 20px rgba(0, 0, 0, 0.72);
}

.trilhas-quote::before,
.trilhas-quote::after {
  content: "";
  display: inline-block;
  width: min(16vw, 120px);
  height: 1px;
  margin: 0 18px 6px;
  background: linear-gradient(to right, transparent, rgba(216, 174, 95, 0.72));
}

.trilhas-quote::after {
  background: linear-gradient(to left, transparent, rgba(216, 174, 95, 0.72));
}

/* A página de trilhas é propositalmente noturna, mesmo quando o tema claro do site estiver ativo. */
html[data-theme="light"] .pagina-trilhas #header,
html[data-theme="light"] .pagina-trilhas #header.scrolled {
  background: rgba(5, 14, 18, 0.78);
  border-bottom-color: rgba(216, 174, 95, 0.16);
}

html[data-theme="light"] .pagina-trilhas .menu-desktop a {
  color: rgba(255, 245, 218, 0.84);
  text-shadow: 0 4px 18px rgba(0, 0, 0, 0.70);
}

html[data-theme="light"] .pagina-trilhas .menu-desktop a:hover,
html[data-theme="light"] .pagina-trilhas .menu-desktop a.active {
  color: #fff5d8;
}

html[data-theme="light"] .pagina-trilhas .theme-button,
html[data-theme="light"] .pagina-trilhas .menu-toggle,
html[data-theme="light"] .pagina-trilhas #backToTop {
  border-color: rgba(216, 174, 95, 0.42);
  background: rgba(13, 20, 21, 0.58);
  color: var(--gold-light);
}

html[data-theme="light"] .pagina-trilhas .menu-toggle span {
  background: var(--gold-light);
}

@media (max-width: 1180px) {
  .pagina-trilhas .menu-desktop ul {
    gap: 22px;
  }

  .pagina-trilhas .menu-desktop a {
    font-size: 0.98rem;
  }

  .trail-card {
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 22px;
  }

  .trail-summary {
    grid-template-columns: 92px 1fr;
    padding-right: 0;
    padding-bottom: 18px;
    border-right: 0;
    border-bottom: 1px solid rgba(216, 174, 95, 0.20);
  }

  .trail-copy p {
    max-width: 520px;
  }

  .trail-action {
    grid-template-columns: minmax(170px, 240px) 1fr;
    justify-items: start;
    align-items: center;
  }
}

@media (max-width: 960px) {
  .trilhas-page {
    --trilhas-map-size: auto clamp(620px, 82vh, 760px);
  }

  .trilhas-content {
    width: min(100% - 30px, 820px);
    padding-top: clamp(210px, 27vh, 242px);
    padding-bottom: 42px;
  }

  .trilhas-title {
    margin-bottom: 18px;
  }

  .trilhas-title h1 {
    font-size: clamp(3.35rem, 11vw, 5.2rem);
  }

  .trilhas-highlights {
    grid-template-columns: 1fr;
    gap: 12px;
    width: min(100%, 540px);
  }

  .trails-list {
    gap: 14px;
  }

  .steps-track {
    grid-template-columns: repeat(5, minmax(92px, 1fr));
    overflow-x: auto;
    padding-bottom: 8px;
    scrollbar-width: thin;
    scrollbar-color: rgba(216, 174, 95, 0.72) rgba(255, 255, 255, 0.08);
  }

  .steps-track::-webkit-scrollbar {
    height: 8px;
  }

  .steps-track::-webkit-scrollbar-track {
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
  }

  .steps-track::-webkit-scrollbar-thumb {
    border-radius: 999px;
    background: linear-gradient(90deg, rgba(216, 174, 95, 0.48), rgba(247, 221, 176, 0.82));
  }
}

@media (max-width: 650px) {
  .trilhas-page {
    --trilhas-map-size: auto clamp(640px, 82vh, 740px);
  }

  .trilhas-content {
    width: min(100% - 24px, 560px);
    padding-top: 232px;
  }

  .trilhas-title h1 {
    font-size: clamp(2.75rem, 13vw, 4.25rem);
    line-height: 0.98;
  }

  .trilhas-title p {
    font-size: 1.2rem;
  }

  .trilhas-ornament span {
    width: 56px;
  }

  .trilhas-highlights article {
    grid-template-columns: 42px 1fr;
    padding: 13px 16px;
  }

  .trail-card {
    padding: 18px;
  }

  .trail-summary {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
  }

  .trail-copy p {
    margin: 0 auto;
  }

  .progress-block {
    max-width: 260px;
    margin-inline: auto;
  }

  .steps-track {
    margin-inline: -4px;
  }

  .trail-action {
    grid-template-columns: 1fr;
    justify-items: stretch;
    text-align: center;
  }

  .trilhas-quote::before,
  .trilhas-quote::after {
    display: none;
  }
}

@media (max-width: 420px) {
  .trilhas-content {
    padding-top: 224px;
  }

  .trilhas-title h1 {
    font-size: clamp(2.35rem, 13vw, 3.35rem);
  }

  .trilhas-highlights h2,
  .trail-copy h2 {
    font-size: 1.28rem;
  }

  .trail-seal {
    width: 82px;
    height: 82px;
    font-size: 1.8rem;
  }
}
