/*
Theme Name: Milepost Blog
Theme URI: https://milepostdispatch.com/
Author: Milepost Dispatch
Description: A custom block theme for the Milepost Dispatch blog. Matches the main milepostdispatch.com brand: #0F2A47 navy primary, #F59E0B amber accent, DM Sans body, Barlow Condensed headings.
Requires at least: 6.4
Tested up to: 6.6
Requires PHP: 7.4
Version: 1.0.0
License: GPL-2.0-or-later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: milepost-blog
*/

/* Reset margins on body for sticky header */
body { margin: 0; }

/* Sticky branded header */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: #0F2A47;
    box-shadow: 0 1px 0 rgba(255,255,255,0.05), 0 2px 6px rgba(0,0,0,0.15);
}

.site-header-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 68px;
}

.brand-logo {
    font-family: 'Barlow Condensed', system-ui, sans-serif;
    font-weight: 700;
    font-size: 1.5rem;
    color: #ffffff;
    letter-spacing: 0.01em;
    text-decoration: none;
    line-height: 1;
}

.brand-logo .accent {
    color: #F59E0B;
}

.top-nav {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.top-nav a {
    color: rgba(255,255,255,0.85);
    font-weight: 500;
    font-size: 0.875rem;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    text-decoration: none;
    transition: color 0.15s, background 0.15s;
}

.top-nav a:hover {
    color: #ffffff;
    background: rgba(255,255,255,0.05);
}

.top-nav a.active {
    color: #F59E0B;
}

.top-nav a.cta-button {
    background: #F59E0B;
    color: #ffffff;
    padding: 0.625rem 1.125rem;
    border-radius: 8px;
    font-weight: 600;
    margin-left: 0.5rem;
}

.top-nav a.cta-button:hover {
    background: #D97706;
}

@media (max-width: 900px) {
    .top-nav a:not(.cta-button):not(.active) {
        display: none;
    }
}

/* Page content wrapper */
.site-main {
    max-width: 1280px;
    margin: 0 auto;
    padding: 3rem 1.5rem;
}

/* Post card on listings */
.post-card {
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 1.75rem;
    margin-bottom: 1.25rem;
    transition: box-shadow 0.15s, border-color 0.15s, transform 0.15s;
    background: #ffffff;
}

.post-card:hover {
    box-shadow: 0 6px 20px rgba(0,0,0,0.06);
    border-color: #0F2A47;
    transform: translateY(-1px);
}

.post-card .wp-block-post-title {
    font-family: 'Barlow Condensed', system-ui, sans-serif;
    font-weight: 700;
    font-size: 1.5rem;
    line-height: 1.25;
    margin: 0 0 0.5rem;
    letter-spacing: 0.01em;
}

.post-card .wp-block-post-title a {
    color: #0F2A47;
    text-decoration: none;
}

.post-card .wp-block-post-title a:hover {
    color: #F59E0B;
}

.post-card .wp-block-post-excerpt {
    color: #4b5563;
    font-size: 0.95rem;
    line-height: 1.65;
    margin: 0.75rem 0 0;
}

.post-card .wp-block-post-excerpt__more-text,
.post-card .wp-block-post-excerpt__more-link {
    color: #F59E0B;
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    margin-top: 0.5rem;
    display: inline-block;
}

.entry-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    color: #6b7280;
    font-size: 0.825rem;
    margin: 0;
}

.entry-meta::before { content: ""; }

.entry-meta .wp-block-post-date,
.entry-meta .wp-block-post-author-name {
    color: #6b7280;
    font-size: 0.825rem;
}

.entry-meta a { color: inherit; text-decoration: none; }

/* Single post styles */
.single-post-title {
    font-family: 'Barlow Condensed', system-ui, sans-serif;
    font-weight: 700;
    font-size: 2.75rem;
    line-height: 1.15;
    color: #0F2A47;
    letter-spacing: 0.005em;
    margin: 0 0 0.75rem;
}

.single-entry .wp-block-post-content {
    font-size: 1.0625rem;
    line-height: 1.75;
    color: #1f2937;
}

