/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

:root {
    --primary: #ff5722;
    --secondary: #00a0dc;
    --dark: #121212;
    --light: #f8f9fa;
    --gray: #6c757d;
    --border: #e1e1e1;
}

body {
    background-color: var(--light);
    color: var(--dark);
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s ease;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.category-tag {
    display: inline-block;
    background-color: var(--primary);
    color: white;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 10px;
}

.featured-content h2 {
    font-size: 28px;
    margin-bottom: 15px;
    line-height: 1.3;
}

.article-meta {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 14px;
}

.author-img {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    object-fit: cover;
}

/* Side Articles */
.side-articles {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.side-article {
    display: flex;
    gap: 15px;
    padding: 15px;
    border-radius: 8px;
    background-color: white;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease;
}

.side-article:hover {
    transform: translateY(-5px);
}

.side-article-img {
    width: 100px;
    height: 80px;
    border-radius: 6px;
    object-fit: cover;
}

.side-article-content h3 {
    font-size: 16px;
    margin-bottom: 8px;
}

/* Main Content */
.main-content {
    padding: 40px 0;
}

.section-title {
    font-size: 24px;
    margin-bottom: 30px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--primary);
    display: inline-block;
}

.articles-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-bottom: 50px;
}

.article-card {
    background-color: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    animation: slideUp 0.5s ease;
}

.article-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

.article-img {
    height: 200px;
    width: 100%;
    object-fit: cover;
}

.article-content {
    padding: 20px;
}

.article-content h3 {
    font-size: 18px;
    margin-bottom: 12px;
    line-height: 1.4;
}

.article-content p {
    color: var(--gray);
    font-size: 14px;
    margin-bottom: 15px;
}

.read-more {
    color: var(--primary);
    font-weight: 600;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.read-more:hover {
    gap: 10px;
}

/* Responsive Styles */
@media (max-width: 992px) {
    .hero-grid {
        grid-template-columns: 1fr;
    }

    .articles-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .featured-article {
        min-height: 300px;
    }

    .featured-content {
        padding: 20px;
    }

    .featured-content h2 {
        font-size: 22px;
    }
}

/* ========== CRITICAL FIX: Mobile Single Column ========== */
@media (max-width: 600px) {
    .articles-grid {
        grid-template-columns: 1fr;  /* Single column */
        gap: 20px;
    }

    .side-article {
        flex-direction: row;  /* Keep side articles horizontal on tablet */
    }

    .side-article-img {
        width: 100px;
        height: 80px;
    }

    .featured-content h2 {
        font-size: 20px;
    }
}

/* ========== SMALL PHONES (like Android) ========== */
@media (max-width: 480px) {
    .articles-grid {
        grid-template-columns: 1fr !important;  /* Force single column */
        gap: 16px;
    }

    .article-card {
        width: 100%;
        max-width: 100%;
    }

    .article-img {
        height: 180px;
    }

    .article-content {
        padding: 16px;
    }

    .article-content h3 {
        font-size: 16px;
    }

    /* Side articles stack vertically on very small screens */
    .side-article {
        flex-direction: column;
        padding: 12px;
    }

    .side-article-img {
        width: 100%;
        height: 160px;
    }

    .side-article-content h3 {
        font-size: 15px;
    }

    .featured-content h2 {
        font-size: 18px;
    }

    .container {
        padding: 0 12px;
    }

    .section-title {
        font-size: 20px;
    }

    .main-content {
        padding: 20px 0;
    }
}