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

body {
    font-family: "Roboto", sans-serif;
    font-optical-sizing: auto;
    font-weight: 500;
    font-style: normal;
    font-variation-settings: "wdth" 100;
}

h4 {
    color: #036;
    display: block;
    font-size: 20px;
    line-height: 26px;
    font-weight: 800;
}

a,
[tabindex] {
    outline: none;
    -webkit-tap-highlight-color: transparent;
    display: block;
    text-decoration: none;
}

small {
    display: block;
    font-size: 14px;
    font-weight: 450;
    color: #666;
}

/* content //////////////////////////////////////*/

main {
    min-height: calc(100vh - 300px);
    max-width: 1100px;
    margin: 0 auto;
    margin-top: 120px;
    padding: 0 10px;
}

/* ////////////////////////////////////////////// */

.main-content {
    display: flex;
    flex-direction: column;
    gap: 20px;
    width: 100%;
    margin-bottom: 10px;
    padding-bottom: 10px;
}

.cover-title {
    width: 100%;
    display: flex;
    align-items: center;
    background-color: #1f8bc9;
}

.cover-title h2 {
    background-color: #003366;
    color: white;
    line-height: 40px;
    font-size: 22px;
    padding: 0 10px;
    margin: 0;
}

.cover-left-title {
    width: 30px;
    height: 40px;
    margin-left: -10px;
    background-color: #003366;
    clip-path: polygon(0% 0%, 46% 0, 100% 50%, 46% 100%, 0% 100%);
}

/* ///////////////////////////////////////// */

.topic-content {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    min-width: 270px;
    gap: 20px;
}

.topic-item {
    display: flex;
    flex-direction: column;
}

.topic-item-text {
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex: 1;
    padding: 10px;
    border: 1px solid #ddd;
    border-top: none;
    border-radius: 0 0 4px 4px;
}

.topic-item-text h4 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.topic-item-text h4:hover {
    text-decoration: underline;
}

.topic-item-img {
    display: block;
    width: 100%;
    aspect-ratio: 3 / 2;
    overflow: hidden;
}

.topic-item-img img {
    object-fit: cover;
    width: 100%;
    aspect-ratio: 3 / 2;
    display: block;
    border-radius: 4px 4px 0 0;
    transition: transform 0.3s ease-in-out;
}

@media (max-width: 800px) {
    .topic-content {
        grid-template-columns: 1fr 1fr;
        gap: 20px;
    }
}

@media (max-width: 540px) {
    .topic-content {
        grid-template-columns: 1fr;
        width: 100%;
        gap: 20px;
    }

    .topic-item-text h4 {
        font-size: 24px;
        line-height: normal;
        font-weight: 1000;
    }
}
