/* Google Fonts Import */
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+JP:wght@300;400;500;700&display=swap');

/* ページネーション用スタイル */
.pagination-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 40px 0;
    padding: 20px 0;
}

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
}

.pagination-list {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 8px;
    align-items: center;
}

.pagination-item {
    display: flex;
    align-items: center;
}

.pagination a,
.pagination .current {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    height: 44px;
    padding: 8px 12px;
    text-decoration: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
    border: 1px solid rgba(142, 238, 231, 0.3);
    background: rgba(255, 255, 255, 0.9);
    color: #5fd4cd;
}

.pagination .current {
    background: linear-gradient(135deg, #8eeee7 0%, #5fd4cd 100%);
    color: white;
    border-color: transparent;
    box-shadow: 0 2px 8px rgba(142, 238, 231, 0.3);
    font-weight: 600;
}

.pagination a:hover {
    background: rgba(142, 238, 231, 0.15);
    border-color: #8eeee7;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(142, 238, 231, 0.2);
    color: #5fd4cd;
}

.pagination .nav-arrow {
    font-size: 1.1rem;
    margin: 0 3px;
}

.pagination .nav-text {
    font-size: 0.85rem;
    white-space: nowrap;
}

.pagination .dots {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    height: 44px;
    color: #90a4ae;
    font-weight: 500;
    cursor: default;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.bbs-archive-container {
    font-family: 'Noto Sans JP', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Hiragino Sans', sans-serif;
    /* 背景はheader.phpで設定された全ページ共通の背景を使用 */
    min-height: 100vh;
    padding: 60px 0 80px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ヒーローセクション */
.hero-section {
    text-align: center;
    margin-bottom: 60px;
    padding: 40px;
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 4px 20px rgba(142, 238, 231, 0.06);
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #8eeee7 0%, #5fd4cd 100%);
}

.page-title {
    font-size: 3rem;
    font-weight: 300;
    letter-spacing: 0.05em;
    margin-bottom: 15px;
    color: #2c3e50;
    position: relative;
    animation: fadeInDown 0.8s ease-out;
}

.page-title::after {
    content: '';
    display: block;
    width: 120px;
    height: 3px;
    background: linear-gradient(90deg, #8eeee7 0%, #5fd4cd 100%);
    margin: 25px auto 0;
    border-radius: 2px;
    animation: expandWidth 0.8s ease-out 0.3s both;
}

.page-subtitle {
    text-align: center;
    margin-bottom: 25px;
    animation: fadeInUp 0.8s ease-out 0.2s both;
    opacity: 0;
    position: relative;
}

.subtitle-text {
    color: #5fd4cd;
    font-size: 1.1rem;
    font-weight: 400;
    letter-spacing: 0.02em;
    line-height: 1.4;
    position: relative;
    padding: 15px 40px;
    background: rgba(248, 255, 254, 0.6);
    border-radius: 50px;
    border: 1px solid rgba(142, 238, 231, 0.2);
    display: inline-block;
    backdrop-filter: blur(10px);
    box-shadow:
        0 4px 20px rgba(142, 238, 231, 0.1),
        inset 0 1px 2px rgba(255, 255, 255, 0.5);
}

.page-description {
    color: #718096;
    font-size: 1.1rem;
    margin-bottom: 40px;
    animation: fadeInUp 0.8s ease-out 0.4s both;
    opacity: 0;
}

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

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

@keyframes expandWidth {
    from {
        width: 0;
    }
    to {
        width: 120px;
    }
}

/* ヒーローアクション */
.hero-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 25px;
    flex-wrap: wrap;
    animation: fadeInUp 0.8s ease-out 0.4s both;
    opacity: 0;
}

/* 検索コンテナ */
.search-container {
    flex: 1;
    max-width: 450px;
}

.search-form {
    width: 100%;
}

.search-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.9);
    border: 2px solid rgba(142, 238, 231, 0.3);
    border-radius: 50px;
    padding: 0 20px;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(142, 238, 231, 0.1);
}

.search-input-wrapper:focus-within {
    border-color: #8eeee7;
    background: rgba(255, 255, 255, 0.95);
    box-shadow:
        0 4px 20px rgba(142, 238, 231, 0.15),
        0 0 0 3px rgba(142, 238, 231, 0.1);
}

.search-icon {
    width: 20px;
    height: 20px;
    color: #8eeee7;
    margin-right: 12px;
    flex-shrink: 0;
}

.search-input {
    flex: 1;
    padding: 14px 0;
    border: none;
    background: transparent;
    font-size: 1rem;
    color: #2d3748;
    outline: none;
    font-family: inherit;
}

.search-input::placeholder {
    color: #a0aec0;
    font-weight: 400;
}

.search-clear {
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    margin-left: 8px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    opacity: 0.6;
}

.search-clear:hover {
    background: rgba(142, 238, 231, 0.1);
    opacity: 1;
}

.search-clear svg {
    width: 16px;
    height: 16px;
    color: #718096;
}

/* 新規投稿ボタン */
.btn-new-post {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 16px 40px;
    background: linear-gradient(135deg, #8eeee7 0%, #5fd4cd 100%);
    color: #fff;
    text-decoration: none;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(95, 212, 205, 0.3);
    flex-shrink: 0;
}

.btn-new-post:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 30px rgba(95, 212, 205, 0.4);
    gap: 16px;
}

.btn-icon {
    font-size: 1.3rem;
}

.btn-arrow {
    font-size: 1.3rem;
    transition: transform 0.3s ease;
}

.btn-new-post:hover .btn-arrow {
    transform: translateX(4px);
}

/* BBSグリッド */
.bbs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
    margin-bottom: 60px;
}

