/* -----------------------------------------
   SPRIX基礎学力教室 LP
----------------------------------------- */

:root {
  --color-pink-bg: #ffeef2;
  --color-pink-bg2: #ffdbe3;
  --color-orange: #ff8a00;
  --color-orange-dark: #ef7000;
  --color-navy: #00008b;
  --color-navy-dark: #182242;
  --color-text: #333333;
  --color-text-light: #333333;
  --color-magenta: #ff0099;
  --color-skyblue: #d7d7ff;
  --color-cream: #fdf3e8;
  --max-width: 430px; 
  --bp-pc: 768px;
  font-family: "Noto Sans JP", sans-serif;
}

.u-tight {
  letter-spacing: -0.02em;
  font-feature-settings: "palt";
}

body {
  background: #f4f4f4;
  color: var(--color-text);
  font-size: 15px;
}

.l-main,
.l-header__inner,
.l-footer {
  width: 100%;
  background: #ffffff;
}


img {
  width: 100%;
  object-fit: cover;
}


/* ===================== HEADER ===================== */
.l-header {
  background: #ffffff;
  border-bottom: 1px solid #ccc;
  position: sticky;
  top: 0;
  z-index: 10;
}

.l-header__inner {
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  padding: 0;
}

.l-header__logo {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 8px 0 8px 16px;
}

.l-header__logo-mascot {
  height: 45px;
  width: auto;
  display: block;
}

.l-header__logo-main {
  height: 42px;
  width: auto;
  display: block;
}

.l-header__btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  background: var(--color-magenta);
  color: #fff;
  font-size: 11px;
  font-weight: bold;
  padding: 0 4px;
  aspect-ratio: 1 / 1;
  flex-shrink: 0;
}

.l-header__btn-icon {
  width: 30px;
  height: auto;
  display: block;
}

.l-header__btn-text {
  white-space: nowrap;
}

html {
  scroll-padding-top: 74px; /* ヘッダーの高さに合わせる */
}

/* ===================== HERO ===================== */
.p-hero {
  position: relative;
  margin: 0;
}

.p-hero__img {
  position: relative;
  overflow: hidden;
  aspect-ratio: 750 / 450;
}

.p-hero__img picture {
  display: block;
  height: 100%;
}

.p-hero__img img {
  width: 100%;
  height: calc(100% + 16px);
  object-fit: cover;
  display: block;
  transform: translateY(-16px);
}

.p-hero__copy {
  position: absolute;
  top: 4px;
  right: 4px;
  padding: 0;
  font-size: 15px;
  font-weight: bold;
  line-height: 1.3;
  color: var(--color-navy);
  border-radius: 8px;
  transform: rotate(-5deg);
}

.p-hero__copy-highlight {
  font-size: 1.2em;
  background: linear-gradient(transparent 55%, #ffeb3b 55%);
}


/* ===================== CATCH ===================== */
.p-catch {
  position: absolute;
  left: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0;
}

.p-catch__small {
  display: inline-block;
  background: var(--color-magenta);
  color: #ffffff;
  padding: 4px 16px 0;
  border-radius: 0 8px 0 0;
  font-size: 14px;
  font-weight: bold;
}

.p-catch__title {
  display: inline-block;
  background: var(--color-magenta);
  color: #ffffff;
  padding: 4px 16px;
  border-radius: 0 8px 0 0;
  font-size: 28px;
  font-weight: 800;
  line-height: 1.3;
}

.p-catch__title span {
  font-weight: 400;
}

/* ===================== PRICE CTA ===================== */

/* Price CTA: solid navy banner on top, sits above a .p-cta-alt block */
.p-cta__price-top {
  background: var(--color-navy);
  text-align: center;
  padding: 0 16px;
  margin: 8px 0;
}

/* CTA alternative pattern (provisional, for comparison) */
.p-cta-alt {
  background: #ffeb3b;
  padding: 16px;
  margin: 8px 0;
}

.p-cta-alt__box {
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 4px 2px rgba(0, 0, 0, 0.2);
  padding: 8px 8px 0 8px;
  text-align: center;
}

.p-cta-alt__sub {
  font-size: 13.2px;
  line-height: 1.3;
}

.p-cta-alt .p-cta__btn {
  font-size: clamp(15.9px, 3.5vw, 14.1px);
}

.p-cta__price-top .p-cta__lead,
.p-cta__price-top .p-cta__price {
  color: #ffeb3b;
}

/* ===================== FLOATING BANNER ===================== */
.p-floating-banner {
  position: fixed;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: 100%;
  max-width: var(--max-width);
  z-index: 200;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.15);
  padding: 16px;
  box-sizing: border-box;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.4s ease, visibility 0.4s ease;
}

