/*
Theme Name: GAKU Cases
Theme URI: https://example.com/
Author: GAKU
Description: GAKU合同会社の施工事例ページ用WordPressテーマです。
Version: 1.0.3
Requires at least: 6.0
Tested up to: 6.5
Requires PHP: 7.4
Text Domain: gaku-cases
*/

:root {
  --green: #00684d;
  --blue: #057385;
  --orange: #ea570f;
  --navy: #051525;
  --text: #1a1a1a;
  --text-light: #666666;
  --white: #ffffff;
  --border: #c5ddd6;
  --container: 1200px;
  --topbar-h: 48px;
  --header-h: 72px;
  --site-header-h: calc(var(--topbar-h) + var(--header-h));
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: "Noto Sans JP", sans-serif;
  color: var(--text);
  line-height: 1.7;
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

ul {
  list-style: none;
}

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 20px;
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: var(--white);
  box-shadow: 0 1px 8px rgba(0, 0, 0, 0.06);
}

.topbar {
  background: var(--navy);
  height: var(--topbar-h);
  display: flex;
  align-items: center;
  justify-content: center;
}

.topbar__text {
  color: var(--white);
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.04em;
}

.header {
  height: var(--header-h);
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-h);
  gap: 16px;
}

.header__logo {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.header__logo img {
  height: 40px;
  width: auto;
}

.header__logo-text {
  font-size: 1.125rem;
  font-weight: 900;
  color: var(--text);
  white-space: nowrap;
  letter-spacing: 0.02em;
}

.header__nav {
  flex: 1;
  display: flex;
  justify-content: center;
}

.header__nav-list {
  display: flex;
  gap: 36px;
}

.header__nav-list a {
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--text);
  transition: color 0.2s;
  white-space: nowrap;
}

.header__nav-list a:hover {
  color: var(--green);
}

.header__actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.header__sns img {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  transition: opacity 0.2s;
}

.header__sns:hover img {
  opacity: 0.8;
}

.header__tel-img {
  height: 56px;
  width: auto;
}

.header__nav-close {
  display: none;
}

.header__burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.header__burger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition:
    transform 0.3s,
    opacity 0.3s;
}

.header__burger.is-active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.header__burger.is-active span:nth-child(2) {
  opacity: 0;
}

.header__burger.is-active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.section {
  padding: 80px 0;
}

.section__title {
  font-size: clamp(1.375rem, 3vw, 1.875rem);
  font-weight: 900;
  letter-spacing: 0.05em;
  text-align: center;
  line-height: 1.6;
  color: var(--text);
  margin-bottom: 40px;
}

.cases-page__main {
  padding-top: calc(var(--site-header-h) + 48px);
}

.cases-page__lead {
  text-align: center;
  font-size: 0.9375rem;
  color: var(--text-light);
  margin: -20px auto 24px;
  max-width: 640px;
  line-height: 1.8;
}

.case-filter {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  width: fit-content;
  max-width: 100%;
  margin: 0 auto 40px;
  padding: 6px;
  border: 1px solid #c5ddd6;
  border-radius: 999px;
  background: #f3faf8;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.8);
}

.case-filter__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 116px;
  min-height: 42px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  color: #005f6f;
  font-size: 0.875rem;
  font-weight: 700;
  line-height: 1.3;
  padding: 9px 20px;
  transition:
    background 0.2s,
    border-color 0.2s,
    box-shadow 0.2s,
    color 0.2s,
    transform 0.2s;
}

.case-filter__btn:hover {
  background: #fff;
  border-color: rgba(0, 123, 143, 0.28);
  color: #007b8f;
}

.case-filter__btn.is-active {
  background: #007b8f;
  border-color: #007b8f;
  color: #fff;
  box-shadow: 0 6px 14px rgba(0, 123, 143, 0.22);
  transform: translateY(-1px);
}

.results {
  background: var(--white);
}

.results > .container {
  max-width: 960px;
}

.results__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.result-card {
  border: 1px solid #007b8f;
  background: #fff;
  border-radius: 19px;
  padding: 24px;
}

.result-card__img {
  width: 100%;
  border-radius: 0;
  display: block;
  margin: 0 auto;
}

.result-card__tag {
  display: inline-block;
  background: #007b8f;
  color: var(--white);
  font-size: 0.6rem;
  font-weight: 700;
  padding: 3px 10px;
  margin-top: 16px;
}

.result-card__title {
  font-size: 1.2rem;
  font-weight: 900;
  color: #002b3d;
  margin-top: 8px;
  line-height: 1.4;
}

.result-card__text {
  font-size: 0.8rem;
  color: #002b3d;
  line-height: 1.6;
  margin-top: 12px;
}

.case-empty {
  grid-column: 1 / -1;
  text-align: center;
  color: var(--text-light);
  font-size: 0.9375rem;
  padding: 32px 0;
}

.case-back {
  display: flex;
  justify-content: center;
  margin-top: 40px;
}

.case-back__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 180px;
  min-height: 44px;
  border: 1px solid #007b8f;
  border-radius: 999px;
  background: #fff;
  color: #007b8f;
  font-size: 0.9375rem;
  font-weight: 700;
  line-height: 1.3;
  padding: 10px 24px;
  transition:
    background 0.2s,
    box-shadow 0.2s,
    color 0.2s,
    transform 0.2s;
}

.case-back__btn::before {
  content: "";
  width: 0.48em;
  height: 0.48em;
  border-left: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  margin-right: 10px;
  transform: rotate(45deg);
}

.case-back__btn:hover {
  background: #007b8f;
  color: #fff;
  box-shadow: 0 6px 14px rgba(0, 123, 143, 0.22);
  transform: translateY(-1px);
}

