/* --- General Page Styling --- */
body {
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    line-height: 1.6;
    color: #3c4043; /* Google-style dark grey for better readability */
    margin: 0;
    padding: 0;
    background-color: #ffffff;
    -webkit-font-smoothing: antialiased;
}

/* --- Header & Navigation --- */
header {
    background: #ffffff;
    padding: 15px 5%;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    justify-content: space-between; /* Pushes brand to left, nav items to right */
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.logo {
    font-size: 1.6rem;
    font-weight: 700;
    color: #1a73e8; /* YES Blue accent */
    text-decoration: none;
    letter-spacing: -0.5px;
    margin-right: 50px; /* Force significant breathing room after the logo */
    white-space: nowrap;
}

nav {
    display: flex;
    align-items: center;
    gap: 30px; /* Creates consistent space between the menu list and the search box */
    flex-grow: 1;
    justify-content: flex-end;
}

nav ul {
    list-style: none;
    display: flex;
    gap: 25px; /* Spacing between Home, Micro-Business, etc. */
    margin: 0;
    padding: 0;
}

nav a {
    text-decoration: none;
    color: #5f6368;
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.2s ease;
}

nav a:hover {
    color: #1a73e8;
}

/* --- Search Bar Styling --- */
.search-box form {
    display: flex;
    align-items: center;
}

.search-box input[type="text"] {
    padding: 8px 12px;
    border: 1px solid #dadce0;
    border-radius: 4px 0 0 4px;
    outline: none;
    width: 180px;
    font-size: 0.9rem;
}

.search-box button {
    padding: 8px 18px;
    background: #1a73e8;
    color: white;
    border: 1px solid #1a73e8;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
    font-weight: 500;
    font-size: 0.9rem;
}

.search-box button:hover {
    background: #1557b0;
}

/* --- Tightened Featured Section --- */
.featured {
    text-align: center;
    padding: 40px 10%; /* Reduced from 80px/100px to bring content up */
    background-color: #f8f9fa;
}

.featured h1 {
    font-size: 2.2rem; /* Slightly smaller to save space */
    color: #202124;
    margin-bottom: 8px; /* Tighter gap between title and subtext */
    font-weight: 700;
}

.featured p {
    font-size: 1rem;
    color: #5f6368;
    max-width: 600px;
    margin: 0 auto;
}

/* --- Tightened Blog Grid --- */
.grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px; /* Reduced gap between cards from 40px */
    padding: 30px 5%; /* Reduced top padding to bring grid closer to header */
    max-width: 1100px;
    margin: 0 auto;
}

.card {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 16px; /* Reduced internal padding for a cleaner look */
    transition: transform 0.3s ease, box-shadow 0.3s;
    display: flex;
    flex-direction: column;
}

.card img {
    width: 100%;
    height: 200px; /* Gives the image consistent breathing room */
    object-fit: cover; /* This prevents the image from looking "cut off" or squished */
    object-position: top; /* Ensures the most important part of the image shows */
    border-radius: 4px;
    margin-bottom: 12px;
}

.read-more {
    margin-top: auto;
    color: #1a73e8;
    text-decoration: none;
    font-weight: 600;
}

/* --- Mobile Responsiveness --- */
@media (max-width: 900px) {
    header {
        flex-direction: column;
        padding: 20px;
    }
    .logo {
        margin-right: 0;
        margin-bottom: 15px;
    }
    nav {
        flex-direction: column;
        width: 100%;
        gap: 20px;
    }
    nav ul {
        justify-content: center;
        flex-wrap: wrap;
    }
}