/*
Theme Name: MP Electric Modern
Theme URI: https://mpelectric.ca/
Author: MP Electric
Author URI: https://mpelectric.ca/
Description: A modern, responsive WordPress theme for MP Electric.
Version: 1.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: mpelectric-modern
*/

:root {
    --primary-color: #ce0000;
    /* MP Electric Red */
    --secondary-color: #90a294;
    /* MP Electric Grey */
    --text-color: #202020;
    --bg-color: #ffffff;
    --light-grey: #f2f2f2;
    --dark-grey: #202020;
    --font-main: 'Noto Sans', sans-serif;
    --container-width: 1200px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-main);
    color: var(--text-color);
    background-color: var(--bg-color);
    line-height: 1.6;
}

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s ease;
}

ul {
    list-style: none;
}

/* Header */
.site-header {
    background: #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.site-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
}

.site-branding {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

.main-navigation ul {
    display: flex;
    gap: 30px;
}

.main-navigation a {
    font-weight: 500;
    color: var(--dark-grey);
}

.main-navigation a:hover {
    color: var(--primary-color);
}

.header-cta {
    background: var(--primary-color);
    color: #fff;
    padding: 10px 20px;
    border-radius: 5px;
    font-weight: 600;
}

.header-cta:hover {
    background: #004494;
    color: #fff;
}

/* Footer */
.site-footer {
    background: var(--dark-grey);
    color: var(--secondary-color);
    /* Brand Grey */
    padding: 60px 0 20px;
}

/* Blog Grid */
.post-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
}

.post-card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.post-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.post-thumbnail img {
    transition: transform 0.5s ease;
}

.post-card:hover .post-thumbnail img {
    transform: scale(1.05);
}

/* Sidebar & Widgets */
.widget {
    margin-bottom: 40px;
}

.widget-title {
    font-size: 1.2rem;
    margin-bottom: 20px;
    color: var(--primary-color);
    border-bottom: 2px solid var(--light-grey);
    padding-bottom: 10px;
}

.widget ul li {
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.widget ul li a:hover {
    color: var(--primary-color);
}

.footer-widgets {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-widget h3 {
    margin-bottom: 20px;
    color: var(--secondary-color);
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.9rem;
    color: #aaa;
}

/* Utility */
.btn {
    display: inline-block;
    padding: 12px 30px;
    background: var(--primary-color);
    color: #fff;
    border-radius: 5px;
    font-weight: 600;
    border: none;
    cursor: pointer;
}

.btn:hover {
    background: #004494;
}

/* Pagination */
.pagination {
    margin-top: 40px;
    text-align: center;
    display: block;
    width: 100%;
}

.pagination .nav-links {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
}

.pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 16px;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    color: var(--dark-grey);
    font-weight: 600;
    background: #fff;
    transition: all 0.3s ease;
    min-width: 44px;
}

.pagination .page-numbers.current {
    background: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
}

.pagination .page-numbers:hover:not(.current) {
    background: var(--light-grey);
    color: var(--primary-color);
    border-color: var(--primary-color);
    transform: translateY(-2px);
}

.pagination .page-numbers.dots {
    border: none;
    background: transparent;
}

/* ========================================
   Blog Post Content Styling
   ======================================== */

.entry-content h1,
.entry-content h2,
.entry-content h3,
.entry-content h4,
.entry-content h5,
.entry-content h6 {
    color: var(--dark-grey);
    font-weight: 700;
    margin-top: 1.5em;
    margin-bottom: 0.75em;
    line-height: 1.3;
}

.entry-content h2 {
    font-size: 2rem;
    color: var(--primary-color);
    border-bottom: 3px solid var(--light-grey);
    padding-bottom: 10px;
    margin-top: 2em;
}

.entry-content h3 {
    font-size: 1.5rem;
    color: var(--dark-grey);
}

.entry-content h4 {
    font-size: 1.25rem;
}

.entry-content h5 {
    font-size: 1.1rem;
}

.entry-content p {
    margin-bottom: 1.5em;
    line-height: 1.8;
    color: #333;
}

.entry-content ul,
.entry-content ol {
    margin: 1.5em 0;
    padding-left: 2em;
    line-height: 1.8;
}

.entry-content ul {
    list-style-type: disc;
}

.entry-content ol {
    list-style-type: decimal;
}

.entry-content li {
    margin-bottom: 0.75em;
    color: #333;
}

.entry-content li ul,
.entry-content li ol {
    margin-top: 0.75em;
    margin-bottom: 0;
}

.entry-content a {
    color: var(--primary-color);
    text-decoration: underline;
    transition: color 0.3s ease;
}

.entry-content a:hover {
    color: var(--dark-grey);
    text-decoration: none;
}

.entry-content blockquote {
    border-left: 4px solid var(--primary-color);
    padding: 1em 1.5em;
    margin: 1.5em 0;
    background: var(--light-grey);
    font-style: italic;
    color: #555;
}

.entry-content blockquote p:last-child {
    margin-bottom: 0;
}

.entry-content strong,
.entry-content b {
    font-weight: 700;
    color: var(--dark-grey);
}

.entry-content em,
.entry-content i {
    font-style: italic;
}

.entry-content code {
    background: #f4f4f4;
    padding: 2px 6px;
    border-radius: 3px;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
    color: #d63384;
}

.entry-content pre {
    background: #f4f4f4;
    padding: 1.5em;
    border-radius: 5px;
    overflow-x: auto;
    margin: 1.5em 0;
    border-left: 3px solid var(--primary-color);
}

.entry-content pre code {
    background: transparent;
    padding: 0;
    color: #333;
}

.entry-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 1.5em 0;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.entry-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5em 0;
    border: 1px solid #e0e0e0;
}

.entry-content table th,
.entry-content table td {
    padding: 12px 15px;
    text-align: left;
    border: 1px solid #e0e0e0;
}

.entry-content table th {
    background: var(--primary-color);
    color: #fff;
    font-weight: 600;
}

.entry-content table tr:nth-child(even) {
    background: var(--light-grey);
}

.entry-content hr {
    border: none;
    border-top: 2px solid var(--light-grey);
    margin: 2em 0;
}