/* ========================================
   CSS Variables & Base Styles
   ======================================== */

:root {
	/* ブランドカラー */
	--primary-color: #6366f1;
	--accent-color: #f97316;
	--accent-color-rgb: 249, 115, 22; /* --accent-colorのRGB値。透過色指定で使用 */
	--link-color: #3498db;

	/* フォント */
	--font-family-main: 'Inter', sans-serif;

	/* カード用(ライト) */
	--light: #ffffff;

	/* ライトテーマ */
	--bg: #f9fafb;
	--text: #111827;
	--section-bg: #ffffff;
	--heading-color: #2c3e50;
	--sub-heading-color: #34495e;
	--paragraph-color: #475569;
	--border-color: #e5e7eb;
	--shadow: rgba(0, 0, 0, 0.07);
	--shadow-strong: rgba(0, 0, 0, 0.1);
}

/* ダークテーマの上書き */
body.dark {
	--bg: #0f172a;
	--text: #f1f5f9;
	--section-bg: #1e293b;
	--heading-color: #f1f5f9;
	--sub-heading-color: #e2e8f0;
	--paragraph-color: #cbd5e0;
	--border-color: #334155;
	--shadow: rgba(255, 255, 255, 0.05);
	--shadow-strong: rgba(255, 255, 255, 0.08);
}

/* ========================================
   Base Styles
   ======================================== */

* {
	margin: 0;
	padding: 0;
	box-sizing: border-box;
}

body {
	font-family: var(--font-family-main);
	background: var(--bg);
	color: var(--text);
	transition: background 0.5s, color 0.5s;
}

/* ========================================
   intro-overlay
   ======================================== */

/* 位置・共通見た目 */
#intro-overlay {
	position: fixed;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
}

.intro-msg1,
.intro-msg2 {
	position: absolute;
	left: 50%;
	transform: translateX(-50%);
	text-align: center;
	color: #222;
	letter-spacing: 0.05em;
	line-height: 1.2;
	padding: 0 10px;
	opacity: 0;
	transition: opacity 1s;
	z-index: 10;
	width: 90vw;
	max-width: 100vw;
}

/* ===== msg1（見出し文） ===== */
.intro-msg1 {
	top: 40%;
	font-weight: bold;
	font-size: clamp(2rem, 5vw, 3.5rem);
	line-height: 1.25;
	width: min(92vw, 34ch);
	text-wrap: balance;
}

/* タブレット */
@media (max-width: 1024px) {
	.intro-msg1 {
		width: min(92vw, 30ch);
	}
}

/* スマホ：句点の後でだけ改行させる・行長を詰める */
@media (max-width: 767px) {
	.intro-msg1 {
		width: min(96vw, 26ch);
		top: 45%;
		font-size: clamp(1.4rem, 4vw, 2rem);
	}

	.intro-msg1 .sp-br {
		display: block;
	}
}

/* ===== msg2（ロゴ＋タイトル） ===== */
.intro-msg2 {
	top: 45%;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.8rem;
	font-weight: bold;
}
.intro-logo {
	width: 48px;
	height: 48px;
	border-radius: 12px;
	display: inline-block;
	vertical-align: middle;
}
.intro-title {
	font-size: clamp(2rem, 5vw, 3.5rem);
	display: inline-block;
	vertical-align: middle;
}

/* タブレット調整 */
@media (max-width: 1024px) {
	.intro-msg2 {
		top: 53%;
	}
	.intro-logo {
		width: 44px;
		height: 44px;
	}
}

/* スマホ調整 */
@media (max-width: 767px) {
	.intro-msg2 {
		top: 50%;
	}
	.intro-logo {
		width: 36px;
		height: 36px;
	}
	.intro-title {
		font-size: clamp(1.4rem, 4vw, 2rem);
	}
}

/* ========================================
   Header Component
   ======================================== */

header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
	position: sticky;
	top: 0;
	z-index: 1000;
	background: var(--section-bg);
	padding: 1rem 2rem;
	box-shadow: 0 4px 20px var(--shadow);
	animation: slideDown 0.5s ease-out;
}

.logo {
	flex: 0 0 auto;
	display: flex;
	align-items: center;
	gap: 1rem;
}

.logo img {
	width: 48px;
	height: 48px;
	border-radius: 12px;
}

.logo a {
	display: inline-block;
	text-decoration: none;
}

/* 右側ラッパー（メニュー/テーマ切り替えなど） */
.nav-wrap {
	flex: 1 1 auto;
	display: flex;
	justify-content: flex-end;
	min-width: 200px;
	position: relative;
}

/* ナビ本体 */
nav.menu {
	display: flex;
	align-items: center;
	gap: 1.2rem;
	flex-wrap: nowrap;
	margin-left: auto;
	justify-content: flex-end;
	position: relative; /* モバイル用absoluteとの切り替えで崩れないように */
}

nav.menu a {
	color: var(--text);
	text-decoration: none;
	font-weight: 600;
	padding: 0.25rem 0.5rem;
	position: relative;
}

nav.menu a::before {
	content: "";
	position: absolute;
	bottom: -5px;
	left: 0;
	width: 0;
	height: 2px;
	background: var(--accent-color);
	transition: width 0.3s ease-in-out;
}

nav.menu a:hover::before {
	width: 100%;
}

.theme-toggle {
	background: none;
	border: 1px solid var(--accent-color);
	color: var(--accent-color);
	font-weight: 600;
	padding: 0.3rem 0.7rem;
	border-radius: 4px;
	cursor: pointer;
	text-decoration: none;
}

.member-page {
	background: var(--accent-color);
	color: #fff !important;
	padding: 0.25rem 0.75rem;
	border-radius: 4px;
	margin-left: 0;
}

/* ハンバーガーボタン（モバイル時に表示） */
.mobile-toggle {
	background: none;
	border: none;
	font-size: 1.5rem;
	cursor: pointer;
	display: none; /* デフォルト非表示 */
	color: var(--text);
}

