/* ============================================
   各種書類ダウンロード (document)
   可愛らしく温かみのあるデザイン
   既存テンプレートと統合
   ============================================ */

/* セクション（既存の#bg1, #bg2内で使用） */
#document01 {
    position: relative;
    padding: 60px 0 80px;
    overflow: hidden;
}

/* リード文 */
.document-lead {
    text-align: center;
    font-size: 16px;
    color: #7a6a5a;
    margin-bottom: 45px;
    font-family: "M PLUS Rounded 1c", sans-serif;
    position: relative;
}

.document-lead::after {
    content: "";
    display: block;
    width: 80px;
    height: 3px;
    background: linear-gradient(90deg, #8bc34a, #ffcc80, #8bc34a);
    margin: 15px auto 0;
    border-radius: 2px;
}

/* カードリスト（Flexbox適用で高さ違いによる整列崩れを防止） */
.document-list {
    display: flex;
    flex-wrap: wrap;
    margin-bottom: 40px;
    margin-left: -15px;
    margin-right: -15px;
    position: relative;
    z-index: 1;
}

/* カードラッパー（Bootstrap col-md-6 上書き） */
.document-list > .col-md-6,
.document-list > .col-sm-6,
.document-list > .col-xs-12 {
    display: flex;
    float: none; /* floatを無効化 */
}

/* カード内のFlexで高さを揃える */
.document-list > [class*="col-"] {
    margin-bottom: 0; /* margin-bottomはカード側で設定 */
}

/* カード（手書き風） */
.document-card {
    background: #fff;
    /* 手書き風の歪んだ角丸 */
    border-radius: 255px 15px 225px 15px / 15px 225px 15px 255px;
    /* 二重線風のボーダー */
    border: 3px dashed #c9d9a8;
    box-shadow:
        0 4px 15px rgba(102, 153, 0, 0.1),
        inset 0 0 0 2px rgba(255, 255, 255, 0.8);
    padding: 30px 25px 25px;
    margin-bottom: 30px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    align-content: center;
    position: relative;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    overflow: visible;
    /* Flexbox対応: 親の高さに合わせて伸縮 */
    width: 100%;
    min-height: 120px;
}

/* マスキングテープ風装飾 */
.document-card::before {
    content: "";
    position: absolute;
    top: -8px;
    left: 30px;
    width: 80px;
    height: 24px;
    background: linear-gradient(135deg,
        rgba(139, 195, 74, 0.7) 0%,
        rgba(139, 195, 74, 0.5) 50%,
        rgba(139, 195, 74, 0.7) 100%);
    transform: rotate(-2deg);
    border-radius: 2px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* マスキングテープ2本目（アクセント） */
.document-card::after {
    content: "";
    position: absolute;
    top: -5px;
    right: 40px;
    width: 60px;
    height: 20px;
    background: linear-gradient(135deg,
        rgba(255, 204, 128, 0.7) 0%,
        rgba(255, 204, 128, 0.5) 50%,
        rgba(255, 204, 128, 0.7) 100%);
    transform: rotate(3deg);
    border-radius: 2px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.08);
}

/* ホバーエフェクト（ふわっと浮いて傾く） */
.document-card:hover {
    transform: translateY(-8px) rotate(1deg);
    box-shadow:
        0 12px 30px rgba(102, 153, 0, 0.2),
        inset 0 0 0 2px rgba(255, 255, 255, 0.9);
    border-color: #8bc34a;
}

/* 偶数番目は逆方向に傾く */
.col-md-6:nth-child(even) .document-card:hover {
    transform: translateY(-8px) rotate(-1deg);
}

/* PDFアイコン */
.document-icon {
    width: 55px;
    height: 55px;
    margin-right: 18px;
    flex-shrink: 0;
    position: relative;
}

.document-icon img {
    width: 100%;
    height: auto;
    transition: transform 0.3s ease;
}

.document-card:hover .document-icon img {
    transform: scale(1.1) rotate(-5deg);
}

/* 書類情報 */
.document-info {
    flex: 1;
    min-width: 0;
}

.document-title {
    font-size: 17px;
    font-weight: 700;
    color: #5d4e37;
    margin: 0 0 6px 0;
    font-family: "M PLUS Rounded 1c", sans-serif;
    line-height: 1.5;
    position: relative;
}

/* タイトルにハート装飾 */
.document-title::before {
    content: "\f004";
    font-family: "FontAwesome";
    font-size: 10px;
    color: #ffb3b3;
    margin-right: 6px;
    font-weight: normal;
}

.document-desc {
    font-size: 13px;
    color: #999;
    margin: 0;
    line-height: 1.5;
}

/* ダウンロードボタン */
.document-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(145deg, #7cb342, #558b2f);
    color: #fff;
    padding: 12px 22px;
    border-radius: 25px;
    font-size: 13px;
    font-weight: 600;
    font-family: "M PLUS Rounded 1c", sans-serif;
    text-decoration: none;
    transition: all 0.3s ease;
    margin-left: auto;
    white-space: nowrap;
    box-shadow: 0 4px 10px rgba(102, 153, 0, 0.3);
    position: relative;
    overflow: hidden;
}

/* ボタンのキラキラエフェクト */
.document-btn::before {
    content: "";
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        45deg,
        transparent 30%,
        rgba(255,255,255,0.3) 50%,
        transparent 70%
    );
    transform: translateX(-100%);
    transition: transform 0.6s ease;
}

