/*
Theme Name: md_thenews
Theme URI: https://example.com/
Author: Autogenerated
Author URI: https://example.com/
Description: A custom WordPress theme that mimics the look and feel of the archived Sheffield Press and Pioneer Enterprise website.  
Version: 1.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Tags: news, newspaper, responsive, two-columns, custom-menu
Text Domain: sheffieldpress-theme
*/

/*
 * Basic Reset
 * Remove default margins, paddings and set box sizing.
 */
* {
    box-sizing: border-box;
}
html, body {
    margin: 0;
    padding: 0;
}

/*
 * Colour palette inspired by The Sheffield Press site.
 * The primary colour is a deep red used for the navigation bar and highlights.
 * Dark greys are used for text and footer backgrounds.
 */
:root {
    --primary-color: #b7222a;
    --secondary-color: #8a171e;
    --dark-color: #333333;
    --light-bg: #f5f5f5;
    --footer-bg: #222222;
    --footer-text: #ffffff;
}

body {
    font-family: "Arial", "Helvetica Neue", Helvetica, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    background: #ffffff;
    color: var(--dark-color);
}

a {
    color: var(--primary-color);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* Top bar with date and login link */
.top-bar {
    background: #fafafa;
    border-bottom: 1px solid #e0e0e0;
    font-size: 14px;
    color: var(--dark-color);
    padding: 4px 0;
}
.top-bar .container {
    max-width: 1080px;
    margin: 0 auto;
    padding: 0 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.top-bar a {
    color: var(--primary-color);
    font-weight: bold;
}

/* Header with site branding */
.header {
    background: #ffffff;
    border-bottom: 3px solid var(--primary-color);
    padding: 10px 0;
}
.header .container {
    max-width: 1080px;
    margin: 0 auto;
    padding: 0 15px;
    display: flex;
    align-items: center;
}
.site-branding {
    display: flex;
    align-items: center;
}
.site-branding .custom-logo-link img,
.site-branding img {
    max-height: 60px;
    height: auto;
    max-width: 100%;
    width: auto;
}
.site-title {
    font-family: "Georgia", serif;
    font-size: 2rem;
    margin: 0;
    color: var(--dark-color);
}

/* Navigation bar */
.navbar {
    background: var(--primary-color);
}
.navbar .container {
    max-width: 1080px;
    margin: 0 auto;
    padding: 0 15px;
}
.navbar ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
}
.navbar li {
    margin: 0;
}
.navbar a {
    display: block;
    padding: 12px 20px;
    color: #ffffff;
    font-weight: bold;
    text-transform: uppercase;
    font-size: 14px;
}
.navbar li:hover > a {
    background: var(--secondary-color);
}
.navbar .current-menu-item > a,
.navbar .current_page_item > a {
    background: var(--secondary-color);
}

/* Layout structure */
.container {
    max-width: 1080px;
    margin: 0 auto;
    padding: 0 15px;
}
.content-area {
    display: flex;
    flex-wrap: wrap;
    margin-top: 20px;
}
.main-content {
    flex: 0 0 70%;
    padding-right: 20px;
}
.sidebar {
    flex: 0 0 30%;
}

/* Posts and excerpts */
.post {
    margin-bottom: 40px;
    border-bottom: 1px solid #e0e0e0;
    padding-bottom: 20px;
}
.post:last-of-type {
    border-bottom: none;
}
.post .entry-title {
    margin: 0 0 10px;
    font-size: 1.6rem;
    line-height: 1.3;
}
.post .entry-title a {
    color: var(--dark-color);
}
.post .entry-meta {
    color: #777777;
    font-size: 14px;
    margin-bottom: 10px;
}
.post .entry-content {
    font-size: 16px;
}
.post-thumbnail img {
    width: 100%;
    height: auto;
    margin-bottom: 10px;
}

/* Search form styling */
.search-form {
    display: flex;
    margin-bottom: 20px;
}
.search-form .search-field {
    flex: 1;
    padding: 8px;
    font-size: 16px;
    border: 1px solid #ccc;
    border-right: none;
}
.search-form .search-submit {
    background: var(--primary-color);
    border: none;
    color: #ffffff;
    padding: 8px 16px;
    font-size: 16px;
    cursor: pointer;
}
.search-form .search-submit:hover {
    background: var(--secondary-color);
}

/* Footer styling */
.footer {
    background: var(--footer-bg);
    color: var(--footer-text);
    padding: 40px 0;
    font-size: 14px;
}
.footer .widget-area {
    max-width: 1080px;
    margin: 0 auto;
    padding: 0 15px;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
}
.footer .widget {
    flex: 0 0 30%;
    margin-bottom: 20px;
}
.footer .widget-title {
    font-size: 1.2rem;
    margin: 0 0 10px;
    color: var(--footer-text);
    text-transform: uppercase;
}
.footer .widget a {
    color: var(--footer-text);
    text-decoration: underline;
}
.footer .widget a:hover {
    color: #dddddd;
}
.footer-bottom {
    text-align: center;
    padding: 10px 0;
    border-top: 1px solid #444444;
    margin-top: 20px;
}
.footer-bottom a {
    color: #cccccc;
}

/* Footer navigation menu */
.footer-menu ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    margin-bottom: 10px;
}
.footer-menu li {
    margin-right: 15px;
}
.footer-menu li:last-child {
    margin-right: 0;
}
.footer-menu a {
    color: var(--footer-text);
    text-transform: uppercase;
    font-size: 14px;
}
.footer-menu a:hover {
    color: #dddddd;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .main-content,
    .sidebar {
        flex: 0 0 100%;
        padding-right: 0;
    }
    .navbar ul {
        flex-direction: column;
    }
    .navbar a {
        padding: 10px 15px;
    }
    .header .container {
        flex-direction: column;
        align-items: flex-start;
    }
    .top-bar .container {
        flex-direction: column;
        align-items: flex-start;
    }
}