/*
Theme Name: Patrolapart Standalone
Theme URI: https://patrolapart.com.au/
Author: Site Team
Description: A standalone classic WordPress theme styled to match Patrolapart product search aesthetics.
Version: 3.1
*/

/* Base palette matching Patrolapart */
:root {
  --pa-header-bg: #222222;
  --pa-header-text: #ffffff;
  --pa-accent-yellow: #FFFF00; /* Main CTA / Highlight */
  --pa-accent-yellow-hover: #e5e600;
  --pa-brand-red: #ED1C2A; /* Links */
  --pa-brand-red-hover: #7f0a12;
  --pa-border: #e5e7eb;
  --pa-card-bg: #ffffff;
  --pa-card-text: #424242;
  --pa-secondary-bg: #f3f4f6;
  --pa-font-main: 'Poppins', "Helvetica Neue", Helvetica, Arial, sans-serif;
}

/* Global Reset/Overrides for Block Theme */
body {
  font-family: var(--pa-font-main) !important;
  background-color: var(--pa-secondary-bg) !important;
  color: var(--pa-card-text) !important;
  font-size: 16px !important;
  line-height: 1.63 !important;
}

.wp-site-blocks {
    padding-top: 0 !important;
}

/* Match the 1170px Bootstrap Container */
.container.content {
    background: #fff;
    padding: 40px 15px;
    margin: 0 auto 40px !important;
    max-width: 1170px !important;
    width: 100%;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--pa-font-main) !important;
    font-weight: 700 !important;
}

a {
    color: var(--pa-brand-red);
    text-decoration: none;
}

a:hover {
    color: var(--pa-brand-red-hover);
    text-decoration: none;
}

/* Header & Nav */
.l-header__holder { background: #222; }
.l-navigation-holder { background: #333; }

/* Page Titles with Yellow Underline */
.content__title, .widget__header {
    font-size: 32px !important;
    font-weight: 700 !important;
    text-transform: uppercase;
    margin-bottom: 20px !important; /* Reduced from 30px */
    position: relative;
    padding-bottom: 10px;
}

.content__title:after, .widget__header:after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    background: var(--pa-accent-yellow);
    height: 4px;
    width: 60px;
}

/* Specific spacing for Single Post Content */
.single-post .wp-block-post-content {
    margin-top: 10px !important; /* Move image up closer to title */
}

/* Blog Listing */
.m-blogs__post {
    margin-bottom: 40px;
    padding-bottom: 40px;
    border-bottom: 1px solid #eee;
}

.m-blogs__post:last-child {
    border-bottom: 0;
}

/* Image with Date Overlay */
.m-blogs__img {
    position: relative;
    margin-bottom: 20px;
}

.m-blogs__img img {
    width: 100%;
    height: auto;
    display: block;
}

.m-blogs__img .date {
    position: absolute;
    right: 0;
    bottom: 0;
    background: #fff;
    color: #333;
    padding: 5px 15px;
    font-style: italic !important;
    font-size: 18px;
    font-weight: 700;
    z-index: 10;
}

/* Meta Bar */
.m-blogs__toolbox {
    margin-bottom: 10px;
    color: #333;
    font-size: 14px;
    font-weight: 500;
}

.m-blogs__toolbox i {
    margin-right: 8px;
    color: #333;
}

/* Post Title */
.m-blogs__heading {
    margin-top: 0 !important;
    margin-bottom: 15px !important;
    font-size: 24px !important;
    font-weight: 700 !important;
    text-transform: uppercase;
    line-height: 1.2 !important;
}

.m-blogs__heading a {
    color: #202020 !important;
}

.m-blogs__heading a:hover {
    color: var(--pa-brand-red) !important;
}

/* Post Excerpt/Content spacing */
.m-blog__intro, .wp-block-post-excerpt, .wp-block-post-content {
    color: #424242;
    font-size: 16px;
    line-height: 1.6;
    margin-top: 20px !important;
    margin-bottom: 20px !important;
}

/* Ensure images inside content have bottom margin */
.wp-block-post-content img, .wp-block-image {
    margin-bottom: 25px !important;
}

/* Read More */
.read-more {
    display: inline-block;
    color: #000 !important;
    font-weight: 700;
    font-style: italic;
    font-size: 16px;
    text-decoration: none;
}

.read-more:hover {
    color: var(--pa-brand-red) !important;
}

.read-more i {
    margin-left: 5px;
}

/* Sidebar Categories */
.widget__header {
    font-size: 24px !important;
}

.list-links {
    list-style: none;
    padding: 0;
}

.list-links li {
    padding: 10px 0;
    border-bottom: 1px solid #eee;
}

.list-links li a {
    color: #6d6d6d;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 14px;
    display: block;
}

.list-links li a:hover {
    color: #000;
}

/* Pagination */
.pagination {
    margin-top: 40px;
    display: flex;
    justify-content: center;
}

.pagination .page-numbers {
    padding: 8px 16px;
    border: 1px solid #ddd;
    margin: 0 4px;
    color: #333;
    font-weight: 700;
}

.pagination .page-numbers.current {
    background: #000;
    color: #fff;
    border-color: #000;
}

/* WP Grid to Bootstrap Grid */
.wp-block-columns.row {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
}

.wp-block-column.col-md-5 { width: 41.666% !important; flex-basis: 41.666% !important; padding: 0 15px; }
.wp-block-column.col-md-7 { width: 58.333% !important; flex-basis: 58.333% !important; padding: 0 15px; }
.wp-block-column.col-md-9 { width: 75% !important; flex-basis: 75% !important; padding: 0 15px; }
.wp-block-column.col-md-3 { width: 25% !important; flex-basis: 25% !important; padding: 0 15px; }

@media (max-width: 991px) {
    .wp-block-columns.row { flex-wrap: wrap !important; }
    .wp-block-column { width: 100% !important; flex-basis: 100% !important; }
}
