/*
Theme Name: CPR Blog
Theme URI: https://iwantcpr.com
Author: Aaron Lowe
Description: Custom blog theme for CPR Technology
Version: 1.0
*/

body.blog,
body.single,
body.archive,
body.page {
    margin: 0;
    padding: 0;
}

/* =========================
   SINGLE POST HERO OVERRIDE
   ========================= */

body.single .service-hero {
    min-height: 190px !important;
    height: 190px !important;
    padding: 0 !important;
}

body.single .service-hero .container {
    min-height: 190px !important;
    height: 190px !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    align-items: center !important;
    padding: 20px 20px 16px !important;
    text-align: center !important;
}

body.single .service-hero h1 {
    font-size: clamp(2rem, 4vw, 3rem) !important;
    line-height: 1.08 !important;
    margin: 0 0 8px !important;
}

body.single .service-hero .service-hero-sub {
    margin: 0 !important;
    font-size: 1rem !important;
}

/* =========================
   SINGLE POST BODY LAYOUT
   ========================= */

body.single .pricing-intro {
    background: #ffffff !important;
    padding: 0 !important;
}

body.single .pricing-intro .container {
    max-width: 920px !important;
    width: 100% !important;
    margin: 0 auto !important;
    padding: 72px 34px 90px !important;
    box-sizing: border-box !important;
}

body.single .blog-post-content {
    max-width: 820px !important;
    width: 100% !important;
    margin: 0 auto !important;
    padding: 0 !important;
    text-align: left !important;
    box-sizing: border-box !important;

    font-family: "Source Serif 4", Georgia, serif;
    font-size: 1rem;
    line-height: 1.62;
    font-weight: 400;
    color: #222222;
}

body.single .blog-post-content > * {
    max-width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
}

body.single .blog-post-content p,
body.single .blog-post-content li {
    font-family: "Source Serif 4", Georgia, serif;
    font-size: 1rem;
    line-height: 1.62;
    font-weight: 400 !important;
    color: #222222;
}

body.single .blog-post-content p {
    margin: 0 0 1.05em;
    text-align: justify;
}

body.single .blog-post-content h2 {
    font-family: Inter, sans-serif;
    font-size: 1.6rem;
    line-height: 1.24;
    font-weight: 700;
    color: #5aa12f;
    margin: 2.2rem 0 0.85rem;
    text-align: left;
    letter-spacing: -0.02em;
}

body.single .blog-post-content h3 {
    font-family: Inter, sans-serif;
    font-size: 1.2rem;
    line-height: 1.28;
    font-weight: 700;
    color: #111111;
    margin: 1.8rem 0 0.75rem;
    text-align: left;
}

body.single .blog-post-content h4 {
    font-family: Inter, sans-serif;
    font-size: 1.05rem;
    line-height: 1.3;
    font-weight: 700;
    color: #111111;
    margin: 1.5rem 0 0.7rem;
    text-align: left;
}

body.single .blog-post-content ul,
body.single .blog-post-content ol {
    margin: 1rem 0 1.25rem 0;
    padding-left: 1.35rem;
    text-align: left;
}

body.single .blog-post-content ul {
    list-style: disc;
}

body.single .blog-post-content ol {
    list-style: decimal;
}

body.single .blog-post-content li {
    margin-bottom: 0.38rem;
    padding-left: 0.08rem;
}

body.single .blog-post-content strong {
    font-weight: 700;
    color: #111111;
}

body.single .blog-post-content em {
    font-style: italic;
}

body.single .blog-post-content a {
    color: #4f8f2a;
    text-decoration: underline;
}

body.single .blog-post-content a:hover {
    color: #111111;
}

body.single .blog-post-content blockquote {
    border-left: 4px solid #6fbb3b;
    margin: 1.6rem 0;
    padding: 0.3rem 0 0.3rem 1rem;
    font-style: italic;
    color: #444444;
}

body.single .blog-post-content img {
    max-width: 100%;
    height: auto;
    border-radius: 16px;
    margin: 1.8rem 0;
}

