@charset "UTF-8";
@import url("normalize.css");
@import url("https://fonts.googleapis.com/css2?family=Noto+Sans+JP:wght@400;600&display=swap");

:root {
  --color-text: #333;
  --color-green: #13a73b;
  --color-orange: #ea5405;
  --color-purple: #b963a3;
  --color-yellow: #feda3e;
  --color-gray: #bfc0c0;
  --color-nav-hover: rgba(191, 192, 192, 0.4);

  --header-height: 80px;
  --hero-height: calc(100vh - var(--header-height));
  --hero-image-column: 8;
  --hero-image-row: 6;
  --hero-logo-column: 2;
  --hero-logo-row: 2;
}

@media (orientation: portrait) {
  :root {
    --hero-image-column: 4;
    --hero-image-row: 6;
    --hero-logo-column: 2;
    --hero-logo-row: 2;
  }
}

a {
  transition: 0.3s;
  color: var(--color-orange);

  &:hover {
    text-decoration: none;
  }
}

a img {
  transition: 0.3s;

  &:hover {
    opacity: 0.6;
  }
}

::selection {
  background: var(--color-yellow);
  color: #222;
}

.hidden {
  opacity: 0;
}

body {
  margin: 0;
  padding-top: var(--header-height);
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  color: var(--color-text);
  font-family: "Noto Sans JP", sans-serif;
  letter-spacing: 0.03em;
  font-feature-settings: "halt";
  line-height: 1.8;

  @media screen and (max-width: 768px) {
    font-size: 15px;
  }

  @media screen and (max-width: 550px) {
    font-size: 14px;
  }
}

/* header */

header {
  background-color: #fff;
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 10;
}

#sitetitle {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 5px 18px !important;
  margin-left: -18px;

  & .title {
    font-weight: normal;
    font-size: 21px;
    margin: 0;
    letter-spacing: 0.05em;
    line-height: 1.3;
  }

  & .logo {
    width: 65px;
  }

  & .theme {
    font-size: 13.5px;
  }

  @media screen and (max-width: 768px) {
    padding: 8px 10px !important;
    margin-left: -8px;

    & .title {
      font-size: 16px;
    }

    & .logo {
      width: 50px;
    }

    & .theme {
      font-size: 12px;
    }
  }

  @media screen and (max-width: 550px) {
    padding: 8px 15px !important;
    margin-left: 0;
  }
}

#main-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: var(--header-height);
  padding: 0 40px;

  & a {
    text-decoration: none;
    color: var(--color-text);
    padding: 5px 15px;
  }

  & a:hover {
    background-color: var(--color-nav-hover);
    border-radius: 100px;
  }

  & .nav-links {
    padding: 0;
    margin: 0;
    list-style: none;
    display: flex;
  }

  @media screen and (max-width: 768px) {
    padding: 0 20px;

    & a {
      text-decoration: none;
      color: var(--color-text);
      padding: 5px 10px;
    }
  }

  @media screen and (max-width: 550px) {
    justify-self: center;

    & .nav-links {
      display: none;
    }
  }
}

/* セクション共通 */

section {
  max-width: 980px;
  margin: 0 auto 60px;
  padding: 60px 40px;

  @media screen and (max-width: 768px) {
    margin-bottom: 80px;
  }

  @media screen and (max-width: 550px) {
    padding: 20px;
    margin-bottom: 20px;
  }
}

.section-title {
  border-left: 8px solid var(--color-purple);
  padding-left: 12px;
  margin-bottom: 40px;

  @media screen and (max-width: 550px) {
    font-size: 20px;
    margin-bottom: 30px;
  }
}

section p {
  text-align: justify;
}

main {
  flex: 1;
}

/* フッター */

footer {
  background: var(--color-green);
  color: #fff;
  text-align: center;
  font-size: 15px;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 2.5em;

  @media screen and (max-width: 550px) {
    font-size: 13px;
  }
}

#topagetop {
  position: fixed;
  bottom: 20px;
  right: 20px;
  transition: 0.5s;

  & a {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    line-height: 50px;
    background-color: var(--color-orange);
    color: #fff;
    text-align: center;
    font-size: 24px;
    text-decoration: none;
    display: block;
  }

  & a:hover {
    opacity: 0.6;
  }
}

