/* ===== CSS変数 ===== */
:root {
  --primary-color: #663300;
  --primary-light: #885533;
  --primary-dark: #552d00;
  --secondary-color: #8b5a2b;
  --bg-light: #f7f0e3;
  --bg-lighter: #f8f5ea;
  --text-dark: #333;
  --text-muted: #666;
  --border-color: #ddd;
  --shadow-light: rgba(0, 0, 0, 0.1);
  --error-color: #d32f2f;
  --success-color: #388e3c;
}

/* ===== 基本設定 ===== */
*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  padding: 0;
  font-family: "Hiragino Kaku Gothic Pro", "ヒラギノ角ゴ Pro W3", "Hiragino Sans", Meiryo, "メイリオ", sans-serif;
  color: var(--text-dark);
  line-height: 1.6;
  background-color: #fff;
  overflow-x: hidden;
  margin-bottom: 0;
  padding-bottom: 0;
}

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

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

/* ===== アンカーリンク調整 ===== */
#events, #profile, #activity, #mailNews, #relatedOrg {
  scroll-margin-top: 100px;
}

/* ===== 共通レイアウト ===== */
:is(
.container,
.event-container,
.content,
.section-header,
.description,
.table-wrapper,
.newsletter-form-section,
.form-container,
.profile-table,
) {
  max-width: 1300px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 20px;
  padding-right: 20px;
}
.activities-container {
  margin-left: auto;
  margin-right: auto;
  max-width: 1300px;
}

.content {
  padding: 0 1.625rem;
  flex: 1;
  max-width: 1040px;
  width: 100%;
}

.event-container {
  display: block;
  margin-bottom: 104px;
}

/* ===== ヘッダー ===== */
.salon-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  background-color: #fff;
  color: var(--primary-color);
  box-shadow: 0 2px 4px var(--shadow-light);
  position: relative;
  z-index: 999;
  width: 100%;
}

.salon-logo {
  display: flex;
  align-items: center;
  font-size: 24px;
  font-weight: bold;
  color: var(--primary-color);
}

.salon-logo img {
  height: 50%;
  width: 50%;
  margin-right: 8px;
}

/* ===== モバイルメニューアイコン ===== */
.salon-menu-icon {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 40px;
  height: 30px;
  cursor: pointer;
}

.salon-menu-icon span {
  display: block;
  width: 28px;
  height: 3px;
  background-color: var(--primary-color);
  margin: 4px 0;
  transition: transform 0.3s ease, opacity 0.3s ease;
  transform-origin: center;
}

.salon-menu-icon.active span:nth-child(1) {
  transform: translateY(9px) rotate(45deg);
}

.salon-menu-icon.active span:nth-child(2) {
  opacity: 0;
}

.salon-menu-icon.active span:nth-child(3) {
  transform: translateY(-9px) rotate(-45deg);
}

/* ===== ナビゲーション ===== */
.salon-nav-container {
  position: sticky;
  top: 0;
  z-index: 1000;
  background-color: var(--primary-color);
  box-shadow: 0 2px 4px var(--shadow-light);
}

.salon-navigation {
  display: flex;
  width: 100%;
  background-color: var(--primary-color);
  color: white;
}

.salon-nav-group {
  flex: 1;
  display: flex;
  flex-direction: column;
  position: relative;
}

.salon-nav-item {
  text-align: center;
  padding: 15px 0;
  border-right: 1px solid var(--primary-light);
  transition: background 0.2s ease;
  cursor: default;
}

.salon-nav-item.has-link {
  cursor: pointer;
}

.salon-nav-group:first-child .salon-nav-item {
  border-left: 1px solid var(--primary-light);
}

.salon-nav-item:hover {
  background-color: var(--primary-light);
}

.salon-submenu {
  display: none;
  flex-direction: column;
  background-color: var(--bg-light);
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  z-index: 100;
  border: 1px solid var(--border-color);
  box-shadow: 0 2px 8px var(--shadow-light);
}

.salon-submenu-item {
  padding: 12px 0;
  text-align: center;
  border-top: 1px solid var(--border-color);
  transition: background 0.2s ease;
  color: var(--text-dark);
  background-color: var(--bg-light);
}

.salon-submenu-item:hover {
  background-color: var(--bg-lighter);
  color: var(--primary-color);
}

.salon-nav-group:hover .salon-submenu {
  display: flex;
}

/* ===== メインビジュアル・スライダー ===== */
.salon-main-image {
  height: 400px;
  position: relative;
  overflow: hidden;
}

