/* 黎翔会ウェブサイト カスタムCSS */

/* =====================================
   基本設定
===================================== */
:root {
    --primary-color: #1e3a5f;     /* 深いネイビー */
    --secondary-color: #2d5016;   /* 深緑 */
    --accent-color: #c9302c;      /* アクセントカラー（赤） */
    --text-color: #333333;
    --light-gray: #f8f9fa;
    --border-color: #dee2e6;
    --font-primary: 'Noto Sans JP', sans-serif;
    --font-secondary: 'Noto Serif JP', serif;
}

body {
    font-family: var(--font-primary);
    color: var(--text-color);
    line-height: 1.7;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-secondary);
    font-weight: 700;
    color: var(--primary-color);
}

/* =====================================
   ヘッダー
===================================== */
.reishoukai-header .navbar-brand h1 {
    font-family: var(--font-secondary);
    letter-spacing: 0.1em;
}

.reishoukai-header .navbar {
    border-bottom: 3px solid var(--primary-color);
}

.reishoukai-header .nav-link {
    font-weight: 500;
    color: var(--text-color);
    padding: 0.5rem 1rem;
    transition: all 0.3s ease;
}

.reishoukai-header .nav-link:hover {
    color: var(--primary-color);
    background-color: var(--light-gray);
}

.reishoukai-header .nav-link.active {
    color: var(--primary-color);
    border-bottom: 3px solid var(--primary-color);
}

/* ヘッダー上部バーのレスポンシブ対応 */
.top-bar {
    font-size: 0.85rem;
}

.top-bar small {
    display: block;
    margin-bottom: 0.25rem;
}

/* ナビゲーションのレスポンシブ対応 */
.navbar-brand {
    padding: 0.5rem 0;
}

.navbar-brand h1 {
    font-size: 1.5rem;
    margin-bottom: 0;
}

.navbar-brand small {
    font-size: 0.7rem;
}

.navbar-toggler {
    border: none;
    padding: 0.25rem 0.5rem;
}

.navbar-toggler:focus {
    box-shadow: 0 0 0 0.2rem rgba(30, 58, 95, 0.25);
}

.dropdown-menu {
    border: 1px solid var(--border-color);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.dropdown-item {
    padding: 0.5rem 1rem;
    transition: all 0.2s ease;
}

.dropdown-item:hover {
    background-color: var(--light-gray);
    color: var(--primary-color);
}

/* =====================================
   メインビジュアル
===================================== */
.hero-section {
    background: linear-gradient(135deg, rgba(30, 58, 95, 0.9), rgba(45, 80, 22, 0.9));
    color: white;
    padding: 100px 0;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url('../images/school-bg.jpg');
    background-size: cover;
    background-position: center;
    opacity: 0.3;
    z-index: -1;
}

.hero-content h1 {
    font-size: 3rem;
    color: white;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
    margin-bottom: 1rem;
}

.hero-content .motto {
    font-size: 1.5rem;
    font-family: var(--font-secondary);
    letter-spacing: 0.2em;
}

/* =====================================
   セクション共通
===================================== */
.section-title {
    position: relative;
    padding-bottom: 1rem;
    margin-bottom: 3rem;
    text-align: center;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background-color: var(--primary-color);
}

.page-header {
    background-color: var(--light-gray);
    padding: 60px 0 40px;
    margin-bottom: 3rem;
    border-bottom: 1px solid var(--border-color);
}

/* ページコンテンツの下部マージン */
.main-content {
    margin-bottom: 4rem;
    padding-bottom: 4rem;
    min-height: calc(100vh - 400px); /* フッターとの重複を防ぐ */
}

/* フォームページ専用の追加余白 */
.form-page {
    margin-bottom: 6rem;
    padding-bottom: 6rem;
}

/* aboutページ専用の余白調整 */
.about-page .main-content {
    margin-bottom: 6rem;
    padding-bottom: 6rem;
}

/* =====================================
   カード
===================================== */
.custom-card {
    border: none;
    box-shadow: 0 2px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%;
}

/* ニュースカード専用のスタイル */
.news-card {
    border: none;
    box-shadow: 0 1px 8px rgba(0,0,0,0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    margin-bottom: 1.5rem;
}

.news-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 3px 15px rgba(0,0,0,0.12);
}

.news-card .card-body {
    padding: 1.5rem;
}

/* カテゴリーフィルターボタン */
.category-filter {
    padding: 0.75rem;
    margin-bottom: 1.5rem;
    height: auto !important; /* サイドバーの高さに影響されないよう独立 */
}

/* サイドバーカード専用のスタイル */
.sidebar-card {
    border: none;
    box-shadow: 0 2px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: auto !important; /* 自動の高さ */
    margin-bottom: 1.5rem;
}

.sidebar-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

.sidebar-card .card-header {
    background-color: var(--primary-color);
    color: white;
    font-weight: 600;
}

.sidebar-card .card-body {
    color: var(--text-color);
}

.sidebar-card .sidebar-link {
    color: var(--text-color);
    transition: color 0.3s ease;
}

.sidebar-card .sidebar-link:hover {
    color: var(--primary-color);
}

.sidebar-card .list-group-item {
    color: var(--text-color) !important;
    border-color: var(--border-color);
}

.sidebar-card .list-group-item:hover {
    background-color: var(--light-gray) !important;
    color: var(--primary-color) !important;
}

.sidebar-card .list-group-item a {
    color: var(--text-color) !important;
    text-decoration: none;
}

.sidebar-card .list-group-item:hover a {
    color: var(--primary-color) !important;
}

/* お知らせコンテンツのスタイル */
.news-content {
    color: var(--text-color) !important;
    line-height: 1.8;
}

.news-content strong.text-danger {
    color: #dc3545 !important;
    font-weight: 700;
}

.btn-category {
    background-color: transparent;
    border: 1px solid var(--secondary-color);
    color: var(--secondary-color);
    padding: 0.4rem 1rem;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
    margin: 0.2rem;
}

.btn-category:hover {
    background-color: var(--secondary-color);
    border-color: var(--secondary-color);
    color: white;
    transform: translateY(-1px);
}

.btn-category.active {
    background-color: var(--secondary-color);
    border-color: var(--secondary-color);
    color: white;
}

.btn-category.active:hover {
    background-color: #1e3e11;
    border-color: #1e3e11;
}

.custom-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 25px rgba(0,0,0,0.15);
}

