/* ==================================================
   市川柔道教室 スタイルシート（最新・最適化版）
   ================================================== */

/* --- 1. 全体設定 --- */
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { 
    font-family: "Noto Sans JP", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; 
    line-height: 1.6; color: #333; background-color: #f4f7f4; 
    -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
}
body.menu-open { overflow: hidden; }
img { max-width: 100%; height: auto; vertical-align: middle; font-style: italic; background: #eee; }

/* --- 2. ヘッダー・ナビゲーション --- */
.site-header { 
    background: rgba(255, 255, 255, 0.9); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
    height: 70px; position: sticky; top: 0; z-index: 1000; box-shadow: 0 2px 5px rgba(0,0,0,0.05); 
}
.header-inner { max-width: 1000px; margin: 0 auto; display: flex; justify-content: space-between; align-items: center; padding: 0 15px; height: 100%; }
.logo img { max-height: 50px; width: auto; }
.logo-fallback { font-size: 1.2rem; font-weight: bold; color: #2e7d32; letter-spacing: 1px; }

.nav-menu ul { list-style: none; display: flex; gap: 20px; margin: 0; padding: 0; }
.nav-menu ul li a { text-decoration: none; color: #333; font-weight: bold; font-size: 0.95rem; transition: color 0.3s; white-space: nowrap; }
.nav-menu ul li a:hover { color: #2e7d32; }

.menu-trigger { background: none; border: none; width: 30px; height: 24px; position: relative; cursor: pointer; display: none; z-index: 10001; }
.menu-trigger span { position: absolute; left: 0; width: 100%; height: 2px; background: #333; transition: 0.3s; }
.menu-trigger span:nth-child(1) { top: 0; }
.menu-trigger span:nth-child(2) { top: 11px; }
.menu-trigger span:nth-child(3) { bottom: 0; }
.menu-trigger.active span:nth-child(1) { transform: translateY(11px) rotate(45deg); }
.menu-trigger.active span:nth-child(2) { opacity: 0; }
.menu-trigger.active span:nth-child(3) { transform: translateY(-11px) rotate(-45deg); }

/* --- 3. ヒーロースライダー --- */
.hero-slider { position: relative; width: 100%; aspect-ratio: 16 / 9; overflow: hidden; border-radius: 8px; margin-bottom: 20px; background: #eee; }
.hero-slider .slide { position: absolute; top: 0; left: 0; width: 100%; height: 100%; opacity: 0; transition: opacity 1.5s ease-in-out; z-index: 1; will-change: opacity; }
.hero-slider .slide.active { opacity: 1; z-index: 2; }
.hero-slider img { width: 100%; height: 100%; object-fit: cover; }

/* --- 4. コンテンツ共通 --- */
.container { width: 94%; max-width: 1000px; margin: 20px auto; }
.content-block { background: #fff; padding: 25px; border-radius: 12px; margin-bottom: 25px; box-shadow: 0 2px 10px rgba(0,0,0,0.04); scroll-margin-top: 90px; }
h2 { color: #2e7d32; border-left: 6px solid #2e7d32; padding-left: 15px; margin-bottom: 20px; font-size: 1.3rem; }
p { font-size: 1rem; line-height: 1.8; }

/* --- 5. トピックス --- */
.topics-expand-container { overflow: hidden; transition: max-height 0.5s ease-in-out; position: relative; }
#topics:not(.is-open) .topics-expand-container { mask-image: linear-gradient(to bottom, black 70%, transparent 100%); -webkit-mask-image: linear-gradient(to bottom, black 70%, transparent 100%); }
#topics.is-open .topics-expand-container { max-height: 3000px; mask-image: none; -webkit-mask-image: none; }
@media (min-width: 851px) { #topics:not(.is-open) .topics-expand-container { max-height: 216px; } }
@media (max-width: 850px) { #topics:not(.is-open) .topics-expand-container { max-height: 280px; } }

#topics-list { list-style: none; }
.topic-item { border-bottom: 1px solid #eee; }
.topic-header { display: flex; align-items: baseline; gap: 15px; padding: 15px 10px; transition: background 0.2s; cursor: default; }
.topic-header:hover { background: #f9fdf9; }
.topic-header.has-accordion { cursor: pointer; }
.topic-header::after { content: '▼'; font-size: 0.7rem; color: #ccc; margin-left: auto; transition: 0.3s; }
.topic-header:not(.has-accordion)::after { display: none; }
.topic-item.is-active .topic-header::after { transform: rotate(180deg); color: #2e7d32; }

.topic-date { font-size: 0.85rem; color: #777; min-width: 85px; font-family: monospace; position: relative; }
.topic-date.is-new::before { content: "NEW"; position: absolute; top: -12px; left: 0; font-size: 0.65rem; font-weight: bold; color: #fff; background: #e53935; padding: 1px 4px; border-radius: 3px; }
.topic-title { font-size: 0.95rem; font-weight: bold; flex: 1; color: #333; }
.topic-item.is-active .topic-title { color: #2e7d32; }

.topic-content { display: none; padding: 0 15px 20px 110px; font-size: 0.95rem; color: #555; line-height: 1.8; }
.topic-item.is-active .topic-content { display: block; }

.more-btn {
    display: block; width: 100%; max-width: 280px; margin: 20px auto 0; padding: 14px;
    background: #fff; color: #2e7d32; border: 2px solid #2e7d32; border-radius: 8px;
    font-size: 1rem; font-weight: bold; cursor: pointer; transition: 0.3s; text-align: center;
}
.more-btn:hover { background: #f1f8e9; transform: translateY(-2px); box-shadow: 0 4px 12px rgba(46, 125, 50, 0.1); }

/* --- 6. 紹介・スケジュール・共通パーツ --- */
.info-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; margin: 20px 0; }
.info-item { background: #fafafa; padding: 15px; border-radius: 8px; border: 1px solid #eee; transition: 0.3s; width: 100%; }
.info-item h3 { margin-top: 5px; font-size: 1.15rem; color: #2e7d32; border-bottom: 2px solid #e0e0e0; padding-bottom: 5px; margin-bottom: 15px; }
.info-list dt { font-weight: bold; color: #2e7d32; font-size: 0.95rem; margin-top: 15px; }
.info-list dd { padding-left: 20px; margin-top: 5px; font-size: 0.95rem; }

.custom-list { list-style: none; background: #f1f8e9; padding: 15px; border-radius: 8px; margin: 15px 0; }
.custom-list li { display: flex; align-items: flex-start; margin-bottom: 8px; font-size: 1rem; }
.custom-list li::before { content: "🥋"; margin-right: 10px; flex-shrink: 0; }

.notice-box { background: #fff3e0; padding: 15px; border-left: 5px solid #ff9800; border-radius: 4px; }
.map-embed-wrapper { margin: 15px 0; border-radius: 8px; overflow: hidden; line-height: 0; background: #eee; }
.map-embed-wrapper iframe { width: 100%; height: 350px; border: 0; }

.calendar-wrapper { width: 100%; }
.google-calendar-iframe { width: 100%; height: 450px; border: none; overflow: hidden; border-radius: 8px; display: block; margin-bottom: 20px; background: #eee; }

/* --- 7. お問い合わせフォーム & 完了メッセージ --- */
.contact-intro { margin-bottom: 25px; font-size: 0.95rem; color: #666; text-align: center; }
.contact-form { max-width: 680px; margin: 0 auto; transition: opacity 0.4s ease; }
.contact-form .form-group { display: flex; flex-direction: column; margin-bottom: 15px; }
.contact-form label { font-weight: bold; font-size: 0.95rem; color: #444; margin-bottom: 8px; }
.contact-form label span { font-size: 0.65rem; color: #e53935; margin-left: 6px; background: #fee; padding: 2px 5px; border-radius: 3px; }
.contact-form input, .contact-form textarea { width: 100%; padding: 12px; border: 1px solid #ddd; border-radius: 8px; font-size: 1rem; background: #fafafa; outline: none; transition: 0.3s; appearance: none; }
.contact-form input:focus, .contact-form textarea:focus { border-color: #2e7d32; background: #fff; box-shadow: 0 0 0 4px rgba(46, 125, 50, 0.1); }

.submit-btn { 
    display: block; width: 100%; max-width: 280px; margin: 20px auto 0; padding: 14px;
    background: #2e7d32; color: #fff; border: none; border-radius: 8px;
    font-size: 1.1rem; font-weight: bold; text-align: center; transition: 0.3s; cursor: pointer; 
}
.submit-btn:disabled { background: #ccc; cursor: not-allowed; }
.submit-btn:hover:not(:disabled) { background: #256328; transform: translateY(-2px); box-shadow: 0 4px 12px rgba(46, 125, 50, 0.2); }

.contact-success { display: none; text-align: center; padding: 50px 20px; background: #f1f8e9; border: 2px dashed #2e7d32; border-radius: 12px; animation: successShow 0.6s cubic-bezier(0.22, 1, 0.36, 1); }
.success-icon { font-size: 3.5rem; display: block; margin-bottom: 15px; }
@keyframes successShow { from { opacity: 0; transform: scale(0.95) translateY(20px); } to { opacity: 1; transform: scale(1) translateY(0); } }
.recaptcha-policy { font-size: 0.75rem; color: #999; text-align: center; margin-top: 20px; line-height: 1.4; }

/* --- 7.5. スケジュールアーカイブ（セレクター・ボタン） --- */
.schedule-archive-selector { margin: 20px 0; padding: 15px; background: #f9f9f9; border: 1px dotted #ccc; border-radius: 8px; display: flex; justify-content: center; align-items: center; gap: 10px; flex-wrap: wrap; }
#schedule-archive-select { padding: 8px; border: 1px solid #ddd; border-radius: 4px; font-size: 1rem; background: #fff; }
.archive-btn { background: #2e7d32; color: #fff; border: none; padding: 8px 24px; border-radius: 4px; cursor: pointer; font-weight: bold; transition: 0.3s; }
.archive-btn:hover { background: #256328; box-shadow: 0 2px 4px rgba(0,0,0,0.15); }

/* --- 8. フッター --- */
.site-footer { text-align: center; padding: 40px 20px; background: #fff; border-top: 1px solid #eee; margin-top: 40px; }
.footer-archive a { color: #2e7d32; text-decoration: none; font-size: 0.9rem; margin: 0 8px; }

/* --- 9. レスポンシブ --- */
@media (max-width: 850px) {
    .menu-trigger { display: block; }
    .nav-menu { position: fixed; top: 0; right: -100%; width: 280px; height: 100vh; background: #fff; padding: 80px 30px; transition: 0.4s; box-shadow: -5px 0 15px rgba(0,0,0,0.1); z-index: 10000; }
    .nav-menu.active { right: 0; }
    .nav-menu ul { flex-direction: column; gap: 0; }
    .nav-menu ul li a { display: flex; align-items: center; min-height: 50px; border-bottom: 1px solid #eee; }
    .map-embed-wrapper iframe { height: 280px; }
    .google-calendar-iframe { height: 350px; }
    .more-btn, .submit-btn, .schedule-archive-selector { max-width: 100%; }
    .schedule-archive-selector { flex-direction: column; width: 100%; }
    #schedule-archive-select { width: 100%; }
}

@media (min-width: 650px) {
    .contact-form .form-group { flex-direction: row; align-items: flex-start; gap: 10px; }
    .contact-form label { flex: 0 0 180px; padding-top: 12px; }
}