.salon-slider-container {
  width: 100%;
  height: 100%;
  position: relative;
  overflow: hidden;
}

.salon-slide {
  position: absolute;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: transform 1s ease, opacity 1s ease;
}

.salon-slide.active {
  opacity: 1;
  z-index: 1;
}

.salon-slide.prev {
  opacity: 0;
  transform: translateX(-100%);
  z-index: 0;
}

.salon-slide.next {
  opacity: 0;
  transform: translateX(100%);
  z-index: 0;
}

.salon-main-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.salon-slider-controls {
  position: absolute;
  bottom: 20px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  gap: 5px;
  z-index: 5;
}

.salon-slider-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background-color: #ddd;
  cursor: pointer;
}

.salon-slider-dot.active {
  background-color: white;
}

.salon-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 40px;
  color: white;
  background: rgba(0,0,0,0.3);
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  user-select: none;
  z-index: 5;
}

.salon-arrow-left {
  left: 10px;
}

.salon-arrow-right {
  right: 10px;
}

/* ===== 見出し・タイトル ===== */
h1, .event-header {
  font-size: clamp(31.2px, 6.5vw, 36.4px);
  font-weight: 600;
  text-align: center;
  margin: 78px 0 39px;
  letter-spacing: 0;
}

.section-header, .event-title {
  background-color: var(--bg-light);
  padding: 13px 19.5px;
  border-left: 7.8px solid var(--secondary-color);
  margin: 78px 0 26px;
  width: 100%;
  box-sizing: border-box;
}

.section-header h2, .header-title, .event-title {
  margin: 0;
  font-size: 1.4625rem;
  font-weight: bold;
  color: var(--secondary-color);
}

.event-subtitle {
  color: var(--secondary-color);
  font-size: clamp(15.6px, 4.55vw, 18.2px);
  margin-left: 13px;
  font-weight: normal;
}

.event-description-heading {
  margin-block: 0.5rem;
  font-size: 1rem;
  font-weight: normal;
}

/* ===== イベント関連 ===== */
.content-container {
  background-color: transparent;
  padding: 0;
  border-left: 7.8px solid var(--secondary-color);
  margin: 32.5px 0 0 26px;
  padding-left: 26px;
  width: calc(100% - 26px);
  box-sizing: border-box;
  position: relative;
  display: flex;
}

.content-container::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 1px;
  background-color: var(--secondary-color);
}

.vertical-line {
  display: none;
}

.content-block {
  flex: 1;
  margin-bottom: 0;
}

.event-date {
  font-size: 14.2px;
  color: var(--text-dark);
  padding: 5.2px 0;
  margin-bottom: 19.5px;
}

.event-info {
  display: flex;
  align-items: center;
  margin-top: 6.5px;
  flex-wrap: wrap;
}

.event-number {
  font-weight: bold;
  font-size: 18.2px;
  margin-right: 13px;
  margin-bottom: 1em;
}

.theme-box {
  border: 1px solid var(--secondary-color);
  border-radius: 6.5px;
  padding: 1.3px 10.4px;
  margin: 0 13px 0 0;
  font-size: 16.9px;
  color: var(--secondary-color);
  background-color: #fff;
  margin-bottom: 1em;
}

.theme-content {
  font-weight: bold;
  font-size: 18.2px;
  margin-left: 6.5px;
  margin-bottom: 1em;
}

.event-divider {
  display: none;
}

.event-description {
  margin-block: 0 3rem;
  margin-inline: 3rem 0;
  max-width: 90%;
  word-wrap: break-word;
}

.event-description-p {
  text-indent: 1em;
}

.event-description-note {
  padding-inline-start: 1em;
  font-weight: bolder;

  & .event-description-note-p:first-of-type {
    text-indent: -1em;
  }

  & .event-description-note-p:first-of-type::before {
    content: "★";
  }
}

.event-details {
  margin: 0 0 0 52px;
  overflow: hidden;
  transition: max-height 0.3s ease-out;
  max-height: 0;
  padding-left: 3%;
}

.detail-row {
  display: flex;
  margin-bottom: 18.2px;
}

.event-details-label {
  flex-grow: 0;
  flex-shrink: 0;
  flex-basis: 5rem;
}

.event-details-content {
  flex-grow: 1;
  flex-shrink: 1;
  flex-basis: auto;
}

