*{
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    background: #ffffff;
    color: #111111;
}

.latest-container {
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
    padding: 12px 15px;
    background: #f8f8f8;

}

.section-heading {
    position: relative;
    margin: 0 0 30px;
    padding: 0 0 14px;
    font-size: 22px;
    line-height: 1;
    font-weight: 700;
    border-bottom: 2px solid #cccccc;
}

.section-heading::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -2px;
    width: 43px;
    height: 2px;
    background: #2937d4;
}

.featured-article {
    position: relative;
    display: block;
    width: 100%;
    height: 305px;
    margin-bottom: 18px;
    overflow: hidden;
    border-radius: 10px;
    text-decoration: none;
    color: #ffffff;
}

.featured-article img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.featured-article::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.65), rgba(0, 0, 0, 0.05) 65%);
}

.featured-content {
    position: absolute;
    z-index: 2;
    left: 20px;
    right: 15px;
    bottom: 25px;
}

.featured-category {
    display: inline-block;
    padding: 5px 8px;
    margin-bottom: 7px;
    border-radius: 5px;
    background: #14945b;
    color: #ffffff;
    font-size: 11px;
    line-height: 1;
    font-weight: 600;
}

.featured-title {
    margin: 0;
    color: #ffffff;
    font-size: 26px;
    line-height: 1.15;
    font-weight: 500;
}

.horizontal-list {
    width: 100%;
}

.horizontal-card {
    display: flex;
    width: 100%;
    gap: 18px;
    padding-bottom: 7px;
    margin-bottom: 17px;
    border-bottom: 1px solid #dddddd;
    text-decoration: none;
    color: #111111;
}

.horizontal-card:hover h2 {
    color: #222ddc;
}

.horizontal-card:hover img {
    transform: scale(1.1);
    transition: .5s;
}

.horizontal-image {
    flex: 0 0 115px;
    width: 115px;
    height: 96px;
    overflow: hidden;
    border-radius: 6px;
}

.horizontal-image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: .5s;
}

.horizontal-content {
    flex: 1;
    min-width: 0;
}

.horizontal-category {
    display: inline-block;
    padding: 5px 7px;
    margin-bottom: 3px;
    border-radius: 4px;
    background: #14945b;
    color: #ffffff;
    font-size: 10px;
    line-height: 1;
    font-weight: 600;
}

.horizontal-title {
    margin: 0 0 5px;
    font-size: 15px;
    line-height: 1.15;
    font-weight: 700;
}

.horizontal-description {
    margin: 0;
    font-size: 13px;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.grid-section {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 26px 23px;
    margin-top: 16px;
    padding: 20px 0 10px;
}

.grid-card {
    display: block;
    width: 100%;
    overflow: hidden;
    border-radius: 9px;
    background: #ffffff;
    text-decoration: none;
    color: #111111;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.04);
    transition: .3s ease-in;
}

.grid-card:hover {
    box-shadow: 0 4px 60px 0 #0003;
}

.grid-card:hover img {
    transform: scale(1.1);
    transition: .3s ease-in;
}

.grid-card:hover .grid-title {
    color: #222ddc;
}

.grid-image {
    position: relative;
    width: 100%;
    height: 190px;
    overflow: hidden;
}

.grid-image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: .3s ease-in;
}

.grid-category {
    position: absolute;
    top: 8px;
    left: 7px;
    padding: 5px 7px;
    border-radius: 4px;
    background: #2638dc;
    color: #ffffff;
    font-size: 10px;
    line-height: 1;
    font-weight: 600;
}

.grid-content {
    min-height: 160px;
    padding: 12px 8px 15px;
}

.grid-title {
    margin: 0 0 7px;
    font-size: 17px;
    line-height: 1.2;
    font-weight: 700;
}

.grid-description {
    margin: 0;
    font-size: 13px;
    line-height: 1.4;
}

.loading {
    padding: 30px;
    text-align: center;
    font-size: 16px;
}

.error {
    padding: 30px;
    text-align: center;
    color: red;
}
.logo {
    text-align: center;
}
.logo img {
    width: 230px;
    height: 110px;
}
.footer {
    background: #151515;
    color: #fff;
    padding: 48px 25px 20px;
    max-width: 500px;
    margin: 0 auto;
}
.footer h2 {
    margin: 0 0 10px;
    font-size: 20px;
}
.footer p {
    margin: 0;
    font-size: 15px;
    line-height: 1.35;
    font-weight: 300;
}
.social-icons {
    display: flex;
    gap: 12px;
    margin: 20px 0 25px;
}
.social-icons a {
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;

    background: #eee;
    color: #222;

    border-radius: 3px;

    font-size: 14px;
    font-weight: bold;

    text-decoration: none;
}
.footer-bottom {
    border-top: 1px solid #555;
    padding-top: 20px;
    text-align: left;
}
.footer-bottom p {
    font-size: 16px;
}
.footer-links {
    display: flex;
    justify-content: center;
    gap: 28px;
    margin-top: 10px;
}
.footer-links a {
    font-size: 14px;
}
.footer-bottom a {
 color: #fff;
 text-decoration: none;
}
/* ========MOBILE========= */

@media (max-width: 480px) {
    .latest-container {
        padding: 15px 8px;
    }

    .section-heading {
        font-size: 22px;
    }

    .featured-article {
        height: 305px;
    }

    .featured-title {
        font-size: 25px;
    }

    .horizontal-card {
        gap: 18px;
    }

    .horizontal-image {
        flex: 0 0 115px;
        width: 115px;
        height: 96px;
    }

    .grid-section {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 20px 15px;
    }

    .grid-image {
        height: 190px;
    }
        .footer {
        padding: 48px 25px 20px;
    }

    .footer p {
        font-size: 14px;
    }

    .footer-links {
        gap: 20px;
    }
    .logo img {
        width: 150px !important;
        height: 71px !important;
    }
}

/* ==========SMALL MOBILE========*/

@media (max-width: 380px) {
    .horizontal-card {
        gap: 14px;
    }

    .horizontal-image {
        flex: 0 0 105px;
        width: 105px;
        height: 88px;
    }

    .horizontal-title {
        font-size: 14px;
    }

    .grid-image {
        height: 165px;
    }

    .grid-title {
        font-size: 15px;
    }
}

@media screen and (min-width:768px) {
    body {
        background: url(https://assetakamai.thefactmagic.com/thefactmagic/assets1/images/BGBody.webp);
        background-size: 100%;
    }
}