/* category.twig用カスタムCSS - EC-CUBEアップデート時に保護されます */

.ec-categoryRole {
    padding: 20px 30px 4px;
    margin: 0px 0 20px 0;
    background-color: #fff;
    
}

.top-midashi{
    font-weight: bold;
    font-size: 28px;
    margin: 20px;
    position: relative;

}

.top-midashi::before{
    position: absolute;
    background-color: #333;
    border-radius: 1em;
    content: "";
    left: -2%;
    width: 5px;
    height: 36px;
    top: 50%;
    transform: translateY(-50%);
}

.ec-categoryRole__list {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    margin-bottom: 15px;
}

.ec-categoryRole__listItem {
    width: 24%;
    margin-bottom: 15px;
    box-sizing: border-box;
}

.ec-categoryRole__listItem a {
    display: block;
    text-decoration: none;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.ec-categoryRole__listItem a:hover {
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    background: rgba(60, 125, 189, 0.02);
}

.ec-categoryRole__listItem img {
    width: 100%;
    height: auto;
    transition: all 0.3s;
}

.ec-categoryRole__listItem img:hover {
    opacity: 0.9;
}
@media screen and (min-width: 769px) and (max-width: 1024px) {
        .top-midashi  {
            font-size: 20px;
            margin: 20px 0px 20px 10px; 
     }
    .top-midashi::before{
        left: -4%;
    }
    .ec-categoryRole {
        padding: 20px 20px;
        margin: 0px 0 30px 0;
        background-color: #fff;
        
    }
}
/* レスポンシブ対応 */
@media screen and (max-width: 767px) {
    .ec-categoryRole {
        padding: 20px 20px;
        margin: 0px 0 30px 0;
        background-color: #fff;
        
    }
    .ec-categoryRole__listItem {
        width: 48% !important;
    }
    .ec-categoryRole {
        display: flex;
        flex-direction: column;
        margin-bottom: 20px;
    }
    
    .top-midashi {
        margin: 20px 0px 20px 10px; 
    }
    .ec-categoryRole__list {
        order: 3; /* デフォルトの順序 */
    }
    
    .ec-categoryRole__list:first-of-type {
        order: 2; /* 最初の要素 */
    }
    
    .ec-categoryRole__list.po {
        order: 4; /* 最初の要素の直後に配置 */
    }
    .top-midashi::before{
        left: -4%;
    }
}
@media screen and (max-width: 768px) {
    .ec-categoryRole__list{
        margin: 0;
    }
}

.pc-image {
    display: block;
}
.sp-image {
    display: none;
}

@media (max-width: 768px) {
    .pc-image {
        display: none;
    }
    .sp-image {
        display: block;
    }
}