/* 課題本 出版社へのリンク */
.book-publisher-link:not(:hover) {
  text-decoration-line: none;
}
.book-publisher-link:hover {
  text-decoration-line: underline;
}

/* ===== リンク・外部リンク ===== */
.contact-email, .link {
  color: #0066cc;
  text-decoration: none;
  word-break: break-all;
}

.contact-email:hover, .link:hover {
  text-decoration: underline;
}

.external-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.external-icon {
  display: inline-block;
  font-size: 0.85em;
  color: #0066cc;
  transition: transform 0.2s ease;
  margin-left: 2px;
}

.external-link:hover .external-icon {
  transform: translateX(2px) translateY(-1px);
}

.note {
  font-size: 16.9px;
  color: #555;
  margin-top: 3.9px;
  line-height: 1.5;
}

/* ===== イベント詳細表示制御 ===== */
.rules-container,
[id^="pastEventsSection-"] {
  display: none;
  margin-top: 26px;
  padding-top: 20px;
  position: relative;
}

.section-content {
  clear: both;
  margin-left: 52px;
  overflow: visible;
  line-height: 1.6;
  max-height: none;
}

[id*="mindset-content"] {
  display: none;
}

[id*="rules-content"] {
  display: block;
  max-height: none;
  overflow: visible;
}

.event-details-container {
  display: flex;
  flex-direction: column;
  position: relative;
}

/* ===== トグルボタン ===== */
.toggle-button,
.bottom-toggle-button,
.open-button,
.close-button {
  text-align: right;
  margin: 32.5px 60px 26px 0;
  color: var(--text-muted);
  font-size: 18.2px;
  font-weight: 600;
  cursor: pointer;
  user-select: none;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 5.2px;
  width: auto;
  transition: color 0.3s ease;
  align-self: flex-end;
  margin-left: auto;
  border-style: none;
  padding: 0;
  font-family: inherit;
  background-color: unset;
}

.bottom-toggle-button {
  margin: 32.5px 60px 26px 0;
  display: none;
}

.close-button {
  margin: 32.5px 60px 26px 0;
  display: none;
}

.event-details .toggle-button {
  transition: opacity 0.1s; display: block; opacity: 1;
  align-self: flex-end;
}

.toggle-button:hover,
.bottom-toggle-button:hover,
.open-button:hover,
.close-button:hover {
  color: var(--primary-color);
  text-decoration: underline;
}

/* ===== セクション・ボタン ===== */
.section-button {
  background-color: var(--primary-color);
  color: white;
  border: none;
  border-radius: 6.5px;
  border-style: solid;
  border-width: 2px;
  border-color: transparent;
  padding: 13px 26px;
  font-size: 20.8px;
  margin-bottom: 26px;
  margin-left: 0;
  display: block;
  width: 208px;
  text-align: center;
  cursor: pointer;
  user-select: none;
  white-space: normal;
  transition: all 0.3s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  transform: translateY(0);
  position: relative;
  overflow: hidden;
}

.section-button::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  transition: left 0.5s ease;
}

.section-button:hover {
  background-color: white;
  color: var(--primary-color);
  border-color: var(--primary-color);
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.section-button:hover::before {
  left: 100%;
}

.section-button:active {
  transform: translateY(0);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  background-color: var(--primary-dark);
  color: white;
}

.activity-button {
  display: block;
  width: 195px;
  margin: 13px auto 26px;
  padding: 10.4px 0;
  background-color: var(--secondary-color);
  color: #fff;
  text-align: center;
  border-radius: 6.5px;
  border-style: solid;
  border-width: 2px;
  border-color: transparent;
  text-decoration: none;
  font-size: 1.1375rem;
  transition: all 0.3s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  transform: translateY(0);
  position: relative;
  overflow: hidden;
}

.activity-button::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  transition: left 0.5s ease;
}

.activity-button:hover {
  background-color: white;
  color: var(--secondary-color);
  border-color: var(--secondary-color);
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.activity-button:hover::before {
  left: 100%;
}

.activity-button:active {
  transform: translateY(0);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  background-color: #5c2f0e;
  color: white;
}

[id^="pastEventsSection-"] .section-button {
  background-color: var(--primary-color);
  width: 208px;
  margin: 13px 0 26px 0;
}

[id^="pastEventsSection-"] .section-button::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  transition: left 0.5s ease;
}

