/* Import common styles from about2.css */
@import url('about2.css');

/* --- Blog Page Specific Styles --- */

/* Adjusting page-content padding if needed for blog */
.page-content {
    padding-top: 90px; /* Ensure space for fixed header */
    padding-bottom: 60px;
    background-color: var(--light-gray); /* Match body background */
}

/* Blog Hero Header Section */
.blog-hero-section {
    padding: 100px 0;
    background: linear-gradient(to right, rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.5)), url('../images/blog/blog_hero_bg.jpg') no-repeat center center/cover; /* Creative blog header background */
    color: var(--primary-white);
    text-align: center;
    box-shadow: none; /* Remove section box shadow */
    border-radius: 0;
    margin-bottom: 60px;
    position: relative;
    overflow: hidden; /* For any internal animations if added later */
}

.blog-hero-section h1 {
    font-family: 'Roboto Condensed', sans-serif;
    font-size: 4.5em; /* Large, prominent title */
    color: var(--primary-white);
    text-shadow: 2px 2px 6px rgba(0, 0, 0, 0.8);
    margin-bottom: 20px;
    position: relative;
    display: inline-block; /* For underline effect */
    padding-bottom: 15px;
    letter-spacing: 1px;
}

.blog-hero-section h1::after {
    content: '';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    bottom: 0;
    width: 120px; /* Underline for the title */
    height: 4px;
    background-color: var(--nsbe-orange);
    border-radius: 2px;
}

.blog-hero-section p {
    font-size: 1.3em;
    max-width: 800px;
    margin: 0 auto 40px auto;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.5;
}

.blog-search-bar {
    display: flex;
    justify-content: center;
    margin-top: 30px;
    position: relative;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.blog-search-bar input[type="text"] {
    width: 100%;
    padding: 15px 25px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 50px; /* Pill shape */
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--primary-white);
    font-size: 1.1em;
    outline: none;
    transition: all 0.3s ease;
}

.blog-search-bar input[type="text"]::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

.blog-search-bar input[type="text"]:focus {
    border-color: var(--nsbe-orange);
    background-color: rgba(255, 255, 255, 0.2);
}

.blog-search-bar button {
    background-color: var(--nsbe-orange);
    color: var(--primary-white);
    border: none;
    padding: 15px 20px;
    border-radius: 50px;
    cursor: pointer;
    font-size: 1.1em;
    margin-left: -45px; /* Overlap with input for icon */
    position: relative;
    z-index: 2;
    transition: background-color 0.3s ease;
}

.blog-search-bar button:hover {
    background-color: #e66a00; /* Darker orange on hover */
}


/* Blog Posts Layout */
.blog-posts-section {
    padding-top: 60px;
    padding-bottom: 60px;
}

.blog-container {
    display: flex;
    gap: 40px; /* Space between main content and sidebar */
    flex-wrap: wrap; /* Allow wrapping on smaller screens */
    align-items: flex-start; /* Align items to the top */
}

.blog-posts-grid {
    flex: 3; /* Blog posts take up 3/4 of the width */
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); /* Responsive grid */
    gap: 30px; /* Space between blog cards */
}