/* 共通部品 */

.dl-files {
  padding-left: 1.5em;

  & a {
    color: var(--color-text);
  }
}

.info-notes {
  padding-left: 0;
  list-style: none;

  & li {
    text-indent: -1em;
    padding-left: 1em;
  }

  & li::before {
    content: "※";
  }
}

/* 個別 */

#hero {
  position: relative;
  width: 100%;
  height: var(--hero-height);
  margin: 0;
  padding: 0;
  background: url("../images/hero005.jpg") no-repeat center center;
  background-size: cover;
  overflow: hidden;
  max-width: none;
}

.hero-images {
  display: flex;
  justify-content: flex-start;
  flex-wrap: wrap;

  & .imagebox {
    height: calc(var(--hero-height) / var(--hero-image-row));
    width: calc(100% / var(--hero-image-column));
    background-color: #fff;
  }

  & img {
    object-fit: cover;
    width: 100%;
    height: 100%;
    transition: 0.3s;
  }

  & img.hero-img-wait {
    opacity: 0;
  }
}

#herologo {
  position: absolute;
  width: calc(100% / var(--hero-image-column) * var(--hero-logo-column));
  height: calc(100% / var(--hero-image-row) * var(--hero-logo-row));
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background-color: #fff;

  & img {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: auto;
    height: auto;
    max-width: 65%;
    max-height: 65%;
  }
}

/* わたしたちについて */

#about {
  & ol {
    padding-left: 1.5em;
  }
}

/* 団体概要 */

dl.overview {
  margin: 0;
  padding: 0;
  list-style-type: none;
  display: grid;
  width: fit-content;
  grid-template-columns: auto 1fr;
  border-top: 1px solid #ccc;
  align-items: stretch;

  & dt,
  & dd {
    padding: 12px 0;
    border-bottom: 1px solid #ccc;
  }

  & dt {
    padding-left: 15px;
  }

  & dd {
    margin-left: 0;
    padding-left: 40px;
    padding-right: 80px;
  }

  @media screen and (max-width: 550px) {
    width: 100%;

    & dt {
      padding-left: 0;
    }

    & dd {
      padding-left: 15px;
      padding-right: 0;
    }
  }
}

.info-items {
  display: grid;
  grid-template-columns: auto 1fr;
  margin-top: 20px;
  border-top: 1px solid #ddd;

  & dd {
    margin-left: 0;
    padding-left: 40px;
  }

  & dt,
  & dd {
    border-bottom: 1px solid #ddd;
    padding-top: 20px;
    padding-bottom: 20px;
  }

  @media screen and (max-width: 768px) {
    & dd {
      padding-left: 20px;
    }
  }

  @media screen and (max-width: 550px) {
    grid-template-columns: 1fr;

    & dt {
      border: none;
      padding-bottom: 10px;
    }

    & dd {
      padding-left: 0;
      padding-top: 0;
    }
  }
}

.info-files {
  margin-top: 1em;
  padding-left: 0;

  & li {
    display: grid;
    grid-template-columns: 5px 1fr;
    gap: 5px;
    align-items: center;
  }

  & li::before {
    content: "";
    width: 5px;
    height: 10px;
    margin-right: 0.5em;
    background-color: #666;
    clip-path: polygon(0% 0%, 0% 100%, 100% 50%);
  }
}

#kameo {
  background-color: #f1eae2;
  max-width: 100%;
  padding: 60px 20px;
  margin: 0;

  @media screen and (max-width: 550px) {
    padding: 30px 15px;
  }

  & .inner {
    max-width: 980px;
    padding: 40px;
    margin: auto;
    background-color: #fff;
    border-radius: 12px;

    @media screen and (max-width: 550px) {
      padding: 20px;
    }
  }

  & .info-images {
    display: flex;
    gap: 20px;
    max-width: 100%;

    @media screen and (max-width: 550px) {
      gap: 12px;
    }

    & img {
      width: 100%;
      height: auto;
    }
  }

  & h3 {
    font-size: 1.1em;
    background-color: #f6f6f6;
    border-left: 6px solid #6cc6c7;
    padding: 8px 15px;
    margin-top: 60px;

    @media screen and (max-width: 550px) {
      margin-top: 40px;
    }
  }
}