/* サイトタイトル */
.site-title {
	color: #222;
	font-size: 2.2rem;
	font-weight: 800;
	text-align: left;
	margin: 0 0 0 0.5rem;
	line-height: 1.2;
	letter-spacing: 0.05em;
	position: static;
	top: auto;
	left: auto;
	transform: none;
	width: auto;
	max-width: 100vw;
	z-index: 10;
	padding: 0;
	display: inline-block;
	vertical-align: middle;
}

.site-title .char {
	display: inline-block;
}

/* Header Animations */
@keyframes slideDown {
	from {
		transform: translateY(-100%);
	}
	to {
		transform: translateY(0);
	}
}

/* ========================================
   Hero Section
   ======================================== */

.hero {
	position: relative;
	width: 100%;
	height: 60vh;
	overflow: hidden;
	display: flex;
	justify-content: center;
	align-items: center;
	margin-bottom: 4rem;
}

.hero-background {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	animation: pan 10s infinite alternate ease-in-out;
}

@keyframes pan {
	0% {
		transform: scale(1.1) translate(-5%, -5%);
	}
	100% {
		transform: scale(1.1) translate(5%, 5%);
	}
}

.hero::before {
	content: "";
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(0, 0, 0, 0.35);
	z-index: 1;
	pointer-events: none;
}

.hero-content {
	position: relative;
	z-index: 2;
	text-align: center;
	color: white;
	font-weight: bold;
	text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.5);
	padding: 0 1rem;
}

.hero-content h1 {
	/* PCサイズ (デフォルト) */
	font-size: 4rem;
	line-height: 1.5;
}

/* タブレットサイズ */
@media (max-width: 1024px) {
	.hero-content h1 {
		font-size: 3.2rem;
	}
}

/* スマートフォンサイズ */
@media (max-width: 767px) {
	.hero-content h1 {
		font-size: 1.5rem;
	}
}

/* .sp-br を使う場合はここで改行させる */
.hero-content h1 .sp-br {
	display: block;
}

/* HTMLに <br> を残している場合は、スマホでは消す */
.hero-content h1 br {
	display: none;
}

@keyframes fadeIn {
	from {
		opacity: 0;
	}
	to {
		opacity: 1;
	}
}

/* ========================================
   Main Content Layout
   ======================================== */

main {
	width: 100%;
	background: var(--bg);
	padding-bottom: 4rem;
	margin: 0 auto;
	padding-left: 20px;
	padding-right: 20px;
}

main section {
	width: 100%;
	max-width: 1200px;
	margin: 0 auto;
	padding: 2rem;
	box-sizing: border-box;
}

main section h2 {
	font-size: 2rem;
	font-weight: 700;
	margin-bottom: 1rem;
	position: relative;
	text-transform: uppercase;
	border-bottom: 3px solid var(--primary-color);
	padding-bottom: 0.5rem;
	color: var(--heading-color);
}

main section p,
main section li {
	font-size: 1.125rem;
	line-height: 1.6;
	color: var(--paragraph-color);
}

main section ul {
	list-style: disc inside;
	padding-left: 1rem;
	margin-bottom: 1rem;
}

/* ========================================
   Common Components
   ======================================== */

/* Section Title */
.section-title {
	font-family: 'Noto Sans JP', 'Poppins', sans-serif;
	font-size: 2rem;
	font-weight: 700;
	margin: 0 0 1.5rem 1rem;
	position: relative;
	color: var(--heading-color);
	display: inline-block;
	padding-bottom: 0.3em;
	background: none;
	background-image: none;
	border-bottom: 3px solid var(--primary-color);
}

/* Detail Link Button */
.detail-link {
	display: inline-block;
	margin-top: 1rem;
	padding: 0.5rem 1.2rem;
	background-color: var(--accent-color);
	color: #fff;
	font-weight: 600;
	text-decoration: none;
	border-radius: 25px;
	transition: background-color 0.3s, transform 0.2s;
	box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
	min-width: 120px;
	max-width: 220px;
	text-align: center;
	white-space: nowrap;
}

.detail-link:hover {
	background-color: #e65c00;
	transform: translateY(-2px);
	text-decoration: none;
}

.detail-link.secondary {
	background-color: transparent;
	box-shadow: none;
	border: 2px solid var(--primary-color);
	color: var(--primary-color);
	font-weight: 600;
}

.detail-link.secondary:hover {
	background-color: var(--primary-color);
	color: #fff;
	box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* PDF Link */
.pdf-link {
	display: inline-block;
	margin-top: 1rem;
	margin-bottom: 0.5rem;
	padding: 0.75rem 1.5rem;
	background-color: #c0392b;
	color: #fff !important;
	font-weight: 600;
	text-decoration: none;
	border-radius: 25px;
	transition: background-color 0.3s ease, transform 0.2s ease;
}

.pdf-link:hover {
	background-color: #a93226;
	transform: translateY(-2px);
}

/* Page Title */
.page-title {
	font-family: var(--font-family-main);
	font-size: clamp(2.2em, 6vw, 2.8em);
	font-weight: 700;
	color: var(--heading-color);
	text-align: center;
	margin-top: 50px;
	margin-bottom: 40px;
	padding-bottom: 20px;
	border-bottom: 4px solid var(--link-color);
	letter-spacing: 1px;
}

/* ========================================
   Footer Component
   ======================================== */

footer {
	background: var(--border-color);
	text-align: center;
	padding: 2rem;
	color: var(--paragraph-color);
}

.sitemap {
	display: flex;
	justify-content: center;
	gap: 2rem;
	margin-top: 1rem;
}

.sitemap a {
	color: var(--paragraph-color);
	text-decoration: none;
}

/* ========================================
   Modal Component
   ======================================== */

.modal {
	display: none;
	position: fixed;
	z-index: 1000;
	left: 0;
	top: 0;
	width: 100%;
	height: 100%;
	background-color: rgba(0, 0, 0, 0.8);
	backdrop-filter: blur(5px);
	justify-content: center;
	align-items: center;
}

/* ========================================
   Lightbox Component
   ======================================== */

.lightbox {
	display: none;
	position: fixed;
	z-index: 2000;
	left: 0;
	top: 0;
	width: 100%;
	height: 100%;
	background-color: rgba(0, 0, 0, 0.9);
	backdrop-filter: blur(5px);
	align-items: center;
	justify-content: center;
	flex-direction: column;
	gap: 1rem;
	animation: fadeIn 0.4s;
}

.lightbox-content {
	display: block;
	max-width: 90vw;
	max-height: 85vh;
	object-fit: contain;
	border-radius: 8px;
	box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
	animation: zoomIn 0.4s;
}

.lightbox-caption {
	display: block;
	width: auto;
	max-width: 90vw;
	padding: 0 1rem;
	text-align: center;
	color: #ccc;
	font-size: 1.1rem;
}

.lightbox-close {
	position: absolute;
	top: 20px;
	right: 35px;
	color: #f1f1f1;
	font-size: 40px;
	font-weight: bold;
	cursor: pointer;
	transition: 0.3s;
	z-index: 2001;
}

.lightbox-close:hover {
	color: #bbb;
}

.no-scroll {
	overflow: hidden;
}

@keyframes zoomIn {
	from {
		transform: scale(0.8);
	}
	to {
		transform: scale(1);
	}
}

/* ========================================
   Dark Mode Styles
   ======================================== */

body.dark {
	background: var(--bg);
	color: var(--text);
}

body.dark #loader {
	background: var(--section-bg);
}