[id^="pastEventsSection-"] .section-button:hover {
  background-color: white;
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

[id^="pastEventsSection-"] .section-button:hover::before {
  left: 100%;
}

[id^="pastEventsSection-"] .section-button:active {
  transform: translateY(0);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  background-color: var(--primary-dark);
  color: white;
  border: none;
}

.rules-container .section {
  margin-bottom: 39px;
}

.rules-container .section:last-child {
  margin-bottom: 26px;
}

.section.image-like {
  display: block;
  margin-bottom: 26px;
}

.section.image-like .section-button {
  width: 208px;
  text-align: center;
  margin-bottom: 26px;
}

/* ===== プライバシー関連 ===== */
.privacy-consent {
  margin: 15px 0;
}

.consent-checkbox {
  display: flex;
  align-items: flex-start;
  cursor: pointer;
  font-size: 14px;
  line-height: 1.4;
  gap: 8px;
}

.consent-checkbox input[type="checkbox"] {
  width: 16px;
  height: 16px;
  margin: 0;
  cursor: pointer;
}

.consent-text {
  flex: 1;
}

.privacy-notice {
  background-color: var(--bg-light);
  border-radius: 5px;
  padding: 15px;
  margin: 15px 0;
  font-size: 13px;
}

.privacy-title {
  font-weight: bold;
  margin: 0 0 8px 0;
  color: var(--primary-color);
}

.privacy-list {
  margin: 0;
  padding-left: 18px;
  line-height: 1.5;
}

.privacy-list li {
  margin-bottom: 4px;
}

.privacy-link {
  color: #0066cc;
  text-decoration: underline;
}

.privacy-link:hover {
  color: #004499;
}

/* ===== 計算認証機能のスタイル ===== */
.math-verification {
  background-color: var(--bg-light);
  padding: 20px;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  margin: 20px 0;
}

.math-question {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 16px;
  font-weight: bold;
  color: var(--primary-color);
  margin-bottom: 10px;
}

.math-input {
  width: 80px;
  padding: 10px;
  border: 2px solid var(--border-color);
  border-radius: 4px;
  text-align: center;
  font-size: 16px;
  font-weight: bold;
  transition: border-color 0.3s ease;
}

.math-input:focus {
  outline: none;
  border-color: var(--primary-color);
}

.math-input.correct {
  border-color: var(--success-color);
  background-color: #e8f5e8;
}

.math-input.incorrect {
  border-color: var(--error-color);
  background-color: #ffeaea;
}

.math-refresh {
  background: none;
  border: none;
  color: var(--primary-color);
  cursor: pointer;
  font-size: 14px;
  text-decoration: underline;
  padding: 5px 0;
}

.math-refresh:hover {
  color: var(--primary-dark);
}

.math-status {
  font-size: 14px;
  margin-top: 10px;
  min-height: 20px;
}

.math-status.success {
  color: var(--success-color);
}

.math-status.error {
  color: var(--error-color);
}

.success-message {
  background-color: #e8f5e8;
  color: var(--success-color);
  padding: 15px;
  border-radius: 4px;
  border: 1px solid var(--success-color);
  margin: 20px 0;
  text-align: center;
  display: none;
}

/* ===== アクティビティカード ===== */
.activities-container {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-auto-rows: auto;
  gap: 26px;
  margin-top: 39px;
  width: 90%;
}

.activity-card {
  border: 1px solid var(--secondary-color);
  border-radius: 13px;
  overflow: hidden;
  background-color: #fff;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  position: relative;
}

.activity-header {
  text-align: center;
  padding-block: 1rem;
  padding-inline: 0.25rem;
  font-size: 1.5rem;
  font-weight: bold;
}

.activity-subtitle {
  font-size: 1rem;
  color: var(--text-muted);
}

.activity-content {
  position: relative;
  min-height: 520px;
  height: auto;
  overflow: hidden;
  cursor: pointer;
}

.activity-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: filter 0.3s ease;
}

.text-overlay {
  position: absolute;
  top: 10px;
  left: 10px;
  right: 10px;
  bottom: 10px;
  background-color: rgba(255, 255, 255, 0.8);
  padding-block: 0.25rem;
  padding-inline: 0.25rem;
  box-sizing: border-box;
  overflow-y: hidden;
  border-radius: 13px;
  opacity: 0;
  transform: translateY(13px);
  transition: opacity 0.3s ease, transform 0.3s ease;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  justify-content: center;
  row-gap: 0.5rem;
  font-size: 0.875rem;
}

.text-overlay p {
  margin-block: 0;
}

/* ===== テーブル ===== */
.table-wrapper {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 26px 0;
}