.p-floating-banner.is-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.p-floating-banner__inner .p-cta__btn {
  margin-bottom: 0;
}

.p-cta__lead {
  font-size: 20px;
  font-weight: 800;
  color: var(--color-magenta);
  line-height: 1;
}

.p-cta__price {
  font-size: 20px;
  font-weight: 800;
  color: var(--color-magenta);
  margin: 0 1px;
}

.p-cta__num {
  font-family: "Barlow", sans-serif;
  font-size: 50px;
  font-weight: 700;
  display: inline-block;
  margin: 8px 0 16px;
}

.p-cta__num.p-cta__num--sub {
  position: relative;
  display: inline-block;
  margin: 0;
  font-size: 22px;
  color: var(--color-text);
}

.p-cta__num.p-cta__num--sub::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 3px;
  background: var(--color-magenta);
  transform: translateY(-50%) rotate(-10deg);
}

.p-cta__unit {
  position: relative;
  display: inline-block;
  font-size: 19px;
  font-weight: 800;
  margin-left: 2px;
  transform: translateY(-9px);
}

.p-cta__tax {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  font-size: 9px;
  font-weight: 400;
  white-space: nowrap;
  margin-top: 0px;
}

.p-cta__sub {
  font-size: 12px;
  color: var(--color-text-light);
  margin-top: 0;
  margin-bottom: 0;
}

.p-cta__sub + .p-cta__action {
  margin-top: 10px;
}

.p-cta__sub .p-cta__tax {
  color: var(--color-text-light);
}

.p-cta__arrow {
  font-size: 10px;
  color: var(--color-magenta);
  font-weight: bold;
  transform: translateY(-20px);
}

.p-cta__free {
  color: var(--color-magenta);
  font-weight: 800;
  font-size: 22px;
}

.p-cta__action {
  display: flex;
  gap: 10px;
}

.p-cta__action {
  display: flex;
  gap: 8px;
}

.p-cta__btn {
  position: relative;
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  margin-bottom: 12px;
  padding: 8px 32px 8px 16px;
  color: #fff;
  text-decoration: none;
  font-size: clamp(18px, 4vw, 16px);
  font-weight: 800;
  white-space: nowrap;
}

.p-cta__btn::after {
  content: "▶";
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 11px;
}

.p-cta__btn-sub {
  font-size: 0.8em;
  font-weight: 400;
  margin-left: 2px;
}

.p-cta__btn--primary {
  background: var(--color-navy);
}

.p-cta__btn--secondary {
  background: var(--color-magenta);
}



/* ===================== TABS NAV ===================== */
.c-tabs {
  display: flex;
  gap: 16px;
  padding: 0 16px;
  margin: 8px 0;
}

.c-tabs__item {
  flex: 1;
  display: block;
  text-align: center;
  background: #ffffff;
  border: 2px solid var(--color-navy);
  border-radius: 8px;
  box-shadow: 0 2px 2px 0 #666666;
  padding: 11px 4px 8px;
  font-size: 12px;
  font-weight: bold;
  color: var(--color-navy);
  text-decoration: none;
}

.c-tabs__item::after {
  content: "▼";
  display: block;
  margin-top: 1px;
  font-size: 9px;
  color: var(--color-navy);
}

.p-services__header-wrapper {
  background: var(--color-navy);
  padding: 8px 16px;
  margin-top: 8px;
}
.p-services__header-inner {
  max-width: 520px;
  margin: 0 auto;
  background: transparent;
  padding: 8px;
}

.p-services__header-inner .c-brand-heading {
  text-align: center;
  font-size: 12px;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: 0.18em;
}

.p-services__header-inner .p-services__header-title {
  text-align: center;
  font-size: 28px;
  font-weight: 800;
  color: #ffffff;
  margin: 0;
  line-height: 1.3;
}