/* Safety: neutralize random WP block width/alignment weirdness */
body.single .blog-post-content .wp-block-group,
body.single .blog-post-content .wp-block-paragraph,
body.single .blog-post-content .wp-block-heading,
body.single .blog-post-content .wp-block-list {
    max-width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
}

/* =========================
   MOBILE
   ========================= */

@media (max-width: 768px) {
    body.single .service-hero {
        min-height: 170px !important;
        height: 170px !important;
    }

    body.single .service-hero .container {
        min-height: 170px !important;
        height: 170px !important;
        padding: 18px 18px 14px !important;
    }

    body.single .service-hero h1 {
        font-size: clamp(1.7rem, 7vw, 2.3rem) !important;
    }

    body.single .pricing-intro .container {
        padding: 46px 20px 64px !important;
    }

    body.single .blog-post-content {
        max-width: 100% !important;
        font-size: 0.98rem;
        line-height: 1.58;
    }

    body.single .blog-post-content p,
    body.single .blog-post-content li {
        font-size: 0.98rem;
        line-height: 1.58;
    }

    body.single .blog-post-content h2 {
        font-size: 1.42rem;
    }

    body.single .blog-post-content h3 {
        font-size: 1.12rem;
    }

    body.single .blog-post-content p {
        text-align: left;
    }
}
/* =========================
   BLOG ARCHIVE PAGE
   ========================= */

body.blog .blog-archive-section,
body.home.blog .blog-archive-section,
body.archive .blog-archive-section {
    background: #ffffff;
    padding: 0 !important;
}

body.blog .blog-archive-section .container,
body.home.blog .blog-archive-section .container,
body.archive .blog-archive-section .container {
    max-width: 920px;
    margin: 0 auto;
    padding: 72px 34px 90px;
    box-sizing: border-box;
}

.blog-archive-list {
    max-width: 820px;
    margin: 0 auto;
}

.blog-archive-item {
    padding: 0 0 2rem;
    margin: 0 0 2.2rem;
    border-bottom: 1px solid #e6e6e6;
}

.blog-archive-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.blog-archive-date {
    font-family: Inter, sans-serif;
    font-size: 0.92rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    color: #5f5f5f;
    margin: 0 0 0.45rem;
    text-transform: none;
}

