/* TALLEST BUILDING PAGE STYLES */

img {
    max-height: 300px;
    width: 100%;
}

.left-div,
.right-div {
    width: 50%;
    margin-top: auto;
    margin-bottom: auto;
}

.left-div .h2 {
    margin: auto;
}

#col1 {
    font-size: var(--step-0);
    font-weight: 400;
}

.col-5>* {
    flex-basis: var(--col-5);
    margin-left: auto;
}

.margin-left-1 {
    margin-left: var(--col-1);
}

.margin-right-1 {
    margin-right: var(--col-1);
}

.last-section-paragraph {
    margin-top: 20px;
    display: inline-block;
    width: 100%;
}

.last-section-paragraph a::after {
    content: '';
    display: inline-block;
    margin-left: 8px;
    width: 14px;
    height: 14px;
    background: url('../images/icon-external-link.svg') no-repeat center;
    background-size: contain;
    vertical-align: middle;
}

.last-section-paragraph.internal-link a {
    text-decoration: underline;
}

.underline-link {
    text-decoration: underline !important;
}

.last-section-paragraph.internal-link a::after {
    background: none;
    content: none;
    width: 0;
    height: 0;
    margin-left: 0;
    text-decoration: underline !important;
}


/* TABLE */

.full-width-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    border: 1px solid black;
    border-radius: 4px;
    overflow: hidden;
}

.full-width-table a {
    text-decoration: underline;
}

.full-width-table a::after {
    content: '';
    display: inline-block;
    margin-left: 8px;
    width: 14px;
    height: 14px;
    background: url('../images/icon-external-link.svg') no-repeat center;
    background-size: contain;
    vertical-align: middle;
}

.full-width-table th,
.full-width-table td {
    text-align: left;
    padding: 8px;
}

.full-width-table th {
    background-color: #f2f2f2;
}

.full-width-table tr:nth-child(even) {
    background-color: #d9d9d9;
}

.full-width-table th {
    background-color: black;
    color: #fff;
}

.rank {
    display: inline-block;
    width: 25px;
    height: 25px;
    line-height: 25px;
    border-radius: 50%;
    text-align: center;
    color: #fff;
    background-color: black;
    font-size: 16px;
}


/* END TABLE */


/* FACTS */

.facts-container {
    max-width: 1200px;
    margin: auto;
    flex-direction: column !important;
}

.facts-container h2 {
    /* width: 50%; */
    padding-right: 50%;
}

.facts-container ol {
    list-style: none;
    counter-reset: section;
    padding: 0;
    margin: 0;
}

.facts-container ol li {
    counter-increment: section;
    width: 50%;
    margin-bottom: 10px;
    position: relative;
    padding-left: 40px;
    padding-right: 10px;
    box-sizing: border-box;
}

.facts-container ol li::before {
    content: counter(section);
    border-radius: 50%;
    width: 30px;
    height: 30px;
    background-color: black;
    color: white;
    text-align: center;
    line-height: 30px;
    position: absolute;
    left: 0;
    top: 0;
}


/* Odd fact items */

.facts-container ol li:nth-child(odd) {
    clear: both;
    float: left;
}


/* Even fact items */

.facts-container ol li:nth-child(even) {
    clear: both;
    float: right;
}


/* END FACTS */

@media (max-width: 1024px) {
    /* MOBILE TABLE */
    .full-width-table {
        width: 94%;
    }
    .full-width-table,
    .full-width-table thead,
    .full-width-table tbody,
    .full-width-table th,
    .full-width-table td,
    .full-width-table tr {
        display: block;
    }
    .full-width-table thead tr {
        position: absolute;
        top: -9999px;
        left: -9999px;
    }
    .full-width-table tr {
        border: 1px solid #ccc;
    }
    .full-width-table td {
        border: none;
        border-bottom: 1px solid #eee;
        position: relative;
        padding-left: 50%;
        text-align: right;
    }
    .full-width-table td:before {
        position: absolute;
        top: 6px;
        left: 6px;
        width: 45%;
        padding-right: 10px;
        white-space: nowrap;
        text-align: left;
        font-weight: bold;
    }
    .mobile-head-names-tallest-buildings td:nth-of-type(1):before {
        content: "Rank";
    }
    .mobile-head-names-tallest-buildings td:nth-of-type(2):before {
        content: "Building";
    }
    .mobile-head-names-tallest-buildings td:nth-of-type(3):before {
        content: "Height";
    }
    .mobile-head-names-tallest-buildings td:nth-of-type(4):before {
        content: "Floors";
    }
    .mobile-head-names-tallest-buildings td:nth-of-type(5):before {
        content: "Completion Year";
    }
    .mobile-head-names-tallest-buildings td:nth-of-type(6):before {
        content: "Country";
    }
    .mobile-head-names-tallest-buildings td:nth-of-type(7):before {
        content: "City";
    }
    .mobile-head-names-famous-landmarks td:nth-of-type(1):before {
        content: "Building";
    }
    .mobile-head-names-famous-landmarks td:nth-of-type(2):before {
        content: "Height (meters)";
    }
    .mobile-head-names-famous-landmarks td:nth-of-type(3):before {
        content: "Height Ratio";
    }
    .mobile-head-names-famous-landmarks td:nth-of-type(4):before {
        content: "Year of Construction";
    }
    .mobile-head-names-famous-landmarks td:nth-of-type(5):before {
        content: "City/Country";
    }
    /* END MOBILE TABLE */
    /* MOBILE FACTS */
    .facts-container ol li {
        width: 100%;
        padding-left: 40px;
        padding-right: 40px;
        float: none;
        clear: both;
    }
    .facts-container ol li::before {
        left: 0;
        right: auto;
        top: 10px;
    }
    /* END MOBILE FACTS */
}