/* ホームページのスタイル - 機能別に整理
   構成:
   1) ヒーローセクション
   2) ボヤボックス
   3) カードセクション
   4) お知らせセクション（ヘッダー/アクション、一覧）
   5) レスポンシブ
*/

/* =========================
   1) ヒーローセクション
   ========================= */
.hero {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    min-height: calc(100vh - 120px);
    padding: 30px 20px;
    color: #fff;
    text-align: center;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
}

    .hero::before {
        content: "";
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: linear-gradient(135deg, rgba(30, 20, 10, 0.7) 0%, rgba(50, 40, 30, 0.5) 100%);
        z-index: 0;
    }

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 700px;
    margin: 0 auto 40px auto;
}

.hero h1,
.hero p {
    position: relative;
    z-index: 2;
    max-width: 700px;
    margin: 0 auto;
    padding-bottom: 1rem;
    text-shadow: 0 2px 10px rgba(0,0,0,0.5);
}

.hero h1 {
    font-size: 2.2rem;
    line-height: 1.3;
    margin-bottom: 1rem;
    font-weight: 600;
}

.hero p {
    font-size: 1.2rem;
    opacity: 0.95;
    margin-bottom: 2rem;
}

/* =========================
   2) ボヤボックス
   ========================= */
.boya-text {
    display: block;
    font-size: 0.9rem;
    margin-top: 0.5rem;
    color: rgba(255, 255, 255, 0.8);
    font-style: italic;
}

    .boya-text i {
        margin-right: 0.3rem;
        opacity: 0.8;
    }

/* =========================
   3) カードセクション
   ========================= */
/* グリッドレイアウト */
.cards {
    display: grid;
    grid-template-columns: repeat(5, 1fr); /* 5列に固定 */
    /*gap: 1.5rem;
    padding: 0 1rem;*/
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

/* カードリンク */
.card-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

/* 基本カード */
.card {
    background: rgba(25, 25, 35, 0.85);
    aspect-ratio: 1 / 1;
    height: auto;
    border-radius: 16px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    transition: all 0.25s ease;
    border-top: 4px solid rgba(255, 255, 255, 0.2);
}

.card-inner {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    border: 3px solid #1b324a;
    border-radius: 16px;
}

/* カードアイコン */
.card-icon {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 0 1.5rem 0;
    flex-shrink: 0;
    transition: all 0.3s ease;
}

    .card-icon i {
        font-size: 2rem;
        color: rgba(255, 255, 255, 0.9);
    }

/* カードコンテンツ */
.card-content {
    text-align: center;
    width: 100%;
}

    .card-content h3 {
        font-size: 1.1rem;
        font-weight: 600;
        margin-bottom: 0.4rem;
        color: white;
    }

    .card-content p {
        font-size: 0.85rem;
        color: rgba(255, 255, 255, 0.7);
        margin: 0;
    }

/* カード色バリエーション（上ボーダー） */
.card-1 {
    border-top-color: #ff7e5f;
}

.card-2 {
    border-top-color: #7b68ee;
}

.card-3 {
    border-top-color: #4ecdc4;
}

.card-4 {
    border-top-color: #6a82fb;
}

.card-5 {
    border-top-color: #ff5a5f;
}

.card-6 {
    border-top-color: #ffbe0b;
}

/* ホバー */
.card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
    background: rgba(35, 35, 45, 0.9);
}

    .card:hover .card-icon {
        transform: scale(1.1);
    }

/* =========================
   4) お知らせセクション
   ========================= */
/* ヘッダー */
.announcements-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

    .announcements-header h2 {
        font-size: 1.3rem;
        color: #fff;
        text-align: left;
        font-weight: 500;
        display: flex;
        align-items: center;
        margin: 0;
    }

        .announcements-header h2 i {
            margin-right: 0.5rem;
            color: #ffbe0b;
        }

/* ヘッダー内アクション */
.announcement-header-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    margin-bottom: 10px;
}