.custom-card .card-header {
    background-color: var(--primary-color);
    color: white;
    font-weight: 600;
}

/* =====================================
   ボタン
===================================== */
.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    font-weight: 500;
    padding: 0.5rem 2rem;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background-color: #153049;
    border-color: #153049;
    transform: translateY(-2px);
}

.btn-secondary {
    background-color: var(--secondary-color);
    border-color: var(--secondary-color);
}

.btn-secondary:hover {
    background-color: #234012;
    border-color: #234012;
}

/* =====================================
   フォーム
===================================== */
.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(30, 58, 95, 0.25);
}

.form-label {
    font-weight: 600;
    color: var(--primary-color);
}

.required-mark {
    color: var(--accent-color);
    font-weight: bold;
}

/* フォームのレスポンシブ対応 */
.form-page .container {
    padding-left: 15px;
    padding-right: 15px;
}

@media (max-width: 767.98px) {
    .form-page .col-lg-8 {
        padding-left: 0;
        padding-right: 0;
    }
    
    .form-page .card-body {
        padding: 1rem;
    }
    
    .input-group {
        flex-wrap: wrap;
    }
    
    .input-group .form-control {
        min-width: 120px;
    }
}

/* =====================================
   テーブル
===================================== */
.table-custom {
    border-top: 3px solid var(--primary-color);
}

.table-custom thead {
    background-color: var(--light-gray);
}

.table-custom th {
    font-weight: 600;
    color: var(--primary-color);
    border-bottom: 2px solid var(--border-color);
}

/* =====================================
   お知らせ・活動報告
===================================== */
.news-item {
    padding: 1.5rem 0;
    border-bottom: 1px solid var(--border-color);
}

.news-item:last-child {
    border-bottom: none;
}

.news-date {
    font-size: 0.9rem;
    color: #6c757d;
}

.news-category {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    font-size: 0.8rem;
    border-radius: 20px;
    margin-left: 0.5rem;
}