/* BBSカード */
.bbs-card {
    background: #ffffff;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, 0.06);
    position: relative;
    transition: all 0.3s cubic-bezier(0.4, 0, 0, 1);
    animation: cardFadeIn 0.6s ease-out both;
    animation-delay: calc(var(--card-index, 0) * 0.05s);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.bbs-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, transparent 40%, rgba(142, 238, 231, 0.1) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    z-index: 1;
}

.bbs-card:hover::before {
    opacity: 1;
}

.bbs-card:hover {
    transform: translateY(-8px);
    box-shadow:
        0 20px 40px rgba(142, 238, 231, 0.15),
        0 10px 20px rgba(0, 0, 0, 0.05);
}

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

.bbs-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

/* 画像エリア */
.bbs-card-image {
    position: relative;
    width: 100%;
    height: 200px;
    overflow: hidden;
    background: linear-gradient(135deg, #f5f5f5 0%, #e8e8e8 100%);
}

.bbs-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0, 1);
}

.bbs-card:hover .bbs-card-image img {
    transform: scale(1.05);
}

.image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.3) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.bbs-card:hover .image-overlay {
    opacity: 1;
}

.bbs-card-image.no-image {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(142, 238, 231, 0.1) 0%, rgba(95, 212, 205, 0.1) 100%);
}

.image-placeholder {
    width: 80px;
    height: 80px;
    color: #8eeee7;
    opacity: 0.5;
}

/* コンテンツエリア */
.bbs-card-content {
    padding: 25px;
    position: relative;
    z-index: 2;
}

.bbs-meta {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 12px;
}

.post-number {
    display: inline-block;
    padding: 4px 10px;
    background: linear-gradient(135deg, rgba(142, 238, 231, 0.2), rgba(95, 212, 205, 0.2));
    color: #5fd4cd;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.post-date {
    color: #90a4ae;
    font-size: 0.9rem;
}

.bbs-title {
    font-size: 1.3rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 12px;
    line-height: 1.4;
    transition: color 0.3s ease;
}

.bbs-card:hover .bbs-title {
    color: #5fd4cd;
}

.bbs-author {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 15px;
    color: #718096;
    font-size: 0.95rem;
}

.official-badge {
    display: inline-block;
    background: linear-gradient(135deg, #ffb347, #ff8c42);
    color: white !important;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.75rem !important;
    font-weight: bold !important;
    margin-left: 8px;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.8; }
}

.author-icon {
    width: 16px;
    height: 16px;
    color: #8eeee7;
}

.bbs-excerpt {
    color: #546e7a;
    line-height: 1.7;
    margin-bottom: 20px;
    font-size: 0.95rem;
}

.bbs-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 20px;
    border-top: 1px solid rgba(142, 238, 231, 0.2);
}