.p-services__item-title {
  font-size: 20px;
  font-weight: 800;
  line-height: 1.3;
  color: var(--color-navy);
  margin: 0;
}

.p-services__title::selection {
  background: transparent;
}

/* ===================== PROBLEMS ===================== */
.p-problems {
  position: relative;
  z-index: 0;
  padding-top: 0;
  padding-bottom: 0;
  margin: 0;
}

.p-problems::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image: url("../images/block.png");
  background-image: image-set(
    url("../images/block.webp") type("image/webp"),
    url("../images/block.png") type("image/png")
  );
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 0.5;
}

.p-problems__header {
  background: var(--color-navy);
  text-align: center;
  padding: 8px 16px 10px;
}

.p-problems__title {
  color: #ffffff;
  font-size: 20px;
  font-weight: 800;
  line-height: 1.3;
}

.p-problems__title-accent {
  font-size: 28px;
}

.p-problems__subtitle {
  color: #ffffff;
  font-size: 15px;
  font-weight: 700;
}

.p-problems__list {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 0;
  margin: 0;
}

.p-problems__row {
  position: relative;
  padding: 16px;
}

.p-problems__row::after {
  content: "";
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 0;
  height: 1px;
  background: var(--color-navy);
}

.p-problems__row--last::after {
  display: none;
}

.p-problems__row-top {
  display: flex;
  align-items: center;
  gap: 5%;
}

.p-problems__grade {
  flex: 0 0 45%;
  max-width: 45%;
  display: flex;
  justify-content: flex-end;
}

.p-problems__grade-badge {
  display: inline-block;
  min-width: 118px;
  box-sizing: border-box;
  background: #808080;
  color: #ffffff;
  text-align: center;
  font-weight: 700;
  font-size: 15px;
  line-height: 1.3;
  padding: 8px 12px;
  border-radius: 4px;
}

.p-problems__unit {
  flex: 0 0 45%;
  max-width: 45%;
  min-width: 0;
  text-align: left;
  color: var(--color-navy);
  font-weight: 800;
  font-size: 28px;
  line-height: 1.3;
  margin: 0;
}

.p-problems__unit-mark {
  background: linear-gradient(transparent 55%, #ffeb3b 55%);
}

.p-problems__row-bottom {
  padding-top: 8px;
  text-align: center;
}

.p-problems__row-desc {
  font-size: 20px;
  color: #000000;
  line-height: 1.3;
  margin: 0;
}

.p-problems__miss {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 12px;
}

.p-problems__miss picture {
  flex: 0 0 96px;
  max-width: 96px;
}

.p-problems__miss-label {
  flex: 0 0 auto;
  max-width: 110px;
  background: #fff;
  border: 2px solid #ccc;
  border-radius: 10px;
  padding: 6px 8px;
  font-size: 12px;
  font-weight: 700;
  color: var(--color-text);
  line-height: 1.3;
  text-align: center;
}

/* ===================== LEAD ===================== */
.p-lead {
  padding: 12px 16px 0 16px;
  margin: 8px 0 0 0;
  text-align: center;
}
.p-lead__title {
  font-size: 20px;
  font-weight: 800;
  color: var(--color-magenta);
  line-height: 1.3;
}

.p-lead__content {
  display: flex;
  align-items: center;
  gap: 12px;
}

.p-lead__body {
  flex: 1;
  text-align: left;
}

.p-lead__text {
  font-size: 15px;
  color: var(--color-text-light);
  line-height: 1.3;
  text-align: left;
  vertical-align: top;
}

.p-lead__teacher {
  flex: 0 0 170px;
  width: 120px;
  height: auto;
  object-fit: contain;
  display: block;
}

/* ===================== HIGHLIGHT CTA ===================== */
.p-highlight {
  background-color: var(--color-magenta);
  background-image: repeating-linear-gradient(
    -45deg,
    rgba(255, 255, 255, 0.2) 0px,
    rgba(255, 255, 255, 0.2) 4px,
    transparent 4px,
    transparent 8px
  );
  text-align: center;
  padding: 40px 8px 24px;
  margin: 0 0 8px 0;
  clip-path: polygon(0 0, 50% 28px, 100% 0, 100% 100%, 0 100%);
}

.p-highlight__text {
  color: #fff;
  font-weight: 800;
  font-size: 24px;
  line-height: 1.3;
}

/* ===================== SERVICE LIST ===================== */
.p-services {
  margin: 0 0 8px 0;
}

.p-services__list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 0;
  margin: 0 auto;
  max-width: 760px;
}

