/*
Theme Name: Hoshigaoka Theme
Theme URI: 
Description: 星が丘公民館ウェブサイト用WordPressテーマ
Author: Antigravity
Author URI: 
Version: 1.0.0
*/

/* 既存CSSの読み込みは functions.php で行いますが、
   エディタスタイルなどで必要になる場合のためにここにもインポートを残すか、
   あるいはここにメインのスタイルを記述することも可能です。
   今回は functions.php で一括管理するため、ここはメタデータのみとします。
*/

/* Header Alignment */
.header-title {
    display: flex;
    width: 100%;
}

/* 左画像領域（75%） */
.header-left {
    width: 70%;
    max-width: 1200px;
    height: 110px;
    overflow: hidden;              /* はみ出しを隠す（右側がカットされる） */
    display: flex;
    justify-content: flex-start;    /* 左揃え */
}

/* 右画像領域（25%） */
.header-right {
    width: 30%;
    height: 65px;
    margin: 22.5px 0;                 /* 上下20px */
    overflow: hidden;               /* はみ出しを隠す（左側がカット） */
    display: flex;
    justify-content: flex-end;      /* 右揃え */
}

/* 画像の高さ固定 */
.header-left img {
    height: 110px;
    width: auto;
}

.header-right img {
    height: 65px;
    width: auto;
}

@media (max-width:768px) {
    .header-left{
        width:70%;
        height:50px;
        padding-top:20px;
    }
    .header-right{
        width:30%;
        height:30px;
        margin:20px 0;
    }

    .header-left img{ height:50px; }
    .header-right img{ height:30px; }
}


@media (max-width:377px) {
    .header-left{
        width:70%;
        height:40px;
        padding-top:20px;
    }
    .header-right{
        width:30%;
        height:25px;
        margin:17.5px 0;
    }

    .header-left img{ height:40px; }
    .header-right img{ height:25px; }
}



/* Section Titles */
.hpb-c-title {
    font-size: 1.5rem;
    border-bottom: 2px solid #ddd;
    padding-bottom: 10px;
    margin-bottom: 20px;
    font-weight: bold;
}

/* NEWS Section */
.news-list {
    margin-bottom: 40px;
}

.news-item {
    display: flex;
    align-items: center;
    padding: 15px;
    border: solid 1px #ddd; /* ボーダーを削除し、影のみで表現 */
    box-shadow: 1px 1px 3px rgba(0,0,0,0.1); 
    margin-bottom: 15px;
    border-radius: 8px;
    background: #fff;
    transition: all 0.3s ease;
    text-decoration: none !important;
    color: #333 !important;
}

.news-item:hover {
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
    transform: translateY(-2px);
    color: #333 !important;
}

.news-meta {
    min-width: 120px;
    margin-right: 15px;
    display: flex;
    flex-direction: column;
}

.news-date {
    font-weight: bold;
    color: #ff0000;
}

.news-cat {
    font-size: 0.9rem;
    color: #666;
    margin-top: 5px;
}

.news-content {
    display: flex;
    align-items: center;
    flex: 1;
}

