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

body {
    font-family: Arial, sans-serif;
    font-size: 1rem;
    line-height: 1.5;
    display: flex;
    flex-direction: column;
    min-height: 100vh; 
}

header {
    text-align: center;
    background: #6aeeb5;
    font-size: 1.5rem;
    height: 50px; 
    display: flex;
    align-items: center;
    justify-content: center;
}

main {
    flex: 1;
    display: grid;
    grid-template-columns: minmax(200px, 400px) 1fr;
    max-width: 1500px;
    width: 100%;
    margin: 0 auto;
    padding: 20px 15px; 
    gap: 20px; 
}

aside {
    align-self: start;
    padding: 1.25rem;
    background: #559fee;
    color: #fff;
    border-radius: 0.9rem;
    max-height: 50vh; 
    overflow-y: auto;
}

aside h2 {
    color: #000;
    margin-bottom: 1rem;
}

.container-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr); 
    grid-gap: 10px; 
}

.grid-item {
    border: 1px solid #fd9c9c;
    padding: 0.75rem;
    border-radius: 0.6rem;
    display: flex;
    flex-direction: column;
    max-height: 200px;
    overflow: hidden;
}

.grid-item h3 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.grid-item p {
    display: -webkit-box;
    -webkit-line-clamp: 5; 
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

footer {
    background: #ec5a5a;
    text-align: center;
    font-size: 1.2rem;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: auto;
}

@media (max-width: 1024px) {
    main {
        grid-template-columns: 1fr;
    }

    aside {
        max-height: 100px;
    }

    .container-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .container-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .container-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    body {
        font-size: 0.9rem;
    }
}