.p-services__card {
  display: flex;
  flex-direction: column;
  gap: 18px;
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 0;
  box-shadow: none;
}

.p-services__heading {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 0;
}

.p-services__num {
  font-family: "Noto Sans JP", sans-serif;
  color: #1e3a8a;
  font-weight: 800;
  font-size: 20px;
  margin: 0;
  line-height: 1.3;
}

/* ensure the number keeps its size and the title can take remaining space */
.p-services__num {
  flex: 0 0 auto;
}

.p-services__item-title {
  flex: 1 1 0;
  min-width: 0;
  white-space: normal;
  overflow-wrap: break-word;
}

.p-services__item-title {
  font-size: 20px;
  font-weight: 800;
  line-height: 1.3;
  color: var(--color-navy);
  margin: 0;
}

.p-services__body {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.p-services__img {
  /* remove rounded corners and make image scale full width */
  width: 100%;
  height: auto;
  border-radius: 0;
  object-fit: cover;
}

.p-services__content {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}

/* Prevent content from overflowing into card margins: safe box-sizing */
.p-services__body > .p-services__content {
  box-sizing: border-box;
  padding: 0;
  overflow-wrap: break-word;
  word-break: break-word;
}

.p-services__tagline {
  font-size: 15px;
  color: var(--color-navy);
  margin: 0 0 0 18.75px;
  flex-basis: 100%;
}

.p-services__marker {
  background: linear-gradient(transparent 67%, #ffeb3b 67%);
}

.p-services__card:first-child .p-services__tagline {
  font-size: 15px;
  font-weight: 800;
  color: var(--color-navy);
  line-height: 1.3;
  margin-top: 0;
}

.p-services__desc {
  font-size: 15px;
  color: var(--color-text-light);
  margin: 0;
  line-height: 1.3;
}

@media (max-width: 767px) {
  .p-services__card {
    padding: 16px 32px;
  }

  .p-services__body {
    flex-direction: column;
    gap: 12px;
  }
}

/* ===================== CLASSROOM ===================== */
.p-schools {
  margin: 0 0 8px 0;
}

.p-schools__item {
  position: relative;
  padding: 16px;
}

.p-schools__item::after {
  content: "";
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 0;
  height: 1px;
  background: var(--color-navy);
}

.p-schools__item:last-child::after {
  display: none;
}

.p-schools__region-title {
  font-size: 20px;
  font-weight: 800;
  color: var(--color-navy);
  margin-bottom: 10px;
  padding-left: 4px;
  border-left: 4px solid var(--color-magenta);
}

.p-schools__info {
  font-size: 15px;
  margin-bottom: 12px;
  padding-left: 8px;
}

.p-schools__row {
  display: flex;
  align-items: baseline;
  gap: 6px;
  padding: 4px 0;
}

.p-schools__row dt {
  flex: 0 0 64px;
  font-weight: normal;
  font-size: 12px;
  color: var(--color-text-light);
}

.p-schools__info a.p-schools__tel {
  font-weight: bold;
  font-size: 20px;
  color: #000;
}

.p-schools__map-link {
  padding: 4px 0 0 78px;
}

.p-schools__map {
  padding-left: 78px;
}

.p-schools__map img {
  width: 72%;
}

.p-schools__map-link a {
  color: var(--color-navy);
  font-weight: normal;
  font-size: 12px;
  text-decoration: underline;
}

.p-schools__map-link a::after {
  content: "";
  display: inline-block;
  width: 12px;
  height: 12px;
  margin-left: 4px;
  vertical-align: middle;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Crect x='1' y='4' width='9' height='9' fill='white' stroke='%2300008b' stroke-width='1.5'/%3E%3Crect x='6' y='1' width='9' height='9' fill='white' stroke='%2300008b' stroke-width='1.5'/%3E%3C/svg%3E");
  background-size: contain;
  background-repeat: no-repeat;
}

.p-schools__info a {
  color: var(--color-navy);
}

/* ===================== FAQ ===================== */
.p-faq {
  margin: 0 0 4px 0;
  padding-bottom: 32px;
}

.p-faq__list {
  padding: 0 16px;
}

.p-faq__item {
  padding: 16px 0 0;
  border-bottom: 1px solid var(--color-navy);
}

.p-faq__q {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  font-weight: 800;
  color: var(--color-navy);
  font-size: 15px;
  text-align: left;
  margin-bottom: 16px;
  cursor: pointer;
}

.p-faq__q-text {
  padding-left: 1em;
  text-indent: -1em;
}

.p-faq__icon {
  flex-shrink: 0;
  width: 10px;
  height: 10px;
  margin-left: 12px;
  margin-right: 8px;
  border-right: 2px solid var(--color-navy);
  border-bottom: 2px solid var(--color-navy);
  transform: rotate(45deg);
  transition: transform 0.25s ease;
}

.p-faq__q[aria-expanded="true"] .p-faq__icon {
  transform: rotate(-135deg);
}

.p-faq__q[aria-expanded="true"] + .p-faq__a {
  max-height: 300px; /* 回答量に応じて調整可 */
  margin: 10px 0 20px 0;
  padding-top: 20px;
  border-top-width: 1px;
}

.p-faq__a {
  max-height: 0;
  overflow: hidden;
  font-size: 15px;
  color: var(--color-text-light);
  line-height: 1.3;
  padding-top: 0;
  padding-left: 1em;
  text-indent: -1em;
  border-top: 0 dotted #999;
  transition: max-height 0.3s ease,
              margin 0.3s ease,
              padding-top 0.3s ease,
              border-top-width 0.3s ease;
}

.p-faq__a::before {
  content: "A. ";
}

.p-faq__q[aria-expanded="true"] + .p-faq__a {
  max-height: 300px; /* 回答量に応じて調整可 */
}


/* ===================== FOOTER ===================== */
.footer {
  background: #ffffff;
  padding: 30px 16px;
  margin-top: 0;
}

.footer__inner {
  width: 100%;
  max-width: 430px;
  margin: 0 auto;
}

.footer__nav-list {
  display: flex;
  justify-content: space-evenly;
  margin-bottom: 20px;
  flex-wrap: nowrap;
}

.footer__nav-link {
  color: var(--color-navy);
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}

.footer__bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.footer__copyright {
  font-size: 12px;
  color: #333;
  line-height: 1.3;
}

.footer__logo {
  width: 90px;
  height: auto;
  flex-shrink: 0;
}

/* ===================== PC LAYOUT (768px~) ===================== */
.l-pc-left,
.l-pc-nav {
  display: none;
}

@media screen and (min-width: 768px) {
  html {
    scroll-padding-top: 0;
  }

  body {
    background: #d9d9ed;
  }

  .l-header {
    display: none;
  }

  .c-tabs {
    display: none;
  }

  .p-services__card {
    padding: 16px;
  }

  .p-problems {
    margin-top: 8px;
  }

  .l-main,
  .footer {
    width: var(--max-width);
    margin: 0 auto;
  }

  .l-main {
    box-shadow: 0 0 24px rgba(0, 0, 0, 0.08);
  }

  .l-pc-left,
  .l-pc-nav {
    display: flex;
    position: fixed;
    top: 0;
    height: 100vh;
    align-items: center;
    justify-content: center;
    background: #d9d9ed;
    box-sizing: border-box;
    z-index: 100;
  }

  .l-pc-left {
    left: 0;
    right: calc(50% + (var(--max-width) / 2));
  }

  .l-pc-left__inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    padding: 20px;
  }

  .l-pc-left__mascot {
    width: 100px;
    height: auto;
  }

  .l-pc-left__logo {
    width: 200px;
    height: auto;
  }

  .l-pc-nav {
    left: calc(50% + (var(--max-width) / 2));
    right: 0;
  }

  .l-pc-nav__list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 32px;
    text-align: center;
  }

  .l-pc-nav__list a {
    color: #00008b;
    font-size: 28px;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-decoration: none;
    transition: opacity 0.2s ease;
  }

  .l-pc-nav__list a:hover {
    opacity: 0.6;
  }
}