.news-thumb {
    width: 96px;
    height: 64px;
    margin-right: 15px;
    overflow: hidden;
    background: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.news-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.news-title {
    font-size: 1.1rem;
    margin: 0;
    font-weight: bold;
}

/* INFORMATION Section */
.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.info-card {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    flex-direction: column;
}

.info-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.info-card-link:hover .info-card {
    transform: translateY(-3px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.info-card-link .info-card {
    height: 100%;
}

/* Special card for text only info */
.info-card-text-only {
    padding: 20px;
    background: #fff9f9;
    border-left: 5px solid #ff0000;
}

.info-card-text-only p {
    font-size: 0.95rem;
    line-height: 1.6;
    margin: 10px 0 0;
}

.info-card-img {
    height: 160px;
    overflow: hidden;
}

.info-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.info-card-body {
    padding: 15px;
}

.info-card-label {
    display: inline-block;
    background: #ff0000;
    color: #fff;
    font-size: 0.8rem;
    padding: 2px 8px;
    border-radius: 4px;
    margin-bottom: 8px;
}

.info-card-title {
    font-size: 1.1rem;
    margin: 0;
    font-weight: bold;
    line-height: 1.4;
}

/* Daily Schedule */
/* Daily Schedule */
.daily-info-card {
    position: relative;
    background: #fff;
    border: 1px solid #ddd;
    padding: 20px;
    margin-bottom: 20px;
    border-radius: 5px;
    height: 220px; /* 高さを固定 (または max-height) */
    display: flex;
    flex-direction: column;
}

.daily-schedule-box {
    margin-bottom: 10px;
    overflow-y: auto; /* コンテンツ部分だけスクロール */
    flex: 1; /* 余ったスペースを埋める */
}

.daily-date {
    font-size: 1.2rem;
    font-weight: bold;
    margin-bottom: 10px;
    color: #333;
}

.daily-title {
    font-size: 1.1rem;
    border-bottom: 2px solid #ff0000;
    padding-bottom: 5px;
    margin-bottom: 15px;
    display: inline-block;
}

.daily-content {
    font-size: 1rem;
    line-height: 1.6;
}

.daily-content p {
    margin-bottom: 10px;
}

.daily-info-card .logo {
    display: block;
    margin-top: 10px;
    max-width: 200px;
    flex-shrink: 0; /* ロゴは縮小しない */;
}

/* Pagination */
.news-pagination {
    margin-top: 30px;
    display: flex;
    justify-content: center;
}

.news-pagination .page-numbers {
    display: flex;
    justify-content: center;
    list-style: none;
    padding: 0;
    margin: 0;
    gap: 3px;
}

.news-pagination .page-numbers li {
    margin: 0;
}

.news-pagination .page-numbers a,
.news-pagination .page-numbers span {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: 1px solid #ddd !important; /* 強制的に実線にする */
    color: #333;
    text-decoration: none !important; /* 下線を消す */
    border-radius: 4px;
    transition: all 0.3s;
    font-size: 1rem;
    padding: 0;
    font-weight: normal;
    background-image: none !important; /* 背景画像（点線など）を消す */

}

.news-pagination .page-numbers a:hover,
.news-pagination .page-numbers span.current {
    background-color: #ff0000;
    color: #fff;
    border-color: #ff0000;
    border-bottom: 1px solid #ff0000;
}

/* Mobile Responsive Styles for NEWS */
@media (max-width: 768px) {
    .news-item {
        flex-wrap: wrap; /* Allow content to wrap */
        padding: 10px; /* Reduce padding to save space */
    }
    
    .news-meta {
        width: 100%; /* Full width for meta area */
        margin-right: 0;
        margin-bottom: 5px; /* Reduce space below meta */
        flex-direction: row; /* Keep date and cat side-by-side */
        align-items: center;
    }

    .news-date {
        margin-right: 10px; /* Reduce spacing */
        font-size: 0.9rem; /* Slightly smaller date */
    }

    .news-cat {
        margin-top: 0; /* Reset margin */
        font-size: 0.8rem; /* Slightly smaller category */
    }
    
    .news-content {
        width: 100%; /* Full width for content */
    }

    .news-thumb {
        width: 80px; /* Slightly smaller thumb if needed, or keep same */
        height: 54px;
        margin-right: 10px; /* Reduce margin to text */
    }

    .news-title {
        font-size: 1.0rem; /* Reduce font size */
        line-height: 1.4;
    }

    /* Pagination adjustments for mobile */
    .news-pagination .page-numbers {
        gap: 3px; /* Reduce gap */
        flex-wrap: wrap; /* Allow wrapping if needed */
    }

    .news-pagination .page-numbers a,
    .news-pagination .page-numbers span {
        width: 30px; /* Smaller button size */
        height: 30px;
        font-size: 0.9rem; /* Smaller font */
    }
}

.wp-block-flexible-table-block-table table {
  width: 100%;
  max-width: 600px;
}

.wp-block-flexible-table-block-table td {
  word-break: break-word;
  overflow-wrap: break-word;
}