/*
  The Fit Class - How To Exercise Written Content
  File: /themes/custom/pt_theme/css/how-to/tfc-how-to-content.css

  Designed for existing exercise guide content using:
  article
  section#exercise-description
  section#muscles-worked
  section#how-to-guide
*/

html {
  scroll-behavior: smooth;
}

body {
  background: #f5f7fb;
}

/* Main article wrapper */
article {
  width: min(960px, calc(100% - 40px));
  margin: 0 auto 72px;
  padding: 0;
  color: #101827;
}

/* Optional:
   If your new banner already uses the page title as the H1,
   uncomment this to hide the old written-content header title.
*/
/*
body > header,
article + header,
header:has(+ article) {
  display: none;
}
*/

/* Shared content cards */
article section {
  position: relative;
  margin: 0 0 22px;
  padding: 30px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 24px;
  background: #ffffff;
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.06);
  overflow: hidden;
}

article section::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 5px;
  background: linear-gradient(180deg, #1464ff 0%, #6244ff 100%);
}

/* Intro section */
#exercise-description {
  padding: 34px 34px 34px 38px;
  background:
    radial-gradient(circle at top right, rgba(20, 100, 255, 0.08), transparent 35%),
    #ffffff;
}

#exercise-description p {
  margin: 0;
  color: #263244;
  font-size: clamp(18px, 1.6vw, 21px);
  line-height: 1.7;
  font-weight: 550;
}

/* Section headings */
article h2 {
  margin: 0 0 18px;
  color: #071225;
  font-size: clamp(27px, 3vw, 38px);
  line-height: 1.08;
  letter-spacing: -0.045em;
  font-weight: 900;
}

article h2::after {
  content: "";
  display: block;
  width: 54px;
  height: 4px;
  margin-top: 14px;
  border-radius: 999px;
  background: linear-gradient(135deg, #1464ff, #6244ff);
}

/* Paragraphs */
article p {
  color: #334155;
  font-size: 17px;
  line-height: 1.75;
  font-weight: 500;
}

/* Muscles worked list */
#muscles-worked ul {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

#muscles-worked li {
  position: relative;
  min-height: 58px;
  padding: 15px 16px 15px 46px;
  border: 1px solid rgba(20, 100, 255, 0.12);
  border-radius: 16px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  color: #334155;
  font-size: 15.5px;
  line-height: 1.45;
  font-weight: 600;
}

#muscles-worked li::before {
  content: "";
  position: absolute;
  left: 16px;
  top: 18px;
  width: 16px;
  height: 16px;
  border-radius: 999px;
  background: #ffffff;
  box-shadow:
    inset 0 0 0 5px #1464ff,
    0 0 0 5px rgba(20, 100, 255, 0.10);
}

#muscles-worked strong {
  color: #071225;
  font-weight: 900;
}

/* Step-by-step guide */
#how-to-guide ol {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: howto-step;
}

#how-to-guide li {
  counter-increment: howto-step;
  position: relative;
  margin: 0 0 14px;
  padding: 18px 18px 18px 72px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 18px;
  background: #f8fafc;
  color: #334155;
  font-size: 16px;
  line-height: 1.65;
  font-weight: 500;
}

#how-to-guide li:last-child {
  margin-bottom: 0;
}

#how-to-guide li::before {
  content: counter(howto-step);
  position: absolute;
  left: 18px;
  top: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 13px;
  background: linear-gradient(135deg, #1464ff 0%, #6244ff 100%);
  color: #ffffff;
  font-size: 15px;
  font-weight: 950;
  box-shadow: 0 10px 24px rgba(20, 100, 255, 0.25);
}

#how-to-guide strong {
  color: #071225;
  font-weight: 900;
}

/* Links inside exercise content */
article a {
  color: #145cff;
  font-weight: 850;
  text-decoration: none;
}

article a:hover,
article a:focus {
  color: #4f3cff;
  text-decoration: underline;
}

/* Optional CTA block for later, if you add one inside article:
   <section class="tfc-howto-content-cta">...</section>
*/
.tfc-howto-content-cta {
  padding: 34px;
  border: 0;
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.14), transparent 35%),
    linear-gradient(135deg, #071a44 0%, #10102f 52%, #06122f 100%);
  color: #ffffff;
}

.tfc-howto-content-cta::before {
  display: none;
}

.tfc-howto-content-cta h2 {
  color: #ffffff;
}

.tfc-howto-content-cta h2::after {
  background: rgba(255, 255, 255, 0.35);
}

.tfc-howto-content-cta p {
  max-width: 680px;
  color: rgba(255, 255, 255, 0.82);
}

.tfc-howto-content-cta a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  margin-top: 10px;
  padding: 0 22px;
  border-radius: 14px;
  background: linear-gradient(135deg, #1464ff 0%, #6244ff 100%);
  color: #ffffff;
  font-size: 15px;
  font-weight: 950;
  text-decoration: none;
  box-shadow: 0 18px 38px rgba(20, 100, 255, 0.35);
}

.tfc-howto-content-cta a:hover,
.tfc-howto-content-cta a:focus {
  color: #ffffff;
  transform: translateY(-2px);
  text-decoration: none;
}

/* Desktop spacing when Drupal admin tabs are visible */
.tabs + article,
nav.tabs + article {
  margin-top: 24px;
}

/* Tablet */
@media (max-width: 860px) {
  article {
    width: min(100% - 32px, 760px);
    margin-bottom: 56px;
  }

  article section {
    padding: 26px;
    border-radius: 22px;
  }

  #exercise-description {
    padding: 30px 28px 30px 34px;
  }

  #muscles-worked ul {
    grid-template-columns: 1fr;
  }
}

/* Mobile */
@media (max-width: 560px) {
  article {
    width: calc(100% - 28px);
    margin-bottom: 44px;
  }

  article section {
    margin-bottom: 18px;
    padding: 22px 18px 22px 22px;
    border-radius: 20px;
  }

  #exercise-description {
    padding: 24px 18px 24px 24px;
  }

  #exercise-description p {
    font-size: 16.5px;
    line-height: 1.65;
  }

  article h2 {
    font-size: 27px;
    letter-spacing: -0.035em;
  }

  #muscles-worked li {
    min-height: auto;
    padding: 14px 14px 14px 44px;
    font-size: 15px;
  }

  #how-to-guide li {
    padding: 62px 16px 16px;
    font-size: 15.5px;
    line-height: 1.62;
  }

  #how-to-guide li::before {
    left: 16px;
    top: 16px;
  }

  .tfc-howto-content-cta {
    padding: 26px 20px;
  }

  .tfc-howto-content-cta a {
    width: 100%;
  }
}