.category-general { background-color: #e3f2fd; color: #1976d2; }
.category-meeting { background-color: #f3e5f5; color: #7b1fa2; }
.category-event { background-color: #e8f5e9; color: #388e3c; }
.category-class { background-color: #fff3e0; color: #f57c00; }

/* =====================================
   フッター
===================================== */
.reishoukai-footer {
    margin-top: auto;
    position: relative;
    z-index: 10;
    background-color: var(--primary-color);
    color: white;
    padding: 3rem 0 2rem;
    width: 100%;
}

.reishoukai-footer h5 {
    color: white;
    font-family: var(--font-secondary);
    border-bottom: 2px solid rgba(255,255,255,0.3);
    padding-bottom: 0.5rem;
    margin-bottom: 1rem;
}

/* =====================================
   ページトップボタン
===================================== */
#back-to-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

/* =====================================
   レスポンシブ対応
===================================== */

/* タブレット対応（Bootstrap lg ブレークポイント） */
@media (max-width: 991.98px) {
    /* ヘッダーのタブレット対応 */
    .top-bar small {
        font-size: 0.8rem;
    }
    
    .navbar-brand h1 {
        font-size: 1.35rem;
    }
    
    .hero-section {
        padding: 80px 0;
    }
    
    .hero-content h1 {
        font-size: 2.5rem;
    }
    
    .hero-content .motto {
        font-size: 1.3rem;
    }
    
    .hero-content .btn {
        margin: 0.5rem 0.5rem;
    }
    
    .page-header {
        padding: 40px 0 30px;
        margin-bottom: 2rem;
    }
    
    .main-content {
        margin-bottom: 6rem;
        padding-bottom: 3rem;
    }
    
    /* カードの余白調整 */
    .custom-card {
        margin-bottom: 1.5rem;
    }
    
    .custom-card .card-body.p-5 {
        padding: 2rem !important;
    }
    
    /* ニュースカードの調整 */
    .news-card .card-body {
        padding: 1rem;
    }
    
    /* ニュース項目の調整 */
    .news-item .col-md-3 {
        margin-bottom: 0.75rem;
    }
    
    /* フッターの調整 */
    .reishoukai-footer .col-lg-4 {
        margin-bottom: 2rem;
    }
}

/* スマートフォン対応（Bootstrap md ブレークポイント） */
@media (max-width: 767.98px) {
    /* ヘッダーの調整 */
    .top-bar {
        padding: 0.5rem 0;
    }
    
    .top-bar .container {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }
    
    .top-bar small {
        font-size: 0.75rem;
        line-height: 1.4;
    }
    
    .navbar-brand h1 {
        font-size: 1.25rem;
    }
    
    .navbar-brand small {
        font-size: 0.65rem;
    }
    
    .navbar-nav {
        padding-top: 1rem;
    }
    
    .nav-link {
        padding: 0.75rem 1rem;
        border-bottom: 1px solid var(--light-gray);
    }
    
    .nav-link.active {
        border-bottom: 3px solid var(--primary-color);
        background-color: var(--light-gray);
    }
    
    .dropdown-menu {
        border: none;
        box-shadow: none;
        background-color: var(--light-gray);
        margin-left: 1rem;
        padding-left: 0;
    }
    
    .dropdown-item {
        padding: 0.75rem 1rem;
    }
    
    .hero-section {
        padding: 60px 0;
    }
    
    .hero-content h1 {
        font-size: 2rem;
    }
    
    .hero-content .motto {
        font-size: 1.1rem;
        letter-spacing: 0.1em;
    }
    
    .hero-content .lead {
        font-size: 1rem;
    }
    
    .hero-content .btn {
        margin: 0.5rem 0.25rem;
        font-size: 0.9rem;
        padding: 0.75rem 1.5rem;
    }
    
    .section-title {
        font-size: 1.5rem;
        margin-bottom: 2rem;
    }
    
    /* ページヘッダーの調整 */
    .page-header {
        padding: 30px 0 20px;
        margin-bottom: 1.5rem;
    }
    
    .page-header h1 {
        font-size: 1.75rem;
    }
    
    /* ナビゲーション（パンくず）の調整 */
    .breadcrumb {
        font-size: 0.9rem;
        margin-bottom: 0;
    }
    
    /* カード内のパディング調整 */
    .card-body {
        padding: 1rem;
    }
    
    .custom-card .card-body {
        padding: 1.5rem 1rem;
    }
    
    .custom-card .card-body.p-5 {
        padding: 1.5rem !important;
    }
    
    /* ニュース表示の調整 */
    .news-item {
        padding: 1rem 0;
    }
    
    .news-item .row {
        flex-direction: column;
    }
    
    .news-item .col-md-3 {
        margin-bottom: 0.75rem;
        text-align: left;
    }
    
    .news-date {
        font-size: 0.8rem;
        margin-bottom: 0.5rem;
        display: block;
    }
    
    .news-category {
        font-size: 0.7rem;
        padding: 0.2rem 0.5rem;
        margin-left: 0;
    }
    
    /* ボタンの調整 */
    .btn {
        padding: 0.75rem 1.5rem;
        font-size: 0.9rem;
        min-height: 44px;
    }
    
    .btn-lg {
        padding: 1rem 2rem;
        font-size: 1rem;
    }
    
    .btn-sm {
        padding: 0.5rem 1rem;
        font-size: 0.8rem;
    }
    
    /* カテゴリーフィルターボタン */
    .btn-category {
        margin: 0.2rem;
        padding: 0.5rem 0.8rem;
        font-size: 0.85rem;
    }
    
    /* フォーム要素の調整 */
    .form-control, .form-select {
        font-size: 16px; /* iOS zoomを防ぐ */
        padding: 0.75rem;
        min-height: 44px;
    }
    
    .form-label {
        font-size: 0.9rem;
        font-weight: 600;
        margin-bottom: 0.5rem;
    }
    
    .input-group {
        flex-wrap: wrap;
    }
    
    .input-group-text {
        font-size: 0.9rem;
        padding: 0.75rem;
    }
    
    /* テーブルの調整 */
    .table-responsive {
        font-size: 0.85rem;
        border: 1px solid var(--border-color);
        border-radius: 0.375rem;
    }
    
    .table-custom th,
    .table-custom td {
        padding: 0.75rem 0.5rem;
        white-space: nowrap;
    }
    
    /* サイドバーの調整 */
    .sidebar-card {
        margin-bottom: 1rem;
    }
    
    .sidebar-card .card-header {
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
    }
    
    .sidebar-card .card-body {
        padding: 0.75rem 1rem;
    }
    
    /* フッターの調整 */
    .reishoukai-footer {
        padding: 2rem 0 1.5rem;
    }
    
    .reishoukai-footer .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    .reishoukai-footer h5 {
        font-size: 1rem;
        margin-bottom: 0.75rem;
    }
    
    .reishoukai-footer .col-lg-4,
    .reishoukai-footer .col-md-6 {
        margin-bottom: 1.5rem;
    }
    
    .copyright-bar {
        padding: 1rem 0;
    }
    
    .copyright-bar .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    .copyright-bar small {
        font-size: 0.75rem;
        display: block;
        margin-bottom: 0.5rem;
    }
    
    /* 戻るボタンの調整 */
    #back-to-top {
        width: 45px;
        height: 45px;
        bottom: 15px;
        right: 15px;
        font-size: 1.2rem;
    }
    
    /* コンテンツリンクカードの調整 */
    .row.g-4 > [class*="col-"] {
        margin-bottom: 1rem;
    }
}

/* 小画面対応（Bootstrap sm ブレークポイント） */
@media (max-width: 575.98px) {
    /* ヘッダーの超小画面対応 */
    .top-bar {
        padding: 0.5rem 0;
    }
    
    .top-bar small {
        font-size: 0.7rem;
        line-height: 1.5;
    }
    
    .navbar-brand h1 {
        font-size: 1.1rem;
    }
    
    .navbar-brand small {
        font-size: 0.6rem;
    }
    
    .hero-section {
        padding: 40px 0;
    }
    
    .hero-content h1 {
        font-size: 1.5rem;
        margin-bottom: 0.75rem;
    }
    
    .hero-content .lead {
        font-size: 0.95rem;
        margin-bottom: 0.75rem;
    }
    
    .hero-content .motto {
        font-size: 1rem;
        margin-bottom: 1.5rem;
    }
    
    .hero-content .btn {
        display: block;
        width: 100%;
        margin: 0.5rem 0;
        padding: 0.875rem 1.5rem;
    }
    
    .section-title {
        font-size: 1.25rem;
        margin-bottom: 1.5rem;
    }
    
    /* ページ余白の調整 */
    .py-5 {
        padding-top: 2rem !important;
        padding-bottom: 2rem !important;
    }
    
    /* カードの調整 */
    .card-body {
        padding: 0.75rem;
    }
    
    .custom-card .card-body {
        padding: 1rem 0.75rem;
    }
    
    .custom-card .card-body.p-4 {
        padding: 1rem !important;
    }
    
    .custom-card .card-body.p-5 {
        padding: 1rem !important;
    }
    
    /* ニュース項目の調整 */
    .news-item {
        padding: 1rem 0;
    }
    
    .news-item .row {
        text-align: left;
    }
    
    .news-item .col-md-3 {
        margin-bottom: 0.5rem;
    }
    
    .news-item h5 {
        font-size: 1rem;
        margin-bottom: 0.5rem;
    }
    
    .news-item p {
        font-size: 0.9rem;
    }
    
    /* ボタンのモバイル最適化 */
    .btn {
        min-height: 44px; /* タッチ操作に適したサイズ */
        width: 100%;
        margin-bottom: 0.5rem;
        font-size: 0.9rem;
    }
    
    .btn-group .btn {
        width: auto;
        margin-bottom: 0;
    }
    
    .btn-group {
        width: 100%;
        display: flex;
        flex-direction: column;
    }
    
    .btn-group .btn {
        width: 100%;
        margin-bottom: 0.5rem;
    }
    
    /* パンくずナビの非表示 */
    .breadcrumb {
        display: none;
    }
    
    /* フォームの調整 */
    .form-control, .form-select {
        font-size: 16px; /* iOS zoom防止 */
        min-height: 44px;
        padding: 0.75rem;
    }
    
    .form-label {
        font-size: 0.9rem;
        margin-bottom: 0.5rem;
    }
    
    .input-group {
        flex-direction: column;
    }
    
    .input-group .form-control {
        border-radius: 0.375rem;
        margin-bottom: 0.5rem;
    }
    
    .input-group-text {
        border-radius: 0.375rem;
        margin-bottom: 0.5rem;
        width: 100%;
        justify-content: center;
    }
    
    /* テーブルのスクロール */
    .table-responsive {
        border: 1px solid var(--border-color);
        border-radius: 0.375rem;
        font-size: 0.8rem;
    }
    
    .table-custom th,
    .table-custom td {
        padding: 0.5rem 0.25rem;
        font-size: 0.8rem;
    }
    
    /* サイドバーを下に移動（スマートフォンサイズのみ） */
    .row > .col-lg-3,
    .row > .col-lg-4 {
        order: 2;
        margin-top: 2rem;
    }
    
    .row > .col-lg-9,
    .row > .col-lg-8 {
        order: 1;
    }
    
    /* フッターの超小画面対応 */
    .reishoukai-footer {
        padding: 1.5rem 0 1rem;
    }
    
    .reishoukai-footer h5 {
        font-size: 0.95rem;
    }
    
    .reishoukai-footer .small {
        font-size: 0.8rem;
    }
    
    .copyright-bar {
        padding: 0.75rem 0;
    }
    
    .copyright-bar small {
        font-size: 0.7rem;
        text-align: center;
    }
    
    /* コンテンツリンクカードの調整 */
    .row.g-4 > [class*="col-"] {
        margin-bottom: 1rem;
    }
    
    /* アイコンのサイズ調整 */
    .fs-1 {
        font-size: 2.5rem !important;
    }
    
    /* 戻るボタンの調整 */
    #back-to-top {
        width: 40px;
        height: 40px;
        bottom: 10px;
        right: 10px;
        font-size: 1rem;
    }
}

/* =====================================
   デスクトップサイズでのサイドバー位置リセット
===================================== */
@media (min-width: 992px) {
    /* デスクトップサイズではorderをリセットしてサイドバーを右側に配置 */
    .container.main-content > .row {
        flex-wrap: nowrap;
        align-items: flex-start;
    }
    
    .container.main-content > .row > .col-lg-3,
    .container.main-content > .row > .col-lg-4,
    .container.main-content > .row > .col-lg-9,
    .container.main-content > .row > .col-lg-8,
    .container.main-content > .row .col-lg-3,
    .container.main-content > .row .col-lg-4,
    .container.main-content > .row .col-lg-9,
    .container.main-content > .row .col-lg-8 {
        order: 0 !important;
        margin-top: 0 !important;
    }
    
    .container.main-content > .row > .col-lg-3,
    .container.main-content > .row > .col-lg-4 {
        align-self: flex-start;
    }
    
    /* カード内のrowはwrapを維持 */
    .card .row,
    .card-body .row {
        flex-wrap: wrap !important;
    }
}

/* =====================================
   アニメーション
===================================== */
.fade-in {
    animation: fadeIn 0.6s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* =====================================
   ユーティリティ
===================================== */
.text-primary-custom {
    color: var(--primary-color) !important;
}

.bg-primary-custom {
    background-color: var(--primary-color) !important;
}

.border-primary-custom {
    border-color: var(--primary-color) !important;
} 