/*
 * =====================================================
 * SWIT / WELFARE IT GUIDE
 * guide.css
 * =====================================================
 *
 * SWIT standard block structure:
 *
 * SWELL Full Wide
 *   └─ Group (__inner)
 *       └─ content blocks
 *
 * IMPORTANT:
 * - This stylesheet is loaded only on /welfare-it-guide/.
 * - It does not modify SERVICE page CSS.
 * - SWELL post-list internal layout is controlled in the editor.
 */

/* =====================================================
   GUIDE / VARIABLES
===================================================== */

.post_content {
  --guide-primary: var(--site-primary, #2563EB);
  --guide-primary-light: var(--site-primary-light, #EFF6FF);
  --guide-heading: var(--site-heading, #111827);
  --guide-body: var(--site-body, #374151);
  --guide-muted: var(--site-muted, #6B7280);
  --guide-border: var(--site-border, #E5E7EB);
  --guide-surface: var(--site-surface, #F8FAFC);
  --guide-white: var(--site-white, #FFFFFF);

  --guide-container: 1120px;
  --guide-text: 760px;

  --guide-section-space: var(--site-section-space, 104px);
  --guide-section-space-tablet: var(--site-section-space-tablet, 80px);
  --guide-section-space-mobile: var(--site-section-space-mobile, 64px);
}


/* =====================================================
   GUIDE / SWELL FULL-WIDE RESET
===================================================== */

/*
 * SWELLフルワイドの上下余白と内部幅は
 * guide.css側で管理する。
 */
.post_content .swell-block-fullWide.guide-hero,
.post_content .swell-block-fullWide.guide-nav,
.post_content .swell-block-fullWide.guide-start,
.post_content .swell-block-fullWide.guide-topic,
.post_content .swell-block-fullWide.guide-perspective,
.post_content .swell-block-fullWide.guide-service {
  padding-top: 0 !important;
  padding-bottom: 0 !important;
}

.guide-hero > .swell-block-fullWide__inner,
.guide-nav > .swell-block-fullWide__inner,
.guide-start > .swell-block-fullWide__inner,
.guide-topic > .swell-block-fullWide__inner,
.guide-perspective > .swell-block-fullWide__inner,
.guide-service > .swell-block-fullWide__inner {
  width: 100%;
  max-width: none !important;
  margin: 0 !important;
  padding: 0 !important;
}


/* =====================================================
   GUIDE / COMMON INNER
===================================================== */

.guide-hero__inner,
.guide-nav__inner,
.guide-start__inner,
.guide-topic__inner,
.guide-perspective__inner,
.guide-service__inner {
  width: 100%;
  margin: 0 !important;
  padding: 0 !important;
}

.guide-hero__inner > .wp-block-group__inner-container,
.guide-nav__inner > .wp-block-group__inner-container,
.guide-start__inner > .wp-block-group__inner-container,
.guide-topic__inner > .wp-block-group__inner-container,
.guide-perspective__inner > .wp-block-group__inner-container,
.guide-service__inner > .wp-block-group__inner-container {
  width: min(calc(100% - 48px), var(--guide-container));
  max-width: var(--guide-container) !important;
  margin-right: auto !important;
  margin-left: auto !important;
  padding: 0 !important;
}


/* =====================================================
   GUIDE / SECTION SPACING
===================================================== */

.post_content .swell-block-fullWide.guide-nav,
.post_content .swell-block-fullWide.guide-start,
.post_content .swell-block-fullWide.guide-topic,
.post_content .swell-block-fullWide.guide-perspective,
.post_content .swell-block-fullWide.guide-service {
  padding-top: var(--guide-section-space) !important;
  padding-bottom: var(--guide-section-space) !important;
}


/* =====================================================
   GUIDE / HEADINGS RESET
===================================================== */

.post_content .guide-nav h2,
.post_content .guide-start h2,
.post_content .guide-topic h2,
.post_content .guide-perspective h2,
.post_content .guide-service h2,
.post_content .guide-nav h3 {
  position: relative;

  margin-bottom: 0;
  padding: 0 !important;

  border: 0 !important;
  border-radius: 0 !important;

  background: transparent !important;

  color: var(--guide-heading);

  box-shadow: none !important;
}

.post_content .guide-nav h2::before,
.post_content .guide-nav h2::after,
.post_content .guide-start h2::before,
.post_content .guide-start h2::after,
.post_content .guide-topic h2::before,
.post_content .guide-topic h2::after,
.post_content .guide-perspective h2::before,
.post_content .guide-perspective h2::after,
.post_content .guide-service h2::before,
.post_content .guide-service h2::after,
.post_content .guide-nav h3::before,
.post_content .guide-nav h3::after {
  display: none !important;
  content: none !important;
}


/* =====================================================
   GUIDE / COMMON TYPOGRAPHY
===================================================== */

.guide-label {
  margin: 0 0 18px !important;

  color: var(--guide-primary);

  font-size: 12px;
  font-weight: 700;

  line-height: 1.4;
  letter-spacing: .14em;
}

.post_content .guide-section-title {
  max-width: 860px;

  margin: 0 !important;

  color: var(--guide-heading) !important;

  font-size: clamp(30px, 3.2vw, 42px) !important;
  font-weight: 700 !important;

  line-height: 1.4 !important;
  letter-spacing: -.025em !important;
}

.guide-section-lead {
  max-width: var(--guide-text);

  margin-top: 24px !important;
  margin-bottom: 0 !important;

  color: var(--guide-body);

  font-size: 16px;
  line-height: 1.95;
}

.guide-post-list {
  margin-top: 48px !important;
}


/* =====================================================
   GUIDE HERO
===================================================== */

.guide-hero {
  background-color: var(--guide-white);
}

.guide-hero__inner {
  padding: 80px 0 104px !important;
}

.guide-hero__inner > .wp-block-group__inner-container {
  max-width: var(--guide-container) !important;
}

.guide-hero__header {
  width: 100%;
  max-width: 880px;

  margin: 0 !important;
  padding: 0 !important;
}

.guide-hero__header > .wp-block-group__inner-container {
  width: 100%;
  max-width: none !important;

  margin: 0 !important;
  padding: 0 !important;
}

.post_content
.guide-hero
h1.site-page-title.guide-hero__title {
  max-width: 820px;

  margin: 0 !important;

  color: var(--guide-heading) !important;

  font-size: clamp(48px, 4.6vw, 64px) !important;
  font-weight: 700 !important;

  line-height: 1.35 !important;
  letter-spacing: -.035em !important;
}

.guide-hero__lead {
  max-width: 720px;

  margin-top: 32px !important;
  margin-bottom: 0 !important;

  color: var(--guide-body);

  font-size: 17px;
  line-height: 1.95;
}


/* =====================================================
   GUIDE NAV
===================================================== */

.guide-nav {
  background-color: var(--guide-surface);
}

.guide-nav__header {
  width: 100%;
  max-width: 820px;

  margin: 0 !important;
  padding: 0 !important;
}

.guide-nav__header > .wp-block-group__inner-container {
  width: 100%;
  max-width: none !important;

  margin: 0 !important;
  padding: 0 !important;
}

.guide-nav__grid {
  width: 100%;

  margin-top: 48px !important;
  padding: 0 !important;
}

.guide-nav__grid > .wp-block-group__inner-container {
  display: grid;

  grid-template-columns:
    repeat(auto-fit, minmax(min(100%, 240px), 1fr));

  gap: 20px;

  width: 100%;
  max-width: none !important;

  margin: 0 !important;
  padding: 0 !important;
}

.guide-nav__item {
  width: 100%;
  height: 100%;

  margin: 0 !important;
  padding: 0 !important;

  background-color: var(--guide-white);

  border: 1px solid var(--guide-border);
  border-radius: 10px;
}

.guide-nav__item > .wp-block-group__inner-container {
  width: 100%;
  height: 100%;

  margin: 0 !important;
  padding: 30px 32px !important;
}

.guide-nav__number {
  margin: 0 !important;

  color: var(--guide-primary);

  font-size: 11px;
  font-weight: 700;

  line-height: 1;
  letter-spacing: .1em;
}

.post_content .guide-nav__title {
  margin-top: 22px !important;

  color: var(--guide-heading) !important;

  font-size: 20px !important;
  font-weight: 700 !important;

  line-height: 1.55 !important;
}

.guide-nav__title a {
  color: inherit;
  text-decoration: none;
}

.guide-nav__title a:hover {
  color: var(--guide-primary);
}

.guide-nav__title a:focus-visible {
  outline: 2px solid var(--guide-primary);
  outline-offset: 4px;
  border-radius: 2px;
}

.guide-nav__text {
  margin-top: 12px !important;
  margin-bottom: 0 !important;

  color: var(--guide-body);

  font-size: 14px;
  line-height: 1.85;
}


/* =====================================================
   GUIDE START
===================================================== */

.guide-start {
  background-color: var(--guide-white);
}

.guide-start__header {
  width: 100%;
  max-width: 820px;

  margin: 0 !important;
  padding: 0 !important;
}

.guide-start__header > .wp-block-group__inner-container {
  width: 100%;
  max-width: none !important;

  margin: 0 !important;
  padding: 0 !important;
}


/* =====================================================
   GUIDE TOPIC SECTIONS
===================================================== */

.guide-topic {
  background-color: var(--guide-white);
}

.guide-topic--dx {
  background-color: #FCFDFF;
}

.guide-topic__header {
  width: 100%;
  max-width: 840px;

  margin: 0 !important;
  padding: 0 !important;
}

.guide-topic__header > .wp-block-group__inner-container {
  width: 100%;
  max-width: none !important;

  margin: 0 !important;
  padding: 0 !important;
}


/* =====================================================
   GUIDE PERSPECTIVE
===================================================== */

.guide-perspective {
  background-color: var(--guide-surface);
}

.guide-perspective__content {
  width: 100%;
  max-width: 900px;

  margin: 0 !important;
  padding: 0 !important;
}

.guide-perspective__content > .wp-block-group__inner-container {
  width: 100%;
  max-width: none !important;

  margin: 0 !important;
  padding: 0 !important;
}

.guide-perspective__text {
  max-width: var(--guide-text);

  margin-top: 28px !important;
  margin-bottom: 0 !important;

  color: var(--guide-body);

  font-size: 16px;
  line-height: 2;
}


/* =====================================================
   GUIDE SERVICE
===================================================== */

.guide-service {
  background-color: var(--guide-primary-light) !important;
}

.guide-service__content {
  width: 100%;
  max-width: 900px;

  margin: 0 !important;
  padding: 0 !important;
}

.guide-service__content > .wp-block-group__inner-container {
  width: 100%;
  max-width: none !important;

  margin: 0 !important;
  padding: 0 !important;
}

.guide-service__text {
  max-width: var(--guide-text);

  margin-top: 28px !important;
  margin-bottom: 0 !important;

  color: var(--guide-body);

  font-size: 16px;
  line-height: 1.95;
}

.guide-service__actions {
  width: 100%;

  margin-top: 36px !important;
  padding: 0 !important;
}

.guide-service__actions > .wp-block-group__inner-container {
  display: flex;
  flex-direction: row;
  align-items: stretch;

  gap: 12px;

  width: 100%;
  max-width: none !important;

  margin: 0 !important;
  padding: 0 !important;
}

.guide-service__button,
.guide-service__contact {
  margin: 0 !important;
}

.guide-service__button a,
.guide-service__contact a {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  min-height: 52px;

  padding: 13px 24px !important;

  border-radius: 8px !important;

  font-size: 14px;
  font-weight: 700;

  line-height: 1.4;

  text-decoration: none !important;

  transition:
    background-color .18s ease,
    border-color .18s ease,
    color .18s ease,
    transform .18s ease;
}


/* Main action */
.guide-service__button a {
  min-width: 224px;

  border: 1px solid var(--guide-primary) !important;

  background: var(--guide-primary) !important;
  color: #FFFFFF !important;
}

.guide-service__button a:hover {
  background: var(--site-primary-dark, #1D4ED8) !important;
  border-color: var(--site-primary-dark, #1D4ED8) !important;

  transform: translateY(-1px);
}


/* Secondary action */
.guide-service__contact a {
  min-width: 190px;

  border: 1px solid var(--guide-primary) !important;

  background-color: transparent !important;
  color: var(--guide-primary) !important;
}

.guide-service__contact a::after {
  margin-left: 10px;

  content: "→";

  font-size: 15px;
  line-height: 1;
}

.guide-service__contact a:hover {
  background-color: var(--guide-white) !important;
  border-color: var(--site-primary-dark, #1D4ED8) !important;
  color: var(--site-primary-dark, #1D4ED8) !important;

  transform: translateY(-1px);
}


.guide-service__button a:focus-visible,
.guide-service__contact a:focus-visible {
  outline: 2px solid var(--guide-primary);
  outline-offset: 3px;
}



/* =====================================================
   GUIDE / ANCHOR OFFSET
===================================================== */

#welfare-management,
#ict-dx,
#it-web,
#it-team,
#it-infra,
#web-support {
  scroll-margin-top: 96px;
}


/* =====================================================
   RESPONSIVE / <= 959px
===================================================== */

@media (max-width: 959px) {

  .post_content .swell-block-fullWide.guide-nav,
  .post_content .swell-block-fullWide.guide-start,
  .post_content .swell-block-fullWide.guide-topic,
  .post_content .swell-block-fullWide.guide-perspective,
  .post_content .swell-block-fullWide.guide-service {
    padding-top: var(--guide-section-space-tablet) !important;
    padding-bottom: var(--guide-section-space-tablet) !important;
  }

  .guide-hero__inner {
    padding-top: 64px !important;
    padding-bottom: 80px !important;
  }

  .guide-nav__grid {
    margin-top: 40px !important;
  }

}


/* =====================================================
   RESPONSIVE / <= 767px
===================================================== */

@media (max-width: 767px) {

  .guide-hero__inner > .wp-block-group__inner-container,
  .guide-nav__inner > .wp-block-group__inner-container,
  .guide-start__inner > .wp-block-group__inner-container,
  .guide-topic__inner > .wp-block-group__inner-container,
  .guide-perspective__inner > .wp-block-group__inner-container,
  .guide-service__inner > .wp-block-group__inner-container {
    width: min(calc(100% - 32px), var(--guide-container));
  }

  .post_content .swell-block-fullWide.guide-nav,
  .post_content .swell-block-fullWide.guide-start,
  .post_content .swell-block-fullWide.guide-topic,
  .post_content .swell-block-fullWide.guide-perspective,
  .post_content .swell-block-fullWide.guide-service {
    padding-top: var(--guide-section-space-mobile) !important;
    padding-bottom: var(--guide-section-space-mobile) !important;
  }

  .guide-hero__inner {
    padding-top: 48px !important;
    padding-bottom: 64px !important;
  }

  .post_content
  .guide-hero
  h1.site-page-title.guide-hero__title {
    font-size: clamp(36px, 9vw, 44px) !important;
    line-height: 1.4 !important;
  }

  .guide-hero__lead {
    margin-top: 24px !important;

    font-size: 16px;
    line-height: 1.9;
  }

  .post_content .guide-section-title {
    font-size: 27px !important;
    line-height: 1.45 !important;
  }

  .guide-section-lead {
    margin-top: 20px !important;

    font-size: 15px;
    line-height: 1.9;
  }

  .guide-nav__grid {
    margin-top: 32px !important;
  }

  .guide-nav__grid > .wp-block-group__inner-container {
    grid-template-columns: 1fr;
  }

  .guide-nav__item > .wp-block-group__inner-container {
    padding: 26px 24px !important;
  }

  .post_content .guide-nav__title {
    margin-top: 18px !important;

    font-size: 19px !important;
  }

  .guide-post-list {
    margin-top: 32px !important;
  }

  .guide-perspective__text,
  .guide-service__text {
    font-size: 15px;
    line-height: 1.9;
  }

  .guide-service__actions > .wp-block-group__inner-container {
    flex-direction: column;

    gap: 12px;
  }

  .guide-service__button,
  .guide-service__contact,
  .guide-service__button a,
  .guide-service__contact a {
    width: 100%;
  }

  .guide-service__button a,
  .guide-service__contact a {
    min-width: 0;
    text-align: center;
  }

}

