/* Modern CSS Reset */
*,
*::before,
*::after {
  box-sizing: border-box;
}

* {
  margin: 0;
  padding: 0;
}

html,
body {
  font-family: "Noto Serif JP", serif;
  height: 100%;
}

body {
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeSpeed;
}

img,
picture,
video,
canvas,
svg {
  display: block;
  max-width: 100%;
}

input,
button,
textarea,
select {
  font: inherit;
}

a {
  text-decoration: none;
  color: inherit;
}

ul[role="list"],
ol[role="list"] {
  list-style: none;
}

button {
  background: none;
  border: none;
  cursor: pointer;
}

table {
  border-collapse: collapse;
  border-spacing: 0;
}

/* 1カラム */

main {
  margin-top: 80px;
}

.sponsor-container {
  max-width: 1180px;
  width: 100%;
  margin: auto;
}

.sponsor-container .one-col:not(:first-child) {
  margin-top: 160px;
}

.sponsor-item {
  display: flex;

  img {
    width: 100%;
    height: 100%;
    max-width: 333px;
    max-height: 440px;
  }
}

.one-col {
  gap: 40px;
}

.sponsor-info {
  width: 72%;

  p {
    margin: 0;
    line-height: 1;
    font-size: 24px;
  }

  span {
    display: block;
    margin-top: 16px;
  }
}

.sponsor-link {
  position: relative;
  width: fit-content;
  margin-top: 16px;

  a {
    display: inline-block;
    padding: 8px 32px;
    color: #fff;
    background-color: #0a0524;
    transition: background-color 0.3s;

    &:hover {
      background-color: #dfc15e;
    }

    i {
      position: absolute;
      top: 39%;
      right: 12px;
      font-size: 0.7em;
      transition: transform 0.2s ease;
    }
  }

  a:hover i {
    transform: translateX(2px);
  }
}

.sponsor-text {
  margin: 32px 0 0;

  h2 {
    position: relative;
    text-align: left;
    margin: 0;
    padding-bottom: 10px;
    font-size: 40px;
    line-height: 1.5;
    border-bottom: none;

    &::after {
      content: "";
      position: absolute;
      left: 0;
      bottom: 0;
      width: 100%;
      height: 2px;
      background: linear-gradient(to right, #dfc15e 70%, #ffffff 100%);
    }
  }

  h2::before {
    display: none;
  }
}

.sponsor-paragraph {
  position: relative;
  height: 5em;
  overflow: hidden;
  margin-top: 24px !important;
  font-size: 16px !important;
  line-height: 1.6 !important;
  transition: height 0.4s ease;
  opacity: 1;
}

.sponsor-paragraph::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 4em;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0) 0%, #fff 100%);
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.sponsor-paragraph.open {
  height: auto;
  opacity: 1;
}

.sponsor-paragraph.open::after {
  opacity: 0;
}

.toggle-button {
  display: inline-block;
  margin-top: 12px;
  padding: 4px 0;
  font-size: 16px;
  color: #977a17;
  border-bottom: 1.5px solid transparent;
  cursor: pointer;
  user-select: none;
  transition: border-color 0.3s ease, color 0.3s ease;
}

.toggle-button:hover {
  color: #dfc15e;
}

/* 2カラム */
.two-col-wrap {
  margin-top: 160px;
  display: grid;
  grid-template-columns: repeat(2, 4fr);
  gap: 160px 64px;
}

.two-col {
  display: block;

  .sponsor-info {
    margin-top: 24px;
  }

  .sponsor-info {
    width: 100%;
  }

  .sponsor-text {
    margin-top: 24px;

    h2 {
      font-size: 32px;
    }
  }
}

/* スポンサーロゴ */
.sponsor-logo {
  display: grid;
  grid-template-columns: repeat(5, 2fr);
  align-items: center;
  gap: 32px;
  margin-top: 64px;
}

.sponsor-logo-text {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 190px;

  p {
    font-size: 24px;
    font-weight: bold;
  }
}

/* 応募はこちらから */
.sponsor-contact {
  text-align: center;
  margin-top: 80px;
  padding: 115px 0;
  background-color: #f5f5f5;

  h3 {
    font-size: 32px;
    line-height: 1.8;
  }
}