.blog-archive-title {
    margin: 0;
    font-family: Inter, sans-serif;
    font-size: 1.7rem;
    line-height: 1.22;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.blog-archive-title a {
    color: #1b1b1b;
    text-decoration: none;
    transition: color 0.2s ease;
}

.blog-archive-title a:hover {
    color: #5aa12f;
}

@media (max-width: 768px) {
    body.blog .blog-archive-section .container,
    body.home.blog .blog-archive-section .container,
    body.archive .blog-archive-section .container {
        padding: 46px 20px 64px;
    }

    .blog-archive-title {
        font-size: 1.35rem;
    }

    .blog-archive-date {
        font-size: 0.88rem;
    }

    .blog-archive-item {
        padding-bottom: 1.6rem;
        margin-bottom: 1.8rem;
    }
}

.blog-post-signoff {
    margin-top: 2.75rem;
    padding-top: 1.5rem;
    border-top: 1px solid #d9d9d9;
    display: flex;
    justify-content: flex-end;
}

.blog-post-signoff p {
    margin: 0;
    max-width: 360px;
    font-family: Inter, sans-serif;
    font-size: 0.95rem;
    line-height: 1.55;
    color: #555555;
    text-align: right !important;
}

.blog-post-signoff strong {
    display: block;
    font-size: 1rem;
    color: #1f1f1f;
    margin-bottom: 0.2rem;
}

:root {
    --brand-green: #6fbb3b;
    --brand-green-dark: #5ea032;
    --brand-green-light: #84c955;

    --charcoal-dark: #1f2426;
    --charcoal-medium: #343a3c;
    --charcoal-light: #444b4d;
}

/* Base */

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

body {
    font-family: "Inter", system-ui, -apple-system, sans-serif;
    background: var(--charcoal-medium);
    color: #e6e6e6;
    line-height: 1.6;
}

/* Shared layout */

.container {
    width: 90%;
    max-width: 1100px;
    margin: auto;
    padding: 40px 0;
}

/* Header */

.site-header {
    background: #ffffff url("/images/logo-nav.png") no-repeat left top;
    background-size: auto 86px;
    height: 86px;
    position: sticky;
    top: 0;
    z-index: 1000;
}

/* Navigation */

.main-nav {
    position: absolute;
    right: 18px;
    top: 50%;
    transform: translateY(-50%);
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 32px;
    list-style: none;
}

.main-nav a {
    display: inline-block;
    text-decoration: none;
    color: #333;
    font-weight: 500;
    letter-spacing: 0.02em;
    padding-bottom: 4px;
    transition: color 0.25s ease, transform 0.2s ease;
}

.main-nav a:hover {
    color: var(--brand-green);
    transform: translateY(-1px);
}

.main-nav a.contact {
    background: var(--brand-green);
    position: relative;
    top: -2px;
    color: #111;
    padding: 8px 16px;
    border-radius: 999px;
}

/* Hamburger button */

.nav-toggle {
    display: none;
    width: 44px;
    height: 44px;
    border: none;
    background: transparent;
    cursor: pointer;
    padding: 0;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 6px;
}

.nav-toggle span {
    display: block;
    width: 24px;
    height: 3px;
    background: #333;
    border-radius: 999px;
    transition: all 0.25s ease;
}

/* Mobile nav */

@media (max-width: 768px) {
    .site-header {
        background-size: auto 72px;
        height: 72px;
    }

    .main-nav {
        right: 14px;
        top: 50%;
        transform: translateY(-50%);
    }

    .nav-toggle {
        display: flex;
    }

    .nav-menu {
        display: none;
        position: absolute;
        top: calc(100% + 11px);
        right: -14px;
        width: min(280px, 90vw);
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        background: #ffffff;
        border-radius: 14px;
        box-shadow: 0 14px 30px rgba(0,0,0,0.18);
        overflow: hidden;
        padding: 8px 0;
    }

    .nav-menu.open {
        display: flex;
    }

    .nav-menu li {
        list-style: none;
    }

    .nav-menu a {
        display: block;
        padding: 14px 18px;
        color: #222;
        font-size: 1rem;
        border-bottom: 1px solid #f0f0f0;
    }

    .nav-menu li:last-child a {
        border-bottom: none;
    }

    .nav-menu a.contact {
        background: none;
        color: #222;
        border-radius: 0;
        padding: 14px 18px;
        top: 0;
    }

    .nav-menu a:hover {
        background: #f7f7f7;
        transform: none;
        color: var(--brand-green);
    }

    .nav-toggle.active span:nth-child(1) {
        transform: translateY(9px) rotate(45deg);
    }

    .nav-toggle.active span:nth-child(2) {
        opacity: 0;
    }

    .nav-toggle.active span:nth-child(3) {
        transform: translateY(-9px) rotate(-45deg);
    }
}

@media (max-width: 768px) {
    .site-header .nav-menu {
        display: none !important;
        position: absolute !important;
        top: calc(100% + 11px) !important;
        right: -14px !important;
        width: min(260px, 88vw) !important;
        margin: 0 !important;
        padding: 6px 0 !important;
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 0 !important;
        list-style: none !important;
        background: #ffffff !important;
        border-radius: 14px !important;
        box-shadow: 0 14px 30px rgba(0,0,0,0.18) !important;
        overflow: hidden !important;
    }

    .site-header .nav-menu.open {
        display: flex !important;
    }

    .site-header .nav-menu li {
        list-style: none !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    .site-header .nav-menu a {
        display: block !important;
        margin: 0 !important;
        padding: 12px 18px !important;
        font-size: 0.98rem !important;
        line-height: 1.2 !important;
        font-weight: 500 !important;
        height: auto !important;
        min-height: 0 !important;
        border-bottom: 1px solid #ececec !important;
    }

    .site-header .nav-menu li:last-child a {
        border-bottom: none !important;
    }

    .site-header .nav-menu a.contact {
        background: none !important;
        color: #222 !important;
        border-radius: 0 !important;
        top: 0 !important;
        padding: 12px 18px !important;
    }
}