/* ===== リスト・ルール ===== */
.rules-container ol {
  padding-left: 0;
  margin-top: 39px;
}

.rules-container ol > li {
  margin-bottom: 26px;
  font-weight: bold;
  list-style-position: outside;
}

.rules-container ol > li > p,
.rules-container ol > li > ul {
  font-weight: normal;
  margin-top: 6.5px;
  margin-bottom: 6.5px;
  margin-left: 0;
}

.rules-container ul {
  list-style-type: disc;
  padding-left: 26px;
  margin-top: 6.5px;
}

.rules-container li {
  margin-bottom: 13px;
}

.warning, .warning li {
  color: #ff0000;
}

.intro-text {
  margin-bottom: 26px;
  line-height: 1.8;
  margin-left: 0;
}

/* ===== フォーム ===== */
.form-container {
  margin-top: 26px;
  margin-left: 52px;
}

.form-row {
  display: flex;
  align-items: center;
  gap: 13px;
  margin-bottom: 26px;
}

.email-input {
  flex: 1 1 auto;
  padding: 13px;
  border: 1px solid #ccc;
  border-radius: 2.6px;
  min-width: 0;
  transition: border-color 0.3s ease;
}

.email-input:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 2px rgba(102, 51, 0, 0.1);
}

.submit-button {
  background-color: var(--primary-color);
  color: white;
  border: none;
  padding: 13px 39px;
  cursor: pointer;
  border-radius: 2.6px;
  font-size: 16px;
  transition: all 0.3s ease;
  min-width: 120px;
}

.submit-button:hover:not(:disabled) {
  background-color: var(--primary-dark);
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.submit-button:disabled {
  background-color: #ccc;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* ===== メールニュース ===== */
.newsletter-form-section {
  background-color: var(--bg-lighter);
  border-radius: 8px;
  padding: 26px;
  border: 1px solid var(--border-color);
  margin-top: 26px;
  width: 90%;
}

.form-title {
  font-size: 20px;
  font-weight: bold;
  margin-bottom: 26px;
  color: var(--primary-color);
}

.newsletter-form {
  width: 100%;
}

.newsletter-form .privacy-notice {
  background-color: var(--bg-light);
  border-radius: 5px;
  padding: 20px;
  margin-bottom: 20px;
  border: 1px solid var(--border-color);
}

.newsletter-form .privacy-consent {
  margin-bottom: 20px;
}

.newsletter-form .consent-checkbox {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 14px;
  line-height: 1.4;
}

.checkbox-label {
  width: 16px;
  height: 16px;
  cursor: pointer;
  display: block;
  position: relative;
}

.newsletter-form .form-row {
  margin-bottom: 15px;
}

.newsletter-form .form-note {
  font-size: 13px;
  color: var(--text-muted);
  margin: 0;
  text-align: center;
}

/* ===== 団体概要セクション ===== */
.profile-table {
  --th_inline_size: 30%;
  --td_inline_size: 60%;

  margin-inline: auto;
  inline-size: min(64rem, 100%);
  border-collapse: collapse;
  table-layout: fixed;

  & :where(th, td) {
    border: 1px solid #000;
    padding-block: 0.75rem;
    padding-inline: 0.5rem;
    text-align: center;
  }

  & :where(th) {
    inline-size: var(--th_inline_size);
    font-weight: normal;
  }
  & :where(td) {
    inline-size: var(--td_inline_size);
  }
}

/* ===== フッター ===== */
.footer-bar {
  width: 100%;
  height: 140px;
  background-image: url('../image/footer.avif'), linear-gradient(var(--primary-color));
  background-size: 900px 100px, 100% 40px;
  background-position-y: top, bottom;
  background-repeat: repeat-x, repeat-x;
}

.footer {
  padding: 0;
  margin: 0;
  text-align: center;
  border: none;
  box-shadow: none;
  outline: none;
  position: relative;
  padding-bottom: 50px;
  padding-top: 20px;
  display: block;
}

.footer-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 0 auto;
  position: relative;
  z-index: 1;
  padding-top: 20px;
}

.logo-section {
  display: flex;
  justify-content: center;
  margin-bottom: 40px;
  margin-top: 40px;
}

.logo-section img {
  max-width: 120px;
  height: auto;
}

.footer-links {
  display: flex;
  justify-content: space-between;
  width: 100%;
  margin-bottom: 40px;
}

.footer-column {
  width: 45%;
  text-align: center;
  padding: 0 10px;
}

.footer-column h3 {
  font-size: 16px;
  font-weight: bold;
  color: var(--primary-color);
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--primary-color);
}