.comment-count {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #8eeee7;
    font-size: 0.9rem;
    font-weight: 500;
}

.comment-count svg {
    width: 18px;
    height: 18px;
}

.read-more {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #5fd4cd;
    font-weight: 500;
    font-size: 0.95rem;
    transition: gap 0.3s ease;
}

.bbs-card:hover .read-more {
    gap: 12px;
}

.arrow {
    font-size: 1.2rem;
    transition: transform 0.3s ease;
}

.bbs-card:hover .arrow {
    transform: translateX(4px);
}

/* ページネーション */
.pagination-wrapper {
    margin-top: 60px;
    display: flex;
    justify-content: center;
}

.pagination-list {
    display: flex;
    gap: 10px;
    list-style: none;
    padding: 0;
    margin: 0;
}

.pagination-item {
    display: inline-block;
}

.pagination-item a,
.pagination-item span {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 45px;
    height: 45px;
    padding: 0 15px;
    background: #fff;
    border: 1px solid rgba(142, 238, 231, 0.3);
    border-radius: 10px;
    color: #546e7a;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

.pagination-item a:hover {
    background: linear-gradient(135deg, #8eeee7 0%, #5fd4cd 100%);
    color: #fff;
    border-color: transparent;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(95, 212, 205, 0.3);
}

.pagination-item .current {
    background: linear-gradient(135deg, #8eeee7 0%, #5fd4cd 100%);
    color: #fff;
    border-color: transparent;
}

.pagination-item .dots {
    border: none;
    background: none;
    cursor: default;
}

.nav-arrow {
    font-size: 1.2rem;
}

.nav-text {
    margin: 0 5px;
}

/* 投稿なし */
.no-posts {
    text-align: center;
    padding: 80px 20px;
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 4px 20px rgba(142, 238, 231, 0.06);
}

.no-posts-icon {
    width: 100px;
    height: 100px;
    margin: 0 auto 30px;
    color: #8eeee7;
    opacity: 0.3;
}

.no-posts h2 {
    font-size: 1.8rem;
    color: #2c3e50;
    margin-bottom: 15px;
    font-weight: 400;
}

.no-posts p {
    color: #718096;
    font-size: 1.1rem;
    margin-bottom: 30px;
}

.btn-new-post-simple {
    display: inline-block;
    padding: 14px 30px;
    background: linear-gradient(135deg, #8eeee7 0%, #5fd4cd 100%);
    color: #fff;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-new-post-simple:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(95, 212, 205, 0.4);
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
    .bbs-archive-container {
        padding: 40px 0 60px;
    }

    .hero-section {
        padding: 30px 20px;
    }

    .page-title {
        font-size: 2.2rem;
    }

    .page-title::after {
        width: 80px;
    }

    @keyframes expandWidth {
        from { width: 0; }
        to { width: 80px; }
    }

    .page-subtitle {
        margin-bottom: 20px;
    }

    .subtitle-text {
        font-size: 1rem;
        padding: 12px 30px;
    }

    .bbs-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .bbs-card-image {
        height: 180px;
    }
}

@media (max-width: 480px) {
    .page-title {
        font-size: 1.8rem;
    }

    .page-title::after {
        width: 60px;
        height: 2px;
    }

    @keyframes expandWidth {
        from { width: 0; }
        to { width: 60px; }
    }

    .page-subtitle {
        margin-bottom: 15px;
    }

    .subtitle-text {
        font-size: 0.9rem;
        padding: 10px 20px;
        border-radius: 30px;
    }

    .page-description {
        font-size: 1rem;
        margin-bottom: 30px;
    }

    .btn-new-post {
        width: 100%;
        padding: 14px 30px;
        font-size: 1rem;
    }

    .bbs-card {
        border-radius: 12px;
    }

    .bbs-card-content {
        padding: 20px;
    }

    .bbs-title {
        font-size: 1.2rem;
    }

    .pagination-item a,
    .pagination-item span {
        min-width: 40px;
        height: 40px;
        padding: 0 12px;
        font-size: 0.9rem;
    }
}

/* スムーズスクロール */
html {
    scroll-behavior: smooth;
}

/* フォーカススタイル */
a:focus,
button:focus {
    outline: 2px solid #5fd4cd;
    outline-offset: 2px;
}

/* ダークモード対応 */
@media (prefers-color-scheme: dark) {
    .bbs-archive-container {
        background: linear-gradient(135deg, #0a0e27 0%, #151b3d 100%);
    }

    .hero-section {
        background: rgba(20, 30, 50, 0.95);
        border: 1px solid rgba(176, 224, 230, 0.2);
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    }

    .hero-section::before {
        background: linear-gradient(90deg, #2a6b75 0%, #1a4a52 100%);
    }

    .page-title {
        color: #B0E0E6;
    }

    .page-title::after {
        background: linear-gradient(90deg, #2a6b75 0%, #1a4a52 100%);
    }

    .subtitle-text {
        color: #8dd4e0;
        background: rgba(20, 30, 50, 0.8);
        border-color: rgba(176, 224, 230, 0.3);
    }

    .page-description {
        color: #c0c0c0;
    }

    .search-input-wrapper {
        background: rgba(20, 30, 50, 0.9);
        border-color: rgba(176, 224, 230, 0.3);
    }

    .search-input-wrapper:focus-within {
        border-color: #48CAE4;
        background: rgba(20, 30, 50, 0.95);
        box-shadow:
            0 4px 20px rgba(72, 202, 228, 0.15),
            0 0 0 3px rgba(72, 202, 228, 0.1);
    }

    .search-icon {
        color: #48CAE4;
    }

    .search-input {
        color: #e0e0e0;
    }

    .search-input::placeholder {
        color: #8dd4e0;
    }

    .btn-new-post {
        background: linear-gradient(135deg, #2a6b75 0%, #1a4a52 100%);
        border: 1px solid rgba(176, 224, 230, 0.3);
        color: #E0FFFF;
    }

    .btn-new-post:hover {
        background: linear-gradient(135deg, #3a7b85 0%, #2a5a62 100%);
        box-shadow: 0 10px 30px rgba(72, 202, 228, 0.2);
    }

    .bbs-card {
        background: rgba(20, 30, 50, 0.95);
        border: 1px solid rgba(176, 224, 230, 0.2);
    }

    .bbs-card:hover {
        border-color: #48CAE4;
        box-shadow: 0 15px 40px rgba(72, 202, 228, 0.15);
    }

    .bbs-card-image.no-image {
        background: linear-gradient(135deg, #1a2547 0%, #0f1837 100%);
    }

    .image-placeholder svg {
        color: #48CAE4;
    }

    .post-number {
        background: rgba(72, 202, 228, 0.2);
        color: #8dd4e0;
    }

    .post-date {
        color: #8dd4e0;
    }

    .bbs-title {
        color: #B0E0E6;
    }

    .bbs-author {
        color: #8dd4e0;
    }

    .bbs-excerpt {
        color: #c0c0c0;
    }

    .bbs-card-footer {
        border-top-color: rgba(176, 224, 230, 0.1);
    }

    .comment-count {
        background: rgba(72, 202, 228, 0.1);
        color: #8dd4e0;
    }

    .comment-icon {
        color: #48CAE4;
    }

    .view-link {
        color: #48CAE4;
    }

    .view-link:hover {
        color: #8eeee7;
    }

    .no-posts {
        background: rgba(20, 30, 50, 0.95);
        border-color: rgba(176, 224, 230, 0.2);
    }

    .no-posts-icon {
        background: rgba(72, 202, 228, 0.1);
        color: #48CAE4;
    }

    .no-posts h2 {
        color: #B0E0E6;
    }

    .no-posts p {
        color: #c0c0c0;
    }

    .pagination {
        background: rgba(20, 30, 50, 0.95);
        border-color: rgba(176, 224, 230, 0.2);
    }

    .page-numbers {
        background: rgba(20, 30, 50, 0.8);
        border-color: rgba(176, 224, 230, 0.3);
        color: #B0E0E6;
    }

    .page-numbers:hover {
        background: rgba(72, 202, 228, 0.2);
        border-color: #48CAE4;
        color: #E0FFFF;
    }

    .page-numbers.current {
        background: linear-gradient(135deg, #2a6b75 0%, #1a4a52 100%);
        color: #E0FFFF;
    }

    .pagination-info {
        color: #8dd4e0;
    }
}