.single-entry .wp-block-post-content h2 {
    font-family: 'Barlow Condensed', system-ui, sans-serif;
    font-weight: 700;
    font-size: 1.875rem;
    margin: 2.5rem 0 0.75rem;
    color: #0F2A47;
}

.single-entry .wp-block-post-content h3 {
    font-family: 'Barlow Condensed', system-ui, sans-serif;
    font-weight: 600;
    font-size: 1.4rem;
    margin: 2rem 0 0.5rem;
    color: #0F2A47;
}

.single-entry .wp-block-post-content a {
    color: #0F2A47;
    text-decoration: underline;
    text-decoration-color: rgba(15,42,71,0.3);
    text-underline-offset: 3px;
}

.single-entry .wp-block-post-content a:hover {
    text-decoration-color: #F59E0B;
    color: #D97706;
}

.single-entry .wp-block-post-content blockquote {
    border-left: 4px solid #F59E0B;
    padding: 0.5rem 0 0.5rem 1.25rem;
    margin: 1.75rem 0;
    color: #374151;
    font-style: italic;
}

.single-entry .wp-block-post-content code {
    background: #f3f4f6;
    padding: 0.15em 0.4em;
    border-radius: 4px;
    font-size: 0.92em;
}

.single-entry .wp-block-post-featured-image {
    margin: 1.5rem 0 2rem;
}

.single-entry .wp-block-post-featured-image img {
    border-radius: 12px;
    width: 100%;
    height: auto;
}

.back-link {
    color: #F59E0B;
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
}

.back-link:hover { color: #D97706; }

/* Pagination */
.wp-block-query-pagination {
    margin-top: 2.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e5e7eb;
}

.wp-block-query-pagination a {
    color: #0F2A47;
    text-decoration: none;
    font-weight: 500;
}

.wp-block-query-pagination a:hover { color: #F59E0B; }

/* Footer */
.site-footer {
    background: #081A2E;
    color: rgba(255,255,255,0.8);
    margin-top: 4rem;
    padding: 3rem 0 2rem;
}

.site-footer-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2.5rem;
}

@media (min-width: 768px) {
    .footer-grid { grid-template-columns: repeat(4, 1fr); }
}

.footer-col h3 {
    color: #ffffff;
    font-family: 'Barlow Condensed', system-ui, sans-serif;
    text-transform: uppercase;
    font-size: 0.825rem;
    letter-spacing: 0.12em;
    font-weight: 600;
    margin: 0 0 1rem;
}

.footer-col ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-col li {
    margin-bottom: 0.625rem;
}

.footer-col a, .footer-col span {
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    font-size: 0.875rem;
    transition: color 0.15s;
}

.footer-col a:hover { color: #ffffff; }

.copy-bar {
    margin-top: 3rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255,255,255,0.1);
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    color: rgba(255,255,255,0.4);
    font-size: 0.75rem;
}

@media (min-width: 768px) {
    .copy-bar {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }
}

.copy-links {
    display: flex;
    gap: 1.25rem;
}

.copy-links a {
    color: rgba(255,255,255,0.4);
    text-decoration: none;
    transition: color 0.15s;
}

.copy-links a:hover { color: rgba(255,255,255,0.85); }

/* 404 */
.error-404 {
    text-align: center;
    padding: 5rem 1.5rem;
}

.error-404 h1 {
    font-family: 'Barlow Condensed', system-ui, sans-serif;
    font-size: 5rem;
    color: #0F2A47;
    margin: 0 0 0.5rem;
}

.error-404 p {
    color: #6b7280;
    font-size: 1.125rem;
    margin-bottom: 2rem;
}

/* Search form */
.wp-block-search__inside-wrapper {
    border: 1px solid #d1d5db;
    border-radius: 8px;
    overflow: hidden;
}

.wp-block-search__input {
    border: none;
    padding: 0.625rem 0.875rem;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.95rem;
}

.wp-block-search__button {
    background: #0F2A47;
    color: white;
    border: none;
    padding: 0 1.25rem;
    font-weight: 600;
    cursor: pointer;
}

.wp-block-search__button:hover { background: #1E3A5F; }