/* ========================================
   Hakodatelife
   ======================================== */

html {
  overflow-y: scroll;
}

#hakodatelife {
  background-color: #f1eae2;
  max-width: 100%;
  padding: 60px 20px;
  margin: 0;

  @media screen and (max-width: 550px) {
    padding: 30px 15px;
  }

  & .inner {
    max-width: 980px;
    margin: auto;
  }
}

.lang-section {
  transition: 0.3s;
  border-radius: 12px;
  margin-bottom: 20px;
  padding: 0 40px;
  overflow: hidden;

  &:has(.is-active) {
    background-color: #fff;
    padding: 40px;
    @media screen and (max-width: 550px) {
      padding: 15px;
    }
  }
}

.lang-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 16px 40px;
  border: none;
  border-radius: 100px;
  background-color: #fff;
  border: 2px solid #aaa;
  font-size: 1.1em;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: 0.3s;
  @media screen and (max-width: 550px) {
    padding: 14px 18px;
  }

  &:hover {
    background-color: #eee;
  }

  &.is-active {
    border-color: var(--color-purple);
    background-color: var(--color-purple);
    color: #fff;
    border-radius: 1px;
  }

  &.is-active:hover {
    border-color: #a254a0;
    background-color: #a254a0;
  }

  &::after {
    content: "▼";
    font-size: 0.75em;
    transition: transform 0.3s;
    color: #666;
  }

  &.is-active::after {
    transform: rotate(180deg);
    color: #fff;
  }
}

.lang-section-content {
  padding: 0;

  &:not([hidden]) {
    display: block;
    padding: 40px 0 20px;

    @media screen and (max-width: 550px) {
      padding: 20px 0;
    }
  }

  & h2 {
    border-left: 8px solid var(--color-purple);
    padding-left: 12px;
    margin-top: 40px;
    margin-bottom: 40px;

    &:first-child {
      margin-top: 0;
    }

    @media screen and (max-width: 550px) {
      font-size: 20px;
    }
  }

  & h3 {
    font-size: 1.1em;
    background-color: #f6f6f6;
    border-left: 6px solid #6cc6c7;
    padding: 8px 15px;
    margin-top: 30px;

    @media screen and (max-width: 550px) {
      margin-top: 20px;
    }
  }
}

.media-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  list-style: none;
  padding: 0;
  margin: 20px 0;

  @media screen and (max-width: 768px) {
    grid-template-columns: 1fr;
    gap: 16px;
  }
}

.media-grid-item {
  & h3 {
    margin: 0 0 15px;
    font-size: 1em;
  }

  & iframe {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    border: none;
  }

  & img {
    width: 100%;
    height: auto;
    border: 1px solid #ccc;
  }
}

.course-table {
  display: grid;
  grid-template-columns: auto 1fr;
  margin: 20px 0;
  border: 1px solid #ddd;

  & dt,
  & dd {
    margin: 0;
    padding: 10px 16px;
    border-bottom: 1px solid #ddd;
  }

  & dt {
    display: flex;
    align-items: center;
    background-color: #f6f6f6;
    font-weight: 600;
    border-right: 1px solid #ddd;
  }

  & dd {
    & p {
      margin: 4px 0;
    }
  }

  & dt:last-of-type,
  & dd:last-of-type {
    border-bottom: none;
  }
}

.contact-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  margin: 20px 0;

  @media screen and (max-width: 768px) {
    grid-template-columns: 1fr;
    gap: 16px;
  }
}

.contact-card {
  border: 1px solid #ddd;
  border-radius: 6px;
  padding: 24px 16px 16px;
  margin: 0;

  & dt {
    font-weight: 600;
    margin-bottom: 8px;
  }
  & dd {
    margin: 0;
    line-height: 1.6;
  }
}

.location-grid {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 24px;
  margin: 20px 0;
  align-items: start;

  @media screen and (max-width: 768px) {
    grid-template-columns: 1fr;
    gap: 16px;
  }
}

.location-detail {
  & p {
    margin: 4px 0;
  }
}

.location-map {
  & iframe {
    width: 100%;
    height: 300px;
    border: none;
  }
}
