/* blog-section.css
   Base blog styles (kept from original), plus added responsive news layout,
   gutters and padding adjustments so text doesn't touch the edges on mobile.
*/

/* Reset / base typography */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'poppins', sans-serif;
}

h1,h2,h3,h4,h5,h6{
    font-family: 'poppins', sans-serif;
}

p,a,input,label,textarea,span,ul,li{
    font-family: 'poppins', sans-serif;
}

/* Section spacing */
.blog-section {
    padding-bottom: 150px;
}

/* Header row */
.blog-row {
    padding-top: 40px;
    margin: 40px auto;
    max-width: 800px;
    text-align: center;
}

.blog-row h1 {
    font-family: 'Yantramanav', sans-serif;
    font-size: 2.5rem;
    margin-bottom: 15px;
}

/* Container */
.blog-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Main grid (featured + list) */
.blog-grid {
    display: grid;
    grid-template-columns: 1fr minmax(0, 1fr);
    gap: 30px;
}

/* Featured post */
.featured-post {
    position: relative;
    height: 360px;
    overflow: hidden;
    border-radius: 8px;
}

.featured-post img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.featured-post-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 30px;
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
    color: white;
}

.category-tag {
    background-color: #005587;
    color: white;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 14px;
    display: inline-block;
}

.featured-title {
    font-size: 24px;
    margin: 10px 0;
}

.featured-desc {
    font-size: 16px;
    opacity: 0.9;
}

/* Post list & cards */
.post-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.post-card {
    display: flex;
    gap: 20px;
}

.post-thumbnail {
    width: 150px;
    height: 100px;
    flex-shrink: 0;
}

.post-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
}

.post-content {
    flex-grow: 1;
}

.post-title {
    font-size: 18px;
    color: #333;
    margin-bottom: 8px;
}

.post-category {
    color: #005587;
    margin-bottom: 4px;
}

.post-desc {
    color: #666;
    font-size: 14px;
    line-height: 1.4;
}

/* -------------------------
   Responsive additions & padding fixes
   - Ensure blog/news area is responsive and text has comfortable gutters
   ------------------------- */

/* Add inner gutter for .blog-container on small screens */
@media (max-width: 768px) {
    .blog-container {
        padding-left: 16px;
        padding-right: 16px;
    }

    .blog-row {
        padding-left: 8px;
        padding-right: 8px;
    }
}

/* If your index.html uses a simple flex wrapper for the news area (as provided),
   the following rules make that wrapper responsive and stack columns on small screens.
   Targets the second child under .blog-section used in index.html (featured + list wrapper). */
.blog-section > div:nth-child(2) {
    display: flex;
    gap: 36px;
    max-width: 1100px;
    margin: 0 auto;
    align-items: flex-start;
    box-sizing: border-box;
}

/* Stack the news columns on small screens */
@media (max-width: 768px) {
    .blog-section > div:nth-child(2) {
        flex-direction: column;
        gap: 18px;
        padding-left: 12px;
        padding-right: 12px;
    }

    .featured-post {
        height: 320px;
    }

    .blog-section > div:nth-child(2) .post-card {
        align-items: flex-start;
        gap: 12px;
    }

    .blog-section > div:nth-child(2) .post-thumbnail {
        width: 100%;
        height: 160px;
    }

    .blog-section > div:nth-child(2) .post-content {
        width: 100%;
    }
}

/* Ensure featured content padding is comfortable on small phones */
@media (max-width: 480px) {
    .featured-post-content {
        padding: 20px;
    }
}

/* Smaller layout adjustments for very narrow viewports */
@media (max-width: 360px) {
    .featured-post { height: 260px; }
    .featured-post-content h2,
    .featured-title { font-size: 20px; }
    .post-desc { font-size: 13px; }
}