/* Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.6;
}

.side {
    display: flex;
    max-width: 1200px;
    margin: 2rem auto;
    /* padding: 0 1rem; */
    gap: 2rem;
}

.grid {
    flex: 2;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 0.5rem;
}

.card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    /* max-width: 350px; */
    margin: 0.5rem;
}

    .card:hover {
        transform: translateY(-5px);
        box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    }

    .card img {
        width: 100%;
        height: 200px;
        object-fit: cover;
        transition: transform 0.5s ease;
    }

    .card:hover img {
        transform: scale(1.03);
    }

    .card header {
        padding: 1.25rem 1.5rem 0;
    }

    .card time {
        display: block;
        font-size: 0.8rem;
        color: #666;
        margin-bottom: 0.5rem;
        text-align: center;
    }

    .card h1 {
        font-size: 1.25rem;
        margin: 0 0 0.75rem 0;
        line-height: 1.4;
        text-align: center;
    }

        .card h1 a {
            color: #222;
            text-decoration: none;
            transition: color 0.2s ease;
        }

            .card h1 a:hover {
                color: #0066cc;
            }

    .card .content {
        padding: 0 1.5rem;
        margin: 0.5rem 0 1rem;
        color: #555;
        font-size: 0.95rem;
        line-height: 1.5;
        text-align: center;
    }

.tags-author {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1.5rem;
    border-top: 1px solid #eee;
    font-size: 0.85rem;
    margin-top: auto;
}

.tag {
    color: #0066cc;
    background-color: red;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    transition: all 0.2s ease;
}

    .tag:hover {
        background: #d0e4ff;
    }

.tags-author a {
    color: white;
    text-decoration: none;
    transition: color 0.2s ease;
}

    .tags-author a:hover {
        color: #0066cc;
        text-decoration: underline;
    }

/* Sidebar Styles */
.sidebar {
    flex: 1;
    max-width: 300px;
}

    .sidebar h3 {
        font-size: 1.1rem;
        margin: 1.5rem 0 1rem;
        padding-bottom: 0.5rem;
        border-bottom: 2px solid #eee;
    }

.recent-post {
    background-color: white;
    border-radius: 8px;
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #eee;
}

    .recent-post img {
        width: 80px;
        height: 60px;
        object-fit: cover;
        border-radius: 4px;
    }

    .recent-post div {
        flex: 1;
    }

    .recent-post strong {
        display: block;
        font-size: 0.9rem;
    }

    .recent-post small {
        color: #666;
        font-size: 0.8rem;
    }

.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

    .tags span {
        background: #f0f0f0;
        color: #555;
        padding: 0.25rem 0.5rem;
        border-radius: 4px;
        font-size: 0.8rem;
        cursor: pointer;
    }

        .tags span:hover {
            background: #e0e0e0;
        }

.social-icons {
    display: flex;
    gap: 1rem;
}

    .social-icons a {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 36px;
        height: 36px;
        border-radius: 50%;
        color: white;
        transition: transform 0.3s ease;
    }

        .social-icons a:hover {
            transform: translateY(-3px);
        }

    .social-icons .x {
        background-color: #000;
    }

    .social-icons .facebook {
        background-color: #3b5998;
    }

    .social-icons .instagram {
        background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fdf497 5%, #fd5949 45%, #d6249f 60%, #285AEB 90%);
    }

    .social-icons .rss {
        background-color: #f26522;
    }

    /* SVG Icon Styling */
    .social-icons svg {
        width: 18px;
        height: 18px;
    }

/* Responsive Design */
@media (max-width: 992px) {
    .side {
        flex-direction: column;
    }

    .sidebar {
        max-width: 100%;
        margin-top: 2rem;
    }
}

@media (max-width: 768px) {
    .grid {
        grid-template-columns: 1fr;
    }

    .recent-post {
        flex-direction: column;
    }

        .recent-post img {
            width: 100%;
            height: 120px;
        }
}