/* Individual Blog Post Card */
.blog-post-card {
    background-color: var(--primary-white);
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.blog-post-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.blog-post-card .post-image {
    width: 100%;
    height: 220px; /* Fixed height for consistency */
    object-fit: cover; /* Ensures image covers area without distortion */
    border-bottom: 1px solid var(--medium-gray);
}

.blog-post-card .post-content {
    padding: 25px;
    display: flex;
    flex-direction: column;
    flex-grow: 1; /* Allow content to grow and push button to bottom */
}

.blog-post-card .post-title {
    font-family: 'Roboto Condensed', sans-serif;
    font-size: 1.8em;
    color: var(--dark-gray);
    margin-bottom: 15px;
    line-height: 1.3;
}

.blog-post-card .post-meta {
    font-size: 0.9em;
    color: var(--text-color);
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.blog-post-card .post-meta i {
    color: var(--nsbe-orange);
}

.blog-post-card .post-excerpt {
    font-size: 1em;
    color: var(--text-color);
    margin-bottom: 20px;
    line-height: 1.6;
    flex-grow: 1; /* Allows excerpt to take available space */
}

.read-more-btn-small {
    display: inline-flex; /* Allows icon next to text */
    align-items: center;
    gap: 8px;
    background-color: var(--nsbe-blue);
    color: var(--primary-white);
    padding: 10px 20px;
    border-radius: 25px;
    font-size: 0.95em;
    font-weight: 600;
    transition: background-color 0.3s ease, transform 0.2s ease;
    align-self: flex-start; /* Align to the left/start of the card */
}

.read-more-btn-small:hover {
    background-color: #0056b3;
    transform: translateX(3px); /* Subtle slide on hover */
}

/* Blog Sidebar */
.blog-sidebar {
    flex: 1; /* Sidebar takes up 1/4 of the width */
    min-width: 280px; /* Minimum width for sidebar */
    background-color: var(--primary-white);
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    padding: 30px;
    align-self: stretch; /* Make sidebar fill height of container */
}

.sidebar-widget {
    margin-bottom: 40px;
}

.sidebar-widget:last-child {
    margin-bottom: 0;
}

.sidebar-widget h3 {
    font-family: 'Roboto Condensed', sans-serif;
    font-size: 1.6em;
    color: var(--dark-gray);
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 10px;
    text-transform: capitalize;
}

.sidebar-widget h3::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 30px;
    height: 3px;
    background-color: var(--nsbe-orange);
}

.sidebar-widget ul {
    list-style: none;
    padding: 0;
}

.sidebar-widget li {
    margin-bottom: 10px;
}

.sidebar-widget a {
    color: var(--text-color);
    font-size: 1em;
    transition: color 0.3s ease;
    display: block; /* Make entire list item clickable area */
    padding: 5px 0;
}

.sidebar-widget a:hover {
    color: var(--nsbe-orange);
    text-decoration: underline;
}


/* --- Responsive Adjustments for Blog Page --- */

@media (max-width: 992px) {
    .blog-hero-section {
        padding: 80px 0;
    }

    .blog-hero-section h1 {
        font-size: 3.5em;
    }

    .blog-posts-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 25px;
    }

    .blog-container {
        flex-direction: column; /* Stack main content and sidebar */
    }

    .blog-posts-grid,
    .blog-sidebar {
        flex: auto; /* Allow them to take full width */
        width: 100%;
        min-width: unset;
    }

    .blog-sidebar {
        margin-top: 40px; /* Space between posts and sidebar when stacked */
        padding: 25px;
    }
}

@media (max-width: 768px) {
    .blog-hero-section {
        padding: 60px 0;
    }

    .blog-hero-section h1 {
        font-size: 2.8em;
    }

    .blog-hero-section p {
        font-size: 1.1em;
    }

    .blog-posts-grid {
        gap: 20px;
    }

    .blog-post-card .post-image {
        height: 180px;
    }

    .blog-post-card .post-title {
        font-size: 1.5em;
    }

    .blog-post-card .post-content {
        padding: 20px;
    }

    .read-more-btn-small {
        padding: 8px 16px;
        font-size: 0.9em;
    }

    .sidebar-widget h3 {
        font-size: 1.4em;
    }
}

@media (max-width: 480px) {
    .blog-hero-section h1 {
        font-size: 2.2em;
    }

    .blog-hero-section p {
        font-size: 1em;
    }

    .blog-search-bar input[type="text"] {
        padding: 12px 20px;
        font-size: 1em;
    }

    .blog-search-bar button {
        padding: 12px 18px;
        font-size: 1em;
        margin-left: -40px;
    }

    .blog-posts-grid {
        grid-template-columns: 1fr; /* Single column on very small screens */
    }

    .blog-post-card .post-image {
        height: 160px;
    }

    .blog-post-card .post-title {
        font-size: 1.3em;
    }

    .blog-post-card .post-content {
        padding: 15px;
    }
}