.footer-column a {
  display: block;
  color: var(--text-dark);
  font-size: 14px;
  padding: 8px 0;
  margin: 5px 0;
  transition: all 0.3s ease;
}

.footer-column a:hover {
  color: var(--primary-color);
  transform: translateX(5px);
}

.social-privacy {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

.social-icons {
  display: flex;
  justify-content: center;
  margin-bottom: 30px;
}

.social-icon {
  width: 40px;
  height: 40px;
  margin: 0 15px;
  transition: transform 0.3s ease;
}

.social-icon:hover {
  transform: scale(1.1);
}

.policy-links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 20px;
  margin-bottom: 20px;
}

.policy-links a {
  color: var(--text-muted);
  font-size: 14px;
  padding: 5px 10px;
  transition: color 0.3s ease;
}

.policy-links a:hover {
  color: var(--primary-color);
}

.copyright {
  color: var(--text-muted);
  font-size: 14px;
  margin-top: 10px;
}

/* ===== ユーティリティ ===== */
.back-to-top {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--primary-color);
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #fff;
  z-index: 1000;
}

.back-to-top svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: var(--primary-color);
  stroke-width: 1.8;
}

.section-header + .description,
.section-header + .content > p {
  margin-left: 26px;
}

.section-header + .description + .table-wrapper,
.section-header + .content > .form-container{
  margin-left: 52px;
}

.section-divider {
  height: 52px;
}

.overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 900;
}

.overlay.active {
  display: block;
}

.tabs-container,
.arrow {
  display: none;
}

/* ===== デスクトップ用ホバー効果 ===== */
@media (min-width: 769px) {
  .activity-content:hover .text-overlay {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
  }

  .activity-content:hover .activity-image {
    filter: brightness(0.7);
  }
}

