/*
Theme Name: mikado Child Theme
Template:mikado_tcd071
*/

/* ========================================
   全体設定と共通コンポーネント
   ======================================== */

/* --- 全体的な基本設定 --- */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: #333;
    line-height: 1.6;
    background-color: #fff;
    
    /* bodyにFlexboxを適用し、子要素（ヘッダー、メイン、フッター）を縦に並べる */
    display: flex;
    flex-direction: column;
    min-height: 100vh; /* 画面いっぱいの高さを確保 */
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.content-area {
    max-width: 1000px;
    margin: 40px auto;
    padding: 0 20px;
    border-radius: 8px;
    background-color: #fff;
}
.church-page-intro {
    text-align: center;
    padding: 60px 0 40px;
    margin-bottom: 40px;
}
.page-main-title {
    font-size: 2.4em;
    font-weight: 700;
    color: #333;
    margin-bottom: 15px;
}
.page-description {
    font-size: 1em;
    color: #555;
    line-height: 1.8;
    max-width: 700px;
    margin: 0 auto;
}
.section-heading {
    font-size: 2em;
    font-weight: 600;
    color: #333;
    text-align: center;
    margin-bottom: 40px;
    position: relative;
    padding-bottom: 15px;
}
.section-heading::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background-color: #007bff;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    bottom: 0;
}

/* --- ボタン共通スタイル --- */
.download-button-link,
.view-all-button-container {
    text-decoration: none;
    flex-shrink: 0;
    width: 120px;
    text-align: right;
}
.file-download-button,
.view-all-button {
    background-color: #007bff;
    color: white;
    border: none;
    padding: 8px 18px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.7em;
    font-weight: bold;
    transition: background-color 0.2s ease, transform 0.1s ease;
    width: 100%;
}
.file-download-button:hover,
.view-all-button:hover {
    background-color: #0056b3;
    transform: translateY(-1px);
}
.view-all-button-container {
    text-align: center;
    margin-top: 2rem;
    width: auto;
}
.view-all-button {
    width: auto;
    padding: 10px 20px;
    font-size: 0.9em;
}

/* ========================================
   お知らせセクション
   ======================================== */

.news-section-main {
    padding: 40px 0;
    margin-bottom: 40px;
}
.news-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 25px;
    justify-content: flex-start;
}
.news-card {
    flex: 0 0 calc(33.333% - 16.666px);
    background-color: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.news-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
}
.news-thumbnail {
    width: 100%;
    height: 150px;
    background-color: #f0f0f0;
    display: block;
    overflow: hidden;
}
.news-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.news-thumbnail-placeholder {
    width: 100%;
    height: 150px;
    background-color: #e0e0e0;
    border-bottom: 1px solid #ddd;
}
.news-card-content {
    padding: 15px;
}
.news-card-date {
    display: block;
    font-size: 0.85em;
    color: #888;
    margin-bottom: 8px;
}
.news-card-title {
    font-size: 0.9em;
    font-weight: 600;
    line-height: 1.4;
    margin: 0;
}
.news-card-title a {
    text-decoration: none;
    color: #333;
    transition: color 0.2s ease;
}
.news-card-title a:hover {
    color: #007bff;
}

/* ========================================
   資料共有セクション
   ======================================== */

.files-section-main {
    padding: 40px 0;
}
.files-list-container {
    background-color: #f9f9f9;
    border: 1px solid #eee;
    border-radius: 8px;
    padding: 20px;
}
.file-row {
    display: flex;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #eee;
}
.file-row:last-child {
    border-bottom: none;
}
.file-row-date {
    font-size: 0.9em;
    color: #888;
    min-width: 70px;
    margin-right: 15px;
    flex-shrink: 0;
}
.file-row-title {
    flex-grow: 1;
    font-size: 1em;
    color: #333;
    font-weight: 500;
    word-break: break-all;
    margin-right: 15px;
}




/* ========================================
   ログインページ
   ======================================== */


/* ログインボックスのコンテナ */
.custom-login-container {
    width: 100%;
    max-width: 360px;  
    text-align: center;
    margin-left: auto;
    margin-right: auto;
     margin-top: 2rem; /* ヘッダーとの間に適切な余白を追加 */
}

/* ログインページの注意事項のスタイル */
.login-note {
    font-size: 0.8rem; /* フォントサイズを小さくする */
    color: #555;      /* 少し薄い色にすると、より注意書きらしくなります */
    margin-top: -1rem; /* ログインタイトルとの距離を詰める */
    margin-bottom: 1.5rem; /* 次の要素との間に適切なスペースを確保 */
    line-height: 1.5; /* 行の高さを調整して読みやすくする */

}


