/*
Theme Name: OceanWP Child Theme
Theme URI: https://oceanwp.org/
Description: OceanWP WordPress theme. Sample child theme.
Author: OceanWP
Author URI: https://oceanwp.org/
Template: oceanwp
Version: 1.0
*/

/* Parent stylesheet should be loaded from functions.php not using @import */
/* カード全体の設定 */
.quest-card {
    position: relative;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    height: 100%; /* カード自体の高さを揃える */
}

/* 画像の高さを強制的に固定する */
.quest-card .wp-block-post-featured-image {
    margin: 0 !important;
    width: 100%;
}

.quest-card .wp-block-post-featured-image img {
    display: block;
    width: 100%;
    /* ここで高さを固定！(4:3の比率にする例。正方形なら1/1) */
    aspect-ratio: 1 / 1; 
    object-fit: cover; /* はみ出す分はカットして綺麗に収める */
}

/* タイトルを大きく、余白を削る */
.quest-card .wp-block-post-title {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    margin: 0 !important;
    
    /* 余白を最小限にして文字を大きく */
    padding: 4px 5px !important; 
    font-size: 1.1rem !important; /* グッと大きくしました */
    line-height: 1.2;
    
    background-color: rgba(139, 0, 0, 0.9); /* 少し濃いめにして文字を強調 */
    color: #ffffff !important;
    text-align: center;
    z-index: 10;
}

.quest-card .wp-block-post-title a {
    color: #ffffff !important;
    text-decoration: none !important;
}

.quest-card .wp-block-post-title a {
    color: #ffffff !important;
    text-decoration: none !important;
}

.quest-card .wp-block-post-title a:hover {
    color: #d4af37 !important;
    text-decoration: none !important;
}

/* カード内の画像をなめらかに動かす準備じゃ */
.quest-card img {
    transition: transform 0.3s ease-in-out !important;
}

/* カード全体にマウスを乗せた時に、中の画像を動かすぞ */
.quest-card:hover img {
    /* 1.1倍に拡大して、5度右に回転！ */
    transform: scale(1.1) rotate(5deg) !important;
}

/* 画像がカードの枠からはみ出んようにする魔法じゃ */
.quest-card figure {
    overflow: hidden !important;
    border-radius: 8px; /* 角を少し丸くするとお洒落じゃぞ */
}