/* カードの共通基本設定 */
.afv-card-container {
    width: 100%;
    aspect-ratio: 1 / 1;
    perspective: 1000px;
    margin-bottom: 20px;
}

.afv-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    transform-style: preserve-3d;
}

.afv-card-container:hover .afv-card-inner {
    transform: rotateY(180deg);
}

.afv-card-front, .afv-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: 8px;
    overflow: hidden;
}

/* 表面 */
.afv-card-front {
    background-size: cover;
    background-position: center;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.afv-text-mask {
    height: 25%;
    width: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
}

.afv-title {
    margin: 0;
    font-size: 1.3rem;
    color: #fff;
    text-align: center;
    font-weight: bold;
    padding: 0 10px;
}

/* 裏面 */
.afv-card-back {
    background: #004b91;
    color: #fff;
    transform: rotateY(180deg);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 15px;
    text-align: center;
    transform-style: preserve-3d; 
}

.afv-back-content {
    width: 100%;
    transform: translateZ(20px); 
}

.afv-card-back h4.afv-back-title {
    color: #fff !important;
    font-size: 1.2rem !important;
    font-weight: bold !important;
    margin: 0 0 10px 0 !important;
    text-align: center !important;
    border: none !important;
    padding: 0 !important;
    background: transparent !important;
    display: block !important;
}

.afv-info {
    line-height: 1.5;
    font-size: 0.9rem;
    margin-bottom: 0; 
}

/* ボタン */
.afv-btn {
    display: inline-block;
    padding: 10px 15px;
    background: #ffffff;
    color: #004b91 !important;
    text-decoration: none !important;
    border-radius: 4px;
    font-weight: bold;
    font-size: 0.9rem;
    cursor: pointer;
    margin-top: 15px !important; 
    transition: all 0.3s ease; 
    box-shadow: 0 4px 0px rgba(0,0,0,0.1);
}

.afv-btn:hover {
    background: #f0f0f0 !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0,0,0,0.3);
}

/* --- スマホ表示(2カラム時)の文字特大調整 --- */
@media (max-width: 767px) {
    .afv-card-back {
        padding: 5px; /* 限界まで余白を削り、文字領域を最大化 */
    }
    
    .afv-title { 
        font-size: 1.2rem; /* さらに大きく */
    }
    
    .afv-card-back h4.afv-back-title { 
        font-size: 1.2rem !important; /* 1.1 -> 1.2 読みやすさ重視 */
        margin-bottom: 3px !important;
    }
    
    .afv-info { 
        font-size: 0.95rem; /* 0.85 -> 0.95 老眼対策の限界点 */
        line-height: 1.2; 
    }
    
    .afv-btn { 
        font-size: 0.95rem; /* ボタンの文字も大きく */
        padding: 6px 10px;
        margin-top: 6px !important;
    }
}