.main-container{ position: relative; } .room-main{ position: relative; z-index: -1; } .room-main img{ width: 100%; margin-bottom: 50px; } .text-container { position: absolute; top: 40%; left: 50%; width: 80%; transform: translate(-50%, -50%); z-index: 2; color: #fff; padding: 20px; border-radius: 20px; margin: 10px; overflow: auto; justify-content: center; } #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; } .headings{ text-align: center; color: #3b3b3b; } .card { display: flex; flex-wrap: wrap; justify-content: center; margin-right: 10px; margin-bottom: 50px; } .card-room1 { border-radius: 8px; box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.2); background-color: #fff; box-shadow: 0.3s; width: 280px; height: 410px; margin: 20px; border: #ffffff; position: relative; transition: transform 0.8s ease } .card-room1 img{ width: 100%; height: 60%; position: absolute; border-radius: 10px; } .card-room1:hover { box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.5); transform: scale(1.1); cursor: pointer; } .container { position: relative; width: 150px; height: 150px; } .discount p{ position: absolute; margin-top: 0px; right: 0px; background-color: rgba(220, 20, 20, 0.8); box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.8); color: #fff; padding: 10px; font-weight: 500; } .text-room { position: relative; top: 65%; text-align: center; } .text-room h2{ font-size: 20px; font-weight: bold; color: #555555; } .available { position: absolute; top: 45%; right: 10px; } .text-available { text-align: center; box-shadow: 0px 0px 20px rgb(180, 175, 175); background-color: rgba(26, 24, 24, 0.8); color: #ffffff; height: 20px; padding: 10px; border-radius: 5px; font-size: 14px; font-weight: 500; } .room-facilities { position: absolute; display: flex; top: 65%; left: 20px; } .view-price { display: flex; align-items: center; justify-content: center; margin: 20px; } .price { position: absolute; bottom: 10px; left: 15px; font-size: 16px; color: #3b3b3b; font-weight: bold; } .view-room { position: absolute; right: 15px; border: none; border-radius: 5px; background: #213e9e; color: #ffffff; font-size: 14px; font-weight: bold; padding: 10px 20px; cursor: pointer; align-items: center; justify-content: center; transition: background 0.3s, color 0.3s; bottom: 15px; text-decoration: none; } .view-room:hover { background: #18307e; color: #ffffff; } 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){ .text-container { position: absolute; top: 40%; left: 45%; padding: 10px; margin: 10px; overflow: auto; } #heading { font-size: 30px; text-align: center; } #subheading { font-size: 20px; } } @media screen and (max-width: 395px) { .card { padding: 10px; } .card-room1 { width: 240px; height: 300px; } .card-room1:hover { box-shadow: 0px 0px 5px rgba(0, 0, 0, 0.5); } .discount p{ font-size: 12px; } .text-room h2{ font-size: 16px; } .available { position: absolute; top: 45%; right: 10px; } .available p{ height: 15px; padding: 5px; border-radius: 5px; font-size: 12px; font-weight: bold; } .item p{ margin-left: 12px; text-align: center; font-size: 12px; } .item img{ width: 10px; height: 10px; } .price{ position: absolute; bottom: 10px; left: 10px; font-size: 12px; } .view-room { bottom: 15px; right: 10px; font-size: 10px; padding: 10px 15px; height: 15px; } #heading { margin-top: 20px; font-size: 25px; } #subheading { font-size: 12px; } }