/* ===== タブレット・モバイル (768px以下) ===== */
@media (max-width: 768px) {
  #events, #profile, #activity, #mailNews, #relatedOrg {
    scroll-margin-top: 120px;
  }

  body {
    padding-top: 70px;
  }

  .salon-header {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1020;
    padding: 10px 16px;
    padding-right: 60px;
    width: 100%;
  }

  .salon-nav-container {
    position: relative;
    top: auto;
  }

  .salon-main-image {
    margin-top: 0;
    height: 60vw;
  }

  .salon-menu-icon {
    display: flex;
    position: fixed;
    top: 20px;
    right: 16px;
    z-index: 1025;
    background-color: #fff;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    padding: 5px;
  }

  .salon-menu-icon span {
    position: absolute;
  }

  .salon-menu-icon span:nth-child(1) {
    transform: translateY(-8px);
  }

  .salon-menu-icon span:nth-child(2) {
    transform: translateY(0);
  }

  .salon-menu-icon span:nth-child(3) {
    transform: translateY(8px);
  }

  .salon-menu-icon.active span:nth-child(1) {
    transform: translateY(0) rotate(45deg);
  }

  .salon-menu-icon.active span:nth-child(2) {
    opacity: 0;
  }

  .salon-menu-icon.active span:nth-child(3) {
    transform: translateY(0) rotate(-45deg);
  }

  .overlay.active {
    top: 70px;
    z-index: 950;
  }

  .salon-navigation {
    display: none;
    flex-direction: column;
    width: 100%;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 999;
  }

  .salon-navigation.active {
    display: flex;
    position: fixed;
    top: 70px;
    left: 0;
    width: 100%;
    max-height: calc(100vh - 70px);
    overflow-y: auto;
    z-index: 999;
    background-color: var(--primary-color);
  }

  .salon-nav-group {
    width: 100%;
    margin-top: 20px;
  }

  .salon-nav-item {
    border-right: none;
    border-bottom: 1px solid var(--primary-light);
    text-align: left;
    padding: 15px 20px;
    background-color: var(--primary-color);
    color: white;
  }

  .salon-submenu {
    position: static;
    width: 100%;
    display: none;
  }

  .salon-submenu-item {
    border-bottom: 1px solid var(--border-color);
    padding: 12px 20px 12px 35px;
    text-align: left;
    background-color: var(--bg-light);
    color: var(--text-dark);
  }

  .salon-nav-group:hover .salon-submenu {
    display: none;
  }

  .salon-nav-group.open .salon-submenu {
    display: flex;
    flex-direction: column;
  }

  .salon-arrow {
    font-size: 28px;
    width: 40px;
    height: 40px;
  }

  .activities-container {
    grid-template-columns: 1fr;
    gap: 19.5px;
  }

  .activity-content {
    min-height: 400px;
  }

  .section-content {
    margin-left: 26px;
    overflow: visible;
    max-height: none;
  }

  .section-button {
    width: 180px;
    padding: 11px 20px;
    font-size: 18px;
    margin-bottom: 20px;
  }

  .section-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.12);
  }

  [id^="pastEventsSection-"] .section-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.12);
  }

  .activity-button {
    width: 175px;
    padding: 9px 0;
    font-size: 1rem;
  }

  .activity-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.12);
  }

  .toggle-button,
  .bottom-toggle-button,
  .open-button,
  .close-button {
    margin: 26px 19.5px 19.5px 0;
    font-size: 18.2px;
    width: auto;
    align-self: flex-end;
    margin-left: auto;
    position: relative;
  }

  .event-details .toggle-button {
    margin-top: 20px;
    margin-right: 19.5px;
    position: relative;
  }

  .detail-row {
    margin-bottom: 18.2px;
  }

  .footer-bar {
    margin-top: 40px;
  }

  .footer-bar::before {
    height: 80px;
  }

  .logo-section {
    margin-top: 30px;
  }

  .footer-links {
    flex-direction: column;
    align-items: center;
    gap: 39px;
  }

  .footer-column {
    width: 80%;
  }

  .footer-column h3 {
    margin-bottom: 19.5px;
  }

  .footer-column a {
    padding: 7.8px 0;
  }

  .social-icons {
    margin-bottom: 32.5px;
  }

  .policy-links {
    flex-direction: column;
    gap: 19.5px;
  }

  .social-icon {
    width: 45.5px;
    height: 45.5px;
    margin: 0 13px;
  }

  .back-to-top {
    width: 41.6px;
    height: 41.6px;
    font-size: 26px;
  }

  .event-info {
    flex-direction: column;
    align-items: flex-start;
  }

  .theme-box {
    margin: 10.4px 6.5px 10.4px 0;
  }

  .theme-content {
    margin-left: 0;
    margin-top: 6.5px;
  }

  .activity-content.show-text .text-overlay {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
  }

  .activity-content.show-text .activity-image {
    filter: brightness(0.7);
  }

  .activity-content.show-text .text-overlay::after {
    content: "✕";
    position: absolute;
    top: 5px;
    right: 5px;
    font-size: 23.4px;
    color: var(--text-muted);
    cursor: pointer;
    width: 23.4px;
    height: 23.4px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(255, 255, 255, 0.8);
    border-radius: 50%;
    border: 1px solid var(--border-color);
  }

  h1, .event-header {
    margin: 52px 0 32.5px;
  }

  .section-header, .event-title {
    margin: 52px 0 19.5px;
  }

  .event-container {
    margin-bottom: 78px;
  }

  .newsletter-form-section {
    padding: 20px 15px;
    margin-top: 20px;
    width: 80%;
  }

  .newsletter-form .form-row {
    flex-direction: column;
    gap: 10px;
  }

  .newsletter-form .email-input,
  .newsletter-form .submit-button {
    width: 100%;
  }

  .form-title {
    font-size: 18px;
    margin-bottom: 20px;
  }

  .rules-container .section {
    margin-bottom: 32px;
  }

  .content-container {
    background-color: transparent;
    padding: 0;
    border-left: 5.2px solid var(--secondary-color);
    margin: 26px 0 0 19.5px;
    padding-left: 19.5px;
    width: calc(100% - 19.5px);
    box-sizing: border-box;
    position: relative;
    display: flex;
  }

  .content-container::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: -5.2px;
    right: 0;
    height: 1px;
    background-color: var(--secondary-color);
  }

  .vertical-line {
    display: none;
  }

  .event-divider {
    display: none;
  }

  .content-block {
    margin-bottom: 0;
  }

  .event-description {
    margin: 0 13px 26px calc(19.5px + 5.2px + 19.5px);
    max-width: 90%;
  }

  /* 計算認証機能のモバイル対応 */
  .math-question {
    flex-wrap: wrap;
    gap: 5px;
  }

  .math-input {
    width: 60px;
  }
}

