.main-facilities { width: 100%; } #facilities1, #facilities2, #facilities3 { margin-bottom: 40px; } .text-container { position: absolute; top: 40%; left: 50%; width: 80%; transform: translate(-50%, -50%); z-index: 1; color: #ffffff; padding: 20px; border-radius: 20px; margin: 10px; overflow: auto; justify-content: center; } .slide1-facilities { position: relative; z-index: -1; } .container{ padding: 0px 20px; margin: 0px 50px; } .slide1-facilities img { width: 100%; } #heading { font-size: 55px; font-weight: 500; text-align: center; margin-top: 50px; } #subheading { font-size: 25px; text-align: center; font-style: italic; margin-top: -10px; } .our-facilities { text-align: center; margin-bottom: 20px; } .bottom-footer h5::before { content: " "; display: block; color: #ffffff; height: 2px; width: 100%; background-color: #ffffff; margin: 0 auto 10px; } .our-facilities h3, .our-facilities p, .our-facilities img { text-align: center; } .our-facilities .container { display: flex; justify-content: space-between; } .our-facilities .facility { width: 100%; margin-top: 20px; } .our-facilities h3 { color: #3b3b3b; } .our-facilities p { color: #555555; font-size: 16px; margin-top: -15px; margin-bottom: 25px; } .fac-img { width: 90%; border-radius: 10px; } .icon { display: flex; align-items: center; justify-content: center; border-radius: 40px; background-color: #fff; width: 200px; height: 70px; margin-bottom: 10px; border: #ffffff; position: relative; } .our-facilities-icons { background-color: #050F30; width: 100%; position: relative; bottom: 0; z-index: -1; display: flex; justify-content: space-around; padding: 20px 0; margin-top: 20px; } .card-facilities { display: flex; flex-wrap: wrap; justify-content: center; margin: 10px 10px 10px; } .card-facility { margin: 30px; background-color: #F0EFF5; width: 280px; height: 410px; border: #F0EFF5; position: relative; z-index: -1; border-radius: 20px; } .icon { display: flex; flex-direction: column; align-items: center; } .icon img { width: 20px; margin-bottom: 10px; } .icon p { font-size: 14px; margin: 0; } .card-facility img { width: 100%; height: 60%; position: absolute; border-radius: 10px; cursor: pointer; } .card-facility h3 { position: absolute; top: 250px; font-size: 20px; font-weight: bold; color: #3b3b3b; } .card-facility p { position: absolute; top: 290px; text-align: left; color: #555555; } .our-facilities h2, .other-facilities h2 { color: #3b3b3b; text-align: center; border-bottom: 1px solid #555555; bottom: 10px; width: 100%; } section:not(#nav, #footer) { opacity: 0; transform: translateY(50px); transition: all 1s ease-in-out; will-change: transform, opacity; } section:not(#nav, #footer).show { opacity: 1; transform: translateY(0); } @media screen and (max-width: 770px) { .container{ padding: 0; margin: 0; } #heading { font-size: 30px; font-weight: bold; } #subheading { font-size: 20px; } .our-facilities h3, .other-facilities h3, .our-facilities p, .other-facilities p, .our-facilities img, .other-facilities img { text-align: center; } .icon { display: flex; flex-direction: column; align-items: center; } .icon img { width: 20px; margin-bottom: 10px; } .icon p { font-size: 14px; margin: 0; } .cards-facilities { display: block; justify-content: center; align-items: center; } .card-facility, .other-facility { background-color: #F0EFF5; box-shadow: 0.3s; width: 280px; height: 410px; border: #F0EFF5; position: relative; z-index: -1; margin: 20px; } .card-facility img, .other-facility img { width: 100%; height: 60%; position: absolute; border-radius: 10px; } .fac-img { width: 65%; } .our-facilities .container { flex-direction: column; } .our-facilities .facility { width: 100%; } .card-facility h3, .other-facility h3 { position: absolute; top: 250px; font-size: 20px; font-weight: bold; color: #3b3b3b; } .card-facility p, .other-facility p { position: absolute; top: 290px; text-align: left; } .our-facilities-icons { background-color: #050F30; width: 100%; position: relative; bottom: 0; z-index: -1; display: flex; flex-direction: column; align-items: center; justify-content: space-around; padding: 20px 0; } } @media screen and (max-width:300px){ .text-container { position: absolute; top: 40%; left: 45%; padding: 10px; margin: 10px; } #heading { font-size: 12px; font-weight: bold; } #subheading { font-size: 8px; } }