.sponsor-oubo-button {
  position: relative;
  width: fit-content;
  margin: 40px auto 0;

  a {
    display: inline-block;
    padding: 12px 184px;
    font-size: 18px;
    color: #fff;
    background-color: #9f0101;
    text-align: center;
    text-decoration: none;
    transition: background-color 0.3s ease;
  }

  a:hover {
    background-color: #fff;
    color: #9f0101;
    border: 1px solid #9f0101;
  }

  i {
    position: absolute;
    top: 39%;
    right: 12px;
    font-size: 0.7em;
    transition: transform 0.2s ease;
  }

  a:hover i {
    transform: translateX(2px);
  }
}

/* 右下固定ボタン */
.fixed-buttons {
  position: fixed;
  bottom: 24px;
  right: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  z-index: 9998;
}

.fixed-buttons a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 24px;
  background-color: #fff;
  color: #0a0524;
  border: 2px solid #0a0524;
  font-size: 16px;
  font-weight: bold;
  text-align: center;
  transition: background-color 0.3s ease, transform 0.2s ease;
}

.fixed-buttons a:hover {
  transform: translateY(-2px);
}

.fixed-buttons i {
  position: inherit;
}

@media screen and (max-width: 1180px) {
  .sponsor-logo-text {
    height: 12.5vw;

    p {
      font-size: 20px;
    }
  }
}

@media screen and (max-width: 850px) {
  .sponsor-container {
    padding: 0 16px;
  }

  .one-col {
    gap: 32px;
  }

  .sponsor-item {
    img {
      width: 34%;
    }
  }

  .sponsor-info {
    width: 66%;

    p {
      font-size: 20px;
    }

    span {
      font-size: 16px;
    }
  }

  .sponsor-link {
    a {
      font-size: 14px;
    }
  }

  .sponsor-text {
    margin: 24px 0 0;

    h2 {
      font-size: 28px;
    }
  }

  .sponsor-paragraph {
    margin-top: 16px !important;
  }

  .two-col-wrap {
    margin-top: 140px;
    gap: 140px 48px;
  }

  .two-col {
    img {
      width: 100%;
      height: auto;
    }

    & .sponsor-text {
      & h2 {
        font-size: 26px;
      }
    }
  }

  .sponsor-logo {
    grid-template-columns: repeat(3, 4fr);
  }

  .sponsor-logo-text {
    height: 20.3vw;

    p {
      font-size: 18px;
    }
  }

  .fixed-buttons {
    bottom: 16px;
    right: 16px;
    gap: 8px;
  }

  .fixed-buttons a {
    padding: 12px 16px;
    font-size: 14px;
    border-width: 1.5px;
  }

  .fixed-buttons i {
    font-size: 16px;
  }
}

@media screen and (max-width: 480px) {
  main {
    margin-top: 64px;
  }

  .sponsor-container {
    padding: 0 16px;
  }

  .sponsor-container .one-col:not(:first-child) {
    margin-top: 120px;
  }

  .sponsor-item {
    flex-direction: column;
    gap: 24px;

    img {
      width: 100%;
      max-width: none;
      max-height: none;
    }
  }

  .sponsor-info {
    width: 100%;

    span {
      margin-top: 8px;
    }

    p {
      font-size: 18px;
    }
  }

  .sponsor-link {
    margin-top: 16px;

    a {
      font-size: 14px;
    }
  }

  .sponsor-text {
    margin: 24px 0 0;

    h2 {
      padding-bottom: 8px;
      font-size: 26px;
    }
  }

  .sponsor-paragraph {
    margin-top: 16px !important;
  }

  .two-col-wrap {
    margin-top: 120px;
    grid-template-columns: repeat(1, 8fr);
    gap: 120px 32px;
  }

  .two-col {
    & .sponsor-text {
      & h2 {
        font-size: 26px;
      }
    }
  }

  .sponsor-logo {
    grid-template-columns: repeat(2, 2fr);
    gap: 32px;
    margin-top: 64px;
  }

  .sponsor-logo-text {
    height: 30.4vw;
  }

  .sponsor-contact {
    margin-top: 64px;
    padding: 64px 0;

    h3 {
      font-size: 20px;
    }
  }

  .sponsor-oubo-button {
    width: 80%;
    margin: 24px auto 0;

    & a {
      width: 100%;
      padding: 12px 16px;
      font-size: 16px;
      color: #fff;
    }
  }

  .sitemap {
    display: grid;
    grid-template-columns: repeat(10, 1fr);
  }

  .fixed-buttons {
    bottom: 16px;
    right: 16px;
  }

  .fixed-buttons a {
    font-size: 12px;
  }
}