body.dark header {
	background: var(--section-bg);
	box-shadow: 0 4px 20px var(--shadow);
}

body.dark .site-title {
	color: var(--text);
}

body.dark .mobile-toggle {
	color: var(--text);
}

body.dark nav.menu a,
body.dark .theme-toggle {
	color: var(--text);
}

body.dark .theme-toggle {
	border-color: var(--accent-color);
	color: var(--accent-color);
}

body.dark main {
	background: var(--bg);
}

body.dark main section[id]:not(#activities) {
	background: var(--section-bg);
	color: var(--text);
	box-shadow: 0 8px 24px var(--shadow);
	border-left-color: var(--primary-color);
}

body.dark main section[id]:not(#activities) h2 {
	color: var(--heading-color);
	border-bottom-color: var(--primary-color);
}

body.dark main section[id]:not(#activities) p,
body.dark main section[id]:not(#activities) li {
	color: var(--paragraph-color);
}

body.dark .page-title {
	color: var(--heading-color);
	border-bottom-color: var(--link-color);
}

body.dark main > section:not([id]) {
	background-color: var(--section-bg);
	box-shadow: 0 8px 16px var(--shadow-strong);
	border-left-color: var(--link-color);
}

body.dark main > section:not([id]) h2 {
	color: var(--sub-heading-color);
	border-bottom-color: var(--border-color);
}

body.dark main > section:not([id]) p,
body.dark main > section:not([id]) ul {
	color: var(--paragraph-color);
}

body.dark footer {
	background: var(--section-bg);
	color: var(--paragraph-color);
}

body.dark .sitemap a {
	color: var(--paragraph-color);
}

body.dark .detail-link {
	background-color: var(--accent-color);
	color: #fff;
}

body.dark .detail-link:hover {
	background-color: #e65c00;
}

body.dark .detail-link.secondary {
	color: var(--primary-color);
	border-color: var(--primary-color);
}

/* ========================================
   Section Components
   ======================================== */

/* Contact Section */
#contact {
	background: var(--section-bg);
	color: var(--text);
	border-radius: 12px;
	box-shadow: 0 8px 24px var(--shadow);
	border-left: none;
	max-width: 800px;
	text-align: center;
}

/* Seminar Section */
#seminar {
	background: var(--section-bg);
	color: var(--text);
	border-radius: 12px;
	box-shadow: 0 8px 24px var(--shadow);
	border-left: 4px solid var(--primary-color);
	max-width: 800px;
}

/* News Section */
#news {
	max-width: 1200px;
	width: 100%;
	margin: 4rem auto;
	padding: 2rem;
	background: var(--section-bg);
	color: var(--text);
	border-radius: 12px;
	box-shadow: 0 8px 24px var(--shadow);
	border-left: none;
	box-sizing: border-box;
}

#news .news {
	margin-top: 1.5rem;
}

#news .news dl {
	display: grid;
	grid-template-columns: auto 1fr;
	gap: 1rem 1.5rem;
	align-items: baseline;
}

#news .news dt {
	font-weight: bold;
	color: var(--text);
	white-space: nowrap;
}

#news .news dd {
	margin: 0;
	padding-bottom: 1rem;
	border-bottom: 1px solid var(--border-color);
	line-height: 1.7;
}

#news .news dl dd:last-of-type {
	border-bottom: none;
	padding-bottom: 0;
}

/* Blogs Section */
#blogs {
	width: 100%;
	max-width: 1200px;
	margin: 4rem auto;
	padding: 2rem 0;
	background: none;
	border: none;
	box-shadow: none;
	border-radius: 0;
	border-left: none;
}

.blogs-cards {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 2.5rem;
	margin: 0 auto 2rem auto;
	max-width: 1300px;
	width: 100%;
	justify-items: center;
}

.blog-card {
	background: var(--light);
	border-radius: 12px;
	box-shadow: 0 4px 16px var(--shadow);
	padding: 1.5rem 1.2rem 1.2rem 1.2rem;
	min-height: 410px;
	width: 100%;
	max-width: 320px;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: flex-start;
	position: relative;
	opacity: 0;
	transform: translateY(80px) rotate(-15deg) scale(0.8);
	transition: box-shadow 0.3s, transform 0.3s;
}

.blog-card .blog-image {
	width: 100%;
	max-width: 260px;
	height: 140px;
	background: #eee;
	border-radius: 8px;
	margin-bottom: 1rem;
	object-fit: cover;
	display: block;
}

.blog-card.visible {
	opacity: 1;
	transform: none;
	transition: opacity 0.7s cubic-bezier(.77, 0, .18, 1), transform 0.7s cubic-bezier(.77, 0, .18, 1);
}

.blog-card h3 {
	color: var(--heading-color);
	font-size: 1.25rem;
	margin-bottom: 0.75rem;
}

.blog-card p {
	color: var(--paragraph-color);
	font-size: 1rem;
	line-height: 1.6;
}

