/*
Theme Name: Shizen Gakuen Theme
Description: 自然学園2.0
Author: Sota Ito
Version: 3.4
*/

:root {
    --bg-color: #fdfdfd;
    --text-color: #4a4a4a;
    --primary-color: #f39800; /* オレンジ */
    --primary-dark: #d68600;
    --accent-color: #00984f;
    --card-bg: #ffffff;
    --font-main: 'Zen Maru Gothic', 'Noto Sans JP', sans-serif;
    --container-width: 1100px;
    --border-radius: 12px;
}

/* =========================================
   Base Styles
   ========================================= */
* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-main);
    line-height: 1.6;
    overflow-x: hidden;
}
a { text-decoration: none; color: inherit; transition: 0.3s; }
img { max-width: 100%; height: auto; border-radius: var(--border-radius); }
ul { list-style: none; }

.container, .l-container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
}

/* =========================================
   Header & Navigation
   ========================================= */
.site-header {
    background: #ffffff;
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
    position: sticky;
    top: 0;
    z-index: 9999;
    height: 80px;
    border-top: 4px solid var(--primary-color);
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
    padding: 0 20px;
}

.logo-img { height: 50px; width: auto; display: block; border-radius: 0; }

.pc-nav-area { display: flex; align-items: center; gap: 30px; }
.header-menu-list { display: flex; list-style: none; margin: 0; padding: 0; gap: 25px; }
.header-menu-list a { text-decoration: none; color: #333; font-weight: 700; font-size: 15px; transition: color 0.3s; position: relative; }
.header-menu-list a::after { content: ''; position: absolute; bottom: -5px; left: 0; width: 0; height: 2px; background: var(--primary-color); transition: width 0.3s; }
.header-menu-list a:hover::after { width: 100%; }
.header-menu-list a:hover { color: var(--primary-color); }

.btn-tel-pc { display: inline-block; background: var(--primary-color); color: #fff; text-decoration: none; padding: 10px 20px; border-radius: 50px; font-weight: bold; font-size: 16px; box-shadow: 0 4px 10px rgba(243, 152, 0, 0.3); transition: transform 0.3s, box-shadow 0.3s; }
.btn-tel-pc:hover { transform: translateY(-2px); box-shadow: 0 6px 15px rgba(243, 152, 0, 0.4); background: var(--primary-dark); }

/* ハンバーガーメニュー */
@media screen and (max-width: 767px) {
    .pc-nav-area { display: none; }
    .hamburger-btn { display: block; }
}
@media screen and (min-width: 768px) {
    .hamburger-btn, .mobile-drawer { display: none; }
}

.hamburger-btn { position: fixed; top: 20px; right: 20px; width: 40px; height: 40px; background: transparent; border: none; z-index: 9999; cursor: pointer; outline: none; }
.hamburger-btn .bar { display: block; width: 100%; height: 3px; background-color: #333; position: absolute; left: 0; transition: all 0.3s ease; border-radius: 2px; }
.hamburger-btn .bar-top { top: 5px; }
.hamburger-btn .bar-mid { top: 18px; }
.hamburger-btn .bar-bottom { bottom: 5px; }
.hamburger-btn.is-active .bar-top { transform: translateY(13px) rotate(45deg); }
.hamburger-btn.is-active .bar-mid { opacity: 0; }
.hamburger-btn.is-active .bar-bottom { transform: translateY(-13px) rotate(-45deg); }

.mobile-drawer { position: fixed; top: 0; right: -100%; width: 100%; height: 100vh; background: #fff; z-index: 9900; transition: right 0.3s ease; padding-top: 80px; box-sizing: border-box; overflow-y: auto; }
.mobile-drawer.is-active { right: 0; }
.drawer-inner { padding: 20px; text-align: center; }
.mobile-menu-list { list-style: none; padding: 0; margin: 0 0 30px 0; }
.mobile-menu-list li { margin-bottom: 20px; }
.mobile-menu-list a { text-decoration: none; color: #333; font-size: 1.2rem; font-weight: bold; }
.drawer-contact p { margin-bottom: 10px; font-weight: bold; color: #666; }
.btn-tel-mobile { display: inline-block; background: var(--primary-color); color: #fff; padding: 12px 30px; border-radius: 50px; font-weight: bold; text-decoration: none; font-size: 1.1rem; box-shadow: 0 4px 10px rgba(243, 152, 0, 0.3); }


/* =========================================
   Hero Section
   ========================================= */
.hero-section { position: relative; width: 100%; height: 600px; display: flex; align-items: center; justify-content: center; text-align: center; color: #fff; background-color: #333; overflow: hidden; margin-bottom: 50px; }
.hero-bg { position: absolute; top: 0; left: 0; width: 100%; height: 100%; z-index: 0; }
.hero-bg img { width: 100%; height: 100%; object-fit: cover; opacity: 0.6; border-radius: 0; }
.hero-content { position: relative; z-index: 1; padding: 0 20px; }
.hero-content h1 { font-size: 3rem; font-weight: 900; margin-bottom: 20px; color: #fff; text-shadow: 0 2px 5px rgba(0,0,0,0.5); line-height: 1.4; }
.hero-content p { font-size: 1.2rem; margin-bottom: 30px; color: #f9f9f9; font-weight: 700; }
.hero-buttons { display: flex; gap: 20px; justify-content: center; }
.btn { display: inline-block; padding: 15px 40px; border-radius: 50px; font-weight: bold; text-decoration: none; transition: transform 0.2s; }
.btn-primary { background: var(--primary-color); color: white; border: none; }
.btn-secondary { background: white; color: #333; border: none; }
.btn:hover { transform: translateY(-3px); box-shadow: 0 5px 15px rgba(0,0,0,0.3); }
@media (max-width: 768px) { .hero-section { height: 500px; } .hero-content h1 { font-size: 2rem; } .hero-buttons { flex-direction: column; gap: 15px; } }


/* =========================================
   Tabs (トップページ)
   ========================================= */
.tab-buttons { display: flex; overflow-x: auto; gap: 10px; margin-bottom: 20px; padding-bottom: 5px; -webkit-overflow-scrolling: touch;}
.tab-buttons::-webkit-scrollbar { display: none; }
.tab-btn { flex: 0 0 auto; background: #f4f4f4; border: none; padding: 10px 16px; border-radius: 30px; font-weight: 700; color: #777; cursor: pointer; }
.tab-btn.active { background: var(--primary-color); color: white; }
.tab-panel { display: none; animation: fadeIn 0.4s ease; }
.tab-panel.active { display: block; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } }

/* Cards & Lists (トップページ) */
.news-list { display: flex; flex-direction: column; gap: 15px; }
.news-card { background: white; border: 1px solid #eee; border-radius: 12px; padding: 20px; box-shadow: 0 2px 5px rgba(0,0,0,0.03); display: block; text-decoration: none; color: inherit; transition: 0.3s; }
.news-card:hover { transform: translateY(-3px); box-shadow: 0 5px 15px rgba(0,0,0,0.08); border-color: rgba(243, 152, 0, 0.3); }
.news-meta { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; flex-wrap: wrap; }

/* カテゴリラベル (共通) ★ここを修正しました！ */
.tag, .post-label {
    font-size: 0.7rem;
    padding: 3px 10px;
    border-radius: 4px;
    font-weight: bold;
    background: #eee;
    color: #555;
    white-space: nowrap; /* ★これが重要：文字の折り返しを禁止 */
    display: inline-block;
}
.tag.cat-info, .post-label.cat-info { background: #ffebee; color: #c62828; }
.tag.cat-column, .post-label.cat-column { background: #e3f2fd; color: #1565c0; }
.tag.cat-inclusive_magazine, .post-label.cat-inclusive_magazine { background: #e8f5e9; color: #2e7d32; }
.tag.cat-recommended_book, .post-label.cat-recommended_book { background: #fff3e0; color: #ef6c00; }
.tag.cat-post, .post-label.cat-post { background: #f3e5f5; color: #8e24aa; }

.date, .post-date { font-size: 0.85rem; color: #999; font-family: monospace; }
.news-title { font-size: 1.1rem; font-weight: bold; line-height: 1.4; color: #333; margin: 0; }

/* Course Grid */
.courses-section { background: #fffcf8; padding: 50px 0; margin-top: 50px; }
.course-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; }
.course-card { background: white; padding: 25px; border-radius: 16px; box-shadow: 0 4px 15px rgba(0,0,0,0.03); text-align: center; }
.course-icon { font-size: 3rem; margin-bottom: 10px; display: block; }


/* =========================================
   アーカイブページ (archive.php)
   ========================================= */
.page-title {
    font-size: 2rem;
    font-weight: 900;
    text-align: center;
    margin: 40px 0 60px;
    color: var(--text-color);
    position: relative;
}
.page-title::after {
    content: ""; display: block; width: 60px; height: 4px; background: var(--primary-color); margin: 15px auto 0; border-radius: 2px;
}

.archive-layout {
    display: grid; grid-template-columns: 1fr 300px;
    gap: 40px; margin-bottom: 80px;
}

/* 記事カード */
.archive-card {
    background: #fff; border-radius: 12px; overflow: hidden; margin-bottom: 30px;
    border: 1px solid #eee; transition: transform 0.3s, box-shadow 0.3s;
    height: 200px; /* 高さを揃える */
}
.archive-card:hover { transform: translateY(-5px); box-shadow: 0 10px 25px rgba(0,0,0,0.1); border-color: rgba(243, 152, 0, 0.3); }

.archive-card__link {
    display: flex; text-decoration: none; color: inherit; height: 100%;
}

/* サムネイル画像 */
.archive-card__thumb {
    width: 280px; height: 100%; flex-shrink: 0; background: #f9f9f9;
    position: relative; overflow: hidden;
    display: flex; align-items: center; justify-content: center;
}
.archive-card__thumb img {
    width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s;
}
.no-image {
    width: 100%; height: 100%; display: flex; align-items: center; justify-content: center;
    background: #f0f0f0; color: #ccc; font-weight: bold; font-size: 1.2rem;
}
.archive-card:hover .archive-card__thumb img { transform: scale(1.05); }

/* テキストエリア */
.archive-card__body {
    flex: 1; padding: 20px 25px; display: flex; flex-direction: column; justify-content: space-between;
}
.archive-card__meta { display: flex; align-items: center; gap: 15px; margin-bottom: 10px; }

.archive-card__title {
    font-size: 1.3rem; font-weight: bold; margin-bottom: 10px; line-height: 1.4; color: #333; transition: color 0.3s;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.archive-card:hover .archive-card__title { color: var(--primary-color); }

.archive-card__excerpt {
    font-size: 0.9rem; color: #666; line-height: 1.5;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.archive-card__more {
    font-size: 0.9rem; font-weight: bold; color: var(--primary-color); align-self: flex-end;
}

/* ページネーション */
.pagination { margin-top: 50px; text-align: center; }
.page-numbers {
    display: inline-block; padding: 10px 15px; margin: 0 5px;
    border: 1px solid #ddd; border-radius: 5px;
    text-decoration: none; color: #555; font-weight: bold; transition: 0.3s;
}
.page-numbers.current, .page-numbers:hover {
    background: var(--primary-color); color: #fff; border-color: var(--primary-color);
}

/* サイドバー */
.archive-sidebar .widget-title { font-size: 1.2rem; font-weight: bold; margin-bottom: 20px; padding-bottom: 10px; border-bottom: 2px solid var(--primary-color); }
.archive-sidebar ul { list-style: none; padding: 0; }
.archive-sidebar li { margin-bottom: 10px; border-bottom: 1px dotted #eee; padding-bottom: 10px; }
.archive-sidebar a { text-decoration: none; color: #444; transition: color 0.3s; }
.archive-sidebar a:hover { color: var(--primary-color); }

/* スマホ対応 */
@media (max-width: 850px) {
    .archive-layout { grid-template-columns: 1fr; }
    .archive-card { height: auto; }
    .archive-card__link { flex-direction: column; }
    .archive-card__thumb { width: 100%; height: 200px; }
    .archive-card__body { padding: 20px; }
    .archive-card__title { font-size: 1.2rem; }
}


/* =========================================
   Footer
   ========================================= */
footer { background: #333; color: white; padding: 40px 0; margin-top: 40px; font-size: 0.9rem; }
.footer-grid { display: grid; gap: 30px; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }
.footer-links-area h4 { color: white; margin-bottom: 15px; border-left: 3px solid var(--primary-color); padding-left: 10px; }
.footer-menu, .footer-links-area ul { list-style: none; padding: 0; margin: 0; }
.footer-menu li, .footer-links-area li { margin-bottom: 10px; }
.footer-menu a, .footer-links-area a { color: #ccc; text-decoration: none; }
.footer-menu a:hover, .footer-links-area a:hover { color: var(--primary-color); text-decoration: underline; }
.copyright { text-align: center; margin-top: 40px; color: #777; border-top: 1px solid #444; padding-top: 20px; }


/* =========================================
   説明会セクション
   ========================================= */
.session-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-bottom: 30px; }
.session-card {
    background: #fff; border: 1px solid #ddd; border-radius: 8px; padding: 20px;
    text-decoration: none; color: #333; transition: all 0.3s ease;
    display: flex; flex-direction: column; justify-content: space-between;
}
.session-card:hover { box-shadow: 0 5px 15px rgba(0,0,0,0.1); transform: translateY(-3px); border-color: var(--primary-color); }
.session-date-box { background: #f0f0f0; padding: 10px; text-align: center; border-radius: 4px; margin-bottom: 15px; }
.session-date-box .d-date { display: block; font-size: 1.2rem; font-weight: bold; color: #333; }
.session-date-box .d-time { display: block; font-size: 0.9rem; color: #666; }
.session-title { font-size: 1rem; margin: 0 0 15px; line-height: 1.4; font-weight: bold; }
.session-btn { display: block; text-align: right; font-size: 0.9rem; color: var(--primary-color); font-weight: bold; }
@media (max-width: 768px) { .session-grid { grid-template-columns: 1fr; } }


/* =========================================
   説明会アーカイブページ (archive-session.php)
   ========================================= */
.session-intro { display: flex; gap: 40px; margin-bottom: 60px; align-items: flex-start; }
.session-intro__body { flex: 1; }
.session-intro__image { width: 300px; flex-shrink: 0; }
.session-intro__image img { width: 100%; height: auto; border-radius: 12px; box-shadow: 0 4px 10px rgba(0,0,0,0.1); }
.session-intro__list { background: #f9f9f9; padding: 25px; border-radius: 12px; border: 1px solid #eee; }
.session-intro__list li { margin-bottom: 8px; font-size: 0.95rem; line-height: 1.6; }
.session-intro__list li:last-child { margin-bottom: 0; }
@media (max-width: 768px) {
    .session-intro { flex-direction: column-reverse; gap: 20px; }
    .session-intro__image { width: 100%; text-align: center; }
}

.session-schedule-section { margin-top: 60px; }
.section-title { font-size: 1.5rem; font-weight: 700; margin-bottom: 30px; border-left: 6px solid var(--primary-color); padding-left: 15px; }
.table-responsive { overflow-x: auto; }
.session-table { width: 100%; border-collapse: collapse; border-top: 2px solid var(--primary-color); }
.session-table tr { border-bottom: 1px solid #eee; background: #fff; transition: background 0.3s; }
.session-table tr:hover { background: #fffcf0; }
.session-table td { padding: 25px 20px; vertical-align: middle; }
.session-table__info { display: flex; gap: 30px; align-items: flex-start; }
.session-date { display: flex; flex-direction: column; align-items: center; background: #f0fdf4; padding: 15px; border-radius: 8px; min-width: 140px; text-align: center; color: var(--accent-color); }
.date-main { font-size: 1.2rem; font-weight: 900; line-height: 1; margin-bottom: 5px; }
.date-week { font-size: 0.9rem; font-weight: bold; }
.date-time { margin-top: 8px; font-size: 0.8rem; color: #666; border-top: 1px solid #ccebd4; padding-top: 5px; width: 100%; }
.session-detail { flex: 1; }
.session-name { display: block; font-size: 1.2rem; font-weight: 700; color: #333; margin-bottom: 8px; }
.session-catch { display: block; font-size: 0.95rem; color: var(--primary-dark); margin-bottom: 5px; }
.session-sub { display: block; font-size: 0.85rem; color: #777; }
.session-table__action { text-align: right; min-width: 160px; }
.session-table__action .btn-primary {
    background: linear-gradient(45deg, var(--primary-color), #ff9a44);
    color: #fff; padding: 12px 35px; border: none; border-radius: 50px;
    font-weight: 700; font-size: 1rem; cursor: pointer;
    box-shadow: 0 4px 15px rgba(243, 152, 0, 0.3); transition: all 0.3s ease;
    letter-spacing: 0.05em; display: inline-block;
}
.session-table__action .btn-primary:hover { transform: translateY(-3px); box-shadow: 0 8px 25px rgba(243, 152, 0, 0.5); background: linear-gradient(45deg, var(--primary-dark), #f39800); }
@media (max-width: 768px) {
    .session-table, .session-table tbody, .session-table tr, .session-table td { display: block; width: 100%; }
    .session-table__info { flex-direction: column; gap: 15px; }
    .session-date { width: 100%; flex-direction: row; justify-content: center; gap: 10px; min-width: auto; }
    .date-time { width: auto; border-top: none; padding-top: 0; margin-top: 0; border-left: 1px solid #ccc; padding-left: 10px; }
    .session-table__action { text-align: center; margin-top: 15px; padding-top: 0; }
    .session-table__action .btn-primary { width: 100%; }
}
.session-notes { background: #f4f4f4; padding: 20px; margin-top: 40px; border-radius: 8px; font-size: 0.85rem; color: #666; }


/* =========================================
   Contact Form 7
   ========================================= */
.contact-form-wrapper {
    background: #fff; padding: 40px; border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08); max-width: 800px; margin: 40px auto; font-family: var(--font-main);
}
.form-row { margin-bottom: 25px; }
.contact-form-wrapper label { display: block; font-weight: bold; color: #333; margin-bottom: 8px; font-size: 15px; }
.required { background: #ff4d4d; color: #fff; font-size: 11px; padding: 2px 6px; border-radius: 3px; margin-left: 8px; vertical-align: middle; }
.wpcf7 input[type="text"], .wpcf7 input[type="email"], .wpcf7 input[type="tel"], .wpcf7 input[type="date"], .wpcf7 textarea, .wpcf7 select {
    width: 100%; padding: 12px 15px; border: 1px solid #ddd; border-radius: 6px;
    background: #fdfdfd; font-size: 16px; box-sizing: border-box; transition: all 0.3s ease;
}
.wpcf7 input:focus, .wpcf7 textarea:focus, .wpcf7 select:focus {
    border-color: var(--primary-color); background: #fff;
    box-shadow: 0 0 0 3px rgba(243, 152, 0, 0.2); outline: none;
}
@media screen and (min-width: 600px) { .two-column, .three-column { display: flex; gap: 20px; } .column-item { flex: 1; } }
.form-section h3 { font-size: 18px; color: var(--primary-color); border-bottom: 2px solid #efefef; padding-bottom: 10px; margin-bottom: 20px; margin-top: 40px; }
.checkbox-group label { display: inline-block; margin-right: 15px; font-weight: normal !important; cursor: pointer; background: #f0f0f0; padding: 8px 15px; border-radius: 20px; transition: background 0.3s; margin-bottom: 10px; }
.checkbox-group label:hover { background: #e0e0e0; }
.submit-btn-area { text-align: center; margin-top: 40px; }
.wpcf7 input[type="submit"] {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: #fff; font-size: 18px; font-weight: bold; padding: 16px 60px;
    border: none; border-radius: 50px; cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s; box-shadow: 0 4px 15px rgba(243, 152, 0, 0.4); width: auto;
}
.wpcf7 input[type="submit"]:hover { transform: translateY(-3px); box-shadow: 0 8px 25px rgba(243, 152, 0, 0.5); }
@media screen and (max-width: 600px) { .contact-form-wrapper { padding: 20px; } .wpcf7 input[type="submit"] { width: 100%; } }
.term-text { color: #ff0000; font-weight: bold; font-size: 24px; line-height: 1.4; margin-top: 10px; margin-bottom: 25px; padding: 0 5px; }
@media screen and (max-width: 600px) { .term-text { font-size: 20px; } }


/* =========================================
   記事詳細ページ (Single Post)
   ========================================= */
body.single .l-container {
    max-width: 900px;
    margin: 0 auto; 
    padding: 0 20px;
}
.single-article {
    background: #fff; padding: 60px; border-radius: 16px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05); margin-bottom: 60px;
}
.single-article__header { margin-bottom: 50px; border-bottom: 1px solid #eee; padding-bottom: 30px; }
.single-article__meta { display: flex; align-items: center; gap: 15px; margin-bottom: 20px; flex-wrap: wrap; }
.single-article__title { font-size: 2rem; font-weight: 900; line-height: 1.4; color: #333; margin-bottom: 30px; }
.single-article__thumbnail img { width: 100%; height: auto; border-radius: 12px; margin-top: 20px; object-fit: cover; }

.single-article__content { font-size: 1rem; line-height: 1.8; color: #333; }
.single-article__content p { margin-bottom: 1.8em; }
.single-article__content h2 { font-size: 1.6rem; font-weight: bold; margin: 60px 0 30px; padding: 10px 15px; background: #fffcf0; border-left: 6px solid var(--primary-color); color: var(--text-color); }
.single-article__content h3 { font-size: 1.3rem; font-weight: bold; margin: 40px 0 20px; padding-bottom: 10px; border-bottom: 2px solid var(--primary-color); }
.single-article__content ul, .single-article__content ol { margin-bottom: 30px; background: #f9f9f9; padding: 20px 20px 20px 40px; border-radius: 8px; }
.single-article__content li { margin-bottom: 10px; }
.single-article__content img { max-width: 100%; height: auto; border-radius: 8px; margin: 20px 0; box-shadow: 0 4px 10px rgba(0,0,0,0.05); }

.post-navigation { display: flex; justify-content: space-between; align-items: center; margin-top: 60px; padding-top: 40px; flex-wrap: wrap; gap: 20px; }
.nav-prev a, .nav-next a { display: inline-block; color: #666; text-decoration: none; font-weight: bold; transition: 0.3s; }
.nav-prev a:hover, .nav-next a:hover { color: var(--primary-color); }
.btn-back { display: inline-block; padding: 12px 30px; border: 1px solid #ddd; border-radius: 50px; text-decoration: none; color: #666; font-weight: bold; transition: 0.3s; background: #fff; }
.btn-back:hover { background: var(--primary-color); color: #fff; border-color: var(--primary-color); }

@media (max-width: 768px) {
    .single-article { padding: 30px 20px; }
    .single-article__title { font-size: 1.5rem; }
    .single-article__content h2 { font-size: 1.3rem; }
    .post-navigation { flex-direction: column; text-align: center; }
    .nav-center { order: 3; margin-top: 20px; }
}