:root {
    --primary-color: #212121;
    --background-color: #e9f3f2;
    --font: sans-serif;
}


*,
::before,
::after {
    padding: 0;
    margin: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Work Sans', sans-serif;
}

/* Timeline Container */
.timeline {

    margin: 0 auto;
    padding: 0 20px;
}

/* Card container */
.card-a {
    position: relative;
    max-width: 400px;
}

/* setting padding based on even or odd */
.card-a:nth-child(odd) {
    padding: 30px 0 30px 30px;
}

.card-a:nth-child(even) {
    padding: 30px 30px 30px 0;
}

/* Global ::before */
.card-a::before {
    content: "";
    position: absolute;
    width: 50%;
    border: solid #ffc008;
}

/* Setting the border of top, bottom, left */
.card-a:nth-child(odd)::before {
    left: 0px;
    top: -4.5px;
    bottom: -4.5px;
    border-width: 5px 0 5px 5px;
    border-radius: 50px 0 0 50px;
}

/* Setting the top and bottom to "-5px" because earlier it was out of a pixel in mobile devices */
@media only screen and (max-width: 400px) {
    .card-a:nth-child(odd)::before {
        top: -5px;
        bottom: -5px;
    }
}

/* Setting the border of top, bottom, right */
.card-a:nth-child(even)::before {
    right: 0;
    top: 0;
    bottom: 0;
    border-width: 5px 5px 5px 0;
    border-radius: 0 50px 50px 0;
}

/* Removing the border if it is the first card */
.card-a:first-child::before {
    border-top: 0;
    border-top-left-radius: 0;
}

/* Removing the border if it is the last card-a  and it's odd */
.card-a:last-child:nth-child(odd)::before {
    border-bottom: 0;
    border-bottom-left-radius: 0;
}

/* Removing the border if it is the last card-a  and it's even */
.card-a:last-child:nth-child(even)::before {
    border-bottom: 0;
    border-bottom-right-radius: 0;
}

/* Information about the timeline */
.info {
    display: flex;
    flex-direction: column;
    background: #e9f3f2;
    color: #4D4D4D;
    border-radius: 10px;
    padding: 10px;
}

/* Title of the card-a */
.title {
    color: #4D4D4D;
    position: relative;
}

/* Timeline dot  */
.title::before {
    content: "";
    position: absolute;
    width: 15px;
    height: 15px;
    background: white;
    border-radius: 50%;
    border: 3px solid #ffc008;
}

/* text right if the card-a is even  */
.card-a:nth-child(even)>.info>.title {
    text-align: right;
}

/* setting dot to the left if the card-a is odd */
.card-a:nth-child(odd)>.info>.title::before {
    left: -45px;
}

/* setting dot to the right if the card-a is odd */
.card-a:nth-child(even)>.info>.title::before {
    right: -45px;
}

.contact-err {
    position: absolute;
    bottom: -22px;
    left: 5%;
    color: red;
    font-size: 12px;
}

/* Extra small devices (portrait phones, less than 576px) */
@media (max-width: 575.98px) {
    h1 {
        font-size: calc(1.61803398875 * 1.05em);
    }

    h2 {
        font-size: calc(1.61803398875 * 1em);
    }

    h3 {
        font-size: calc(1.61803398875 * 0.95em);
    }

    h4 {
        font-size: calc(1.61803398875 * 0.9em);
    }

    h5 {
        font-size: calc(1.61803398875 * 0.85em);
    }

    h6 {
        font-size: calc(1.61803398875 * 0.8em);
    }

    p {
        font-size: calc(1em + 0.1vw);
    }
}

/* Small devices (landscape phones, 576px and up) */
@media (min-width: 576px) and (max-width: 767.98px) {
    h1 {
        font-size: calc(1.61803398875 * 1.075em);
    }

    h2 {
        font-size: calc(1.61803398875 * 1.025em);
    }

    h3 {
        font-size: calc(1.61803398875 * 0.975em);
    }

    h4 {
        font-size: calc(1.61803398875 * 0.925em);
    }

    h5 {
        font-size: calc(1.61803398875 * 0.875em);
    }

    h6 {
        font-size: calc(1.61803398875 * 0.825em);
    }

    p {
        font-size: calc(1em + 0.075vw);
    }
}

/* Medium devices (tablets, 768px and up) */
@media (min-width: 768px) and (max-width: 991.98px) {
    h1 {
        font-size: calc(1.61803398875 * 1.1em);
    }

    h2 {
        font-size: calc(1.61803398875 * 1.05em);
    }

    h3 {
        font-size: calc(1.61803398875 * 1em);
    }

    h4 {
        font-size: calc(1.61803398875 * 0.95em);
    }

    h5 {
        font-size: calc(1.61803398875 * 0.9em);
    }

    h6 {
        font-size: calc(1.61803398875 * 0.85em);
    }

    p {
        font-size: calc(1em + 0.05vw);
    }
}

/* Large devices (desktops, 992px and up) */
@media (min-width: 992px) and (max-width: 1199.98px) {
    h1 {
        font-size: calc(1.61803398875 * 1.125em);
    }

    h2 {
        font-size: calc(1.61803398875 * 1.075em);
    }

    h3 {
        font-size: calc(1.61803398875 * 1.025em);
    }

    h4 {
        font-size: calc(1.61803398875 * 0.975em);
    }

    h5 {
        font-size: calc(1.61803398875 * 0.925em);
    }

    h6 {
        font-size: calc(1.61803398875 * 0.875em);
    }

    p {
        font-size: calc(1em + 0.03vw);
    }
}

/* Extra large devices (large desktops, 1200px and up) */
@media (min-width: 1200px) {
    h1 {
        font-size: calc(1.61803398875 * 1.15em);
    }

    h2 {
        font-size: calc(1.61803398875 * 1.1em);
    }

    h3 {
        font-size: calc(1.61803398875 * 1.05em);
    }

    h4 {
        font-size: calc(1.61803398875 * 1em);
    }

    h5 {
        font-size: calc(1.61803398875 * 0.95em);
    }

    h6 {
        font-size: calc(1.61803398875 * 0.9em);
    }

    p {
        font-size: calc(1em + 0.02vw);
    }
}