.case-single {
  max-width: 760px;
  margin: 0 auto;
  border: 1px solid #007b8f;
  background: #fff;
  border-radius: 19px;
  padding: 32px;
}

.case-single__back {
  display: flex;
  max-width: 760px;
  margin: -12px auto 20px;
}

.case-single__img {
  width: 100%;
  margin-bottom: 20px;
}

.case-single__title {
  color: #002b3d;
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 900;
  line-height: 1.5;
  margin-top: 10px;
}

.case-single__content {
  color: #002b3d;
  font-size: 1rem;
  line-height: 1.9;
  margin-top: 20px;
}

.case-single__content p + p {
  margin-top: 1em;
}

.footer {
  background: var(--navy);
  color: rgba(255, 255, 255, 0.8);
  padding: 48px 0 0;
}

.footer__inner {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 40px;
  align-items: start;
  padding-bottom: 32px;
}

.footer__brand img {
  margin-bottom: 12px;
  filter: brightness(0) invert(1);
  opacity: 0.9;
}

.footer__company {
  font-weight: 700;
  color: var(--white);
  margin-bottom: 8px;
  font-size: 0.9375rem;
}

.footer__address {
  font-size: 0.8125rem;
  line-height: 1.8;
}

.footer__nav ul {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer__nav a {
  font-size: 0.8125rem;
  transition: color 0.2s;
}

.footer__nav a:hover {
  color: var(--white);
}

.footer__sns {
  display: flex;
  gap: 10px;
}

.footer__sns img {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  transition: opacity 0.2s;
}

.footer__sns a:hover img {
  opacity: 0.8;
}

.footer__copy {
  text-align: center;
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.5);
  padding: 16px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.mobile-cta {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 999;
  background: var(--white);
  padding: 8px 12px;
  gap: 8px;
}

.mobile-cta__btn {
  flex: 1;
  display: block;
  line-height: 0;
}

.mobile-cta__btn img {
  width: 100%;
  height: auto;
  display: block;
}

@media (max-width: 1100px) {
  .header__nav-list {
    gap: 20px;
  }

  .header__nav-list a {
    font-size: 0.8125rem;
  }

  .header__logo-text {
    font-size: 1rem;
  }

  .header__tel-img {
    height: 48px;
  }
}

@media (max-width: 768px) {
  :root {
    --topbar-h: 30px;
    --header-h: 60px;
  }

  .container {
    padding: 0 20px;
  }

  .section {
    padding: 56px 0;
  }

  .section__title {
    font-size: 1.375rem;
    margin-bottom: 28px;
  }

  .topbar__text {
    font-size: 0.75rem;
  }

  .header__logo-text {
    font-size: 0.9375rem;
  }

  .header__logo img {
    height: 32px;
  }

  .header__nav {
    position: fixed;
    top: 0;
    right: 0;
    left: auto;
    bottom: 0;
    width: min(85%, 300px);
    height: 100dvh;
    background: var(--blue);
    box-shadow: -4px 0 16px rgba(0, 0, 0, 0.12);
    padding: calc(var(--site-header-h) + 24px) 24px 24px;
    transform: translateX(100%);
    visibility: hidden;
    transition:
      transform 0.3s ease,
      visibility 0.3s;
    z-index: 1001;
  }

  .header__nav.is-open {
    transform: translateX(0);
    visibility: visible;
  }

  .header__nav-close {
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: calc(var(--site-header-h) + 8px);
    right: 16px;
    width: 40px;
    height: 40px;
    background: none;
    border: none;
    color: #fff;
    font-size: 1.75rem;
    line-height: 1;
    cursor: pointer;
    padding: 0;
  }

  .header__nav-list {
    flex-direction: column;
    gap: 0;
  }

  .header__nav-list a {
    display: block;
    padding: 14px 0;
    font-size: 1rem;
    color: #fff;
    border-bottom: 1px solid rgba(255, 255, 255, 0.25);
  }

  .header__nav-list a:hover {
    color: #fff;
  }

  .header__actions {
    display: none;
  }

  .header__burger {
    display: flex;
  }

  .cases-page__main {
    padding-top: calc(var(--site-header-h) + 40px);
  }

  .results__grid {
    grid-template-columns: 1fr;
    gap: 16px;
    justify-items: center;
  }

  .result-card {
    width: 90%;
    padding: 20px 16px;
    border-radius: 16px;
  }

  .result-card__title {
    font-size: 1.125rem;
  }

  .result-card__text {
    font-size: 0.875rem;
    line-height: 1.7;
  }

  .case-single {
    width: 90%;
    padding: 20px 16px;
    border-radius: 16px;
  }

  .case-single__back {
    width: 90%;
  }

  .footer__inner {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 24px;
  }

  .footer__brand img {
    margin-left: auto;
    margin-right: auto;
  }

  .footer__nav ul {
    align-items: center;
  }

  .footer__sns {
    justify-content: center;
  }

  .mobile-cta {
    display: flex;
    padding: 6.4px 10%;
    gap: 6.4px;
  }

  body {
    padding-bottom: 58px;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 20px;
  }

  .cases-page__main {
    padding-top: calc(var(--site-header-h) + 32px);
  }

  .cases-page__lead {
    font-size: 0.875rem;
    margin-bottom: 20px;
  }

  .case-filter {
    width: 100%;
    gap: 6px;
    margin-bottom: 28px;
    border-radius: 18px;
  }

  .case-filter__btn {
    flex: 1 1 calc(33.333% - 6px);
    min-width: 0;
    min-height: 38px;
    font-size: 0.8125rem;
    padding: 7px 10px;
  }

  .case-back {
    margin-top: 32px;
  }

  .case-back__btn {
    width: 100%;
    min-height: 42px;
    font-size: 0.875rem;
  }

  .section__title {
    font-size: 1.25rem;
  }
}