.blog-card a.detail-link {
	margin-top: auto;
}

.blog-card:hover {
	box-shadow: 0 16px 40px rgba(0, 0, 0, 0.2);
	transform: scale(1.05) translateY(-5px);
}

.more-blogs-btn-wrap {
	display: flex;
	justify-content: center;
	margin-top: 2rem;
}

.more-blogs-btn {
	display: inline-block;
	padding: 0.7em 2.2em;
	font-size: 1.1rem;
	font-weight: 600;
	color: #fff;
	background: var(--link-color);
	border: none;
	border-radius: 2em;
	box-shadow: 0 2px 8px rgba(59, 130, 246, 0.08);
	text-decoration: none;
	transition: background 0.2s, box-shadow 0.2s, transform 0.1s;
	cursor: pointer;
}

.more-blogs-btn:hover,
.more-blogs-btn:focus {
	background: linear-gradient(90deg, #2563eb 0%, #0ea5e9 100%);
	box-shadow: 0 4px 16px rgba(59, 130, 246, 0.18);
	transform: translateY(-2px) scale(1.04);
	text-decoration: none;
	color: #fff;
}

/* ========================================
   Contact Components
   ======================================== */

.line-contact-container {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 20px;
	flex-wrap: wrap;
	background-color: transparent;
	padding: 1rem 0;
	border: none;
	margin: 1rem auto;
}

.supplementary-note {
	font-size: 0.9rem;
	color: var(--sub-heading-color);
	margin-top: 2rem;
	margin-bottom: 0.5rem;
}

.line-button {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 12px 24px;
	background-color: #06C755;
	color: white;
	text-decoration: none;
	border-radius: 8px;
	font-weight: bold;
	transition: background-color 0.3s ease;
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.line-button:hover {
	background-color: #05a548;
}

.line-qr {
	width: 120px;
	height: 120px;
	border-radius: 8px;
	border: 1px solid #ddd;
}

/* Contact Guide */
.contact-guide {
	max-width: 800px;
	margin: 40px auto;
	padding: 0 20px;
}

.step {
	display: flex;
	gap: 30px;
	margin-bottom: 60px;
	position: relative;
}

.step:not(:last-child)::before {
	content: '';
	position: absolute;
	left: 24px;
	top: 50px;
	bottom: -60px;
	width: 2px;
	background-color: #06C755;
	opacity: 0.3;
}

.step-number {
	flex-shrink: 0;
	width: 50px;
	height: 50px;
	border-radius: 50%;
	background-color: #06C755;
	color: white;
	display: flex;
	align-items: center;
	justify-content: center;
	font-weight: bold;
	font-size: 20px;
	z-index: 1;
	border: 4px solid var(--bg-color, #fff);
}

.step-content {
	padding-top: 10px;
}

.step-content h3 {
	margin-top: 0;
	margin-bottom: 10px;
	color: var(--text-color, #333);
}

.step-content p {
	line-height: 1.8;
	margin-bottom: 20px;
}

.step-image {
	display: flex;
	flex-wrap: wrap;
	justify-content: flex-start;
	gap: 1rem;
	margin-top: 1.5rem;
	align-items: flex-start;
}

.step-image img {
	width: 100%;
	max-width: 200px;
	height: 350px;
	object-fit: contain;
	border-radius: 8px;
	box-shadow: 0 6px 12px var(--shadow-strong);
	border: 1px solid var(--border-color);
	transition: transform 0.3s ease, box-shadow 0.3s ease;
	cursor: pointer;
}

.step-image img:hover {
	transform: translateY(-4px);
	box-shadow: 0 10px 20px var(--shadow-strong);
}

/* ========================================
   Blog Components
   ======================================== */

.container {
	max-width: 1200px;
	margin: 0 auto;
	padding: 0 20px;
}

.blog-detail {
	padding: 2rem 0;
	max-width: 800px;
	margin: 0 auto;
}

.blog-title {
	font-size: 2.5rem;
	font-weight: 700;
	color: var(--heading-color);
	margin-bottom: 1rem;
	line-height: 1.3;
}

.blog-date {
	color: var(--paragraph-color);
	font-size: 1rem;
	padding-bottom: 1rem;
	border-bottom: 1px solid var(--border-color);
}

.blog-gallery {
	margin-bottom: 3rem;
}

.blog-gallery h3 {
	font-size: 1.5rem;
	font-weight: 600;
	color: var(--heading-color);
	margin-bottom: 1rem;
}

.gallery-grid {
	display: flex;
	flex-wrap: wrap;
	gap: 16px;
	justify-content: flex-start;
}

.gallery-item {
	aspect-ratio: 4 / 3;
	overflow: hidden;
	border-radius: 8px;
	box-shadow: 0 4px 12px var(--shadow);
	transition: transform 0.3s ease;
}

.gallery-item:hover {
	transform: scale(1.05);
}

.gallery-image {
	width: 100%;
	height: 100%;
	object-fit: cover;
	cursor: pointer;
	transition: opacity 0.3s ease;
}

.gallery-image:hover {
	opacity: 0.8;
}

.blog-content {
	margin-bottom: 3rem;
}

.blog-content h3 {
	font-size: 1.5rem;
	font-weight: 600;
	color: var(--heading-color);
	margin-bottom: 1rem;
}

.content-text {
	font-size: 1.1rem;
	line-height: 1.8;
	color: var(--paragraph-color);
	white-space: pre-line;
}

.blog-attachments {
	margin-bottom: 3rem;
}

.blog-attachments h3 {
	font-size: 1.5rem;
	font-weight: 600;
	color: var(--heading-color);
	margin-bottom: 1rem;
}

.attachment-list {
	display: flex;
	flex-direction: column;
	gap: 0.7em;
	margin-top: 0.5em;
}

.attachment-item {
	display: flex;
	align-items: center;
	background: #f7f7fa;
	border-radius: 10px;
	padding: 0.7em 1.2em;
	box-shadow: 0 1px 4px rgba(30, 40, 90, 0.04);
	transition: box-shadow 0.2s, background 0.2s;
}

.attachment-link {
	display: flex;
	align-items: center;
	color: #222;
	text-decoration: none;
	font-size: 1.08rem;
	font-weight: 500;
	flex: 1;
	min-width: 0;
	transition: color 0.2s, background 0.2s, box-shadow 0.2s;
	border-radius: 10px;
	padding: 0.3em 0.5em;
}

.attachment-link:hover,
.attachment-link:focus {
	background: #ececf0;
	color: #1976d2;
	box-shadow: 0 2px 8px rgba(30, 40, 90, 0.10);
}

.file-icon img {
	width: 1.6em;
	max-width: 28px;
	min-width: 18px;
	height: auto;
	vertical-align: middle;
	display: inline-block;
	margin-right: 0.7em;
	filter: grayscale(0.2) brightness(0.95);
	opacity: 0.85;
	transition: filter 0.2s, opacity 0.2s;
}

.attachment-link:hover .file-icon img,
.attachment-link:focus .file-icon img {
	filter: grayscale(0) brightness(1.1);
	opacity: 1;
}

.file-name {
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	font-size: 1em;
	font-weight: 500;
	letter-spacing: 0.01em;
	max-width: 18em;
}

.blog-navigation {
	text-align: center;
	margin-top: 3rem;
	padding-top: 2rem;
	border-top: 1px solid var(--border-color);
}

.btn-back {
	display: inline-block;
	padding: 0.75rem 1.5rem;
	background: var(--primary-color);
	color: white;
	text-decoration: none;
	border-radius: 25px;
	font-weight: 600;
	transition: all 0.3s ease;
	box-shadow: 0 4px 8px var(--shadow);
}

.btn-back:hover {
	background: #4f46e5;
	transform: translateY(-2px);
	box-shadow: 0 6px 12px var(--shadow);
}

/* Blog List */
.blogs-list {
	padding: 2rem 0;
}

.blogs-grid {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 16px;
	justify-content: flex-start;
}

.back-to-top {
	text-align: center;
	margin-top: 3rem;
}

/* ========================================
   Member Components
   ======================================== */

.member-section {
	max-width: 1200px;
	margin: 3rem auto 4rem auto;
	background: var(--section-bg);
	border-radius: 16px;
	box-shadow: 0 8px 32px var(--shadow-strong);
	padding: 2.5rem 1.5rem;
}

.member-count {
	font-size: 1.2rem;
	margin-bottom: 1.5rem;
	text-align: right;
}

.member-count-num {
	color: var(--accent-color);
	font-size: 1.5em;
	font-weight: bold;
	margin: 0 0.3em;
}

.member-index-list {
	display: flex;
	flex-wrap: wrap;
	gap: 1.2rem;
	justify-content: center;
	list-style: none;
	padding: 0;
	margin: 0;
}

.member-index-list li {
	list-style: none;
	transition: transform 0.25s cubic-bezier(.77, 0, .18, 1), box-shadow 0.25s;
}

.member-index-list li a {
	display: inline-block;
	background: var(--primary-color);
	color: #fff;
	font-weight: 600;
	border-radius: 20px;
	padding: 0.4em 1.2em;
	text-decoration: none;
	position: relative;
}

.member-index-list li a:hover {
	background: var(--accent-color) 60%;
	color: #fff;
	transform: translateY(-6px) scale(1.08);
	box-shadow: 0 8px 24px var(--shadow-strong);
	z-index: 2;
}

.member-gyo-title {
	font-size: 1.5rem;
	color: var(--heading-color);
	margin: 2.5rem 0 1.2rem 0;
	border-left: 6px solid var(--primary-color);
	padding-left: 0.7em;
	letter-spacing: 0.1em;
}

.member-table-wrap {
	overflow-x: auto;
	margin-bottom: 2.5rem;
}

.member-table {
	width: 100%;
	border-collapse: separate;
	border-spacing: 0;
	background: var(--section-bg);
	box-shadow: 0 2px 12px var(--shadow);
	border-radius: 12px;
	overflow: hidden;
	min-width: 600px;
	table-layout: fixed; /* 列幅を固定し、レイアウト崩れを防ぐ */
}

.member-table th,
.member-table td {
	padding: 1em 0.7em;
	text-align: left;
	border-bottom: 1px solid var(--border-color);
}

.member-table th {
	background: var(--primary-color);
	color: #fff;
	font-weight: 700;
	font-size: 1.1em;
	letter-spacing: 0.05em;
	/* 各列の幅を指定 */
	width: 15%; /* デフォルト */
}
.member-table th:nth-child(1) {
	width: 40%;
} /* 会社名 */
.member-table th:nth-child(2) {
	width: 45%;
} /* 住所 */
.member-table th:nth-child(3) {
	width: 15%;
} /* 電話番号 */

.member-table tr:last-child td {
	border-bottom: none;
}

.member-row {
	transition: background 0.2s;
}

.member-row:hover {
	background: var(--bg);
}

.member-row.member-new:hover {
	/* 新規行のホバー時は、少し濃い背景色に */
	background-color: rgba(var(--accent-color-rgb), 0.5);
}

.member-name a {
	color: var(--link-color);
	font-weight: 600;
	text-decoration: underline;
	transition: color 0.2s;
}

.member-name a:hover {
	color: var(--accent-color);
}

.member-new {
	/* 背景色を半透明のアクセントカラーに設定。*/
	background-color: rgba(var(--accent-color-rgb), 0.3);
}

@keyframes flashing {
	from {
		opacity: 1;
	}
	to {
		opacity: 0.5;
	}
}

/* ========================================
   Event Components
   ======================================== */

.caution {
	max-width: 1200px;
	margin: 0 auto;
	background: #fff3cd;
	color: #856404;
	border: 1px solid #ffeeba;
	padding: 1em 1.5em;
	border-radius: 8px;
	margin-bottom: 1.5em;
	font-weight: 600;
	font-size: 1.1em;
	text-align: center;
}

.attendance-cards {
	display: flex;
	gap: 2rem;
	justify-content: center;
	flex-wrap: wrap;
}

.btn-attend {
	background: #22c55e;
	color: #fff;
	border: none;
	border-radius: 6px;
	padding: 0.5em 1.2em;
	font-size: 1em;
	font-weight: 600;
	cursor: pointer;
	transition: background 0.2s;
}

.btn-attend:hover {
	background: #16a34a;
}

.btn-zoom {
	background: #2D8CFF;
	color: #fff;
	border: none;
	border-radius: 6px;
	padding: 0.5em 1.2em;
	font-size: 1em;
	font-weight: 600;
	cursor: pointer;
	transition: background 0.2s;
}

.btn-zoom:hover {
	background: #1769c6;
}

.btn-absent {
	background: #e53935;
	color: #fff;
	border: none;
	border-radius: 6px;
	padding: 0.5em 1.2em;
	font-size: 1em;
	font-weight: 600;
	cursor: pointer;
	transition: background 0.2s;
}

.btn-absent:hover {
	background: #b71c1c;
}

.attendance-card {
	background: #fff;
	border-radius: 14px;
	box-shadow: 0 4px 16px rgba(0, 0, 0, 0.07);
	padding: 1.5em 1.2em 1.2em 1.2em;
	min-width: 180px;
	max-width: 220px;
	display: flex;
	flex-direction: column;
	align-items: center;
	transition: box-shadow 0.3s, transform 0.3s;
	gap: 1em;
	position: relative;
}

.badge-selected {
	position: absolute;
	top: -0.5em;
	left: -1em;
	z-index: 2;
	display: inline-block;
	background: #6366f1;
	color: #fff;
	font-size: 0.92em;
	font-weight: 700;
	padding: 0.18em 1.1em;
	border-radius: 999px;
	letter-spacing: 0.05em;
	box-shadow: 0 2px 8px rgba(99, 102, 241, 0.08);
}

.attendance-card-label {
	font-size: 1.1em;
	font-weight: 600;
	color: #222;
	margin-bottom: 0.5em;
}

.attendance-card-img {
	width: 70px;
	height: 70px;
	overflow: hidden;
	border-radius: 50%;
	background: #f3f4f6;
	display: flex;
	align-items: center;
	justify-content: center;
	margin-bottom: 0.5em;
}

.attendance-card-img img {
	width: 100%;
	height: 100%;
	object-fit: contain;
	display: block;
}

.event {
	background: #f8fafc;
	border-radius: 16px;
	box-shadow: 0 6px 32px rgba(60, 80, 120, 0.10);
	padding: 2.8em 3.5em 2.5em 3.5em;
	margin-bottom: 2.5em;
	max-width: 1100px;
	margin-left: auto;
	margin-right: auto;
}

.event .dear {
	font-size: 2em;
	font-weight: 600;
	color: #1e293b;
	letter-spacing: 0.03em;
}

.event .start {
	display: flex;
	align-items: center;
	font-size: 1.13em;
	margin-bottom: 1.7em;
	font-weight: 600;
	position: relative;
	min-width: 260px;
	max-width: 100%;
}

.event .start::before {
	content: '\1F4C5';
	font-size: 1.3em;
	margin-right: 0.7em;
	filter: grayscale(0.2);
}

.event-title {
	font-size: 1.6em;
	color: #1e293b;
	margin-bottom: 1.3em;
	letter-spacing: 0.04em;
	border-left: none;
	padding-left: 0;
	border-bottom: 4px solid #6366f1;
	padding-bottom: 0.25em;
	background: none;
	box-shadow: none;
	display: inline-block;
}

.study-info-content {
	background: #fff;
	border-radius: 12px;
	box-shadow: 0 2px 12px rgba(60, 80, 120, 0.07);
	padding: 1.5em 2em;
	margin-bottom: 0.5em;
}

.study-info-content .content {
	font-size: 1.13em;
	color: #334155;
	line-height: 1.85;
	letter-spacing: 0.01em;
}

.zoom-caution {
	color: #b91c1c;
	background: #fff0f0;
	border: 1.5px solid #fca5a5;
	border-radius: 8px;
	text-align: center;
	font-size: 1.08em;
	font-weight: 600;
	margin: 2em auto 0 auto;
	padding: 1em 1.5em;
	box-shadow: 0 2px 8px rgba(185, 28, 28, 0.06);
	letter-spacing: 0.01em;
}

/* ========================================
   About Page Components
   ======================================== */

.greeting-section .greeting-content {
	display: flex;
	flex-wrap: wrap;
	gap: 2rem;
	align-items: flex-start;
	margin-top: 1.5rem;
}

.greeting-section .president-photo {
	flex: 0 0 200px;
	width: 200px;
	height: 200px;
	border-radius: 50%;
	object-fit: cover;
	object-position: 50% 20%;
	box-shadow: 0 4px 15px var(--shadow-strong);
	border: 4px solid var(--section-bg);
}

.greeting-section .greeting-text {
	flex: 1;
	min-width: 300px;
}

.greeting-section .date-signature {
	margin-top: 2rem;
	text-align: right;
	line-height: 1.8;
	font-weight: 600;
	color: var(--sub-heading-color);
}

.officer-list {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
	gap: 1.5rem;
	margin-top: 1.5rem;
}

.officer-card {
	background-color: var(--bg);
	padding: 1.5rem;
	border-radius: 8px;
	text-align: center;
	box-shadow: 0 4px 10px var(--shadow);
	transition: transform 0.3s ease, box-shadow 0.3s ease;
	border-top: 4px solid var(--accent-color);
}

.officer-card:hover {
	transform: translateY(-5px);
	box-shadow: 0 8px 20px var(--shadow-strong);
}

.officer-card .officer-title {
	display: block;
	font-size: 0.9rem;
	font-weight: 600;
	color: var(--accent-color);
	margin-bottom: 0.5rem;
}

.officer-card .officer-name {
	font-size: 1.25rem;
	font-weight: 700;
	color: var(--heading-color);
	margin: 0;
}

/* ========================================
   Utility Classes
   ======================================== */

.is-study {
	animation-name: study-flashing;
	animation-duration: 0.8s;
	animation-timing-function: ease-out;
	animation-fill-mode: forwards;
	animation-iteration-count: infinite;
}

@keyframes study-flashing {
	0% {
		background-color: #3fff00;
	}
	60% {
		background-color: #3fff00;
	}
	100% {
		background-color: #ffffff;
	}
}

.none_list {
	list-style-type: none;
	padding-left: 0;
}

.section-content {
	display: flex;
	align-items: center;
	gap: 20px;
	margin-bottom: 20px;
}

.section-icon {
	width: 80px;
	height: 80px;
}

/* ========================================
   Section Border Controls
   ======================================== */

main section[id]:not(#seminar):not(#blogs):not(#news) {
	border-left: none;
}

#entry,
#contact {
	border-left: none !important;
}

/* ========================================
   Page Specific Adjustments
   ======================================== */

body > main > section:first-of-type,
body > main > .page-title + section:first-of-type {
	margin-top: 40px;
}

main:not(:has(.hero)) > section:first-of-type,
main:not(:has(.hero)) > .page-title + section:first-of-type {
	margin-top: 20px;
}

main > section:not([id]) {
	background-color: var(--section-bg);
	padding: 30px 40px;
	margin-bottom: 40px;
	border-radius: 12px;
	box-shadow: 0 8px 16px var(--shadow-strong);
	border-left: 5px solid var(--link-color);
}

main > section:not([id]) h2 {
	font-family: var(--font-family-main);
	font-size: 2em;
	font-weight: 600;
	color: var(--sub-heading-color);
	margin-top: 0;
	margin-bottom: 20px;
	padding-bottom: 10px;
	border-bottom: 1px solid var(--border-color);
}

main > section:not([id]) p,
main > section:not([id]) ul {
	font-size: 1.1em;
	line-height: 1.9;
	color: var(--paragraph-color);
	margin-bottom: 15px;
}

main > section:not([id]) ul {
	list-style-type: disc;
	list-style-position: inside;
	padding-left: 0;
}

main > section:not([id]) ol {
	list-style-type: decimal;
	list-style-position: inside;
	padding-left: 0;
}

main > section:not([id]) ul li {
	margin-bottom: 8px;
}

/* --- SNS Icons in Footer --- */
.social-section {
	margin: 2rem 0;
	padding: 2rem 0;
	background-color: transparent;
	border-radius: 0;
	max-width: 100%;
	box-shadow: none;
	border-top: 1px solid rgba(0, 0, 0, 0.1);
	border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.dark .social-section {
	background-color: transparent;
	border-top: 1px solid var(--border-color);
	border-bottom: 1px solid var(--border-color);
}

.social-title {
	font-size: 1rem;
	font-weight: 400;
	color: var(--sub-heading-color);
	margin-bottom: 1.5rem;
	text-align: center;
	text-transform: uppercase;
	letter-spacing: 0.1em;
}

.social-links {
	text-align: center;
	margin: 0;
}

.social-links a {
	display: inline-block;
	margin: 0 12px;
	color: #777; /* アイコンの基本色 */
	font-size: 2.2rem; /* アイコンのサイズ */
	transition: color 0.3s, transform 0.3s;
}

.social-links a:hover {
	transform: scale(1.15) translateY(-3px); /* ホバー時に少し拡大 & 浮き上がる */
}

/* LINE icon hover color */
.social-links a:hover .fa-line {
	color: #06C755;
}

/* Instagram icon hover color */
.social-links a:hover .fa-instagram {
	color: #E1306C;
}

/* Facebook icon hover color */
.social-links a:hover .fa-facebook {
	color: #1877F2;
}

/* YouTube icon hover color */
.social-links a:hover .fa-youtube {
	color: #FF0000;
}

/* Threads icon hover color */
.social-links a:hover .fa-threads {
	color: var(--text); /* ライトモードでは黒、ダークモードでは白 */
}

/* Dark mode styles for social links */
.dark .social-links a {
	color: #888;
}

.policy-section h2 {
	display: flex;
	align-items: center;
	font-size: 2em;
	font-weight: 600;
	color: var(--sub-heading-color);
	margin-bottom: 20px;
	padding-bottom: 10px;
	border-bottom: 1px solid var(--border-color);
}

.policy-section h2 icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	margin-right: 12px;
}

.policy-section h2 .icon img {
	width: 10vw;
	height: 10vw;
}

/* ========================================
   Responsive Design
   ======================================== */

/* 1100px以下 */
@media (max-width: 1100px) {
	.blogs-cards {
		grid-template-columns: repeat(2, 1fr);
		max-width: 700px;
	}
}

/* 900px以下 (タブレット縦?小さめPC) */
@media (max-width: 900px) {
	header {
		flex-direction: column;
		align-items: stretch;
	}

	.nav-wrap {
		width: 100%;
		justify-content: flex-end;
		margin-top: 0.5rem;
	}
}

/* 800px以下 (タブレット縦) */
@media (max-width: 800px) {
	.member-table {
		min-width: 400px;
		font-size: 0.98em;
	}

	.member-section {
		padding: 1.2rem 0.2rem;
	}
}

/* 768px以下 (スマホ横?スマホ) */
@media (max-width: 768px) {
	/* 全体の余白等 */
	.container {
		padding: 0 15px;
	}

	header {
		padding: 0.5rem 1rem;
		flex-direction: row;      /* モバイルでは横並び */
		align-items: center;
	}

	/* nav-wrapは消さない。中身のnav.menuをドロップダウン化する */
	.nav-wrap {
		width: auto;
		margin-top: 0;
		display: flex;
		justify-content: flex-end;
		flex: 1 1 auto;
		align-items: center;
		position: relative;
	}

	/* ハンバーガーアイコンはここで表示。
	   これがタップできない問題を防ぐために必ず最前面にしておく */
	.mobile-toggle {
		display: inline-block;
		margin-left: auto;
		position: relative;
		z-index: 3000; /* メニューより上 */
		color: var(--text);
		cursor: pointer;
	}

	/* ▼ドロップダウンメニュー本体（常にDOM上にある）
	   ・初期状態は閉じてる (= 見えない＆クリックできない)
	   ・.open つけたら見える＆クリック可になる
	*/
	/* ▼ドロップダウンメニュー本体 */
  nav.menu {
    position: absolute;
    top: calc(100% + 6px); /* ヘッダーから少しだけ離して浮かせる */
    left: 0;
    width: 100%;
    background-color: var(--section-bg);
    box-shadow: 0 4px 8px var(--shadow);
    flex-direction: column;
    border-radius: 0;
    z-index: 2000;

    /* 折りたたみ状態の初期 */
    display: flex;            /* 常にflex。表示/非表示は高さ&opacityで管理 */
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
    padding: 0;               /* ←閉じてるときは余白ゼロなのでチラ見えしない */
    transition:
      max-height 0.25s ease,
      opacity 0.25s ease,
      padding 0.25s ease;
  }

  /* 展開時 */
  nav.menu.open {
    opacity: 1;
    pointer-events: auto;
    box-shadow: 0 4px 12px var(--shadow);

    /* 上にだけクッションを入れる。下は0で余白を残さない */
    padding: 12px 0 0;
}


  body.dark nav.menu {
    background: var(--section-bg);
    box-shadow: 0 4px 12px var(--shadow);
  }

  /* ▼各メニュー項目（リンク・ボタン含む） */
  nav.menu > * {
    /* 均等な行高さのためのレイアウト */
    display: flex;
    align-items: center;
    justify-content: center;

    width: 100%;
    min-height: 35px;         /* 行の最低高さを揃える。ここを40pxとかにすればさらにコンパクトにできる */
    padding: 12px 20px;       /* 内側の余白（上下12pxはわりと見やすい） */
    box-sizing: border-box;

    text-align: center;
    font-weight: 600;
    color: var(--text);
    text-decoration: none;
    background: none;

    border: none;
    border-bottom: 1px solid var(--border-color);
    margin-left: 0 !important;
    border-radius: 0;
  }

  /* 最後の行（下線なしにする） */
  nav.menu > :last-child {
    border-bottom: none !important;
  }

  /* 会員ページボタン（オレンジ） */
  nav.menu .member-page {
    background: var(--accent-color) !important;
    color: #fff !important;
    /* paddingやmin-heightは上の共通指定が効くので触らない */
  }

  /* ダークモード切り替えボタンも同じ高さで中央に */
  /* .theme-toggle はもともとボーダーとか色がついてるけど、
     モバイルメニュー内では中央寄せだけ揃えればOK。
     ここでは特別なmarginを付けないことで余白暴れを防ぐ */
  nav.menu .theme-toggle {
    border: 1px solid var(--accent-color);
    color: var(--accent-color);
    background: none;
    border-radius: 4px;
    /* すでに親からflexセンター&min-heightついてるのでOK */
  }

  body.dark nav.menu > * {
    border-bottom-color: var(--border-color);
    color: var(--text);
    background: none;
  }

  /* PC用のhoverアンダーラインはモバイルメニューでは不要 */
  nav.menu a::before {
    display: none;
  }
}


/* 600px以下 (スマホ縦向き中心の最終微調整) */
@media (max-width: 600px) {
	.site-title {
		font-size: 1rem;
		padding: 0 0 0 0.3rem;
	}

	.detail-link {
		min-width: 90px;
		max-width: 100%;
		font-size: 0.95em;
		padding: 0.5rem 1rem;
	}

	.blogs-cards {
		grid-template-columns: 1fr;
		gap: 1rem;
		max-width: 98vw;
	}

	.blog-card {
		max-width: 98vw;
		min-height: 220px;
		padding: 1rem 0.5rem;
	}

	.blog-card .blog-image {
		height: 90px;
	}

	.member-table {
		min-width: 320px;
		font-size: 0.93em;
	}

	.member-gyo-title {
		font-size: 1.1rem;
	}

	.member-index-list {
		gap: 0.5rem;
	}

	.member-index-list li a {
		font-size: 0.95em;
		padding: 0.3em 0.7em;
	}

	.attachment-item {
		padding: 0.5em 0.7em;
	}

	.file-icon img {
		width: 1.2em;
		max-width: 20px;
	}

	.file-name {
		max-width: 10em;
		font-size: 0.98em;
	}

	.blog-title {
		font-size: 1.8rem;
	}

	.page-title {
		font-size: 1.8rem;
	}

	.gallery-grid {
		grid-template-columns: 1fr;
	}

	.attachment-item {
		padding: 0.75rem;
	}

	.btn-back {
		padding: 0.6rem 1.2rem;
		font-size: 0.9rem;
	}
}

/* 480px以下 (より小さい端末用の再微調整) */
@media (max-width: 480px) {
	.blog-title {
		font-size: 1.8rem;
	}

	.page-title {
		font-size: 1.5rem;
	}

	.gallery-grid {
		grid-template-columns: 1fr;
	}

	.attachment-item {
		padding: 0.75rem;
	}

	.btn-back {
		padding: 0.6rem 1.2rem;
		font-size: 0.9rem;
	}
}

/* ========================================
   Dark Mode Additional Styles
   ======================================== */

body.dark .blog-title,
body.dark .page-title,
body.dark .card-title,
body.dark .blog-content h3,
body.dark .blog-gallery h3,
body.dark .blog-attachments h3 {
	color: var(--heading-color);
}

body.dark .blog-date,
body.dark .card-date,
body.dark .content-text,
body.dark .card-summary {
	color: var(--paragraph-color);
}

body.dark .blog-card,
body.dark .attachment-item {
	background: var(--section-bg);
	border-color: var(--border-color);
}

body.dark .lightbox {
	background-color: rgba(0, 0, 0, 0.95);
}

body.dark .member-section,
body.dark .member-table {
	background: var(--section-bg);
	color: var(--text);
}

body.dark .member-table th {
	background: var(--primary-color);
	color: #fff;
}

body.dark .member-row:hover {
	background: var(--bg);
}

body.dark .member-new {
	background-color: rgba(var(--accent-color-rgb), 0.2);
}

body.dark .member-row.member-new:hover {
	/* ダークモードでのホバー色は少し濃くする */
	background-color: rgba(var(--accent-color-rgb), 0.3);
}
