@import url('https://fonts.googleapis.com/css2?family=Ubuntu');
* {
    box-sizing: border-box;
}
/* defining variable for easy access and modifications */
:root {
    --left-bg-color: rgb(170, 5, 5, 0.5);
    --right-bg-color: rgba(139, 69, 19, 0.5);
    --left-btn-hover-color: #fbca03;
    --right-btn-hover-color: skyblue;
    --hover-width: 75%;
    --other-width: 25%;
    --speed: 1000ms;
}
/* Global properties */
body {
    font-family: 'Ubuntu', sans-serif;
    height: 100vh;
    overflow: hidden;
    margin: 0
}
/* Properties for h1 tag */
h1 {
    font-size: 4rem;
    color: #fff;
    position: absolute;
    left: 50%;
    top: 20%;
    transform: translateX(-50%);
/* 'nowrap' will make sure, when the screen size reduces, text don't gets to the next line */
    white-space: nowrap;
}

/* basic properties to style the buttons */
.btn {
    position: absolute;
/*   flex is used to center the content inside the button   */
    display: flex;
    align-items: center;
    justify-content: center;
    left: 50%;
    top: 40%;
    transform: translateX(-50%);
    text-decoration: none;
    color: #fff;
    border: #fff solid 0.2rem;
    font-size: 1rem;
    width: 15rem;
    padding: 1.5rem;
    font-weight: bold;
    text-transform: uppercase;
}

.split.left .btn:hover {
    background-color: var(--left-btn-hover-color);
    border-color: var(--left-btn-hover-color);
}

.split.right .btn:hover {
    background-color: var(--right-btn-hover-color);
    border-color: var(--right-btn-hover-color);
}

.container {
    position: relative;
    width: 100%;
    height: 100%;
    background: #333;
}

.split {
    position: absolute;
    width: 50%;
    height: 100%;
    overflow: hidden;
}

.split.left {
    left: 0;
    background: url('https://rare-gallery.com/thumbs/348171-4k-wallpaper.jpg');
    background-size: cover;
    background-repeat: no-repeat;
}

.split.left::before {
    content: '  ';
    position: absolute;
    width: 100%;
    height: 100%;
    background-color: var(--left-bg-color);
}

.split.right {
    right: 0;
    background: url('https://www.pixelstalk.net/wp-content/uploads/2016/06/Free-Desktop-Thor-Wallpapers-Downlaod.jpg');
    background-repeat: no-repeat;
    background-size: cover;
}

.split.right::before {
    content: '  ';
    position: absolute;
    width: 100%;
    height: 100%;
    background-color: var(--right-bg-color);
}

.split.right,
.split.left,
.split.right::before,
.split.right::before {
/* transition is added to keep it smooth when left and right side is changing is width     */
    transition: all var(--speed) ease-in-out;
}

.hover-left .left {
    width: var(--hover-width);
}

.hover-left .right {
    width: var(--other-width);
}

.hover-right .left {
    width: var(--other-width);
}

.hover-right .right {
    width: var(--hover-width);
}

/* media query to handle the small screen windows */
@media(max-width:800px) {
    h1 {
        font-size: 2rem;
        top: 30%;
    }
    .btn {
        padding: 1.2rem;
        width: 12rem;
    }
}
