/* Basic Reset & Defaults */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f4f4f4;
    font-size: 16px;
}

.container {
    width: 90%;
    max-width: 1100px;
    margin: auto;
    overflow: hidden;
    /* Clear floats if any */
    padding: 0 20px;
}

/* Header */
header {
    background: #007bff;
    /* Primary color */
    color: #fff;
    padding: 20px 0;
    border-bottom: #0056b3 3px solid;
}

header .logo-area {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

header .logo {
    height: 50px;
    /* Adjust as needed */
    margin-right: 15px;
}

header h1 {
    margin: 0;
    font-size: 2em;
    font-weight: bold;
}

header .subtitle {
    font-size: 1em;
    margin-bottom: 15px;
    font-style: italic;
}

header nav ul {
    list-style: none;
    padding: 0;
}

header nav ul li {
    display: inline-block;
    /* For horizontal menu */
    margin-right: 15px;
}

header nav ul li a {
    color: #fff;
    text-decoration: none;
    font-weight: bold;
    padding: 5px 10px;
    border-radius: 4px;
    transition: background-color 0.3s ease;
}

header nav ul li a:hover {
    background-color: #0056b3;
}

/* Page Content Layout (Main + Aside) */
.page-content {
    display: flex;
    flex-wrap: wrap;
    /* Allow sidebar to wrap on smaller screens */
    gap: 30px;
    /* Space between main and aside */
    padding-top: 30px;
    padding-bottom: 30px;
}

main {
    flex: 3;
    /* Main content takes 3 parts of the space */
    background: #fff;
    padding: 20px;
    border-radius: 5px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

aside {
    flex: 1;
    /* Sidebar takes 1 part of the space */
    background: #f9f9f9;
    padding: 20px;
    border-radius: 5px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.05);
}

main h2 {
    color: #007bff;
    margin-bottom: 20px;
    border-bottom: 2px solid #eee;
    padding-bottom: 10px;
}

/* Blog Post Styling */
.blog-post {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.blog-post:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.blog-post .post-image {
    width: 100%;
    max-height: 350px;
    /* Limit image height */
    object-fit: cover;
    /* Crop image to fit */
    border-radius: 5px;
    margin-bottom: 15px;
}

.blog-post h3 a {
    color: #333;
    text-decoration: none;
    font-size: 1.5em;
}

.blog-post h3 a:hover {
    color: #007bff;
}

.post-meta {
    font-size: 0.9em;
    color: #666;
    margin-bottom: 5px;
}

.post-category a {
    font-size: 0.9em;
    color: #007bff;
    text-decoration: none;
    background-color: #e7f3ff;
    padding: 3px 8px;
    border-radius: 3px;
    display: inline-block;
    margin-bottom: 10px;
}

.post-category a:hover {
    background-color: #cce5ff;
}

.read-more {
    display: inline-block;
    margin-top: 10px;
    color: #007bff;
    text-decoration: none;
    font-weight: bold;
}

.read-more:hover {
    text-decoration: underline;
}

/* Pagination */
.pagination {
    margin-top: 30px;
    text-align: center;
}

.pagination a {
    color: #007bff;
    text-decoration: none;
    padding: 8px 12px;
    margin: 0 5px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.pagination a:hover {
    background-color: #007bff;
    color: white;
}


/* Sidebar Widgets */
.sidebar-widget {
    margin-bottom: 25px;
    padding: 15px;
    background-color: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
}

.sidebar-widget h3 {
    color: #0056b3;
    margin-bottom: 10px;
    font-size: 1.2em;
    border-bottom: 1px solid #eee;
    padding-bottom: 5px;
}

.sidebar-widget ul {
    list-style: none;
}

.sidebar-widget ul li {
    margin-bottom: 8px;
}

.sidebar-widget ul li a {
    color: #333;
    text-decoration: none;
}

.sidebar-widget ul li a:hover {
    color: #007bff;
    text-decoration: underline;
}

.sidebar-widget input[type="search"] {
    width: calc(100% - 70px);
    /* Adjust based on button width */
    padding: 8px;
    margin-right: 5px;
    border: 1px solid #ccc;
    border-radius: 3px;
}

.sidebar-widget button {
    padding: 8px 10px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 3px;
    cursor: pointer;
}

.sidebar-widget button:hover {
    background-color: #0056b3;
}

.tags a {
    display: inline-block;
    background-color: #e9ecef;
    color: #495057;
    padding: 5px 10px;
    margin: 3px;
    border-radius: 15px;
    /* Pill shape */
    text-decoration: none;
    font-size: 0.9em;
}

.tags a:hover {
    background-color: #ced4da;
}

.ad-placeholder img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
}


/* Footer */
footer {
    background: #333;
    color: #fff;
    text-align: center;
    padding: 25px 0;
    margin-top: 30px;
}

footer .footer-tech-logo {
    max-height: 40px;
    margin-bottom: 10px;
    filter: invert(0.8);
    /* Make placeholder logo lighter on dark background */
}

footer p {
    margin: 5px 0;
    font-size: 0.9em;
}

footer a {
    color: #00bfff;
    /* Light blue for links in footer */
    text-decoration: none;
}

footer a:hover {
    text-decoration: underline;
}

/* Responsive Design */
@media (max-width: 768px) {
    header .logo-area {
        flex-direction: column;
        align-items: flex-start;
    }

    header h1 {
        font-size: 1.8em;
        margin-top: 10px;
        /* Space after logo if stacked */
    }

    header nav ul li {
        display: block;
        /* Stack nav items */
        margin-right: 0;
        margin-bottom: 5px;
    }

    header nav ul li a {
        display: block;
        /* Make links full width for easier tapping */
    }

    .page-content {
        flex-direction: column;
        /* Stack main and aside */
    }

    main,
    aside {
        flex: 1 1 100%;
        /* Full width for both */
    }

    .sidebar-widget input[type="search"] {
        width: calc(100% - 80px);
        /* Adjust for button */
    }
}

@media (max-width: 480px) {
    header h1 {
        font-size: 1.5em;
    }

    .post-image {
        max-height: 200px;
    }

    .blog-post h3 a {
        font-size: 1.3em;
    }
}