.document-btn:hover::before {
    transform: translateX(100%);
}

.document-btn:hover,
.document-btn:focus {
    background: linear-gradient(145deg, #5d4037, #4e342e);
    color: #fff;
    text-decoration: none;
    transform: scale(1.05);
    box-shadow: 0 6px 15px rgba(93, 64, 55, 0.4);
}

.document-btn i {
    margin-right: 6px;
    font-size: 14px;
}

.document-btn.disabled {
    background: linear-gradient(145deg, #bdbdbd, #9e9e9e);
    cursor: not-allowed;
    box-shadow: none;
}

.document-btn.disabled:hover {
    transform: none;
}

/* 書類なしメッセージ */
.document-empty {
    text-align: center;
    padding: 60px 20px;
    color: #aaa;
    font-size: 16px;
    font-family: "M PLUS Rounded 1c", sans-serif;
}

/* ============================================
   レスポンシブ対応
   ============================================ */

@media only screen and (max-width: 767px) {
    #document01 {
        padding: 40px 0 60px;
    }

    .document-list {
        flex-direction: column;
    }

    .document-list > .col-xs-12 {
        width: 100%;
    }

    .document-lead {
        font-size: 14px;
        margin-bottom: 30px;
        text-align: left;
        padding: 0 10px;
    }

    .document-card {
        padding: 28px 20px 20px;
        flex-direction: column;
        text-align: center;
        border-radius: 180px 12px 160px 12px / 12px 160px 12px 180px;
        min-height: auto;
    }

    .document-card::before {
        left: 20px;
        width: 60px;
        height: 18px;
    }

    .document-card::after {
        right: 25px;
        width: 45px;
        height: 16px;
    }

    .document-card:hover,
    .col-md-6:nth-child(even) .document-card:hover {
        transform: translateY(-5px) rotate(0deg);
    }

    .document-icon {
        margin-right: 0;
        margin-bottom: 12px;
        width: 45px;
        height: 45px;
    }

    .document-info {
        width: 100%;
        margin-bottom: 15px;
    }

    .document-title {
        font-size: 15px;
    }

    .document-title::before {
        display: none;
    }

    .document-btn {
        margin-left: 0;
        width: 100%;
        text-align: center;
        padding: 12px 20px;
    }
}

@media only screen and (min-width: 768px) and (max-width: 991px) {
    .document-card {
        padding: 28px 18px 22px;
        border-radius: 200px 12px 180px 12px / 12px 180px 12px 200px;
    }

    .document-card::before {
        width: 65px;
        height: 20px;
    }

    .document-card::after {
        width: 50px;
        height: 18px;
    }

    .document-icon {
        width: 45px;
        height: 45px;
        margin-right: 15px;
    }

    .document-title {
        font-size: 15px;
    }

    .document-btn {
        padding: 10px 16px;
        font-size: 12px;
    }
}

/* ============================================
   アニメーション
   ============================================ */

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

/* カードの順次フェードイン用（オプション） */
.document-card {
    animation: fadeInUp 0.6s ease forwards;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