/* ===== スマートフォン (600px以下) ===== */
@media (max-width: 600px) {
  .event-header {
    margin: 39px 0 26px;
  }

  .event-title {
    padding: 10.4px 15.6px;
    border-left: 5.2px solid var(--secondary-color);
    margin: 39px 0 19.5px;
  }

  .event-subtitle {
    margin-left: 6.5px;
    margin-top: 3.9px;
  }

  .content-container {
    margin: 26px 0 0 19.5px;
  }

  .vertical-line {
    width: 5.2px;
    margin-right: 19.5px;
  }

  .event-divider {
    margin: 0 32.5px;
    margin-left: calc(19.5px + 5.2px);
  }

  .event-description {
    margin: 0 13px 26px 32.5px;
    max-width: 90%;
  }

  .content {
    padding: 0 19.5px;
  }

  .form-row {
    flex-direction: column;
    align-items: stretch;
  }

  .email-input,
  .submit-button {
    width: 100%;
  }

  .submit-button {
    width: auto !important;
    min-width: 156px;
    padding: 15.6px 26px;
    margin: 13px auto 0;
  }

  .tabs-container {
    flex-wrap: wrap;
  }

  .tab {
    flex-grow: 1;
    text-align: center;
    font-size: 15.6px;
    padding: 10.4px 13px;
  }

  .event-container {
    margin-bottom: 65px;
  }

  .rules-container {
    margin-top: 52px;
  }

  .activity-content {
    min-height: 350px;
  }

  .newsletter-form-section {
    padding: 16px 12px;
    margin-top: 16px;
  }

  .newsletter-form .privacy-notice {
    padding: 16px;
    margin-bottom: 16px;
  }

  .form-title {
    font-size: 16px;
    margin-bottom: 16px;
  }
}

/* ===== 小型スマートフォン (480px以下) ===== */
@media (max-width: 480px) {
  .salon-logo {
    font-size: 26px;
  }

  .salon-main-image {
    height: 50vw;
  }

  .footer-bar {
    margin-top: 30px;
  }

  .footer-bar::before {
    height: 60px;
  }

  .logo-section {
    margin-top: 20px;
  }

  .footer-column {
    width: 100%;
  }

  .footer-links {
    flex-direction: column;
    gap: 32.5px;
    margin-bottom: 39px;
  }

  .social-icons {
    margin-bottom: 26px;
  }

  h1, .event-header {
    margin: 32.5px 0 26px;
  }

  .section-header, .event-title {
    margin: 32.5px 0 15.6px;
  }

  .event-container {
    margin-bottom: 52px;
  }

  .activity-content {
    height: 150vw;
  }

  .section-content {
    margin-left: 20px;
  }

  .section-button {
    width: 160px;
    padding: 10px 16px;
    font-size: 16px;
    margin-bottom: 16px;
  }

  .section-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  }

  [id^="pastEventsSection-"] .section-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  }

  .activity-button {
    width: 155px;
    padding: 8px 0;
    font-size: 0.9rem;
  }

  .activity-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  }

  .close-button {
    margin: 20px 15px 15px 0;
    font-size: 14px;
    width: auto;
    align-self: flex-end;
    margin-left: auto;
    position: relative;
  }

  .event-details .toggle-button {
    margin-top: 15px;
    margin-right: 15px;
    position: relative;
  }

  .rules-container .section {
    margin-bottom: 26px;
  }

  .newsletter-form-section {
    padding: 12px;
    margin-top: 12px;
  }

  .newsletter-form .privacy-notice {
    padding: 12px;
    margin-bottom: 12px;
  }

  .form-title {
    font-size: 14px;
    margin-bottom: 12px;
  }

  .newsletter-form .privacy-list {
    font-size: 12px;
  }

  .newsletter-form .consent-checkbox {
    font-size: 12px;
  }

  .newsletter-form .form-note {
    font-size: 11px;
  }

  .content-container {
    background-color: transparent;
    padding: 0;
    border-left: 5.2px solid var(--secondary-color);
    margin: 26px 0 0 19.5px;
    padding-left: 19.5px;
    width: calc(100% - 19.5px);
    box-sizing: border-box;
    position: relative;
    display: flex;
  }

  .content-container::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: -5.2px;
    right: 0;
    height: 1px;
    background-color: var(--secondary-color);
  }

  .vertical-line {
    display: none;
  }

  .event-divider {
    display: none;
  }

  .content-block {
    margin-bottom: 0;
  }

  .event-description {
    margin: 0 13px 26px calc(19.5px + 5.2px + 19.5px);
    max-width: 90%;
  }
}
