<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Travel Blog</title>
<style>
body {
font-family: Arial, sans-serif;
margin: 0;
background: #f5f5f5;
color: #333;
}
.blog-container {
max-width: 1200px;
margin: 30px auto;
padding: 0 20px;
display: grid;
grid-template-columns: 2fr 1fr;
grid-gap: 20px;
}
.blog-card {
position: relative;
border-radius: 12px;
overflow: hidden;
cursor: pointer;
box-shadow: 0 4px 8px rgba(0,0,0,0.1);
transition: transform 0.3s ease;
}
.blog-card:hover {
transform: translateY(-5px);
}
.blog-card img {
width: 100%;
height: 100%;
object-fit: cover;
display: block;
}
.blog-info {
position: absolute;
bottom: 0;
left: 0;
width: 100%;
padding: 20px;
background: linear-gradient(to top, rgba(0,0,0,0.7), transparent);
color: #fff;
}
.blog-info h2 {
margin: 0 0 10px;
font-size: 20px;
font-weight: bold;
}
.blog-info p {
font-size: 14px;
margin: 0;
}
/* Grid Layout */
.featured {
grid-row: span 2;
height: 500px;
}
.side-cards {
display: grid;
grid-template-rows: 1fr 1fr;
grid-gap: 20px;
}
.side-small {
display: grid;
grid-template-columns: 1fr 1fr;
grid-gap: 20px;
}
@media (max-width: 900px) {
.blog-container {
grid-template-columns: 1fr;
}
.featured {
height: 350px;
}
}
</style>
</head>
<body>
<div class="blog-container">
<!-- Featured Large Post -->
<div class="blog-card featured">
<img src="https://source.unsplash.com/900x600/?travel,food" alt="Blog Post">
<div class="blog-info">
<h2>Dramatically improve your cooking using just your imagination</h2>
<p>by Travel Blogger • March 17, 2024</p>
</div>
</div>
<!-- Right Side Top Post -->
<div class="blog-card">
<img src="https://source.unsplash.com/400x250/?farm,ducks" alt="Blog Post">
<div class="blog-info">
<h2>Ducks in old Macdonald’s farm!</h2>
<p>March 17, 2024</p>
</div>
</div>
<!-- Right Side Bottom (2 small posts) -->
<div class="side-small">
<div class="blog-card">
<img src="https://source.unsplash.com/400x250/?forest,nature" alt="Blog Post">
<div class="blog-info">
<h2>In all things of nature there is something marvelous</h2>
<p>March 17, 2024</p>
</div>
</div>
<div class="blog-card">
<img src="https://source.unsplash.com/400x250/?art,travel" alt="Blog Post">
<div class="blog-info">
<h2>With age comes wisdom. With travel comes understanding</h2>
<p>March 17, 2024</p>
</div>
</div>
</div>
</div>
</body>
</html>