@charset "UTF-8";
*{
    padding: 0;
    margin: 0;
    box-sizing: border-box;
}
body{
    line-height: 1;
}
img{
    vertical-align: bottom;
    max-width: 100%;
}
ul{list-style: none;}
a{
    text-decoration: none;
    color: inherit;
}

.inner-box{
    max-width: 960px;
    margin: 0 auto;
    /* border: 1px solid #f00; */
}
.contents-box{
    display: flex;
    justify-content: space-between;
    background-color: #fff;
    padding: 20px;
    margin-bottom: 80px;
}
.contents-image{
    display: flex;
    gap: 40px;
}

header{
    background-image: url(../img/bg_header.png);
    padding: 20px 0;
    margin-bottom: 30px;
}
body{
    background-color: #e2edc3;
}
footer{
    background-color: #657818;
}
nav{
    max-width: 200px;
    width: 100%;
    /* border: 1px solid #f00 ; */
}
nav li{
 border: 2px solid #86a042;
 margin-bottom: 20px;
}
nav a{
    display: block;
    padding: 20px 10px;
    color: #86a042;
    font-weight: bold;
}
nav a:hover{
    color: #c7e382;
}

main{
    max-width:635px;
}

main h2{
    margin-bottom: 30px;
}
section h3{
    color: #657818;
    padding: 10px 0 13px 18px;
    font-size: 16px;
    background-image: url(../img/icon.png);
    background-repeat: no-repeat;
    background-position: 0 center;
}

footer{
    background-color: #657818;
    color: #fff;
    padding: 30px 0 80px;
    text-align: center;
}

.contents-item {
    position: relative;
    }
.contents-item .text{
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    background-color: rgba(255,255,255,0.8);/* 白の透過背景に変更 */
    color: #333;/* 文字を濃くして読みやすく */
    font-weight: bold;
    padding: 10px;
    line-height: 1.68;
    height: 130px;

    /* アニメーションの設定 */
    transition: 0.5s;
    opacity: 0;
    transform: translateY(20px);
   
}
.contents-item:hover .text{
    opacity: 1;
    transform: translateY(0);
    
}

/* ここからスマホ対応 */
/* ブレイクポイント：450px */

@media (width <= 450px){
.contents-box{
    display: flex;
    flex-direction: column-reverse;
    background-color: #fff;
    padding: 0;
    margin-bottom: 80px;
}
.contents-image{
    display: block;
    gap: 40px;
}

.contents-image section{
    margin-bottom: 80px;
}
section h3{
    color: #657818;
    padding: 10px 0 13px 18px;
    font-size: 20px;
    
}

.contents-item .text{
    position: static;/* position解除 */
    width: 100%;
    background-color: rgba(255,255,255,1);
    color: #333;
    height: auto;/* heightの初期値はauto */
    font-size: 16px;
    min-height: auto;
    opacity: 1;
    transform: none;
    padding: 150px 0;/* 上下に余白を作る */
}