.view-all-link {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    transition: color 0.2s;
    margin-right: 15px;
}

    .view-all-link:hover {
        color: #fff;
    }

    .view-all-link i {
        font-size: 0.8rem;
        margin-left: 5px;
    }

.create-announcement-btn {
    display: inline-flex;
    align-items: center;
    background-color: rgba(106, 130, 251, 0.2);
    color: #6a82fb;
    padding: 5px 12px;
    border-radius: 4px;
    font-size: 0.9rem;
    text-decoration: none;
    transition: background-color 0.2s, color 0.2s;
}

    .create-announcement-btn:hover {
        background-color: rgba(106, 130, 251, 0.3);
        color: #fff;
    }

    .create-announcement-btn i {
        margin-right: 5px;
    }

/* 一覧本体 */
.announcements {
    max-width: 800px;
    margin: 0 auto 40px;
    width: 100%;
    padding: 0 1rem;
    position: relative;
    z-index: 2;
}

.announcement-items {
    background: rgba(25, 25, 35, 0.75);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.announcement-item {
    display: flex;
    padding: 0.8rem 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: background 0.2s;
}

    .announcement-item:last-child {
        border-bottom: none;
    }

    .announcement-item:hover {
        background: rgba(255, 255, 255, 0.05);
    }

.announcement-date {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.85rem;
    min-width: 90px;
    padding-right: 1rem;
    display: flex;
    align-items: center;
}

.announcement-content {
    flex: 1;
}

.announcement-link {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

    .announcement-link:hover {
        color: #fff;
        text-decoration: underline;
    }

.announcement-tag {
    display: inline-block;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

    .announcement-tag.update {
        background-color: rgba(106, 130, 251, 0.2);
        color: #6a82fb;
    }

    .announcement-tag.new {
        background-color: rgba(78, 205, 196, 0.2);
        color: #4ecdc4;
    }

    .announcement-tag.important {
        background-color: rgba(255, 90, 95, 0.2);
        color: #ff5a5f;
    }

/* =========================
   5) レスポンシブ
   ========================= */
/* ヒーロー/カード関連 */
@media (max-width: 1000px) {
    .cards {
        grid-template-columns: repeat(3, 1fr);
        max-width: 900px;
    }
}

@media (max-width: 800px) {
    .cards {
        grid-template-columns: repeat(2, 1fr);
        max-width: 600px;
    }

    .hero-content {
        margin-bottom: 30px;
    }
}

@media (max-width: 550px) {
    .hero {
        padding: 20px;
        justify-content: flex-start;
    }

    .hero-content {
        margin-top: 30px;
    }

    .cards {
        grid-template-columns: repeat(2, 1fr);
        max-width: 500px;
        /*gap: 1rem;*/
    }

    .hero h1 {
        font-size: 1.8rem;
    }

    .hero p {
        font-size: 1rem;
    }

    .card {
        height: auto;
    }

    .card-icon {
        width: 60px;
        height: 60px;
        margin: 0;
    }

        .card-icon i {
            font-size: 1.8rem;
        }

    .card-content h3 {
        font-size: 1rem;
    }

    .card-content p {
        font-size: 0.75rem;
    }

    .detail-title {
        display: none;
    }
}

/* お知らせ関連 */
@media (max-width: 800px) {
    .announcements {
        margin-bottom: 30px;
    }
}

@media (max-width: 550px) {
    .announcement-item {
        flex-direction: column;
        gap: 0.5rem;
        padding: 0.8rem;
    }

    .announcement-date {
        min-width: auto;
        padding-right: 0;
    }

    .announcement-link {
        flex-wrap: wrap;
    }

    .announcements h2 {
        font-size: 1.1rem;
    }
}

/* ヘッダー内アクションのレイアウト調整 */
@media (max-width: 600px) {
    .announcement-header-actions {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .view-all-link {
        margin-right: 0;
    }
}