/* ログインボックス本体 */
.login-box {
    background: #ffffff;
    padding: 2rem;
    border-radius: 16px;
    box-shadow: 0 12px 25px rgba(0, 0, 0, 0.1);
    text-align: center;
}

/* タイトル「ログイン」のスタイル */
.login-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 2rem;
}

/* ログイン失敗メッセージのスタイル */
.login-error {
    color: #e74c3c;
    background-color: #fde8e8;
    border: 1px solid #e74c3c;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1.5rem;
    font-weight: 500;
    font-size: 0.7rem;
}

/* フォームの段落 */
#custom-login-form p {
    margin-bottom: 1rem;
}

/* ラベルのスタイル */
#custom-login-form label {
    display: block;
    text-align: left;
    font-size: 0.8rem;
    color: #7f8c8d;
    margin-bottom: 0.5rem;
}

/* 入力フィールドのスタイル */
#custom-login-form .input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #bdc3c7;
    border-radius: 8px;
    box-sizing: border-box;
    font-size: 0.9rem;
    transition: border-color 0.3s, box-shadow 0.3s;
}

/* 入力フィールドがフォーカスされたときのスタイル */
#custom-login-form .input:focus {
    border-color: #3498db;
    outline: none;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.2);
}

/* ログインボタンのコンテナ */
.login-submit {
    margin-top: 2rem;
}

/* ログインボタンのスタイル */
#login-submit {
    width: 100%;
    padding: 1rem;
    font-size: 1rem;
    font-weight: 700;
    color: #fff;
    background-color: #3498db;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

/* ボタンにマウスが乗ったときのスタイル */
#login-submit:hover {
    background-color: #2980b9;
    transform: translateY(-2px);
}












/* ========================================
   スマートフォン表示時の調整
   ======================================== */

@media (max-width: 600px) {
    .content-area {
        padding: 0 10px;
    }
    .page-main-title {
        font-size: 2em;
    }
    .page-description {
        font-size: 0.9em;
    }
    .section-heading {
        font-size: 1.5em;
    }
    .news-grid {
        display: flex;
        flex-direction: column;
        gap: 20px;
    }
    .news-card {
        flex: 0 0 100%;
        margin: 0;
    }
    .file-row {
        flex-wrap: wrap;
        padding: 10px 0;
    }
    .file-row-date {
        flex-basis: 100%;
        margin-bottom: 5px;
    }
    .file-row-title {
        flex-basis: calc(100% - 100px);
    }
    .download-button-link {
        margin-left: 0;
    }
    .login-box {
        padding: 1.5rem;
    }
}

/* ========================================
   カテゴリーボタンの共通スタイル
   ======================================== */
.news-categories-filter,
.file-categories-filter {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin: 20px auto;
}
.news-categories-filter .filter-button,
.file-categories-filter .filter-button {
    padding: 10px 20px;
    border: 1px solid #e0e0e0;
    background-color: #f9f9f9;
    color: #555;
    border-radius: 5px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s ease;
}
.news-categories-filter .filter-button.active,
.file-categories-filter .filter-button.active {
    background-color: #007bff;
    color: white;
    border-color: #007bff;
}
/* ホバー時のスタイル */
.news-categories-filter .filter-button:hover,
.file-categories-filter .filter-button:hover {
    background-color: #e0e0e0;
}

/* ========================================
   ファイルごとのカテゴリ表示
   ======================================== */
.file-row {
    /* Flexboxの基本設定 */
    display: flex;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #eee;
}
.file-row-content {
    flex-grow: 1;
    margin-left: 15px; /* 日付との間にスペース */
}
.file-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-bottom: 8px;
}
.file-tag {
    background-color: #e3f2fd;
    color: #1a237e;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8em;
    font-weight: bold;
}

/* モバイル表示の調整 */
@media (max-width: 600px) {
    .file-categories-filter {
        justify-content: flex-start;
        overflow-x: auto;
        white-space: nowrap;
        padding-bottom: 10px;
        -webkit-overflow-scrolling: touch;
    }
    .file-categories-filter::-webkit-scrollbar {
        display: none;
    }
    .file-categories-filter button {
        flex-shrink: 0;
    }
    .file-row {
        flex-wrap: wrap;
    }
    .file-row-date {
        flex-basis: 100%;
        margin-bottom: 5px;
    }
    .file-row-content {
        margin-left: 0;
        flex-basis: 100%;
        order: 1;
    }
    .download-button-link {
        order: 2;
        width: auto;
        margin-left: auto;
    }
}