:root {
    --background-color: #0f4b4d;
    --border-color: #2b797c;
    --text-color: #34495e;
    --color1: #EC3E27;
    --color2: #fd79a8;
    --color3: #0984e3;
    --color4: #00b894;
    --color5: #fdcb6e;
    --color6: #e056fd;
    --color7: #F97F51;
    --color8: #BDC581;
    --a_border_color: #86a3b3;
    --h2_border_color: #8ea2b8;
    --a_hover_background_color: #86a3b3;
    --font_color: #e8f6fd;
}

* {
    margin: 0;
    padding: 0;
}

html {
    font-size: 14px;
}

.container1 {
    width: 100%;
    min-height: 100vh;
    background-color: var(--background-color);
    background-image: url(/img/tiles.jpg);
    background-repeat: repeat;
    display: block;
    justify-content: center;
    align-items: center;
    padding-top: 25px;
    padding-bottom: 25px;
}

.cards{
    width: 90%;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    margin-left: auto;
    margin-right: auto;
    justify-content: center;
}

.card {
    /* flex布局下元素不按比例缩放 */
    min-width: 0;
    flex-shrink: 0;
    flex-grow: 0;
    position: relative;
    width: 300px;
    height: 450px;
    overflow: hidden;
    margin: 20px;
    background-color: #2b797c;
    border-radius: 20px;
    display: flex;
    justify-content: flex-start;
    align-items: center;
    /* flex 子元素 纵向排列 */
    flex-direction: column;
    /* 增加个阴影 */
    box-shadow: 0 0 30px #292929;
    /* 同意给字体价格颜色 */
    color: var(--font_color)
}

.photo {
    position: absolute;
    /* 默认为放大 */
    width: 100%;
    height: 100%;
    top: 0px;
    border-radius: 0%;
    overflow: hidden;
    transition: 0.5s;
}

.photo::before {
    /* 通过before增加渐变背景实现遮罩，让文字默认看起来清晰一些 */
    position: absolute;
    content: '';
    width: 100%;
    height: 100%;
    background-image: linear-gradient(to top, rgba(0, 0, 0, 0.411), transparent);
}
.card:hover .photo::before{
    /* 缩小时隐藏 */
    display: none;
}

.photo img {
    /* 图片高宽均为100% */
    /* 然后按照cover缩放，裁切长边 */
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.card:hover .photo {
    /* 鼠标移上变小 */
    width: 120px;
    height: 120px;
    top: 30px;
    border-radius: 50%;
    box-shadow: 0 0 20px #111;
}

.card h1 {
    position: absolute;
    top: 380px;
    transition: 0.5s;
}

.card:hover h1 {
    position: absolute;
    top: 170px;
}

.card h2 {
    font-size: 18px;
    margin-top: 215px;
    width: 80%;
    font-weight: normal;
    text-align: center;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--h2_border_color);
}

.card p {
    width: 90%;
    /* 段落缩进2个字符大小 */
    text-indent: 2em;
    font-size: 16px;
    margin-bottom: 10px;
    line-height: 30px;
}
.card a {
    color:  #2b797c;
    background-color: white;
    text-decoration: none;
    padding: 5px;
    border-radius: 10px;
}

.card a:hover {
    color: #Fff;
    background-color: var(--a_hover_background_color);
}

.card-body{
    width: 300px;
    border-width: 2px;
    border-color: #e8f6fd56;
    border-radius: 5px;
    border-style: double;
    margin-bottom: 40px;
    padding: 2rem;
    background-color: var(--nav-bg);
    -webkit-backdrop-filter: var(--blur);
    backdrop-filter: var(--blur);
}
@media (max-width:992px) {
    .card-body{
        margin-right: auto;
        margin-left: auto;
    }
    .col-sm-5{
        text-align: right;
        margin-right: 15px;
    }
}

